From 4ba061390d623f4281d2e6c300ddf5d7d5e635a9 Mon Sep 17 00:00:00 2001 From: xiao-fajia <1665375861@qq.com> Date: Sat, 24 Aug 2024 08:56:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=91=E6=8F=B4APP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/RescueInfoController.java | 22 ++++++++++--------- .../controller/admin/SysLoginController.java | 2 +- .../rescue/mapper/RescueInfoMapper.java | 2 +- .../rescue/service/IRescueInfoService.java | 4 ++-- .../service/impl/RescueInfoServiceImpl.java | 6 ++--- .../mapper/rescue/RescueInfoMapper.xml | 14 ++++++------ 6 files changed, 26 insertions(+), 24 deletions(-) diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/RescueInfoController.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/RescueInfoController.java index 54c82d39..6442086f 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/RescueInfoController.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/RescueInfoController.java @@ -181,11 +181,12 @@ public class RescueInfoController extends BaseController { * 获取扣车订单 */ @GetMapping("/getKcList") - public TableDataInfo getKcList(RescueInfo rescueInfo) { - - startPage(); - List rescueInfos = rescueInfoService.getKcList(rescueInfo); - return getDataTable(rescueInfos); + public CommonResult getKcList(RescueInfo rescueInfo, + @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, + @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { + Page page = new Page<>(pageNum, pageSize); + IPage rescueInfos = rescueInfoService.getKcList(rescueInfo, page); + return success(rescueInfos); } /** @@ -234,11 +235,12 @@ public class RescueInfoController extends BaseController { * 获取扣车订单 */ @GetMapping("/getHcList") - public TableDataInfo getHcList(RescueInfo rescueInfo) { - - startPage(); - List rescueInfos = rescueInfoService.getHcList(rescueInfo); - return getDataTable(rescueInfos); + public CommonResult getHcList(RescueInfo rescueInfo, + @RequestParam(value = "pageNum", defaultValue = "1")Integer pageNum, + @RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize) { + Page page = new Page<>(pageNum, pageSize); + IPage rescueInfos = rescueInfoService.getHcList(rescueInfo, page); + return success(rescueInfos); } /** diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java index cd1af150..a454e959 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java @@ -159,7 +159,7 @@ public class SysLoginController { // * @return 结果 // */ // @PostMapping("/loginSmsCode") -// public AjaxResult loginSmsCode(String phone) { +// public CommonResult loginSmsCode(String phone) { // return loginService.loginSmsCode(phone); // } /** diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/mapper/RescueInfoMapper.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/mapper/RescueInfoMapper.java index 147b7185..b8f833df 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/mapper/RescueInfoMapper.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/mapper/RescueInfoMapper.java @@ -44,7 +44,7 @@ public interface RescueInfoMapper extends BaseMapper * @return 【请填写功能名称】集合 */ IPage selectRescueInfoListApp(@Param("map") RescueInfo rescueInfo, Page page); - List getKcList(RescueInfo rescueInfo); + IPage getKcList(@Param("map") RescueInfo rescueInfo, Page page); diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/IRescueInfoService.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/IRescueInfoService.java index c076374f..323712e5 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/IRescueInfoService.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/IRescueInfoService.java @@ -39,8 +39,8 @@ public interface IRescueInfoService extends IService * @return 【请填写功能名称】集合 */ IPage selectRescueInfoList(RescueInfo rescueInfo, Page page); - List getKcList(RescueInfo rescueInfo); - List getHcList(RescueInfo rescueInfo); + IPage getKcList(RescueInfo rescueInfo, Page page); + IPage getHcList(RescueInfo rescueInfo, Page page); void openKc(Long rescueId) throws Exception; diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueInfoServiceImpl.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueInfoServiceImpl.java index e7c0d584..31dcedc2 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueInfoServiceImpl.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueInfoServiceImpl.java @@ -144,15 +144,15 @@ public class RescueInfoServiceImpl extends ServiceImpl getKcList(RescueInfo rescueInfo) { + public IPage getKcList(RescueInfo rescueInfo, Page page) { Long deptId = getLoginUserDeptId(); rescueInfo.setDeptId(deptId); - List rescueInfos = baseMapper.getKcList(rescueInfo); + IPage rescueInfos = baseMapper.getKcList(rescueInfo, page); return rescueInfos; } @Override - public List getHcList(RescueInfo rescueInfo) { + public IPage getHcList(RescueInfo rescueInfo, Page page) { return null; } diff --git a/dl-module-rescue/src/main/resources/mapper/rescue/RescueInfoMapper.xml b/dl-module-rescue/src/main/resources/mapper/rescue/RescueInfoMapper.xml index b609d751..fdeb0491 100644 --- a/dl-module-rescue/src/main/resources/mapper/rescue/RescueInfoMapper.xml +++ b/dl-module-rescue/src/main/resources/mapper/rescue/RescueInfoMapper.xml @@ -164,18 +164,18 @@ resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfo"> select * from rescue_info ri - dept_id = #{deptId} and rescue_type = '5' - - and (connection_name like concat('%', #{connectionName}, '%') or connection_phone like concat('%', - #{connectionPhone}, '%') or license_num like concat('%',#{licenseNum}, '%')) + dept_id = #{map.deptId} and rescue_type = '5' + + and (connection_name like concat('%', #{map.connectionName}, '%') or connection_phone like concat('%', + #{map.connectionPhone}, '%') or license_num like concat('%',#{map.licenseNum}, '%')) - + - + and rescue_status '6' - + and rescue_status =]]> '6'