diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/controller/admin/RescueInfoSystem.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/controller/admin/RescueInfoSystem.java index a76eddac..97ea866c 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/controller/admin/RescueInfoSystem.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/controller/admin/RescueInfoSystem.java @@ -68,9 +68,11 @@ public class RescueInfoSystem extends BaseController { @PostMapping("/update") public CommonResult update(@RequestBody RescueInfo rescueInfo) { - RescueOrderInfo orderInfo = infoService.getById(rescueInfo.getRescueOrderId()); - orderInfo.setSetMoney(rescueInfo.getSetMoney()); - infoService.updateById(orderInfo); + if (ObjectUtil.isNotEmpty(rescueInfo.getSetMoney())){ + RescueOrderInfo orderInfo = infoService.getById(rescueInfo.getRescueOrderId()); + orderInfo.setSetMoney(rescueInfo.getSetMoney()); + infoService.updateById(orderInfo); + } rescueInfoService.updateById(rescueInfo); return CommonResult.ok(); } diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueRefuelRecordServiceImpl.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueRefuelRecordServiceImpl.java index 5ec04fca..07b69a72 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueRefuelRecordServiceImpl.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueRefuelRecordServiceImpl.java @@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.iocoder.yudao.module.rescue.mapper.RescueRefuelRecordMapper; import org.springframework.stereotype.Service; +import java.util.Arrays; import java.util.List; /** @@ -19,8 +20,7 @@ import java.util.List; * @date 2023-09-26 */ @Service -public class RescueRefuelRecordServiceImpl extends ServiceImpl implements IRescueRefuelRecordService -{ +public class RescueRefuelRecordServiceImpl extends ServiceImpl implements IRescueRefuelRecordService { /** * 查询加油记录 @@ -29,8 +29,7 @@ public class RescueRefuelRecordServiceImpl extends ServiceImpl selectRescueRefuelRecordList(RescueRefuelRecord rescueRefuelRecord, Page page) - { + public IPage selectRescueRefuelRecordList(RescueRefuelRecord rescueRefuelRecord, Page page) { return baseMapper.selectRescueRefuelRecordList(rescueRefuelRecord, page); } @@ -53,8 +51,7 @@ public class RescueRefuelRecordServiceImpl extends ServiceImpland su.real_name like concat('%',#{map.realName},'%') + and su.nickname like concat('%',#{map.realName},'%') and rci.rescue_car_num like concat('%',#{map.rescueCarNum},'%') order by rrc.record_time desc