|
@@ -7,6 +7,8 @@ import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
|
7
|
7
|
import com.alibaba.fastjson.JSONObject;
|
8
|
8
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
9
|
9
|
import com.huiju.estateagents.base.ResponseBean;
|
|
10
|
+import com.huiju.estateagents.center.sysUser.entity.SysToken;
|
|
11
|
+import com.huiju.estateagents.center.sysUser.service.ISysTokenService;
|
10
|
12
|
import com.huiju.estateagents.common.CommConstant;
|
11
|
13
|
import com.huiju.estateagents.common.WxUtils;
|
12
|
14
|
import com.huiju.estateagents.entity.*;
|
|
@@ -46,6 +48,11 @@ public class MiniAppController {
|
46
|
48
|
@Autowired
|
47
|
49
|
private ITaOrgService taOrgService;
|
48
|
50
|
|
|
51
|
+ @Autowired
|
|
52
|
+ private ISysTokenService sysTokenService;
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
49
|
56
|
|
50
|
57
|
|
51
|
58
|
/**
|
|
@@ -92,7 +99,7 @@ public class MiniAppController {
|
92
|
99
|
personQueryWrapper.eq("org_id",orgId);
|
93
|
100
|
int count = taPersonService.count(personQueryWrapper);
|
94
|
101
|
|
95
|
|
- if(from.contains("share") && StringUtils.isNotBlank(recommender) && count>0){
|
|
102
|
+ if(null!=from&&from.contains("share") && StringUtils.isNotBlank(recommender) && count>0){
|
96
|
103
|
// 添加积分
|
97
|
104
|
applicationContext.publishEvent(new EventBus(recommender, EventBus.EventType.SharePosterAll));
|
98
|
105
|
}
|
|
@@ -131,6 +138,8 @@ public class MiniAppController {
|
131
|
138
|
result.put("extraInfo", extraInfo);
|
132
|
139
|
result.put("miniAuthorized", null != taPerson.getAvatarurl() && taPerson.getAvatarurl().indexOf("wx.qlogo.cn") > 0);
|
133
|
140
|
|
|
141
|
+ String token = miniResp.get("token");
|
|
142
|
+ sysTokenService.saveToken(token);
|
134
|
143
|
|
135
|
144
|
return ResponseBean.success(result);
|
136
|
145
|
} catch (WxErrorException e) {
|