|
@@ -191,13 +191,13 @@ public class ActivityRewardServiceImpl extends ServiceImpl<ActivityRewardDao, Ac
|
|
|
@Override
|
|
|
public Boolean updateStatus(Long id, Integer status, Long userId) {
|
|
|
|
|
|
- // 更新奖品状态为禁用时,需要判断是否已经关联活动;若存在关联数据,提示用户先解除绑定关系
|
|
|
if (EStatus.ENABLE.match(status)) {
|
|
|
+ // 更新奖品状态为禁用时,需要判断是否已经关联活动;若存在关联数据,提示用户先解除绑定关系
|
|
|
|
|
|
- int rewardNums = activityPlanRewardService.count(Wrappers.<ActivityPlanReward>lambdaQuery()
|
|
|
+ int rewardNum = activityPlanRewardService.count(Wrappers.<ActivityPlanReward>lambdaQuery()
|
|
|
.eq(ActivityPlanReward::getRewardId, id));
|
|
|
|
|
|
- if (rewardNums > 0) {
|
|
|
+ if (rewardNum > 0) {
|
|
|
throw new BizException("奖品已被活动关联");
|
|
|
}
|
|
|
}
|
|
@@ -208,7 +208,6 @@ public class ActivityRewardServiceImpl extends ServiceImpl<ActivityRewardDao, Ac
|
|
|
activityReward.setStatus(status);
|
|
|
activityReward.setUpdateBy(userId);
|
|
|
updateById(activityReward);
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
|