消息订阅模板绑定问题修复
This commit is contained in:
parent
fcec279495
commit
b94da3f38a
@ -5,8 +5,8 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.suisung.mall.account.mapper.AccountUserBindConnectMapper;
|
||||
import com.suisung.mall.account.service.AccountUserBaseService;
|
||||
import com.suisung.mall.account.service.AccountUserBindConnectService;
|
||||
@ -538,9 +538,9 @@ public class AccountUserBindConnectServiceImpl extends BaseServiceImpl<AccountUs
|
||||
log.info("jsonObject:{}", jsonObject);
|
||||
String openId=jsonObject.getStr("FromUserName");//用户openid
|
||||
QueryWrapper<AccountUserBindConnect> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("bind_id",openId)
|
||||
queryWrapper.eq("bind_openid",openId)
|
||||
.eq("user_type", CommonConstant.USER_TYPE_NORMAL)
|
||||
.eq("bind_type",15)
|
||||
.in("bind_type",Arrays.asList(1,15))
|
||||
.eq("bind_active", CommonConstant.Enable);
|
||||
AccountUserBindConnect accountUserBindConnect= findOne(queryWrapper);
|
||||
if (accountUserBindConnect != null) {
|
||||
@ -551,7 +551,12 @@ public class AccountUserBindConnectServiceImpl extends BaseServiceImpl<AccountUs
|
||||
String SubscribeStatusString= object.getStr("SubscribeStatusString");//订阅结果(accept接收;reject拒收)参考地址https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/subscribe-message.html#%E8%AE%A2%E9%98%85%E6%B6%88%E6%81%AF%E8%AF%AD%E9%9F%B3%E6%8F%90%E9%86%92
|
||||
if(SubscribeStatusString.equals("accept")){
|
||||
accountUserBindConnect.setBind_tmpl(templateId);
|
||||
updateById(accountUserBindConnect);
|
||||
UpdateWrapper<AccountUserBindConnect> updateWrapper = new UpdateWrapper<>(accountUserBindConnect);
|
||||
updateWrapper.set("bind_id",accountUserBindConnect.getBind_id());
|
||||
updateWrapper.set("bind_type",accountUserBindConnect.getBind_type());
|
||||
updateWrapper.set("user_id",accountUserBindConnect.getUser_id());
|
||||
updateWrapper.set("user_type",accountUserBindConnect.getUser_type());
|
||||
update(updateWrapper);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user