Просмотр исходного кода

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

傅行帆 5 лет назад
Родитель
Сommit
26109d0b50

+ 8
- 4
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java Просмотреть файл

474
 
474
 
475
 
475
 
476
     @GetMapping(value = "/admin/customer/recommend/get/{id}")
476
     @GetMapping(value = "/admin/customer/recommend/get/{id}")
477
-    public ResponseBean getCustomerDetail(@PathVariable String id) {
477
+    public ResponseBean getCustomerDetail(@PathVariable String id,
478
+                                          @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
479
+                                          @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) {
478
         ResponseBean responseBean = new ResponseBean();
480
         ResponseBean responseBean = new ResponseBean();
479
         try {
481
         try {
480
-            responseBean.addSuccess(taRecommendCustomerService.getCustomerDetail(id));
482
+            responseBean.addSuccess(taRecommendCustomerService.getCustomerDetail(id,pageNumber,pageSize));
481
         }catch (Exception e){
483
         }catch (Exception e){
482
             e.printStackTrace();
484
             e.printStackTrace();
483
             responseBean.addError(e.getMessage());
485
             responseBean.addError(e.getMessage());
486
     }
488
     }
487
 
489
 
488
     @GetMapping(value = "/admin/customer/recommend/public/get/{id}")
490
     @GetMapping(value = "/admin/customer/recommend/public/get/{id}")
489
-    public ResponseBean getPublicCustomerDetail(@PathVariable String id) {
491
+    public ResponseBean getPublicCustomerDetail(@PathVariable String id,
492
+                                                @RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
493
+                                                @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) {
490
         ResponseBean responseBean = new ResponseBean();
494
         ResponseBean responseBean = new ResponseBean();
491
         try {
495
         try {
492
-            responseBean.addSuccess(taRecommendCustomerService.getPublicCustomerDetail(id));
496
+            responseBean.addSuccess(taRecommendCustomerService.getPublicCustomerDetail(id,pageNumber,pageSize));
493
         }catch (Exception e){
497
         }catch (Exception e){
494
             e.printStackTrace();
498
             e.printStackTrace();
495
             responseBean.addError(e.getMessage());
499
             responseBean.addError(e.getMessage());

+ 7
- 2
src/main/java/com/huiju/estateagents/entity/HelpActivity.java Просмотреть файл

107
     private String img;
107
     private String img;
108
 
108
 
109
     /**
109
     /**
110
-     * 列表
110
+     * 助力封面图1,用于活动列表
111
      */
111
      */
112
-    private String detailImg;
112
+    private String listImg;
113
+
114
+    /**
115
+     * 助力封面图2,用于首页底部活动轮播
116
+     */
117
+    private String bannerListImg;
113
 
118
 
114
     /**
119
     /**
115
      * 城市ID
120
      * 城市ID

+ 1
- 1
src/main/java/com/huiju/estateagents/entity/TaBuildingDynamic.java Просмотреть файл

47
     /**
47
     /**
48
      * 首页详情图片URL
48
      * 首页详情图片URL
49
      */
49
      */
50
-    private String detailImgUrl;
50
+    private String listImgUrl;
51
 
51
 
52
     /**
52
     /**
53
      * 标题
53
      * 标题

+ 5
- 0
src/main/java/com/huiju/estateagents/entity/TaGoods.java Просмотреть файл

57
      */
57
      */
58
     private String imgUrl;
58
     private String imgUrl;
59
 
59
 
60
+    /**
61
+     * 商品详情图
62
+     */
63
+    private String detailImgUrl;
64
+
60
     /**
65
     /**
61
      * 商品总数
66
      * 商品总数
62
      */
67
      */

+ 2
- 1
src/main/java/com/huiju/estateagents/entity/TaPerson.java Просмотреть файл

7
 import com.baomidou.mybatisplus.annotation.IdType;
7
 import com.baomidou.mybatisplus.annotation.IdType;
8
 import com.baomidou.mybatisplus.annotation.TableField;
8
 import com.baomidou.mybatisplus.annotation.TableField;
9
 import com.baomidou.mybatisplus.annotation.TableId;
9
 import com.baomidou.mybatisplus.annotation.TableId;
10
+import com.baomidou.mybatisplus.core.metadata.IPage;
10
 import lombok.Data;
11
 import lombok.Data;
11
 import lombok.EqualsAndHashCode;
12
 import lombok.EqualsAndHashCode;
12
 import lombok.experimental.Accessors;
13
 import lombok.experimental.Accessors;
187
      * 访问记录
188
      * 访问记录
188
      */
189
      */
189
     @TableField(exist = false)
190
     @TableField(exist = false)
190
-    private List<TaPersonVisitRecord> visitRecords;
191
+    private IPage<TaPersonVisitRecord> visitRecords;
191
 
192
 
192
     @TableField(exist = false)
193
     @TableField(exist = false)
193
     private List<String> projects;
194
     private List<String> projects;

+ 2
- 1
src/main/java/com/huiju/estateagents/entity/TaRecommendCustomer.java Просмотреть файл

10
 import com.baomidou.mybatisplus.annotation.IdType;
10
 import com.baomidou.mybatisplus.annotation.IdType;
11
 import com.baomidou.mybatisplus.annotation.TableField;
11
 import com.baomidou.mybatisplus.annotation.TableField;
12
 import com.baomidou.mybatisplus.annotation.TableId;
12
 import com.baomidou.mybatisplus.annotation.TableId;
13
+import com.baomidou.mybatisplus.core.metadata.IPage;
13
 import com.huiju.estateagents.center.taUser.entity.TaUser;
14
 import com.huiju.estateagents.center.taUser.entity.TaUser;
14
 import lombok.Data;
15
 import lombok.Data;
15
 import lombok.EqualsAndHashCode;
16
 import lombok.EqualsAndHashCode;
154
     private Integer orgId;
155
     private Integer orgId;
155
 
156
 
156
     @TableField(exist = false)
157
     @TableField(exist = false)
157
-    private List<TaPersonVisitRecord> visitRecords;
158
+    private IPage<TaPersonVisitRecord> visitRecords;
158
 
159
 
159
     @TableField(exist = false)
160
     @TableField(exist = false)
160
     private List<String> projects;
161
     private List<String> projects;

+ 7
- 2
src/main/java/com/huiju/estateagents/entity/TaShareActivity.java Просмотреть файл

51
     private String mainImg;
51
     private String mainImg;
52
 
52
 
53
     /**
53
     /**
54
-     * 活动列表
54
+     * 拼团封面图1,用于活动列表
55
      */
55
      */
56
-    private String detailImg;
56
+    private String listImg;
57
+
58
+    /**
59
+     * 拼团封面图2,用于首页底部活动轮播
60
+     */
61
+    private String bannerListImg;
57
 
62
 
58
     /**
63
     /**
59
      * 活动开始时间
64
      * 活动开始时间

+ 1
- 1
src/main/java/com/huiju/estateagents/mapper/TaPersonVisitRecordMapper.java Просмотреть файл

24
 @Mapper
24
 @Mapper
25
 public interface TaPersonVisitRecordMapper extends BaseMapper<TaPersonVisitRecord> {
25
 public interface TaPersonVisitRecordMapper extends BaseMapper<TaPersonVisitRecord> {
26
 
26
 
27
-    List<TaPersonVisitRecord> visitRecordByPersonId(@Param("personId") String personId);
27
+    IPage<TaPersonVisitRecord> visitRecordByPersonId(IPage<TaPersonVisitRecord> page,@Param("personId") String personId);
28
 
28
 
29
     /**
29
     /**
30
      * 行为分析的 列表
30
      * 行为分析的 列表

+ 2
- 2
src/main/java/com/huiju/estateagents/service/ITaRecommendCustomerService.java Просмотреть файл

42
     IPage<TaPerson> getIndependentAgents(int pageNumber, int pageSize,String name,String tel, Integer orgId);
42
     IPage<TaPerson> getIndependentAgents(int pageNumber, int pageSize,String name,String tel, Integer orgId);
43
 
43
 
44
 
44
 
45
-    TaRecommendCustomer getCustomerDetail(String customerId);
45
+    TaRecommendCustomer getCustomerDetail(String customerId,int pageNumber, int pageSize);
46
 
46
 
47
-    TaPerson getPublicCustomerDetail(String personId);
47
+    TaPerson getPublicCustomerDetail(String personId,int pageNumber, int pageSize);
48
 
48
 
49
     TaRecommendCustomer getCustomerById(String customerId);
49
     TaRecommendCustomer getCustomerById(String customerId);
50
 
50
 

+ 2
- 0
src/main/java/com/huiju/estateagents/service/impl/TaBuildingDynamicServiceImpl.java Просмотреть файл

173
 //        buildingDynamic.setDynamicId(idGen.nextId()+"");
173
 //        buildingDynamic.setDynamicId(idGen.nextId()+"");
174
         buildingDynamic.setBuildingId(map.get("buildingId")+"");
174
         buildingDynamic.setBuildingId(map.get("buildingId")+"");
175
         buildingDynamic.setImgUrl((String) map.get("imgUrl"));
175
         buildingDynamic.setImgUrl((String) map.get("imgUrl"));
176
+        buildingDynamic.setListImgUrl((String) map.get("listImgUrl"));
176
         buildingDynamic.setDesc(map.get("desc")+"");
177
         buildingDynamic.setDesc(map.get("desc")+"");
177
         buildingDynamic.setUrl(map.get("url")+"");
178
         buildingDynamic.setUrl(map.get("url")+"");
178
         buildingDynamic.setTitle(map.get("title")+"");
179
         buildingDynamic.setTitle(map.get("title")+"");
207
         buildingDynamic.setDynamicId(map.get("dynamicId")+"");
208
         buildingDynamic.setDynamicId(map.get("dynamicId")+"");
208
         buildingDynamic.setBuildingId(map.get("buildingId")+"");
209
         buildingDynamic.setBuildingId(map.get("buildingId")+"");
209
         buildingDynamic.setImgUrl((String) map.get("imgUrl"));
210
         buildingDynamic.setImgUrl((String) map.get("imgUrl"));
211
+        buildingDynamic.setListImgUrl((String) map.get("listImgUrl"));
210
         buildingDynamic.setDesc(map.get("desc")+"");
212
         buildingDynamic.setDesc(map.get("desc")+"");
211
         buildingDynamic.setUrl(map.get("url")+"");
213
         buildingDynamic.setUrl(map.get("url")+"");
212
         buildingDynamic.setTitle(map.get("title")+"");
214
         buildingDynamic.setTitle(map.get("title")+"");

+ 9
- 10
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java Просмотреть файл

11
 import com.huiju.estateagents.common.CommConstant;
11
 import com.huiju.estateagents.common.CommConstant;
12
 import com.huiju.estateagents.common.DateUtils;
12
 import com.huiju.estateagents.common.DateUtils;
13
 import com.huiju.estateagents.common.StringUtils;
13
 import com.huiju.estateagents.common.StringUtils;
14
-import com.huiju.estateagents.entity.TaBuilding;
15
-import com.huiju.estateagents.entity.TaPerson;
16
-import com.huiju.estateagents.entity.TaRecommendCustomer;
17
-import com.huiju.estateagents.entity.TdCity;
14
+import com.huiju.estateagents.entity.*;
18
 import com.huiju.estateagents.excel.AgentsRecommendCustomer;
15
 import com.huiju.estateagents.excel.AgentsRecommendCustomer;
19
 import com.huiju.estateagents.excel.ExcelRecommendCustomer;
16
 import com.huiju.estateagents.excel.ExcelRecommendCustomer;
20
 import com.huiju.estateagents.excel.ReporRecommendCustomer;
17
 import com.huiju.estateagents.excel.ReporRecommendCustomer;
438
 
435
 
439
 
436
 
440
     @Override
437
     @Override
441
-    public TaRecommendCustomer getCustomerDetail(String customerId){
438
+    public TaRecommendCustomer getCustomerDetail(String customerId,int pageNumber, int pageSize){
442
         String personId = taRecommendCustomerMapper.getCustomerById(customerId).getPersonId();
439
         String personId = taRecommendCustomerMapper.getCustomerById(customerId).getPersonId();
443
         TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.getCustomerDetail(customerId,personId);
440
         TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.getCustomerDetail(customerId,personId);
444
         TaPerson person = taPersonMapper.selectById(personId);
441
         TaPerson person = taPersonMapper.selectById(personId);
445
         if(!StringUtils.isEmpty(personId)){
442
         if(!StringUtils.isEmpty(personId)){
446
-            taRecommendCustomer.setVisitRecords(taPersonVisitRecordMapper.visitRecordByPersonId(personId));
447
-            taRecommendCustomer.setVisitTimes(taPersonVisitRecordMapper.visitRecordByPersonId(personId).size());
443
+            IPage<TaPersonVisitRecord>page = new Page<>(pageNumber,pageSize);
444
+            taRecommendCustomer.setVisitRecords(taPersonVisitRecordMapper.visitRecordByPersonId(page,personId));
445
+            taRecommendCustomer.setVisitTimes(taPersonVisitRecordMapper.visitRecordByPersonId(page,personId).getRecords().size());
448
             taRecommendCustomer.setIntentions(taRecommendCustomerMapper.getCustomerIntentions(personId));
446
             taRecommendCustomer.setIntentions(taRecommendCustomerMapper.getCustomerIntentions(personId));
449
             Map<String,String>geoInfo = new HashMap<>();
447
             Map<String,String>geoInfo = new HashMap<>();
450
             geoInfo.put("provience",person.getProvince());
448
             geoInfo.put("provience",person.getProvince());
472
     }
470
     }
473
 
471
 
474
     @Override
472
     @Override
475
-    public TaPerson getPublicCustomerDetail(String personId){
473
+    public TaPerson getPublicCustomerDetail(String personId,int pageNumber, int pageSize){
476
         TaPerson taRecommendCustomer = taPersonMapper.getById(personId);
474
         TaPerson taRecommendCustomer = taPersonMapper.getById(personId);
477
         if(!StringUtils.isEmpty(personId)){
475
         if(!StringUtils.isEmpty(personId)){
478
-            taRecommendCustomer.setVisitRecords(taPersonVisitRecordMapper.visitRecordByPersonId(personId));
479
-            taRecommendCustomer.setVisitTimes(taPersonVisitRecordMapper.visitRecordByPersonId(personId).size());
476
+            IPage<TaPersonVisitRecord>page = new Page<>(pageNumber,pageSize);
477
+            taRecommendCustomer.setVisitRecords(taPersonVisitRecordMapper.visitRecordByPersonId(page,personId));
478
+            taRecommendCustomer.setVisitTimes(taPersonVisitRecordMapper.visitRecordByPersonId(page,personId).getRecords().size());
480
             taRecommendCustomer.setIntentions(taRecommendCustomerMapper.getCustomerIntentions(personId));
479
             taRecommendCustomer.setIntentions(taRecommendCustomerMapper.getCustomerIntentions(personId));
481
         }
480
         }
482
         return taRecommendCustomer;
481
         return taRecommendCustomer;

+ 1
- 1
src/main/resources/mapper/TaBuildingDynamicMapper.xml Просмотреть файл

99
         update ta_building_dynamic
99
         update ta_building_dynamic
100
         set activity_status = 1
100
         set activity_status = 1
101
         where
101
         where
102
-        #{curTime} &lt;= enlist_start  and activity_status != 2
102
+        NOW() &lt;= enlist_start  and activity_status != 2
103
     </update>
103
     </update>
104
 
104
 
105
     <update id="updateUnStartActivity">
105
     <update id="updateUnStartActivity">

+ 1
- 1
src/main/resources/mapper/TaShareActivityMapper.xml Просмотреть файл

19
       update ta_share_activity
19
       update ta_share_activity
20
       set activity_status = 1
20
       set activity_status = 1
21
       where
21
       where
22
-      #{curTime} &lt; start_time and activity_status != 2
22
+      NOW() &lt; start_time and activity_status != 2
23
     </update>
23
     </update>
24
 
24
 
25
     <update id="updateUnStartGroupActivity">
25
     <update id="updateUnStartGroupActivity">