消息订阅发送任务修改绑定类型查询-不使用findOne
This commit is contained in:
parent
872984f574
commit
9710b321de
@ -542,20 +542,21 @@ public class AccountUserBindConnectServiceImpl extends BaseServiceImpl<AccountUs
|
|||||||
.eq("user_type", CommonConstant.USER_TYPE_NORMAL)
|
.eq("user_type", CommonConstant.USER_TYPE_NORMAL)
|
||||||
.in("bind_type",Arrays.asList(1,15))
|
.in("bind_type",Arrays.asList(1,15))
|
||||||
.eq("bind_active", CommonConstant.Enable);
|
.eq("bind_active", CommonConstant.Enable);
|
||||||
AccountUserBindConnect accountUserBindConnect= findOne(queryWrapper);
|
List<AccountUserBindConnect> accountUserBindConnectList= list(queryWrapper);
|
||||||
if (accountUserBindConnect != null) {
|
if (!accountUserBindConnectList.isEmpty()) {
|
||||||
|
AccountUserBindConnect accountUserBindConnect=accountUserBindConnectList.get(0);
|
||||||
JSONArray jsonArray= jsonObject.getJSONArray("List");
|
JSONArray jsonArray= jsonObject.getJSONArray("List");
|
||||||
if (jsonArray != null) {
|
if (jsonArray != null) {
|
||||||
JSONObject object= (JSONObject) jsonArray.get(0);
|
JSONObject object= (JSONObject) jsonArray.get(0);
|
||||||
String templateId= object.getStr("TemplateId");//模板id
|
String templateId= object.getStr("TemplateId");//模板id
|
||||||
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
|
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")){
|
if(SubscribeStatusString.equals("accept")){
|
||||||
accountUserBindConnect.setBind_tmpl(templateId);
|
UpdateWrapper<AccountUserBindConnect> updateWrapper = new UpdateWrapper<>();
|
||||||
UpdateWrapper<AccountUserBindConnect> updateWrapper = new UpdateWrapper<>(accountUserBindConnect);
|
updateWrapper.set("bind_tmpl",templateId);
|
||||||
updateWrapper.set("bind_id",accountUserBindConnect.getBind_id());
|
updateWrapper.eq("bind_id",accountUserBindConnect.getBind_id());
|
||||||
updateWrapper.set("bind_type",accountUserBindConnect.getBind_type());
|
updateWrapper.eq("bind_type",accountUserBindConnect.getBind_type());
|
||||||
updateWrapper.set("user_id",accountUserBindConnect.getUser_id());
|
updateWrapper.eq("user_id",accountUserBindConnect.getUser_id());
|
||||||
updateWrapper.set("user_type",accountUserBindConnect.getUser_type());
|
updateWrapper.eq("user_type",accountUserBindConnect.getUser_type());
|
||||||
update(updateWrapper);
|
update(updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user