diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java index bf3dc0ca..9ba56c44 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java @@ -84,6 +84,16 @@ public interface RepairOrderInfoService extends IService { **/ IPage getOrderPageByStatus(RepairOrderInfoRespVO respVO, Page page); + /** + * + * @author PQZ + * @date 22:28 2024/9/25 + * @param respVO TODO + * @param page TODO + * @return com.baomidou.mybatisplus.core.metadata.IPage + **/ + IPage pageCreator(RepairOrderInfoRespVO respVO, Page page); + /** * 查询订单详情(包括工单) * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java index a4c7b7cb..8e69be15 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java @@ -159,6 +159,19 @@ public class RepairOrderInfoServiceImpl extends ServiceImpl + * @author PQZ + * @date 22:28 2024/9/25 + **/ + @Override + public IPage pageCreator(RepairOrderInfoRespVO respVO, Page page) { + respVO.setUserId(null); + return baseMapper.getOrderPageByStatus(respVO, page); + } + /** * 查询订单详情(包括工单) diff --git a/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml b/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml index d1ed7f46..3872bffb 100644 --- a/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml +++ b/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml @@ -45,6 +45,12 @@ and roi.user_id = #{map.userId} + + and roi.creator = #{map.creator} + + + and roi.order_status = #{map.orderStatus} + diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/apy/ClientOrderApi.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/apy/ClientOrderApi.java index b50f0e8d..9a5f3e98 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/apy/ClientOrderApi.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/apy/ClientOrderApi.java @@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Tag(name = "用户端 - 维修模块 订单模块") @@ -38,4 +39,18 @@ public class ClientOrderApi { Page page = new Page<>(pageNo, pageSize); return success(repairOrderInfoService.getOrderPageByStatus(respVO, page)); } + + + @GetMapping("/pageCreator") + @Operation(summary = "订单分页查询") + @TenantIgnore + public CommonResult pageCreator(RepairOrderInfoRespVO respVO, + @RequestParam(value = "pageNo", defaultValue = "1")Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){ + // 当前登录用户的id + Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); + respVO.setCreator(String.valueOf(loginUserId)); + Page page = new Page<>(pageNo, pageSize); + return success(repairOrderInfoService.pageCreator(respVO, page)); + } }