添加ResultCode

This commit is contained in:
lifenlong
2021-07-01 11:17:18 +08:00
parent cce14b4794
commit 931276f72b
32 changed files with 198 additions and 231 deletions

View File

@@ -1,5 +1,6 @@
package cn.lili.controller.other;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.common.utils.StringUtils;
import cn.lili.modules.permission.SettingKeys;
@@ -49,7 +50,7 @@ public class CustomWordsController {
}
if (!setting.getSettingValue().equals(secretKey)) {
throw new ServiceException("秘钥验证失败!");
throw new ServiceException(ResultCode.CUSTOM_WORDS_SECRET_KEY_ERROR);
}
String res = customWordsService.deploy();

View File

@@ -112,7 +112,7 @@ public class CouponManagerController {
private void setStoreInfo(CouponVO couponVO) {
AuthUser currentUser = UserContext.getCurrentUser();
if (currentUser == null) {
throw new ServiceException("获取当前用户信息不存在");
throw new ServiceException(ResultCode.USER_NOT_EXIST);
}
couponVO.setStoreId("platform");
couponVO.setStoreName("platform");