-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://gitee.com/zhijiantianya/ruoyi-vue-pro…
… into master-jdk17
- Loading branch information
Showing
26 changed files
with
496 additions
and
19 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
...otion-api/src/main/java/cn/iocoder/yudao/module/promotion/api/point/PointActivityApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
...c/main/java/cn/iocoder/yudao/module/promotion/api/point/dto/PointValidateJoinRespDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...n-biz/src/main/java/cn/iocoder/yudao/module/promotion/api/point/PointActivityApiImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package cn.iocoder.yudao.module.promotion.api.point; | ||
|
||
import cn.iocoder.yudao.module.promotion.api.point.dto.PointValidateJoinRespDTO; | ||
import cn.iocoder.yudao.module.promotion.service.point.PointActivityService; | ||
import jakarta.annotation.Resource; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.validation.annotation.Validated; | ||
|
||
/** | ||
* 积分商城活动 Api 接口实现类 | ||
* | ||
* @author HUIHUI | ||
*/ | ||
@Service | ||
@Validated | ||
public class PointActivityApiImpl implements PointActivityApi { | ||
|
||
@Resource | ||
private PointActivityService pointActivityService; | ||
|
||
@Override | ||
public PointValidateJoinRespDTO validateJoinPointActivity(Long activityId, Long skuId, Integer count) { | ||
return pointActivityService.validateJoinPointActivity(activityId, skuId, count); | ||
} | ||
|
||
@Override | ||
public void updatePointStockDecr(Long id, Long skuId, Integer count) { | ||
pointActivityService.updatePointStockDecr(id, skuId, count); | ||
} | ||
|
||
@Override | ||
public void updatePointStockIncr(Long id, Long skuId, Integer count) { | ||
pointActivityService.updatePointStockIncr(id, skuId, count); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.