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,8 +41,9 @@ public class CarInfoController extends BaseController | ||
| 41 | public TableDataInfo list(CarInfoVo carInfo) | 41 | public TableDataInfo list(CarInfoVo carInfo) |
| 42 | { | 42 | { |
| 43 | startPage(); | 43 | startPage(); |
| 44 | - carInfo.setIsDel("1"); | 44 | + carInfo.setIsDel(1); |
| 45 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); | 45 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); |
| 46 | + TableDataInfo data = getDataTable(list); | ||
| 46 | if(CollectionUtils.isNotEmpty(list)){ | 47 | if(CollectionUtils.isNotEmpty(list)){ |
| 47 | list = list.stream().map(car->{ | 48 | list = list.stream().map(car->{ |
| 48 | if(Objects.equals(car.getCarType(),"轻型货车")){ | 49 | if(Objects.equals(car.getCarType(),"轻型货车")){ |
| @@ -59,7 +60,7 @@ public class CarInfoController extends BaseController | @@ -59,7 +60,7 @@ public class CarInfoController extends BaseController | ||
| 59 | }).collect(Collectors.toList()); | 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
| @@ -7,6 +7,7 @@ public class CarInfoVo extends CarInfo { | @@ -7,6 +7,7 @@ public class CarInfoVo extends CarInfo { | ||
| 7 | 7 | ||
| 8 | private String driversName; | 8 | private String driversName; |
| 9 | 9 | ||
| 10 | + | ||
| 10 | public String getCompanyName() { | 11 | public String getCompanyName() { |
| 11 | return companyName; | 12 | return companyName; |
| 12 | } | 13 | } |
trash-unit/src/main/resources/mapper/unit/CarInfoMapper.xml
| @@ -143,7 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -143,7 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 143 | <if test="drivers != null and drivers != ''"> and drivers = #{drivers}</if> | 143 | <if test="drivers != null and drivers != ''"> and drivers = #{drivers}</if> |
| 144 | <if test="status != null "> and car.status = #{status}</if> | 144 | <if test="status != null "> and car.status = #{status}</if> |
| 145 | <if test="creditStatus != null and creditStatus != ''"> and car.credit_status = #{creditStatus}</if> | 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 | </where> | 147 | </where> |
| 148 | </select> | 148 | </select> |
| 149 | 149 |