瀏覽代碼

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

傅行帆 5 年之前
父節點
當前提交
ece4ea79bb

+ 1
- 1
src/main/java/com/huiju/estateagents/bo/request/PresecretRecordRequestBO.java 查看文件

18
     /**
18
     /**
19
      * 房源ID
19
      * 房源ID
20
      */
20
      */
21
-    private String houseId;
21
+    private Integer houseId;
22
 
22
 
23
     /**
23
     /**
24
      * 期名
24
      * 期名

+ 19
- 19
src/main/java/com/huiju/estateagents/service/impl/TaRaiseRecordServiceImpl.java 查看文件

143
 //            lockedHouseResources(taHousingResources);
143
 //            lockedHouseResources(taHousingResources);
144
         }
144
         }
145
         //判断销售批次是否是发布状态和房源是否正常状态
145
         //判断销售批次是否是发布状态和房源是否正常状态
146
-        checkHouseStatus(taRaiseRecord,orgId, personId, taRaise);
146
+        checkHouseStatus(taRaiseRecord, orgId, personId, taRaise);
147
 
147
 
148
         //插入认筹单
148
         //插入认筹单
149
         saveRaiseRecord(taRaiseRecord, orgId, personId, taRaise);
149
         saveRaiseRecord(taRaiseRecord, orgId, personId, taRaise);
150
 
150
 
151
         //发送订阅消息
151
         //发送订阅消息
152
-        sendRaiseMsg(taRaiseRecord.getRaiseRecordId(),personId,"在线选房认筹通知","已提交认筹","点击详情查看认筹单","房源紧俏,请赶紧缴费",true);
152
+        sendRaiseMsg(taRaiseRecord.getRaiseRecordId(), personId, "在线选房认筹通知", "已提交认筹", "点击详情查看认筹单", "房源紧俏,请赶紧缴费", true);
153
 
153
 
154
         return taRaiseRecord;
154
         return taRaiseRecord;
155
     }
155
     }
158
     private void checkHouseStatus(TaRaiseRecord taRaiseRecord, Integer orgId, String personId, TaRaise taRaise) throws Exception {
158
     private void checkHouseStatus(TaRaiseRecord taRaiseRecord, Integer orgId, String personId, TaRaise taRaise) throws Exception {
159
         //销售批次是否有效状态
159
         //销售批次是否有效状态
160
         TaSalesBatch taSalesBatch = taSalesBatchMapper.selectById(taRaise.getSalesBatchId());
160
         TaSalesBatch taSalesBatch = taSalesBatchMapper.selectById(taRaise.getSalesBatchId());
161
-        if (!taSalesBatch.getStatus().equals(CommConstant.STATUS_NORMAL)){
161
+        if (!taSalesBatch.getStatus().equals(CommConstant.STATUS_NORMAL)) {
162
             throw new Exception("此销售批次已经取消发布!");
162
             throw new Exception("此销售批次已经取消发布!");
163
         }
163
         }
164
         //判断房源是否已经删除
164
         //判断房源是否已经删除
165
         List<Integer> houseList = taRaiseRecord.getHouseList();
165
         List<Integer> houseList = taRaiseRecord.getHouseList();
166
         for (Integer houseId : houseList) {
166
         for (Integer houseId : houseList) {
167
             TaHousingResources taHousingResources = taHousingResourcesMapper.selectById(houseId);
167
             TaHousingResources taHousingResources = taHousingResourcesMapper.selectById(houseId);
168
-            if (taHousingResources.getStatus() != CommConstant.STATUS_NORMAL){
168
+            if (taHousingResources.getStatus() != CommConstant.STATUS_NORMAL) {
169
                 throw new Exception("存在已经删除的房源!");
169
                 throw new Exception("存在已经删除的房源!");
170
             }
170
             }
171
             //判断我是否认筹过这些房源
171
             //判断我是否认筹过这些房源
172
             QueryWrapper<TaRaiseHouse> taRaiseHouseQueryWrapper = new QueryWrapper<>();
172
             QueryWrapper<TaRaiseHouse> taRaiseHouseQueryWrapper = new QueryWrapper<>();
173
-            taRaiseHouseQueryWrapper.eq("org_id",orgId);
174
-            taRaiseHouseQueryWrapper.eq("house_id",houseId);
175
-            taRaiseHouseQueryWrapper.eq("person_id",personId);
173
+            taRaiseHouseQueryWrapper.eq("org_id", orgId);
174
+            taRaiseHouseQueryWrapper.eq("house_id", houseId);
175
+            taRaiseHouseQueryWrapper.eq("person_id", personId);
176
             List<TaRaiseHouse> taRaiseHouses = taRaiseHouseMapper.selectList(taRaiseHouseQueryWrapper);
176
             List<TaRaiseHouse> taRaiseHouses = taRaiseHouseMapper.selectList(taRaiseHouseQueryWrapper);
177
-            if (taRaiseHouses.size() > 0){
177
+            if (taRaiseHouses.size() > 0) {
178
                 throw new Exception("存在已经认筹过的房源!");
178
                 throw new Exception("存在已经认筹过的房源!");
179
             }
179
             }
180
         }
180
         }
237
                 taRaiseHouse.setHouseLockingStatus(CommConstant.HOUSE_LOCKING_STATUS_LOCKED);
237
                 taRaiseHouse.setHouseLockingStatus(CommConstant.HOUSE_LOCKING_STATUS_LOCKED);
238
                 taRaiseHouse.setPersonId(personId);
238
                 taRaiseHouse.setPersonId(personId);
239
                 taRaiseHouse.setPersonName(taPerson.getName());
239
                 taRaiseHouse.setPersonName(taPerson.getName());
240
-            }else{
240
+            } else {
241
                 taRaiseHouse.setHouseLockingStatus(CommConstant.HOUSE_LOCKING_STATUS_UNLOCKED);
241
                 taRaiseHouse.setHouseLockingStatus(CommConstant.HOUSE_LOCKING_STATUS_UNLOCKED);
242
             }
242
             }
243
             taRaiseHouse.setOrgId(orgId);
243
             taRaiseHouse.setOrgId(orgId);
247
             //更新房源的实际热度
247
             //更新房源的实际热度
248
             TaHousingResources taHousingResources = taHousingResourcesMapper.selectById(e);
248
             TaHousingResources taHousingResources = taHousingResourcesMapper.selectById(e);
249
             Integer raiseRealHeat = taHousingResources.getRaiseRealHeat();
249
             Integer raiseRealHeat = taHousingResources.getRaiseRealHeat();
250
-            if (null == raiseRealHeat){
250
+            if (null == raiseRealHeat) {
251
                 raiseRealHeat = 0;
251
                 raiseRealHeat = 0;
252
             }
252
             }
253
-            taHousingResources.setRaiseRealHeat(raiseRealHeat+1);
253
+            taHousingResources.setRaiseRealHeat(raiseRealHeat + 1);
254
             taHousingResourcesMapper.updateById(taHousingResources);
254
             taHousingResourcesMapper.updateById(taHousingResources);
255
         });
255
         });
256
 
256
 
257
         //把idcard字断更新进person表
257
         //把idcard字断更新进person表
258
-        if (StringUtil.isEmpty(taPerson.getIdcard())){
258
+        if (StringUtil.isEmpty(taPerson.getIdcard())) {
259
             taPerson.setIdcard(taRaiseRecord.getIdcard());
259
             taPerson.setIdcard(taRaiseRecord.getIdcard());
260
             taPersonMapper.updateById(taPerson);
260
             taPersonMapper.updateById(taPerson);
261
         }
261
         }
276
     /**
276
     /**
277
      * 发送认筹订阅消息
277
      * 发送认筹订阅消息
278
      *
278
      *
279
-     * @param raiseRecordId  认筹单ID
280
-     * @param personId   用户ID
281
-     * @param title  审核类型
282
-     * @param result     审核结果
283
-     * @param remark 失败原因
284
-     * @param isSuccess  是否成功 true是(只有成功才发送短信)
279
+     * @param raiseRecordId 认筹单ID
280
+     * @param personId      用户ID
281
+     * @param title         审核类型
282
+     * @param result        审核结果
283
+     * @param remark        失败原因
284
+     * @param isSuccess     是否成功 true是(只有成功才发送短信)
285
      */
