code review:积分、优惠劵、佣金等逻辑

This commit is contained in:
YunaiV
2023-10-01 23:31:07 +08:00
parent 057952bdeb
commit d4417d2474
27 changed files with 47 additions and 74 deletions

View File

@ -22,11 +22,13 @@
<artifactId>yudao-common</artifactId>
</dependency>
<!-- TODO @疯狂biz 引入哈api 保持低依赖 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-mq</artifactId>
<scope>compile</scope>
</dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@ -38,6 +38,7 @@ public interface ErrorCodeConstants {
//========== 签到配置 1-004-009-000 ==========
ErrorCode SIGN_IN_CONFIG_NOT_EXISTS = new ErrorCode(1_004_009_000, "签到天数规则不存在");
ErrorCode SIGN_IN_CONFIG_EXISTS = new ErrorCode(1_004_009_001, "签到天数规则已存在");
// TODO @疯狂:这个可以用 validator 去做;通过在 BaseVO 里,增加一个 @AssertTrue 注解的方式
ErrorCode SIGN_IN_CONFIG_AWARD_EMPTY = new ErrorCode(1_004_009_002, "签到奖励积分和经验不能同时为空");
//========== 签到配置 1-004-010-000 ==========

View File

@ -7,7 +7,7 @@ import lombok.ToString;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Schema(description = "管理后台 - 会员用户 修改等级 Request VO")
@Schema(description = "管理后台 - 用户修改等级 Request VO")
@Data
@ToString(callSuper = true)
public class MemberUserUpdateLevelReqVO {

View File

@ -6,7 +6,7 @@ import lombok.ToString;
import javax.validation.constraints.NotNull;
@Schema(description = "管理后台 - 会员用户 修改积分 Request VO")
@Schema(description = "管理后台 - 用户修改积分 Request VO")
@Data
@ToString(callSuper = true)
public class MemberUserUpdatePointReqVO {

View File

@ -7,6 +7,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource;
// TODO @疯狂:发 UserCreateMessage解耦然后优惠劵监听到去发卷
/**
* 新人券发放 Producer
*

View File

@ -95,6 +95,7 @@ public class MemberUserServiceImpl implements MemberUserService {
memberUserMapper.insert(user);
// 发送 MQ 消息,发放新人券
// TODO @疯狂:事务结束后,在发送 MQ 消息;避免出现消息已经发了,事务没提交,或者回滚了
registerCouponProducer.sendMailSendMessage(user.getId());
return user;
}