1.修改订阅二维码生成参数

This commit is contained in:
2024-08-05 09:51:33 +08:00
parent 567a5a0e23
commit 5ad0eea854
2 changed files with 4 additions and 3 deletions

View File

@@ -208,7 +208,6 @@ public class CommonController {
redisUtil.getIncrNum(key, "2");
}
/**
* 订阅消息
* @param wxMsgSubDTO
@@ -220,7 +219,9 @@ public class CommonController {
if (wxMsgSubDTO.getOpenId() == null || wxMsgSubDTO.getShopId() == null) {
return Result.fail("shopId或openId缺失");
}
loginService.addShopId(wxMsgSubDTO.getOpenId(), wxMsgSubDTO.getShopId(), wxMsgSubDTO.getType());
String msg = wxMsgSubDTO.getShopId().replace("msg", "");
String[] split = msg.split(",");
loginService.addShopId(wxMsgSubDTO.getOpenId(), split[0], split.length > 1 ? Integer.valueOf(split[1]) : null);
return Result.success(CodeEnum.SUCCESS);
}
}

View File

@@ -53,7 +53,7 @@ public class WxAccountUtil {
req.put("action_name", "QR_STR_SCENE");
HashMap<Object, Object> actionInfo = new HashMap<>();
HashMap<String, Object> scene = new HashMap<>();
scene.put("scene_str", "msg" + shopId + ":" + type);
scene.put("scene_str", "msg" + shopId + "," + type);
actionInfo.put("scene", scene);
req.put("action_info", actionInfo);
log.info("开始获取公众号二维码, 请求数据: {}", req);