diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/AdvertRoundController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/AdvertRoundController.java index a771e2186..403e2cdc6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/AdvertRoundController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/AdvertRoundController.java @@ -33,7 +33,7 @@ public class AdvertRoundController extends XktBaseController { final IAdvertRoundService advertRoundService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "档口购买推广营销", httpMethod = "POST", response = R.class) @Log(title = "档口购买推广营销", businessType = BusinessType.INSERT) @PostMapping @@ -41,7 +41,7 @@ public class AdvertRoundController extends XktBaseController { return R.ok(advertRoundService.create(BeanUtil.toBean(createVO, AdRoundStoreCreateDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "获取推广位数据及右侧 已订购推广位 列表", httpMethod = "GET", response = R.class) @GetMapping(value = "/{advertId}/{storeId}/{showType}") public R getStoreAdInfo(@PathVariable("advertId") Long advertId, @PathVariable("storeId") Long storeId, @PathVariable("showType") Integer showType) { @@ -55,14 +55,14 @@ public class AdvertRoundController extends XktBaseController { return R.ok(BeanUtil.toBean(advertRoundService.getLatestInfo(BeanUtil.toBean(latestVO, AdRoundLatestDTO.class)), AdRoundLatestResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "位置枚举类型的推广位,获取推广商品", httpMethod = "GET", response = R.class) @GetMapping(value = "/position/{advertRoundId}") public R> getSetProdInfo(@PathVariable("advertRoundId") Long advertRoundId) { return R.ok(BeanUtil.copyToList(advertRoundService.getSetProdInfo(advertRoundId), AdRoundSetProdResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "获取档口已购推广列表", httpMethod = "POST", response = R.class) @PostMapping("/page") public R> page(@Validated @RequestBody AdvertRoundStorePageVO pageVO) { @@ -76,7 +76,7 @@ public class AdvertRoundController extends XktBaseController { return R.ok(BeanUtil.toBean(advertRoundService.getAdvertStoreSetInfo(storeId, advertRoundId), AdRoundStoreSetResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "退订", httpMethod = "POST", response = R.class) @Log(title = "退订", businessType = BusinessType.UPDATE) @PutMapping("/unsubscribe/{storeId}/{advertRoundId}") @@ -84,21 +84,21 @@ public class AdvertRoundController extends XktBaseController { return R.ok(advertRoundService.unsubscribe(storeId, advertRoundId)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "取最受欢迎的8个推广位", httpMethod = "GET", response = R.class) @GetMapping(value = "/populars") public R> getMostPopulars() { return R.ok(BeanUtil.copyToList(advertRoundService.getMostPopulars(), AdRoundPopularResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "档口上传推广图 或 修改商品", httpMethod = "PUT", response = R.class) @PutMapping("/update") public R updateAdvert(@Valid @RequestBody AdRoundUpdateVO uploadPicVO) { return R.ok(advertRoundService.updateAdvert(BeanUtil.toBean(uploadPicVO, AdRoundUpdateDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查看图片审核拒绝理由", httpMethod = "PUT", response = R.class) @PutMapping("/reject-reason/{advertRoundId}") public R getRejectReason(@PathVariable Long advertRoundId) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/AdvertRoundRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/AdvertRoundRecordController.java index 38f5ae406..7ea95e958 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/AdvertRoundRecordController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/AdvertRoundRecordController.java @@ -32,7 +32,7 @@ public class AdvertRoundRecordController extends XktBaseController { final IAdvertRoundRecordService advertRoundRecordService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "获取档口竞价失败列表", httpMethod = "POST", response = R.class) @PostMapping("/page") public R> page(@Validated @RequestBody AdvertRoundRecordPageVO pageVO) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreController.java index facda09f1..dbae1019a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreController.java @@ -49,7 +49,7 @@ public class StoreController extends XktBaseController { return R.ok(BeanUtil.copyToList(storeService.fuzzyQuery(storeName), StoreNameResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "修改档口基本信息", httpMethod = "PUT", response = R.class) @Log(title = "修改档口基本信息", businessType = BusinessType.UPDATE) @PutMapping @@ -112,35 +112,35 @@ public class StoreController extends XktBaseController { return R.ok(BeanUtil.toBean(storeService.getAdvertStoreInfo(storeId), StoreAdvertResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')") @ApiOperation(value = "获取档口首页 数据概览 ", httpMethod = "POST", response = R.class) @PostMapping(value = "/index/overview") public R indexOverview(@Validated @RequestBody StoreOverviewVO overviewVO) { return R.ok(BeanUtil.toBean(storeService.indexOverview(BeanUtil.toBean(overviewVO, StoreOverviewDTO.class)), StoreIndexOverviewResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')") @ApiOperation(value = "获取档口首页 销售额 ", httpMethod = "POST", response = R.class) @PostMapping(value = "/index/sale-revenue") public R> indexSaleRevenue(@Validated @RequestBody StoreSaleRevenueVO revenueVO) { return R.ok(BeanUtil.copyToList(storeService.indexSaleRevenue(BeanUtil.toBean(revenueVO, StoreSaleRevenueDTO.class)), StoreIndexSaleRevenueResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')") @ApiOperation(value = "获取档口首页 今日销售额 ", httpMethod = "GET", response = R.class) @GetMapping(value = "/index/today/sale-revenue/{storeId}") public R indexTodaySaleRevenue(@PathVariable Long storeId) { return R.ok(BeanUtil.toBean(storeService.indexTodaySaleRevenue(storeId), StoreIndexTodaySaleResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')") @ApiOperation(value = "获取档口首页 商品销售额前10 ", httpMethod = "POST", response = R.class) @PostMapping(value = "/index/sale/top10") public R> indexTop10Sale(@Validated @RequestBody StoreSaleTop10VO saleTop10VO) { return R.ok(BeanUtil.copyToList(storeService.indexTop10Sale(BeanUtil.toBean(saleTop10VO, StoreSaleTop10DTO.class)), StoreIndexSaleTop10ResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')") @ApiOperation(value = "获取档口首页 客户销售榜前10 ", httpMethod = "POST", response = R.class) @PostMapping(value = "/index/sale-cus/top10") public R> indexTop10SaleCus(@Validated @RequestBody StoreSaleCustomerTop10VO saleCusTop10VO) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerController.java index 6646d6320..e9f6bcb54 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerController.java @@ -43,7 +43,7 @@ public class StoreCustomerController extends XktBaseController { return R.ok(BeanUtil.copyToList(storeCusService.fuzzyQueryList(storeId, cusName), StoreCusFuzzyResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "新增档口客户", httpMethod = "POST", response = R.class) @Log(title = "新增档口客户", businessType = BusinessType.INSERT) @PostMapping @@ -51,7 +51,7 @@ public class StoreCustomerController extends XktBaseController { return R.ok(storeCusService.create(BeanUtil.toBean(storeCusVO, StoreCusDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "修改档口客户", httpMethod = "PUT", response = R.class) @Log(title = "修改档口客户", businessType = BusinessType.UPDATE) @PutMapping @@ -59,7 +59,7 @@ public class StoreCustomerController extends XktBaseController { return R.ok(storeCusService.updateStoreCus(BeanUtil.toBean(storeCusVO, StoreCusDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "删除档口客户", httpMethod = "DELETE", response = R.class) @Log(title = "删除档口客户", businessType = BusinessType.DELETE) @DeleteMapping("/{storeCusId}") @@ -74,7 +74,7 @@ public class StoreCustomerController extends XktBaseController { return R.ok(BeanUtil.toBean(storeCusService.selectByStoreCusId(storeCusId), StoreCusVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口客户列表", httpMethod = "POST", response = R.class) @PostMapping("/page") public R> selectPage(@Validated @RequestBody StoreCusPageVO pageVO) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerProductDiscountController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerProductDiscountController.java index f027cb5ba..de31e7115 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerProductDiscountController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreCustomerProductDiscountController.java @@ -36,7 +36,7 @@ public class StoreCustomerProductDiscountController extends XktBaseController { final IStoreCustomerProductDiscountService storeCusProdDiscService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "销售出库时,新增或修改档口客户优惠(全店商品优惠)", httpMethod = "PUT", response = R.class) @Log(title = "销售出库时,新增或修改档口客户优惠(全店商品优惠)", businessType = BusinessType.UPDATE) @PutMapping("/all-prod-discount") @@ -44,7 +44,7 @@ public class StoreCustomerProductDiscountController extends XktBaseController { return R.ok(storeCusProdDiscService.updateStoreCusProdDiscount(BeanUtil.toBean(cusProdDisVO, StoreCusProdDiscountDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "客户销售管理 批量减价、批量抹零减价、新增客户定价优惠", httpMethod = "PUT", response = R.class) @Log(title = "客户销售管理 批量减价、批量抹零减价、新增客户定价优惠", businessType = BusinessType.UPDATE) @PutMapping("/batch") @@ -52,14 +52,14 @@ public class StoreCustomerProductDiscountController extends XktBaseController { return R.ok(storeCusProdDiscService.batchDiscount(BeanUtil.toBean(batchDiscVO, StoreCusProdBatchDiscountDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询客户销售管理列表", httpMethod = "POST", response = R.class) @PostMapping("/page") public R> selectPage(@Validated @RequestBody StoreCusProdDiscPageVO pageVO) { return R.ok(storeCusProdDiscService.selectPage(BeanUtil.toBean(pageVO, StoreCusProdDiscPageDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "新增客户销售定价时,根据入参查询是否已存在优惠", httpMethod = "POST", response = R.class) @PostMapping("/exists") public R> discountExist(@Validated @RequestBody StoreCusProdDiscExistVO existVO) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreFactoryController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreFactoryController.java index d568b9d82..a19f9fa2a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreFactoryController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreFactoryController.java @@ -39,14 +39,14 @@ public class StoreFactoryController extends XktBaseController { final IStoreFactoryService storeFactoryService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "生产需求管理 工厂下拉列表", httpMethod = "GET", response = R.class) @GetMapping("/list") public R> getList() { return R.ok(BeanUtil.copyToList(storeFactoryService.getList(), StoreFactoryResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "新增档口合作工厂", httpMethod = "POST", response = R.class) @Log(title = "新增档口合作工厂", businessType = BusinessType.INSERT) @PostMapping @@ -54,7 +54,7 @@ public class StoreFactoryController extends XktBaseController { return R.ok(storeFactoryService.insertStoreFactory(BeanUtil.toBean(storeFactoryVO, StoreFactoryDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "修改档口合作工厂", httpMethod = "PUT", response = R.class) @Log(title = "修改档口合作工厂", businessType = BusinessType.UPDATE) @PutMapping @@ -62,14 +62,14 @@ public class StoreFactoryController extends XktBaseController { return R.ok(storeFactoryService.updateStoreFactory(BeanUtil.toBean(storeFactoryVO, StoreFactoryDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口合作工厂列表", httpMethod = "POST", response = R.class) @PostMapping("/page") public R> selectPage(@Validated @RequestBody StoreFactoryPageVO pageVO) { return R.ok(storeFactoryService.selectFactoryPage(BeanUtil.toBean(pageVO, StoreFactoryPageDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "获取档口合作工厂详细信息", httpMethod = "GET", response = R.class) @GetMapping(value = "/{storeId}/{storeFactoryId}") public R getInfo(@PathVariable("storeId") Long storeId, @PathVariable("storeFactoryId") Long storeFactoryId) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreHomepageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreHomepageController.java index fccb2b189..a8f5eefe7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreHomepageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreHomepageController.java @@ -31,7 +31,7 @@ public class StoreHomepageController extends XktBaseController { final IStoreHomepageService storeHomeService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "新增档口装修数据", httpMethod = "POST", response = R.class) @Log(title = "新增档口装修数据", businessType = BusinessType.INSERT) @PostMapping("/decoration/{storeId}/{templateNum}") @@ -40,14 +40,14 @@ public class StoreHomepageController extends XktBaseController { return R.ok(storeHomeService.insert(storeId, templateNum, BeanUtil.toBean(decorationVO, StoreHomeDecorationDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口装修数据", httpMethod = "GET", response = R.class) @GetMapping(value = "/decoration/{storeId}") public R getDecorationInfo(@PathVariable("storeId") Long storeId) { return R.ok(BeanUtil.toBean(storeHomeService.selectByStoreId(storeId), StoreHomeDecorationVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "修改档口装修数据", httpMethod = "PUT", response = R.class) @Log(title = "修改档口装修数据", businessType = BusinessType.UPDATE) @PutMapping("/decoration/{storeId}/{templateNum}") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreOrderController.java index 93026bc33..26b176cb5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreOrderController.java @@ -144,7 +144,7 @@ public class StoreOrderController extends XktBaseController { return success(PageVO.of(pageDTO, StoreOrderPageItemVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "订单", businessType = BusinessType.OTHER) @ApiOperation("发货-平台物流") @PostMapping("ship/platform") @@ -161,7 +161,7 @@ public class StoreOrderController extends XktBaseController { return success(respList); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "订单", businessType = BusinessType.OTHER) @ApiOperation("发货-档口物流") @PostMapping("ship/store") @@ -178,7 +178,7 @@ public class StoreOrderController extends XktBaseController { return success(respList); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "订单", businessType = BusinessType.OTHER) @ApiOperation("打印面单") @PostMapping("ship/print") @@ -240,7 +240,7 @@ public class StoreOrderController extends XktBaseController { return success(afterSaleApplyResult.getStoreOrderId()); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "订单", businessType = BusinessType.OTHER) @ApiOperation("确认退款") @PostMapping("refund/confirm") @@ -272,7 +272,7 @@ public class StoreOrderController extends XktBaseController { return success(); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "订单", businessType = BusinessType.OTHER) @ApiOperation("拒绝退款") @PostMapping("refund/reject") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductController.java index 409c93c69..9ec2daee4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductController.java @@ -56,7 +56,7 @@ public class StoreProductController extends XktBaseController { return R.ok(BeanUtil.copyToList(storeProdService.fuzzyQueryResPicList(storeId, prodArtNum), StoreProdFuzzyResPicVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "推广营销(新品馆)模糊查询最新30天上新商品", httpMethod = "GET", response = R.class) @GetMapping(value = "/fuzzy/latest30") public R> fuzzyQueryLatest30List(@RequestParam(value = "prodArtNum", required = false) String prodArtNum, @@ -64,7 +64,7 @@ public class StoreProductController extends XktBaseController { return R.ok(BeanUtil.copyToList(storeProdService.fuzzyQueryLatest30List(storeId, prodArtNum), StoreProdFuzzyLatest30ResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口商品列表", httpMethod = "POST", response = R.class) @PostMapping("/page") public R> page(@Validated @RequestBody StoreProdPageVO pageVO) { @@ -96,7 +96,7 @@ public class StoreProductController extends XktBaseController { return R.ok(BeanUtil.toBean(storeProdService.getSkuList(storeProdId), StoreProdSkuResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "档口商品", businessType = BusinessType.INSERT) @ApiOperation(value = "新增档口商品", httpMethod = "POST", response = R.class) @PostMapping @@ -104,7 +104,7 @@ public class StoreProductController extends XktBaseController { return R.ok(storeProdService.insertStoreProduct(BeanUtil.toBean(storeProdVO, StoreProdDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "修改档口商品", httpMethod = "PUT", response = R.class) @Log(title = "档口商品", businessType = BusinessType.UPDATE) @PutMapping("/{storeProdId}") @@ -112,7 +112,7 @@ public class StoreProductController extends XktBaseController { return R.ok(storeProdService.updateStoreProduct(storeProdId, BeanUtil.toBean(storeProdVO, StoreProdDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "修改档口商品状态", businessType = BusinessType.UPDATE) @ApiOperation(value = "修改档口商品状态", httpMethod = "PUT", response = R.class) @PutMapping("/prod-status") @@ -120,7 +120,7 @@ public class StoreProductController extends XktBaseController { return R.ok(storeProdService.updateStoreProductStatus(BeanUtil.toBean(prodStatusVO, StoreProdStatusDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "删除商品", businessType = BusinessType.DELETE) @ApiOperation(value = "删除商品", httpMethod = "DELETE", response = R.class) @DeleteMapping() @@ -128,7 +128,7 @@ public class StoreProductController extends XktBaseController { return R.ok(storeProdService.batchDelete(BeanUtil.toBean(deleteVO, StoreProdDeleteDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "获取档口图片空间", httpMethod = "POST", response = R.class) @PostMapping(value = "/pic-space") public R getStoreProductPicSpace(@Validated @RequestBody StoreProdPicSpaceVO picSpaceVO) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductDemandController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductDemandController.java index f58cbdf45..8b2a09ee9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductDemandController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductDemandController.java @@ -32,7 +32,7 @@ public class StoreProductDemandController extends XktBaseController { final IStoreProductDemandService storeProdDemandService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "商品入库校验是否存在需求单", httpMethod = "POST", response = R.class) @Log(title = "商品入库校验是否存在需求单", businessType = BusinessType.INSERT) @PostMapping("/verify") @@ -41,14 +41,14 @@ public class StoreProductDemandController extends XktBaseController { .verifyDemandExist(BeanUtil.toBean(demandVerifyVO, StoreProdDemandVerifyDTO.class)), StoreProdDemandVerifyResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "根据货号获取所有颜色的库存数量、在产数量", httpMethod = "GET", response = R.class) @GetMapping(value = "/exists-quantity/{storeId}/{storeProdId}") public R> getStockAndProduceQuantity(@PathVariable("storeId") Long storeId, @PathVariable("storeProdId") Long storeProdId) { return R.ok(BeanUtil.copyToList(storeProdDemandService.getStockAndProduceQuantity(storeId, storeProdId), StoreProdDemandQuantityVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "新增档口商品需求单", httpMethod = "POST", response = R.class) @Log(title = "新增档口商品需求单", businessType = BusinessType.INSERT) @PostMapping("") @@ -56,14 +56,14 @@ public class StoreProductDemandController extends XktBaseController { return R.ok(storeProdDemandService.createDemand(BeanUtil.toBean(prodDemandVO, StoreProdDemandDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口商品需求单列表", httpMethod = "POST", response = R.class) @PostMapping("/page") public R> selectPage(@Validated @RequestBody StoreProdDemandPageVO pageVO) { return R.ok(storeProdDemandService.selectPage(BeanUtil.toBean(pageVO, StoreProdDemandPageDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "点击安排生产", httpMethod = "PUT", response = R.class) @Log(title = "点击安排生产", businessType = BusinessType.UPDATE) @PutMapping @@ -76,7 +76,7 @@ public class StoreProductDemandController extends XktBaseController { } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "删除档口商品需求单", httpMethod = "DELETE", response = R.class) @Log(title = "删除档口商品需求单", businessType = BusinessType.DELETE) @DeleteMapping("") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStockController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStockController.java index c49f82835..4f4c273e2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStockController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStockController.java @@ -41,14 +41,14 @@ public class StoreProductStockController extends XktBaseController { final IStoreProductStockService storeProdStockService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口库存列表", httpMethod = "POST", response = R.class) @PostMapping("/page") public R> selectPage(@Validated @RequestBody StoreProdStockPageVO pageVO) { return R.ok(storeProdStockService.selectPage(BeanUtil.toBean(pageVO, StoreProdStockPageDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "档口商品库存清零", httpMethod = "PUT", response = R.class) @Log(title = "档口商品库存清零", businessType = BusinessType.UPDATE) @PutMapping("/clear-zero") @@ -56,7 +56,7 @@ public class StoreProductStockController extends XktBaseController { return R.ok(storeProdStockService.clearStockToZero(BeanUtil.toBean(clearZeroVO, StoreProdStockClearZeroDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "直接调整档口商品库存值", httpMethod = "PUT", response = R.class) @Log(title = "直接调整档口商品库存值", businessType = BusinessType.UPDATE) @PutMapping("/update-stock/{storeId}") @@ -64,7 +64,7 @@ public class StoreProductStockController extends XktBaseController { return R.ok(storeProdStockService.updateStock(storeId, Collections.singletonList(BeanUtil.toBean(prodStockVO, StoreProdStockDTO.class)), 0)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "库存盘点提交", httpMethod = "PUT", response = R.class) @Log(title = "库存盘点提交", businessType = BusinessType.UPDATE) @PutMapping("/check/update-stock/{storeId}") @@ -84,7 +84,7 @@ public class StoreProductStockController extends XktBaseController { return R.ok(BeanUtil.copyToList(storeProdStockService.selectByStoreIdAndProdArtNum(storeId, prodArtNum), StoreProdStockResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "销售出库,输入货号,查询客户优惠信息及当前货号颜色的库存", httpMethod = "POST", response = R.class) @PostMapping(value = "/stock-cus-discount") public R getStockAndCusDiscount(@Validated @RequestBody StoreProdStockAndDiscountVO stockAndDiscountVO) { @@ -92,7 +92,7 @@ public class StoreProductStockController extends XktBaseController { .toBean(stockAndDiscountVO, StoreProdStockAndDiscountDTO.class)), StoreProdStockAndDiscountResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "导出库存", httpMethod = "POST", response = R.class) @Log(title = "导出库存", businessType = BusinessType.EXPORT) @PostMapping("/export") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageController.java index b2fbf4477..8a3394e6e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageController.java @@ -41,7 +41,7 @@ public class StoreProductStorageController extends XktBaseController { final IStoreProductStorageService storeProdStorageService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "新增档口商品入库", httpMethod = "POST", response = R.class) @Log(title = "新增档口商品入库", businessType = BusinessType.INSERT) @PostMapping @@ -49,21 +49,21 @@ public class StoreProductStorageController extends XktBaseController { return R.ok(storeProdStorageService.create(BeanUtil.toBean(storeProdStorageVO, StoreProdStorageDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口商品入库列表", httpMethod = "POST", response = R.class) @PostMapping("/page") public R> page(@Validated @RequestBody StoreProdStoragePageVO pageVO) { return R.ok(storeProdStorageService.page(BeanUtil.toBean(pageVO, StoreProdStoragePageDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "获取档口商品入库详细信息", httpMethod = "GET", response = R.class) @GetMapping(value = "/{storeProdStorageId}") public R getInfo(@PathVariable("storeProdStorageId") Long storeProdStorageId) { return R.ok(BeanUtil.toBean(storeProdStorageService.selectByStoreProdStorageId(storeProdStorageId), StoreProdStorageResVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "撤销档口商品入库", httpMethod = "DELETE", response = R.class) @Log(title = "撤销档口商品入库", businessType = BusinessType.DELETE) @DeleteMapping("/{storeProdStorageId}") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageDemandDeductController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageDemandDeductController.java index b2fdfcd50..1da8e36f5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageDemandDeductController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageDemandDeductController.java @@ -28,7 +28,7 @@ public class StoreProductStorageDemandDeductController extends XktBaseController final IStoreProductStorageDemandDeducteService prodStorageDemandDeductService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "入库单列表获取抵扣需求明细", httpMethod = "GET", response = R.class) @GetMapping(value = "/{storeId}/{storageCode}") public R getStorageDemandDeductList(@PathVariable("storeId") Long storeId, @PathVariable("storageCode") String storageCode) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageDetailController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageDetailController.java index ab58f5a86..f006f1cd7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageDetailController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreProductStorageDetailController.java @@ -41,7 +41,7 @@ public class StoreProductStorageDetailController extends XktBaseController { final IStoreProductStorageDetailService storageDetailService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "导出入库记录", httpMethod = "POST", response = R.class) @Log(title = "导出入库记录", businessType = BusinessType.EXPORT) @PostMapping("/export") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreSaleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreSaleController.java index 234235697..e7739a617 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreSaleController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreSaleController.java @@ -39,7 +39,7 @@ public class StoreSaleController extends XktBaseController { final IStoreSaleService storeSaleService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "根据当前客户查询最近的销售业绩,以及欠款金额", httpMethod = "GET", response = R.class) @GetMapping("/cus-overall") public R getCusGeneralSale(@RequestParam("days") Integer days, @RequestParam("storeId") Long storeId, @@ -47,14 +47,14 @@ public class StoreSaleController extends XktBaseController { return R.ok(BeanUtil.toBean(storeSaleService.getCusGeneralSale(days, storeId, storeCusId), StoreCusGeneralSaleVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口销售出库列表", httpMethod = "POST", response = R.class) @PostMapping("/page") public R> page(@Validated @RequestBody StoreSalePageVO salePageVO) { return R.ok(storeSaleService.page(BeanUtil.toBean(salePageVO, StoreSalePageDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "新增档口销售出库", httpMethod = "POST", response = R.class) @Log(title = "档口销售出库", businessType = BusinessType.INSERT) @PostMapping @@ -62,7 +62,7 @@ public class StoreSaleController extends XktBaseController { return R.ok(storeSaleService.insertStoreSale(BeanUtil.toBean(storeSaleVO, StoreSaleDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "修改档口销售出库", businessType = BusinessType.UPDATE) @ApiOperation(value = "返单后,更新档口销售出库", httpMethod = "PUT", response = R.class) @PutMapping @@ -70,21 +70,21 @@ public class StoreSaleController extends XktBaseController { return R.ok(storeSaleService.updateStoreSale(BeanUtil.toBean(storeSaleVO, StoreSaleDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口销售出库详情", httpMethod = "GET", response = R.class) @GetMapping(value = "/{storeSaleId}") public R getInfo(@PathVariable("storeSaleId") Long storeSaleId) { return R.ok(BeanUtil.toBean(storeSaleService.selectStoreSaleByStoreSaleId(storeSaleId), StoreSaleVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口今日销售额", httpMethod = "GET", response = R.class) @GetMapping(value = "/today-sale/{storeId}") public R getTodaySale(@PathVariable("storeId") Long storeId) { return R.ok(BeanUtil.toBean(storeSaleService.getTodaySale(storeId), StoreTodaySaleVO.class)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "客户欠款结算", businessType = BusinessType.UPDATE) @ApiOperation(value = "客户欠款结算", httpMethod = "PUT", response = R.class) @PutMapping("/clear-debt") @@ -92,7 +92,7 @@ public class StoreSaleController extends XktBaseController { return R.ok(storeSaleService.clearStoreCusDebt(BeanUtil.toBean(payStatusVO, StoreSalePayStatusDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "删除档口销售出库", httpMethod = "PUT", response = R.class) @Log(title = "删除档口销售出库", businessType = BusinessType.DELETE) @DeleteMapping("/{storeSaleId}") @@ -100,7 +100,7 @@ public class StoreSaleController extends XktBaseController { return R.ok(storeSaleService.deleteStoreSaleByStoreSaleId(storeSaleId)); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @Log(title = "修改备注", businessType = BusinessType.UPDATE) @ApiOperation(value = "修改备注", httpMethod = "PUT", response = R.class) @PutMapping("/memo") @@ -108,7 +108,7 @@ public class StoreSaleController extends XktBaseController { return R.ok(storeSaleService.updateMemo(BeanUtil.toBean(updateMemoVO, StoreSaleUpdateMemoDTO.class))); } - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "导出销售出库列表", httpMethod = "POST", response = R.class) @Log(title = "导出销售出库列表", businessType = BusinessType.EXPORT) @PostMapping("/export") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreSaleRefundRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreSaleRefundRecordController.java index a2a2aae95..11dfda06f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreSaleRefundRecordController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/xkt/StoreSaleRefundRecordController.java @@ -31,7 +31,7 @@ public class StoreSaleRefundRecordController extends XktBaseController { final IStoreSaleRefundRecordService storeSaleRefundRecordService; - @PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()") + @PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()") @ApiOperation(value = "查询档口销售出库返单记录", httpMethod = "POST", response = R.class) @GetMapping("/list/{storeId}/{storeSaleId}") public R> selectPage(@PathVariable("storeId") Long storeId, @PathVariable("storeSaleId") Long storeSaleId) { diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/enums/AdType.java b/ruoyi-common/src/main/java/com/ruoyi/common/enums/AdType.java index 387b34502..87bbb8ddd 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/enums/AdType.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/enums/AdType.java @@ -93,11 +93,11 @@ public enum AdType { // APP首页热卖推荐 轮播商品 APP_HOME_HOT_RECOMMEND_FIXED_PROD(503, "APP首页热卖推荐固定轮播商品"), // APP首页热卖推荐 商品列表 - APP_HOME_HOT_RECOMMEND_PROD(504, "APP首页热卖推荐"), + APP_HOME_HOT_RECOMMEND_PROD(504, "APP首页热卖推荐商品列表"), // APP首页人气榜 商品列表 - APP_HOME_POP_RECOMMEND_PROD(505, "APP首页人气榜"), + APP_HOME_POP_RECOMMEND_PROD(505, "APP首页人气榜商品列表"), // APP首页新品榜 商品列表 - APP_HOME_NEW_PROD_RECOMMEND_PROD(506, "APP首页新品榜"), + APP_HOME_NEW_PROD_RECOMMEND_PROD(506, "APP首页新品榜商品列表"), // APP搜索结果 APP_SEARCH_RESULT(507, "APP搜索结果"), diff --git a/xkt/src/main/java/com/ruoyi/xkt/enums/AdRoundType.java b/xkt/src/main/java/com/ruoyi/xkt/enums/AdRoundType.java index f5d39cc19..d3c11a8e7 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/enums/AdRoundType.java +++ b/xkt/src/main/java/com/ruoyi/xkt/enums/AdRoundType.java @@ -22,8 +22,6 @@ public enum AdRoundType { THIRD_ROUND(3, "第三轮"), // 第四轮 FOURTH_ROUND(4, "第四轮"), - // 第五轮 - FIFTH_ROUND(5, "第五轮"), ; diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundRecordServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundRecordServiceImpl.java index 3e94fe46e..39eab123b 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundRecordServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundRecordServiceImpl.java @@ -41,7 +41,7 @@ public class AdvertRoundRecordServiceImpl implements IAdvertRoundRecordService { @Transactional(readOnly = true) public Page page(AdvertRoundRecordPageDTO pageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize()); diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundServiceImpl.java index 4fe77580d..d60430766 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundServiceImpl.java @@ -164,7 +164,7 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService { throw new ServiceException("当前推广位非位置枚举,不可调用该接口!", HttpStatus.ERROR); } // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(advertRound.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(advertRound.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } if (StringUtils.isEmpty(advertRound.getProdIdStr())) { @@ -189,7 +189,7 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService { @Transactional(readOnly = true) public AdRoundStoreResDTO getStoreAdInfo(final Long storeId, final Long advertId, final Integer showType) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } final LocalTime now = LocalTime.now(); @@ -221,9 +221,9 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService { final Date firstRoundEndTime = advertRoundList.stream().filter(x -> x.getRoundId().equals(AdRoundType.PLAY_ROUND.getValue())) .max(Comparator.comparing(AdvertRound::getEndTime)) .orElseThrow(() -> new ServiceException("获取推广结束时间失败,请联系客服!", HttpStatus.ERROR)).getEndTime(); - // 如果当前非第一轮最后一天,则展示前4轮;如果当前是第一轮最后一天,则展示第2到第5轮。 + // 如果当前非第一轮最后一天,则展示前3轮;如果当前是第一轮最后一天,则展示第2到第4轮。 advertRoundList = voucherDate.before(firstRoundEndTime) - ? advertRoundList.stream().filter(x -> !Objects.equals(x.getRoundId(), AdRoundType.FIFTH_ROUND.getValue())).collect(Collectors.toList()) + ? advertRoundList.stream().filter(x -> !Objects.equals(x.getRoundId(), AdRoundType.FOURTH_ROUND.getValue())).collect(Collectors.toList()) : advertRoundList.stream().filter(x -> !Objects.equals(x.getRoundId(), AdRoundType.PLAY_ROUND.getValue())).collect(Collectors.toList()); // 如果投放类型是:时间范围,则只需要返回每一轮的开始时间和结束时间;如果投放类型是:位置枚举,则需要返回每一个位置的详细情况 if (Objects.equals(showType, AdShowType.TIME_RANGE.getValue())) { @@ -358,7 +358,7 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService { throw new ServiceException("当前推广类型position:不传!", HttpStatus.ERROR); } // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(createDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(createDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 当前营销推广位的锁 @@ -437,7 +437,7 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService { @Transactional(readOnly = true) public Page page(AdvertRoundStorePageDTO pageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize()); @@ -498,7 +498,7 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService { @Transactional public Integer unsubscribe(Long storeId, Long advertRoundId) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } AdvertRound advertRound = Optional.ofNullable(this.advertRoundMapper.selectOne(new LambdaQueryWrapper() @@ -605,7 +605,7 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService { @Transactional public Integer updateAdvert(AdRoundUpdateDTO picDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(picDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(picDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } AdvertRound advertRound = Optional.ofNullable(this.advertRoundMapper.selectOne(new LambdaQueryWrapper() @@ -662,7 +662,7 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService { .eq(AdvertRound::getPicAuditStatus, AdPicAuditStatus.AUDIT_REJECTED.getValue()))) .orElseThrow(() -> new ServiceException("推广位不存在!", HttpStatus.ERROR)); // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(advertRound.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(advertRound.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } return advertRound.getRejectReason(); diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerProductDiscountServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerProductDiscountServiceImpl.java index 895d7acd7..ac2ca9ddc 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerProductDiscountServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerProductDiscountServiceImpl.java @@ -54,7 +54,7 @@ public class StoreCustomerProductDiscountServiceImpl implements IStoreCustomerPr @Transactional public Integer updateStoreCusProdDiscount(StoreCusProdDiscountDTO cusProdDisDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(cusProdDisDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(cusProdDisDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List storeCusList = this.storeCusMapper.selectList(new LambdaQueryWrapper() @@ -103,7 +103,7 @@ public class StoreCustomerProductDiscountServiceImpl implements IStoreCustomerPr @Transactional public Integer batchDiscount(StoreCusProdBatchDiscountDTO batchDiscDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(batchDiscDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(batchDiscDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 获取当前客户已有优惠列表 @@ -160,7 +160,7 @@ public class StoreCustomerProductDiscountServiceImpl implements IStoreCustomerPr @Transactional(readOnly = true) public Page selectPage(StoreCusProdDiscPageDTO pageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize()); @@ -178,7 +178,7 @@ public class StoreCustomerProductDiscountServiceImpl implements IStoreCustomerPr @Transactional(readOnly = true) public List discountExist(StoreCusProdDiscExistDTO existDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(existDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(existDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List discountList = this.cusProdDiscMapper.selectList(new LambdaQueryWrapper() diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerServiceImpl.java index 6cf856e30..7a36b95cf 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreCustomerServiceImpl.java @@ -64,7 +64,7 @@ public class StoreCustomerServiceImpl implements IStoreCustomerService { @Transactional public int create(StoreCusDTO storeCusDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeCusDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeCusDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } return this.storeCusMapper.insert(BeanUtil.toBean(storeCusDTO, StoreCustomer.class)); @@ -77,7 +77,7 @@ public class StoreCustomerServiceImpl implements IStoreCustomerService { .eq(StoreCustomer::getId, storeCusId).eq(StoreCustomer::getDelFlag, Constants.UNDELETED))) .orElseThrow(() -> new ServiceException("档口客户不存在!")); // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeCus.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeCus.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } storeCus.setDelFlag(Constants.DELETED); @@ -88,7 +88,7 @@ public class StoreCustomerServiceImpl implements IStoreCustomerService { @Transactional(readOnly = true) public Page selectPage(StoreCusPageDTO storeCusPageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeCusPageDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeCusPageDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() @@ -108,7 +108,7 @@ public class StoreCustomerServiceImpl implements IStoreCustomerService { @Transactional public int updateStoreCus(StoreCusDTO storeCusDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeCusDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeCusDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } Optional.ofNullable(storeCusDTO.getStoreCusId()).orElseThrow(() -> new ServiceException("档口客户ID不可为空!")); diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreHomepageServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreHomepageServiceImpl.java index 065070e93..2de34ec42 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreHomepageServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreHomepageServiceImpl.java @@ -63,7 +63,7 @@ public class StoreHomepageServiceImpl implements IStoreHomepageService { @Transactional public Integer insert(Long storeId, Integer templateNum, StoreHomeDecorationDTO homepageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List homepageList = this.insertToHomepage(storeId, homepageDTO); @@ -89,7 +89,7 @@ public class StoreHomepageServiceImpl implements IStoreHomepageService { @Transactional(readOnly = true) public StoreHomeDecorationResDTO selectByStoreId(Long storeId) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } Store store = Optional.ofNullable(this.storeMapper.selectOne(new LambdaQueryWrapper() @@ -153,7 +153,7 @@ public class StoreHomepageServiceImpl implements IStoreHomepageService { @Transactional public Integer updateStoreHomepage(Long storeId, Integer templateNum, StoreHomeDecorationDTO homepageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 先将所有的档口模板的文件都删除掉 diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductDemandServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductDemandServiceImpl.java index 16e8aaf18..73ccddbd3 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductDemandServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductDemandServiceImpl.java @@ -62,7 +62,7 @@ public class StoreProductDemandServiceImpl implements IStoreProductDemandService @Transactional(readOnly = true) public List getStockAndProduceQuantity(Long storeId, Long storeProdId) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List prodColorList = Optional.ofNullable(this.storeProdColorMapper.selectList(new LambdaQueryWrapper() @@ -138,7 +138,7 @@ public class StoreProductDemandServiceImpl implements IStoreProductDemandService @Transactional public Integer createDemand(StoreProdDemandDTO demandDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(demandDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(demandDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } StoreProductDemand demand = new StoreProductDemand(); @@ -172,7 +172,7 @@ public class StoreProductDemandServiceImpl implements IStoreProductDemandService */ public Page selectPage(StoreProdDemandPageDTO pageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 启用分页查询 @@ -212,7 +212,7 @@ public class StoreProductDemandServiceImpl implements IStoreProductDemandService @Transactional public Integer updateWorkingStatus(StoreProdDemandWorkingDTO workingDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(workingDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(workingDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List demandDetailList = Optional.ofNullable(this.storeProdDemandDetailMapper.selectList(new LambdaQueryWrapper() @@ -236,7 +236,7 @@ public class StoreProductDemandServiceImpl implements IStoreProductDemandService @Transactional(readOnly = true) public StoreProdDemandVerifyResDTO verifyDemandExist(StoreProdDemandVerifyDTO demandVerifyDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(demandVerifyDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(demandVerifyDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 所有的档口颜色ID列表 @@ -378,7 +378,7 @@ public class StoreProductDemandServiceImpl implements IStoreProductDemandService @Transactional public int deleteByStoreProdDemandIds(StoreProdDemandDeleteDTO deleteDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(deleteDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(deleteDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List demandDetailList = Optional.ofNullable(this.storeProdDemandDetailMapper.selectList(new LambdaQueryWrapper() diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductServiceImpl.java index 890b59e68..26d5c92c0 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductServiceImpl.java @@ -147,7 +147,7 @@ public class StoreProductServiceImpl implements IStoreProductService { @Transactional(readOnly = true) public StoreProdPicSpaceResDTO getStoreProductPicSpace(StoreProdPicSpaceDTO spaceDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(spaceDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(spaceDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper().eq(StoreProduct::getId, spaceDTO.getStoreId()) @@ -186,7 +186,7 @@ public class StoreProductServiceImpl implements IStoreProductService { @Transactional(readOnly = true) public Page page(StoreProdPageDTO pageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize()); @@ -229,7 +229,7 @@ public class StoreProductServiceImpl implements IStoreProductService { // TODO 富文本标签过滤 // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeProdDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeProdDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 组装StoreProduct数据 @@ -446,7 +446,7 @@ public class StoreProductServiceImpl implements IStoreProductService { @Transactional public Integer updateStoreProductStatus(StoreProdStatusDTO prodStatusDTO) throws IOException { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(prodStatusDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(prodStatusDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 判断商品状态是否不存在 @@ -473,7 +473,7 @@ public class StoreProductServiceImpl implements IStoreProductService { @Transactional public Integer batchDelete(StoreProdDeleteDTO deleteDTO) throws IOException { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(deleteDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(deleteDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List storeProdList = this.storeProdMapper.selectList(new LambdaQueryWrapper() @@ -504,7 +504,7 @@ public class StoreProductServiceImpl implements IStoreProductService { @Transactional(readOnly = true) public List fuzzyQueryLatest30List(Long storeId, String prodArtNum) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } LocalDateTime daysAgo = LocalDateTime.now().minusDays(30).withHour(0).withMinute(0).withSecond(0); diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStockServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStockServiceImpl.java index 0770ac36a..7be106cad 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStockServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStockServiceImpl.java @@ -52,7 +52,7 @@ public class StoreProductStockServiceImpl implements IStoreProductStockService { @Transactional(readOnly = true) public Page selectPage(StoreProdStockPageDTO pageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize()); @@ -98,7 +98,7 @@ public class StoreProductStockServiceImpl implements IStoreProductStockService { @Transactional(readOnly = true) public StoreProdStockAndDiscountResDTO getStockAndCusDiscount(StoreProdStockAndDiscountDTO dto) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(dto.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(dto.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } StoreProductStock stock = this.storeProdStockMapper.selectOne(new LambdaQueryWrapper() @@ -144,7 +144,7 @@ public class StoreProductStockServiceImpl implements IStoreProductStockService { @Transactional public Integer checkAndUpdateStock(Long storeId, StoreProdCheckStockDTO checkStockDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List stockList = Optional.ofNullable(this.storeProdStockMapper.selectList(new LambdaQueryWrapper() @@ -216,7 +216,7 @@ public class StoreProductStockServiceImpl implements IStoreProductStockService { @Transactional(readOnly = true) public List export(StoreProdStockExportDTO exportDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(exportDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(exportDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 导出勾选 @@ -290,7 +290,7 @@ public class StoreProductStockServiceImpl implements IStoreProductStockService { @Transactional public int clearStockToZero(StoreProdStockClearZeroDTO clearZeroDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(clearZeroDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(clearZeroDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List stockList = Optional.ofNullable(this.storeProdStockMapper.selectList(new LambdaQueryWrapper() @@ -315,7 +315,7 @@ public class StoreProductStockServiceImpl implements IStoreProductStockService { @Transactional public int updateStock(Long storeId, List updateStockList, Integer multiplierFactor) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List stockList = Optional.ofNullable(this.storeProdStockMapper.selectList(new LambdaQueryWrapper() diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageDemandDeducteServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageDemandDeducteServiceImpl.java index b9a7200eb..a1e84358c 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageDemandDeducteServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageDemandDeducteServiceImpl.java @@ -51,7 +51,7 @@ public class StoreProductStorageDemandDeducteServiceImpl implements IStoreProduc @Transactional(readOnly = true) public StoreProdStorageDemandDeductDTO getStorageDemandDeductList(Long storeId, String storageCode) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 根据storageCode找到入库单 diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageDetailServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageDetailServiceImpl.java index d1150f9e4..17e2812e5 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageDetailServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageDetailServiceImpl.java @@ -37,7 +37,7 @@ public class StoreProductStorageDetailServiceImpl implements IStoreProductStorag @Transactional(readOnly = true) public List export(StoreStorageExportDTO exportDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(exportDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(exportDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } if (CollectionUtils.isNotEmpty(exportDTO.getStoreProdStorageIdList())) { diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageServiceImpl.java index c95eb0c77..c0f560c77 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductStorageServiceImpl.java @@ -66,7 +66,7 @@ public class StoreProductStorageServiceImpl implements IStoreProductStorageServi @Transactional(readOnly = true) public Page page(StoreProdStoragePageDTO pageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize()); @@ -84,7 +84,7 @@ public class StoreProductStorageServiceImpl implements IStoreProductStorageServi @Transactional public int create(StoreProdStorageDTO storeProdStorageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeProdStorageDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeProdStorageDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 生成code @@ -168,7 +168,7 @@ public class StoreProductStorageServiceImpl implements IStoreProductStorageServi .eq(StoreProductStorage::getId, storeProdStorageId).eq(StoreProductStorage::getDelFlag, Constants.UNDELETED))) .orElseThrow(() -> new ServiceException("档口商品入库不存在!", HttpStatus.ERROR)); // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storage.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storage.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 档口商品入库明细 @@ -199,7 +199,7 @@ public class StoreProductStorageServiceImpl implements IStoreProductStorageServi .eq(StoreProductStorage::getId, storeProdStorageId).eq(StoreProductStorage::getDelFlag, Constants.UNDELETED))) .orElseThrow(() -> new ServiceException("档口商品入库不存在!", HttpStatus.ERROR)); // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storage.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storage.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } storage.setDelFlag(Constants.DELETED); diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleRefundRecordServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleRefundRecordServiceImpl.java index ac78273de..460d0bd92 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleRefundRecordServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleRefundRecordServiceImpl.java @@ -47,7 +47,7 @@ public class StoreSaleRefundRecordServiceImpl implements IStoreSaleRefundRecordS @Transactional(readOnly = true) public List selectList(Long storeId, Long storeSaleId) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } List refundRecordList = this.refundRecordMapper.selectList(new LambdaQueryWrapper() diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleServiceImpl.java index 04929d413..90fe4c47f 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleServiceImpl.java @@ -66,7 +66,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService { @Transactional(readOnly = true) public StoreCusGeneralSaleDTO getCusGeneralSale(Integer days, Long storeId, Long storeCusId) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } StoreCustomer storeCus = Optional.ofNullable(this.storeCusMapper.selectOne(new LambdaQueryWrapper() @@ -107,7 +107,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService { @Transactional(readOnly = true) public Page page(StoreSalePageDTO pageDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(pageDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize()); @@ -131,7 +131,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService { .in(StoreSale::getId, payStatusDTO.getStoreSaleIdList()).eq(StoreSale::getDelFlag, Constants.UNDELETED))) .orElseThrow(() -> new ServiceException("没有找到对应的销售出库单!", HttpStatus.ERROR)); // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeSaleList.get(0).getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeSaleList.get(0).getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 勾选订单是否有已结算的 @@ -154,7 +154,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService { @Transactional(readOnly = true) public StoreTodaySaleDTO getTodaySale(Long storeId) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeId)) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 今天 yyyy-MM-dd @@ -189,7 +189,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService { .eq(StoreSale::getId, updateMemoDTO.getStoreSaleId()).eq(StoreSale::getDelFlag, Constants.UNDELETED))) .orElseThrow(() -> new ServiceException("没有找到对应的销售出库单!", HttpStatus.ERROR)); // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeSale.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeSale.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } storeSale.setRemark(updateMemoDTO.getRemark()); @@ -206,7 +206,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService { @Transactional(readOnly = true) public List export(StoreSaleExportDTO exportDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(exportDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(exportDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } // 导出指定销售出库单 @@ -231,7 +231,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService { @Transactional public int insertStoreSale(StoreSaleDTO storeSaleDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeSaleDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeSaleDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } final Date voucherDate = java.sql.Date.valueOf(LocalDate.now()); @@ -280,7 +280,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService { @Transactional public int updateStoreSale(StoreSaleDTO storeSaleDTO) { // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeSaleDTO.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeSaleDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } final Date voucherDate = java.sql.Date.valueOf(LocalDate.now()); @@ -351,7 +351,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService { .eq(StoreSale::getId, storeSaleId).eq(StoreSale::getDelFlag, Constants.UNDELETED))) .orElseThrow(() -> new ServiceException("档口销售出库订单不存在!", HttpStatus.ERROR)); // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeSale.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeSale.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } StoreSaleDTO storeSaleDTO = BeanUtil.toBean(storeSale, StoreSaleDTO.class); @@ -376,7 +376,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService { .eq(StoreSale::getId, storeSaleId).eq(StoreSale::getDelFlag, Constants.UNDELETED))) .orElseThrow(() -> new ServiceException("档口销售出库订单不存在!", HttpStatus.ERROR)); // 用户是否为档口管理者或子账户 - if (!SecurityUtils.isStoreManagerOrSub(storeSale.getStoreId())) { + if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeSale.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } storeSale.setDelFlag(Constants.DELETED);