|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.ibeetl.jlw.service;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import com.ibeetl.admin.core.conf.WxMpConfig;
|
|
|
|
|
import com.ibeetl.admin.core.rbac.UserLoginInfo;
|
|
|
|
|
import com.ibeetl.jlw.entity.CoreUserWx;
|
|
|
|
@ -128,8 +129,18 @@ public class MsgHandler extends AbstractHandler {
|
|
|
|
|
.fromUser(wxMessage.getToUser())
|
|
|
|
|
.build();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//由于userId是自增id,误删除CoreUser表的数据,导致微信扫码登录不了,所有重新绑定账号
|
|
|
|
|
if (ObjectUtil.isNotNull(info1)){
|
|
|
|
|
CoreUserWxQuery wxQuery = new CoreUserWxQuery();
|
|
|
|
|
wxQuery.setWxId(info1.getWxId());
|
|
|
|
|
wxQuery.setOpenid(info1.getOpenid());
|
|
|
|
|
wxQuery.setUserId(Long.parseLong(userId));
|
|
|
|
|
coreUserWxService.edit(wxQuery);
|
|
|
|
|
}else {
|
|
|
|
|
coreUserWxQuery2.setOpenid(fromUser);
|
|
|
|
|
coreUserWxService.add(coreUserWxQuery2);
|
|
|
|
|
}
|
|
|
|
|
map.put("type", "bind");
|
|
|
|
|
map.put("status", "success");
|
|
|
|
|
map.put("token", "绑定成功");
|
|
|
|
|