修改二维码

dev-discount
袁野 2 years ago
parent d17a7b0b57
commit 6a85d4a2f4
  1. 20
      hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java
  2. 5
      hai-cweb/src/main/java/com/cweb/controller/HighUserController.java
  3. 7
      v1/src/main/java/com/v1/controller/WxMsgController.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<String, Object> 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);
}
}
}

@ -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<String, Object> 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) {

@ -147,7 +147,7 @@ public class WxMsgController {
"特意为您奉上" +
"<a href='" + CommonSysConst.getSysConfig().getHsgDomainName() + "/hsgH5'>5张优惠券</a>" +
",放在您的"+
"<a href='" + CommonSysConst.getSysConfig().getHsgDomainName() + "/hsgH5'>我的优惠券</a>"+
"<a href='" + CommonSysConst.getSysConfig().getHsgDomainName() + "/hsgH5'>优惠券</a>"+
"里面,记得及时使用哦[爱心][爱心][爱心]\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));

Loading…
Cancel
Save