Explorar el Código

* 代码优化

顾绍勇 hace 5 años
padre
commit
3fa64e22cf

+ 1
- 1
src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java Ver fichero

@@ -151,7 +151,7 @@ public class TaPreselectionRecordServiceImpl extends ServiceImpl<TaPreselectionR
151 151
         ResponseBean responseBean = new ResponseBean<>();
152 152
         // 校验是否已经取消
153 153
         TaPreselectionRecord preselectionRecord = taPreselectionRecordMapper.getRecordByPersonIdAndHouseId(personId, houseId);
154
-        if (preselectionRecord != null && 1 != preselectionRecord.getStatus()) {
154
+        if (preselectionRecord == null || 1 != preselectionRecord.getStatus()) {
155 155
             responseBean.addError("未预选过此房源,或已取消预选此房源");
156 156
             return responseBean;
157 157
         }