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

[物业账单][修改][更新数据错误]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
e7e40444e8
1 измененных файлов: 2 добавлений и 2 удалений
  1. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java

+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java Просмотреть файл

@@ -110,7 +110,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
} else {
logger.info("更新物业账单");
WxBillProperty property = wxBillPropertyMapper.selectByPrimaryKey(record.getId());
if(record==null){
if(property==null){
return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND);
}
property.setPayDate(record.getPayDate());
@@ -120,7 +120,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
property.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():property.getStatus());
property.setUpdatetime(new Date());
try {
wxBillPropertyMapper.updateByPrimaryKeySelective(record);
wxBillPropertyMapper.updateByPrimaryKeySelective(property);
} catch (Exception e) {
logger.error("更新物业账单失败,e:" + e.getMessage());
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage());


Загрузка…
Отмена
Сохранить