mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-24 16:05:08 +08:00
code review:积分、优惠劵、佣金等逻辑
This commit is contained in:
@ -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>
|
||||
|
@ -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 ==========
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -7,6 +7,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
// TODO @疯狂:发 UserCreateMessage;解耦,然后优惠劵监听到,去发卷;
|
||||
/**
|
||||
* 新人券发放 Producer
|
||||
*
|
||||
|
@ -95,6 +95,7 @@ public class MemberUserServiceImpl implements MemberUserService {
|
||||
memberUserMapper.insert(user);
|
||||
|
||||
// 发送 MQ 消息,发放新人券
|
||||
// TODO @疯狂:事务结束后,在发送 MQ 消息;避免出现消息已经发了,事务没提交,或者回滚了
|
||||
registerCouponProducer.sendMailSendMessage(user.getId());
|
||||
return user;
|
||||
}
|
||||
|
Reference in New Issue
Block a user