顾绍勇 5 vuotta sitten
vanhempi
commit
4a9db68794

+ 13
- 5
src/main/java/com/huiju/estateagents/controller/TaPreselectionRecordController.java Näytä tiedosto

@@ -187,11 +187,17 @@ public class TaPreselectionRecordController extends BaseController {
187 187
     /**
188 188
      * 获取当前用户预选记录
189 189
      *
190
-     * @param pageNumber 页码
191
-     * @param pageSize   分页大小
192
-     * @param personId   用户ID
190
+     * @param buildingId
191
+     * @param salesBatchId
192
+     * @param apartmentId
193
+     * @param houseLockingStatus
194
+     * @param customerLocked
195
+     * @param pageNumber
196
+     * @param pageSize
197
+     * @param personId
198
+     * @param source             来源,raiseChoose 为认筹添加房源来源
199
+     * @param request
193 200
      * @return
194
-     * @author gushaoyong
195 201
      */
196 202
     @RequestMapping(value = "/wx/listPreselectionRecord", method = RequestMethod.GET)
197 203
     public ResponseBean listPreselectionRecord(@RequestParam(value = "buildingId", required = false) String buildingId,
@@ -202,11 +208,13 @@ public class TaPreselectionRecordController extends BaseController {
202 208
                                                @RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
203 209
                                                @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
204 210
                                                @RequestParam("personId") String personId,
211
+                                               @RequestParam("source") String source,
205 212
                                                HttpServletRequest request) {
206 213
         ResponseBean responseBean = new ResponseBean();
207 214
         Integer orgId = getOrgId(request);
208 215
         try {
209
-            responseBean.addSuccess(iTaPreselectionRecordService.listPreselectionRecord(pageNumber, pageSize, orgId, personId, buildingId, salesBatchId, apartmentId, houseLockingStatus, customerLocked));
216
+            responseBean.addSuccess(iTaPreselectionRecordService.listPreselectionRecord(pageNumber, pageSize, orgId, personId, buildingId,
217
+                    salesBatchId, apartmentId, houseLockingStatus, customerLocked, source));
210 218
         } catch (Exception e) {
211 219
             logger.error("listPreselectionRecord -=- {}", e);
212 220
             responseBean.addError(e.getMessage());

+ 2
- 1
src/main/java/com/huiju/estateagents/mapper/TaPreselectionRecordMapper.java Näytä tiedosto

@@ -34,7 +34,8 @@ public interface TaPreselectionRecordMapper extends BaseMapper<TaPreselectionRec
34 34
     IPage<TaPreselectionRecordPO> listPreselectionRecord(IPage<TaPreselectionRecordPO> iPage,
35 35
                                                          @Param("orgId") Integer orgId,
36 36
                                                          @Param("personId") String personId, @Param("buildingId") String buildingId, @Param("salesBatchId") Integer salesBatchId,
37
-                                                         @Param("apartmentId") String apartmentId, @Param("houseLockingStatus") String houseLockingStatus, @Param("customerLocked") String customerLocked);
37
+                                                         @Param("apartmentId") String apartmentId, @Param("houseLockingStatus") String houseLockingStatus,
38
+                                                         @Param("customerLocked") String customerLocked, @Param("source") String source);
38 39
 
39 40
     /**
40 41
      * 根据房源ID和用户ID获取预选记录

+ 3
- 1
src/main/java/com/huiju/estateagents/service/ITaPreselectionRecordService.java Näytä tiedosto

@@ -28,7 +28,9 @@ public interface ITaPreselectionRecordService extends IService<TaPreselectionRec
28 28
      * @param personId
29 29
      * @return
30 30
      */
31
-    IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId, String buildingId, Integer salesBatchId, String apartmentId, String houseLockingStatus, String customerLocked);
31
+    IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId, String buildingId,
32
+                                                         Integer salesBatchId, String apartmentId, String houseLockingStatus, String customerLocked,
33
+                                                         String source);
32 34
 
33 35
     /**
34 36
      * 添加预选记录预选

+ 5
- 3
src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java Näytä tiedosto

@@ -68,11 +68,13 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
68 68
 
69 69
 
70 70
     @Override
71
-    public IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId, String buildingId, Integer salesBatchId, String apartmentId, String houseLockingStatus, String customerLocked) {
72
-        logger.info("listPreselectionRecord 接收参数:pageNum:{},pageSize:{},orgId:{},personId:{}", pageNum, pageSize, orgId, personId);
71
+    public IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId, String buildingId,
72
+                                                                Integer salesBatchId, String apartmentId, String houseLockingStatus, String customerLocked,
73
+                                                                String source) {
74
+        logger.info("listPreselectionRecord 接收参数:pageNum:{},pageSize:{},orgId:{},personId:{},source:{}", pageNum, pageSize, orgId, personId, source);
73 75
 
74 76
         IPage<TaPreselectionRecordPO> iPage = new Page<>(pageNum, pageSize);
75
-        iPage = taPreselectionRecordMapper.listPreselectionRecord(iPage, orgId, personId, buildingId, salesBatchId, apartmentId, houseLockingStatus, customerLocked);
77
+        iPage = taPreselectionRecordMapper.listPreselectionRecord(iPage, orgId, personId, buildingId, salesBatchId, apartmentId, houseLockingStatus, customerLocked, source);
76 78
 
77 79
         List<TaPreselectionRecordPO> poList = iPage.getRecords();
78 80
         if (CollectionUtils.isEmpty(poList)) {

+ 1
- 1
src/main/resources/mapper/TaHousingResourcesMapper.xml Näytä tiedosto

@@ -47,7 +47,7 @@
47 47
         <if test = "source == 'raiseChoose'">
48 48
             AND ( t6.`status` != 0 OR t6.`status` IS NULL )
49 49
             AND (t.house_locking_status  != 'locked' OR t.house_locking_status IS NULL)
50
-            AND t7.raise_start_time &lt;= now( ) AND t7.raise_end_time &gt;= now()
50
+            AND t7.raise_start_time &lt;= now() AND t7.raise_end_time &gt;= now()
51 51
             <if test="personId != null and personId != ''">
52 52
                 AND (t6.person_id != #{personId} OR t6.person_id IS NULL)
53 53
             </if>

+ 6
- 0
src/main/resources/mapper/TaPreselectionRecordMapper.xml Näytä tiedosto

@@ -20,9 +20,15 @@
20 20
             ta_preselection_record t
21 21
         LEFT JOIN ta_housing_resources t2 ON t.house_id = t2.house_id
22 22
         LEFT JOIN ta_sales_batch t3 ON t.sales_batch_id = t3.sales_batch_id
23
+        <if test = "source == 'raiseChoose'">
24
+            LEFT JOIN ta_raise t4 ON t3.sales_batch_id = t4.sales_batch_id
25
+        </if>
23 26
         WHERE
24 27
             t.person_id = #{personId}
25 28
             AND t.org_id = #{orgId}
29
+        <if test="source == 'raiseChoose'">
30
+            AND t4.raise_start_time &lt;= now( ) AND t4.raise_end_time &gt;= now( )
31
+        </if>
26 32
         <if test="customerLocked == 'mine'">
27 33
             AND t2.house_locking_person = #{personId}
28 34
         </if>