Bläddra i källkod

Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/estateagents into v3.5.1

胡轶钦 5 år sedan
förälder
incheckning
494ba1933b

+ 7
- 3
src/main/java/com/huiju/estateagents/activity/controller/ActivityController.java Visa fil

1
 package com.huiju.estateagents.activity.controller;
1
 package com.huiju.estateagents.activity.controller;
2
 
2
 
3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
 import com.huiju.estateagents.activity.service.ActivityServiceI;
5
 import com.huiju.estateagents.activity.service.ActivityServiceI;
5
 import com.huiju.estateagents.base.BaseController;
6
 import com.huiju.estateagents.base.BaseController;
6
 import com.huiju.estateagents.base.ResponseBean;
7
 import com.huiju.estateagents.base.ResponseBean;
66
 		queryWrapper.eq("customer_id",customerId);
67
 		queryWrapper.eq("customer_id",customerId);
67
 		TaRecommendCustomer taRecommendCustomer = taRecommendCustomerService.getOne(queryWrapper);
68
 		TaRecommendCustomer taRecommendCustomer = taRecommendCustomerService.getOne(queryWrapper);
68
 		if (null == taRecommendCustomer){
69
 		if (null == taRecommendCustomer){
69
-			return ResponseBean.error("验证人员信息失败",ResponseBean.ERROR_UNAVAILABLE);
70
+			//验证人员信息失败小程序端希望是空数组对象
71
+			return ResponseBean.success(new Page(pageNumber,pageSize));
70
 		}
72
 		}
71
 		if (null == taRecommendCustomer.getPersonId()){
73
 		if (null == taRecommendCustomer.getPersonId()){
72
-			return ResponseBean.error("验证人员信息失败",ResponseBean.ERROR_UNAVAILABLE);
74
+			//验证人员信息失败小程序端希望是空数组对象
75
+			return ResponseBean.success(new Page(pageNumber,pageSize));
73
 		}
76
 		}
74
 		
77
 		
75
 		QueryWrapper<TaPerson> taPersonQueryWrapper = new QueryWrapper<>();
78
 		QueryWrapper<TaPerson> taPersonQueryWrapper = new QueryWrapper<>();
76
 		taPersonQueryWrapper.eq("person_id",taRecommendCustomer.getPersonId());
79
 		taPersonQueryWrapper.eq("person_id",taRecommendCustomer.getPersonId());
77
 		TaPerson person = taPersonService.getOne(taPersonQueryWrapper);
80
 		TaPerson person = taPersonService.getOne(taPersonQueryWrapper);
78
 		if (null == person){
81
 		if (null == person){
79
-			return ResponseBean.error("验证人员信息失败",ResponseBean.ERROR_UNAVAILABLE);
82
+			//验证人员信息失败小程序端希望是空数组对象
83
+			return ResponseBean.success(new Page(pageNumber,pageSize));
80
 		}
84
 		}
81
 		responseBean = activityService.getCustomerActivityList(pageNumber,pageSize,orgId,person);
85
 		responseBean = activityService.getCustomerActivityList(pageNumber,pageSize,orgId,person);
82
 		return responseBean;
86
 		return responseBean;

+ 1
- 0
src/main/java/com/huiju/estateagents/controller/TaPersonVisitRecordController.java Visa fil

217
             IPage<TaPersonVisitRecord> result = iTaPersonVisitRecordService.getPersonVisitRecordList(pg, customerId);
217
             IPage<TaPersonVisitRecord> result = iTaPersonVisitRecordService.getPersonVisitRecordList(pg, customerId);
218
             return ResponseBean.success(result);
218
             return ResponseBean.success(result);
219
         }catch (Exception e){
219
         }catch (Exception e){
220
+            e.printStackTrace();
220
             logger.error("taPersonVisitRecordList -=- {}",e.toString());
221
             logger.error("taPersonVisitRecordList -=- {}",e.toString());
221
             return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
222
             return ResponseBean.error(e.getMessage(),ResponseBean.ERROR_UNAVAILABLE);
222
         }
223
         }

+ 5
- 0
src/main/java/com/huiju/estateagents/entity/TaBuildingDynamic.java Visa fil

205
 
205
 
206
     private String qrCode;
206
     private String qrCode;
207
 
207
 
208
+    /**
209
+     * 活动主图2 用于首页底部活动轮播
210
+     */
211
+    private  String bannerListImg;
212
+
208
     @TableField(exist = false)
