mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-12 01:01:53 +08:00
Merge branch 'develop' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into master-jdk17
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package cn.iocoder.yudao.module.promotion.api.point;
|
||||
|
||||
import cn.iocoder.yudao.module.promotion.api.point.dto.PointValidateJoinRespDTO;
|
||||
|
||||
/**
|
||||
* 积分商城活动 API 接口
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
public interface PointActivityApi {
|
||||
|
||||
/**
|
||||
* 【下单前】校验是否参与积分商城活动
|
||||
*
|
||||
* 如果校验失败,则抛出业务异常
|
||||
*
|
||||
* @param activityId 活动编号
|
||||
* @param skuId SKU 编号
|
||||
* @param count 数量
|
||||
* @return 积分商城商品信息
|
||||
*/
|
||||
PointValidateJoinRespDTO validateJoinPointActivity(Long activityId, Long skuId, Integer count);
|
||||
|
||||
/**
|
||||
* 更新积分商城商品库存(减少)
|
||||
*
|
||||
* @param id 活动编号
|
||||
* @param skuId sku 编号
|
||||
* @param count 数量(正数)
|
||||
*/
|
||||
void updatePointStockDecr(Long id, Long skuId, Integer count);
|
||||
|
||||
/**
|
||||
* 更新积分商城商品库存(增加)
|
||||
*
|
||||
* @param id 活动编号
|
||||
* @param skuId sku 编号
|
||||
* @param count 数量(正数)
|
||||
*/
|
||||
void updatePointStockIncr(Long id, Long skuId, Integer count);
|
||||
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
package cn.iocoder.yudao.module.promotion.api.point.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 校验参与积分商城 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class PointValidateJoinRespDTO {
|
||||
|
||||
/**
|
||||
* 可兑换次数
|
||||
*/
|
||||
private Integer count;
|
||||
/**
|
||||
* 所需兑换积分
|
||||
*/
|
||||
private Integer point;
|
||||
/**
|
||||
* 所需兑换金额,单位:分
|
||||
*/
|
||||
private Integer price;
|
||||
|
||||
}
|
@@ -50,6 +50,10 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode POINT_ACTIVITY_UPDATE_FAIL_STATUS_CLOSED = new ErrorCode(1_013_007_002, "积分商城活动已关闭,不能修改");
|
||||
ErrorCode POINT_ACTIVITY_DELETE_FAIL_STATUS_NOT_CLOSED_OR_END = new ErrorCode(1_013_007_003, "积分商城活动未关闭或未结束,不能删除");
|
||||
ErrorCode POINT_ACTIVITY_CLOSE_FAIL_STATUS_CLOSED = new ErrorCode(1_013_007_004, "积分商城活动已关闭,不能重复关闭");
|
||||
ErrorCode POINT_ACTIVITY_JOIN_ACTIVITY_STATUS_CLOSED = new ErrorCode(1_013_007_005, "积分商品兑换失败,原因:积分商城活动已关闭");
|
||||
ErrorCode POINT_ACTIVITY_JOIN_ACTIVITY_SINGLE_LIMIT_COUNT_EXCEED = new ErrorCode(1_013_007_006, "积分商品兑换失败,原因:单次限购超出");
|
||||
ErrorCode POINT_ACTIVITY_JOIN_ACTIVITY_PRODUCT_NOT_EXISTS = new ErrorCode(1_013_007_007, "积分商品兑换失败,原因:商品不存在");
|
||||
ErrorCode POINT_ACTIVITY_UPDATE_STOCK_FAIL = new ErrorCode(1_013_007_008, "积分商品兑换失败,原因:积分商品库存不足");
|
||||
|
||||
// ========== 秒杀活动 1-013-008-000 ==========
|
||||
ErrorCode SECKILL_ACTIVITY_NOT_EXISTS = new ErrorCode(1_013_008_000, "秒杀活动不存在");
|
||||
|
Reference in New Issue
Block a user