Commit 6717c09a authored by zhangfeng's avatar zhangfeng

Merge branch 'refs/heads/feature_member_score' into dev

parents 244faeac a1e8bcbe
...@@ -3,10 +3,9 @@ package cn.iocoder.yudao.module.member.controller.admin.scoreRule; ...@@ -3,10 +3,9 @@ package cn.iocoder.yudao.module.member.controller.admin.scoreRule;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.excel.util.ExcelUtils; import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO; import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.module.depository.service.warehouse.WarehouseService;
import cn.iocoder.yudao.module.depository.vo.warehouse.WarehouseTreeRegionVO;
import cn.iocoder.yudao.module.member.api.ScoreProducerApi; import cn.iocoder.yudao.module.member.api.ScoreProducerApi;
import cn.iocoder.yudao.module.member.convert.scoreRule.ScoreRuleConvert; import cn.iocoder.yudao.module.member.convert.scoreRule.ScoreRuleConvert;
import cn.iocoder.yudao.module.member.dal.dataobject.scoreRule.ScoreRuleDO; import cn.iocoder.yudao.module.member.dal.dataobject.scoreRule.ScoreRuleDO;
...@@ -16,7 +15,6 @@ import cn.iocoder.yudao.module.member.vo.scoreRule.*; ...@@ -16,7 +15,6 @@ import cn.iocoder.yudao.module.member.vo.scoreRule.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.ListUtils;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
...@@ -49,6 +47,7 @@ public class ScoreRuleController { ...@@ -49,6 +47,7 @@ public class ScoreRuleController {
@PostMapping("/create") @PostMapping("/create")
@ApiOperation("创建积分规则") @ApiOperation("创建积分规则")
@Idempotent(timeout = 3)
@PreAuthorize("@ss.hasPermission('member:score-rule:create')") @PreAuthorize("@ss.hasPermission('member:score-rule:create')")
public CommonResult<Long> createScoreRule(@Valid @RequestBody ScoreRuleCreateReqVO createReqVO) { public CommonResult<Long> createScoreRule(@Valid @RequestBody ScoreRuleCreateReqVO createReqVO) {
return success(scoreRuleService.createScoreRule(createReqVO)); return success(scoreRuleService.createScoreRule(createReqVO));
...@@ -105,6 +104,7 @@ public class ScoreRuleController { ...@@ -105,6 +104,7 @@ public class ScoreRuleController {
@PostMapping("/copy") @PostMapping("/copy")
@ApiOperation("复制规则") @ApiOperation("复制规则")
@Idempotent(timeout = 3)
@PreAuthorize("@ss.hasPermission('member:score-rule:create')") @PreAuthorize("@ss.hasPermission('member:score-rule:create')")
public CommonResult<Long> copyScoreRule(@Valid @RequestBody IdReqVo idReqVo) { public CommonResult<Long> copyScoreRule(@Valid @RequestBody IdReqVo idReqVo) {
return success(scoreRuleService.copyScoreRule(idReqVo.getId())); return success(scoreRuleService.copyScoreRule(idReqVo.getId()));
......
...@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.member.controller.admin.userScore; ...@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.member.controller.admin.userScore;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.module.member.api.score.MemberUserScoreApiImpl; import cn.iocoder.yudao.module.member.api.score.MemberUserScoreApiImpl;
import cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreBatchOperateReqDTO; import cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreBatchOperateReqDTO;
import cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreOperateRespDTO; import cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreOperateRespDTO;
...@@ -50,6 +51,7 @@ public class MemberUserScoreController { ...@@ -50,6 +51,7 @@ public class MemberUserScoreController {
@PostMapping("/operate") @PostMapping("/operate")
@ApiOperation("操作积分") @ApiOperation("操作积分")
@Idempotent(timeout = 5)
@PreAuthorize("@ss.hasPermission('member:user-score:operate')") @PreAuthorize("@ss.hasPermission('member:user-score:operate')")
public CommonResult<Boolean> operate(@Valid @RequestBody MemberUserScoreOperateQueryVO query) { public CommonResult<Boolean> operate(@Valid @RequestBody MemberUserScoreOperateQueryVO query) {
Map<String,Object> extParam = new HashMap<>(); Map<String,Object> extParam = new HashMap<>();
......
package cn.iocoder.yudao.module.member.controller.app.address; package cn.iocoder.yudao.module.member.controller.app.address;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.module.member.convert.address.UserAddressConvert; import cn.iocoder.yudao.module.member.convert.address.UserAddressConvert;
import cn.iocoder.yudao.module.member.dal.dataobject.address.UserAddressDO; import cn.iocoder.yudao.module.member.dal.dataobject.address.UserAddressDO;
import cn.iocoder.yudao.module.member.service.address.UserAddressService; import cn.iocoder.yudao.module.member.service.address.UserAddressService;
...@@ -30,6 +31,7 @@ public class UserAddressController { ...@@ -30,6 +31,7 @@ public class UserAddressController {
@PostMapping("/create") @PostMapping("/create")
@ApiOperation("创建会员收货地址") @ApiOperation("创建会员收货地址")
@Idempotent(timeout = 5)
//@PreAuthenticated //@PreAuthenticated
public CommonResult<Long> createUserAddress(@Valid @RequestBody UserAddressCreateReqVO createReqVO) { public CommonResult<Long> createUserAddress(@Valid @RequestBody UserAddressCreateReqVO createReqVO) {
return success(userAddressService.createUserAddress(createReqVO)); return success(userAddressService.createUserAddress(createReqVO));
......
...@@ -26,9 +26,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -26,9 +26,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -38,7 +35,10 @@ import java.util.HashMap; ...@@ -38,7 +35,10 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@Component /**
* 弃用
*/
//@Component
@AllArgsConstructor @AllArgsConstructor
@Slf4j @Slf4j
public class OrderInShippingListener { public class OrderInShippingListener {
...@@ -53,7 +53,7 @@ public class OrderInShippingListener { ...@@ -53,7 +53,7 @@ public class OrderInShippingListener {
@Resource @Resource
private CustomerContactsService customerContactsService; private CustomerContactsService customerContactsService;
@EventListener(OrderInShippingEvent.class) //@EventListener(OrderInShippingEvent.class)
public void listen(OrderInShippingEvent event) { public void listen(OrderInShippingEvent event) {
Long orderId = event.getOrderId(); Long orderId = event.getOrderId();
String orderNo = event.getOrderNo(); String orderNo = event.getOrderNo();
......
package cn.iocoder.yudao.module.member.mq.consumer.score.core; package cn.iocoder.yudao.module.member.mq.consumer.score.core;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.iocoder.yudao.module.member.api.score.MemberUserScoreApi;
import cn.iocoder.yudao.module.member.dal.dataobject.scoreLog.MemberUserScoreLogDO; import cn.iocoder.yudao.module.member.dal.dataobject.scoreLog.MemberUserScoreLogDO;
import cn.iocoder.yudao.module.member.service.scoreLog.MemberUserScoreLogService; import cn.iocoder.yudao.module.member.service.scoreLog.MemberUserScoreLogService;
import cn.iocoder.yudao.module.member.service.scoreRule.ScoreRuleService; import cn.iocoder.yudao.module.member.service.scoreRule.ScoreRuleService;
...@@ -18,12 +19,14 @@ public abstract class AbstractScoreRuleStrategy implements ScoreRuleStrategy { ...@@ -18,12 +19,14 @@ public abstract class AbstractScoreRuleStrategy implements ScoreRuleStrategy {
protected ScoreRuleService scoreRuleService; protected ScoreRuleService scoreRuleService;
protected MemberUserScoreLogService memberUserScoreLogService; protected MemberUserScoreLogService memberUserScoreLogService;
protected MemberUserService memberUserService; protected MemberUserService memberUserService;
protected MemberUserScoreApi memberUserScoreApi;
@Autowired @Autowired
public AbstractScoreRuleStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService,MemberUserService memberUserService) { public AbstractScoreRuleStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService, MemberUserScoreApi memberUserScoreApi) {
this.scoreRuleService = scoreRuleService; this.scoreRuleService = scoreRuleService;
this.memberUserScoreLogService = memberUserScoreLogService; this.memberUserScoreLogService = memberUserScoreLogService;
this.memberUserService = memberUserService; this.memberUserService = memberUserService;
this.memberUserScoreApi = memberUserScoreApi;
} }
/** /**
* 计算用户在某一活动获得积分总数 * 计算用户在某一活动获得积分总数
......
...@@ -38,12 +38,10 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy { ...@@ -38,12 +38,10 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
@Resource @Resource
private OrderApi orderApi; private OrderApi orderApi;
@Resource @Resource
private MemberUserScoreApi memberUserScoreApi;
@Resource
private CustomerContactsService customerContactsService; private CustomerContactsService customerContactsService;
public OrderVStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService) { public OrderVStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService,MemberUserScoreApi memberUserScoreApi) {
super(scoreRuleService, memberUserScoreLogService, memberUserService); super(scoreRuleService, memberUserScoreLogService, memberUserService,memberUserScoreApi);
} }
@Override @Override
......
...@@ -23,30 +23,28 @@ import java.util.HashMap; ...@@ -23,30 +23,28 @@ import java.util.HashMap;
@Service @Service
@Slf4j @Slf4j
public class RecommendStrategy extends AbstractScoreRuleStrategy { public class RecommendStrategy extends AbstractScoreRuleStrategy {
@Resource
private MemberUserScoreApi memberUserScoreApi;
@Resource @Resource
private MemberUserService memberUserService; private MemberUserService memberUserService;
public RecommendStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService) { public RecommendStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService, MemberUserScoreApi memberUserScoreApi) {
super(scoreRuleService, memberUserScoreLogService, memberUserService); super(scoreRuleService, memberUserScoreLogService, memberUserService, memberUserScoreApi);
} }
@Override @Override
public void addScore(ScoreMessage message) { public void addScore(ScoreMessage message) {
log.info("Received Recommend message,referralCode:{}", message.getReferralCode());
// 根据推荐码获取推荐用户id // 根据推荐码获取推荐用户id
Long userId = ReferralCodeUtils.getUserId(message.getReferralCode()); MemberUserDO memberUserDO = memberUserService.getUserByCode(message.getReferralCode());
log.info("Received Recommend message,userID:{}", userId); if (memberUserDO == null) {
log.info("Recommend listener: can not find user by referralCode:{}", message.getReferralCode());
return;
}
Long userId = memberUserDO.getId();
ScoreRuleDO scoreRuleDO = scoreRuleService.getEnableScoreRuleByType(ScoreRuleTypeEnum.RECOMMEND); ScoreRuleDO scoreRuleDO = scoreRuleService.getEnableScoreRuleByType(ScoreRuleTypeEnum.RECOMMEND);
if (scoreRuleDO == null) { if (scoreRuleDO == null) {
log.info("Recommend rule is not exist,userID:{}", userId); log.info("Recommend rule is not exist,userID:{}", userId);
return; return;
} }
MemberUserDO memberUserDO = memberUserService.getUser(userId);
if (memberUserDO == null) {
log.info("Recommend listener: The recommend user does not exist,userID:{}", userId);
return;
}
// 校验累计最高分 // 校验累计最高分
Integer userScoreTotalCount = getUserScoreTotalCount(scoreRuleDO.getId(), userId); Integer userScoreTotalCount = getUserScoreTotalCount(scoreRuleDO.getId(), userId);
if (scoreRuleDO.getMaxScoreTotal() > 0 && userScoreTotalCount >= scoreRuleDO.getMaxScoreTotal()) { if (scoreRuleDO.getMaxScoreTotal() > 0 && userScoreTotalCount >= scoreRuleDO.getMaxScoreTotal()) {
......
...@@ -24,13 +24,11 @@ import java.util.HashMap; ...@@ -24,13 +24,11 @@ import java.util.HashMap;
@Service @Service
@Slf4j @Slf4j
public class RegisterStrategy extends AbstractScoreRuleStrategy { public class RegisterStrategy extends AbstractScoreRuleStrategy {
@Resource
private MemberUserScoreApi memberUserScoreApi;
@Resource @Resource
private MemberUserService memberUserService; private MemberUserService memberUserService;
public RegisterStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService) { public RegisterStrategy(ScoreRuleService scoreRuleService, MemberUserScoreLogService memberUserScoreLogService, MemberUserService memberUserService,MemberUserScoreApi memberUserScoreApi) {
super(scoreRuleService, memberUserScoreLogService, memberUserService); super(scoreRuleService, memberUserScoreLogService, memberUserService,memberUserScoreApi);
} }
@Override @Override
......
...@@ -222,4 +222,6 @@ public interface MemberUserService { ...@@ -222,4 +222,6 @@ public interface MemberUserService {
List<MemberUserDO> getByCursor(Long startUserId, long limit); List<MemberUserDO> getByCursor(Long startUserId, long limit);
void historyCodeFlush(); void historyCodeFlush();
MemberUserDO getUserByCode(String referralCode);
} }
...@@ -579,6 +579,11 @@ public class MemberUserServiceImpl implements MemberUserService { ...@@ -579,6 +579,11 @@ public class MemberUserServiceImpl implements MemberUserService {
} }
} }
@Override
public MemberUserDO getUserByCode(String referralCode) {
return memberUserMapper.selectOne("code", referralCode);
}
private String getNextMemberCode() { private String getNextMemberCode() {
String key = "memberCode:max:number"; String key = "memberCode:max:number";
String incrIfExistScript = "if redis.call(\"exists\", KEYS[1]) == 1 then\n" + String incrIfExistScript = "if redis.call(\"exists\", KEYS[1]) == 1 then\n" +
......
...@@ -4,6 +4,7 @@ import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleOrderVExtraVO; ...@@ -4,6 +4,7 @@ import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleOrderVExtraVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleRegisterExtraVO; import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleRegisterExtraVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleShareExtraVO; import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleShareExtraVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRulerRecommendExtraVO; import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRulerRecommendExtraVO;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -14,6 +15,7 @@ import lombok.ToString; ...@@ -14,6 +15,7 @@ import lombok.ToString;
@ToString(callSuper = true) @ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel("管理后台 - 积分规则详细信息 Response VO") @ApiModel("管理后台 - 积分规则详细信息 Response VO")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ScoreRuleBackDetailVO extends ScoreRuleBackVO{ public class ScoreRuleBackDetailVO extends ScoreRuleBackVO{
@ApiModelProperty(value = "扩展字段原始") @ApiModelProperty(value = "扩展字段原始")
private String extra; private String extra;
......
...@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.reward.controller.admin.redeem; ...@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.reward.controller.admin.redeem;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.excel.util.ExcelUtils; import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.module.reward.api.reward.RedeemRewardApi; import cn.iocoder.yudao.module.reward.api.reward.RedeemRewardApi;
import cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardReqVO; import cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardReqVO;
import cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardRespDTO; import cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardRespDTO;
...@@ -124,6 +125,7 @@ public class RedeemRewardController { ...@@ -124,6 +125,7 @@ public class RedeemRewardController {
@PostMapping("/single") @PostMapping("/single")
@ApiOperation("兑换礼品") @ApiOperation("兑换礼品")
@Idempotent(timeout = 5)
@PreAuthorize("@ss.hasPermission('ecw:giftManagement:exchange')") @PreAuthorize("@ss.hasPermission('ecw:giftManagement:exchange')")
public CommonResult<Boolean> redeemReward(@Valid @RequestBody RedeemRewardReqVO redeemRewardReqVO) { public CommonResult<Boolean> redeemReward(@Valid @RequestBody RedeemRewardReqVO redeemRewardReqVO) {
return success(redeemRewardApi.redeemReward(redeemRewardReqVO)); return success(redeemRewardApi.redeemReward(redeemRewardReqVO));
...@@ -131,6 +133,7 @@ public class RedeemRewardController { ...@@ -131,6 +133,7 @@ public class RedeemRewardController {
@PostMapping("/batch") @PostMapping("/batch")
@ApiOperation("批量兑换礼品") @ApiOperation("批量兑换礼品")
@Idempotent(timeout = 5)
@PreAuthorize("@ss.hasPermission('ecw:giftManagement:exchange')") @PreAuthorize("@ss.hasPermission('ecw:giftManagement:exchange')")
public CommonResult<List<RedeemRewardRespDTO>> redeemRewards(@Valid @RequestBody List<RedeemRewardReqVO> redeemRewardReqVOList) { public CommonResult<List<RedeemRewardRespDTO>> redeemRewards(@Valid @RequestBody List<RedeemRewardReqVO> redeemRewardReqVOList) {
return success(redeemRewardApi.redeemRewards(redeemRewardReqVOList)); return success(redeemRewardApi.redeemRewards(redeemRewardReqVOList));
......
...@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.reward.controller.admin.reward; ...@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.reward.controller.admin.reward;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.excel.util.ExcelUtils; import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO; import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.module.reward.convert.reward.RewardConvert; import cn.iocoder.yudao.module.reward.convert.reward.RewardConvert;
...@@ -38,6 +39,7 @@ public class RewardController { ...@@ -38,6 +39,7 @@ public class RewardController {
@PostMapping("/create") @PostMapping("/create")
@ApiOperation("创建礼品") @ApiOperation("创建礼品")
@Idempotent(timeout = 3)
@PreAuthorize("@ss.hasPermission('ecw:giftManagement:add')") @PreAuthorize("@ss.hasPermission('ecw:giftManagement:add')")
public CommonResult<Long> create(@Valid @RequestBody RewardCreateReqVO createReqVO) { public CommonResult<Long> create(@Valid @RequestBody RewardCreateReqVO createReqVO) {
return success(rewardService.create(createReqVO)); return success(rewardService.create(createReqVO));
...@@ -99,6 +101,7 @@ public class RewardController { ...@@ -99,6 +101,7 @@ public class RewardController {
@PostMapping("/copy/{id}") @PostMapping("/copy/{id}")
@ApiOperation("复制礼品") @ApiOperation("复制礼品")
@Idempotent(timeout = 3)
@PreAuthorize("@ss.hasPermission('ecw:giftManagement:copy')") @PreAuthorize("@ss.hasPermission('ecw:giftManagement:copy')")
public CommonResult<Long> copyReward(@NotNull @PathVariable Long id) { public CommonResult<Long> copyReward(@NotNull @PathVariable Long id) {
return success(rewardService.copyReward(id)); return success(rewardService.copyReward(id));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment