胡轶钦 преди 5 години
родител
ревизия
21a34504b6

+ 6
- 0
pom.xml Целия файл

@@ -132,6 +132,12 @@
132 132
 				<profiles.active>prod</profiles.active>
133 133
 			</properties>
134 134
 		</profile>
135
+		<profile>
136
+			<id>xs</id>
137
+			<properties>
138
+				<profiles.active>xs</profiles.active>
139
+			</properties>
140
+		</profile>
135 141
 	</profiles>
136 142
 	<build>
137 143
 		<plugins>

+ 12
- 3
src/main/java/com/huiju/estateagents/controller/MiniAppController.java Целия файл

@@ -67,7 +67,6 @@ public class MiniAppController {
67 67
         if (StringUtils.isBlank(code)) {
68 68
             return ResponseBean.error("参数 code 不能为空", ResponseBean.ERROR_ILLEGAL_PARAMS);
69 69
         }
70
-
71 70
         try {
72 71
             WxMaJscode2SessionResult session = miniAppService.getSessionInfo(code);
73 72
 
@@ -81,8 +80,18 @@ public class MiniAppController {
81 80
             if (null == taPerson) {
82 81
                 return ResponseBean.error("发生未知错误", ResponseBean.ERROR_UNAVAILABLE);
83 82
             }
84
-            taPerson.setFromCode(from);
85
-            taPerson.setRecommendPerson(recommender);
83
+            if(StringUtils.isEmpty(taPerson.getFromCode())){
84
+                taPerson.setFromCode(from);
85
+            }
86
+            if(StringUtils.isEmpty(taPerson.getRecommendPerson())){
87
+                taPerson.setRecommendPerson(recommender);
88
+                TaPerson type = taPersonService.getById(recommender);
89
+                if(null != type){
90
+                    if(!StringUtils.isEmpty(type.getPersonType())){
91
+                        taPerson.setRecommendPersonType(type.getPersonType());
92
+                    }
93
+                }
94
+            }
86 95
             taPersonService.updateById(taPerson);
87 96
 
88 97
             taPerson.setPassword(null);

+ 234
- 231
src/main/java/com/huiju/estateagents/controller/TaPointsExchangeController.java Целия файл

@@ -1,231 +1,234 @@
1
-package com.huiju.estateagents.controller;
2
-
3
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
-import com.baomidou.mybatisplus.core.metadata.IPage;
5
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
-import com.huiju.estateagents.base.BaseController;
7
-import com.huiju.estateagents.base.ResponseBean;
8
-import com.huiju.estateagents.common.CommConstant;
9
-import com.huiju.estateagents.entity.TaPointsExchange;
10
-import com.huiju.estateagents.service.ITaPointsExchangeService;
11
-import org.slf4j.Logger;
12
-import org.slf4j.LoggerFactory;
13
-import org.springframework.beans.factory.annotation.Autowired;
14
-import org.springframework.web.bind.annotation.PathVariable;
15
-import org.springframework.web.bind.annotation.RequestBody;
16
-import org.springframework.web.bind.annotation.RequestMapping;
17
-import org.springframework.web.bind.annotation.RequestMethod;
18
-import org.springframework.web.bind.annotation.RequestParam;
19
-import org.springframework.web.bind.annotation.ResponseBody;
20
-import org.springframework.web.bind.annotation.RestController;
21
-
22
-/**
23
- * <p>
24
-    * 积分兑换记录  前端控制器
25
-    * </p>
26
- *
27
- * @author jobob
28
- * @since 2019-07-25
29
- */
30
-@RestController
31
-@RequestMapping("/api")
32
-public class TaPointsExchangeController extends BaseController {
33
-
34
-    private final Logger logger = LoggerFactory.getLogger(TaPointsExchangeController.class);
35
-
36
-    @Autowired
37
-    public ITaPointsExchangeService iTaPointsExchangeService;
38
-
39
-
40
-    /**
41
-     * 分页查询列表
42
-     * @param pageNum
43
-     * @param pageSize
44
-     * @return
45
-     */
46
-    @RequestMapping(value="/admin/taPointsExchange",method= RequestMethod.GET)
47
-    public ResponseBean taPointsExchangeList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
48
-                                             @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
49
-                                             @RequestParam(value ="personName",required = false) String personName,
50
-                                             @RequestParam(value ="phone",required = false) String phone,
51
-                                             @RequestParam(value ="personType",required = false) String personType,
52
-                                             @RequestParam(value ="targetName",required = false) String targetName,
53
-                                             @RequestParam(value ="startCreateDate",required = false) String startCreateDate,
54
-                                             @RequestParam(value ="endCreateDate",required = false) String endCreateDate,
55
-                                             @RequestParam(value ="startVerifyDate",required = false) String startVerifyDate,
56
-                                             @RequestParam(value ="endVerifyDate",required = false) String endVerifyDate,
57
-                                             @RequestParam(value ="status",required = false) Integer status,
58
-                                             @RequestParam(value ="tel",required = false) String tel){
59
-        ResponseBean responseBean = new ResponseBean();
60
-        try {
61
-            //使用分页插件
62
-            TaPointsExchange taPointsExchange = new TaPointsExchange();
63
-            taPointsExchange.setPersonName(personName);
64
-            taPointsExchange.setPhone(phone);
65
-            taPointsExchange.setPersonType(personType);
66
-            taPointsExchange.setTargetName(targetName);
67
-            taPointsExchange.setStartCreateDate(startCreateDate);
68
-            taPointsExchange.setEndCreateDate(endCreateDate);
69
-            taPointsExchange.setStartVerifyDate(startVerifyDate);
70
-            taPointsExchange.setEndVerifyDate(endVerifyDate);
71
-            taPointsExchange.setStatus(status);
72
-            taPointsExchange.setTel(tel);
73
-            
74
-            responseBean = iTaPointsExchangeService.selectList(pageNum,pageSize,taPointsExchange);
75
-
76
-        }catch (Exception e){
77
-            e.printStackTrace();
78
-            logger.error("taPointsExchangeList -=- {}",e.toString());
79
-            responseBean.addError(e.getMessage());
80
-        }
81
-        return responseBean;
82
-    }
83
-    
84
-    /**
85
-     * 修改对象
86
-     * @param taPointsExchange 实体对象
87
-     * @return
88
-     */
89
-    @RequestMapping(value="/admin/taPointsExchange/change",method= RequestMethod.PUT)
90
-    public ResponseBean taPointsExchangeStatusChange(@RequestBody TaPointsExchange taPointsExchange){
91
-        ResponseBean responseBean = new ResponseBean();
92
-        try {
93
-            if (null != taPointsExchange.getStatus() && !taPointsExchange.getStatus().equals(CommConstant.STATUS_NORMAL)){
94
-                taPointsExchange.setStatus(CommConstant.STATUS_NORMAL);
95
-            }
96
-            if (iTaPointsExchangeService.updateById(taPointsExchange)){
97
-                responseBean.addSuccess(taPointsExchange);
98
-            }else {
99
-                responseBean.addError("fail");
100
-            }
101
-        }catch (Exception e){
102
-            e.printStackTrace();
103
-            logger.error("taPointsExchangeUpdate -=- {}",e.toString());
104
-            responseBean.addError(e.getMessage());
105
-        }
106
-        return responseBean;
107
-    }
108
-
109
-    /**
110
-     * 保存对象
111
-     * @param taPointsExchange 实体对象
112
-     * @return
113
-     */
114
-    @RequestMapping(value="/taPointsExchange",method= RequestMethod.POST)
115
-    public ResponseBean taPointsExchangeAdd(@RequestBody TaPointsExchange taPointsExchange){
116
-        ResponseBean responseBean = new ResponseBean();
117
-        try {
118
-            if (iTaPointsExchangeService.save(taPointsExchange)){
119
-                responseBean.addSuccess(taPointsExchange);
120
-            }else {
121
-                responseBean.addError("fail");
122
-            }
123
-        }catch (Exception e){
124
-            e.printStackTrace();
125
-            logger.error("taPointsExchangeAdd -=- {}",e.toString());
126
-            responseBean.addError(e.getMessage());
127
-        }
128
-        return responseBean;
129
-    }
130
-
131
-    /**
132
-     * 根据id删除对象
133
-     * @param id  实体ID
134
-     */
135
-    @ResponseBody
136
-    @RequestMapping(value="/taPointsExchange/{id}", method= RequestMethod.DELETE)
137
-    public ResponseBean taPointsExchangeDelete(@PathVariable Integer id){
138
-        ResponseBean responseBean = new ResponseBean();
139
-        try {
140
-            if(iTaPointsExchangeService.removeById(id)){
141
-                responseBean.addSuccess("success");
142
-            }else {
143
-                responseBean.addError("fail");
144
-            }
145
-        }catch (Exception e){
146
-            e.printStackTrace();
147
-            logger.error("taPointsExchangeDelete -=- {}",e.toString());
148
-            responseBean.addError(e.getMessage());
149
-        }
150
-        return responseBean;
151
-    }
152
-
153
-    /**
154
-     * 修改对象
155
-     * @param recId  实体ID
156
-     * @return
157
-     */
158
-    @RequestMapping(value="/admin/taPointsExchange/{recId}",method= RequestMethod.PUT)
159
-    public ResponseBean taPointsExchangeUpdate(@PathVariable Integer recId){
160
-        ResponseBean responseBean = new ResponseBean();
161
-        try {
162
-            TaPointsExchange taPointsExchange = iTaPointsExchangeService.getById(recId);
163
-            if (null == taPointsExchange){
164
-                responseBean.addError("找不到需要核销的商品");
165
-                return responseBean;
166
-            }
167
-            if (taPointsExchange.getStatus().equals(CommConstant.STATUS_NORMAL)){
168
-                responseBean.addError("此商品已经被领取");
169
-                return responseBean;
170
-            }
171
-            taPointsExchange.setStatus(CommConstant.STATUS_NORMAL);
172
-            if (iTaPointsExchangeService.updateById(taPointsExchange)){
173
-                responseBean.addSuccess(taPointsExchange);
174
-            }else {
175
-                responseBean.addError("fail");
176
-            }
177
-        }catch (Exception e){
178
-            e.printStackTrace();
179
-            logger.error("taPointsExchangeUpdate -=- {}",e.toString());
180
-            responseBean.addError(e.getMessage());
181
-        }
182
-        return responseBean;
183
-    }
184
-
185
-    /**
186
-     * 根据id查询对象
187
-     * @param id  实体ID
188
-     */
189
-    @RequestMapping(value="/taPointsExchange/{id}",method= RequestMethod.GET)
190
-    public ResponseBean taPointsExchangeGet(@PathVariable Integer id){
191
-        ResponseBean responseBean = new ResponseBean();
192
-        try {
193
-            responseBean.addSuccess(iTaPointsExchangeService.getById(id));
194
-        }catch (Exception e){
195
-            e.printStackTrace();
196
-            logger.error("taPointsExchangeDelete -=- {}",e.toString());
197
-            responseBean.addError(e.getMessage());
198
-        }
199
-        return responseBean;
200
-    }
201
-    
202
-    /**
203
-     * 分页查询列表
204
-     * @param pageNum
205
-     * @param pageSize
206
-     * @return
207
-     */
208
-    @RequestMapping(value="/wx/taPointsExchange",method= RequestMethod.GET)
209
-    public ResponseBean wxPointsExchangeList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
210
-                                             @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
211
-                                             @RequestParam(value = "buildingId", required = false) String buildingId,
212
-                                             @RequestParam(value = "personId", required = false) String personId){
213
-        ResponseBean responseBean = new ResponseBean();
214
-        try {
215
-            //使用分页插件
216
-            IPage<TaPointsExchange> pg = new Page<>(pageNum, pageSize);
217
-            QueryWrapper<TaPointsExchange> queryWrapper = new QueryWrapper<>();
218
-            queryWrapper.eq(null != personId, "person_id", personId);
219
-            queryWrapper.eq(null != buildingId, "building_id",buildingId);
220
-            queryWrapper.orderByDesc("create_date");
221
-            
222
-            IPage<TaPointsExchange> result = iTaPointsExchangeService.page(pg, queryWrapper);
223
-            responseBean.addSuccess(result);
224
-        }catch (Exception e){
225
-            e.printStackTrace();
226
-            logger.error("taPointsExchangeList -=- {}",e.toString());
227
-            responseBean.addError(e.getMessage());
228
-        }
229
-        return responseBean;
230
-    }
231
-}
1
+package com.huiju.estateagents.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.BaseController;
7
+import com.huiju.estateagents.base.ResponseBean;
8
+import com.huiju.estateagents.common.CommConstant;
9
+import com.huiju.estateagents.entity.TaPointsExchange;
10
+import com.huiju.estateagents.service.ITaPointsExchangeService;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PathVariable;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import org.springframework.web.bind.annotation.ResponseBody;
20
+import org.springframework.web.bind.annotation.RestController;
21
+
22
+import java.time.LocalDateTime;
23
+
24
+/**
25
+ * <p>
26
+    * 积分兑换记录  前端控制器
27
+    * </p>
28
+ *
29
+ * @author jobob
30
+ * @since 2019-07-25
31
+ */
32
+@RestController
33
+@RequestMapping("/api")
34
+public class TaPointsExchangeController extends BaseController {
35
+
36
+    private final Logger logger = LoggerFactory.getLogger(TaPointsExchangeController.class);
37
+
38
+    @Autowired
39
+    public ITaPointsExchangeService iTaPointsExchangeService;
40
+
41
+
42
+    /**
43
+     * 分页查询列表
44
+     * @param pageNum
45
+     * @param pageSize
46
+     * @return
47
+     */
48
+    @RequestMapping(value="/admin/taPointsExchange",method= RequestMethod.GET)
49
+    public ResponseBean taPointsExchangeList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
50
+                                             @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
51
+                                             @RequestParam(value ="personName",required = false) String personName,
52
+                                             @RequestParam(value ="phone",required = false) String phone,
53
+                                             @RequestParam(value ="personType",required = false) String personType,
54
+                                             @RequestParam(value ="targetName",required = false) String targetName,
55
+                                             @RequestParam(value ="startCreateDate",required = false) String startCreateDate,
56
+                                             @RequestParam(value ="endCreateDate",required = false) String endCreateDate,
57
+                                             @RequestParam(value ="startVerifyDate",required = false) String startVerifyDate,
58
+                                             @RequestParam(value ="endVerifyDate",required = false) String endVerifyDate,
59
+                                             @RequestParam(value ="status",required = false) Integer status,
60
+                                             @RequestParam(value ="tel",required = false) String tel){
61
+        ResponseBean responseBean = new ResponseBean();
62
+        try {
63
+            //使用分页插件
64
+            TaPointsExchange taPointsExchange = new TaPointsExchange();
65
+            taPointsExchange.setPersonName(personName);
66
+            taPointsExchange.setPhone(phone);
67
+            taPointsExchange.setPersonType(personType);
68
+            taPointsExchange.setTargetName(targetName);
69
+            taPointsExchange.setStartCreateDate(startCreateDate);
70
+            taPointsExchange.setEndCreateDate(endCreateDate);
71
+            taPointsExchange.setStartVerifyDate(startVerifyDate);
72
+            taPointsExchange.setEndVerifyDate(endVerifyDate);
73
+            taPointsExchange.setStatus(status);
74
+            taPointsExchange.setTel(tel);
75
+            
76
+            responseBean = iTaPointsExchangeService.selectList(pageNum,pageSize,taPointsExchange);
77
+
78
+        }catch (Exception e){
79
+            e.printStackTrace();
80
+            logger.error("taPointsExchangeList -=- {}",e.toString());
81
+            responseBean.addError(e.getMessage());
82
+        }
83
+        return responseBean;
84
+    }
85
+    
86
+    /**
87
+     * 修改对象
88
+     * @param taPointsExchange 实体对象
89
+     * @return
90
+     */
91
+    @RequestMapping(value="/admin/taPointsExchange/change",method= RequestMethod.PUT)
92
+    public ResponseBean taPointsExchangeStatusChange(@RequestBody TaPointsExchange taPointsExchange){
93
+        ResponseBean responseBean = new ResponseBean();
94
+        try {
95
+            if (null != taPointsExchange.getStatus() && !taPointsExchange.getStatus().equals(CommConstant.STATUS_NORMAL)){
96
+                taPointsExchange.setStatus(CommConstant.STATUS_NORMAL);
97
+            }
98
+            if (iTaPointsExchangeService.updateById(taPointsExchange)){
99
+                responseBean.addSuccess(taPointsExchange);
100
+            }else {
101
+                responseBean.addError("fail");
102
+            }
103
+        }catch (Exception e){
104
+            e.printStackTrace();
105
+            logger.error("taPointsExchangeUpdate -=- {}",e.toString());
106
+            responseBean.addError(e.getMessage());
107
+        }
108
+        return responseBean;
109
+    }
110
+
111
+    /**
112
+     * 保存对象
113
+     * @param taPointsExchange 实体对象
114
+     * @return
115
+     */
116
+    @RequestMapping(value="/taPointsExchange",method= RequestMethod.POST)
117
+    public ResponseBean taPointsExchangeAdd(@RequestBody TaPointsExchange taPointsExchange){
118
+        ResponseBean responseBean = new ResponseBean();
119
+        try {
120
+            if (iTaPointsExchangeService.save(taPointsExchange)){
121
+                responseBean.addSuccess(taPointsExchange);
122
+            }else {
123
+                responseBean.addError("fail");
124
+            }
125
+        }catch (Exception e){
126
+            e.printStackTrace();
127
+            logger.error("taPointsExchangeAdd -=- {}",e.toString());
128
+            responseBean.addError(e.getMessage());
129
+        }
130
+        return responseBean;
131
+    }
132
+
133
+    /**
134
+     * 根据id删除对象
135
+     * @param id  实体ID
136
+     */
137
+    @ResponseBody
138
+    @RequestMapping(value="/taPointsExchange/{id}", method= RequestMethod.DELETE)
139
+    public ResponseBean taPointsExchangeDelete(@PathVariable Integer id){
140
+        ResponseBean responseBean = new ResponseBean();
141
+        try {
142
+            if(iTaPointsExchangeService.removeById(id)){
143
+                responseBean.addSuccess("success");
144
+            }else {
145
+                responseBean.addError("fail");
146
+            }
147
+        }catch (Exception e){
148
+            e.printStackTrace();
149
+            logger.error("taPointsExchangeDelete -=- {}",e.toString());
150
+            responseBean.addError(e.getMessage());
151
+        }
152
+        return responseBean;
153
+    }
154
+
155
+    /**
156
+     * 修改对象
157
+     * @param recId  实体ID
158
+     * @return
159
+     */
160
+    @RequestMapping(value="/admin/taPointsExchange/{recId}",method= RequestMethod.PUT)
161
+    public ResponseBean taPointsExchangeUpdate(@PathVariable Integer recId){
162
+        ResponseBean responseBean = new ResponseBean();
163
+        try {
164
+            TaPointsExchange taPointsExchange = iTaPointsExchangeService.getById(recId);
165
+            if (null == taPointsExchange){
166
+                responseBean.addError("找不到需要核销的商品");
167
+                return responseBean;
168
+            }
169
+            if (taPointsExchange.getStatus().equals(CommConstant.STATUS_NORMAL)){
170
+                responseBean.addError("此商品已经被领取");
171
+                return responseBean;
172
+            }
173
+            taPointsExchange.setStatus(CommConstant.STATUS_NORMAL);
174
+            taPointsExchange.setVerifyDate(LocalDateTime.now());
175
+            if (iTaPointsExchangeService.updateById(taPointsExchange)){
176
+                responseBean.addSuccess(taPointsExchange);
177
+            }else {
178
+                responseBean.addError("fail");
179
+            }
180
+        }catch (Exception e){
181
+            e.printStackTrace();
182
+            logger.error("taPointsExchangeUpdate -=- {}",e.toString());
183
+            responseBean.addError(e.getMessage());
184
+        }
185
+        return responseBean;
186
+    }
187
+
188
+    /**
189
+     * 根据id查询对象
190
+     * @param id  实体ID
191
+     */
192
+    @RequestMapping(value="/taPointsExchange/{id}",method= RequestMethod.GET)
193
+    public ResponseBean taPointsExchangeGet(@PathVariable Integer id){
194
+        ResponseBean responseBean = new ResponseBean();
195
+        try {
196
+            responseBean.addSuccess(iTaPointsExchangeService.getById(id));
197
+        }catch (Exception e){
198
+            e.printStackTrace();
199
+            logger.error("taPointsExchangeDelete -=- {}",e.toString());
200
+            responseBean.addError(e.getMessage());
201
+        }
202
+        return responseBean;
203
+    }
204
+    
205
+    /**
206
+     * 分页查询列表
207
+     * @param pageNum
208
+     * @param pageSize
209
+     * @return
210
+     */
211
+    @RequestMapping(value="/wx/taPointsExchange",method= RequestMethod.GET)
212
+    public ResponseBean wxPointsExchangeList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
213
+                                             @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
214
+                                             @RequestParam(value = "buildingId", required = false) String buildingId,
215
+                                             @RequestParam(value = "personId", required = false) String personId){
216
+        ResponseBean responseBean = new ResponseBean();
217
+        try {
218
+            //使用分页插件
219
+            IPage<TaPointsExchange> pg = new Page<>(pageNum, pageSize);
220
+            QueryWrapper<TaPointsExchange> queryWrapper = new QueryWrapper<>();
221
+            queryWrapper.eq(null != personId, "person_id", personId);
222
+            queryWrapper.eq(null != buildingId, "building_id",buildingId);
223
+            queryWrapper.orderByDesc("create_date");
224
+            
225
+            IPage<TaPointsExchange> result = iTaPointsExchangeService.page(pg, queryWrapper);
226
+            responseBean.addSuccess(result);
227
+        }catch (Exception e){
228
+            e.printStackTrace();
229
+            logger.error("taPointsExchangeList -=- {}",e.toString());
230
+            responseBean.addError(e.getMessage());
231
+        }
232
+        return responseBean;
233
+    }
234
+}

