Merge remote-tracking branch 'origin/dev' into test
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
package com.czg.account.dto;
|
||||
|
||||
import com.czg.account.entity.ShopCoupon;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
*/
|
||||
@Data
|
||||
public class MemberConfigDTO {
|
||||
@Data
|
||||
public static class ConfigList {
|
||||
@NotBlank(message = "名称不为空")
|
||||
private String name;
|
||||
@NotNull(message = "价格不能为空")
|
||||
@DecimalMin(value = "0.01", message = "价格不能小于0.01")
|
||||
private BigDecimal price;
|
||||
@Min(value = 0, message = "赠送成长值不能小于0")
|
||||
private Integer reward;
|
||||
private List<ShopCoupon> couponList;
|
||||
@NotBlank(message = "会员周期不为空")
|
||||
private String circleTime;
|
||||
}
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public static class condition {
|
||||
private String code;
|
||||
private String value;
|
||||
}
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 提交生日/姓名
|
||||
*/
|
||||
@NotNull(message = "提交生日/姓名不能为空")
|
||||
private Integer isSubmitInfo;
|
||||
|
||||
|
||||
/**
|
||||
* 方案列表
|
||||
*/
|
||||
@Valid
|
||||
private List<ConfigList> configList;
|
||||
|
||||
/**
|
||||
* 条件开通条件项
|
||||
*/
|
||||
@Valid
|
||||
private List<condition> conditionList;
|
||||
|
||||
/**
|
||||
* 购买开通金额
|
||||
*/
|
||||
@DecimalMin(value = "0.01", message = "金额不能小于0.01")
|
||||
private BigDecimal openAmount;
|
||||
|
||||
/**
|
||||
* 参与会员价门店
|
||||
*/
|
||||
private List<Long> memberPriceShopIdList;
|
||||
|
||||
/**
|
||||
* 是否享受会员价
|
||||
*/
|
||||
@NotNull(message = "是否享受会员价不能为空")
|
||||
private Integer isMemberPrice;
|
||||
|
||||
/**
|
||||
* 每消费一元经验值
|
||||
*/
|
||||
@Min(value = 0, message = "消费增成长值最小为0")
|
||||
private Float costReward;
|
||||
|
||||
/**
|
||||
* 每充值一元经验值
|
||||
*/
|
||||
@Min(value = 0, message = "充值增成长值最小为0")
|
||||
private Float rechargeReward;
|
||||
|
||||
/**
|
||||
* 规则说明
|
||||
*/
|
||||
@NotBlank(message = "规则说明不能为空")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.czg.account.dto;
|
||||
|
||||
import com.czg.account.entity.ShopCoupon;
|
||||
import com.czg.validator.group.UpdateGroup;
|
||||
import com.czg.validator.group.member.MemberLevelCycleRewardGroup;
|
||||
import jakarta.validation.constraints.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MemberLevelDTO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@NotNull(message = "id不为空", groups = UpdateGroup.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
@Size(max = 200, message = "最大长度为200")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 会员名称
|
||||
*/
|
||||
@NotBlank(message = "会员名称不为空")
|
||||
@Size(max = 30, message = "最大长度为30")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 所需成长值
|
||||
*/
|
||||
@Min(value = 0, message = "成长值不能小于0")
|
||||
@NotNull(message = "成长值不为空")
|
||||
private Long experienceValue;
|
||||
|
||||
/**
|
||||
* 会员折扣
|
||||
*/
|
||||
@NotNull(message = "会员折扣不为空")
|
||||
@Min(value = 0, message = "会员折扣不能小于0")
|
||||
private Integer discount;
|
||||
|
||||
/**
|
||||
* logo
|
||||
*/
|
||||
private String logo;
|
||||
|
||||
/**
|
||||
* 消费送积分,消费n元送1积分, 0为禁用
|
||||
*/
|
||||
@DecimalMin(value = "0.01", message = "消费送积分不能小于0.01")
|
||||
private Float costRewardPoints;
|
||||
|
||||
/**
|
||||
* 周期奖励状态 0禁用 1启用
|
||||
*/
|
||||
@NotNull(message = "周期奖励状态不为空")
|
||||
private Integer isCycleReward;
|
||||
|
||||
/**
|
||||
* 周期时间包含周 月 年 日
|
||||
*/
|
||||
@NotBlank(message = "周期时间不为空", groups = MemberLevelCycleRewardGroup.class)
|
||||
private String cycleTime;
|
||||
|
||||
/**
|
||||
* 赠送积分
|
||||
*/
|
||||
@DecimalMin(value = "0.01", message = "赠送积分不能小于0.01")
|
||||
private Float cycleRewardPoints;
|
||||
|
||||
/**
|
||||
* 优惠券列表
|
||||
*/
|
||||
private List<ShopCoupon> cycleRewardCouponList;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
|
||||
package com.czg.account.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import java.io.Serial;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 会员基础配置 实体类。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TbMemberConfigDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 提交生日/姓名
|
||||
*/
|
||||
private Integer submitInfo;
|
||||
|
||||
/**
|
||||
* 购买开通PAY 条件开通CONDITION
|
||||
*/
|
||||
private String openType;
|
||||
|
||||
/**
|
||||
* 方案列表
|
||||
*/
|
||||
private String configList;
|
||||
|
||||
/**
|
||||
* 条件开通条件项
|
||||
*/
|
||||
private String conditionInfo;
|
||||
|
||||
/**
|
||||
* 购买开通金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 参与会员价门店
|
||||
*/
|
||||
private String memberPriceShopIdList;
|
||||
|
||||
/**
|
||||
* 是否享受会员价
|
||||
*/
|
||||
private Integer isMemberPrice;
|
||||
|
||||
/**
|
||||
* 每消费一元经验值
|
||||
*/
|
||||
private Float costReward;
|
||||
|
||||
/**
|
||||
* 每充值一元经验值
|
||||
*/
|
||||
private Float rechargeReward;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 规则说明
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
|
||||
package com.czg.account.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import java.io.Serial;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 会员等级配置 实体类。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TbMemberLevelConfigDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会员名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 所需成长值
|
||||
*/
|
||||
private Long experienceValue;
|
||||
|
||||
/**
|
||||
* 会员折扣
|
||||
*/
|
||||
private Float discunt;
|
||||
|
||||
/**
|
||||
* logo
|
||||
*/
|
||||
private String logo;
|
||||
|
||||
/**
|
||||
* 消费送积分,消费n元送1积分, 0为禁用
|
||||
*/
|
||||
private Float costRewardPoints;
|
||||
|
||||
/**
|
||||
* 周期奖励状态 0禁用 1启用
|
||||
*/
|
||||
private Integer isCycleReward;
|
||||
|
||||
/**
|
||||
* 周期时间包含周 月 年 日
|
||||
*/
|
||||
private String cycleTime;
|
||||
|
||||
/**
|
||||
* 赠送积分
|
||||
*/
|
||||
private String cycleRewardPoints;
|
||||
|
||||
/**
|
||||
* 优惠券列表
|
||||
*/
|
||||
private String cycleRewardCouponList;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.czg.account.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 会员等级配置 实体类。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_member_level_config")
|
||||
public class MemberLevelConfig implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会员名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 所需成长值
|
||||
*/
|
||||
private Long experienceValue;
|
||||
|
||||
/**
|
||||
* 会员折扣
|
||||
*/
|
||||
private Integer discount;
|
||||
|
||||
/**
|
||||
* logo
|
||||
*/
|
||||
private String logo;
|
||||
|
||||
/**
|
||||
* 消费送积分,消费n元送1积分, 0为禁用
|
||||
*/
|
||||
private Float costRewardPoints;
|
||||
|
||||
/**
|
||||
* 周期奖励状态 0禁用 1启用
|
||||
*/
|
||||
private Integer isCycleReward;
|
||||
|
||||
/**
|
||||
* 周期时间包含周 月 年 日
|
||||
*/
|
||||
private String cycleTime;
|
||||
|
||||
/**
|
||||
* 赠送积分
|
||||
*/
|
||||
private Float cycleRewardPoints;
|
||||
|
||||
/**
|
||||
* 优惠券列表
|
||||
*/
|
||||
private String cycleRewardCouponList;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -129,4 +129,8 @@ public class ShopUser implements Serializable {
|
||||
* 已经合并过来的用户信息,jsonArray格式,[{"id":1,"shopId":2,...},{"id":1,"shopId":2,...}]
|
||||
*/
|
||||
private String mergedUsers;
|
||||
|
||||
private Long memberLevelId;
|
||||
|
||||
private Long experience;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.czg.account.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 会员基础配置 实体类。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_member_config")
|
||||
public class TbMemberConfig implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 提交生日/姓名
|
||||
*/
|
||||
private Integer isSubmitInfo;
|
||||
|
||||
/**
|
||||
* 方案列表
|
||||
*/
|
||||
private String configList;
|
||||
|
||||
/**
|
||||
* 条件开通条件项
|
||||
*/
|
||||
private String conditionList;
|
||||
|
||||
/**
|
||||
* 购买开通金额
|
||||
*/
|
||||
private BigDecimal openAmount;
|
||||
|
||||
/**
|
||||
* 参与会员价门店
|
||||
*/
|
||||
private String memberPriceShopIdList;
|
||||
|
||||
/**
|
||||
* 是否享受会员价
|
||||
*/
|
||||
private Integer isMemberPrice;
|
||||
|
||||
/**
|
||||
* 每消费一元经验值
|
||||
*/
|
||||
private Long costReward;
|
||||
|
||||
/**
|
||||
* 每充值一元经验值
|
||||
*/
|
||||
private Long rechargeReward;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 规则说明
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.czg.account.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.account.entity.MemberLevelConfig;
|
||||
|
||||
/**
|
||||
* 会员等级配置 服务层。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public interface MemberLevelConfigService extends IService<MemberLevelConfig> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.czg.account.service;
|
||||
|
||||
import com.czg.account.dto.MemberConfigDTO;
|
||||
import com.czg.account.dto.MemberLevelDTO;
|
||||
import com.czg.account.vo.MemberConfigVO;
|
||||
import com.czg.account.vo.MemberLevelVO;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.account.entity.TbMemberConfig;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* 会员基础配置 服务层。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public interface TbMemberConfigService extends IService<TbMemberConfig> {
|
||||
|
||||
MemberConfigVO detail(Long shopId);
|
||||
|
||||
Boolean edit(Long shopId, MemberConfigDTO memberDTO);
|
||||
|
||||
Boolean addLevel(Long shopId, MemberLevelDTO levelDTO);
|
||||
|
||||
Boolean editLevel(Long shopId, MemberLevelDTO levelDTO);
|
||||
|
||||
ArrayList<MemberLevelVO> listLevel(Long shopId);
|
||||
|
||||
/**
|
||||
* 根据传入的用户Id,校验是否符合条件,符合加入会员
|
||||
* @param shopId 店铺id
|
||||
* @param userId 用户id
|
||||
* @return 是否加入成功
|
||||
*/
|
||||
boolean joinMember(Long shopId, Long userId);
|
||||
|
||||
/**
|
||||
* 发放会员奖励
|
||||
* @param isCost 是否是消费 true 消费 false 充值
|
||||
*/
|
||||
boolean deliver(Long shopId, Long userId, BigDecimal money, boolean isCost);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.czg.account.vo;
|
||||
|
||||
import com.czg.account.dto.MemberConfigDTO;
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MemberConfigVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 提交生日/姓名
|
||||
*/
|
||||
@NotNull(message = "提交生日/姓名不能为空")
|
||||
private Integer isSubmitInfo;
|
||||
|
||||
|
||||
/**
|
||||
* 方案列表
|
||||
*/
|
||||
@Valid
|
||||
private List<MemberConfigDTO.ConfigList> configList;
|
||||
|
||||
/**
|
||||
* 条件开通条件项
|
||||
*/
|
||||
@Valid
|
||||
private List<MemberConfigDTO.condition> conditionList;
|
||||
|
||||
/**
|
||||
* 购买开通金额
|
||||
*/
|
||||
@DecimalMin(value = "0.01", message = "金额不能小于0.01")
|
||||
private BigDecimal openAmount;
|
||||
|
||||
/**
|
||||
* 参与会员价门店
|
||||
*/
|
||||
private List<Long> memberPriceShopIdList;
|
||||
|
||||
/**
|
||||
* 是否享受会员价
|
||||
*/
|
||||
@NotNull(message = "是否享受会员价不能为空")
|
||||
private Integer isMemberPrice;
|
||||
|
||||
/**
|
||||
* 每消费一元经验值
|
||||
*/
|
||||
@Min(value = 0, message = "消费增成长值最小为0")
|
||||
private Long costReward;
|
||||
|
||||
/**
|
||||
* 每充值一元经验值
|
||||
*/
|
||||
@Min(value = 0, message = "充值增成长值最小为0")
|
||||
private Long rechargeReward;
|
||||
|
||||
/**
|
||||
* 规则说明
|
||||
*/
|
||||
@NotBlank(message = "规则说明不能为空")
|
||||
private String remark;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.czg.account.vo;
|
||||
|
||||
import com.czg.account.dto.MemberConfigDTO;
|
||||
import com.czg.account.entity.ShopCoupon;
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MemberLevelVO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会员名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 所需成长值
|
||||
*/
|
||||
private Long experienceValue;
|
||||
|
||||
/**
|
||||
* 会员折扣
|
||||
*/
|
||||
private Integer discount;
|
||||
|
||||
/**
|
||||
* logo
|
||||
*/
|
||||
private String logo;
|
||||
|
||||
/**
|
||||
* 消费送积分,消费n元送1积分, 0为禁用
|
||||
*/
|
||||
private Float costRewardPoints;
|
||||
|
||||
/**
|
||||
* 周期奖励状态 0禁用 1启用
|
||||
*/
|
||||
private Integer isCycleReward;
|
||||
|
||||
/**
|
||||
* 周期时间包含周 月 年 日
|
||||
*/
|
||||
private String cycleTime;
|
||||
|
||||
/**
|
||||
* 赠送积分
|
||||
*/
|
||||
private Float cycleRewardPoints;
|
||||
|
||||
/**
|
||||
* 优惠券列表
|
||||
*/
|
||||
private List<ShopCoupon> cycleRewardCouponList;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
package com.czg.order.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import java.io.Serial;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 会员充值订单 实体类。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MemberOrderDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@NotNull(message = "店铺id不能为空")
|
||||
private Long shopId;
|
||||
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotBlank(message = "方案名称不为空")
|
||||
private String name;
|
||||
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@NotNull(message = "数量不为空")
|
||||
private Integer num;
|
||||
private String platformType;
|
||||
private Long userId;
|
||||
private String orderType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.czg.order.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 会员充值订单 实体类。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_member_order")
|
||||
public class MemberOrder implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 实际支付金额
|
||||
*/
|
||||
private BigDecimal payAmount;
|
||||
|
||||
/**
|
||||
* 成长值
|
||||
*/
|
||||
private Integer reward;
|
||||
|
||||
/**
|
||||
* 会员周期
|
||||
*/
|
||||
private String circleTime;
|
||||
|
||||
/**
|
||||
* 优惠券信息
|
||||
*/
|
||||
private String couponList;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
private LocalDateTime payTime;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer num;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.czg.order.service;
|
||||
|
||||
import com.czg.order.dto.MemberOrderDTO;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.order.entity.MemberOrder;
|
||||
|
||||
/**
|
||||
* 会员充值订单 服务层。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
public interface MemberOrderService extends IService<MemberOrder> {
|
||||
|
||||
MemberOrder createMemberOrder(MemberOrderDTO orderDTO);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
package com.czg.validator.group.member;
|
||||
|
||||
/**
|
||||
* @author admin admin@cashier.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public interface MemberLevelCycleRewardGroup {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user