Commit edcc406b authored by zhangfeng's avatar zhangfeng

feature-reward:调整更新接口

parent 9514f8b4
...@@ -6,14 +6,14 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode; ...@@ -6,14 +6,14 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode;
// TODO 待办:请将下面的错误码复制到 yudao-module-reward-api 模块的 ErrorCodeConstants 类中。注意,请给“TODO 补充编号”设置一个错误码编号!!! // TODO 待办:请将下面的错误码复制到 yudao-module-reward-api 模块的 ErrorCodeConstants 类中。注意,请给“TODO 补充编号”设置一个错误码编号!!!
// ========== 礼品 TODO 补充编号 ========== // ========== 礼品 TODO 补充编号 ==========
public interface ErrorCodeConstants { public interface ErrorCodeConstants {
ErrorCode REWARD_NOT_EXISTS = new ErrorCode(1010011001, "礼品不存在"); ErrorCode REWARD_NOT_EXISTS = new ErrorCode(1010011001, "reward.do.not.exist");
ErrorCode REWARD_ENDTIME_ERROR = new ErrorCode(1001011002, "礼品结束时间不能早于当前时间"); ErrorCode REWARD_ENDTIME_ERROR = new ErrorCode(1001011002, "reward.end.time.less.than.now");
ErrorCode REWARD_STATUS_NOT_ALLOW_DELETE = new ErrorCode(1001011003, "只有未启用可删除"); ErrorCode REWARD_STATUS_NOT_ALLOW_DELETE = new ErrorCode(1001011003, "reward.status.not.allow.delete");
ErrorCode REWARD_STATUS_NOT_ALLOW_ClOSE = new ErrorCode(1001011004, "未启用礼品不可关闭"); ErrorCode REWARD_STATUS_NOT_ALLOW_ClOSE = new ErrorCode(1001011004, "reward.status.not.allow.close");
ErrorCode REWARD_STATUS_CHANGE_ERROR = new ErrorCode(1001011005, "礼品状态操作不符合规则"); ErrorCode REWARD_STATUS_CHANGE_ERROR = new ErrorCode(1001011005, "reward.status.change.error");
ErrorCode REWARD_STATUS_NOT_ALLOW_DELAY = new ErrorCode(1001011006, "只允许延期启用状态礼品"); ErrorCode REWARD_STATUS_NOT_ALLOW_DELAY = new ErrorCode(1001011006, "reward.status.not.allow.delay");
ErrorCode REWARD_STATUS_NOT_ALLOW_CREATE = new ErrorCode(1001011007, "创建的礼品状态只能是启用或未启用"); ErrorCode REWARD_STATUS_NOT_ALLOW_CREATE = new ErrorCode(1001011007, "reward.status.not.allow.create");
ErrorCode REWARD_START_OR_END_TIME_NOT_ALLOW_CREATE = new ErrorCode(1001011008, "活动时间不合法"); ErrorCode REWARD_START_OR_END_TIME_NOT_ALLOW_CREATE = new ErrorCode(1001011008, "reward.time.not.allow");
ErrorCode REWARD_PICK_METHOD_NOT_ALLOW_CREATE = new ErrorCode(1001011009, "领取方式不合法"); ErrorCode REWARD_PICK_METHOD_NOT_ALLOW_CREATE = new ErrorCode(1001011009, "领取方式不合法");
ErrorCode REWARD_STATUS_NOT_ALLOW_UPDATE = new ErrorCode(1001011010, "礼物状态不允许编辑"); ErrorCode REWARD_STATUS_NOT_ALLOW_UPDATE = new ErrorCode(1001011010, "礼物状态不允许编辑");
ErrorCode REWARD_STATUS_NOT_ALLOW_ENABLE = new ErrorCode(1001011011, "礼物不能启用"); ErrorCode REWARD_STATUS_NOT_ALLOW_ENABLE = new ErrorCode(1001011011, "礼物不能启用");
......
...@@ -42,7 +42,7 @@ public class RewardController { ...@@ -42,7 +42,7 @@ public class RewardController {
return success(rewardService.create(createReqVO)); return success(rewardService.create(createReqVO));
} }
@PutMapping("/update") @PostMapping("/update")
@ApiOperation("更新礼品") @ApiOperation("更新礼品")
//@PreAuthorize("@ss.hasPermission('reward::update')") //@PreAuthorize("@ss.hasPermission('reward::update')")
public CommonResult<Boolean> update(@Valid @RequestBody RewardUpdateReqVO updateReqVO) { public CommonResult<Boolean> update(@Valid @RequestBody RewardUpdateReqVO updateReqVO) {
......
...@@ -114,6 +114,7 @@ yudao: ...@@ -114,6 +114,7 @@ yudao:
- cn.iocoder.yudao.module.wealth.enums.ErrorCodeConstants - cn.iocoder.yudao.module.wealth.enums.ErrorCodeConstants
- cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants - cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants
- cn.iocoder.yudao.module.system.enums.ErrorCodeConstants - cn.iocoder.yudao.module.system.enums.ErrorCodeConstants
- cn.iocoder.yudao.module.reward.enums.ErrorCodeConstants
tenant: # 多租户相关配置项 tenant: # 多租户相关配置项
enable: false enable: false
ignore-urls: ignore-urls:
......
...@@ -999,3 +999,11 @@ customer.is.new.or.old.no.change=customer current business type is {}, it's no c ...@@ -999,3 +999,11 @@ customer.is.new.or.old.no.change=customer current business type is {}, it's no c
order.is.pre.installed=Order pre installed order.is.pre.installed=Order pre installed
customer.delay.approval.times.more.then.one=delay approval times more then one customer.delay.approval.times.more.then.one=delay approval times more then one
reward.do.not.exist=The reward does not exist
reward.end.time.less.than.now=The reward end time is less than the current time
reward.status.not.allow.delete=Only not enable can delete
reward.status.not.allow.close=Not enable reward can not close
reward.status.change.error=The reward status change error
reward.status.not.allow.delay=Only enable status can delay
reward.status.not.allow.create=Only enabled or disabled reward status can be created
reward.time.not.allow=The reward time is not allow
\ No newline at end of file
...@@ -1002,3 +1002,12 @@ order.already.in.merge.pkg=\u8BA2\u5355\u5DF2\u5728\u5408\u5305\u7BB1\u4E0B ...@@ -1002,3 +1002,12 @@ order.already.in.merge.pkg=\u8BA2\u5355\u5DF2\u5728\u5408\u5305\u7BB1\u4E0B
customer.is.new.or.old.no.change=\u5BA2\u6237\u5F53\u524D\u4E1A\u7EE9\u7C7B\u578B\u662F{}\u5BA2\u6237\uFF0C\u4E0D\u9700\u8981\u66F4\u65B0 customer.is.new.or.old.no.change=\u5BA2\u6237\u5F53\u524D\u4E1A\u7EE9\u7C7B\u578B\u662F{}\u5BA2\u6237\uFF0C\u4E0D\u9700\u8981\u66F4\u65B0
order.is.pre.installed=\u8BA2\u5355\u5DF2\u9884\u88C5 order.is.pre.installed=\u8BA2\u5355\u5DF2\u9884\u88C5
order.is.not.pre.installed =\u8BA2\u5355\u672A\u88C5\u7BB1\uFF0C\u4E0D\u80FD\u5408\u5305 order.is.not.pre.installed =\u8BA2\u5355\u672A\u88C5\u7BB1\uFF0C\u4E0D\u80FD\u5408\u5305
reward.do.not.exist=\u793C\u54C1\u4E0D\u5B58\u5728
reward.end.time.less.than.now=\u793C\u54C1\u7ED3\u675F\u65F6\u95F4\u4E0D\u80FD\u65E9\u4E8E\u5F53\u524D\u65F6\u95F4
reward.status.not.allow.delete=\u53EA\u6709\u672A\u542F\u7528\u53EF\u5220\u9664
reward.status.not.allow.close=\u672A\u542F\u7528\u793C\u54C1\u4E0D\u53EF\u5173\u95ED
reward.status.change.error=\u793C\u54C1\u72B6\u6001\u64CD\u4F5C\u4E0D\u7B26\u5408\u89C4\u5219
reward.status.not.allow.delay=\u53EA\u5141\u8BB8\u5EF6\u671F\u542F\u7528\u72B6\u6001\u793C\u54C1
reward.status.not.allow.create=\u521B\u5EFA\u7684\u793C\u54C1\u72B6\u6001\u53EA\u80FD\u662F\u542F\u7528\u6216\u672A\u542F\u7528
reward.time.not.allow=\u6D3B\u52A8\u65F6\u95F4\u4E0D\u5408\u6CD5
\ No newline at end of file
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