Commit 5f7e9265 authored by zhangfeng's avatar zhangfeng

Merge branch 'refs/heads/feature_member_score' into dev

parents daee3c1e 530c2d76
......@@ -62,7 +62,12 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
throw exception(REWARD_COUNT_NOT_ENOUGH);
}
// 兑换方式不匹配
if (!Objects.equals(rewardDO.getPickMethod(), redeemRewardReqVO.getRedeemType())) {
// if (!Objects.equals(rewardDO.getPickMethod(), redeemRewardReqVO.getRedeemType())) {
// throw exception(REWARD_PICK_METHOD_NOT_ALLOW_CREATE);
// }
String pickMethod = rewardDO.getPickMethod();
String[] split = pickMethod.split(",");
if (!Arrays.asList(split).contains(String.valueOf(redeemRewardReqVO.getRedeemType()))) {
throw exception(REWARD_PICK_METHOD_NOT_ALLOW_CREATE);
}
verifyMemberUser(redeemRewardReqVO, rewardDO);
......@@ -134,7 +139,12 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
for (RedeemRewardReqVO redeemRewardReqVO : redeemRewardReqVOList) {
// 每个兑换VO校验一遍
// 兑换方式不匹配
if (!Objects.equals(rewardDO.getPickMethod(), redeemRewardReqVO.getRedeemType())) {
// if (!Objects.equals(rewardDO.getPickMethod(), redeemRewardReqVO.getRedeemType())) {
// throw exception(REWARD_PICK_METHOD_NOT_ALLOW_CREATE);
// }
String pickMethod = rewardDO.getPickMethod();
String[] split = pickMethod.split(",");
if (!Arrays.asList(split).contains(String.valueOf(redeemRewardReqVO.getRedeemType()))) {
throw exception(REWARD_PICK_METHOD_NOT_ALLOW_CREATE);
}
verifyMemberUser(redeemRewardReqVO, rewardDO);
......
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