master:推广营销调整;

pull/1121/head
liujiang 2025-06-22 15:19:25 +08:00
parent f0f5745bf2
commit 830e8b9870
31 changed files with 131 additions and 133 deletions

View File

@ -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<AdRoundStoreResVO> 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<List<AdRoundSetProdResVO>> 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<AdvertRoundStorePageResDTO>> 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<List<AdRoundPopularResVO>> 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<Integer> 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<String> getRejectReason(@PathVariable Long advertRoundId) {

View File

@ -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<AdvertRoundRecordPageResDTO>> page(@Validated @RequestBody AdvertRoundRecordPageVO pageVO) {

View File

@ -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<StoreIndexOverviewResVO> 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<List<StoreIndexSaleRevenueResVO>> 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<StoreIndexTodaySaleResVO> 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<List<StoreIndexSaleTop10ResVO>> 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<List<StoreIndexCusSaleTop10ResVO>> indexTop10SaleCus(@Validated @RequestBody StoreSaleCustomerTop10VO saleCusTop10VO) {

View File

@ -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<Page<StoreCusPageResDTO>> selectPage(@Validated @RequestBody StoreCusPageVO pageVO) {

View File

@ -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<Page<StoreCusProdDiscPageResDTO>> 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<List<StoreCusProdDiscExistResDTO>> discountExist(@Validated @RequestBody StoreCusProdDiscExistVO existVO) {

View File

@ -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<List<StoreFactoryResVO>> 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<Page<StoreFactoryResDTO>> 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<StoreFactoryVO> getInfo(@PathVariable("storeId") Long storeId, @PathVariable("storeFactoryId") Long storeFactoryId) {

View File

@ -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<StoreHomeDecorationVO> 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}")

View File

@ -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")

View File

@ -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<List<StoreProdFuzzyLatest30ResVO>> 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<StoreProdPageResDTO>> 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<StoreProdPicSpaceResVO> getStoreProductPicSpace(@Validated @RequestBody StoreProdPicSpaceVO picSpaceVO) {

View File

@ -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<List<StoreProdDemandQuantityVO>> 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<Page<StoreProdDemandPageResDTO>> 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("")

View File

@ -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<Page<StoreProdStockPageResDTO>> 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<StoreProdStockAndDiscountResVO> 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")

View File

@ -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<StoreProdStoragePageResDTO>> 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<StoreProdStorageResVO> 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}")

View File

@ -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<StoreProdStorageDemandDeductVO> getStorageDemandDeductList(@PathVariable("storeId") Long storeId, @PathVariable("storageCode") String storageCode) {

View File

@ -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")

View File

@ -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<StoreCusGeneralSaleVO> 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<StoreSalePageResDTO>> 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<StoreSaleVO> 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<StoreTodaySaleVO> 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")

View File

@ -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<List<StoreSaleRefundRecordVO>> selectPage(@PathVariable("storeId") Long storeId, @PathVariable("storeSaleId") Long storeSaleId) {

View File

@ -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搜索结果"),

View File

@ -22,8 +22,6 @@ public enum AdRoundType {
THIRD_ROUND(3, "第三轮"),
// 第四轮
FOURTH_ROUND(4, "第四轮"),
// 第五轮
FIFTH_ROUND(5, "第五轮"),
;

View File

@ -41,7 +41,7 @@ public class AdvertRoundRecordServiceImpl implements IAdvertRoundRecordService {
@Transactional(readOnly = true)
public Page<AdvertRoundRecordPageResDTO> 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());

View File

@ -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<AdvertRoundStorePageResDTO> 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<AdvertRound>()
@ -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<AdvertRound>()
@ -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();

View File

@ -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<StoreCustomer> storeCusList = this.storeCusMapper.selectList(new LambdaQueryWrapper<StoreCustomer>()
@ -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<StoreCusProdDiscPageResDTO> 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<StoreCusProdDiscExistResDTO> discountExist(StoreCusProdDiscExistDTO existDTO) {
// 用户是否为档口管理者或子账户
if (!SecurityUtils.isStoreManagerOrSub(existDTO.getStoreId())) {
if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(existDTO.getStoreId())) {
throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR);
}
List<StoreCustomerProductDiscount> discountList = this.cusProdDiscMapper.selectList(new LambdaQueryWrapper<StoreCustomerProductDiscount>()

View File

@ -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<StoreCusPageResDTO> selectPage(StoreCusPageDTO storeCusPageDTO) {
// 用户是否为档口管理者或子账户
if (!SecurityUtils.isStoreManagerOrSub(storeCusPageDTO.getStoreId())) {
if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeCusPageDTO.getStoreId())) {
throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR);
}
LambdaQueryWrapper<StoreCustomer> queryWrapper = new LambdaQueryWrapper<StoreCustomer>()
@ -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不可为空!"));

View File

@ -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<StoreHomepage> 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<Store>()
@ -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);
}
// 先将所有的档口模板的文件都删除掉

View File

@ -62,7 +62,7 @@ public class StoreProductDemandServiceImpl implements IStoreProductDemandService
@Transactional(readOnly = true)
public List<StoreProdDemandQuantityDTO> getStockAndProduceQuantity(Long storeId, Long storeProdId) {
// 用户是否为档口管理者或子账户
if (!SecurityUtils.isStoreManagerOrSub(storeId)) {
if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) {
throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR);
}
List<StoreProductColor> prodColorList = Optional.ofNullable(this.storeProdColorMapper.selectList(new LambdaQueryWrapper<StoreProductColor>()
@ -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<StoreProdDemandPageResDTO> 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<StoreProductDemandDetail> demandDetailList = Optional.ofNullable(this.storeProdDemandDetailMapper.selectList(new LambdaQueryWrapper<StoreProductDemandDetail>()
@ -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<StoreProductDemandDetail> demandDetailList = Optional.ofNullable(this.storeProdDemandDetailMapper.selectList(new LambdaQueryWrapper<StoreProductDemandDetail>()

View File

@ -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<StoreProduct> queryWrapper = new LambdaQueryWrapper<StoreProduct>().eq(StoreProduct::getId, spaceDTO.getStoreId())
@ -186,7 +186,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
@Transactional(readOnly = true)
public Page<StoreProdPageResDTO> 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<StoreProduct> storeProdList = this.storeProdMapper.selectList(new LambdaQueryWrapper<StoreProduct>()
@ -504,7 +504,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
@Transactional(readOnly = true)
public List<StoreProdFuzzyLatest30ResDTO> 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);

View File

@ -52,7 +52,7 @@ public class StoreProductStockServiceImpl implements IStoreProductStockService {
@Transactional(readOnly = true)
public Page<StoreProdStockPageResDTO> 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<StoreProductStock>()
@ -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<StoreProductStock> stockList = Optional.ofNullable(this.storeProdStockMapper.selectList(new LambdaQueryWrapper<StoreProductStock>()
@ -216,7 +216,7 @@ public class StoreProductStockServiceImpl implements IStoreProductStockService {
@Transactional(readOnly = true)
public List<StoreProdStockDownloadDTO> 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<StoreProductStock> stockList = Optional.ofNullable(this.storeProdStockMapper.selectList(new LambdaQueryWrapper<StoreProductStock>()
@ -315,7 +315,7 @@ public class StoreProductStockServiceImpl implements IStoreProductStockService {
@Transactional
public int updateStock(Long storeId, List<StoreProdStockDTO> updateStockList, Integer multiplierFactor) {
// 用户是否为档口管理者或子账户
if (!SecurityUtils.isStoreManagerOrSub(storeId)) {
if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) {
throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR);
}
List<StoreProductStock> stockList = Optional.ofNullable(this.storeProdStockMapper.selectList(new LambdaQueryWrapper<StoreProductStock>()

View File

@ -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找到入库单

View File

@ -37,7 +37,7 @@ public class StoreProductStorageDetailServiceImpl implements IStoreProductStorag
@Transactional(readOnly = true)
public List<StoreStorageDetailDownloadDTO> 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())) {

View File

@ -66,7 +66,7 @@ public class StoreProductStorageServiceImpl implements IStoreProductStorageServi
@Transactional(readOnly = true)
public Page<StoreProdStoragePageResDTO> 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);

View File

@ -47,7 +47,7 @@ public class StoreSaleRefundRecordServiceImpl implements IStoreSaleRefundRecordS
@Transactional(readOnly = true)
public List<StoreSaleRefundRecordDTO> selectList(Long storeId, Long storeSaleId) {
// 用户是否为档口管理者或子账户
if (!SecurityUtils.isStoreManagerOrSub(storeId)) {
if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(storeId)) {
throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR);
}
List<StoreSaleRefundRecord> refundRecordList = this.refundRecordMapper.selectList(new LambdaQueryWrapper<StoreSaleRefundRecord>()

View File

@ -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<StoreCustomer>()
@ -107,7 +107,7 @@ public class StoreSaleServiceImpl implements IStoreSaleService {
@Transactional(readOnly = true)
public Page<StoreSalePageResDTO> 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<StoreSaleDownloadDTO> 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);