Kaynağa Gözat

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

傅行帆 5 yıl önce
ebeveyn
işleme
ece4ea79bb

+ 1
- 1
src/main/java/com/huiju/estateagents/bo/request/PresecretRecordRequestBO.java Dosyayı Görüntüle

@@ -18,7 +18,7 @@ public class PresecretRecordRequestBO {
18 18
     /**
19 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 Dosyayı Görüntüle

@@ -143,13 +143,13 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
143 143
 //            lockedHouseResources(taHousingResources);
144 144
         }
145 145
         //判断销售批次是否是发布状态和房源是否正常状态
146
-        checkHouseStatus(taRaiseRecord,orgId, personId, taRaise);
146
+        checkHouseStatus(taRaiseRecord, orgId, personId, taRaise);
147 147
 
148 148
         //插入认筹单
149 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 154
         return taRaiseRecord;
155 155
     }
@@ -158,23 +158,23 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
158 158
     private void checkHouseStatus(TaRaiseRecord taRaiseRecord, Integer orgId, String personId, TaRaise taRaise) throws Exception {
159 159
         //销售批次是否有效状态
160 160
         TaSalesBatch taSalesBatch = taSalesBatchMapper.selectById(taRaise.getSalesBatchId());
161
-        if (!taSalesBatch.getStatus().equals(CommConstant.STATUS_NORMAL)){
161
+        if (!taSalesBatch.getStatus().equals(CommConstant.STATUS_NORMAL)) {
162 162
             throw new Exception("此销售批次已经取消发布!");
163 163
         }
164 164
         //判断房源是否已经删除
165 165
         List<Integer> houseList = taRaiseRecord.getHouseList();
166 166
         for (Integer houseId : houseList) {
167 167
             TaHousingResources taHousingResources = taHousingResourcesMapper.selectById(houseId);
168
-            if (taHousingResources.getStatus() != CommConstant.STATUS_NORMAL){
168
+            if (taHousingResources.getStatus() != CommConstant.STATUS_NORMAL) {
169 169
                 throw new Exception("存在已经删除的房源!");
170 170
             }
171 171
             //判断我是否认筹过这些房源
172 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 176
             List<TaRaiseHouse> taRaiseHouses = taRaiseHouseMapper.selectList(taRaiseHouseQueryWrapper);
177
-            if (taRaiseHouses.size() > 0){
177
+            if (taRaiseHouses.size() > 0) {
178 178
                 throw new Exception("存在已经认筹过的房源!");
179 179
             }
180 180
         }
@@ -237,7 +237,7 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
237 237
                 taRaiseHouse.setHouseLockingStatus(CommConstant.HOUSE_LOCKING_STATUS_LOCKED);
238 238
                 taRaiseHouse.setPersonId(personId);
239 239
                 taRaiseHouse.setPersonName(taPerson.getName());
240
-            }else{
240
+            } else {
241 241
                 taRaiseHouse.setHouseLockingStatus(CommConstant.HOUSE_LOCKING_STATUS_UNLOCKED);
242 242
             }
243 243
             taRaiseHouse.setOrgId(orgId);
@@ -247,15 +247,15 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
247 247
             //更新房源的实际热度
248 248
             TaHousingResources taHousingResources = taHousingResourcesMapper.selectById(e);
249 249
             Integer raiseRealHeat = taHousingResources.getRaiseRealHeat();
250
-            if (null == raiseRealHeat){
250
+            if (null == raiseRealHeat) {
251 251
                 raiseRealHeat = 0;
252 252
             }
253
-            taHousingResources.setRaiseRealHeat(raiseRealHeat+1);
253
+            taHousingResources.setRaiseRealHeat(raiseRealHeat + 1);
254 254
             taHousingResourcesMapper.updateById(taHousingResources);
255 255
         });
256 256
 
257 257
         //把idcard字断更新进person表
258
-        if (StringUtil.isEmpty(taPerson.getIdcard())){
258
+        if (StringUtil.isEmpty(taPerson.getIdcard())) {
259 259
             taPerson.setIdcard(taRaiseRecord.getIdcard());
260 260
             taPersonMapper.updateById(taPerson);
261 261
         }
@@ -276,15 +276,15 @@ public class TaRaiseRecordServiceImpl extends ServiceImpl<TaRaiseRecordMapper, T
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 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 288
         logger.info("sendSubscribeMsg 接收参数:houseId:{},checkType:{},result:{},reason:{}, remark:{}",
289 289
                 raiseRecordId, title, result, reason, remark);
290 290
 

+ 5
- 4
src/main/resources/mapper/TaPreselectionRecordMapper.xml Dosyayı Görüntüle

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

+ 5
- 5
src/main/resources/mapper/TaRaiseRecordMapper.xml Dosyayı Görüntüle

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