213
     @TableField(exist = false)
209
     private List<TaPoster> posters;
214
     private List<TaPoster> posters;
210
 
215
 

+ 4
- 0
src/main/java/com/huiju/estateagents/service/impl/TaBuildingDynamicServiceImpl.java Visa fil

241
             responseBean.addError("当前报名人数已满");
241
             responseBean.addError("当前报名人数已满");
242
             return responseBean;
242
             return responseBean;
243
         }
243
         }
244
+        if(null != buildingDynamic.getEnlistStart() && buildingDynamic.getEnlistStart().isAfter(LocalDateTime.now())){
245
+            responseBean.addError("当前活动未开始报名");
246
+            return responseBean;
247
+        }
244
         if(null != buildingDynamic.getEnlistEnd() && buildingDynamic.getEnlistEnd().isBefore(LocalDateTime.now())){
248
         if(null != buildingDynamic.getEnlistEnd() && buildingDynamic.getEnlistEnd().isBefore(LocalDateTime.now())){
245
             responseBean.addError("当前活动已结束报名");
249
             responseBean.addError("当前活动已结束报名");
246
             return responseBean;
250
             return responseBean;

+ 2
- 0
src/main/java/com/huiju/estateagents/service/impl/TaBuildingServiceImpl.java Visa fil

214
         QueryWrapper<TaBuildingApartment> AppointmentQueryWrapper = new QueryWrapper<>();
214
         QueryWrapper<TaBuildingApartment> AppointmentQueryWrapper = new QueryWrapper<>();
215
         AppointmentQueryWrapper.eq("building_id", id);
215
         AppointmentQueryWrapper.eq("building_id", id);
216
         AppointmentQueryWrapper.eq("status", 1);
216
         AppointmentQueryWrapper.eq("status", 1);
217
+        AppointmentQueryWrapper.orderByDesc("create_date");
217
         List<TaBuildingApartment> appoint = taBuildingApartmentMapper.selectList(AppointmentQueryWrapper);
218
         List<TaBuildingApartment> appoint = taBuildingApartmentMapper.selectList(AppointmentQueryWrapper);
218
         for (TaBuildingApartment apar:appoint) {
219
         for (TaBuildingApartment apar:appoint) {
219
             List<TaBuildingImg> imgs = taBuildingImgMapper.getBuildingImgByApartment(apar.getApartmentId());
220
             List<TaBuildingImg> imgs = taBuildingImgMapper.getBuildingImgByApartment(apar.getApartmentId());
733
                 QueryWrapper<TaBuildingImg> buildingImgQueryWrapper = new QueryWrapper<>();
734
                 QueryWrapper<TaBuildingImg> buildingImgQueryWrapper = new QueryWrapper<>();
734
                 buildingImgQueryWrapper.eq("img_id", img.getImgId());
735
                 buildingImgQueryWrapper.eq("img_id", img.getImgId());
735
                 buildingImgQueryWrapper.eq("img_type", CommConstant.BUILDING_IMG_APARMENT);
736
                 buildingImgQueryWrapper.eq("img_type", CommConstant.BUILDING_IMG_APARMENT);
737
+                buildingImgQueryWrapper.orderByAsc("order_no");
736
                 return taBuildingImgMapper.selectOne(buildingImgQueryWrapper);
738
                 return taBuildingImgMapper.selectOne(buildingImgQueryWrapper);
737
             }).collect(Collectors.toList());
739
             }).collect(Collectors.toList());
738
 
740
 

+ 3
- 3
src/main/java/com/huiju/estateagents/service/impl/TaPersonVisitRecordServiceImpl.java Visa fil

60
 		List<TaPersonVisitRecord> records = result.getRecords();
60
 		List<TaPersonVisitRecord> records = result.getRecords();
