diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/controller/app/ApiBaseNoticeController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/controller/app/ApiBaseNoticeController.java new file mode 100644 index 00000000..e2dfa4d8 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/controller/app/ApiBaseNoticeController.java @@ -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 page = new Page<>(pageNo, pageSize); + return success(dlBaseNoticeService.pageNotice(reqVO, page)); + } + +} + diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/entity/DlBaseNotice.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/entity/DlBaseNotice.java index 1d19eb53..8f639916 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/entity/DlBaseNotice.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/entity/DlBaseNotice.java @@ -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; diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/app/ApiOrderInfoController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/app/ApiOrderInfoController.java new file mode 100644 index 00000000..849c9288 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/app/ApiOrderInfoController.java @@ -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 page = new Page<>(pageNo, pageSize); + return success(repairOrderInfoService.getOrderPageByStatus(respVO, page)); + } +} \ No newline at end of file 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 9a5f3e98..ee274ae2 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,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 page = new Page<>(pageNo, pageSize); - return success(repairOrderInfoService.getOrderPageByStatus(respVO, page)); - } @GetMapping("/pageCreator")