+ 2
- 1
src/main/java/com/huiju/estateagents/interceptor/AccessInterceptor.java Целия файл

@@ -17,7 +17,8 @@ public class AccessInterceptor implements HandlerInterceptor {
17 17
             "/wx/chat", // 聊天暂时不鉴权
18 18
             "/api/wx/login",
19 19
             "/api/admin/signin",
20
-            "/api/taCheckin/activity"
20
+            "/api/taCheckin/activity",
21
+            "/api/wx/qrcode/scene"
21 22
     };
22 23
 
23 24
     /*

+ 1
- 1
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java Целия файл

@@ -277,7 +277,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
277 277
 
278 278
     @Override
279 279
     public IPage<TaRecommendCustomer>getCustomersIRecommended(int pageNumber, int pageSize,String customerId,String building){
280
-        String personId = taRecommendCustomerMapper.getCustomerById(customerId).getRecommendPerson();
280
+        String personId = taRecommendCustomerMapper.getCustomerById(customerId).getPersonId();
281 281
         QueryWrapper<TaRecommendCustomer>queryWrapper = new QueryWrapper<>();
282 282
         // todo
283 283
         // 此处可能不是 person_id 而是 recommend_person

+ 1
- 1
src/main/java/com/huiju/estateagents/service/impl/TaShareServiceImpl.java Целия файл

@@ -61,7 +61,7 @@ public class TaShareServiceImpl extends ServiceImpl<TaShareMapper, TaShare> impl
61 61
             QueryWrapper<TaBuildingDynamic> taBuildingDynamicQuery= new QueryWrapper<>();
62 62
             taBuildingDynamicQuery.eq("dynamic_id",id);
63 63
             TaBuildingDynamic taBuildingDynamic = taBuildingDynamicMapper.selectOne(taBuildingDynamicQuery);
64
-            taBuildingDynamicMapper.updateById( taBuildingDynamic.setShareNum(taBuildingDynamic.getShareNum()+1));
64
+            taBuildingDynamicMapper.updateById( taBuildingDynamic.setShareNum(taBuildingDynamic.getShareNum() == null ? 1:taBuildingDynamic.getShareNum()+1));
65 65
             return ResponseBean.success("成功");
66 66
         }
67 67
 

+ 8
- 1
src/main/java/com/huiju/estateagents/service/impl/TaUvServiceImpl.java Целия файл

@@ -7,6 +7,7 @@ import com.huiju.estateagents.base.ResponseBean;
7 7
 import com.huiju.estateagents.common.CommConstant;
8 8
 import com.huiju.estateagents.entity.TaPerson;
9 9
 import com.huiju.estateagents.entity.TaUv;
10
+import com.huiju.estateagents.mapper.TaBuildingMapper;
10 11
 import com.huiju.estateagents.mapper.TaPersonMapper;
11 12
 import com.huiju.estateagents.mapper.TaUvMapper;
12 13
 import com.huiju.estateagents.service.ITaUvService;
@@ -33,6 +34,9 @@ public class TaUvServiceImpl extends ServiceImpl<TaUvMapper, TaUv> implements IT
33 34
     @Autowired
34 35
     TaUvMapper taUvMapper;
35 36
 
37
+    @Autowired
38
+    TaBuildingMapper buildingMapper;
39
+
36 40
     @Override
37 41
     public ResponseBean saveData(String openid, String typeOf, String id) {
38 42
         List<TaPerson> persons = getPersonsByOpenId(openid);
@@ -73,9 +77,12 @@ public class TaUvServiceImpl extends ServiceImpl<TaUvMapper, TaUv> implements IT
73 77
         }
74 78
 
75 79
         // 如果是点赞置业, 则人员点赞 + 1
76
-        if (typeOf == CommConstant.FAVOR_CONSULTANT) {
80
+        if (typeOf.equals(CommConstant.FAVOR_CONSULTANT)) {
77 81
             taPersonMapper.setFieldIncrement(id,"hot_num", 1);
78 82
         }
83
+        if (typeOf.equals(CommConstant.FAVOR_PROJECT)) {
84
+            buildingMapper.setFieldNum(id,"pv_num",1);
85
+        }
79 86
 
80 87
         return ResponseBean.success("");
81 88
     }

+ 51
- 0
src/main/resources/application-xs.yml Целия файл

@@ -0,0 +1,51 @@
1
+server:
2
+  port: 8003
3
+spring:
4
+  application:
5
+    name: estateagents
6
+  datasource:
7
+    username: estateagents
8
+    password: DQ@0lW##kBb2+-jPZ
9
+    url: jdbc:mysql://rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com:3306/estateagents2?useUnicode=true&serverTimezone=CTT&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
10
+    driver-class-name: com.mysql.cj.jdbc.Driver
11
+    initial-size: 10 # 初始化连接数
12
+    max-active: 20 # 最大连接数
13
+    min-idle: 8 # 最小空闲数
14
+    max-idle: 8 # 最大空闲数
15
+  servlet:
16
+    multipart:
17
+      max-file-size: 10MB
18
+      max-request-size: 50MB
19
+
20
+##mybatis-plus
21
+mybatis-plus:
22
+  configuration:
23
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24
+    call-setters-on-nulls: true
25
+  mapper-locations: classpath:mapper/*.xml
26
+wx:
27
+  miniapp:
28
+    appid: wx09cd665abf378db7
29
+    secret: a6cbd778272c87426952b5a1f8449698
30
+    token:
31
+    aesKey:
32
+    msgDataFormat: JSON
33
+  tpls:
34
+    - name: notice
35
+      id: thSzcSAhIHiZZuCdydBsoB-dSa_g72vHgqo9e_CltNM
36
+      keywords: 4
37
+    - name: newCustomer
38
+      id: WiBYjqkE9KvwDv1WSq5vnuv5A6FSaOB8ETFcrVmtCEI
39
+      keywords: 4
40
+    - name: mainbiz
41
+      id: iJLceA_zp1fq9xnL4yV8IOwWGeFHebCO-HxNtcPYLoA
42
+      keywords: 6
43
+ali:
44
+  accessKeyId: LTAIkc75dpkJw8Lb
45
+  accessKeySecret: v4bvXCaix6vSDTCFfwSAdqV53iFEQw
46
+  oss:
47
+    endpoint: oss-cn-shanghai.aliyuncs.com
48
+    bucketName: estateagents
49
+    bucketURL: https://estateagents.oss-cn-shanghai.aliyuncs.com
50
+
51
+