43 changed files with 1653 additions and 28 deletions
@ -0,0 +1,40 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>cms-order</artifactId> |
|||
<groupId>com.qs</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>cms-order-api</artifactId> |
|||
|
|||
|
|||
<properties> |
|||
<maven.compiler.source>8</maven.compiler.source> |
|||
<maven.compiler.target>8</maven.compiler.target> |
|||
</properties> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.qs</groupId> |
|||
<artifactId>cms-framework-feign</artifactId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.qs</groupId> |
|||
<artifactId>cms-common</artifactId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.qs</groupId> |
|||
<artifactId>cms-framework-mybatis-plus</artifactId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
</project> |
@ -0,0 +1,129 @@ |
|||
package com.qs.serve.modules.oms.entity; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import com.qs.serve.mbp.handler.SplitStringTypeHandler; |
|||
import lombok.Data; |
|||
import org.apache.ibatis.type.JdbcType; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* 搭赠方案 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
@TableName(value = "oms_promotion_gift",autoResultMap = true) |
|||
public class OmsPromotionGift implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 通案标题 */ |
|||
@NotBlank(message = "通案标题不能为空") |
|||
@Length(max = 255,message = "通案标题长度不能超过255字") |
|||
private String giftTitle; |
|||
|
|||
/** 通案编码 */ |
|||
@NotBlank(message = "通案编码不能为空") |
|||
@Length(max = 64,message = "通案编码长度不能超过64字") |
|||
private String giftCode; |
|||
|
|||
/** 通案状态:状态:0-暂存;1-审批中;2-完成;3-驳回;4-中止;5-作废 */ |
|||
@NotNull(message = "通案状态:状态:0-暂存;1-审批中;2-完成;3-驳回;4-中止;5-作废不能为空") |
|||
private Integer giftStatus; |
|||
|
|||
/** 生效开始时间 */ |
|||
@NotNull(message = "生效开始时间不能为空") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
private LocalDate effectStartDate; |
|||
|
|||
/** 生效结束时间 */ |
|||
@NotNull(message = "生效结束时间不能为空") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
private LocalDate effectEndDate; |
|||
|
|||
/** 允许重复使用 */ |
|||
@NotNull(message = "允许重复使用不能为空") |
|||
private Integer reuseFlag; |
|||
|
|||
/** 搭赠说明 */ |
|||
@Length(max = 655,message = "搭赠说明长度不能超过655字") |
|||
private String explainText; |
|||
|
|||
/** 申请时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
private LocalDateTime submitTime; |
|||
|
|||
/** 致远表单ID */ |
|||
@Length(max = 32,message = "致远表单ID长度不能超过32字") |
|||
private String syFormId; |
|||
|
|||
/** 致远流程id */ |
|||
@Length(max = 32,message = "致远流程id长度不能超过32字") |
|||
private String syFlowId; |
|||
|
|||
/** 审批通过时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
private LocalDateTime passingTime; |
|||
|
|||
/** 附件ID */ |
|||
@Length(max = 1024,message = "附件ID长度不能超过1024字") |
|||
@TableField(typeHandler = SplitStringTypeHandler.class,jdbcType= JdbcType.VARCHAR) |
|||
private String[] attachIds; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 600,message = "备注长度不能超过600字") |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,127 @@ |
|||
package com.qs.serve.modules.oms.entity; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* 搭赠成本中心项 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
@TableName("oms_promotion_gift_center") |
|||
public class OmsPromotionGiftCenter implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 搭赠案id */ |
|||
@NotNull(message = "搭赠案id不能为空") |
|||
private Long giftId; |
|||
|
|||
/** 活动id */ |
|||
@NotNull(message = "活动id不能为空") |
|||
private Long giftSubjectId; |
|||
|
|||
/** 科目id */ |
|||
@NotNull(message = "科目id不能为空") |
|||
private Long subjectId; |
|||
|
|||
/** 费用占比 */ |
|||
@NotNull(message = "费用占比不能为空") |
|||
private BigDecimal centerRate; |
|||
|
|||
/** 成本中心类型 */ |
|||
@NotBlank(message = "成本中心类型不能为空") |
|||
@Length(max = 255,message = "成本中心类型长度不能超过255字") |
|||
private String centerType; |
|||
|
|||
/** 成本中心id */ |
|||
@NotBlank(message = "成本中心id不能为空") |
|||
@Length(max = 32,message = "成本中心id长度不能超过32字") |
|||
private String centerId; |
|||
|
|||
/** 成本中心编码 */ |
|||
@NotBlank(message = "成本中心编码不能为空") |
|||
@Length(max = 50,message = "成本中心编码长度不能超过50字") |
|||
private String centerCode; |
|||
|
|||
/** 成本中心名称 */ |
|||
@NotBlank(message = "成本中心名称不能为空") |
|||
@Length(max = 200,message = "成本中心名称长度不能超过200字") |
|||
private String centerName; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 600,message = "备注长度不能超过600字") |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
|
|||
public static OmsPromotionGiftCenter toNewObject(OmsPromotionGiftCenter source){ |
|||
OmsPromotionGiftCenter promotionGiftCenter = new OmsPromotionGiftCenter(); |
|||
promotionGiftCenter.setId(source.getId()); |
|||
promotionGiftCenter.setGiftId(source.getGiftId()); |
|||
promotionGiftCenter.setGiftSubjectId(source.getGiftSubjectId()); |
|||
promotionGiftCenter.setSubjectId(source.getSubjectId()); |
|||
promotionGiftCenter.setCenterRate(source.getCenterRate()); |
|||
promotionGiftCenter.setCenterType(source.getCenterType()); |
|||
promotionGiftCenter.setCenterId(source.getCenterId()); |
|||
promotionGiftCenter.setCenterCode(source.getCenterCode()); |
|||
promotionGiftCenter.setCenterName(source.getCenterName()); |
|||
promotionGiftCenter.setRemark(source.getRemark()); |
|||
promotionGiftCenter.setCreateTime(source.getCreateTime()); |
|||
promotionGiftCenter.setUpdateTime(source.getUpdateTime()); |
|||
promotionGiftCenter.setTenantId(source.getTenantId()); |
|||
promotionGiftCenter.setCreateBy(source.getCreateBy()); |
|||
promotionGiftCenter.setUpdateBy(source.getUpdateBy()); |
|||
promotionGiftCenter.setDelFlag(source.getDelFlag()); |
|||
return promotionGiftCenter; |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,115 @@ |
|||
package com.qs.serve.modules.oms.entity; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* 搭赠规则的赠品 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
@TableName("oms_promotion_gift_goods") |
|||
public class OmsPromotionGiftGoods implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 通案id */ |
|||
@NotNull(message = "通案id不能为空") |
|||
private Long giftId; |
|||
|
|||
/** 规则明细id */ |
|||
private Long giftItemId; |
|||
|
|||
/** 商品类型 */ |
|||
@Length(max = 255,message = "商品类型长度不能超过255字") |
|||
private String goodsType; |
|||
|
|||
/** 商品id */ |
|||
private Long goodsId; |
|||
|
|||
/** 商品编码 */ |
|||
@Length(max = 255,message = "商品编码长度不能超过255字") |
|||
private String goodsCode; |
|||
|
|||
/** 商品名称 */ |
|||
@Length(max = 255,message = "商品名称长度不能超过255字") |
|||
private String goodsName; |
|||
|
|||
/** 优先级(ASC) */ |
|||
private Integer sort; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 600,message = "备注长度不能超过600字") |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
|
|||
public static OmsPromotionGiftGoods toNewObject(OmsPromotionGiftGoods source){ |
|||
OmsPromotionGiftGoods promotionGiftGoods = new OmsPromotionGiftGoods(); |
|||
promotionGiftGoods.setId(source.getId()); |
|||
promotionGiftGoods.setGiftId(source.getGiftId()); |
|||
promotionGiftGoods.setGiftItemId(source.getGiftItemId()); |
|||
promotionGiftGoods.setGoodsType(source.getGoodsType()); |
|||
promotionGiftGoods.setGoodsId(source.getGoodsId()); |
|||
promotionGiftGoods.setGoodsCode(source.getGoodsCode()); |
|||
promotionGiftGoods.setGoodsName(source.getGoodsName()); |
|||
promotionGiftGoods.setSort(source.getSort()); |
|||
promotionGiftGoods.setRemark(source.getRemark()); |
|||
promotionGiftGoods.setCreateTime(source.getCreateTime()); |
|||
promotionGiftGoods.setUpdateTime(source.getUpdateTime()); |
|||
promotionGiftGoods.setTenantId(source.getTenantId()); |
|||
promotionGiftGoods.setCreateBy(source.getCreateBy()); |
|||
promotionGiftGoods.setUpdateBy(source.getUpdateBy()); |
|||
promotionGiftGoods.setDelFlag(source.getDelFlag()); |
|||
return promotionGiftGoods; |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,78 @@ |
|||
package com.qs.serve.modules.oms.entity; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* 搭赠规则明细 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
@TableName("oms_promotion_gift_item") |
|||
public class OmsPromotionGiftItem implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 通案id */ |
|||
@NotNull(message = "通案id不能为空") |
|||
private Long giftId; |
|||
|
|||
/** 商品类型 */ |
|||
@Length(max = 255,message = "商品类型长度不能超过255字") |
|||
private String goodsType; |
|||
|
|||
/** 商品id */ |
|||
private Long goodsId; |
|||
|
|||
/** 商品编码 */ |
|||
@Length(max = 255,message = "商品编码长度不能超过255字") |
|||
private String goodsCode; |
|||
|
|||
/** 商品名称 */ |
|||
@Length(max = 255,message = "商品名称长度不能超过255字") |
|||
private String goodsName; |
|||
|
|||
/** 起订量 */ |
|||
private Integer minPurchaseQty; |
|||
|
|||
/** 满足数量 */ |
|||
private Integer meetQty; |
|||
|
|||
/** 赠品数量 */ |
|||
private Integer giftQty; |
|||
|
|||
|
|||
public static OmsPromotionGiftItem toNewObject(OmsPromotionGiftItem source){ |
|||
OmsPromotionGiftItem promotionGiftItem = new OmsPromotionGiftItem(); |
|||
promotionGiftItem.setId(source.getId()); |
|||
promotionGiftItem.setGiftId(source.getGiftId()); |
|||
promotionGiftItem.setGoodsType(source.getGoodsType()); |
|||
promotionGiftItem.setGoodsId(source.getGoodsId()); |
|||
promotionGiftItem.setGoodsCode(source.getGoodsCode()); |
|||
promotionGiftItem.setGoodsName(source.getGoodsName()); |
|||
promotionGiftItem.setMinPurchaseQty(source.getMinPurchaseQty()); |
|||
promotionGiftItem.setMeetQty(source.getMeetQty()); |
|||
promotionGiftItem.setGiftQty(source.getGiftQty()); |
|||
return promotionGiftItem; |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,112 @@ |
|||
package com.qs.serve.modules.oms.entity; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* 搭赠适用范围 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
@TableName("oms_promotion_gift_scope") |
|||
public class OmsPromotionGiftScope implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 搭赠id */ |
|||
@NotNull(message = "搭赠id不能为空") |
|||
private Long giftId; |
|||
|
|||
/** 区域类型:customer,saleRegion,bizRegion */ |
|||
@NotBlank(message = "区域类型:customer,saleRegion,bizRegion不能为空") |
|||
@Length(max = 255,message = "区域类型:customer,saleRegion,bizRegion长度不能超过255字") |
|||
private String regionType; |
|||
|
|||
/** 区域id */ |
|||
@NotBlank(message = "区域id不能为空") |
|||
@Length(max = 20,message = "区域id长度不能超过20字") |
|||
private String regionId; |
|||
|
|||
/** 区域编码 */ |
|||
@NotBlank(message = "区域编码不能为空") |
|||
@Length(max = 50,message = "区域编码长度不能超过50字") |
|||
private String regionCode; |
|||
|
|||
/** 区域名称 */ |
|||
@NotBlank(message = "区域名称不能为空") |
|||
@Length(max = 50,message = "区域名称长度不能超过50字") |
|||
private String regionName; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 255,message = "备注长度不能超过255字") |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
|
|||
public static OmsPromotionGiftScope toNewObject(OmsPromotionGiftScope source){ |
|||
OmsPromotionGiftScope promotionGiftScope = new OmsPromotionGiftScope(); |
|||
promotionGiftScope.setId(source.getId()); |
|||
promotionGiftScope.setGiftId(source.getGiftId()); |
|||
promotionGiftScope.setRegionType(source.getRegionType()); |
|||
promotionGiftScope.setRegionId(source.getRegionId()); |
|||
promotionGiftScope.setRegionCode(source.getRegionCode()); |
|||
promotionGiftScope.setRegionName(source.getRegionName()); |
|||
promotionGiftScope.setRemark(source.getRemark()); |
|||
promotionGiftScope.setCreateTime(source.getCreateTime()); |
|||
promotionGiftScope.setUpdateTime(source.getUpdateTime()); |
|||
promotionGiftScope.setTenantId(source.getTenantId()); |
|||
promotionGiftScope.setCreateBy(source.getCreateBy()); |
|||
promotionGiftScope.setUpdateBy(source.getUpdateBy()); |
|||
promotionGiftScope.setDelFlag(source.getDelFlag()); |
|||
return promotionGiftScope; |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,109 @@ |
|||
package com.qs.serve.modules.oms.entity; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* 搭赠科目项 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
@TableName("oms_promotion_gift_subject") |
|||
public class OmsPromotionGiftSubject implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 搭赠id */ |
|||
@NotNull(message = "搭赠id不能为空") |
|||
private Long giftId; |
|||
|
|||
/** 科目id */ |
|||
@NotNull(message = "科目id不能为空") |
|||
private Long subjectId; |
|||
|
|||
/** 科目编码 */ |
|||
@NotBlank(message = "科目编码不能为空") |
|||
@Length(max = 50,message = "科目编码长度不能超过50字") |
|||
private String subjectCode; |
|||
|
|||
/** 科目名称 */ |
|||
@NotBlank(message = "科目名称不能为空") |
|||
@Length(max = 50,message = "科目名称长度不能超过50字") |
|||
private String subjectName; |
|||
|
|||
/** 科目比例 */ |
|||
private BigDecimal subjectRate; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 255,message = "备注长度不能超过255字") |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
|
|||
public static OmsPromotionGiftSubject toNewObject(OmsPromotionGiftSubject source){ |
|||
OmsPromotionGiftSubject promotionGiftSubject = new OmsPromotionGiftSubject(); |
|||
promotionGiftSubject.setId(source.getId()); |
|||
promotionGiftSubject.setGiftId(source.getGiftId()); |
|||
promotionGiftSubject.setSubjectId(source.getSubjectId()); |
|||
promotionGiftSubject.setSubjectCode(source.getSubjectCode()); |
|||
promotionGiftSubject.setSubjectName(source.getSubjectName()); |
|||
promotionGiftSubject.setSubjectRate(source.getSubjectRate()); |
|||
promotionGiftSubject.setRemark(source.getRemark()); |
|||
promotionGiftSubject.setCreateTime(source.getCreateTime()); |
|||
promotionGiftSubject.setUpdateTime(source.getUpdateTime()); |
|||
promotionGiftSubject.setTenantId(source.getTenantId()); |
|||
promotionGiftSubject.setCreateBy(source.getCreateBy()); |
|||
promotionGiftSubject.setUpdateBy(source.getUpdateBy()); |
|||
promotionGiftSubject.setDelFlag(source.getDelFlag()); |
|||
return promotionGiftSubject; |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,100 @@ |
|||
package com.qs.serve.modules.oms.entity.bo; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.qs.serve.mbp.handler.SplitStringTypeHandler; |
|||
import lombok.Data; |
|||
import org.apache.ibatis.type.JdbcType; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.time.LocalDate; |
|||
import java.time.LocalDateTime; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author YenHex |
|||
* @since 2025/6/5 |
|||
*/ |
|||
@Data |
|||
public class OmsPromotionGiftBo { |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 通案标题 */ |
|||
@NotBlank(message = "通案标题不能为空") |
|||
@Length(max = 255,message = "通案标题长度不能超过255字") |
|||
private String giftTitle; |
|||
|
|||
/** 通案编码 */ |
|||
@NotBlank(message = "通案编码不能为空") |
|||
@Length(max = 64,message = "通案编码长度不能超过64字") |
|||
private String giftCode; |
|||
//
|
|||
// /** 通案状态:状态:0-暂存;1-审批中;2-完成;3-驳回;4-中止;5-作废 */
|
|||
// @NotNull(message = "通案状态:状态:0-暂存;1-审批中;2-完成;3-驳回;4-中止;5-作废不能为空")
|
|||
// private Integer giftStatus;
|
|||
|
|||
/** 生效开始时间 */ |
|||
@NotNull(message = "生效开始时间不能为空") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
private LocalDate effectStartDate; |
|||
|
|||
/** 生效结束时间 */ |
|||
@NotNull(message = "生效结束时间不能为空") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|||
private LocalDate effectEndDate; |
|||
|
|||
/** 允许重复使用 */ |
|||
@NotNull(message = "允许重复使用不能为空") |
|||
private Integer reuseFlag; |
|||
|
|||
/** 搭赠说明 */ |
|||
@Length(max = 655,message = "搭赠说明长度不能超过655字") |
|||
private String explainText; |
|||
//
|
|||
// /** 申请时间 */
|
|||
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|||
// private LocalDateTime submitTime;
|
|||
//
|
|||
// /** 致远表单ID */
|
|||
// @Length(max = 32,message = "致远表单ID长度不能超过32字")
|
|||
// private String syFormId;
|
|||
//
|
|||
// /** 致远流程id */
|
|||
// @Length(max = 32,message = "致远流程id长度不能超过32字")
|
|||
// private String syFlowId;
|
|||
//
|
|||
// /** 审批通过时间 */
|
|||
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|||
// private LocalDateTime passingTime;
|
|||
|
|||
/** 附件ID */ |
|||
@Length(max = 1024,message = "附件ID长度不能超过1024字") |
|||
@TableField(typeHandler = SplitStringTypeHandler.class,jdbcType= JdbcType.VARCHAR) |
|||
private String[] attachIds; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 600,message = "备注长度不能超过600字") |
|||
private String remark; |
|||
|
|||
/** 科目列表 */ |
|||
private List<OmsPromotionGiftSubjectBo> subjectList; |
|||
|
|||
/** 区域列表 */ |
|||
private List<OmsPromotionGiftScopeBo> scopeList; |
|||
|
|||
/** 搭赠商品规则列表 */ |
|||
private List<OmsPromotionGiftItemBo> itemList; |
|||
|
|||
} |
@ -0,0 +1,58 @@ |
|||
package com.qs.serve.modules.oms.entity.bo; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 搭赠成本中心项 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
public class OmsPromotionGiftCenterBo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 科目id */ |
|||
@NotNull(message = "科目id不能为空") |
|||
private Long subjectId; |
|||
|
|||
/** 费用占比 */ |
|||
@NotNull(message = "费用占比不能为空") |
|||
private BigDecimal centerRate; |
|||
|
|||
/** 成本中心类型 */ |
|||
@NotBlank(message = "成本中心类型不能为空") |
|||
@Length(max = 255,message = "成本中心类型长度不能超过255字") |
|||
private String centerType; |
|||
|
|||
/** 成本中心id */ |
|||
@NotBlank(message = "成本中心id不能为空") |
|||
@Length(max = 32,message = "成本中心id长度不能超过32字") |
|||
private String centerId; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 600,message = "备注长度不能超过600字") |
|||
private String remark; |
|||
|
|||
// promotionGiftCenter.setGiftId(source.getGiftId());
|
|||
// promotionGiftCenter.setGiftSubjectId(source.getGiftSubjectId());
|
|||
// promotionGiftCenter.setCenterCode(source.getCenterCode());
|
|||
// promotionGiftCenter.setCenterName(source.getCenterName());
|
|||
|
|||
} |
|||
|
@ -0,0 +1,50 @@ |
|||
package com.qs.serve.modules.oms.entity.bo; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 搭赠规则的赠品 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
public class OmsPromotionGiftGoodsBo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 商品类型 */ |
|||
@Length(max = 255,message = "商品类型长度不能超过255字") |
|||
private String goodsType; |
|||
|
|||
/** 商品id */ |
|||
private Long goodsId; |
|||
|
|||
/** 优先级(ASC) */ |
|||
private Integer sort; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 600,message = "备注长度不能超过600字") |
|||
private String remark; |
|||
|
|||
|
|||
|
|||
// promotionGiftGoods.setGiftId(source.getGiftId());
|
|||
// promotionGiftGoods.setGiftItemId(source.getGiftItemId());
|
|||
// promotionGiftGoods.setGoodsCode(source.getGoodsCode());
|
|||
// promotionGiftGoods.setGoodsName(source.getGoodsName());
|
|||
|
|||
} |
|||
|
@ -0,0 +1,52 @@ |
|||
package com.qs.serve.modules.oms.entity.bo; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 搭赠规则明细 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
public class OmsPromotionGiftItemBo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 商品类型 */ |
|||
@Length(max = 255,message = "商品类型长度不能超过255字") |
|||
private String goodsType; |
|||
|
|||
/** 商品id */ |
|||
private Long goodsId; |
|||
|
|||
/** 起订量 */ |
|||
private Integer minPurchaseQty; |
|||
|
|||
/** 满足数量 */ |
|||
private Integer meetQty; |
|||
|
|||
/** 赠品数量 */ |
|||
private Integer giftQty; |
|||
|
|||
/** 赠品的商品,列表为空代办搭赠下单品类 */ |
|||
List<OmsPromotionGiftGoodsBo> goodsList; |
|||
|
|||
// promotionGiftItem.setGiftId(source.getGiftId());
|
|||
// promotionGiftItem.setGoodsCode(source.getGoodsCode());
|
|||
// promotionGiftItem.setGoodsName(source.getGoodsName());
|
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,40 @@ |
|||
package com.qs.serve.modules.oms.entity.bo; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 搭赠适用范围 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
public class OmsPromotionGiftScopeBo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Long id; |
|||
|
|||
private String regionType; |
|||
|
|||
/** 区域id */ |
|||
@NotBlank(message = "区域id不能为空") |
|||
@Length(max = 20,message = "区域id长度不能超过20字") |
|||
private String regionId; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 255,message = "备注长度不能超过255字") |
|||
private String remark; |
|||
|
|||
} |
|||
|
@ -0,0 +1,53 @@ |
|||
package com.qs.serve.modules.oms.entity.bo; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 搭赠科目项 实体类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Data |
|||
public class OmsPromotionGiftSubjectBo implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 科目id */ |
|||
@NotNull(message = "科目id不能为空") |
|||
private Long subjectId; |
|||
|
|||
/** 科目比例 */ |
|||
@NotNull(message = "科目比例") |
|||
private BigDecimal subjectRate; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 255,message = "备注长度不能超过255字") |
|||
private String remark; |
|||
|
|||
List<OmsPromotionGiftCenterBo> centerList; |
|||
|
|||
//
|
|||
// promotionGiftSubject.setGiftId(source.getGiftId());
|
|||
// promotionGiftSubject.setSubjectCode(source.getSubjectCode());
|
|||
// promotionGiftSubject.setSubjectName(source.getSubjectName());
|
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,46 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>cms-order</artifactId> |
|||
<groupId>com.qs</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>cms-order-biz</artifactId> |
|||
|
|||
<properties> |
|||
<maven.compiler.source>8</maven.compiler.source> |
|||
<maven.compiler.target>8</maven.compiler.target> |
|||
</properties> |
|||
<dependencies> |
|||
|
|||
<dependency> |
|||
<groupId>com.qs</groupId> |
|||
<artifactId>cms-basic-bus</artifactId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.qs</groupId> |
|||
<artifactId>cms-order-api</artifactId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.qs</groupId> |
|||
<artifactId>cms-framework-mybatis-plus</artifactId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.qs</groupId> |
|||
<artifactId>cms-framework-redis</artifactId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.qs</groupId> |
|||
<artifactId>cms-common</artifactId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
</dependencies> |
|||
</project> |
@ -0,0 +1,105 @@ |
|||
package com.qs.serve.modules.oms.controller; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.qs.serve.common.annotation.SysLog; |
|||
import com.qs.serve.common.enums.BizType; |
|||
import com.qs.serve.common.enums.SystemModule; |
|||
import com.qs.serve.common.utils.CopierUtil; |
|||
import com.qs.serve.common.utils.PageUtil; |
|||
import com.qs.serve.common.utils.StringUtils; |
|||
import com.qs.serve.framework.base.model.PageVo; |
|||
import com.qs.serve.framework.base.model.R; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import com.qs.serve.modules.oms.entity.OmsPromotionGift; |
|||
import com.qs.serve.modules.oms.service.OmsPromotionGiftService; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 订单模块 搭赠方案 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Slf4j |
|||
@AllArgsConstructor |
|||
@RestController |
|||
@RequestMapping("oms/promotionGift") |
|||
public class OmsPromotionGiftController { |
|||
|
|||
private OmsPromotionGiftService omsPromotionGiftService; |
|||
|
|||
/** |
|||
* 翻页 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@GetMapping("/page") |
|||
//@PreAuthorize("hasRole('oms:promotionGift:query')")
|
|||
public R<PageVo<OmsPromotionGift>> getPage(OmsPromotionGift param){ |
|||
LambdaQueryWrapper<OmsPromotionGift> lqw = new LambdaQueryWrapper<>(param); |
|||
PageUtil.startPage(); |
|||
List<OmsPromotionGift> list = omsPromotionGiftService.list(lqw); |
|||
return R.byPageHelperList(list); |
|||
} |
|||
|
|||
/** |
|||
* ID查询 |
|||
* @param id |
|||
* @return |
|||
*/ |
|||
//@GetMapping("/getById/{id}")
|
|||
@SysLog(module = SystemModule.BASE, title = "搭赠方案", biz = BizType.QUERY) |
|||
//@PreAuthorize("hasRole('oms:promotionGift:query')")
|
|||
public R<OmsPromotionGift> getById(@PathVariable("id") String id){ |
|||
OmsPromotionGift omsPromotionGift = omsPromotionGiftService.getById(id); |
|||
return R.ok(omsPromotionGift); |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
* 更新 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
//@PostMapping("/updateById")
|
|||
@SysLog(module = SystemModule.BASE, title = "搭赠方案", biz = BizType.UPDATE) |
|||
public R<?> updateById(@RequestBody @Valid OmsPromotionGiftBo param){ |
|||
OmsPromotionGift entity = CopierUtil.copy(param,new OmsPromotionGift()); |
|||
boolean result = omsPromotionGiftService.updateById(entity); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
/** |
|||
* 新增 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
//@PostMapping("/save")
|
|||
@SysLog(module = SystemModule.BASE, title = "搭赠方案", biz = BizType.INSERT) |
|||
//@PreAuthorize("hasRole('oms:promotionGift:insert')")
|
|||
public R<?> save(@RequestBody @Valid OmsPromotionGiftBo param){ |
|||
OmsPromotionGift entity = CopierUtil.copy(param,new OmsPromotionGift()); |
|||
boolean result = omsPromotionGiftService.save(entity); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
/** |
|||
* 删除 |
|||
* @param ids |
|||
* @return |
|||
*/ |
|||
@DeleteMapping("/deleteById/{ids}") |
|||
@SysLog(module = SystemModule.BASE, title = "搭赠方案", biz = BizType.DELETE) |
|||
public R<?> deleteById(@PathVariable("ids") String ids){ |
|||
List<Long> idsLong = StringUtils.splitIdLong(ids); |
|||
boolean result = omsPromotionGiftService.removeByIds(idsLong); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.oms.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.oms.entity.OmsPromotionGiftCenter; |
|||
|
|||
/** |
|||
* 搭赠成本中心项 Mapper |
|||
* @author YenHex |
|||
* @date 2025-06-05 |
|||
*/ |
|||
public interface OmsPromotionGiftCenterMapper extends BaseMapper<OmsPromotionGiftCenter> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.oms.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.oms.entity.OmsPromotionGiftGoods; |
|||
|
|||
/** |
|||
* 搭赠规则的赠品 Mapper |
|||
* @author YenHex |
|||
* @date 2025-06-05 |
|||
*/ |
|||
public interface OmsPromotionGiftGoodsMapper extends BaseMapper<OmsPromotionGiftGoods> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.oms.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.oms.entity.OmsPromotionGiftItem; |
|||
|
|||
/** |
|||
* 搭赠规则明细 Mapper |
|||
* @author YenHex |
|||
* @date 2025-06-05 |
|||
*/ |
|||
public interface OmsPromotionGiftItemMapper extends BaseMapper<OmsPromotionGiftItem> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.oms.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.oms.entity.OmsPromotionGift; |
|||
|
|||
/** |
|||
* 搭赠方案 Mapper |
|||
* @author YenHex |
|||
* @date 2025-06-05 |
|||
*/ |
|||
public interface OmsPromotionGiftMapper extends BaseMapper<OmsPromotionGift> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.oms.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.oms.entity.OmsPromotionGiftScope; |
|||
|
|||
/** |
|||
* 搭赠适用范围 Mapper |
|||
* @author YenHex |
|||
* @date 2025-06-05 |
|||
*/ |
|||
public interface OmsPromotionGiftScopeMapper extends BaseMapper<OmsPromotionGiftScope> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.oms.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.oms.entity.OmsPromotionGiftSubject; |
|||
|
|||
/** |
|||
* 搭赠科目项 Mapper |
|||
* @author YenHex |
|||
* @date 2025-06-05 |
|||
*/ |
|||
public interface OmsPromotionGiftSubjectMapper extends BaseMapper<OmsPromotionGiftSubject> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,16 @@ |
|||
package com.qs.serve.modules.oms.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.qs.serve.modules.oms.entity.OmsPromotionGift; |
|||
|
|||
/** |
|||
* 搭赠方案 服务接口 |
|||
* @author YenHex |
|||
* @date 2025-06-05 |
|||
*/ |
|||
public interface OmsPromotionGiftService extends IService<OmsPromotionGift> { |
|||
|
|||
void modifyGift(OmsPromotionGift source); |
|||
|
|||
} |
|||
|
@ -0,0 +1,22 @@ |
|||
package com.qs.serve.modules.oms.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import com.qs.serve.modules.oms.entity.OmsPromotionGift; |
|||
import com.qs.serve.modules.oms.service.OmsPromotionGiftService; |
|||
import com.qs.serve.modules.oms.mapper.OmsPromotionGiftMapper; |
|||
|
|||
/** |
|||
* 搭赠方案 服务实现类 |
|||
* @author YenHex |
|||
* @since 2025-06-05 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@AllArgsConstructor |
|||
public class OmsPromotionGiftServiceImpl extends ServiceImpl<OmsPromotionGiftMapper,OmsPromotionGift> implements OmsPromotionGiftService { |
|||
|
|||
} |
|||
|
@ -0,0 +1,44 @@ |
|||
<?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.qs.serve.modules.oms.mapper.OmsPromotionGiftCenterMapper"> |
|||
|
|||
<resultMap id="omsPromotionGiftCenterMap" type="com.qs.serve.modules.oms.entity.OmsPromotionGiftCenter" > |
|||
<result property="id" column="id"/> |
|||
<result property="giftId" column="gift_id"/> |
|||
<result property="giftSubjectId" column="gift_subject_id"/> |
|||
<result property="subjectId" column="subject_id"/> |
|||
<result property="centerRate" column="center_rate"/> |
|||
<result property="centerType" column="center_type"/> |
|||
<result property="centerId" column="center_id"/> |
|||
<result property="centerCode" column="center_code"/> |
|||
<result property="centerName" column="center_name"/> |
|||
<result property="remark" column="remark"/> |
|||
<result property="createTime" column="create_time"/> |
|||
<result property="updateTime" column="update_time"/> |
|||
<result property="tenantId" column="tenant_id"/> |
|||
<result property="createBy" column="create_by"/> |
|||
<result property="updateBy" column="update_by"/> |
|||
<result property="delFlag" column="del_flag"/> |
|||
</resultMap> |
|||
|
|||
<sql id="omsPromotionGiftCenterSql"> |
|||
oms_promotion_gift_center.`id`, |
|||
oms_promotion_gift_center.`gift_id`, |
|||
oms_promotion_gift_center.`gift_subject_id`, |
|||
oms_promotion_gift_center.`subject_id`, |
|||
oms_promotion_gift_center.`center_rate`, |
|||
oms_promotion_gift_center.`center_type`, |
|||
oms_promotion_gift_center.`center_id`, |
|||
oms_promotion_gift_center.`center_code`, |
|||
oms_promotion_gift_center.`center_name`, |
|||
oms_promotion_gift_center.`remark`, |
|||
oms_promotion_gift_center.`create_time`, |
|||
oms_promotion_gift_center.`update_time`, |
|||
oms_promotion_gift_center.`tenant_id`, |
|||
oms_promotion_gift_center.`create_by`, |
|||
oms_promotion_gift_center.`update_by`, |
|||
oms_promotion_gift_center.`del_flag` </sql> |
|||
|
|||
|
|||
</mapper> |
|||
|
@ -0,0 +1,42 @@ |
|||
<?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.qs.serve.modules.oms.mapper.OmsPromotionGiftGoodsMapper"> |
|||
|
|||
<resultMap id="omsPromotionGiftGoodsMap" type="com.qs.serve.modules.oms.entity.OmsPromotionGiftGoods" > |
|||
<result property="id" column="id"/> |
|||
<result property="giftId" column="gift_id"/> |
|||
<result property="giftItemId" column="gift_item_id"/> |
|||
<result property="goodsType" column="goods_type"/> |
|||
<result property="goodsId" column="goods_id"/> |
|||
<result property="goodsCode" column="goods_code"/> |
|||
<result property="goodsName" column="goods_name"/> |
|||
<result property="sort" column="sort"/> |
|||
<result property="remark" column="remark"/> |
|||
<result property="createTime" column="create_time"/> |
|||
<result property="updateTime" column="update_time"/> |
|||
<result property="tenantId" column="tenant_id"/> |
|||
<result property="createBy" column="create_by"/> |
|||
<result property="updateBy" column="update_by"/> |
|||
<result property="delFlag" column="del_flag"/> |
|||
</resultMap> |
|||
|
|||
<sql id="omsPromotionGiftGoodsSql"> |
|||
oms_promotion_gift_goods.`id`, |
|||
oms_promotion_gift_goods.`gift_id`, |
|||
oms_promotion_gift_goods.`gift_item_id`, |
|||
oms_promotion_gift_goods.`goods_type`, |
|||
oms_promotion_gift_goods.`goods_id`, |
|||
oms_promotion_gift_goods.`goods_code`, |
|||
oms_promotion_gift_goods.`goods_name`, |
|||
oms_promotion_gift_goods.`sort`, |
|||
oms_promotion_gift_goods.`remark`, |
|||
oms_promotion_gift_goods.`create_time`, |
|||
oms_promotion_gift_goods.`update_time`, |
|||
oms_promotion_gift_goods.`tenant_id`, |
|||
oms_promotion_gift_goods.`create_by`, |
|||
oms_promotion_gift_goods.`update_by`, |
|||
oms_promotion_gift_goods.`del_flag` </sql> |
|||
|
|||
|
|||
</mapper> |
|||
|
@ -0,0 +1,30 @@ |
|||
<?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.qs.serve.modules.oms.mapper.OmsPromotionGiftItemMapper"> |
|||
|
|||
<resultMap id="omsPromotionGiftItemMap" type="com.qs.serve.modules.oms.entity.OmsPromotionGiftItem" > |
|||
<result property="id" column="id"/> |
|||
<result property="giftId" column="gift_id"/> |
|||
<result property="goodsType" column="goods_type"/> |
|||
<result property="goodsId" column="goods_id"/> |
|||
<result property="goodsCode" column="goods_code"/> |
|||
<result property="goodsName" column="goods_name"/> |
|||
<result property="minPurchaseQty" column="min_purchase_qty"/> |
|||
<result property="meetQty" column="meet_qty"/> |
|||
<result property="giftQty" column="gift_qty"/> |
|||
</resultMap> |
|||
|
|||
<sql id="omsPromotionGiftItemSql"> |
|||
oms_promotion_gift_item.`id`, |
|||
oms_promotion_gift_item.`gift_id`, |
|||
oms_promotion_gift_item.`goods_type`, |
|||
oms_promotion_gift_item.`goods_id`, |
|||
oms_promotion_gift_item.`goods_code`, |
|||
oms_promotion_gift_item.`goods_name`, |
|||
oms_promotion_gift_item.`min_purchase_qty`, |
|||
oms_promotion_gift_item.`meet_qty`, |
|||
oms_promotion_gift_item.`gift_qty` </sql> |
|||
|
|||
|
|||
</mapper> |
|||
|
@ -0,0 +1,52 @@ |
|||
<?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.qs.serve.modules.oms.mapper.OmsPromotionGiftMapper"> |
|||
|
|||
<resultMap id="omsPromotionGiftMap" type="com.qs.serve.modules.oms.entity.OmsPromotionGift" > |
|||
<result property="id" column="id"/> |
|||
<result property="giftTitle" column="gift_title"/> |
|||
<result property="giftCode" column="gift_code"/> |
|||
<result property="giftStatus" column="gift_status"/> |
|||
<result property="effectStartDate" column="effect_start_date"/> |
|||
<result property="effectEndDate" column="effect_end_date"/> |
|||
<result property="reuseFlag" column="reuse_flag"/> |
|||
<result property="explainText" column="explain_text"/> |
|||
<result property="submitTime" column="submit_time"/> |
|||
<result property="syFormId" column="sy_form_id"/> |
|||
<result property="syFlowId" column="sy_flow_id"/> |
|||
<result property="passingTime" column="passing_time"/> |
|||
<result property="attachIds" column="attach_ids" typeHandler="com.qs.serve.mbp.handler.SplitStringTypeHandler"/> |
|||
<result property="remark" column="remark"/> |
|||
<result property="createTime" column="create_time"/> |
|||
<result property="updateTime" column="update_time"/> |
|||
<result property="tenantId" column="tenant_id"/> |
|||
<result property="createBy" column="create_by"/> |
|||
<result property="updateBy" column="update_by"/> |
|||
<result property="delFlag" column="del_flag"/> |
|||
</resultMap> |
|||
|
|||
<sql id="omsPromotionGiftSql"> |
|||
oms_promotion_gift.`id`, |
|||
oms_promotion_gift.`gift_title`, |
|||
oms_promotion_gift.`gift_code`, |
|||
oms_promotion_gift.`gift_status`, |
|||
oms_promotion_gift.`effect_start_date`, |
|||
oms_promotion_gift.`effect_end_date`, |
|||
oms_promotion_gift.`reuse_flag`, |
|||
oms_promotion_gift.`explain_text`, |
|||
oms_promotion_gift.`submit_time`, |
|||
oms_promotion_gift.`sy_form_id`, |
|||
oms_promotion_gift.`sy_flow_id`, |
|||
oms_promotion_gift.`passing_time`, |
|||
oms_promotion_gift.`attach_ids`, |
|||
oms_promotion_gift.`remark`, |
|||
oms_promotion_gift.`create_time`, |
|||
oms_promotion_gift.`update_time`, |
|||
oms_promotion_gift.`tenant_id`, |
|||
oms_promotion_gift.`create_by`, |
|||
oms_promotion_gift.`update_by`, |
|||
oms_promotion_gift.`del_flag` </sql> |
|||
|
|||
|
|||
</mapper> |
|||
|
@ -0,0 +1,38 @@ |
|||
<?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.qs.serve.modules.oms.mapper.OmsPromotionGiftScopeMapper"> |
|||
|
|||
<resultMap id="omsPromotionGiftScopeMap" type="com.qs.serve.modules.oms.entity.OmsPromotionGiftScope" > |
|||
<result property="id" column="id"/> |
|||
<result property="giftId" column="gift_id"/> |
|||
<result property="regionType" column="region_type"/> |
|||
<result property="regionId" column="region_id"/> |
|||
<result property="regionCode" column="region_code"/> |
|||
<result property="regionName" column="region_name"/> |
|||
<result property="remark" column="remark"/> |
|||
<result property="createTime" column="create_time"/> |
|||
<result property="updateTime" column="update_time"/> |
|||
<result property="tenantId" column="tenant_id"/> |
|||
<result property="createBy" column="create_by"/> |
|||
<result property="updateBy" column="update_by"/> |
|||
<result property="delFlag" column="del_flag"/> |
|||
</resultMap> |
|||
|
|||
<sql id="omsPromotionGiftScopeSql"> |
|||
oms_promotion_gift_scope.`id`, |
|||
oms_promotion_gift_scope.`gift_id`, |
|||
oms_promotion_gift_scope.`region_type`, |
|||
oms_promotion_gift_scope.`region_id`, |
|||
oms_promotion_gift_scope.`region_code`, |
|||
oms_promotion_gift_scope.`region_name`, |
|||
oms_promotion_gift_scope.`remark`, |
|||
oms_promotion_gift_scope.`create_time`, |
|||
oms_promotion_gift_scope.`update_time`, |
|||
oms_promotion_gift_scope.`tenant_id`, |
|||
oms_promotion_gift_scope.`create_by`, |
|||
oms_promotion_gift_scope.`update_by`, |
|||
oms_promotion_gift_scope.`del_flag` </sql> |
|||
|
|||
|
|||
</mapper> |
|||
|
@ -0,0 +1,38 @@ |
|||
<?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.qs.serve.modules.oms.mapper.OmsPromotionGiftSubjectMapper"> |
|||
|
|||
<resultMap id="omsPromotionGiftSubjectMap" type="com.qs.serve.modules.oms.entity.OmsPromotionGiftSubject" > |
|||
<result property="id" column="id"/> |
|||
<result property="giftId" column="gift_id"/> |
|||
<result property="subjectId" column="subject_id"/> |
|||
<result property="subjectCode" column="subject_code"/> |
|||
<result property="subjectName" column="subject_name"/> |
|||
<result property="subjectRate" column="subject_rate"/> |
|||
<result property="remark" column="remark"/> |
|||
<result property="createTime" column="create_time"/> |
|||
<result property="updateTime" column="update_time"/> |
|||
<result property="tenantId" column="tenant_id"/> |
|||
<result property="createBy" column="create_by"/> |
|||
<result property="updateBy" column="update_by"/> |
|||
<result property="delFlag" column="del_flag"/> |
|||
</resultMap> |
|||
|
|||
<sql id="omsPromotionGiftSubjectSql"> |
|||
oms_promotion_gift_subject.`id`, |
|||
oms_promotion_gift_subject.`gift_id`, |
|||
oms_promotion_gift_subject.`subject_id`, |
|||
oms_promotion_gift_subject.`subject_code`, |
|||
oms_promotion_gift_subject.`subject_name`, |
|||
oms_promotion_gift_subject.`subject_rate`, |
|||
oms_promotion_gift_subject.`remark`, |
|||
oms_promotion_gift_subject.`create_time`, |
|||
oms_promotion_gift_subject.`update_time`, |
|||
oms_promotion_gift_subject.`tenant_id`, |
|||
oms_promotion_gift_subject.`create_by`, |
|||
oms_promotion_gift_subject.`update_by`, |
|||
oms_promotion_gift_subject.`del_flag` </sql> |
|||
|
|||
|
|||
</mapper> |
|||
|
@ -0,0 +1,24 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>cms-modules</artifactId> |
|||
<groupId>com.qs</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>cms-order</artifactId> |
|||
<packaging>pom</packaging> |
|||
<modules> |
|||
<module>cms-order-api</module> |
|||
<module>cms-order-biz</module> |
|||
</modules> |
|||
|
|||
<properties> |
|||
<maven.compiler.source>8</maven.compiler.source> |
|||
<maven.compiler.target>8</maven.compiler.target> |
|||
</properties> |
|||
|
|||
</project> |
Loading…
Reference in new issue