|
|
@ -1,10 +1,16 @@ |
|
|
|
package com.web.controller.notify; |
|
|
|
package com.web.controller.notify; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
|
|
|
|
import com.hai.common.exception.ErrorCode; |
|
|
|
|
|
|
|
import com.hai.common.exception.ErrorHelp; |
|
|
|
|
|
|
|
import com.hai.common.exception.SysCode; |
|
|
|
|
|
|
|
import com.hai.common.utils.ResponseMsgUtil; |
|
|
|
import com.hai.entity.HighGroupCode; |
|
|
|
import com.hai.entity.HighGroupCode; |
|
|
|
import com.hai.entity.HighGroupOrder; |
|
|
|
import com.hai.entity.HighGroupOrder; |
|
|
|
import com.hai.entity.HighOrder; |
|
|
|
import com.hai.entity.HighOrder; |
|
|
|
import com.hai.group.GroupCodeService; |
|
|
|
import com.hai.group.GroupCodeService; |
|
|
|
|
|
|
|
import com.hai.model.ResponseData; |
|
|
|
import com.hai.service.HighOrderService; |
|
|
|
import com.hai.service.HighOrderService; |
|
|
|
import com.hai.service.impl.OutRechargeOrderServiceImpl; |
|
|
|
import com.hai.service.impl.OutRechargeOrderServiceImpl; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
@ -37,7 +43,8 @@ public class GroupOrderController { |
|
|
|
@RequestMapping(value = "/gorOrderNotify", method = RequestMethod.GET) |
|
|
|
@RequestMapping(value = "/gorOrderNotify", method = RequestMethod.GET) |
|
|
|
@ApiOperation(value = "团购订单回调") |
|
|
|
@ApiOperation(value = "团购订单回调") |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
public void gorOrderNotify(@RequestParam(name = "groupCode", required = false) String groupCode) { |
|
|
|
public ResponseData gorOrderNotify(@RequestParam(name = "groupCode", required = false) String groupCode, |
|
|
|
|
|
|
|
@RequestParam(name = "storeId", required = false) String storeId) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -47,9 +54,15 @@ public class GroupOrderController { |
|
|
|
|
|
|
|
|
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
map.put("groupCode" , groupCode); |
|
|
|
map.put("groupCode" , groupCode); |
|
|
|
|
|
|
|
map.put("storeId" , storeId); |
|
|
|
|
|
|
|
|
|
|
|
HighGroupCode highGroupCode = groupCodeService.findGroupCode(map); |
|
|
|
HighGroupCode highGroupCode = groupCodeService.findGroupCode(map); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (highGroupCode == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到相关核销券!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HighOrder highOrder = highOrderService.getOrderById(highGroupCode.getId()); |
|
|
|
HighOrder highOrder = highOrderService.getOrderById(highGroupCode.getId()); |
|
|
|
|
|
|
|
|
|
|
|
HighGroupOrder highGroupOrder = groupCodeService.findGroupOrder(highOrder.getOrderNo()); |
|
|
|
HighGroupOrder highGroupOrder = groupCodeService.findGroupOrder(highOrder.getOrderNo()); |
|
|
@ -68,9 +81,10 @@ public class GroupOrderController { |
|
|
|
highOrderService.updateOrder(highOrder); |
|
|
|
highOrderService.updateOrder(highOrder); |
|
|
|
|
|
|
|
|
|
|
|
log.info("============回调任务End============="); |
|
|
|
log.info("============回调任务End============="); |
|
|
|
|
|
|
|
return ResponseMsgUtil.success("核销成功!"); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("WechatPayController --> wechatNotify() error!", e); |
|
|
|
log.error("WechatPayController --> wechatNotify() error!", e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|