dingxin 6 yıl önce
ebeveyn
işleme
b02f0663b1

+ 4
- 8
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java Dosyayı Görüntüle

@@ -64,9 +64,7 @@ public class SocialController extends BaseController {
64 64
                                      @RequestParam(value = "remark", required = false) String remark,
65 65
                                      @RequestParam("activityId") Integer activityId,
66 66
                                      HttpSession session) {
67
-        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
68
-        Integer userId = userElement.getId();
69
-
67
+        UserElement userElement = getUserElement(session);
70 68
         ResponseBean responseBean = new ResponseBean();
71 69
 
72 70
         if (!check(communityId)) {
@@ -74,7 +72,7 @@ public class SocialController extends BaseController {
74 72
             return responseBean;
75 73
         }
76 74
 
77
-        responseBean = socialServiceI.findTaUserInfo(userElement, activityId, communityId, userId,remark);
75
+        responseBean = socialServiceI.findTaUserInfo(userElement, activityId, communityId ,remark);
78 76
         return responseBean;
79 77
     }
80 78
     
@@ -332,8 +330,7 @@ public class SocialController extends BaseController {
332 330
 
333 331
         ResponseBean responseBean = new ResponseBean();
334 332
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
335
-        Integer userId = userElement.getId();
336
-        ResponseBean response = socialServiceI.addAllTransaction(userId, paramets,userElement.getUserVerifyId());
333
+        ResponseBean response = socialServiceI.addAllTransaction(userElement, paramets);
337 334
         return response;
338 335
     }
339 336
     
@@ -368,8 +365,7 @@ public class SocialController extends BaseController {
368 365
                                              @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
369 366
         ResponseBean responseBean = new ResponseBean();
370 367
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
371
-        Integer userId = userElement.getId();
372
-        ResponseBean response = socialServiceI.selectAllTransaction(userId, pageNum, pageSize,type,userElement.getCommunityId());
368
+        ResponseBean response = socialServiceI.selectAllTransaction(userElement, pageNum, pageSize,type);
373 369
         return response;
374 370
     }
375 371
 

+ 1
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java Dosyayı Görüntüle

@@ -161,8 +161,7 @@ public class TicketController extends BaseController {
161 161
     public ResponseBean addTransaction(@RequestBody String paramets, HttpSession session) throws IOException {
162 162
         ResponseBean responseBean = new ResponseBean();
163 163
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
164
-        Integer userId = userElement.getId();
165
-        ResponseBean response = iTicketService.addAiTicketService(userId, paramets);
164
+        ResponseBean response = iTicketService.addAiTicketService(userElement, paramets);
166 165
         return response;
167 166
     }
168 167
 

+ 13
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransaction.java Dosyayı Görüntüle

@@ -63,6 +63,11 @@ public class TpTransaction {
63 63
      */
64 64
     private String releaseIdentity;
65 65
 
66
+    /**
67
+     * 权重
68
+     */
69
+    private String sort;
70
+
66 71
     public void setReleaseIdentity(String releaseIdentity) {
67 72
         this.releaseIdentity = releaseIdentity;
68 73
     }
@@ -248,4 +253,12 @@ public class TpTransaction {
248 253
     public void setBel(String bel) {
249 254
         this.bel = bel;
250 255
     }
256
+
257
+    public String getSort() {
258
+        return sort;
259
+    }
260
+
261
+    public void setSort(String sort) {
262
+        this.sort = sort;
263
+    }
251 264
 }

+ 3
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java Dosyayı Görüntüle

@@ -1,6 +1,7 @@
1 1
 package com.community.huiju.service;
2 2
 
3 3
 import com.community.commom.mode.ResponseBean;
4
+import com.community.commom.session.UserElement;
4 5
 import com.community.huiju.model.TpTicket;
5 6
 import com.community.huiju.model.TpTicketRecordComment;
6 7
 import com.community.huiju.vo.TpTicketVO;
@@ -43,11 +44,11 @@ public interface ITicketService {
43 44
 
44 45
 	/**
45 46
 	 * 添加 维修/投诉/联系单
46
-	 * @param userId
47
+	 * @param userElement
47 48
 	 * @param parameter
48 49
 	 * @return
49 50
 	 */
50
-    ResponseBean addAiTicketService(Integer userId,String parameter) throws IOException;
51
+    ResponseBean addAiTicketService(UserElement userElement, String parameter) throws IOException;
51 52
 	
52 53
 	/**
53 54
 	 * 回复工单

+ 7
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java Dosyayı Görüntüle

@@ -64,11 +64,10 @@ public interface SocialServiceI {
64 64
 	 * 活动报名
65 65
 	 * @param activityId
66 66
 	 * @param communityId
67
-	 * @param userId
68 67
 	 * @param remark
69 68
 	 * @return
70 69
 	 */
71
-	ResponseBean findTaUserInfo(UserElement userElement, Integer activityId, Integer communityId, Integer userId, String remark);
70
+	ResponseBean findTaUserInfo(UserElement userElement, Integer activityId, Integer communityId, String remark);
72 71
 
73 72
 	/**
74 73
 	 * 修改活动报名
@@ -108,15 +107,18 @@ public interface SocialServiceI {
108 107
 	/**
109 108
 	 * 添加二手租赁帖子
110 109
 	 */
111
-    ResponseBean addAllTransaction(Integer userId, String paramets, Integer userVerifyId)throws IOException;
110
+    ResponseBean addAllTransaction(UserElement userElement, String paramets);
112 111
 
113 112
 
114 113
 	/**
115 114
 	 * 获取当前用户发布所有的帖子
116
-	 * @param userId
115
+	 * @param userElement
116
+	 * @param pageNum
117
+	 * @param pageSize
118
+	 * @param type
117 119
 	 * @return
118 120
 	 */
119
-	ResponseBean selectAllTransaction(Integer userId,Integer pageNum,Integer pageSize,Integer type,Integer communityId);
121
+	ResponseBean selectAllTransaction(UserElement userElement,Integer pageNum,Integer pageSize,Integer type);
120 122
 
121 123
 	/**
122 124
 	 * 修改当前帖子

+ 206
- 260
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Dosyayı Görüntüle

@@ -7,6 +7,7 @@ import com.community.commom.mode.ResponseBean;
7 7
 import com.community.commom.session.UserElement;
8 8
 import com.community.huiju.dao.*;
9 9
 import com.community.huiju.model.*;
10
+import com.community.huiju.service.ITaUserService;
10 11
 import com.community.huiju.service.ImageServiceI;
11 12
 import com.community.huiju.service.SocialServiceI;
12 13
 import com.github.pagehelper.Page;
@@ -60,7 +61,7 @@ public class SocialServiceImpl implements SocialServiceI {
60 61
     private TaUserMapper taUserMapper;
61 62
 
62 63
     @Autowired
63
-    private  TaSysUserRoleMapper taSysUserRoleMapper;
64
+    private TaSysUserRoleMapper taSysUserRoleMapper;
64 65
 
65 66
     @Autowired
66 67
     private TpTicketRecordMapper tpTicketRecordMapper;
@@ -84,13 +85,13 @@ public class SocialServiceImpl implements SocialServiceI {
84 85
     private TpTransactionReportMapper tpTransactionReportMapper;
85 86
 
86 87
     @Autowired
87
-    private ToCommunitiesMapper  toCommunitiesMapper;
88
+    private ToCommunitiesMapper toCommunitiesMapper;
88 89
 
89 90
     @Autowired
90 91
     private TpTransactionReplyMapper tpTransactionReplyMapper;
91 92
 
92 93
     @Autowired
93
-    private  TpTransactionLikeMapper tpTransactionLikeMapper;
94
+    private TpTransactionLikeMapper tpTransactionLikeMapper;
94 95
 
95 96
     @Autowired
96 97
     private TaUserVerifyMapper taUserVerifyMapper;
@@ -99,31 +100,35 @@ public class SocialServiceImpl implements SocialServiceI {
99 100
     private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
100 101
 
101 102
     @Autowired
102
-    private  TpActivitySignInMapper tpActivitySignInMapper;
103
+    private TpActivitySignInMapper tpActivitySignInMapper;
104
+
105
+    @Autowired
106
+    private ITaUserService iTaUserService;
103 107
 
104 108
     @Override
105 109
     @Transactional
106 110
     public TpAnnouncement findAnnouncementDetail(Integer id, Integer communityId, Integer userId) {
107 111
         //更新此用户的查看次数操作
108
-        Integer allViewNum = updateSocialView(userId,Constant.ANNOUNCEMENT,communityId,id);
109
-        if (null != allViewNum){
112
+        Integer allViewNum = updateSocialView(userId, Constant.ANNOUNCEMENT, communityId, id);
113
+        if (null != allViewNum) {
110 114
             tpAnnouncementMapper.updateByPrimaryKeySelective(id, allViewNum);
111 115
         }
112 116
         TpAnnouncement tpAnnouncement = tpAnnouncementMapper.selectByPrimaryKey(id, communityId);
113 117
         tpAnnouncement.setUserName(tpUserMapper.selectByPrimaryKey(tpAnnouncement.getCreateUser()).getUserName());
114 118
 
115
-        Map<String,Object> map = Maps.newHashMap();
116
-        map.put("uuid",tpAnnouncement.getId());
117
-        map.put("type",Constant.ANNOUNCEMENT);
119
+        Map<String, Object> map = Maps.newHashMap();
120
+        map.put("uuid", tpAnnouncement.getId());
121
+        map.put("type", Constant.ANNOUNCEMENT);
118 122
         // 查询图片
119 123
         List<TdImages> tdImagesList = tdImagesMapper.getByUUIDAndByType(map);
120
-        List<String> imgList = tdImagesList.stream().map(e->new String(e.getImageUrl())).collect(Collectors.toList());
124
+        List<String> imgList = tdImagesList.stream().map(e -> new String(e.getImageUrl())).collect(Collectors.toList());
121 125
         tpAnnouncement.setImgList(imgList);
122 126
         return tpAnnouncement;
123 127
     }
124 128
 
125 129
     /**
126 130
      * 分页获取公告列表
131
+     *
127 132
      * @param communityId
128 133
      * @param title
129 134
      * @param pageNum
@@ -132,35 +137,38 @@ public class SocialServiceImpl implements SocialServiceI {
132 137
      */
133 138
     @Override
134 139
     public ResponseBean getAnnouncements(Integer communityId, String title, Integer pageNum, Integer pageSize) {
135
-        ResponseBean responseBean=new ResponseBean();
140
+        ResponseBean responseBean = new ResponseBean();
136 141
         Map<String, Object> parameter = Maps.newHashMap();
137 142
         //使用分页插件
138
-        Page<TpAnnouncement> pageannouncementList=PageHelper.startPage(pageNum, pageSize);
143
+        Page<TpAnnouncement> pageannouncementList = PageHelper.startPage(pageNum, pageSize);
139 144
         // 获取数据
140
-        List<TpAnnouncement> announcementList = tpAnnouncementMapper.getAnnouncements(communityId,title);
141
-        parameter.put("total",pageannouncementList.getTotal());
142
-        parameter.put("list",announcementList);
145
+        List<TpAnnouncement> announcementList = tpAnnouncementMapper.getAnnouncements(communityId, title);
146
+        parameter.put("total", pageannouncementList.getTotal());
147
+        parameter.put("list", announcementList);
143 148
         responseBean.addSuccess(parameter);
144 149
         return responseBean;
145 150
     }
151
+
146 152
     /**
147 153
      * 根据当前小区ID查出轮播图
154
+     *
148 155
      * @param communityId 当前小区ID
149 156
      * @return
150 157
      */
151 158
     @Override
152 159
     public List<TpAnnouncement> getAnnouncement(Integer communityId) {
153
-        Integer num=tpCarouselSettingMapper.getcarouselNum(Constant.ANNOUNCEMENT, communityId);
160
+        Integer num = tpCarouselSettingMapper.getcarouselNum(Constant.ANNOUNCEMENT, communityId);
154 161
         if (null == num) {
155 162
             num = 0;
156 163
         }
157
-        List<TpAnnouncement> listAnnouncement=tpAnnouncementMapper.getAnnouncement(communityId,num);
164
+        List<TpAnnouncement> listAnnouncement = tpAnnouncementMapper.getAnnouncement(communityId, num);
158 165
         return listAnnouncement;
159 166
     }
160 167
 
161
-    
168
+
162 169
     /**
163 170
      * 分页获取活动列表
171
+     *
164 172
      * @param communityId
165 173
      * @param title
166 174
      * @param pageNum
@@ -169,20 +177,21 @@ public class SocialServiceImpl implements SocialServiceI {
169 177
      */
170 178
     @Override
171 179
     public ResponseBean getActivitys(Integer communityId, String title, Integer pageNum, Integer pageSize) {
172
-        ResponseBean responseBean= new ResponseBean();
180
+        ResponseBean responseBean = new ResponseBean();
173 181
         Map<String, Object> result = Maps.newHashMap();
174 182
         //使用分页插件
175
-        Page<TpActivity> pageactivityList=PageHelper.startPage(pageNum, pageSize);
183
+        Page<TpActivity> pageactivityList = PageHelper.startPage(pageNum, pageSize);
176 184
         // 获取数据
177
-        List<TpActivity> activityList = tpActivityMapper.getActivitys(communityId,title);
178
-        result.put("list",activityList);
179
-        result.put("total",pageactivityList.getTotal());
185
+        List<TpActivity> activityList = tpActivityMapper.getActivitys(communityId, title);
186
+        result.put("list", activityList);
187
+        result.put("total", pageactivityList.getTotal());
180 188
         responseBean.addSuccess(result);
181 189
         return responseBean;
182 190
     }
183
-    
191
+
184 192
     /**
185 193
      * 获取活动帖子详情
194
+     *
186 195
      * @param activityId
187 196
      * @param communityId
188 197
      * @return
@@ -190,48 +199,49 @@ public class SocialServiceImpl implements SocialServiceI {
190 199
     @Override
191 200
     public TpActivity findActivityDetail(Integer activityId, Integer communityId, Integer userId) {
192 201
         //更新查看次数
193
-        Integer allViewNum = updateSocialView(userId,Constant.ACTIVITY,communityId,activityId);
194
-        if (null != allViewNum){
202
+        Integer allViewNum = updateSocialView(userId, Constant.ACTIVITY, communityId, activityId);
203
+        if (null != allViewNum) {
195 204
             TpActivity activity = new TpActivity();
196 205
             activity.setId(activityId);
197 206
             activity.setViewCount(allViewNum);
198 207
             tpActivityMapper.updateByPrimaryKeySelective(activity);
199 208
         }
200 209
 
201
-        TpActivity tpActivity = tpActivityMapper.selectByPrimaryKey(activityId,communityId);
210
+        TpActivity tpActivity = tpActivityMapper.selectByPrimaryKey(activityId, communityId);
202 211
         TpUser tpUser = tpUserMapper.selectByPrimaryKey(tpActivity.getCreateUser());
203 212
         if (null != tpUser) {
204 213
             tpActivity.setUserName(tpUser.getUserName());
205 214
         }
206 215
         //查看当前人是否签到
207
-        TpActivitySignIn tpActivitySignIn= tpActivitySignInMapper.selectSing(activityId,userId);
208
-        Integer signType=tpActivitySignIn==null?0:1;
216
+        TpActivitySignIn tpActivitySignIn = tpActivitySignInMapper.selectSing(activityId, userId);
217
+        Integer signType = tpActivitySignIn == null ? 0 : 1;
209 218
         tpActivity.setSignType(signType);
210 219
 
211 220
         //返回报名状态
212 221
         Integer signNum = tpActivitySignupMapper.findTpActivetitySignByUserId(tpActivity.getId(), communityId, userId);
213 222
         String signStatus = signNum != 0 ? Constant.STATUS_SIGNED : Constant.STATUS_UNSIGN;
214 223
         tpActivity.setSignStatus(signStatus);
215
-        
216
-        Map<String,Object> map = Maps.newHashMap();
217
-        map.put("uuid",tpActivity.getId());
218
-        map.put("type",Constant.ACTIVITY);
224
+
225
+        Map<String, Object> map = Maps.newHashMap();
226
+        map.put("uuid", tpActivity.getId());
227
+        map.put("type", Constant.ACTIVITY);
219 228
         // 查询图片
220 229
         List<TdImages> tdImagesList = tdImagesMapper.getByUUIDAndByType(map);
221
-        List<String> imgList = tdImagesList.stream().map(e->new String(e.getImageUrl())).collect(Collectors.toList());
230
+        List<String> imgList = tdImagesList.stream().map(e -> new String(e.getImageUrl())).collect(Collectors.toList());
222 231
         tpActivity.setImgList(imgList);
223 232
 
224 233
         return tpActivity;
225 234
     }
226
-    
235
+
227 236
     /**
228 237
      * 更新此用户的查看次数操作
238
+     *
229 239
      * @param userId
230 240
      * @param socialType
231 241
      * @param communityId
232 242
      * @param uuid
233 243
      */
234
-    private Integer updateSocialView(Integer userId,String socialType,Integer communityId,Integer uuid) {
244
+    private Integer updateSocialView(Integer userId, String socialType, Integer communityId, Integer uuid) {
235 245
         //检查是否查看过这个帖子
236 246
         TpSocialView tpSocialView = new TpSocialView();
237 247
         tpSocialView.setTaUserId(userId);
@@ -239,9 +249,9 @@ public class SocialServiceImpl implements SocialServiceI {
239 249
         tpSocialView.setCommunityId(communityId);
240 250
         tpSocialView.setUuid(uuid);
241 251
         Integer viewNum = tpSocialViewMapper.selectViewNum(tpSocialView);
242
-    
252
+
243 253
         //查看过的话查看次数加一
244
-        if (viewNum == 0){
254
+        if (viewNum == 0) {
245 255
             tpSocialView.setCreateDate(new Date());
246 256
             tpSocialViewMapper.insertSelective(tpSocialView);
247 257
             tpSocialView.setTaUserId(null);
@@ -252,72 +262,46 @@ public class SocialServiceImpl implements SocialServiceI {
252 262
     }
253 263
 
254 264
     @Override
255
-    public ResponseBean findTaUserInfo(UserElement userElement, Integer activityId, Integer communityId, Integer userId,String remark) {
265
+    public ResponseBean findTaUserInfo(UserElement userElement, Integer activityId, Integer communityId, String remark) {
256 266
         ResponseBean responseBean = new ResponseBean();
257 267
         TpActivity tpActivity = tpActivityMapper.selectByPrimaryKey(activityId, communityId);
258 268
         //判断是否已经过了报名截至时间
259 269
         Date registrEndTime = tpActivity.getRegistrationEndTime();
260
-        if (registrEndTime.compareTo(new Date()) < 0){
261
-             responseBean.addError("9997", "已过报名截止时间");
262
-             return responseBean;
270
+        if (registrEndTime.compareTo(new Date()) < 0) {
271
+            responseBean.addError("9997", "已过报名截止时间");
272
+            return responseBean;
263 273
         }
264 274
 
265 275
         //报名是否超过人数上限
266 276
         Integer signUpNum = tpActivitySignupMapper.sumActivitySignUpNum(activityId, communityId);
267
-        if (signUpNum >= tpActivity.getSignUpMax() && tpActivity.getSignUpMax().intValue() != 0 ){
277
+        if (signUpNum >= tpActivity.getSignUpMax() && tpActivity.getSignUpMax().intValue() != 0) {
268 278
             responseBean.addError("9998", "报名人数已满");
269 279
             return responseBean;
270 280
         }
271 281
 
272
-        //已登陆,身份未知,状态未知
273
-
274
-
275
-
276 282
         //判断身份是否为业主且状态为已停用
277
-        TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
283
+        TaUser taUser = taUserMapper.selectByPrimaryKey(userElement.getId());
278 284
         if (taUser.getId().intValue() == -1) {
279 285
             responseBean.addError("9996", "游客不能报名");
280 286
             return responseBean;
281 287
         }
282
-        TaSysRole sysRole = taSysRoleMapper.findRoleByUserId(userId);
283
-        if (Constant.INVALID.equals(taUser.getStatus())
284
-            && Constant.OWNER.equals(sysRole.getRoleName())){
285 288
 
286
-            responseBean.addError("9996", "您的身份已停用,请联系物业");
287
-            return responseBean;
288
-        }
289
+        // 校验用户
290
+        iTaUserService.checkBlacklistStatusUser(taUser);
289 291
 
290
-        //身份为家属租客,状态为已停用
291
-        if (Constant.INVALID.equals(taUser.getStatus())
292
-            && (Constant.RELATION.equals(sysRole.getRoleName()) || Constant.TENANT.equals(sysRole.getRoleName()))){
293
-
294
-            responseBean.addError("9996", "您的身份已停用,请联系物业");
295
-            return responseBean;
296
-        }
297
-
298
-        if (Constant.EFFECTIVE.equals(taUser.getVerifyStatus())
299
-                && Constant.EFFECTIVE.equals(taUser.getStatus())
300
-                && (Constant.RELATION.equals(sysRole.getRoleName())
301
-                || Constant.TENANT.equals(sysRole.getRoleName())
302
-                || Constant.OWNER.equals(sysRole.getRoleName()))){
303
-
304
-
305
-            return insertActivitySignUp(userElement, tpActivity, communityId, userId, remark);
306
-        }
307
-        responseBean.addError("9995", "无法确认您的身份,请联系物业");
308
-        return responseBean;
292
+        return insertActivitySignUp(userElement, tpActivity, communityId, remark);
309 293
     }
310 294
 
311 295
     @Override
312
-    public ResponseBean findAllTransaction(Integer communityId,String transactionTitle, String type, Integer pageNum, Integer paeSize) {
296
+    public ResponseBean findAllTransaction(Integer communityId, String transactionTitle, String type, Integer pageNum, Integer paeSize) {
313 297
         Map<String, Object> parameter = Maps.newHashMap();
314
-       ResponseBean  responseBean= new ResponseBean();
315
-        Page<TpTransaction> pageList=PageHelper.startPage(pageNum, paeSize);
316
-        List<TpTransaction> tpTransactions= tpTransactionMapper.findAllTransaction(communityId, transactionTitle,type);
298
+        ResponseBean responseBean = new ResponseBean();
299
+        Page<TpTransaction> pageList = PageHelper.startPage(pageNum, paeSize);
300
+        List<TpTransaction> tpTransactions = tpTransactionMapper.findAllTransaction(communityId, transactionTitle, type);
317 301
 
318
-        tpTransactions.stream().forEach(e->{
302
+        tpTransactions.stream().forEach(e -> {
319 303
 
320
-            if (null != e.getTaUserVerifyId()){
304
+            if (null != e.getTaUserVerifyId()) {
321 305
                 TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(e.getTaUserVerifyId());
322 306
                 e.setRoleId(taSysRole.getId());
323 307
                 e.setRoleName(taSysRole.getRoleName());
@@ -326,82 +310,68 @@ public class SocialServiceImpl implements SocialServiceI {
326 310
             e.setCreateUserName(taUser.getUserName());
327 311
         });
328 312
 
329
-        parameter.put("list",tpTransactions);
330
-        parameter.put("total",pageList.getTotal());
313
+        parameter.put("list", tpTransactions);
314
+        parameter.put("total", pageList.getTotal());
331 315
         responseBean.addSuccess(parameter);
332 316
         return responseBean;
333 317
 
334 318
     }
335 319
 
336 320
 
337
-    @Transactional
321
+    @Transactional(rollbackFor = Exception.class)
338 322
     @Override
339
-    public ResponseBean addAllTransaction(Integer userId, String paramets,Integer userVerifyId) throws IOException {
323
+    public ResponseBean addAllTransaction(UserElement userElement, String paramets) {
340 324
         ResponseBean response = new ResponseBean();
341 325
         JSONObject jsonObject = JSONObject.parseObject(paramets);
342
-        String transactionTitle = (String) jsonObject.get("title");
343
-        String transactionContent = (String) jsonObject.get("content");
344
-        String  type= (String) jsonObject.get("type");
345
-        String imageUrl = (String) jsonObject.get("imageUrl");
326
+        String transactionTitle = jsonObject.getString("title");
327
+        String transactionContent = jsonObject.getString("content");
328
+        String type = jsonObject.getString("type");
329
+        String imageUrl = jsonObject.getString("imageUrl");
346 330
 
347
-        TaUser user=taUserMapper.selectByPrimaryKey(userId);
331
+        TaUser user = taUserMapper.selectByPrimaryKey(userElement.getId());
348 332
         TpTransaction tpTransaction = new TpTransaction();
349 333
         tpTransaction.setTransactionTitle(transactionTitle);
350 334
         tpTransaction.setTransactionContent(transactionContent);
351 335
         tpTransaction.setType(type);
352
-        tpTransaction.setCommunityId(user.getCommunityId());
353
-        tpTransaction.setTaUserId(userId);
354
-        tpTransaction.setCreateUser(userId);
336
+        tpTransaction.setCommunityId(userElement.getCommunityId());
337
+        tpTransaction.setTaUserId(userElement.getId());
338
+        tpTransaction.setCreateUser(userElement.getId());
355 339
         tpTransaction.setStatus("1");
356 340
         tpTransaction.setCreateDate(new Date());
357
-        tpTransaction.setUpdateUser(userId);
341
+        tpTransaction.setUpdateUser(userElement.getId());
358 342
         tpTransaction.setUpdateDate(new Date());
359
-        tpTransaction.setTaUserVerifyId(userVerifyId);
343
+        tpTransaction.setTaUserVerifyId(userElement.getUserVerifyId());
360 344
         tpTransaction.setIsReported("0");
345
+        // 发布者身份  0 APP  1 物业
346
+        tpTransaction.setReleaseIdentity("0");
347
+        tpTransaction.setViewCount(0);
348
+        tpTransaction.setSort("1");
361 349
 
362
-        //判断身份是否为业主且状态为已停用
363
-        TaSysRole sysRole = taSysRoleMapper.findRoleByUserId(userId);
364
-        TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
365
-        if (Constant.INVALID.equals(taUser.getStatus())
366
-                && Constant.OWNER.equals(sysRole.getRoleName())){
367
-
368
-            response.addError("9996", "您的身份已停用,请联系物业");
369
-            return response;
370
-        }
371
-
372
-        //身份为家属租客,状态为已停用
373
-        if (Constant.INVALID.equals(taUser.getStatus())
374
-                && ((Constant.RELATION.equals(sysRole.getRoleName())) || Constant.TENANT.equals(sysRole.getRoleName()))){
350
+        //判断身份状态是否为已停用
351
+        iTaUserService.checkBlacklistStatusUser(user);
375 352
 
376
-            response.addError("9996", "您的身份已停用,请联系物业");
377
-            return response;
378
-        }
379
-
380
-        if (Constant.EFFECTIVE.equals(taUser.getStatus()) && (Constant.RELATION.equals(sysRole.getRoleName()) || Constant.TENANT.equals(sysRole.getRoleName()) || Constant.OWNER.equals(sysRole.getRoleName()))){
381
-            tpTransactionMapper.insertSelective(tpTransaction);
382
-            insertTdImage(tpTransaction, imageUrl, userId,Constant.TRANSACTION);
383
-            TpTransaction tpTransaction1=tpTransactionMapper.getById(tpTransaction.getId());
384
-            response.addSuccess(tpTransaction1);
385
-            return response;
386
-        }
387
-        response.addError("9995", "无法确认您的身份,请联系物业");
353
+        tpTransactionMapper.insertSelective(tpTransaction);
354
+        insertTdImage(tpTransaction, imageUrl, userElement.getId(), Constant.TRANSACTION);
355
+        response.addSuccess(tpTransaction);
388 356
         return response;
357
+
389 358
     }
390 359
 
391 360
     /**
392 361
      * 图片入库
362
+     *
393 363
      * @param tpTransaction
394
-     * @param imageUrl 多个图片都好分割
364
+     * @param imageUrl      多个图片都好分割
395 365
      * @param userId
396
-     * @param type 服务:service, 公告:announcement , 活动:activity  租赁 : transaction
366
+     * @param type          服务:service, 公告:announcement , 活动:activity  租赁 : transaction
397 367
      * @throws IOException
398 368
      */
399
-    private void insertTdImage(TpTransaction tpTransaction, String imageUrl, Integer userId,String type) throws IOException {
369
+    private void insertTdImage(TpTransaction tpTransaction, String imageUrl, Integer userId, String type) {
400 370
         if (null == imageUrl || "".equals(imageUrl)) {
401 371
             return;
402 372
         }
403
-        String [] imgArr = imageUrl.split(",");
404
-        for (String url  : imgArr) {
373
+        String[] imgArr = imageUrl.split(",");
374
+        for (String url : imgArr) {
405 375
             TdImages tdImages = new TdImages();
406 376
             Integer uuId = tpTransaction.getId();
407 377
             tdImages.setImageUrl(url);
@@ -412,57 +382,40 @@ public class SocialServiceImpl implements SocialServiceI {
412 382
             tdImagesMapper.insertSelective(tdImages);
413 383
         }
414 384
     }
385
+
415 386
     @Override
416
-    public ResponseBean selectAllTransaction(Integer userId,Integer pageNum,Integer paeSize,Integer type,Integer communityId) {
387
+    public ResponseBean selectAllTransaction(UserElement userElement, Integer pageNum, Integer paeSize, Integer type) {
417 388
         ResponseBean responseBean = new ResponseBean();
418
-        TaUser user=taUserMapper.selectByPrimaryKey(userId);
389
+        TaUser user = taUserMapper.selectByPrimaryKey(userElement.getId());
419 390
 
420
-        //判断身份是否为业主且状态为已停用
421
-        TaSysRole sysRole = taSysRoleMapper.findRoleByUserId(userId);
422
-        TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
423
-        if (Constant.INVALID.equals(taUser.getStatus())
424
-                && Constant.OWNER.equals(sysRole.getRoleName())){
425
-
426
-            responseBean.addError("9996", "您的身份已停用,请联系物业");
427
-            return responseBean;
428
-        }
429
-
430
-        //身份为家属租客,状态为已停用
431
-        if (Constant.INVALID.equals(taUser.getStatus())
432
-                && ((Constant.RELATION.equals(sysRole.getRoleName())) || Constant.TENANT.equals(sysRole.getRoleName()))){
433
-
434
-            responseBean.addError("9996", "您的身份已停用,请联系物业");
435
-            return responseBean;
436
-        }
391
+        //判断状态是否为已停用
392
+        iTaUserService.checkBlacklistStatusUser(user);
437 393
 
438
-        if (Constant.EFFECTIVE.equals(taUser.getStatus()) && (Constant.RELATION.equals(sysRole.getRoleName()) || Constant.TENANT.equals(sysRole.getRoleName()) || Constant.OWNER.equals(sysRole.getRoleName()))){
439
-            Map<String, Object> parameter = Maps.newHashMap();
440
-            Page<TpTransaction> pageLsit=PageHelper.startPage(pageNum, paeSize);
441
-            List<TpTransaction> tpTransactions=tpTransactionMapper.selectTransaction(userId,communityId,type);
394
+        Map<String, Object> parameter = Maps.newHashMap();
395
+        Page<TpTransaction> pageLsit = PageHelper.startPage(pageNum, paeSize);
396
+        List<TpTransaction> tpTransactions = tpTransactionMapper.selectTransaction(userElement.getId(), userElement.getCommunityId(), type);
397
+
398
+        tpTransactions.stream().forEach(e -> {
399
+            // 角色
400
+            TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(user.getId());
401
+            e.setRoleId(taSysRole.getId());
402
+            e.setRoleName(taSysRole.getRoleName());
403
+            e.setCreateUserName(user.getUserName());
404
+        });
442 405
 
443
-            tpTransactions.stream().forEach(e->{
444
-                // 角色
445
-                TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(user.getId());
446
-                e.setRoleId(taSysRole.getId());
447
-                e.setRoleName(taSysRole.getRoleName());
448
-                e.setCreateUserName(taUser.getUserName());
449
-            });
406
+        parameter.put("list", tpTransactions);
407
+        parameter.put("total", pageLsit.getTotal());
408
+        responseBean.addSuccess(parameter);
450 409
 
451
-            parameter.put("list",tpTransactions);
452
-            parameter.put("total",pageLsit.getTotal());
453
-            responseBean.addSuccess(parameter);
454
-            return responseBean;
455
-        }
456
-        responseBean.addError("9995", "无法确认您的身份,请联系物业");
457 410
         return responseBean;
458 411
     }
459 412
 
460 413
     @Override
461 414
     @Transactional(rollbackFor = Exception.class)
462
-    public ResponseBean updateTransaction(String paramets,Integer userId,Integer id) {
415
+    public ResponseBean updateTransaction(String paramets, Integer userId, Integer id) {
463 416
         ResponseBean response = new ResponseBean();
464 417
         JSONObject jsonObject = JSONObject.parseObject(paramets);
465
-        String imageUrl = (String) jsonObject.get("imageUrl");
418
+        String imageUrl = jsonObject.getString("imageUrl");
466 419
 
467 420
         TpTransaction tpTransaction = JSONObject.parseObject(paramets, TpTransaction.class);
468 421
         TpTransaction transaction = tpTransactionMapper.getById(id);
@@ -472,16 +425,11 @@ public class SocialServiceImpl implements SocialServiceI {
472 425
 
473 426
         if (null != transaction && userId.equals(transaction.getTaUserId())) {
474 427
             tdImagesMapper.deleteTdImages(Integer.valueOf(id), Constant.TRANSACTION);
475
-            try {
476
-                insertTdImage(transaction, imageUrl, userId, Constant.TRANSACTION);
477
-            } catch (IOException e) {
478
-                e.printStackTrace();
479
-                throw new RuntimeException("图片修改异常");
480
-            }
428
+
429
+            insertTdImage(transaction, imageUrl, userId, Constant.TRANSACTION);
481 430
             tpTransactionMapper.updateTransaction(Integer.valueOf(id), transaction.getTransactionTitle(), transaction.getTransactionContent(), userId);
482 431
             response.addSuccess("修改成功");
483 432
             return response;
484
-
485 433
         }
486 434
         response.addError("操作失败");
487 435
         return response;
@@ -489,16 +437,15 @@ public class SocialServiceImpl implements SocialServiceI {
489 437
 
490 438
     @Override
491 439
     public ResponseBean deleteransaction(Integer id, UserElement userElement) {
492
-        ResponseBean responseBean= new ResponseBean();
493
-        TpTransaction tpTransaction=tpTransactionMapper.getById(Integer.valueOf(id));
494
-        if(null!= tpTransaction && userElement.getId().equals(tpTransaction.getTaUserId())) {
440
+        ResponseBean responseBean = new ResponseBean();
441
+        TpTransaction tpTransaction = tpTransactionMapper.getById(Integer.valueOf(id));
442
+        if (null != tpTransaction && userElement.getId().equals(tpTransaction.getTaUserId())) {
495 443
             tpTransaction.setStatus("0");
496 444
             tpTransaction.setUpdateDate(new Date());
497 445
             tpTransactionMapper.updateByPrimaryKeySelective(tpTransaction);
498 446
             responseBean.addSuccess("删除成功");
499 447
 
500 448
 
501
-
502 449
             // 把消息变为无效
503 450
             Map<String, Object> map = new HashMap<>();
504 451
             map.put("communityId", userElement.getCommunityId());
@@ -516,13 +463,12 @@ public class SocialServiceImpl implements SocialServiceI {
516 463
             }
517 464
 
518 465
 
519
-
520
-        }else {
466
+        } else {
521 467
             responseBean.addSuccess("当前ID不存在");
522 468
         }
523 469
         return responseBean;
524
-        }
525
-    
470
+    }
471
+
526 472
     /**
527 473
      * 获取举报原因列表
528 474
      *
@@ -532,7 +478,7 @@ public class SocialServiceImpl implements SocialServiceI {
532 478
     public List<Map<String, Object>> getReportReasons() {
533 479
         return tpTransactionMapper.getReportReasons();
534 480
     }
535
-    
481
+
536 482
     /**
537 483
      * 举报二手交易帖子
538 484
      *
@@ -547,8 +493,8 @@ public class SocialServiceImpl implements SocialServiceI {
547 493
         Integer transactionId = jsonObject.getInteger("transactionId");
548 494
         String reportReasonId = jsonObject.getString("reportReasonId");
549 495
         //校验举报的帖子存不存在
550
-        TpTransaction tpTransaction = tpTransactionMapper.selectByPrimaryKey(transactionId,communityId);
551
-        if (null == tpTransaction){
496
+        TpTransaction tpTransaction = tpTransactionMapper.selectByPrimaryKey(transactionId, communityId);
497
+        if (null == tpTransaction) {
552 498
             responseBean.addError("举报的交易不存在");
553 499
             return responseBean;
554 500
         }
@@ -559,13 +505,13 @@ public class SocialServiceImpl implements SocialServiceI {
559 505
             return responseBean;
560 506
         }
561 507
         //插入举报表
562
-        tpTransactionMapper.saveReportReason(userId,communityId,transactionId,reportReasonId);
508
+        tpTransactionMapper.saveReportReason(userId, communityId, transactionId, reportReasonId);
563 509
         //更新交易表的举报状态为被举报
564 510
         TpTransaction record = new TpTransaction();
565 511
         record.setId(transactionId);
566 512
         record.setIsReported("1");
567 513
         Integer size = tpTransactionMapper.updateByPrimaryKeySelective(record);
568
-        if (size > 0){
514
+        if (size > 0) {
569 515
 
570 516
             // 举报人
571 517
             TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
@@ -584,12 +530,12 @@ public class SocialServiceImpl implements SocialServiceI {
584 530
             message.setAdviceType("4");
585 531
             message.setModelType("1");
586 532
             //超级管理员
587
-            Integer userID= toCommunitiesMapper.selectAndmin(communityId);
533
+            Integer userID = toCommunitiesMapper.selectAndmin(communityId);
588 534
             message.setUuid(userID);
589 535
             message.setModelType("1");
590 536
             message.setUuidType("2");
591 537
             message.setSource("1");
592
-            message.setMessageContent("{" + taUser.getUserName() + "}举报了{" + createUser.getUserName() + "}发布的帖子:{" + tpTransaction.getTransactionTitle() +  "},举报原因:{" + sysReportReason.getReason() + "},点击责令发布人修改或直接作废帖子");
538
+            message.setMessageContent("{" + taUser.getUserName() + "}举报了{" + createUser.getUserName() + "}发布的帖子:{" + tpTransaction.getTransactionTitle() + "},举报原因:{" + sysReportReason.getReason() + "},点击责令发布人修改或直接作废帖子");
593 539
             message.setStatus("1");
594 540
             message.setReadStatus("0");
595 541
             message.setTransactionId(transactionId);
@@ -598,7 +544,6 @@ public class SocialServiceImpl implements SocialServiceI {
598 544
             tpMessageMapper.insertSelective(message);
599 545
 
600 546
 
601
-
602 547
             responseBean.addSuccess(size);
603 548
             return responseBean;
604 549
         }
@@ -608,22 +553,22 @@ public class SocialServiceImpl implements SocialServiceI {
608 553
 
609 554
     @Override
610 555
     public ResponseBean addTransactionReply(String paramets, UserElement userElement) {
611
-        ResponseBean response= new ResponseBean();
612
-        JSONObject object= JSONObject.parseObject(paramets);
613
-        JSONArray array= object.getJSONArray("imgArr");
556
+        ResponseBean response = new ResponseBean();
557
+        JSONObject object = JSONObject.parseObject(paramets);
558
+        JSONArray array = object.getJSONArray("imgArr");
614 559
         String[] reply = null;
615
-        if (null!=array) {
616
-            reply= array.toArray(new String[]{});
560
+        if (null != array) {
561
+            reply = array.toArray(new String[]{});
617 562
         }
618
-        TpTransactionReply tpTransactionReply= JSONObject.parseObject(paramets,TpTransactionReply.class);
563
+        TpTransactionReply tpTransactionReply = JSONObject.parseObject(paramets, TpTransactionReply.class);
619 564
         tpTransactionReply.setCommunityId(userElement.getCommunityId());
620 565
         tpTransactionReply.setTaUserId(userElement.getId());
621 566
         tpTransactionReply.setTaUserName(userElement.getUserName());
622 567
         //获取被回复的姓名
623
-        if("".equals(tpTransactionReply.getReplyTaUserId())) {
568
+        if ("".equals(tpTransactionReply.getReplyTaUserId())) {
624 569
             tpTransactionReply.setReplyTaUserId(null);
625 570
         }
626
-        if(null!=tpTransactionReply.getReplyTaUserId()&!"".equals(tpTransactionReply.getReplyTaUserId())) {
571
+        if (null != tpTransactionReply.getReplyTaUserId() & !"".equals(tpTransactionReply.getReplyTaUserId())) {
627 572
             tpTransactionReply.setReplyTaUserName(taUserMapper.selectByPrimaryKey(tpTransactionReply.getReplyTaUserId()).getUserName());
628 573
         }
629 574
         tpTransactionReply.setReleaseIdentity("0");
@@ -631,7 +576,7 @@ public class SocialServiceImpl implements SocialServiceI {
631 576
         tpTransactionReply.setCreateDate(new Date());
632 577
         tpTransactionReplyMapper.insert(tpTransactionReply);
633 578
 
634
-        if (null!=array) {
579
+        if (null != array) {
635 580
             for (String img : reply) {
636 581
                 TdImages tdImages = new TdImages();
637 582
                 tdImages.setImageUrl(img);
@@ -648,13 +593,13 @@ public class SocialServiceImpl implements SocialServiceI {
648 593
 
649 594
     @Override
650 595
     public ResponseBean addTransactionLike(String paramets, UserElement userElement) {
651
-      ResponseBean response = new ResponseBean();
652
-        TpTransactionLike tpTransactionLike= JSONObject.parseObject(paramets,TpTransactionLike.class);
596
+        ResponseBean response = new ResponseBean();
597
+        TpTransactionLike tpTransactionLike = JSONObject.parseObject(paramets, TpTransactionLike.class);
653 598
         tpTransactionLike.setCommunityId(userElement.getCommunityId());
654 599
         tpTransactionLike.setTaUserId(userElement.getId());
655 600
         tpTransactionLike.setCreateDate(new Date());
656
-        TpTransactionLike isUser= tpTransactionLikeMapper.getinvitationId(tpTransactionLike.getTransactionId(),userElement.getCommunityId(),userElement.getId());
657
-        if (null!=isUser) {
601
+        TpTransactionLike isUser = tpTransactionLikeMapper.getinvitationId(tpTransactionLike.getTransactionId(), userElement.getCommunityId(), userElement.getId());
602
+        if (null != isUser) {
658 603
             response.addError("您已点赞或踩");
659 604
             return response;
660 605
         }
@@ -664,46 +609,46 @@ public class SocialServiceImpl implements SocialServiceI {
664 609
     }
665 610
 
666 611
     @Override
667
-    public ResponseBean userActivityList( UserElement userElement,Integer pageNum,Integer paeSize) {
668
-        ResponseBean responseBean= new ResponseBean();
612
+    public ResponseBean userActivityList(UserElement userElement, Integer pageNum, Integer paeSize) {
613
+        ResponseBean responseBean = new ResponseBean();
669 614
         Map<String, Object> parameter = Maps.newHashMap();
670
-            Page<TpActivity> pageList= PageHelper.startPage(pageNum, paeSize);
671
-            List<TpActivity> tpActivity= tpActivityMapper.selecttpActivity(userElement.getId(),userElement.getCommunityId());
672
-        parameter.put("list",tpActivity);
673
-        parameter.put("total",pageList.getTotal());
615
+        Page<TpActivity> pageList = PageHelper.startPage(pageNum, paeSize);
616
+        List<TpActivity> tpActivity = tpActivityMapper.selecttpActivity(userElement.getId(), userElement.getCommunityId());
617
+        parameter.put("list", tpActivity);
618
+        parameter.put("total", pageList.getTotal());
674 619
         responseBean.addSuccess(parameter);
675 620
         return responseBean;
676 621
     }
677 622
 
678 623
     @Override
679
-    public ResponseBean userTransactionList(UserElement userElement,Integer pageNum,Integer paeSize) {
680
-        ResponseBean responseBean= new ResponseBean();
624
+    public ResponseBean userTransactionList(UserElement userElement, Integer pageNum, Integer paeSize) {
625
+        ResponseBean responseBean = new ResponseBean();
681 626
         //拿到我自己所有的帖子
682 627
         Map<String, Object> parameter = Maps.newHashMap();
683
-        Page<TpTransaction> pageList=PageHelper.startPage(pageNum, paeSize);
684
-        List<TpTransaction> tpTransactionList = tpTransactionMapper.getUserTransactionList(userElement.getId(),userElement.getCommunityId());
685
-        
686
-        parameter.put("list",tpTransactionList);
687
-        parameter.put("total",pageList.getTotal());
628
+        Page<TpTransaction> pageList = PageHelper.startPage(pageNum, paeSize);
629
+        List<TpTransaction> tpTransactionList = tpTransactionMapper.getUserTransactionList(userElement.getId(), userElement.getCommunityId());
630
+
631
+        parameter.put("list", tpTransactionList);
632
+        parameter.put("total", pageList.getTotal());
688 633
         responseBean.addSuccess(parameter);
689 634
         return responseBean;
690 635
     }
691 636
 
692 637
     @Override
693 638
     public ResponseBean tpActivitySignInAdd(String paramets, UserElement userElement) {
694
-        ResponseBean responseBean= new ResponseBean();
695
-        Integer activityId= JSONObject.parseObject(paramets).getInteger("activityId");
696
-        TpActivitySignIn tpActivitySignIn= new TpActivitySignIn();
639
+        ResponseBean responseBean = new ResponseBean();
640
+        Integer activityId = JSONObject.parseObject(paramets).getInteger("activityId");
641
+        TpActivitySignIn tpActivitySignIn = new TpActivitySignIn();
697 642
         tpActivitySignIn.setActivityId(activityId);
698 643
         tpActivitySignIn.setCommunityId(userElement.getCommunityId());
699 644
 
700
-        TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
645
+        TaUserVerify taUserVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
701 646
 
702
-        String description= taSysRoleMapper.selectByPrimaryKey(taUserVerify.getRoleId()).getDescription();
647
+        String description = taSysRoleMapper.selectByPrimaryKey(taUserVerify.getRoleId()).getDescription();
703 648
         tpActivitySignIn.setUserRole(description);
704 649
         tpActivitySignIn.setUserName(userElement.getUserName());
705 650
         //期/栋/单/层/户
706
-        String bu=taUserVerify.getPhaseName()+"期"+taUserVerify.getBuildingName()+"栋"+taUserVerify.getUnitName()+"单"+taUserVerify.getLevelName()+"层"+taUserVerify.getRoomNoName()+"户";
651
+        String bu = taUserVerify.getPhaseName() + "期" + taUserVerify.getBuildingName() + "栋" + taUserVerify.getUnitName() + "单" + taUserVerify.getLevelName() + "层" + taUserVerify.getRoomNoName() + "户";
707 652
         tpActivitySignIn.setBuildingInfo(bu);
708 653
         tpActivitySignIn.setTaUserId(userElement.getId());
709 654
         tpActivitySignIn.setUserTel(userElement.getLoginName());
@@ -717,16 +662,16 @@ public class SocialServiceImpl implements SocialServiceI {
717 662
 
718 663
     @Override
719 664
     public ResponseBean replyAdd(String paramets, UserElement userElement) {
720
-        ResponseBean response= new ResponseBean();
665
+        ResponseBean response = new ResponseBean();
721 666
 
722
-        JSONObject object= JSONObject.parseObject(paramets);
723
-        Integer transactionId= object.getInteger("transactionId");
724
-        String replyContent= object.getString("replyContent");
725
-        Integer replyUserId= object.getInteger("replyUserId");
726
-        String[] imgArr= object.getJSONArray("imgArr").toArray(new String[]{});
667
+        JSONObject object = JSONObject.parseObject(paramets);
668
+        Integer transactionId = object.getInteger("transactionId");
669
+        String replyContent = object.getString("replyContent");
670
+        Integer replyUserId = object.getInteger("replyUserId");
671
+        String[] imgArr = object.getJSONArray("imgArr").toArray(new String[]{});
727 672
 
728
-        String userName= taUserMapper.selectByPrimaryKey(replyUserId).getUserName();
729
-      TpTransactionReply tpTransactionReply=  new TpTransactionReply();
673
+        String userName = taUserMapper.selectByPrimaryKey(replyUserId).getUserName();
674
+        TpTransactionReply tpTransactionReply = new TpTransactionReply();
730 675
         tpTransactionReply.setCommunityId(userElement.getCommunityId());
731 676
         tpTransactionReply.setTransactionId(transactionId);
732 677
         tpTransactionReply.setTaUserId(userElement.getId());
@@ -739,8 +684,8 @@ public class SocialServiceImpl implements SocialServiceI {
739 684
         response.addSuccess("成功");
740 685
         tpTransactionReplyMapper.insert(tpTransactionReply);
741 686
         //添加评论图片
742
-        for(String img:imgArr){
743
-            TdImages tdImages= new TdImages();
687
+        for (String img : imgArr) {
688
+            TdImages tdImages = new TdImages();
744 689
             tdImages.setImageUrl(img);
745 690
             tdImages.setType("reply");
746 691
             tdImages.setUuid(tpTransactionReply.getId());
@@ -774,15 +719,15 @@ public class SocialServiceImpl implements SocialServiceI {
774 719
         TpMessage message = new TpMessage();
775 720
         message.setCommunityId(communityId);
776 721
         message.setTicketId(tpTicket.getId());
777
-        TpTicket tic= tpTicketMapper.selectByTicketId(String.valueOf(communityId),Integer.valueOf(ticketId));
722
+        TpTicket tic = tpTicketMapper.selectByTicketId(String.valueOf(communityId), Integer.valueOf(ticketId));
778 723
         message.setMessageType(tic.getType());
779 724
         message.setAdviceType("4");
780 725
         message.setModelType("1");
781
-        Integer createUser=tpTicketMapper.selectRecordStatus(communityId,tpTicket.getId());
726
+        Integer createUser = tpTicketMapper.selectRecordStatus(communityId, tpTicket.getId());
782 727
         message.setUuid(createUser);
783 728
         message.setUuidType("2");
784 729
         message.setSource("2");
785
-        message.setMessageContent("工单“"+tic.getTicketTitle() +"”已经验收并评价,点击查看评分");
730
+        message.setMessageContent("工单“" + tic.getTicketTitle() + "”已经验收并评价,点击查看评分");
786 731
         message.setStatus("1");
787 732
         message.setReadStatus("0");
788 733
         message.setCreateUser(userId);
@@ -796,10 +741,10 @@ public class SocialServiceImpl implements SocialServiceI {
796 741
         if (null == num) {
797 742
             num = 0;
798 743
         }
799
-        List<TpActivity> listActivity=tpActivityMapper.getActivity(communityId,num);
744
+        List<TpActivity> listActivity = tpActivityMapper.getActivity(communityId, num);
800 745
         return listActivity;
801 746
     }
802
-    
747
+
803 748
     /**
804 749
      * 取消报名接口
805 750
      *
@@ -817,17 +762,17 @@ public class SocialServiceImpl implements SocialServiceI {
817 762
         tpActivitySignup.setTaUserId(userId);
818 763
         tpActivitySignupMapper.deleteSignUp(tpActivitySignup);
819 764
         //更新报名人数
820
-        updateActivitySignUpNum(communityId,activityId);
765
+        updateActivitySignUpNum(communityId, activityId);
821 766
         responseBean.addSuccess("取消报名成功");
822 767
         return responseBean;
823 768
     }
824 769
 
825 770
 
826
-    public ResponseBean insertActivitySignUp(UserElement userElement, TpActivity tpActivity, Integer communityId, Integer userId,String remark){
771
+    public ResponseBean insertActivitySignUp(UserElement userElement, TpActivity tpActivity, Integer communityId, String remark) {
827 772
         ResponseBean responseBean = new ResponseBean();
828 773
         //判断是否已经报名
829
-        Integer signNum = tpActivitySignupMapper.findTpActivetitySignByUserId(tpActivity.getId(), communityId, userId);
830
-        if (signNum != 0){
774
+        Integer signNum = tpActivitySignupMapper.findTpActivetitySignByUserId(tpActivity.getId(), communityId, userElement.getId());
775
+        if (signNum != 0) {
831 776
             responseBean.addError("9996", "您已报名,请勿重复报名");
832 777
             return responseBean;
833 778
         }
@@ -835,7 +780,7 @@ public class SocialServiceImpl implements SocialServiceI {
835 780
         TpActivitySignup tpActivitySignup = new TpActivitySignup();
836 781
         tpActivitySignup.setActivityId(tpActivity.getId());
837 782
         tpActivitySignup.setCommunityId(communityId);
838
-        tpActivitySignup.setTaUserId(userId);
783
+        tpActivitySignup.setTaUserId(userElement.getId());
839 784
         tpActivitySignup.setSignUpTime(new Date());
840 785
         tpActivitySignup.setRemark(remark);
841 786
 
@@ -847,18 +792,19 @@ public class SocialServiceImpl implements SocialServiceI {
847 792
 
848 793
         tpActivitySignupMapper.insertSelective(tpActivitySignup);
849 794
         //更新报名人数
850
-        updateActivitySignUpNum(communityId,tpActivity.getId());
795
+        updateActivitySignUpNum(communityId, tpActivity.getId());
851 796
         responseBean.addSuccess("报名成功");
852 797
         return responseBean;
853 798
     }
854
-    
799
+
855 800
     /**
856 801
      * 更新报名人数
802
+     *
857 803
      * @param communityId
858 804
      * @param activityId
859 805
      * @return
860 806
      */
861
-    private Integer updateActivitySignUpNum(Integer communityId,Integer activityId) {
807
+    private Integer updateActivitySignUpNum(Integer communityId, Integer activityId) {
862 808
         TpActivitySignup tpActivitySignup = new TpActivitySignup();
863 809
         tpActivitySignup.setActivityId(activityId);
864 810
         tpActivitySignup.setCommunityId(communityId);
@@ -873,25 +819,25 @@ public class SocialServiceImpl implements SocialServiceI {
873 819
     @Transactional
874 820
     @Override
875 821
     public TpTransaction findUsedDetails(Integer activityId, Integer communityId, Integer userId) {
876
-        Integer num = updateSocialView(userId,Constant.LEASE,communityId,activityId);
877
-        if (null != num){
822
+        Integer num = updateSocialView(userId, Constant.LEASE, communityId, activityId);
823
+        if (null != num) {
878 824
             TpTransaction transaction = new TpTransaction();
879 825
             transaction.setId(activityId);
880 826
             transaction.setViewCount(num);
881 827
             tpTransactionMapper.updateByPrimaryKeySelective(transaction);
882 828
         }
883 829
 
884
-        TpTransaction tpTransaction = tpTransactionMapper.selectByPrimaryKey(activityId,communityId);
885
-        TaUser taUser=taUserMapper.selectByPrimaryKey(tpTransaction.getTaUserId());
830
+        TpTransaction tpTransaction = tpTransactionMapper.selectByPrimaryKey(activityId, communityId);
831
+        TaUser taUser = taUserMapper.selectByPrimaryKey(tpTransaction.getTaUserId());
886 832
         tpTransaction.setTelephone(taUser.getLoginName());
887 833
         tpTransaction.setCreateUserName(taUser.getUserName());
888 834
 
889
-        Map<String,Object> map = Maps.newHashMap();
890
-        map.put("uuid",tpTransaction.getId());
891
-        map.put("type",Constant.TRANSACTION);
835
+        Map<String, Object> map = Maps.newHashMap();
836
+        map.put("uuid", tpTransaction.getId());
837
+        map.put("type", Constant.TRANSACTION);
892 838
         // 查询图片
893 839
         List<TdImages> tdImagesList = tdImagesMapper.getByUUIDAndByType(map);
894
-        List<String> imgList = tdImagesList.stream().map(e->new String(e.getImageUrl())).collect(Collectors.toList());
840
+        List<String> imgList = tdImagesList.stream().map(e -> new String(e.getImageUrl())).collect(Collectors.toList());
895 841
         tpTransaction.setImgList(imgList);
896 842
 
897 843
         /**
@@ -900,15 +846,15 @@ public class SocialServiceImpl implements SocialServiceI {
900 846
 
901 847
 
902 848
         //统计点赞人数的次数
903
-        Integer likeCount= tpTransactionLikeMapper.likeCount(activityId, communityId);
849
+        Integer likeCount = tpTransactionLikeMapper.likeCount(activityId, communityId);
904 850
         //不喜欢的人数
905
-        Integer noLikeCount= tpTransactionLikeMapper.nolikeCount(activityId, communityId);
851
+        Integer noLikeCount = tpTransactionLikeMapper.nolikeCount(activityId, communityId);
906 852
         tpTransaction.setLikeCount(likeCount == null ? 0 : likeCount);
907 853
         tpTransaction.setNoLikeCount(noLikeCount == null ? 0 : noLikeCount);
908 854
 
909 855
         // 查询是 点赞 还是 踩
910
-        TpTransactionLike isUser= tpTransactionLikeMapper.getinvitationId(activityId,communityId, userId);
911
-        if (null!=isUser){
856
+        TpTransactionLike isUser = tpTransactionLikeMapper.getinvitationId(activityId, communityId, userId);
857
+        if (null != isUser) {
912 858
             tpTransaction.setBel(isUser.getLikeStatus());
913 859
         }
914 860
 
@@ -921,7 +867,7 @@ public class SocialServiceImpl implements SocialServiceI {
921 867
     public ResponseBean updateActivtiySignUp(Integer activityId, Integer communityId, Integer userId, String remark) {
922 868
         ResponseBean responseBean = new ResponseBean();
923 869
         TpActivitySignup tpActivitySignup = tpActivitySignupMapper.selectTpActivetitySignByUserId(activityId, communityId, userId);
924
-        if (null == tpActivitySignup){
870
+        if (null == tpActivitySignup) {
925 871
             responseBean.addError("9996", "您未报名!");
926 872
             return responseBean;
927 873
         }
@@ -939,7 +885,7 @@ public class SocialServiceImpl implements SocialServiceI {
939 885
 
940 886
         ResponseBean responseBean = new ResponseBean();
941 887
         TpActivitySignup tpActivitySignup = tpActivitySignupMapper.selectTpActivetitySignByUserId(activityId, communityId, userId);
942
-        if (null == tpActivitySignup){
888
+        if (null == tpActivitySignup) {
943 889
             responseBean.addError("9996", "您未报名!");
944 890
             return responseBean;
945 891
         }
@@ -950,17 +896,17 @@ public class SocialServiceImpl implements SocialServiceI {
950 896
     }
951 897
 
952 898
     @Override
953
-    public ResponseBean findUsedDetailsReply(Integer transactionId, UserElement userElement, String order, Integer pageNum, Integer pageSize,Integer type) {
899
+    public ResponseBean findUsedDetailsReply(Integer transactionId, UserElement userElement, String order, Integer pageNum, Integer pageSize, Integer type) {
954 900
         ResponseBean responseBean = new ResponseBean();
955 901
         //拿到当前帖子的创建人
956
-        Integer CreateUser= tpTransactionMapper.getById(transactionId).getCreateUser();
902
+        Integer CreateUser = tpTransactionMapper.getById(transactionId).getCreateUser();
957 903
 
958 904
         PageHelper.startPage(pageNum, pageSize, "create_date " + order);
959
-        List<TpTransactionReply> replies = tpTransactionReplyMapper.getCommunityIdAndTransactionId(userElement.getCommunityId(), transactionId,userElement.getUnitId(),CreateUser,type);
960
-        for (TpTransactionReply tpTransactionReply:replies){
961
-            List<TdImages> tdImagesList= tdImagesMapper.selectImages(tpTransactionReply.getId(),"reply");
962
-            List<String> list= new ArrayList<>();
963
-            for (TdImages imageUrl:tdImagesList){
905
+        List<TpTransactionReply> replies = tpTransactionReplyMapper.getCommunityIdAndTransactionId(userElement.getCommunityId(), transactionId, userElement.getUnitId(), CreateUser, type);
906
+        for (TpTransactionReply tpTransactionReply : replies) {
907
+            List<TdImages> tdImagesList = tdImagesMapper.selectImages(tpTransactionReply.getId(), "reply");
908
+            List<String> list = new ArrayList<>();
909
+            for (TdImages imageUrl : tdImagesList) {
964 910
                 list.add(imageUrl.getImageUrl());
965 911
                 tpTransactionReply.setImgList(list);
966 912
             }

+ 25
- 21
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java Dosyayı Görüntüle

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
5 5
 import com.alibaba.fastjson.JSONObject;
6 6
 import com.community.commom.constant.Constant;
7 7
 import com.community.commom.mode.ResponseBean;
8
+import com.community.commom.session.UserElement;
8 9
 import com.community.huiju.dao.*;
9 10
 import com.community.huiju.model.*;
10 11
 import com.community.huiju.service.ITicketService;
@@ -58,6 +59,9 @@ public class TicketServiceImpl implements ITicketService {
58 59
     @Autowired
59 60
     private  ToCommunitiesMapper toCommunitiesMapper;
60 61
 
62
+    @Autowired
63
+    private TaUserVerifyMapper taUserVerifyMapper;
64
+
61 65
     @Override
62 66
     public ResponseBean getList(TpTicket tpTicket, Integer pageNum, Integer pageSize) {
63 67
 
@@ -260,7 +264,7 @@ public class TicketServiceImpl implements ITicketService {
260 264
 
261 265
     @Override
262 266
     @Transactional(rollbackFor = Exception.class)
263
-    public ResponseBean addAiTicketService(Integer userId, String parameter) throws IOException {
267
+    public ResponseBean addAiTicketService(UserElement userElement, String parameter) throws IOException {
264 268
         ResponseBean response = new ResponseBean();
265 269
         JSONObject jsonObject = JSONObject.parseObject(parameter);
266 270
         String imageUrl = (String) jsonObject.get("imageUrl");
@@ -273,32 +277,29 @@ public class TicketServiceImpl implements ITicketService {
273 277
          * 依次插入相关数据, 该工单默认的第一条数据(待分配), 是工单标题,
274 278
          */
275 279
 
276
-
277
-        TaUser user = taUserMapper.selectByPrimaryKey(userId);
278
-
279
-        tpTicket.setCommunityId(user.getCommunityId());
280
-        tpTicket.setTaUserId(userId);
280
+        tpTicket.setCommunityId(userElement.getCommunityId());
281
+        tpTicket.setTaUserId(userElement.getId());
281 282
         // 默认待分配
282 283
         tpTicket.setStatus("0");
283
-        tpTicket.setCreateUser(userId);
284
+        tpTicket.setCreateUser(userElement.getId());
284 285
         tpTicket.setCreateDate(new Date());
285
-        tpTicket.setUpdateUser(userId);
286
+        tpTicket.setUpdateUser(userElement.getId());
286 287
 //        tpTicket.setUpdateDate(new Date());
287 288
         // 插入工单
288 289
         tpTicketMapper.insertSelective(tpTicket);
289
-        insertTdImage(tpTicket, imageUrl, userId);
290
+        insertTdImage(tpTicket, imageUrl, userElement.getId());
290 291
 
291 292
         Integer id = tpTicket.getId();
292 293
         TpTicketRecord tpTicketRecord = new TpTicketRecord();
293 294
         //获取当前插入的信息,维护工单记录表
294 295
         TpTicket tpTicketReco = tpTicketMapper.selectByPrimaryKey(id);
295
-        tpTicketRecord.setCommunityId(user.getCommunityId());
296
+        tpTicketRecord.setCommunityId(userElement.getCommunityId());
296 297
         tpTicketRecord.setTicketId(tpTicketReco.getId());
297 298
         // 1:投诉   2:报修 3:联系物业
298 299
         String typeName = "2".equals(tpTicket.getType()) ? "报修" : "1".equals(tpTicket.getType()) ? "投诉" : "3".equals(tpTicket.getType()) ? "联系工单" : "未知类型";
299 300
         tpTicketRecord.setContent("您的" + typeName + "正在分配物业处理人员, 若长时间无人处理, 请联系物业! 联系物业号码簿 >");
300 301
         tpTicketRecord.setStatus(tpTicketReco.getStatus());
301
-        tpTicketRecord.setCreateUser(userId);
302
+        tpTicketRecord.setCreateUser(userElement.getId());
302 303
         tpTicketRecord.setCreateDate(new Date());
303 304
         // 插入工单处理表
304 305
         tpTicketRecordMapper.insertSelective(tpTicketRecord);
@@ -308,7 +309,7 @@ public class TicketServiceImpl implements ITicketService {
308 309
 //        insertTicketMessage(tpTicket, userId);
309 310
         //1.5版本维护消息推送
310 311
         TpMessage message = new TpMessage();
311
-        message.setCommunityId(user.getCommunityId());
312
+        message.setCommunityId(userElement.getCommunityId());
312 313
         message.setTicketId(tpTicket.getId());
313 314
         message.setModelType("1");
314 315
         message.setMessageType(tpTicket.getType());
@@ -316,18 +317,21 @@ public class TicketServiceImpl implements ITicketService {
316 317
         message.setUuidType("2");
317 318
         message.setSource("1");
318 319
         //当前插入为超级管理员
319
-         Integer uuserID= toCommunitiesMapper.selectAndmin(user.getCommunityId());
320
+         Integer uuserID= toCommunitiesMapper.selectAndmin(userElement.getCommunityId());
320 321
          message.setUuid(uuserID);
321
-         TaSysUserRole taSysUserRole= taSysUserRoleMapper.selectRole(user.getCommunityId(), userId);
322
-         String userName = null;
323
-         if (null != taSysUserRole) {
324
-             if(1 == taSysUserRole.getRoleId().intValue()){userName="业主"; }
325
-             if(2 == taSysUserRole.getRoleId().intValue()){userName="家属" ;}
326
-             if(3 == taSysUserRole.getRoleId().intValue()){userName="租客" ;}
327
-             message.setMessageContent(userName+user.getUserName()+"发起了一个工单“"+tpTicket.getTicketTitle()+"”,点击受理分配给合适的人处理");
322
+
323
+        TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
324
+        TaUser taUser = taUserMapper.selectByPrimaryKey(userElement.getId());
325
+
326
+        String userName = null;
327
+         if (null != userVerify) {
328
+             if(1 == userVerify.getRoleId().intValue()){userName="业主"; }
329
+             if(2 == userVerify.getRoleId().intValue()){userName="家属" ;}
330
+             if(3 == userVerify.getRoleId().intValue()){userName="租客" ;}
331
+             message.setMessageContent(userName+ taUser.getUserName()+"发起了一个工单“"+tpTicket.getTicketTitle()+"”,点击受理分配给合适的人处理");
328 332
              message.setStatus("1");
329 333
              message.setReadStatus("0");
330
-             message.setCreateUser(userId);
334
+             message.setCreateUser(userElement.getId());
331 335
              message.setCreateDate(new Date());
332 336
              tpMessageMapper.insert(message);
333 337
          }

+ 259
- 243
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml Dosyayı Görüntüle

@@ -1,36 +1,38 @@
1 1
 <?xml version="1.0" encoding="UTF-8" ?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.community.huiju.dao.TpTransactionMapper" >
4
-  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpTransaction" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
-    <result column="ta_user_id" property="taUserId" jdbcType="INTEGER" />
8
-    <result column="transaction_title" property="transactionTitle" jdbcType="VARCHAR" />
9
-    <result column="transaction_content" property="transactionContent" jdbcType="VARCHAR" />
10
-    <result column="view_count" property="viewCount" jdbcType="INTEGER" />
11
-    <result column="status" property="status" jdbcType="CHAR" />
12
-    <result column="type" property="type" jdbcType="CHAR" />
13
-    <result column="create_user" property="createUser" jdbcType="INTEGER" />
14
-    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
15
-    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
16
-    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
17
-    <result column="role_id" property="roleId" jdbcType="INTEGER" />
18
-    <result column="role_name" property="roleName" jdbcType="VARCHAR" />
19
-    <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
20
-    <result column="release_identity" property="releaseIdentity" jdbcType="VARCHAR" />
3
+<mapper namespace="com.community.huiju.dao.TpTransactionMapper">
4
+    <resultMap id="BaseResultMap" type="com.community.huiju.model.TpTransaction">
5
+        <id column="id" property="id" jdbcType="INTEGER"/>
6
+        <result column="community_id" property="communityId" jdbcType="INTEGER"/>
7
+        <result column="ta_user_id" property="taUserId" jdbcType="INTEGER"/>
8
+        <result column="transaction_title" property="transactionTitle" jdbcType="VARCHAR"/>
9
+        <result column="transaction_content" property="transactionContent" jdbcType="VARCHAR"/>
10
+        <result column="sort" property="sort" jdbcType="VARCHAR"/>
11
+        <result column="view_count" property="viewCount" jdbcType="INTEGER"/>
12
+        <result column="status" property="status" jdbcType="CHAR"/>
13
+        <result column="type" property="type" jdbcType="CHAR"/>
14
+        <result column="create_user" property="createUser" jdbcType="INTEGER"/>
15
+        <result column="create_date" property="createDate" jdbcType="TIMESTAMP"/>
16
+        <result column="update_user" property="updateUser" jdbcType="INTEGER"/>
17
+        <result column="update_date" property="updateDate" jdbcType="TIMESTAMP"/>
18
+        <result column="role_id" property="roleId" jdbcType="INTEGER"/>
19
+        <result column="role_name" property="roleName" jdbcType="VARCHAR"/>
20
+        <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER"/>
21
+        <result column="release_identity" property="releaseIdentity" jdbcType="VARCHAR"/>
21 22
 
22
-  </resultMap>
23
-  <sql id="Base_Column_List" >
24
-    id, community_id, ta_user_id, transaction_title, transaction_content,
23
+    </resultMap>
24
+    <sql id="Base_Column_List">
25
+    id, community_id, ta_user_id, transaction_title, transaction_content, sort,
25 26
     view_count, status, type, create_user, create_date, update_user, update_date, ta_user_verify_id, release_identity
26 27
   </sql>
27
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.community.huiju.model.TpTransaction"  >
28
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.community.huiju.model.TpTransaction">
28 29
     SELECT
29 30
 	ttr.id,
30 31
 	ttr.community_id,
31 32
 	ttr.ta_user_id,
32 33
 	ttr.transaction_title,
33 34
 	ttr.transaction_content,
35
+	ttr.sort,
34 36
 	ttr.view_count,
35 37
 	ttr.STATUS,
36 38
 	ttr.type,
@@ -48,169 +50,181 @@ LEFT JOIN ta_sys_user_role tsur ON ttr.ta_user_id = tsur.user_id
48 50
 LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
49 51
     where ttr.id = #{id,jdbcType=INTEGER} and ttr.community_id=#{communityId,jdbcType=INTEGER}
50 52
   </select>
51
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
53
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
52 54
     delete from tp_transaction
53 55
     where id = #{id,jdbcType=INTEGER}
54 56
   </delete>
55
-  <insert id="insert" parameterType="com.community.huiju.model.TpTransaction" >
57
+    <insert id="insert" parameterType="com.community.huiju.model.TpTransaction">
56 58
     insert into tp_transaction (id, community_id,release_identity,
57
-      ta_user_verify_id
59
+      ta_user_verify_id,
58 60
       ta_user_id,
59 61
       transaction_title, transaction_content,
62
+      sort,
60 63
       view_count, status,
61 64
       type, create_user, create_date, 
62 65
       update_user, update_date)
63 66
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},#{releaseIdentity,jdbcType=VARCHAR},#{taUserVerifyId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER},
64
-      #{transactionTitle,jdbcType=VARCHAR}, #{transactionContent,jdbcType=VARCHAR},
67
+      #{transactionTitle,jdbcType=VARCHAR}, #{transactionContent,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR},
65 68
        #{viewCount,jdbcType=INTEGER}, #{status,jdbcType=CHAR},
66 69
       #{type,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
67 70
       #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
68 71
   </insert>
69
-  <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id"  parameterType="com.community.huiju.model.TpTransaction" >
70
-    insert into tp_transaction
71
-    <trim prefix="(" suffix=")" suffixOverrides="," >
72
-      <if test="id != null" >
73
-        id,
74
-      </if>
75
-      <if test="communityId != null" >
76
-        community_id,
77
-      </if>
78
-      <if test="taUserId != null" >
79
-        ta_user_id,
80
-      </if>
81
-      <if test="transactionTitle != null" >
82
-        transaction_title,
83
-      </if>
84
-      <if test="transactionContent != null" >
85
-        transaction_content,
86
-      </if>
87
-      <if test="viewCount != null" >
88
-        view_count,
89
-      </if>
90
-      <if test="status != null" >
91
-        status,
92
-      </if>
93
-      <if test="type != null" >
94
-        type,
95
-      </if>
96
-      <if test="isReported != null" >
97
-        is_reported,
98
-      </if>
99
-      <if test="createUser != null" >
100
-        create_user,
101
-      </if>
102
-      <if test="createDate != null" >
103
-        create_date,
104
-      </if>
105
-      <if test="updateUser != null" >
106
-        update_user,
107
-      </if>
108
-      <if test="updateDate != null" >
109
-        update_date,
110
-      </if>
111
-      <if test="taUserVerifyId != null" >
112
-        ta_user_verify_id,
113
-      </if>
114
-      <if test="releaseIdentity != null" >
115
-        release_identity
116
-      </if>
117
-    </trim>
118
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
119
-      <if test="id != null" >
120
-        #{id,jdbcType=INTEGER},
121
-      </if>
122
-      <if test="communityId != null" >
123
-        #{communityId,jdbcType=INTEGER},
124
-      </if>
125
-      <if test="taUserId != null" >
126
-        #{taUserId,jdbcType=INTEGER},
127
-      </if>
128
-      <if test="transactionTitle != null" >
129
-        #{transactionTitle,jdbcType=VARCHAR},
130
-      </if>
131
-      <if test="transactionContent != null" >
132
-        #{transactionContent,jdbcType=VARCHAR},
133
-      </if>
134
-      <if test="viewCount != null" >
135
-        #{viewCount,jdbcType=INTEGER},
136
-      </if>
137
-      <if test="status != null" >
138
-        #{status,jdbcType=CHAR},
139
-      </if>
140
-      <if test="type != null" >
141
-        #{type,jdbcType=CHAR},
142
-      </if>
143
-      <if test="isReported != null" >
144
-        #{isReported,jdbcType=CHAR},
145
-      </if>
146
-      <if test="createUser != null" >
147
-        #{createUser,jdbcType=INTEGER},
148
-      </if>
149
-      <if test="createDate != null" >
150
-        #{createDate,jdbcType=TIMESTAMP},
151
-      </if>
152
-      <if test="updateUser != null" >
153
-        #{updateUser,jdbcType=INTEGER},
154
-      </if>
155
-      <if test="updateDate != null" >
156
-        #{updateDate,jdbcType=TIMESTAMP},
157
-      </if>
158
-      <if test="taUserVerifyId != null" >
159
-        #{taUserVerifyId,jdbcType=INTEGER},
160
-      </if>
161
-      <if test="releaseIdentity != null" >
162
-        #{releaseIdentity,jdbcType=VARCHAR},
163
-      </if>
164
-    </trim>
165
-  </insert>
166
-  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransaction" >
167
-    update tp_transaction
168
-    <set >
169
-      <if test="communityId != null" >
170
-        community_id = #{communityId,jdbcType=INTEGER},
171
-      </if>
172
-      <if test="taUserId != null" >
173
-        ta_user_id = #{taUserId,jdbcType=INTEGER},
174
-      </if>
175
-      <if test="transactionTitle != null" >
176
-        transaction_title = #{transactionTitle,jdbcType=VARCHAR},
177
-      </if>
178
-      <if test="transactionContent != null" >
179
-        transaction_content = #{transactionContent,jdbcType=VARCHAR},
180
-      </if>
181
-      <if test="viewCount != null" >
182
-        view_count = #{viewCount,jdbcType=INTEGER},
183
-      </if>
184
-      <if test="isReported != null and isReported !=''" >
185
-        is_reported = #{isReported,jdbcType=CHAR},
186
-      </if>
187
-      <if test="status != null" >
188
-        status = #{status,jdbcType=CHAR},
189
-      </if>
190
-      <if test="type != null" >
191
-        type = #{type,jdbcType=CHAR},
192
-      </if>
193
-      <if test="createUser != null" >
194
-        create_user = #{createUser,jdbcType=INTEGER},
195
-      </if>
196
-      <if test="createDate != null" >
197
-        create_date = #{createDate,jdbcType=TIMESTAMP},
198
-      </if>
199
-      <if test="updateUser != null" >
200
-        update_user = #{updateUser,jdbcType=INTEGER},
201
-      </if>
202
-      <if test="updateDate != null" >
203
-        update_date = #{updateDate,jdbcType=TIMESTAMP},
204
-      </if>
205
-    </set>
206
-    where id = #{id,jdbcType=INTEGER}
207
-  </update>
208
-  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpTransaction" >
72
+    <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id"
73
+            parameterType="com.community.huiju.model.TpTransaction">
74
+        insert into tp_transaction
75
+        <trim prefix="(" suffix=")" suffixOverrides=",">
76
+            <if test="id != null">
77
+                id,
78
+            </if>
79
+            <if test="communityId != null">
80
+                community_id,
81
+            </if>
82
+            <if test="taUserId != null">
83
+                ta_user_id,
84
+            </if>
85
+            <if test="transactionTitle != null">
86
+                transaction_title,
87
+            </if>
88
+            <if test="transactionContent != null">
89
+                transaction_content,
90
+            </if>
91
+            <if test="sort != null">
92
+                sort,
93
+            </if>
94
+            <if test="viewCount != null">
95
+                view_count,
96
+            </if>
97
+            <if test="status != null">
98
+                status,
99
+            </if>
100
+            <if test="type != null">
101
+                type,
102
+            </if>
103
+            <if test="isReported != null">
104
+                is_reported,
105
+            </if>
106
+            <if test="createUser != null">
107
+                create_user,
108
+            </if>
109
+            <if test="createDate != null">
110
+                create_date,
111
+            </if>
112
+            <if test="updateUser != null">
113
+                update_user,
114
+            </if>
115
+            <if test="updateDate != null">
116
+                update_date,
117
+            </if>
118
+            <if test="taUserVerifyId != null">
119
+                ta_user_verify_id,
120
+            </if>
121
+            <if test="releaseIdentity != null">
122
+                release_identity
123
+            </if>
124
+        </trim>
125
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
126
+            <if test="id != null">
127
+                #{id,jdbcType=INTEGER},
128
+            </if>
129
+            <if test="communityId != null">
130
+                #{communityId,jdbcType=INTEGER},
131
+            </if>
132
+            <if test="taUserId != null">
133
+                #{taUserId,jdbcType=INTEGER},
134
+            </if>
135
+            <if test="transactionTitle != null">
136
+                #{transactionTitle,jdbcType=VARCHAR},
137
+            </if>
138
+            <if test="transactionContent != null">
139
+                #{transactionContent,jdbcType=VARCHAR},
140
+            </if>
141
+            <if test="sort != null">
142
+                #{sort,jdbcType=VARCHAR},
143
+            </if>
144
+            <if test="viewCount != null">
145
+                #{viewCount,jdbcType=INTEGER},
146
+            </if>
147
+            <if test="status != null">
148
+                #{status,jdbcType=CHAR},
149
+            </if>
150
+            <if test="type != null">
151
+                #{type,jdbcType=CHAR},
152
+            </if>
153
+            <if test="isReported != null">
154
+                #{isReported,jdbcType=CHAR},
155
+            </if>
156
+            <if test="createUser != null">
157
+                #{createUser,jdbcType=INTEGER},
158
+            </if>
159
+            <if test="createDate != null">
160
+                #{createDate,jdbcType=TIMESTAMP},
161
+            </if>
162
+            <if test="updateUser != null">
163
+                #{updateUser,jdbcType=INTEGER},
164
+            </if>
165
+            <if test="updateDate != null">
166
+                #{updateDate,jdbcType=TIMESTAMP},
167
+            </if>
168
+            <if test="taUserVerifyId != null">
169
+                #{taUserVerifyId,jdbcType=INTEGER},
170
+            </if>
171
+            <if test="releaseIdentity != null">
172
+                #{releaseIdentity,jdbcType=VARCHAR},
173
+            </if>
174
+        </trim>
175
+    </insert>
176
+    <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransaction">
177
+        update tp_transaction
178
+        <set>
179
+            <if test="communityId != null">
180
+                community_id = #{communityId,jdbcType=INTEGER},
181
+            </if>
182
+            <if test="taUserId != null">
183
+                ta_user_id = #{taUserId,jdbcType=INTEGER},
184
+            </if>
185
+            <if test="transactionTitle != null">
186
+                transaction_title = #{transactionTitle,jdbcType=VARCHAR},
187
+            </if>
188
+            <if test="transactionContent != null">
189
+                transaction_content = #{transactionContent,jdbcType=VARCHAR},
190
+            </if>
191
+            <if test="sort != null">
192
+                sort = #{sort,jdbcType=VARCHAR},
193
+            </if>
194
+            <if test="viewCount != null">
195
+                view_count = #{viewCount,jdbcType=INTEGER},
196
+            </if>
197
+            <if test="isReported != null and isReported !=''">
198
+                is_reported = #{isReported,jdbcType=CHAR},
199
+            </if>
200
+            <if test="status != null">
201
+                status = #{status,jdbcType=CHAR},
202
+            </if>
203
+            <if test="type != null">
204
+                type = #{type,jdbcType=CHAR},
205
+            </if>
206
+            <if test="createUser != null">
207
+                create_user = #{createUser,jdbcType=INTEGER},
208
+            </if>
209
+            <if test="createDate != null">
210
+                create_date = #{createDate,jdbcType=TIMESTAMP},
211
+            </if>
212
+            <if test="updateUser != null">
213
+                update_user = #{updateUser,jdbcType=INTEGER},
214
+            </if>
215
+            <if test="updateDate != null">
216
+                update_date = #{updateDate,jdbcType=TIMESTAMP},
217
+            </if>
218
+        </set>
219
+        where id = #{id,jdbcType=INTEGER}
220
+    </update>
221
+    <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpTransaction">
209 222
     update tp_transaction
210 223
     set community_id = #{communityId,jdbcType=INTEGER},
211 224
       ta_user_id = #{taUserId,jdbcType=INTEGER},
212 225
       transaction_title = #{transactionTitle,jdbcType=VARCHAR},
213 226
       transaction_content = #{transactionContent,jdbcType=VARCHAR},
227
+      sort = #{sort,jdbcType=VARCHAR},
214 228
       view_count = #{viewCount,jdbcType=INTEGER},
215 229
       status = #{status,jdbcType=CHAR},
216 230
       type = #{type,jdbcType=CHAR},
@@ -221,51 +235,52 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
221 235
     where id = #{id,jdbcType=INTEGER}
222 236
   </update>
223 237
 
224
-  <select id="findAllTransaction" resultMap="BaseResultMap">
225
-    select
226
-    <include refid="Base_Column_List" />
227
-    from tp_transaction
228
-    where community_id = #{communityId,jdbcType=INTEGER}
229
-    <if test="type != null and type != ''">
230
-      and type = #{type,jdbcType=VARCHAR}
231
-    </if>
232
-    <if test="transactionTitle != null and transactionTitle !=''">
233
-      and transaction_title LIKE concat('%',#{transactionTitle,jdbcType=VARCHAR},'%')
234
-    </if>
235
-    and status = 1
236
-    order by update_date DESC, create_date DESC
237
-  </select>
238
+    <select id="findAllTransaction" resultMap="BaseResultMap">
239
+        select
240
+        <include refid="Base_Column_List"/>
241
+        from tp_transaction
242
+        where community_id = #{communityId,jdbcType=INTEGER}
243
+        <if test="type != null and type != ''">
244
+            and type = #{type,jdbcType=VARCHAR}
245
+        </if>
246
+        <if test="transactionTitle != null and transactionTitle !=''">
247
+            and transaction_title LIKE concat('%',#{transactionTitle,jdbcType=VARCHAR},'%')
248
+        </if>
249
+        and status = 1
250
+        order by update_date DESC, create_date DESC
251
+    </select>
238 252
 
239
-  <select id="selectTransaction" resultMap="BaseResultMap">
240
-    SELECT
241
-    <include refid="Base_Column_List" />
242
-    FROM
243
-    tp_transaction t
244
-    WHERE t.create_user=#{id,jdbcType=INTEGER}
245
-    AND t.community_id=#{communityId,jdbcType=INTEGER}
246
-    UNION ALL
247
-    SELECT
248
-    <include refid="Base_Column_List" />
249
-    FROM
250
-    tp_transaction t
251
-    INNER JOIN(SELECT
252
-    y.transaction_id
253
-    FROM
254
-    tp_transaction_reply y
255
-    LEFT JOIN tp_transaction t ON y.transaction_id = t.id
256
-    WHERE
257
-    y.ta_user_id = #{id,jdbcType=INTEGER}
258
-    <if test="type != null and type != ''">
259
-      and  t.type = #{type,jdbcType=INTEGER}
260
-    </if>
261
-    AND y.community_id = #{communityId,jdbcType=INTEGER}
262
-    AND y.transaction_id NOT IN ( SELECT t.id FROM tp_transaction t WHERE t.create_user = #{id,jdbcType=INTEGER} AND t.community_id = #{communityId,jdbcType=INTEGER}  )
263
-    GROUP BY
264
-    y.transaction_id) a ON a.transaction_id = t.id
265
-    order by create_date DESC
266
-  </select>
253
+    <select id="selectTransaction" resultMap="BaseResultMap">
254
+        SELECT
255
+        <include refid="Base_Column_List"/>
256
+        FROM
257
+        tp_transaction t
258
+        WHERE t.create_user=#{id,jdbcType=INTEGER}
259
+        AND t.community_id=#{communityId,jdbcType=INTEGER}
260
+        UNION ALL
261
+        SELECT
262
+        <include refid="Base_Column_List"/>
263
+        FROM
264
+        tp_transaction t
265
+        INNER JOIN(SELECT
266
+        y.transaction_id
267
+        FROM
268
+        tp_transaction_reply y
269
+        LEFT JOIN tp_transaction t ON y.transaction_id = t.id
270
+        WHERE
271
+        y.ta_user_id = #{id,jdbcType=INTEGER}
272
+        <if test="type != null and type != ''">
273
+            and t.type = #{type,jdbcType=INTEGER}
274
+        </if>
275
+        AND y.community_id = #{communityId,jdbcType=INTEGER}
276
+        AND y.transaction_id NOT IN ( SELECT t.id FROM tp_transaction t WHERE t.create_user = #{id,jdbcType=INTEGER} AND
277
+        t.community_id = #{communityId,jdbcType=INTEGER} )
278
+        GROUP BY
279
+        y.transaction_id) a ON a.transaction_id = t.id
280
+        order by create_date DESC
281
+    </select>
267 282
 
268
-  <update id="updateTransaction" parameterType="com.community.huiju.model.TpTransaction" >
283
+    <update id="updateTransaction" parameterType="com.community.huiju.model.TpTransaction">
269 284
     update tp_transaction
270 285
     set
271 286
     ta_user_id = #{userId,jdbcType=INTEGER},
@@ -276,48 +291,49 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
276 291
     where id = #{id,jdbcType=INTEGER}
277 292
   </update>
278 293
 
279
-  <select id="getById" resultMap="BaseResultMap" parameterType="com.community.huiju.model.TpTransaction">
280
-    select
281
-    <include refid="Base_Column_List" />
282
-    from tp_transaction
283
-    where id = #{id,jdbcType=INTEGER} and status = 1
284
-    order by create_date DESC
285
-  </select>
294
+    <select id="getById" resultMap="BaseResultMap" parameterType="com.community.huiju.model.TpTransaction">
295
+        select
296
+        <include refid="Base_Column_List"/>
297
+        from tp_transaction
298
+        where id = #{id,jdbcType=INTEGER} and status = 1
299
+        order by create_date DESC
300
+    </select>
286 301
 
287
-  <select id="getReportReasons" resultType="java.util.Map">
302
+    <select id="getReportReasons" resultType="java.util.Map">
288 303
     SELECT id,reason FROM sys_report_reason ORDER BY sort
289 304
   </select>
290 305
 
291
-  <insert id="saveReportReason">
306
+    <insert id="saveReportReason">
292 307
     insert into tp_transaction_report (community_id, transaction_id,
293 308
       report_reason_id, reporter_id)
294 309
     values (#{communityId,jdbcType=INTEGER}, #{transactionId,jdbcType=INTEGER},
295 310
       #{reportReasonId,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER})
296 311
   </insert>
297
-  <select id="getUserTransactionList" resultMap="BaseResultMap">
312
+    <select id="getUserTransactionList" resultMap="BaseResultMap">
298 313
 
299
-SELECT
300
-    <include refid="Base_Column_List" />
301
-    FROM
302
-      tp_transaction t
303
-    WHERE t.create_user=#{id,jdbcType=INTEGER}
304
-    AND t.community_id=#{communityId,jdbcType=INTEGER}
305
-    UNION ALL
306
-    SELECT
307
-        <include refid="Base_Column_List" />
308
-    FROM
309
-      tp_transaction t
310
-    INNER JOIN(SELECT
311
-      y.transaction_id
312
-    FROM
313
-      tp_transaction_reply y
314
-      LEFT JOIN tp_transaction t ON y.transaction_id = t.id
315
-    WHERE
316
-      y.ta_user_id = #{id,jdbcType=INTEGER}
317
-      AND y.community_id = #{communityId,jdbcType=INTEGER}
318
-      AND y.transaction_id NOT IN ( SELECT t.id FROM tp_transaction t WHERE t.create_user = #{id,jdbcType=INTEGER} AND t.community_id = #{communityId,jdbcType=INTEGER}  )
319
-    GROUP BY
320
-      y.transaction_id) a ON a.transaction_id = t.id
321
-    order by create_date DESC
322
-  </select>
314
+        SELECT
315
+        <include refid="Base_Column_List"/>
316
+        FROM
317
+        tp_transaction t
318
+        WHERE t.create_user=#{id,jdbcType=INTEGER}
319
+        AND t.community_id=#{communityId,jdbcType=INTEGER}
320
+        UNION ALL
321
+        SELECT
322
+        <include refid="Base_Column_List"/>
323
+        FROM
324
+        tp_transaction t
325
+        INNER JOIN(SELECT
326
+        y.transaction_id
327
+        FROM
328
+        tp_transaction_reply y
329
+        LEFT JOIN tp_transaction t ON y.transaction_id = t.id
330
+        WHERE
331
+        y.ta_user_id = #{id,jdbcType=INTEGER}
332
+        AND y.community_id = #{communityId,jdbcType=INTEGER}
333
+        AND y.transaction_id NOT IN ( SELECT t.id FROM tp_transaction t WHERE t.create_user = #{id,jdbcType=INTEGER} AND
334
+        t.community_id = #{communityId,jdbcType=INTEGER} )
335
+        GROUP BY
336
+        y.transaction_id) a ON a.transaction_id = t.id
337
+        order by create_date DESC
338
+    </select>
323 339
 </mapper>

+ 1
- 1
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/ToBannerServiceImpl.java Dosyayı Görüntüle

@@ -208,7 +208,7 @@ public class ToBannerServiceImpl implements IToBannerService {
208 208
             // TODO banner位置名称
209 209
             //SysDictionary sysDictionary = sysDictionaryMapper.selectByPrimaryKey(e.getBannerPosition());
210 210
             //toBannerVO.setBannerPositionName(sysDictionary.getName());
211
-            toBannerVO.setBannerPositionName(e.getBannerPosition() == 1?"首页banner":"服务banner");
211
+            toBannerVO.setBannerPositionName(e.getBannerPosition() == 1?"首页banner": e.getBannerPosition() == 2 ? "服务banner" : "广告banner");
212 212
 
213 213
             ToUser toUser = toUserMapper.selectByPrimaryKey(e.getUpdateUser());
214 214
             if (null != toUser) {

+ 2
- 2
VUECODE/smart-operate-manage/src/views/banner/addBanner/index.vue Dosyayı Görüntüle

@@ -167,7 +167,7 @@ export default {
167 167
     })
168 168
   },
169 169
   created() {
170
-    this.listQuery = this.$route.params.listQuery
170
+    this.listQuery = this.$route.query.listQuery
171 171
     this.getCommuniryList()
172 172
   },
173 173
   methods: {
@@ -201,7 +201,7 @@ export default {
201 201
     },
202 202
     dialogForm(isVaule) {
203 203
       if (isVaule === '0') {
204
-        this.$router.push({ name: 'banner-index', params: { listQuery: this.listQuery }})
204
+        this.$router.push({ name: 'banner-index', query: { listQuery: this.listQuery }})
205 205
       } else {
206 206
         this.createData()
207 207
         // console.log('添加banner的数据: ', this.addForm)

+ 3
- 3
VUECODE/smart-operate-manage/src/views/banner/ediBanner/index.vue Dosyayı Görüntüle

@@ -171,8 +171,8 @@ export default {
171 171
   },
172 172
   created() {
173 173
     this.getCommuniryList()
174
-    this.getByBannerId(this.$route.params.id)
175
-    this.listQuery = this.$route.params.listQuery
174
+    this.getByBannerId(this.$route.query.id)
175
+    this.listQuery = this.$route.query.listQuery
176 176
   },
177 177
   updated() {
178 178
     // console.log('$ref: ', this.$refs.refEditor)
@@ -209,7 +209,7 @@ export default {
209 209
     },
210 210
     dialogForm(isVaule) {
211 211
       if (isVaule === '0') {
212
-        this.$router.push({ name: 'banner-index', params: { listQuery: this.listQuery }})
212
+        this.$router.push({ name: 'banner-index', query: { listQuery: this.listQuery }})
213 213
       } else {
214 214
         this.updateData()
215 215
       }

+ 8
- 9
VUECODE/smart-operate-manage/src/views/banner/index.vue Dosyayı Görüntüle

@@ -175,9 +175,9 @@ export default {
175 175
     })
176 176
   },
177 177
   created() {
178
-    const query = this.$route.params.listQuery
178
+    const query = this.$route.query.listQuery
179 179
     if (query !== undefined) {
180
-      this.listQuery = this.$route.params.listQuery
180
+      this.listQuery = this.$route.query.listQuery
181 181
     }
182 182
     this.getList()
183 183
     this.getCommuniryList()
@@ -225,13 +225,13 @@ export default {
225 225
       })
226 226
     },
227 227
     dialogAddForm() {
228
-      this.$router.push({ name: 'banner-add', params: { listQuery: this.listQuery }})
228
+      this.$router.push({ name: 'banner-add', query: { listQuery: this.listQuery }})
229 229
     },
230 230
     updateBanner(bannerId) {
231
-      this.$router.push({ name: 'banner-edi', params: { id: bannerId, listQuery: this.listQuery }})
231
+      this.$router.push({ name: 'banner-edi', query: { id: bannerId, listQuery: this.listQuery }})
232 232
     },
233 233
     infoBanner(bannerId) {
234
-      this.$router.push({ name: 'banner-info', params: { id: bannerId, listQuery: this.listQuery }})
234
+      this.$router.push({ name: 'banner-info', query: { id: bannerId, listQuery: this.listQuery }})
235 235
     },
236 236
     handleSizeChange(val) {
237 237
       // console.log(`每页 ${val} 条`);
@@ -259,10 +259,9 @@ export default {
259 259
       this.$store.dispatch('GetBanner', this.listQuery).then(response => {
260 260
         this.list = response.item
261 261
         this.total = response.total
262
-        // Just to simulate the time of the request
263
-        setTimeout(() => {
264
-          this.listLoading = false
265
-        }, 1.5 * 1000)
262
+        this.listLoading = false
263
+      }).catch(() => {
264
+        this.listLoading = false
266 265
       })
267 266
     },
268 267
     getCommuniryList() {

+ 8
- 7
VUECODE/smart-operate-manage/src/views/banner/infoBanner/index.vue Dosyayı Görüntüle

@@ -131,7 +131,8 @@ export default {
131 131
       showURLVisible: true,
132 132
       bannerPositionArr: [
133 133
         { id: 1, value: '首页banner' },
134
-        { id: 2, value: '服务banner' }
134
+        { id: 2, value: '服务banner' },
135
+        { id: 3, value: '广告banner' }
135 136
       ]
136 137
     }
137 138
   },
@@ -142,12 +143,12 @@ export default {
142 143
   },
143 144
   created() {
144 145
     this.getCommuniryList()
145
-    this.getByBannerId(this.$route.params.id)
146
-    this.listQuery = this.$route.params.listQuery
146
+    this.getByBannerId(this.$route.query.id)
147
+    this.listQuery = this.$route.query.listQuery
147 148
   },
148 149
   mounted() {
149 150
     window.addEventListener('beforeunload', e => {
150
-      this.$router.push({ name: 'banner-index', params: { listQuery: this.listQuery }})
151
+      this.$router.push({ name: 'banner-index', query: { listQuery: this.listQuery }})
151 152
     })
152 153
   },
153 154
   methods: {
@@ -181,7 +182,7 @@ export default {
181 182
     },
182 183
     dialogForm(isVaule) {
183 184
       if (isVaule === '0') {
184
-        this.$router.push({ name: 'banner-index', params: { listQuery: this.listQuery }})
185
+        this.$router.push({ name: 'banner-index', query: { listQuery: this.listQuery }})
185 186
       } else {
186 187
         this.updateData()
187 188
       }
@@ -196,7 +197,7 @@ export default {
196 197
       }
197 198
     },
198 199
     updateBanner() {
199
-      this.$router.push({ name: 'banner-edi', params: { id: this.form.id, listQuery: this.listQuery }})
200
+      this.$router.push({ name: 'banner-edi', query: { id: this.form.id, listQuery: this.listQuery }})
200 201
     },
201 202
     updateData() {
202 203
       this.$refs['form'].validate((valid) => {
@@ -207,7 +208,7 @@ export default {
207 208
                 message: res.message,
208 209
                 type: 'success'
209 210
               })
210
-              this.$router.push({ name: 'banner-index', params: { listQuery: this.listQuery }})
211
+              this.$router.push({ name: 'banner-index', query: { listQuery: this.listQuery }})
211 212
             } else {
212 213
               this.$message({
213 214
                 message: res.message,

+ 1
- 1
VUECODE/smart-operate-manage/src/views/community/communityTable.vue Dosyayı Görüntüle

@@ -44,7 +44,7 @@
44 44
           <span>{{ scope.row.propertyNum }}</span>
45 45
         </template>
46 46
       </el-table-column>
47
-      <el-table-column label="已核主数量" align="center">
47
+      <el-table-column label="已核主数量" align="center">
48 48
         <template slot-scope="scope">
49 49
           <span>{{ scope.row.verifyOwnerNum }}</span>
50 50
         </template>