61
 		records.forEach(e -> {
61
 		records.forEach(e -> {
62
 			//获取活动标题
62
 			//获取活动标题
63
-			if (e.getEventType().equals("activity") && null != e.getTargetId()){
63
+			if ("activity".equals(e.getEventType()) && null != e.getTargetId()){
64
 				TaBuildingDynamic taBuildingDynamic = taBuildingDynamicMapper.selectById(e.getTargetId());
64
 				TaBuildingDynamic taBuildingDynamic = taBuildingDynamicMapper.selectById(e.getTargetId());
65
 				if (null != taBuildingDynamic){
65
 				if (null != taBuildingDynamic){
66
 					e.setActivityName(taBuildingDynamic.getTitle());
66
 					e.setActivityName(taBuildingDynamic.getTitle());
68
 				
68
 				
69
 			}
69
 			}
70
 			//获取拼团标题
70
 			//获取拼团标题
71
-			if (e.getEventType().equals("group") && null != e.getTargetId()){
71
+			if ("group".equals(e.getEventType()) && null != e.getTargetId()){
72
 				TaShareActivity taShareActivity = taShareActivityMapper.selectById(e.getTargetId());
72
 				TaShareActivity taShareActivity = taShareActivityMapper.selectById(e.getTargetId());
73
 				if (null != taShareActivity){
73
 				if (null != taShareActivity){
74
 					e.setActivityName(taShareActivity.getActivityName());
74
 					e.setActivityName(taShareActivity.getActivityName());
75
 				}
75
 				}
76
 			}
76
 			}
77
 			//获取助力标题
77
 			//获取助力标题
78
-			if (e.getEventType().equals("help") && null != e.getTargetId()){
78
+			if ("help".equals(e.getEventType()) && null != e.getTargetId()){
79
 				HelpActivity helpActivity = helpActivityMapper.selectById(e.getTargetId());
79
 				HelpActivity helpActivity = helpActivityMapper.selectById(e.getTargetId());
80
 				if (null != helpActivity){
80
 				if (null != helpActivity){
81
 					e.setActivityName(helpActivity.getTitle());
81
 					e.setActivityName(helpActivity.getTitle());

+ 1
- 0
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java Visa fil

276
 //        taRecommendCustomer.setDescribe(params.getString("describe"));
276
 //        taRecommendCustomer.setDescribe(params.getString("describe"));
277
         taRecommendCustomer.setRealtyConsultant(params.getString("realtyConsultant"));
277
         taRecommendCustomer.setRealtyConsultant(params.getString("realtyConsultant"));
278
         taRecommendCustomer.setBuildingId(params.getString("buildingId"));
278
         taRecommendCustomer.setBuildingId(params.getString("buildingId"));
279
+        taRecommendCustomer.setIntention(params.getString("intention"));
279
         taRecommendCustomer.setReportRecommendStatus(CommConstant.VERIFY_AGREE);
280
         taRecommendCustomer.setReportRecommendStatus(CommConstant.VERIFY_AGREE);
280
         taRecommendCustomer.setCreateDate(LocalDateTime.now());
281
         taRecommendCustomer.setCreateDate(LocalDateTime.now());
281
         taRecommendCustomer.setReportDate(LocalDateTime.now());
282
         taRecommendCustomer.setReportDate(LocalDateTime.now());

+ 1
- 1
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerStatisticDailyServiceImpl.java Visa fil

104
 			//合并数据
104
 			//合并数据
105
 			list.forEach(l -> {
105
 			list.forEach(l -> {
106
 				if (newDate.equals(l.getDay())){
106
 				if (newDate.equals(l.getDay())){
107
-					tsCustomerStatisticDaily.setCustomerNum(l.getCustomerNum());
107
+					tsCustomerStatisticDaily.setCustomerNum(tsCustomerStatisticDaily.getCustomerNum() + l.getCustomerNum());
108
 				}
108
 				}
109
 			});
109
 			});
110
 			newList.add(tsCustomerStatisticDaily);
110
 			newList.add(tsCustomerStatisticDaily);

+ 1
- 1
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerStatisticMonthlyServiceImpl.java Visa fil

101
 			tsCustomerStatisticMonthly.setRealtyConsultant(personId);
101
 			tsCustomerStatisticMonthly.setRealtyConsultant(personId);
102
 			list.forEach(l -> {
102
 			list.forEach(l -> {
103
 				if (newDate.equals(l.getMonth())){
103
 				if (newDate.equals(l.getMonth())){
104
-					tsCustomerStatisticMonthly.setCustomerNum(l.getCustomerNum());
104
+					tsCustomerStatisticMonthly.setCustomerNum(tsCustomerStatisticMonthly.getCustomerNum() + l.getCustomerNum());
105
 				}
105
 				}
106
 			});
106
 			});
107
 			newList.add(tsCustomerStatisticMonthly);
107
 			newList.add(tsCustomerStatisticMonthly);