feat:回调处理

This commit is contained in:
苏竹红
2025-10-28 13:39:23 +08:00
parent 5120b2c48c
commit bf80d825a8
4 changed files with 48 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
package com.cool.store.handler;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.PartnerUserWechatBindDAO;
import com.cool.store.dto.wechat.WechatUserInfoDTO;
import com.cool.store.service.wechat.WechatTemplateService;
@@ -99,6 +100,8 @@ public class WeChatHandler {
//根据openId 获取用户信息
WechatUserInfoDTO userInfo = wechatTemplateService.getUserInfo(fromUserName, null);
log.info("handleSubscribeEvent: {}", JSONObject.toJSONString(userInfo));
//根据unionId 更新服务号ID
if (userInfo != null) {
partnerUserWechatBindDAO.updateByUnionId(userInfo.getUnionid(),fromUserName);