code review 各种活动

This commit is contained in:
zhijiantianya@gmail.com
2023-08-07 19:30:26 +08:00
parent 0219e6d907
commit ba59ec85e0
23 changed files with 87 additions and 161 deletions

View File

@ -40,6 +40,7 @@ public class BargainRecordCreateReqDTO {
*/
@NotNull(message = "订单编号不能为空")
private Long orderId;
// TODO @puhui999spuName、picUrl、 之类字段不用传递;
/**
* 商品名字
*/
@ -60,6 +61,7 @@ public class BargainRecordCreateReqDTO {
*/
@NotNull(message = "商品原价不能为空")
private Integer price;
// TODO @puhui999nickname、avatar 不用传递,去查询;
/**
* 用户昵称
*/

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.promotion.api.combination;
import cn.iocoder.yudao.module.promotion.api.combination.dto.CombinationRecordCreateReqDTO;
import cn.iocoder.yudao.module.promotion.api.combination.dto.CombinationRecordUpdateReqDTO;
import cn.iocoder.yudao.module.promotion.api.combination.dto.CombinationRecordUpdateStatusReqDTO;
import javax.validation.Valid;
@ -18,7 +18,7 @@ public interface CombinationRecordApi {
*
* @param reqDTO 请求 DTO
*/
void createRecord(@Valid CombinationRecordCreateReqDTO reqDTO);
void createCombinationRecord(@Valid CombinationRecordCreateReqDTO reqDTO);
/**
* 查询拼团记录是否成功
@ -27,13 +27,15 @@ public interface CombinationRecordApi {
* @param orderId 订单编号
* @return 拼团是否成功
*/
boolean isRecordSuccess(Long userId, Long orderId);
boolean isCombinationRecordSuccess(Long userId, Long orderId);
// TODO @puhui999是不是搞成具体的方法拼团成功拼团失败这种方法
/**
* 更新开团记录状态
*
* @param reqDTO 请求 DTO
*/
void updateRecordStatus(CombinationRecordUpdateReqDTO reqDTO);
void updateCombinationRecordStatus(CombinationRecordUpdateStatusReqDTO reqDTO);
}

View File

@ -6,12 +6,12 @@ import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
/**
* 拼团记录的更新 Request DTO
* 拼团记录的更新状态 Request DTO
*
* @author HUIHUI
*/
@Data
public class CombinationRecordUpdateReqDTO {
public class CombinationRecordUpdateStatusReqDTO {
/**
* 用户编号

View File

@ -74,6 +74,9 @@ public interface ErrorCodeConstants {
ErrorCode BARGAIN_ACTIVITY_SPU_CONFLICTS = new ErrorCode(1013011001, "存在商品参加了其它砍价活动");
ErrorCode BARGAIN_ACTIVITY_STATUS_DISABLE = new ErrorCode(1013011002, "砍价活动已关闭不能修改");
ErrorCode BARGAIN_ACTIVITY_DELETE_FAIL_STATUS_NOT_CLOSED_OR_END = new ErrorCode(1013011003, "砍价活动未关闭或未结束,不能删除");
// TODO @puhui999拆分成砍价记录
ErrorCode BARGAIN_RECORD_NOT_EXISTS = new ErrorCode(1013011004, "砍价不存在");
ErrorCode BARGAIN_RECORD_EXISTS = new ErrorCode(1013011005, "砍价失败,已参与过该砍价");
ErrorCode BARGAIN_RECORD_HEAD_NOT_EXISTS = new ErrorCode(1013011006, "砍价失败,父砍价不存在");