285
      */
286
     @Override
286
     @Override
287
-    public void sendRaiseMsg(Integer raiseRecordId, String personId, String title, String result, String reason,String remark, Boolean isSuccess) {
287
+    public void sendRaiseMsg(Integer raiseRecordId, String personId, String title, String result, String reason, String remark, Boolean isSuccess) {
288
         logger.info("sendSubscribeMsg 接收参数:houseId:{},checkType:{},result:{},reason:{}, remark:{}",
288
         logger.info("sendSubscribeMsg 接收参数:houseId:{},checkType:{},result:{},reason:{}, remark:{}",
289
                 raiseRecordId, title, result, reason, remark);
289
                 raiseRecordId, title, result, reason, remark);
290
 
290
 

+ 5
- 4
src/main/resources/mapper/TaPreselectionRecordMapper.xml 查看文件

55
                 AND t6.person_id != #{personId}
55
                 AND t6.person_id != #{personId}
56
             </if>
56
             </if>
57
           GROUP BY
57
           GROUP BY
58
-            t6.preselection_record_id
58
+            t3.preselection_record_id
59
          ORDER BY
59
          ORDER BY
60
             t3.create_date DESC
60
             t3.create_date DESC
61
 
61
 
121
                 AND a.room_name like CONCAT('%',#{bo.roomName}, '%')
121
                 AND a.room_name like CONCAT('%',#{bo.roomName}, '%')
122
             </if>
122
             </if>
123
             <if test="bo.houseId != null and bo.houseId !=''">
123
             <if test="bo.houseId != null and bo.houseId !=''">
124
-                AND t.house_id = #{houseId}
124
+                AND t.house_id = #{bo.houseId}
125
             </if>
125
             </if>
126
             <if test="bo.phone != null and bo.phone != ''">
126
             <if test="bo.phone != null and bo.phone != ''">
127
-                AND b.phone = #{bo.phone}
127
+                AND b.phone like CONCAT('%',#{bo.phone}, '%')
128
             </if>
128
             </if>
129
             <if test="bo.apartmentId != null and bo.apartmentId != ''">
129
             <if test="bo.apartmentId != null and bo.apartmentId != ''">
130
                 AND a.apartment_id = #{bo.apartmentId}
130
                 AND a.apartment_id = #{bo.apartmentId}
143
         ) t
143
         ) t
144
         GROUP BY
144
         GROUP BY
145
             t.house_id,
145
             t.house_id,
146
-            t.person_id
146
+            t.person_id,
147
+            t.status
147
 
148
 
148
     </select>
149
     </select>
149
 
150
 

+ 5
- 5
src/main/resources/mapper/TaRaiseRecordMapper.xml 查看文件

50
         GROUP BY
50
         GROUP BY
51
           t.house_id
51
           t.house_id
52
         ORDER BY
52
         ORDER BY
53
-          t3.create_date DESC
53
+          t.raise_real_heat DESC
54
     </select>
54
     </select>
55
 
55
 
56
     <select id="listRaiseRecordByCondition" resultType="com.huiju.estateagents.entity.TaRaiseRecord">
56
     <select id="listRaiseRecordByCondition" resultType="com.huiju.estateagents.entity.TaRaiseRecord">
108
             AND t.house_locking_status = #{bo.lockingStatus}
108
             AND t.house_locking_status = #{bo.lockingStatus}
109
         </if>
109
         </if>
110
         <if test="bo.tel != null and bo.tel != ''">
110
         <if test="bo.tel != null and bo.tel != ''">
111
-            AND t.tel = #{bo.tel}
111
+            AND t.tel like CONCAT('%',#{bo.tel} , '%')
112
         </if>
112
         </if>
113
         <if test="bo.personTel != null and bo.personTel != ''">
113
         <if test="bo.personTel != null and bo.personTel != ''">
114
-            AND t5.tel = #{bo.personTel}
114
+            AND t5.tel like CONCAT('%',#{bo.personTel}  , '%')
115
         </if>
115
         </if>
116
         <if test="bo.payStatus != null and bo.payStatus != ''">
116
         <if test="bo.payStatus != null and bo.payStatus != ''">
117
             AND t.pay_status = #{bo.payStatus}
117
             AND t.pay_status = #{bo.payStatus}
157
                 AND t.raise_record_id = #{bo.raiseRecordId}
157
                 AND t.raise_record_id = #{bo.raiseRecordId}
158
             </if>
158
             </if>
159
             <if test = "bo.tel != null and bo.tel != ''">
159
             <if test = "bo.tel != null and bo.tel != ''">
160
-                AND t.tel = #{bo.tel}
160
+                AND t.tel  like CONCAT('%',#{bo.tel} , '%')
161
             </if>
161
             </if>
162
             <if test = "bo.personTel != null and bo.personTel != ''">
162
             <if test = "bo.personTel != null and bo.personTel != ''">
163
-                AND t3.tel = #{bo.personTel}
163
+                AND t3.tel like CONCAT('%',#{bo.personTel}  , '%')
164
             </if>
164
             </if>
165
             <if test = "bo.transactionId != null and bo.transactionId != ''">
165
             <if test = "bo.transactionId != null and bo.transactionId != ''">
166
                 AND t2.transaction_id = #{bo.transactionId}
166
                 AND t2.transaction_id = #{bo.transactionId}