ApiNotPrintException 改为 CzgException
This commit is contained in:
@@ -6,7 +6,6 @@ import com.czg.account.dto.ad.ShopAdDTO;
|
||||
import com.czg.account.entity.ShopAd;
|
||||
import com.czg.account.service.ShopAdService;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.exception.ApiNotPrintException;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.validator.group.InsertGroup;
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.account.dto.ShopPayTypeDTO;
|
||||
import com.czg.account.dto.paytype.ShopPayTypeAddDTO;
|
||||
import com.czg.account.entity.ShopPayType;
|
||||
import com.czg.account.service.ShopPayTypeService;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.exception.ApiNotPrintException;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.validator.group.InsertGroup;
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.czg.account.service.ShopTableService;
|
||||
import com.czg.account.vo.ShopTableVO;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.enums.ShopTableStatusEnum;
|
||||
import com.czg.exception.ApiNotPrintException;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
@@ -42,7 +42,7 @@ public class ShopTableController {
|
||||
@PostMapping("/code")
|
||||
public void createCode(@RequestParam Integer num, HttpServletResponse response, HttpServletRequest request) throws IOException {
|
||||
if (num > 100) {
|
||||
throw new ApiNotPrintException("单次最多可获取100个");
|
||||
throw new CzgException("单次最多可获取100个");
|
||||
}
|
||||
shopTableService.createQrCode(StpKit.USER.getShopId(), num, response, request);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import com.czg.exception.ApiNotPrintException;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.market.dto.MemberConfigDTO;
|
||||
import com.czg.market.dto.MemberLevelDTO;
|
||||
import com.czg.market.entity.MemberLevelConfig;
|
||||
@@ -60,7 +60,7 @@ public class MemberController {
|
||||
*/
|
||||
// @SaAdminCheckPermission(value = "member:edit", name = "会员配置列表")
|
||||
@PostMapping("/level")
|
||||
public CzgResult<Boolean> addLevel(@Validated @RequestBody MemberLevelDTO levelDTO) throws ApiNotPrintException {
|
||||
public CzgResult<Boolean> addLevel(@Validated @RequestBody MemberLevelDTO levelDTO) throws CzgException {
|
||||
AssertUtil.isTrue(!StpKit.USER.isMainShop(), "无权限操作");
|
||||
return CzgResult.success(memberConfigService.addLevel(StpKit.USER.getShopId(), levelDTO));
|
||||
}
|
||||
@@ -71,7 +71,7 @@ public class MemberController {
|
||||
*/
|
||||
// @SaAdminCheckPermission(value = "member:edit", name = "会员配置列表")
|
||||
@PutMapping("/level")
|
||||
public CzgResult<Boolean> editLevel(@Validated({UpdateGroup.class, Default.class}) @RequestBody MemberLevelDTO levelDTO) throws ApiNotPrintException {
|
||||
public CzgResult<Boolean> editLevel(@Validated({UpdateGroup.class, Default.class}) @RequestBody MemberLevelDTO levelDTO) throws CzgException {
|
||||
AssertUtil.isTrue(!StpKit.USER.isMainShop(), "无权限操作");
|
||||
return CzgResult.success(memberConfigService.editLevel(StpKit.USER.getShopId(), levelDTO));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user