diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java index ef8318e7..ad941a41 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java @@ -10,6 +10,7 @@ import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.security.SessionObject; import com.hai.common.security.UserCenter; +import com.hai.common.utils.HttpsUtils; import com.hai.common.utils.ResponseMsgUtil; import com.hai.config.CommonSysConst; import com.hai.entity.BsCompany; @@ -363,5 +364,24 @@ public class HighMerchantStoreController { } } + @RequestMapping(value = "/getQrCode", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "生成推广二维码") + public ResponseData getQrCode(@RequestParam(name = "storeKey", required = false) String storeKey) { + try { + + + Map params = new HashMap<>(); + + params.put("type", "2"); + params.put("code", storeKey); + return ResponseMsgUtil.success(HttpsUtils.doGet("https://hsg.dctpay.com/v1/wxMsg/createQrcode", params).getString("return_data")); + + } catch (Exception e) { + log.error("HighOrderController --> getBackendToken() error!", e); + return ResponseMsgUtil.exception(e); + } + } + } diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java index 655d250a..0bca3d78 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java @@ -346,11 +346,10 @@ public class HighUserController { SessionObject sessionObject = userCenter.getSessionObject(request); HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); - String sceneId = "type=1&code=" + userInfoModel.getHighUser().getId(); - Map params = new HashMap<>(); - params.put("sceneId", sceneId); + params.put("type", "1"); + params.put("code", userInfoModel.getHighUser().getId()); return ResponseMsgUtil.success(HttpsUtils.doGet("https://hsg.dctpay.com/v1/wxMsg/createQrcode", params).getString("return_data")); } catch (Exception e) { diff --git a/v1/src/main/java/com/v1/controller/WxMsgController.java b/v1/src/main/java/com/v1/controller/WxMsgController.java index 4685aaf2..4b045b25 100644 --- a/v1/src/main/java/com/v1/controller/WxMsgController.java +++ b/v1/src/main/java/com/v1/controller/WxMsgController.java @@ -147,7 +147,7 @@ public class WxMsgController { "特意为您奉上" + "5张优惠券" + ",放在您的"+ - "我的优惠券"+ + "优惠券"+ "里面,记得及时使用哦[爱心][爱心][爱心]\n\n" + "【如遇任何问题请致电客服:400-678-0738】" ; @@ -217,9 +217,12 @@ public class WxMsgController { @RequestMapping(value = "/createQrcode", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "创建生成二维码") - public ResponseData createQrcode(@RequestParam(name = "sceneId", required = false) String sceneId) { + public ResponseData createQrcode(@RequestParam(name = "type", required = false) String type, + @RequestParam(name = "code", required = false) String code) { try { + String sceneId = "type=" + type + "&code=" + code; + String ticket = weChatQrcodeUtils.qrCodeCreateLastTicket(sceneId).getTicket(); return ResponseMsgUtil.success(weChatQrcodeUtils.qrCodePictureUrl(ticket));