diff --git a/muyu-modules/muyu-job/src/main/resources/bootstrap.yml b/muyu-modules/muyu-job/src/main/resources/bootstrap.yml index f57fd73..1a1ee1e 100644 --- a/muyu-modules/muyu-job/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-job/src/main/resources/bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 9203 + port: 9204 # Spring spring: diff --git a/muyu-modules/muyu-marketing/marketing-common/pom.xml b/muyu-modules/muyu-marketing/marketing-common/pom.xml new file mode 100644 index 0000000..22a6fbf --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-common/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + com.muyu + muyu-marketing + 3.6.3 + + + marketing-common + + + 17 + 17 + UTF-8 + + + + + com.muyu + muyu-common-core + + + + diff --git a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamInfo.java b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamInfo.java new file mode 100644 index 0000000..b3bad35 --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamInfo.java @@ -0,0 +1,395 @@ +package com.muyu.marketing.domain; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import javax.validation.constraints.NotNull; + +import java.io.Serializable; + +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import org.hibernate.validator.constraints.Length; + +/** +* 商品拼团信息 +* @TableName activity_team_info +*/ +public class ActivityTeamInfo implements Serializable { + + /** + * 主键 + */ + @NotNull(message="[主键]不能为空") + @ApiModelProperty("主键") + private Integer id; + /** + * 拼团名称 + */ + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("拼团名称") + @Length(max= 255,message="编码长度不能超过255") + private String name; + /** + * 商品ID + */ + @NotNull(message="[商品ID]不能为空") + @ApiModelProperty("商品ID") + private Long productId; + /** + * 商品活动图 + */ + @NotBlank(message="[商品活动图]不能为空") + @Size(max= 128,message="编码长度不能超过128") + @ApiModelProperty("商品活动图") + @Length(max= 128,message="编码长度不能超过128") + private String productImage; + /** + * 活动简介 + */ + @Size(max= -1,message="编码长度不能超过-1") + @ApiModelProperty("活动简介") + @Length(max= -1,message="编码长度不能超过-1") + private String introduction; + /** + * 单位 + */ + @NotBlank(message="[单位]不能为空") + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("单位") + @Length(max= 255,message="编码长度不能超过255") + private String unit; + /** + * 轮播图 + */ + @NotBlank(message="[轮播图]不能为空") + @Size(max= -1,message="编码长度不能超过-1") + @ApiModelProperty("轮播图") + @Length(max= -1,message="编码长度不能超过-1") + private String imageList; + /** + * 活动结束时间 + */ + @NotNull(message="[活动结束时间]不能为空") + @ApiModelProperty("活动结束时间") + private Date endTime; + /** + * 活动排序 + */ + @NotNull(message="[活动排序]不能为空") + @ApiModelProperty("活动排序") + private Integer sort; + /** + * 活动详情 + */ + @Size(max= -1,message="编码长度不能超过-1") + @ApiModelProperty("活动详情") + @Length(max= -1,message="编码长度不能超过-1") + private String content; + /** + * 活动状态 + */ + @NotBlank(message="[活动状态]不能为空") + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("活动状态") + @Length(max= 32,message="编码长度不能超过32") + private String status; + /** + * 策略类型 + */ + @NotBlank(message="[策略类型]不能为空") + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("策略类型") + @Length(max= 32,message="编码长度不能超过32") + private String strategyType; + /** + * 策略ID + */ + @NotNull(message="[策略ID]不能为空") + @ApiModelProperty("策略ID") + private Long strategyId; + /** + * 备注 + */ + @Size(max= 900,message="编码长度不能超过900") + @ApiModelProperty("备注") + @Length(max= 900,message="编码长度不能超过900") + private String remark; + /** + * 创建人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("创建人") + @Length(max= 32,message="编码长度不能超过32") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + private Date createTime; + /** + * 修改人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("修改人") + @Length(max= 32,message="编码长度不能超过32") + private String updateBy; + /** + * 修改时间 + */ + @ApiModelProperty("修改时间") + private Date updateTime; + + /** + * 主键 + */ + private void setId(Integer id){ + this.id = id; + } + + /** + * 拼团名称 + */ + private void setName(String name){ + this.name = name; + } + + /** + * 商品ID + */ + private void setProductId(Long productId){ + this.productId = productId; + } + + /** + * 商品活动图 + */ + private void setProductImage(String productImage){ + this.productImage = productImage; + } + + /** + * 活动简介 + */ + private void setIntroduction(String introduction){ + this.introduction = introduction; + } + + /** + * 单位 + */ + private void setUnit(String unit){ + this.unit = unit; + } + + /** + * 轮播图 + */ + private void setImageList(String imageList){ + this.imageList = imageList; + } + + /** + * 活动结束时间 + */ + private void setEndTime(Date endTime){ + this.endTime = endTime; + } + + /** + * 活动排序 + */ + private void setSort(Integer sort){ + this.sort = sort; + } + + /** + * 活动详情 + */ + private void setContent(String content){ + this.content = content; + } + + /** + * 活动状态 + */ + private void setStatus(String status){ + this.status = status; + } + + /** + * 策略类型 + */ + private void setStrategyType(String strategyType){ + this.strategyType = strategyType; + } + + /** + * 策略ID + */ + private void setStrategyId(Long strategyId){ + this.strategyId = strategyId; + } + + /** + * 备注 + */ + private void setRemark(String remark){ + this.remark = remark; + } + + /** + * 创建人 + */ + private void setCreateBy(String createBy){ + this.createBy = createBy; + } + + /** + * 创建时间 + */ + private void setCreateTime(Date createTime){ + this.createTime = createTime; + } + + /** + * 修改人 + */ + private void setUpdateBy(String updateBy){ + this.updateBy = updateBy; + } + + /** + * 修改时间 + */ + private void setUpdateTime(Date updateTime){ + this.updateTime = updateTime; + } + + + /** + * 主键 + */ + private Integer getId(){ + return this.id; + } + + /** + * 拼团名称 + */ + private String getName(){ + return this.name; + } + + /** + * 商品ID + */ + private Long getProductId(){ + return this.productId; + } + + /** + * 商品活动图 + */ + private String getProductImage(){ + return this.productImage; + } + + /** + * 活动简介 + */ + private String getIntroduction(){ + return this.introduction; + } + + /** + * 单位 + */ + private String getUnit(){ + return this.unit; + } + + /** + * 轮播图 + */ + private String getImageList(){ + return this.imageList; + } + + /** + * 活动结束时间 + */ + private Date getEndTime(){ + return this.endTime; + } + + /** + * 活动排序 + */ + private Integer getSort(){ + return this.sort; + } + + /** + * 活动详情 + */ + private String getContent(){ + return this.content; + } + + /** + * 活动状态 + */ + private String getStatus(){ + return this.status; + } + + /** + * 策略类型 + */ + private String getStrategyType(){ + return this.strategyType; + } + + /** + * 策略ID + */ + private Long getStrategyId(){ + return this.strategyId; + } + + /** + * 备注 + */ + private String getRemark(){ + return this.remark; + } + + /** + * 创建人 + */ + private String getCreateBy(){ + return this.createBy; + } + + /** + * 创建时间 + */ + private Date getCreateTime(){ + return this.createTime; + } + + /** + * 修改人 + */ + private String getUpdateBy(){ + return this.updateBy; + } + + /** + * 修改时间 + */ + private Date getUpdateTime(){ + return this.updateTime; + } + +} diff --git a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamOpenInfo.java b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamOpenInfo.java new file mode 100644 index 0000000..99d45b5 --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamOpenInfo.java @@ -0,0 +1,379 @@ +package com.muyu.marketing.domain; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import javax.validation.constraints.NotNull; + +import java.io.Serializable; + +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import org.hibernate.validator.constraints.Length; + +/** +* 团购活动执行表 +* @TableName activity_team_open_info +*/ +public class ActivityTeamOpenInfo implements Serializable { + + /** + * 主键 + */ + @NotNull(message="[主键]不能为空") + @ApiModelProperty("主键") + private Integer id; + /** + * 团购活动ID + */ + @NotNull(message="[团购活动ID]不能为空") + @ApiModelProperty("团购活动ID") + private Long teamId; + /** + * 团购类型 + */ + @NotBlank(message="[团购类型]不能为空") + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("团购类型") + @Length(max= 255,message="编码长度不能超过255") + private String teamType; + /** + * 团购策略 + */ + @NotBlank(message="[团购策略]不能为空") + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("团购策略") + @Length(max= 255,message="编码长度不能超过255") + private String teamStrategyId; + /** + * 参团类型 + */ + @NotBlank(message="[参团类型]不能为空") + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("参团类型") + @Length(max= 32,message="编码长度不能超过32") + private String executiveType; + /** + * 结束团购时间 + */ + @NotNull(message="[结束团购时间]不能为空") + @ApiModelProperty("结束团购时间") + private Date endTime; + /** + * 商品ID + */ + @NotBlank(message="[商品ID]不能为空") + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("商品ID") + @Length(max= 255,message="编码长度不能超过255") + private String productId; + /** + * 商品名称 + */ + @NotBlank(message="[商品名称]不能为空") + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("商品名称") + @Length(max= 255,message="编码长度不能超过255") + private String productName; + /** + * 商品规格 + */ + @NotBlank(message="[商品规格]不能为空") + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("商品规格") + @Length(max= 255,message="编码长度不能超过255") + private String productSku; + /** + * 开团标识 + */ + @NotBlank(message="[开团标识]不能为空") + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("开团标识") + @Length(max= 255,message="编码长度不能超过255") + private String key; + /** + * 订单ID + */ + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("订单ID") + @Length(max= 255,message="编码长度不能超过255") + private String orderId; + /** + * 开团状态 + */ + @NotBlank(message="[开团状态]不能为空") + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("开团状态") + @Length(max= 255,message="编码长度不能超过255") + private String status; + /** + * 创建人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("创建人") + @Length(max= 32,message="编码长度不能超过32") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + private Date createTime; + /** + * 修改人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("修改人") + @Length(max= 32,message="编码长度不能超过32") + private String updateBy; + /** + * 修改时间 + */ + @ApiModelProperty("修改时间") + private Date updateTime; + /** + * 备注 + */ + @Size(max= 900,message="编码长度不能超过900") + @ApiModelProperty("备注") + @Length(max= 900,message="编码长度不能超过900") + private String remark; + + /** + * 主键 + */ + private void setId(Integer id){ + this.id = id; + } + + /** + * 团购活动ID + */ + private void setTeamId(Long teamId){ + this.teamId = teamId; + } + + /** + * 团购类型 + */ + private void setTeamType(String teamType){ + this.teamType = teamType; + } + + /** + * 团购策略 + */ + private void setTeamStrategyId(String teamStrategyId){ + this.teamStrategyId = teamStrategyId; + } + + /** + * 参团类型 + */ + private void setExecutiveType(String executiveType){ + this.executiveType = executiveType; + } + + /** + * 结束团购时间 + */ + private void setEndTime(Date endTime){ + this.endTime = endTime; + } + + /** + * 商品ID + */ + private void setProductId(String productId){ + this.productId = productId; + } + + /** + * 商品名称 + */ + private void setProductName(String productName){ + this.productName = productName; + } + + /** + * 商品规格 + */ + private void setProductSku(String productSku){ + this.productSku = productSku; + } + + /** + * 开团标识 + */ + private void setKey(String key){ + this.key = key; + } + + /** + * 订单ID + */ + private void setOrderId(String orderId){ + this.orderId = orderId; + } + + /** + * 开团状态 + */ + private void setStatus(String status){ + this.status = status; + } + + /** + * 创建人 + */ + private void setCreateBy(String createBy){ + this.createBy = createBy; + } + + /** + * 创建时间 + */ + private void setCreateTime(Date createTime){ + this.createTime = createTime; + } + + /** + * 修改人 + */ + private void setUpdateBy(String updateBy){ + this.updateBy = updateBy; + } + + /** + * 修改时间 + */ + private void setUpdateTime(Date updateTime){ + this.updateTime = updateTime; + } + + /** + * 备注 + */ + private void setRemark(String remark){ + this.remark = remark; + } + + + /** + * 主键 + */ + private Integer getId(){ + return this.id; + } + + /** + * 团购活动ID + */ + private Long getTeamId(){ + return this.teamId; + } + + /** + * 团购类型 + */ + private String getTeamType(){ + return this.teamType; + } + + /** + * 团购策略 + */ + private String getTeamStrategyId(){ + return this.teamStrategyId; + } + + /** + * 参团类型 + */ + private String getExecutiveType(){ + return this.executiveType; + } + + /** + * 结束团购时间 + */ + private Date getEndTime(){ + return this.endTime; + } + + /** + * 商品ID + */ + private String getProductId(){ + return this.productId; + } + + /** + * 商品名称 + */ + private String getProductName(){ + return this.productName; + } + + /** + * 商品规格 + */ + private String getProductSku(){ + return this.productSku; + } + + /** + * 开团标识 + */ + private String getKey(){ + return this.key; + } + + /** + * 订单ID + */ + private String getOrderId(){ + return this.orderId; + } + + /** + * 开团状态 + */ + private String getStatus(){ + return this.status; + } + + /** + * 创建人 + */ + private String getCreateBy(){ + return this.createBy; + } + + /** + * 创建时间 + */ + private Date getCreateTime(){ + return this.createTime; + } + + /** + * 修改人 + */ + private String getUpdateBy(){ + return this.updateBy; + } + + /** + * 修改时间 + */ + private Date getUpdateTime(){ + return this.updateTime; + } + + /** + * 备注 + */ + private String getRemark(){ + return this.remark; + } + +} diff --git a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamProductSkuInfo.java b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamProductSkuInfo.java new file mode 100644 index 0000000..411b4ce --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamProductSkuInfo.java @@ -0,0 +1,246 @@ +package com.muyu.marketing.domain; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import javax.validation.constraints.NotNull; + +import java.io.Serializable; + +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import org.hibernate.validator.constraints.Length; + +/** +* 商品拼团规格信息表 +* @TableName activity_team_product_sku_info +*/ +public class ActivityTeamProductSkuInfo implements Serializable { + + /** + * 主键 + */ + @NotNull(message="[主键]不能为空") + @ApiModelProperty("主键") + private Integer id; + /** + * 活动ID + */ + @NotNull(message="[活动ID]不能为空") + @ApiModelProperty("活动ID") + private Long teamId; + /** + * 商品ID + */ + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("商品ID") + @Length(max= 255,message="编码长度不能超过255") + private String productId; + /** + * 商品SKU + */ + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("商品SKU") + @Length(max= 255,message="编码长度不能超过255") + private String productSku; + /** + * 拼团库存 + */ + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("拼团库存") + @Length(max= 255,message="编码长度不能超过255") + private String teamStock; + /** + * 拼团价格 + */ + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("拼团价格") + @Length(max= 255,message="编码长度不能超过255") + private String teamPrice; + /** + * 创建人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("创建人") + @Length(max= 32,message="编码长度不能超过32") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + private Date createTime; + /** + * 修改人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("修改人") + @Length(max= 32,message="编码长度不能超过32") + private String updateBy; + /** + * 修改时间 + */ + @ApiModelProperty("修改时间") + private Date updateTime; + /** + * 备注 + */ + @Size(max= 900,message="编码长度不能超过900") + @ApiModelProperty("备注") + @Length(max= 900,message="编码长度不能超过900") + private String remark; + + /** + * 主键 + */ + private void setId(Integer id){ + this.id = id; + } + + /** + * 活动ID + */ + private void setTeamId(Long teamId){ + this.teamId = teamId; + } + + /** + * 商品ID + */ + private void setProductId(String productId){ + this.productId = productId; + } + + /** + * 商品SKU + */ + private void setProductSku(String productSku){ + this.productSku = productSku; + } + + /** + * 拼团库存 + */ + private void setTeamStock(String teamStock){ + this.teamStock = teamStock; + } + + /** + * 拼团价格 + */ + private void setTeamPrice(String teamPrice){ + this.teamPrice = teamPrice; + } + + /** + * 创建人 + */ + private void setCreateBy(String createBy){ + this.createBy = createBy; + } + + /** + * 创建时间 + */ + private void setCreateTime(Date createTime){ + this.createTime = createTime; + } + + /** + * 修改人 + */ + private void setUpdateBy(String updateBy){ + this.updateBy = updateBy; + } + + /** + * 修改时间 + */ + private void setUpdateTime(Date updateTime){ + this.updateTime = updateTime; + } + + /** + * 备注 + */ + private void setRemark(String remark){ + this.remark = remark; + } + + + /** + * 主键 + */ + private Integer getId(){ + return this.id; + } + + /** + * 活动ID + */ + private Long getTeamId(){ + return this.teamId; + } + + /** + * 商品ID + */ + private String getProductId(){ + return this.productId; + } + + /** + * 商品SKU + */ + private String getProductSku(){ + return this.productSku; + } + + /** + * 拼团库存 + */ + private String getTeamStock(){ + return this.teamStock; + } + + /** + * 拼团价格 + */ + private String getTeamPrice(){ + return this.teamPrice; + } + + /** + * 创建人 + */ + private String getCreateBy(){ + return this.createBy; + } + + /** + * 创建时间 + */ + private Date getCreateTime(){ + return this.createTime; + } + + /** + * 修改人 + */ + private String getUpdateBy(){ + return this.updateBy; + } + + /** + * 修改时间 + */ + private Date getUpdateTime(){ + return this.updateTime; + } + + /** + * 备注 + */ + private String getRemark(){ + return this.remark; + } + +} diff --git a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/TeamStrategyExemption.java b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/TeamStrategyExemption.java new file mode 100644 index 0000000..206b212 --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/TeamStrategyExemption.java @@ -0,0 +1,307 @@ +package com.muyu.marketing.domain; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import javax.validation.constraints.NotNull; + +import java.io.Serializable; + +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import org.hibernate.validator.constraints.Length; + +/** +* 拼团免单策略 +* @TableName team_strategy_exemption +*/ +public class TeamStrategyExemption implements Serializable { + + /** + * 主键 + */ + @NotNull(message="[主键]不能为空") + @ApiModelProperty("主键") + private Integer id; + /** + * 持续时间 + */ + @NotNull(message="[持续时间]不能为空") + @ApiModelProperty("持续时间") + private Integer duration; + /** + * 免单人数 + */ + @NotNull(message="[免单人数]不能为空") + @ApiModelProperty("免单人数") + private Integer exemptionNumber; + /** + * 最大购买量 + */ + @NotNull(message="[最大购买量]不能为空") + @ApiModelProperty("最大购买量") + private Integer maxBuy; + /** + * 单次购买量 + */ + @NotNull(message="[单次购买量]不能为空") + @ApiModelProperty("单次购买量") + private Integer oneBuy; + /** + * 虚拟人数 + */ + @NotNull(message="[虚拟人数]不能为空") + @ApiModelProperty("虚拟人数") + private Integer virtualNumber; + /** + * 面单类型 + */ + @NotBlank(message="[面单类型]不能为空") + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("面单类型") + @Length(max= 32,message="编码长度不能超过32") + private String type; + /** + * 返款阶梯 + */ + @Size(max= -1,message="编码长度不能超过-1") + @ApiModelProperty("返款阶梯") + @Length(max= -1,message="编码长度不能超过-1") + private String ruleInfo; + /** + * 策略状态 + */ + @NotBlank(message="[策略状态]不能为空") + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("策略状态") + @Length(max= 32,message="编码长度不能超过32") + private String status; + /** + * 创建人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("创建人") + @Length(max= 32,message="编码长度不能超过32") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + private Date createTime; + /** + * 修改人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("修改人") + @Length(max= 32,message="编码长度不能超过32") + private String updateBy; + /** + * 修改时间 + */ + @ApiModelProperty("修改时间") + private Date updateTime; + /** + * 备注 + */ + @Size(max= 900,message="编码长度不能超过900") + @ApiModelProperty("备注") + @Length(max= 900,message="编码长度不能超过900") + private String remark; + + /** + * 主键 + */ + private void setId(Integer id){ + this.id = id; + } + + /** + * 持续时间 + */ + private void setDuration(Integer duration){ + this.duration = duration; + } + + /** + * 免单人数 + */ + private void setExemptionNumber(Integer exemptionNumber){ + this.exemptionNumber = exemptionNumber; + } + + /** + * 最大购买量 + */ + private void setMaxBuy(Integer maxBuy){ + this.maxBuy = maxBuy; + } + + /** + * 单次购买量 + */ + private void setOneBuy(Integer oneBuy){ + this.oneBuy = oneBuy; + } + + /** + * 虚拟人数 + */ + private void setVirtualNumber(Integer virtualNumber){ + this.virtualNumber = virtualNumber; + } + + /** + * 面单类型 + */ + private void setType(String type){ + this.type = type; + } + + /** + * 返款阶梯 + */ + private void setRuleInfo(String ruleInfo){ + this.ruleInfo = ruleInfo; + } + + /** + * 策略状态 + */ + private void setStatus(String status){ + this.status = status; + } + + /** + * 创建人 + */ + private void setCreateBy(String createBy){ + this.createBy = createBy; + } + + /** + * 创建时间 + */ + private void setCreateTime(Date createTime){ + this.createTime = createTime; + } + + /** + * 修改人 + */ + private void setUpdateBy(String updateBy){ + this.updateBy = updateBy; + } + + /** + * 修改时间 + */ + private void setUpdateTime(Date updateTime){ + this.updateTime = updateTime; + } + + /** + * 备注 + */ + private void setRemark(String remark){ + this.remark = remark; + } + + + /** + * 主键 + */ + private Integer getId(){ + return this.id; + } + + /** + * 持续时间 + */ + private Integer getDuration(){ + return this.duration; + } + + /** + * 免单人数 + */ + private Integer getExemptionNumber(){ + return this.exemptionNumber; + } + + /** + * 最大购买量 + */ + private Integer getMaxBuy(){ + return this.maxBuy; + } + + /** + * 单次购买量 + */ + private Integer getOneBuy(){ + return this.oneBuy; + } + + /** + * 虚拟人数 + */ + private Integer getVirtualNumber(){ + return this.virtualNumber; + } + + /** + * 面单类型 + */ + private String getType(){ + return this.type; + } + + /** + * 返款阶梯 + */ + private String getRuleInfo(){ + return this.ruleInfo; + } + + /** + * 策略状态 + */ + private String getStatus(){ + return this.status; + } + + /** + * 创建人 + */ + private String getCreateBy(){ + return this.createBy; + } + + /** + * 创建时间 + */ + private Date getCreateTime(){ + return this.createTime; + } + + /** + * 修改人 + */ + private String getUpdateBy(){ + return this.updateBy; + } + + /** + * 修改时间 + */ + private Date getUpdateTime(){ + return this.updateTime; + } + + /** + * 备注 + */ + private String getRemark(){ + return this.remark; + } + +} diff --git a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/TeamStrategyExemptionHundred.java b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/TeamStrategyExemptionHundred.java new file mode 100644 index 0000000..d0c9d11 --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/TeamStrategyExemptionHundred.java @@ -0,0 +1,266 @@ +package com.muyu.marketing.domain; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import javax.validation.constraints.NotNull; + +import java.io.Serializable; + +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import org.hibernate.validator.constraints.Length; + +/** +* 百人策略 +* @TableName team_strategy_exemption_hundred +*/ +public class TeamStrategyExemptionHundred implements Serializable { + + /** + * 主键 + */ + @NotNull(message="[主键]不能为空") + @ApiModelProperty("主键") + private Integer id; + /** + * 持续时间 + */ + @NotNull(message="[持续时间]不能为空") + @ApiModelProperty("持续时间") + private Integer duration; + /** + * 最大购买量 + */ + @NotNull(message="[最大购买量]不能为空") + @ApiModelProperty("最大购买量") + private Integer maxBuy; + /** + * 单次购买量 + */ + @NotNull(message="[单次购买量]不能为空") + @ApiModelProperty("单次购买量") + private Integer oneBuy; + /** + * 虚拟人数 + */ + @NotNull(message="[虚拟人数]不能为空") + @ApiModelProperty("虚拟人数") + private Integer virtualNumber; + /** + * 策略状态 + */ + @NotBlank(message="[策略状态]不能为空") + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("策略状态") + @Length(max= 32,message="编码长度不能超过32") + private String status; + /** + * 规则信息 + */ + @NotBlank(message="[规则信息]不能为空") + @Size(max= -1,message="编码长度不能超过-1") + @ApiModelProperty("规则信息") + @Length(max= -1,message="编码长度不能超过-1") + private String ruleInfo; + /** + * 创建人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("创建人") + @Length(max= 32,message="编码长度不能超过32") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + private Date createTime; + /** + * 修改人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("修改人") + @Length(max= 32,message="编码长度不能超过32") + private String updateBy; + /** + * 修改时间 + */ + @ApiModelProperty("修改时间") + private Date updateTime; + /** + * 备注 + */ + @Size(max= 900,message="编码长度不能超过900") + @ApiModelProperty("备注") + @Length(max= 900,message="编码长度不能超过900") + private String remark; + + /** + * 主键 + */ + private void setId(Integer id){ + this.id = id; + } + + /** + * 持续时间 + */ + private void setDuration(Integer duration){ + this.duration = duration; + } + + /** + * 最大购买量 + */ + private void setMaxBuy(Integer maxBuy){ + this.maxBuy = maxBuy; + } + + /** + * 单次购买量 + */ + private void setOneBuy(Integer oneBuy){ + this.oneBuy = oneBuy; + } + + /** + * 虚拟人数 + */ + private void setVirtualNumber(Integer virtualNumber){ + this.virtualNumber = virtualNumber; + } + + /** + * 策略状态 + */ + private void setStatus(String status){ + this.status = status; + } + + /** + * 规则信息 + */ + private void setRuleInfo(String ruleInfo){ + this.ruleInfo = ruleInfo; + } + + /** + * 创建人 + */ + private void setCreateBy(String createBy){ + this.createBy = createBy; + } + + /** + * 创建时间 + */ + private void setCreateTime(Date createTime){ + this.createTime = createTime; + } + + /** + * 修改人 + */ + private void setUpdateBy(String updateBy){ + this.updateBy = updateBy; + } + + /** + * 修改时间 + */ + private void setUpdateTime(Date updateTime){ + this.updateTime = updateTime; + } + + /** + * 备注 + */ + private void setRemark(String remark){ + this.remark = remark; + } + + + /** + * 主键 + */ + private Integer getId(){ + return this.id; + } + + /** + * 持续时间 + */ + private Integer getDuration(){ + return this.duration; + } + + /** + * 最大购买量 + */ + private Integer getMaxBuy(){ + return this.maxBuy; + } + + /** + * 单次购买量 + */ + private Integer getOneBuy(){ + return this.oneBuy; + } + + /** + * 虚拟人数 + */ + private Integer getVirtualNumber(){ + return this.virtualNumber; + } + + /** + * 策略状态 + */ + private String getStatus(){ + return this.status; + } + + /** + * 规则信息 + */ + private String getRuleInfo(){ + return this.ruleInfo; + } + + /** + * 创建人 + */ + private String getCreateBy(){ + return this.createBy; + } + + /** + * 创建时间 + */ + private Date getCreateTime(){ + return this.createTime; + } + + /** + * 修改人 + */ + private String getUpdateBy(){ + return this.updateBy; + } + + /** + * 修改时间 + */ + private Date getUpdateTime(){ + return this.updateTime; + } + + /** + * 备注 + */ + private String getRemark(){ + return this.remark; + } + +} diff --git a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/TeamStrategyExemptionOrdinary.java b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/TeamStrategyExemptionOrdinary.java new file mode 100644 index 0000000..da14375 --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/TeamStrategyExemptionOrdinary.java @@ -0,0 +1,264 @@ +package com.muyu.marketing.domain; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import javax.validation.constraints.NotNull; + +import java.io.Serializable; + +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import org.hibernate.validator.constraints.Length; + +/** +* 普通策略 +* @TableName team_strategy_exemption_ordinary +*/ +public class TeamStrategyExemptionOrdinary implements Serializable { + + /** + * 主键 + */ + @NotNull(message="[主键]不能为空") + @ApiModelProperty("主键") + private Integer id; + /** + * 持续时间 + */ + @NotNull(message="[持续时间]不能为空") + @ApiModelProperty("持续时间") + private Integer duration; + /** + * 成团人数 + */ + @NotNull(message="[成团人数]不能为空") + @ApiModelProperty("成团人数") + private Integer teamNumber; + /** + * 最大购买量 + */ + @NotNull(message="[最大购买量]不能为空") + @ApiModelProperty("最大购买量") + private Integer maxBuy; + /** + * 单次购买量 + */ + @NotNull(message="[单次购买量]不能为空") + @ApiModelProperty("单次购买量") + private Integer oneBuy; + /** + * 虚拟人数 + */ + @NotNull(message="[虚拟人数]不能为空") + @ApiModelProperty("虚拟人数") + private Integer virtualNumber; + /** + * 策略状态 + */ + @NotBlank(message="[策略状态]不能为空") + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("策略状态") + @Length(max= 32,message="编码长度不能超过32") + private String status; + /** + * 创建人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("创建人") + @Length(max= 32,message="编码长度不能超过32") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + private Date createTime; + /** + * 修改人 + */ + @Size(max= 32,message="编码长度不能超过32") + @ApiModelProperty("修改人") + @Length(max= 32,message="编码长度不能超过32") + private String updateBy; + /** + * 修改时间 + */ + @ApiModelProperty("修改时间") + private Date updateTime; + /** + * 备注 + */ + @Size(max= 900,message="编码长度不能超过900") + @ApiModelProperty("备注") + @Length(max= 900,message="编码长度不能超过900") + private String remark; + + /** + * 主键 + */ + private void setId(Integer id){ + this.id = id; + } + + /** + * 持续时间 + */ + private void setDuration(Integer duration){ + this.duration = duration; + } + + /** + * 成团人数 + */ + private void setTeamNumber(Integer teamNumber){ + this.teamNumber = teamNumber; + } + + /** + * 最大购买量 + */ + private void setMaxBuy(Integer maxBuy){ + this.maxBuy = maxBuy; + } + + /** + * 单次购买量 + */ + private void setOneBuy(Integer oneBuy){ + this.oneBuy = oneBuy; + } + + /** + * 虚拟人数 + */ + private void setVirtualNumber(Integer virtualNumber){ + this.virtualNumber = virtualNumber; + } + + /** + * 策略状态 + */ + private void setStatus(String status){ + this.status = status; + } + + /** + * 创建人 + */ + private void setCreateBy(String createBy){ + this.createBy = createBy; + } + + /** + * 创建时间 + */ + private void setCreateTime(Date createTime){ + this.createTime = createTime; + } + + /** + * 修改人 + */ + private void setUpdateBy(String updateBy){ + this.updateBy = updateBy; + } + + /** + * 修改时间 + */ + private void setUpdateTime(Date updateTime){ + this.updateTime = updateTime; + } + + /** + * 备注 + */ + private void setRemark(String remark){ + this.remark = remark; + } + + + /** + * 主键 + */ + private Integer getId(){ + return this.id; + } + + /** + * 持续时间 + */ + private Integer getDuration(){ + return this.duration; + } + + /** + * 成团人数 + */ + private Integer getTeamNumber(){ + return this.teamNumber; + } + + /** + * 最大购买量 + */ + private Integer getMaxBuy(){ + return this.maxBuy; + } + + /** + * 单次购买量 + */ + private Integer getOneBuy(){ + return this.oneBuy; + } + + /** + * 虚拟人数 + */ + private Integer getVirtualNumber(){ + return this.virtualNumber; + } + + /** + * 策略状态 + */ + private String getStatus(){ + return this.status; + } + + /** + * 创建人 + */ + private String getCreateBy(){ + return this.createBy; + } + + /** + * 创建时间 + */ + private Date getCreateTime(){ + return this.createTime; + } + + /** + * 修改人 + */ + private String getUpdateBy(){ + return this.updateBy; + } + + /** + * 修改时间 + */ + private Date getUpdateTime(){ + return this.updateTime; + } + + /** + * 备注 + */ + private String getRemark(){ + return this.remark; + } + +} diff --git a/muyu-modules/muyu-marketing/marketing-remote/pom.xml b/muyu-modules/muyu-marketing/marketing-remote/pom.xml new file mode 100644 index 0000000..047b4c9 --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-remote/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + com.muyu + muyu-marketing + 3.6.3 + + + marketing-remote + + + 17 + 17 + UTF-8 + + + + + com.muyu + marketing-common + + + + diff --git a/muyu-modules/muyu-marketing/marketing-remote/src/main/java/com/muyu/Main.java b/muyu-modules/muyu-marketing/marketing-remote/src/main/java/com/muyu/Main.java new file mode 100644 index 0000000..95690d4 --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-remote/src/main/java/com/muyu/Main.java @@ -0,0 +1,7 @@ +package com.muyu; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/muyu-modules/muyu-marketing/marketing-server/pom.xml b/muyu-modules/muyu-marketing/marketing-server/pom.xml new file mode 100644 index 0000000..86239a2 --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-server/pom.xml @@ -0,0 +1,127 @@ + + + 4.0.0 + + com.muyu + muyu-marketing + 3.6.3 + + + marketing-server + + + 17 + 17 + UTF-8 + + + + marketing-server营销模块 + + + + + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + + org.springframework.boot + spring-boot-starter-actuator + + + + + io.springfox + springfox-swagger-ui + ${swagger.fox.version} + + + + + com.mysql + mysql-connector-j + + + + + com.muyu + muyu-common-datasource + + + + + com.muyu + muyu-common-datascope + + + + + com.muyu + muyu-common-log + + + + + com.muyu + muyu-common-swagger + + + + com.dtflys.forest + forest-spring-boot-starter + + + + + com.muyu + marketing-remote + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + diff --git a/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/MuYuMarketIngApplication.java b/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/MuYuMarketIngApplication.java new file mode 100644 index 0000000..80e7518 --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/MuYuMarketIngApplication.java @@ -0,0 +1,18 @@ +package com.muyu.marketing; + +import com.muyu.common.security.annotation.EnableCustomConfig; +import com.muyu.common.security.annotation.EnableMyFeignClients; +import com.muyu.common.swagger.annotation.EnableCustomSwagger2; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@EnableCustomConfig +@EnableCustomSwagger2 +@EnableMyFeignClients +@SpringBootApplication +public class MuYuMarketIngApplication { + public static void main (String[] args) { + SpringApplication.run(MuYuMarketIngApplication.class, args); + } +} diff --git a/muyu-modules/muyu-marketing/marketing-server/src/main/resources/banner.txt b/muyu-modules/muyu-marketing/marketing-server/src/main/resources/banner.txt new file mode 100644 index 0000000..0dd5eee --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-server/src/main/resources/banner.txt @@ -0,0 +1,2 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} diff --git a/muyu-modules/muyu-marketing/marketing-server/src/main/resources/bootstrap.yml b/muyu-modules/muyu-marketing/marketing-server/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..e889959 --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-server/src/main/resources/bootstrap.yml @@ -0,0 +1,28 @@ +# Tomcat +server: + port: 9203 + +# Spring +spring: + application: + # 应用名称 + name: muyu-marketing + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 122.51.134.139:8848 + config: + # 配置中心地址 + server-addr: 122.51.134.139:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} +logging: + level: + com.muyu.marketing.mapper: DEBUG diff --git a/muyu-modules/muyu-marketing/marketing-server/src/main/resources/logback.xml b/muyu-modules/muyu-marketing/marketing-server/src/main/resources/logback.xml new file mode 100644 index 0000000..aa340cd --- /dev/null +++ b/muyu-modules/muyu-marketing/marketing-server/src/main/resources/logback.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + + diff --git a/muyu-modules/muyu-marketing/pom.xml b/muyu-modules/muyu-marketing/pom.xml new file mode 100644 index 0000000..c5bc9dd --- /dev/null +++ b/muyu-modules/muyu-marketing/pom.xml @@ -0,0 +1,31 @@ + + + 4.0.0 + + com.muyu + muyu-modules + 3.6.3 + + + pom + + marketing-common + marketing-remote + marketing-server + + + + 17 + 17 + UTF-8 + + + muyu-marketing + + + muyu-marketing营销模块 + + + diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/ProjectInfoListResp.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/ProjectInfoListResp.java new file mode 100644 index 0000000..4b99c83 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/ProjectInfoListResp.java @@ -0,0 +1,67 @@ +package com.muyu.product.domain.resp; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class ProjectInfoListResp { + /** 主键 */ + private Long id; + + /** 商品名称 */ + private String name; + + /** 商品描述 */ + private String introduction; + + /** 主类型 */ + private Long mianType; + + /** 父类型 */ + private Long parentType; + + /** 商品类型 */ + private Long type; + + /** 商品图片 */ + private String image; + + /** 商品轮播图 */ + private String carouselImages; + + /** 商品状态 */ + private String status; + + /** 规格 */ + private Long ruleId; + + /** 品牌 */ + private Long brandId; + + + /** + * 主类型名称 + */ + public String mianTypeName; + /** + * 父类型名称 + */ + public String parentTypeName; + /** + * 商品类型名称 + */ + public String typeName; + /** + * 规格名称 + */ + public String ruleName; + /** + * 品牌名称 + */ + public String brandName; +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java index 5e3555b..42987cf 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java @@ -107,9 +107,9 @@ public class CategoryInfoController extends BaseController { @ApiOperation("新增品类信息") public Result add(@RequestBody CategoryInfoSaveReq categoryInfoSaveReq) { return toAjax(categoryInfoService.save( - CategoryInfoSaveModel.saveBuild(categoryInfoSaveReq, SecurityUtils::getUsername) + CategoryInfoSaveModel.saveBuild(categoryInfoSaveReq, SecurityUtils::getUsername) )); - } +} /** * 修改品类信息 diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProjectInfoController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProjectInfoController.java index 09ba50e..aab432c 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProjectInfoController.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProjectInfoController.java @@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse; import com.muyu.product.cache.ProjectInfoCache; import com.muyu.product.domain.resp.ProjectDetailResp; +import com.muyu.product.domain.resp.ProjectInfoListResp; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -50,12 +51,11 @@ public class ProjectInfoController extends BaseController { @ApiOperation("获取商品信息列表") @RequiresPermissions("product:info:list") @GetMapping("/list") - public Result> list(ProjectInfoQueryReq projectInfoQueryReq) { + public Result> list(ProjectInfoQueryReq projectInfoQueryReq) { startPage(); - List list = projectInfoService.list(ProjectInfo.queryBuild(projectInfoQueryReq)); + List list = projectInfoService.ProjectInfo(ProjectInfo.queryBuild(projectInfoQueryReq)); return getDataTable(list); } - /** * 导出商品信息列表 */ @@ -110,8 +110,9 @@ public class ProjectInfoController extends BaseController { @Log(title = "商品信息", businessType = BusinessType.INSERT) @PostMapping @ApiOperation("新增商品信息") - public Result add(@RequestBody ProjectInfoSaveReq projectInfoSaveReq) { - return toAjax(projectInfoService.save(projectInfoSaveReq)); + public Result add(@RequestBody ProjectInfoSaveReq projectInfoSaveReq) { + Result save = projectInfoService.save(projectInfoSaveReq); + return save; } /** @@ -121,10 +122,9 @@ public class ProjectInfoController extends BaseController { @Log(title = "商品信息", businessType = BusinessType.UPDATE) @PutMapping("/{id}") @ApiOperation("修改商品信息") - public Result edit(@PathVariable Long id, @RequestBody ProjectInfoEditReq projectInfoEditReq) { - return toAjax(projectInfoService.updateById(ProjectInfo.editBuild(id,projectInfoEditReq))); + public Result edit(@PathVariable Long id, @RequestBody ProjectInfoEditReq projectInfoEditReq) { + return (projectInfoService.upDateById(id,projectInfoEditReq)); } - /** * 删除商品信息 */ diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProjectInfoService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProjectInfoService.java index 0924c9e..9cb3922 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProjectInfoService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProjectInfoService.java @@ -1,10 +1,14 @@ package com.muyu.product.service; import java.util.List; + +import com.muyu.common.core.domain.Result; import com.muyu.product.domain.ProjectInfo; import com.baomidou.mybatisplus.extension.service.IService; +import com.muyu.product.domain.req.ProjectInfoEditReq; import com.muyu.product.domain.req.ProjectInfoSaveReq; import com.muyu.product.domain.resp.ProjectDetailResp; +import com.muyu.product.domain.resp.ProjectInfoListResp; /** * 商品信息Service接口 @@ -21,12 +25,18 @@ public interface ProjectInfoService extends IService { */ public List list(ProjectInfo projectInfo); + + public List ProjectInfo(ProjectInfo projectInfo); + + /** * 保存商品信息 * @param projectInfoSaveReq 请求对象 * @return */ - boolean save (ProjectInfoSaveReq projectInfoSaveReq); + public Result save (ProjectInfoSaveReq projectInfoSaveReq); + + public Result upDateById(Long id, ProjectInfoEditReq projectInfoEditReq); /** * 通过商品ID获取商品详情 diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProjectInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProjectInfoServiceImpl.java index 448a3d9..765ea65 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProjectInfoServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProjectInfoServiceImpl.java @@ -2,15 +2,20 @@ package com.muyu.product.service.impl; import java.util.ArrayList; import java.util.Arrays; +import java.util.LinkedList; import java.util.List; +import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.ObjUtils; import com.muyu.common.security.utils.SecurityUtils; import com.muyu.product.domain.*; import com.muyu.product.domain.model.*; +import com.muyu.product.domain.req.ProjectInfoEditReq; import com.muyu.product.domain.req.ProjectInfoSaveReq; import com.muyu.product.domain.resp.CategoryCommonElementResp; import com.muyu.product.domain.resp.ProjectDetailResp; +import com.muyu.product.domain.resp.ProjectInfoListResp; +import com.muyu.product.mapper.RuleInfoMapper; import com.muyu.product.service.*; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -48,6 +53,10 @@ public class ProjectInfoServiceImpl extends ServiceImpl ProjectInfo(ProjectInfo projectInfo) { + + List list = list(projectInfo); + + List projectInfoListResps = new LinkedList<>(); + list.forEach(p -> { + // 获取类别信息 + CategoryInfo mianTypeName = categoryInfoService.getById(p.getMianType()); + CategoryInfo parentTypeName = categoryInfoService.getById(p.getParentType()); + CategoryInfo typeName = p.getType() != null ? categoryInfoService.getById(p.getType()) : null; + + // 获取规则信息 + RuleInfo ruleName = ruleInfoMapper.selectById(p.getRuleId()); + + // 获取品牌信息 + BrandInfo brandName = brandInfoService.getById(p.getBrandId()); + + // 构建响应对象 + ProjectInfoListResp resp = ProjectInfoListResp.builder() + .id(p.getId()) + .name(p.getName()) + .introduction(p.getIntroduction()) + .mianType(p.getMianType()) + .parentType(p.getParentType()) + .type(p.getType()) + .image(p.getImage()) + .carouselImages(p.getCarouselImages()) + .status(p.getStatus()) + .mianTypeName(mianTypeName != null ? mianTypeName.getName() : "") + .parentTypeName(parentTypeName != null ? parentTypeName.getName() : "") + .typeName(typeName != null ? typeName.getName() : "") + .ruleName(ruleName != null ? ruleName.getName() : "") + .brandName(brandName != null ? brandName.getNam() : "") + .build(); + + // 添加到结果列表 + projectInfoListResps.add(resp); + }); + + return projectInfoListResps; + } + + + private List getStrings() { + List projectInfos = this.list(); + List list = projectInfos.stream().map(ProjectInfo::getName).toList(); + return list; + } + + /** * 保存商品信息 * @@ -114,7 +174,13 @@ public class ProjectInfoServiceImpl extends ServiceImpl strings = getStrings(); + if (strings.contains(projectInfoSaveReq.getProjectAddModel().getName())){ + return Result.error("名称背占用"); + } + ProjectAddModel projectAddModel = projectInfoSaveReq.getProjectAddModel(); ProjectInfo projectInfo = ProjectInfo.saveModelBuild(projectAddModel, SecurityUtils::getUsername); boolean save = this.save(projectInfo); @@ -136,9 +202,19 @@ public class ProjectInfoServiceImpl extends ServiceImpl strings = getStrings(); + if (strings.contains(projectInfoEditReq.getName())){ + return Result.error("名称背占用"); + } + this.upDateById(id,projectInfoEditReq); + return Result.success("成功"); + } /** * 通过商品ID获取商品详情 * diff --git a/muyu-modules/pom.xml b/muyu-modules/pom.xml index 732cdaa..43c3a6f 100644 --- a/muyu-modules/pom.xml +++ b/muyu-modules/pom.xml @@ -15,6 +15,7 @@ muyu-file muyu-product muyu-shop-cart + muyu-marketing muyu-modules diff --git a/pom.xml b/pom.xml index 301643f..523636d 100644 --- a/pom.xml +++ b/pom.xml @@ -263,6 +263,19 @@ ${muyu.version} + + + com.muyu + marketing-common + ${muyu.version} + + + + + com.muyu + marketing-remote + ${muyu.version} +