This commit is contained in:
PQZ 2024-09-25 22:42:43 +08:00
parent f9cb1259ec
commit 3815b915e3
4 changed files with 44 additions and 0 deletions

View File

@ -84,6 +84,16 @@ public interface RepairOrderInfoService extends IService<RepairOrderInfo> {
**/
IPage<RepairOrderInfoRespVO> getOrderPageByStatus(RepairOrderInfoRespVO respVO, Page<RepairOrderInfo> page);
/**
*
* @author PQZ
* @date 22:28 2024/9/25
* @param respVO TODO
* @param page TODO
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.order.vo.RepairOrderInfoRespVO>
**/
IPage<RepairOrderInfoRespVO> pageCreator(RepairOrderInfoRespVO respVO, Page<RepairOrderInfo> page);
/**
* 查询订单详情(包括工单)
*

View File

@ -159,6 +159,19 @@ public class RepairOrderInfoServiceImpl extends ServiceImpl<RepairOrderInfoMappe
return baseMapper.getOrderPageByStatus(respVO, page);
}
/**
* @param respVO TODO
* @param page TODO
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.order.vo.RepairOrderInfoRespVO>
* @author PQZ
* @date 22:28 2024/9/25
**/
@Override
public IPage<RepairOrderInfoRespVO> pageCreator(RepairOrderInfoRespVO respVO, Page<RepairOrderInfo> page) {
respVO.setUserId(null);
return baseMapper.getOrderPageByStatus(respVO, page);
}
/**
* 查询订单详情(包括工单)

View File

@ -45,6 +45,12 @@
<if test="map.userId != null and map.userId != ''">
and roi.user_id = #{map.userId}
</if>
<if test="map.creator != null and map.creator != ''">
and roi.creator = #{map.creator}
</if>
<if test="map.orderStatus != null and map.orderStatus != ''">
and roi.order_status = #{map.orderStatus}
</if>
<if test="map.status != null and map.status != ''">
<choose>
<when test="map.status != '00'">

View File

@ -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<RepairOrderInfo> 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<RepairOrderInfo> page = new Page<>(pageNo, pageSize);
return success(repairOrderInfoService.pageCreator(respVO, page));
}
}