Commit 1a0148174ed221ab3e8f57fd4251b23f83813696
1 parent
5233fc8d
车辆管理,物理删除改为逻辑删除
Showing
3 changed files
with
5 additions
and
3 deletions
trash-unit/src/main/java/com/trash/carInfo/controller/CarInfoController.java
| ... | ... | @@ -41,8 +41,9 @@ public class CarInfoController extends BaseController |
| 41 | 41 | public TableDataInfo list(CarInfoVo carInfo) |
| 42 | 42 | { |
| 43 | 43 | startPage(); |
| 44 | - carInfo.setIsDel("1"); | |
| 44 | + carInfo.setIsDel(1); | |
| 45 | 45 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); |
| 46 | + TableDataInfo data = getDataTable(list); | |
| 46 | 47 | if(CollectionUtils.isNotEmpty(list)){ |
| 47 | 48 | list = list.stream().map(car->{ |
| 48 | 49 | if(Objects.equals(car.getCarType(),"轻型货车")){ |
| ... | ... | @@ -59,7 +60,7 @@ public class CarInfoController extends BaseController |
| 59 | 60 | }).collect(Collectors.toList()); |
| 60 | 61 | } |
| 61 | 62 | |
| 62 | - return getDataTable(list); | |
| 63 | + return data; | |
| 63 | 64 | } |
| 64 | 65 | |
| 65 | 66 | /** | ... | ... |
trash-unit/src/main/java/com/trash/carInfo/domain/vo/CarInfoVo.java
trash-unit/src/main/resources/mapper/unit/CarInfoMapper.xml
| ... | ... | @@ -143,7 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 143 | 143 | <if test="drivers != null and drivers != ''"> and drivers = #{drivers}</if> |
| 144 | 144 | <if test="status != null "> and car.status = #{status}</if> |
| 145 | 145 | <if test="creditStatus != null and creditStatus != ''"> and car.credit_status = #{creditStatus}</if> |
| 146 | - <if test="isDel != null and isDel != ''"> and car.is_del = #{isDel}</if> | |
| 146 | + <if test="isDel != null"> and car.is_del = #{isDel}</if> | |
| 147 | 147 | </where> |
| 148 | 148 | </select> |
| 149 | 149 | ... | ... |