Merge remote-tracking branch 'origin/2.0-dev' into 2.0-dev

new-dev
袁野 1 year ago
parent 306610d94e
commit 7076903b16
  1. 18
      hai-order/src/main/java/com/web/controller/notify/GroupOrderController.java
  2. 4
      hai-service/src/main/java/com/hai/group/impl/GroupCodeServiceImpl.java
  3. 2
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  4. 2
      hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java

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

@ -112,9 +112,9 @@ public class GroupCodeServiceImpl implements GroupCodeService {
// 生成二维码
String qrCodeImg = highGroupCode.getGroupCode() +".png";
String qrCodeUrl = "/groupCode/" + qrCodeImg;
String qrCodeUrl = CommonSysConst.getSysConfig().getFileUrl() + "groupCode/" + qrCodeImg;
QRCodeGenerator.generateQRCodeImage(CommonSysConst.getSysConfig().getGroupCode() + highGroupCode.getGroupCode(), 350, 350, qrCodeUrl);
highGroupCode.setCodeImgUrl(qrCodeUrl);
highGroupCode.setCodeImgUrl("/groupCode/" + qrCodeImg);
updateGroupCode(highGroupCode);

@ -1204,7 +1204,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
HighGroupOrder highGroupOrder = new HighGroupOrder();
if (objectMer.getString("return_code").equals("000000")) {
highGroupOrder.setMerNo(object.getString("return_data"));
highGroupOrder.setMerNo(objectMer.getString("return_data"));
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, object.getString("return_msg"));
}

@ -81,7 +81,7 @@ public class CommonServiceImpl implements CommonService {
private Map<String, Map<String, SecDictionary>> dicCache = new HashMap<String, Map<String, SecDictionary>>();
private Map<String, Map<String, SecDictionary>> dicCache = new HashMap<>();
private List<SecRegion> citiesCache = new ArrayList<>();

Loading…
Cancel
Save