订单列表加分页,操作指南对接扣

This commit is contained in:
Vinjor 2024-10-15 15:24:16 +08:00
parent 0a87e55cbe
commit 42997d7095
4 changed files with 107 additions and 15 deletions

View File

@ -0,0 +1,54 @@
package cn.iocoder.yudao.module.notice.controller.app;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.notice.entity.DlBaseNotice;
import cn.iocoder.yudao.module.notice.service.DlBaseNoticeService;
import cn.iocoder.yudao.module.notice.vo.DlBaseNoticeReqVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
/**
* 平台通用信息公告(DlBaseNotice)表控制层
*
* @author 小李
* @date 9:48 2024/10/9
**/
@RestController
@RequestMapping("/base/notice")
public class ApiBaseNoticeController {
/**
* 服务对象
*/
@Resource
private DlBaseNoticeService dlBaseNoticeService;
/**
* 小程序查询公告通用方法
* @param reqVO 请求参数
* @param pageNo 页码
* @param pageSize 数量
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
* @author vinjor-M
* @date 13:58 2024/10/15
**/
@GetMapping("/pageList")
@Operation(summary = "小程序查询公告通用方法")
public CommonResult<?> pageNotice(DlBaseNoticeReqVO reqVO,
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
//只差开启的
reqVO.setStatus(0);
Page<DlBaseNotice> page = new Page<>(pageNo, pageSize);
return success(dlBaseNoticeService.pageNotice(reqVO, page));
}
}

View File

@ -1,7 +1,6 @@
package cn.iocoder.yudao.module.notice.entity;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@ -35,7 +34,7 @@ public class DlBaseNotice extends BaseDO {
private String content;
/**
* 公告类型1通知 2公告
* 公告类型1通知 2公告 3操作指南
*/
private Integer type;

View File

@ -0,0 +1,52 @@
package cn.iocoder.yudao.module.order.controller.app;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.order.entity.RepairOrderInfo;
import cn.iocoder.yudao.module.order.service.RepairOrderInfoService;
import cn.iocoder.yudao.module.order.vo.RepairOrderInfoRespVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 维修模块 订单")
@RestController
@RequestMapping("/repair/order-info")
@Validated
public class ApiOrderInfoController {
@Resource
private RepairOrderInfoService repairOrderInfoService;
/**
* 小程序端查询客户个人所有订单
* @author vinjor-M
* @date 14:58 2024/10/15
* @param respVO
* @param pageNo
* @param pageSize
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
**/
@GetMapping("/page")
@Operation(summary = "订单分页查询")
@TenantIgnore
public CommonResult<?> getOrderPage(RepairOrderInfoRespVO respVO,
@RequestParam(value = "pageNo", defaultValue = "1")Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){
// 当前登录用户的id
Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
respVO.setUserId(loginUserId);
Page<RepairOrderInfo> page = new Page<>(pageNo, pageSize);
return success(repairOrderInfoService.getOrderPageByStatus(respVO, page));
}
}

View File

@ -17,7 +17,6 @@ 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 = "用户端 - 维修模块 订单模块")
@ -27,18 +26,6 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
public class ClientOrderApi {
@Resource
private RepairOrderInfoService repairOrderInfoService;
@GetMapping("/page")
@Operation(summary = "订单分页查询")
@TenantIgnore
public CommonResult<?> getOrderPage(RepairOrderInfoRespVO respVO,
@RequestParam(value = "pageNo", defaultValue = "1")Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){
// 当前登录用户的id
Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
respVO.setUserId(loginUserId);
Page<RepairOrderInfo> page = new Page<>(pageNo, pageSize);
return success(repairOrderInfoService.getOrderPageByStatus(respVO, page));
}
@GetMapping("/pageCreator")