feat(cms): 添加网站订单管理功能
- 创建 CmsOrder 实体类,包含订单基本信息、支付信息、物流信息等完整字段 - 实现 CmsOrderController 控制器,提供增删改查及批量操作接口 - 开发 CmsOrderMapper 数据访问层,集成 MyBatis-Plus 基础功能 - 配置 CmsOrderMapper.xml XML 映射文件,实现关联查询 SQL 语句 - 定义 CmsOrderParam 查询参数类,支持多条件动态查询 - 构建 CmsOrderService 业务接口及其实现类,封装订单业务逻辑 - 集成 Swagger 文档注解,提供 API 接口文档支持 - 添加权限控制注解,确保接口安全性 - 实现分页查询、列表查询、单条查询等多种数据获取方式
This commit is contained in:
@@ -0,0 +1,121 @@
|
|||||||
|
package com.gxwebsoft.cms.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.cms.service.CmsOrderService;
|
||||||
|
import com.gxwebsoft.cms.entity.CmsOrder;
|
||||||
|
import com.gxwebsoft.cms.param.CmsOrderParam;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站订单控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2026-01-27 13:03:25
|
||||||
|
*/
|
||||||
|
@Tag(name = "网站订单管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/cms/cms-order")
|
||||||
|
public class CmsOrderController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private CmsOrderService cmsOrderService;
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:cmsOrder:list')")
|
||||||
|
@Operation(summary = "分页查询网站订单")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<CmsOrder>> page(CmsOrderParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(cmsOrderService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:cmsOrder:list')")
|
||||||
|
@Operation(summary = "查询全部网站订单")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<CmsOrder>> list(CmsOrderParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(cmsOrderService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:cmsOrder:list')")
|
||||||
|
@Operation(summary = "根据id查询网站订单")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<CmsOrder> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(cmsOrderService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "添加网站订单")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody CmsOrder cmsOrder) {
|
||||||
|
if (cmsOrderService.save(cmsOrder)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:cmsOrder:update')")
|
||||||
|
@OperationLog
|
||||||
|
@Operation(summary = "修改网站订单")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody CmsOrder cmsOrder) {
|
||||||
|
if (cmsOrderService.updateById(cmsOrder)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:cmsOrder:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@Operation(summary = "删除网站订单")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (cmsOrderService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:cmsOrder:save')")
|
||||||
|
@OperationLog
|
||||||
|
@Operation(summary = "批量添加网站订单")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<CmsOrder> list) {
|
||||||
|
if (cmsOrderService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:cmsOrder:update')")
|
||||||
|
@OperationLog
|
||||||
|
@Operation(summary = "批量修改网站订单")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsOrder> batchParam) {
|
||||||
|
if (batchParam.update(cmsOrderService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:cmsOrder:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@Operation(summary = "批量删除网站订单")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (cmsOrderService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
266
src/main/java/com/gxwebsoft/cms/entity/CmsOrder.java
Normal file
266
src/main/java/com/gxwebsoft/cms/entity/CmsOrder.java
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
package com.gxwebsoft.cms.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站订单
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2026-01-27 13:03:24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Schema(name = "CmsOrder对象", description = "网站订单")
|
||||||
|
public class CmsOrder implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "订单类型,0售前咨询 1售后服务 2意见反馈")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "订单标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@Schema(description = "公司/团队名称")
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
@Schema(description = "订单内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@Schema(description = "订单编号")
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
@Schema(description = "快递/自提")
|
||||||
|
private Integer deliveryType;
|
||||||
|
|
||||||
|
@Schema(description = "下单渠道,0网站 1微信小程序 2其他")
|
||||||
|
private Integer channel;
|
||||||
|
|
||||||
|
@Schema(description = "微信支付交易号号")
|
||||||
|
private String transactionId;
|
||||||
|
|
||||||
|
@Schema(description = "微信退款订单号")
|
||||||
|
private String refundOrder;
|
||||||
|
|
||||||
|
@Schema(description = "商户ID")
|
||||||
|
private Integer merchantId;
|
||||||
|
|
||||||
|
@Schema(description = "商户名称")
|
||||||
|
private String merchantName;
|
||||||
|
|
||||||
|
@Schema(description = "商户编号")
|
||||||
|
private String merchantCode;
|
||||||
|
|
||||||
|
@Schema(description = "使用的优惠券id")
|
||||||
|
private Integer couponId;
|
||||||
|
|
||||||
|
@Schema(description = "使用的会员卡id")
|
||||||
|
private String cardId;
|
||||||
|
|
||||||
|
@Schema(description = "关联管理员id")
|
||||||
|
private Integer adminId;
|
||||||
|
|
||||||
|
@Schema(description = "核销管理员id")
|
||||||
|
private Integer confirmId;
|
||||||
|
|
||||||
|
@Schema(description = "IC卡号")
|
||||||
|
private String icCard;
|
||||||
|
|
||||||
|
@Schema(description = "真实姓名")
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
@Schema(description = "关联收货地址")
|
||||||
|
private Integer addressId;
|
||||||
|
|
||||||
|
@Schema(description = "收货地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
private String addressLat;
|
||||||
|
|
||||||
|
private String addressLng;
|
||||||
|
|
||||||
|
@Schema(description = "自提店铺id")
|
||||||
|
private Integer selfTakeMerchantId;
|
||||||
|
|
||||||
|
@Schema(description = "自提店铺")
|
||||||
|
private String selfTakeMerchantName;
|
||||||
|
|
||||||
|
@Schema(description = "配送开始时间")
|
||||||
|
private String sendStartTime;
|
||||||
|
|
||||||
|
@Schema(description = "配送结束时间")
|
||||||
|
private String sendEndTime;
|
||||||
|
|
||||||
|
@Schema(description = "发货店铺id")
|
||||||
|
private Integer expressMerchantId;
|
||||||
|
|
||||||
|
@Schema(description = "发货店铺")
|
||||||
|
private String expressMerchantName;
|
||||||
|
|
||||||
|
@Schema(description = "订单总额")
|
||||||
|
private BigDecimal totalPrice;
|
||||||
|
|
||||||
|
@Schema(description = "减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格")
|
||||||
|
private BigDecimal reducePrice;
|
||||||
|
|
||||||
|
@Schema(description = "实际付款")
|
||||||
|
private BigDecimal payPrice;
|
||||||
|
|
||||||
|
@Schema(description = "用于统计")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
@Schema(description = "价钱,用于积分赠送")
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
|
@Schema(description = "取消时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime cancelTime;
|
||||||
|
|
||||||
|
@Schema(description = "取消原因")
|
||||||
|
private String cancelReason;
|
||||||
|
|
||||||
|
@Schema(description = "退款金额")
|
||||||
|
private BigDecimal refundMoney;
|
||||||
|
|
||||||
|
@Schema(description = "教练价格")
|
||||||
|
private BigDecimal coachPrice;
|
||||||
|
|
||||||
|
@Schema(description = "购买数量")
|
||||||
|
private Integer totalNum;
|
||||||
|
|
||||||
|
@Schema(description = "教练id")
|
||||||
|
private Integer coachId;
|
||||||
|
|
||||||
|
@Schema(description = "商品ID")
|
||||||
|
private Integer formId;
|
||||||
|
|
||||||
|
@Schema(description = "支付的用户id")
|
||||||
|
private Integer payUserId;
|
||||||
|
|
||||||
|
@Schema(description = "0余额支付,1微信支付,2支付宝支付,3银联支付,4现金支付,5POS机支付,6免费,7积分支付")
|
||||||
|
private Integer payType;
|
||||||
|
|
||||||
|
@Schema(description = "微信支付子类型:JSAPI小程序支付,NATIVE扫码支付")
|
||||||
|
private String wechatPayType;
|
||||||
|
|
||||||
|
@Schema(description = "0余额支付,1微信支付,2支付宝支付,3银联支付,4现金支付,5POS机支付,6免费,7积分支付")
|
||||||
|
private Integer friendPayType;
|
||||||
|
|
||||||
|
@Schema(description = "0未付款,1已付款")
|
||||||
|
private Integer payStatus;
|
||||||
|
|
||||||
|
@Schema(description = "0未使用,1已完成,2已取消,3取消中,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款")
|
||||||
|
private Integer orderStatus;
|
||||||
|
|
||||||
|
@Schema(description = "发货状态(10未发货 20已发货 30部分发货)")
|
||||||
|
private Integer deliveryStatus;
|
||||||
|
|
||||||
|
@Schema(description = "无需发货备注")
|
||||||
|
private String deliveryNote;
|
||||||
|
|
||||||
|
@Schema(description = "发货时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime deliveryTime;
|
||||||
|
|
||||||
|
@Schema(description = "评价状态(0未评价 1已评价)")
|
||||||
|
private Integer evaluateStatus;
|
||||||
|
|
||||||
|
@Schema(description = "评价时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime evaluateTime;
|
||||||
|
|
||||||
|
@Schema(description = "优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡")
|
||||||
|
private Integer couponType;
|
||||||
|
|
||||||
|
@Schema(description = "优惠说明")
|
||||||
|
private String couponDesc;
|
||||||
|
|
||||||
|
@Schema(description = "二维码地址,保存订单号,支付成功后才生成")
|
||||||
|
private String qrcode;
|
||||||
|
|
||||||
|
@Schema(description = "vip月卡年卡、ic月卡年卡回退次数")
|
||||||
|
private Integer returnNum;
|
||||||
|
|
||||||
|
@Schema(description = "vip充值回退金额")
|
||||||
|
private BigDecimal returnMoney;
|
||||||
|
|
||||||
|
@Schema(description = "预约详情开始时间数组")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@Schema(description = "是否已开具发票:0未开发票,1已开发票,2不能开具发票")
|
||||||
|
private Integer isInvoice;
|
||||||
|
|
||||||
|
@Schema(description = "发票流水号")
|
||||||
|
private String invoiceNo;
|
||||||
|
|
||||||
|
@Schema(description = "商家留言")
|
||||||
|
private String merchantRemarks;
|
||||||
|
|
||||||
|
@Schema(description = "支付时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime payTime;
|
||||||
|
|
||||||
|
@Schema(description = "退款时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime refundTime;
|
||||||
|
|
||||||
|
@Schema(description = "申请退款时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime refundApplyTime;
|
||||||
|
|
||||||
|
@Schema(description = "过期时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime expirationTime;
|
||||||
|
|
||||||
|
@Schema(description = "自提码")
|
||||||
|
private String selfTakeCode;
|
||||||
|
|
||||||
|
@Schema(description = "是否已收到赠品")
|
||||||
|
private Boolean hasTakeGift;
|
||||||
|
|
||||||
|
@Schema(description = "对账情况:0=未对账;1=已对账;3=已对账,金额对不上;4=未查询到该订单")
|
||||||
|
private Integer checkBill;
|
||||||
|
|
||||||
|
@Schema(description = "订单是否已结算(0未结算 1已结算)")
|
||||||
|
private Integer isSettled;
|
||||||
|
|
||||||
|
@Schema(description = "系统版本号 0当前版本 value=其他版本")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
@Schema(description = "用户id")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@Schema(description = "排序号")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@Schema(description = "是否删除, 0否, 1是")
|
||||||
|
@TableLogic
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@Schema(description = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@Schema(description = "修改时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
37
src/main/java/com/gxwebsoft/cms/mapper/CmsOrderMapper.java
Normal file
37
src/main/java/com/gxwebsoft/cms/mapper/CmsOrderMapper.java
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.cms.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.cms.entity.CmsOrder;
|
||||||
|
import com.gxwebsoft.cms.param.CmsOrderParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站订单Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2026-01-27 13:03:24
|
||||||
|
*/
|
||||||
|
public interface CmsOrderMapper extends BaseMapper<CmsOrder> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<CmsOrder>
|
||||||
|
*/
|
||||||
|
List<CmsOrder> selectPageRel(@Param("page") IPage<CmsOrder> page,
|
||||||
|
@Param("param") CmsOrderParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<CmsOrder> selectListRel(@Param("param") CmsOrderParam param);
|
||||||
|
|
||||||
|
}
|
||||||
258
src/main/java/com/gxwebsoft/cms/mapper/xml/CmsOrderMapper.xml
Normal file
258
src/main/java/com/gxwebsoft/cms/mapper/xml/CmsOrderMapper.xml
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.cms.mapper.CmsOrderMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM cms_order a
|
||||||
|
<where>
|
||||||
|
<if test="param.id != null">
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.type != null">
|
||||||
|
AND a.type = #{param.type}
|
||||||
|
</if>
|
||||||
|
<if test="param.title != null">
|
||||||
|
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.company != null">
|
||||||
|
AND a.company LIKE CONCAT('%', #{param.company}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.content != null">
|
||||||
|
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.orderNo != null">
|
||||||
|
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.deliveryType != null">
|
||||||
|
AND a.delivery_type = #{param.deliveryType}
|
||||||
|
</if>
|
||||||
|
<if test="param.channel != null">
|
||||||
|
AND a.channel = #{param.channel}
|
||||||
|
</if>
|
||||||
|
<if test="param.transactionId != null">
|
||||||
|
AND a.transaction_id LIKE CONCAT('%', #{param.transactionId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.refundOrder != null">
|
||||||
|
AND a.refund_order LIKE CONCAT('%', #{param.refundOrder}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantId != null">
|
||||||
|
AND a.merchant_id = #{param.merchantId}
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantName != null">
|
||||||
|
AND a.merchant_name LIKE CONCAT('%', #{param.merchantName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantCode != null">
|
||||||
|
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.couponId != null">
|
||||||
|
AND a.coupon_id = #{param.couponId}
|
||||||
|
</if>
|
||||||
|
<if test="param.cardId != null">
|
||||||
|
AND a.card_id LIKE CONCAT('%', #{param.cardId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.adminId != null">
|
||||||
|
AND a.admin_id = #{param.adminId}
|
||||||
|
</if>
|
||||||
|
<if test="param.confirmId != null">
|
||||||
|
AND a.confirm_id = #{param.confirmId}
|
||||||
|
</if>
|
||||||
|
<if test="param.icCard != null">
|
||||||
|
AND a.ic_card LIKE CONCAT('%', #{param.icCard}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.realName != null">
|
||||||
|
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.addressId != null">
|
||||||
|
AND a.address_id = #{param.addressId}
|
||||||
|
</if>
|
||||||
|
<if test="param.address != null">
|
||||||
|
AND a.address LIKE CONCAT('%', #{param.address}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.addressLat != null">
|
||||||
|
AND a.address_lat LIKE CONCAT('%', #{param.addressLat}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.addressLng != null">
|
||||||
|
AND a.address_lng LIKE CONCAT('%', #{param.addressLng}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.selfTakeMerchantId != null">
|
||||||
|
AND a.self_take_merchant_id = #{param.selfTakeMerchantId}
|
||||||
|
</if>
|
||||||
|
<if test="param.selfTakeMerchantName != null">
|
||||||
|
AND a.self_take_merchant_name LIKE CONCAT('%', #{param.selfTakeMerchantName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.sendStartTime != null">
|
||||||
|
AND a.send_start_time LIKE CONCAT('%', #{param.sendStartTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.sendEndTime != null">
|
||||||
|
AND a.send_end_time LIKE CONCAT('%', #{param.sendEndTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.expressMerchantId != null">
|
||||||
|
AND a.express_merchant_id = #{param.expressMerchantId}
|
||||||
|
</if>
|
||||||
|
<if test="param.expressMerchantName != null">
|
||||||
|
AND a.express_merchant_name LIKE CONCAT('%', #{param.expressMerchantName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.totalPrice != null">
|
||||||
|
AND a.total_price = #{param.totalPrice}
|
||||||
|
</if>
|
||||||
|
<if test="param.reducePrice != null">
|
||||||
|
AND a.reduce_price = #{param.reducePrice}
|
||||||
|
</if>
|
||||||
|
<if test="param.payPrice != null">
|
||||||
|
AND a.pay_price = #{param.payPrice}
|
||||||
|
</if>
|
||||||
|
<if test="param.price != null">
|
||||||
|
AND a.price = #{param.price}
|
||||||
|
</if>
|
||||||
|
<if test="param.money != null">
|
||||||
|
AND a.money = #{param.money}
|
||||||
|
</if>
|
||||||
|
<if test="param.cancelTime != null">
|
||||||
|
AND a.cancel_time LIKE CONCAT('%', #{param.cancelTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.cancelReason != null">
|
||||||
|
AND a.cancel_reason LIKE CONCAT('%', #{param.cancelReason}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.refundMoney != null">
|
||||||
|
AND a.refund_money = #{param.refundMoney}
|
||||||
|
</if>
|
||||||
|
<if test="param.coachPrice != null">
|
||||||
|
AND a.coach_price = #{param.coachPrice}
|
||||||
|
</if>
|
||||||
|
<if test="param.totalNum != null">
|
||||||
|
AND a.total_num = #{param.totalNum}
|
||||||
|
</if>
|
||||||
|
<if test="param.coachId != null">
|
||||||
|
AND a.coach_id = #{param.coachId}
|
||||||
|
</if>
|
||||||
|
<if test="param.formId != null">
|
||||||
|
AND a.form_id = #{param.formId}
|
||||||
|
</if>
|
||||||
|
<if test="param.payUserId != null">
|
||||||
|
AND a.pay_user_id = #{param.payUserId}
|
||||||
|
</if>
|
||||||
|
<if test="param.payType != null">
|
||||||
|
AND a.pay_type = #{param.payType}
|
||||||
|
</if>
|
||||||
|
<if test="param.wechatPayType != null">
|
||||||
|
AND a.wechat_pay_type LIKE CONCAT('%', #{param.wechatPayType}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.friendPayType != null">
|
||||||
|
AND a.friend_pay_type = #{param.friendPayType}
|
||||||
|
</if>
|
||||||
|
<if test="param.payStatus != null">
|
||||||
|
AND a.pay_status = #{param.payStatus}
|
||||||
|
</if>
|
||||||
|
<if test="param.orderStatus != null">
|
||||||
|
AND a.order_status = #{param.orderStatus}
|
||||||
|
</if>
|
||||||
|
<if test="param.deliveryStatus != null">
|
||||||
|
AND a.delivery_status = #{param.deliveryStatus}
|
||||||
|
</if>
|
||||||
|
<if test="param.deliveryNote != null">
|
||||||
|
AND a.delivery_note LIKE CONCAT('%', #{param.deliveryNote}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.deliveryTime != null">
|
||||||
|
AND a.delivery_time LIKE CONCAT('%', #{param.deliveryTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.evaluateStatus != null">
|
||||||
|
AND a.evaluate_status = #{param.evaluateStatus}
|
||||||
|
</if>
|
||||||
|
<if test="param.evaluateTime != null">
|
||||||
|
AND a.evaluate_time LIKE CONCAT('%', #{param.evaluateTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.couponType != null">
|
||||||
|
AND a.coupon_type = #{param.couponType}
|
||||||
|
</if>
|
||||||
|
<if test="param.couponDesc != null">
|
||||||
|
AND a.coupon_desc LIKE CONCAT('%', #{param.couponDesc}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.qrcode != null">
|
||||||
|
AND a.qrcode LIKE CONCAT('%', #{param.qrcode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.returnNum != null">
|
||||||
|
AND a.return_num = #{param.returnNum}
|
||||||
|
</if>
|
||||||
|
<if test="param.returnMoney != null">
|
||||||
|
AND a.return_money = #{param.returnMoney}
|
||||||
|
</if>
|
||||||
|
<if test="param.startTime != null">
|
||||||
|
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.isInvoice != null">
|
||||||
|
AND a.is_invoice = #{param.isInvoice}
|
||||||
|
</if>
|
||||||
|
<if test="param.invoiceNo != null">
|
||||||
|
AND a.invoice_no LIKE CONCAT('%', #{param.invoiceNo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantRemarks != null">
|
||||||
|
AND a.merchant_remarks LIKE CONCAT('%', #{param.merchantRemarks}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.payTime != null">
|
||||||
|
AND a.pay_time LIKE CONCAT('%', #{param.payTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.refundTime != null">
|
||||||
|
AND a.refund_time LIKE CONCAT('%', #{param.refundTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.refundApplyTime != null">
|
||||||
|
AND a.refund_apply_time LIKE CONCAT('%', #{param.refundApplyTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.expirationTime != null">
|
||||||
|
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.selfTakeCode != null">
|
||||||
|
AND a.self_take_code LIKE CONCAT('%', #{param.selfTakeCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.hasTakeGift != null">
|
||||||
|
AND a.has_take_gift = #{param.hasTakeGift}
|
||||||
|
</if>
|
||||||
|
<if test="param.checkBill != null">
|
||||||
|
AND a.check_bill = #{param.checkBill}
|
||||||
|
</if>
|
||||||
|
<if test="param.isSettled != null">
|
||||||
|
AND a.is_settled = #{param.isSettled}
|
||||||
|
</if>
|
||||||
|
<if test="param.version != null">
|
||||||
|
AND a.version = #{param.version}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsOrder">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsOrder">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
284
src/main/java/com/gxwebsoft/cms/param/CmsOrderParam.java
Normal file
284
src/main/java/com/gxwebsoft/cms/param/CmsOrderParam.java
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
package com.gxwebsoft.cms.param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站订单查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2026-01-27 13:03:24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@Schema(name = "CmsOrderParam对象", description = "网站订单查询参数")
|
||||||
|
public class CmsOrderParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "id")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "订单类型,0售前咨询 1售后服务 2意见反馈")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "订单标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@Schema(description = "公司/团队名称")
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
@Schema(description = "订单内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@Schema(description = "订单编号")
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
@Schema(description = "快递/自提")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer deliveryType;
|
||||||
|
|
||||||
|
@Schema(description = "下单渠道,0网站 1微信小程序 2其他")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer channel;
|
||||||
|
|
||||||
|
@Schema(description = "微信支付交易号号")
|
||||||
|
private String transactionId;
|
||||||
|
|
||||||
|
@Schema(description = "微信退款订单号")
|
||||||
|
private String refundOrder;
|
||||||
|
|
||||||
|
@Schema(description = "商户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Long merchantId;
|
||||||
|
|
||||||
|
@Schema(description = "商户名称")
|
||||||
|
private String merchantName;
|
||||||
|
|
||||||
|
@Schema(description = "商户编号")
|
||||||
|
private String merchantCode;
|
||||||
|
|
||||||
|
@Schema(description = "使用的优惠券id")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer couponId;
|
||||||
|
|
||||||
|
@Schema(description = "使用的会员卡id")
|
||||||
|
private String cardId;
|
||||||
|
|
||||||
|
@Schema(description = "关联管理员id")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer adminId;
|
||||||
|
|
||||||
|
@Schema(description = "核销管理员id")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer confirmId;
|
||||||
|
|
||||||
|
@Schema(description = "IC卡号")
|
||||||
|
private String icCard;
|
||||||
|
|
||||||
|
@Schema(description = "真实姓名")
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
@Schema(description = "关联收货地址")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer addressId;
|
||||||
|
|
||||||
|
@Schema(description = "收货地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
private String addressLat;
|
||||||
|
|
||||||
|
private String addressLng;
|
||||||
|
|
||||||
|
@Schema(description = "自提店铺id")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer selfTakeMerchantId;
|
||||||
|
|
||||||
|
@Schema(description = "自提店铺")
|
||||||
|
private String selfTakeMerchantName;
|
||||||
|
|
||||||
|
@Schema(description = "配送开始时间")
|
||||||
|
private String sendStartTime;
|
||||||
|
|
||||||
|
@Schema(description = "配送结束时间")
|
||||||
|
private String sendEndTime;
|
||||||
|
|
||||||
|
@Schema(description = "发货店铺id")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer expressMerchantId;
|
||||||
|
|
||||||
|
@Schema(description = "发货店铺")
|
||||||
|
private String expressMerchantName;
|
||||||
|
|
||||||
|
@Schema(description = "订单总额")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal totalPrice;
|
||||||
|
|
||||||
|
@Schema(description = "减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal reducePrice;
|
||||||
|
|
||||||
|
@Schema(description = "实际付款")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal payPrice;
|
||||||
|
|
||||||
|
@Schema(description = "用于统计")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
@Schema(description = "价钱,用于积分赠送")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
|
@Schema(description = "取消时间")
|
||||||
|
private String cancelTime;
|
||||||
|
|
||||||
|
@Schema(description = "取消原因")
|
||||||
|
private String cancelReason;
|
||||||
|
|
||||||
|
@Schema(description = "退款金额")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal refundMoney;
|
||||||
|
|
||||||
|
@Schema(description = "教练价格")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal coachPrice;
|
||||||
|
|
||||||
|
@Schema(description = "购买数量")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer totalNum;
|
||||||
|
|
||||||
|
@Schema(description = "教练id")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer coachId;
|
||||||
|
|
||||||
|
@Schema(description = "商品ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer formId;
|
||||||
|
|
||||||
|
@Schema(description = "支付的用户id")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer payUserId;
|
||||||
|
|
||||||
|
@Schema(description = "0余额支付,1微信支付,2支付宝支付,3银联支付,4现金支付,5POS机支付,6免费,7积分支付")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer payType;
|
||||||
|
|
||||||
|
@Schema(description = "微信支付子类型:JSAPI小程序支付,NATIVE扫码支付")
|
||||||
|
private String wechatPayType;
|
||||||
|
|
||||||
|
@Schema(description = "0余额支付,1微信支付,2支付宝支付,3银联支付,4现金支付,5POS机支付,6免费,7积分支付")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer friendPayType;
|
||||||
|
|
||||||
|
@Schema(description = "0未付款,1已付款")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer payStatus;
|
||||||
|
|
||||||
|
@Schema(description = "0未使用,1已完成,2已取消,3取消中,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer orderStatus;
|
||||||
|
|
||||||
|
@Schema(description = "发货状态(10未发货 20已发货 30部分发货)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer deliveryStatus;
|
||||||
|
|
||||||
|
@Schema(description = "无需发货备注")
|
||||||
|
private String deliveryNote;
|
||||||
|
|
||||||
|
@Schema(description = "发货时间")
|
||||||
|
private String deliveryTime;
|
||||||
|
|
||||||
|
@Schema(description = "评价状态(0未评价 1已评价)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer evaluateStatus;
|
||||||
|
|
||||||
|
@Schema(description = "评价时间")
|
||||||
|
private String evaluateTime;
|
||||||
|
|
||||||
|
@Schema(description = "优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer couponType;
|
||||||
|
|
||||||
|
@Schema(description = "优惠说明")
|
||||||
|
private String couponDesc;
|
||||||
|
|
||||||
|
@Schema(description = "二维码地址,保存订单号,支付成功后才生成")
|
||||||
|
private String qrcode;
|
||||||
|
|
||||||
|
@Schema(description = "vip月卡年卡、ic月卡年卡回退次数")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer returnNum;
|
||||||
|
|
||||||
|
@Schema(description = "vip充值回退金额")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal returnMoney;
|
||||||
|
|
||||||
|
@Schema(description = "预约详情开始时间数组")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@Schema(description = "是否已开具发票:0未开发票,1已开发票,2不能开具发票")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer isInvoice;
|
||||||
|
|
||||||
|
@Schema(description = "发票流水号")
|
||||||
|
private String invoiceNo;
|
||||||
|
|
||||||
|
@Schema(description = "商家留言")
|
||||||
|
private String merchantRemarks;
|
||||||
|
|
||||||
|
@Schema(description = "支付时间")
|
||||||
|
private String payTime;
|
||||||
|
|
||||||
|
@Schema(description = "退款时间")
|
||||||
|
private String refundTime;
|
||||||
|
|
||||||
|
@Schema(description = "申请退款时间")
|
||||||
|
private String refundApplyTime;
|
||||||
|
|
||||||
|
@Schema(description = "过期时间")
|
||||||
|
private String expirationTime;
|
||||||
|
|
||||||
|
@Schema(description = "自提码")
|
||||||
|
private String selfTakeCode;
|
||||||
|
|
||||||
|
@Schema(description = "是否已收到赠品")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Boolean hasTakeGift;
|
||||||
|
|
||||||
|
@Schema(description = "对账情况:0=未对账;1=已对账;3=已对账,金额对不上;4=未查询到该订单")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer checkBill;
|
||||||
|
|
||||||
|
@Schema(description = "订单是否已结算(0未结算 1已结算)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer isSettled;
|
||||||
|
|
||||||
|
@Schema(description = "系统版本号 0当前版本 value=其他版本")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
@Schema(description = "用户id")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@Schema(description = "排序号")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@Schema(description = "是否删除, 0否, 1是")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
||||||
42
src/main/java/com/gxwebsoft/cms/service/CmsOrderService.java
Normal file
42
src/main/java/com/gxwebsoft/cms/service/CmsOrderService.java
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.cms.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.cms.entity.CmsOrder;
|
||||||
|
import com.gxwebsoft.cms.param.CmsOrderParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站订单Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2026-01-27 13:03:24
|
||||||
|
*/
|
||||||
|
public interface CmsOrderService extends IService<CmsOrder> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<CmsOrder>
|
||||||
|
*/
|
||||||
|
PageResult<CmsOrder> pageRel(CmsOrderParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<CmsOrder>
|
||||||
|
*/
|
||||||
|
List<CmsOrder> listRel(CmsOrderParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id id
|
||||||
|
* @return CmsOrder
|
||||||
|
*/
|
||||||
|
CmsOrder getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.cms.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.cms.mapper.CmsOrderMapper;
|
||||||
|
import com.gxwebsoft.cms.service.CmsOrderService;
|
||||||
|
import com.gxwebsoft.cms.entity.CmsOrder;
|
||||||
|
import com.gxwebsoft.cms.param.CmsOrderParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站订单Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2026-01-27 13:03:24
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CmsOrderServiceImpl extends ServiceImpl<CmsOrderMapper, CmsOrder> implements CmsOrderService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<CmsOrder> pageRel(CmsOrderParam param) {
|
||||||
|
PageParam<CmsOrder, CmsOrderParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||||
|
List<CmsOrder> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CmsOrder> listRel(CmsOrderParam param) {
|
||||||
|
List<CmsOrder> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<CmsOrder, CmsOrderParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CmsOrder getByIdRel(Integer id) {
|
||||||
|
CmsOrderParam param = new CmsOrderParam();
|
||||||
|
param.setId(id);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user