员工权限废弃

This commit is contained in:
张松 2025-05-27 15:11:34 +08:00
parent 677028e3d5
commit 626fec78e9
7 changed files with 46 additions and 44 deletions

View File

@ -6,6 +6,7 @@ import com.czg.account.entity.HandoverRecord;
import com.czg.account.service.HandoverRecordService; import com.czg.account.service.HandoverRecordService;
import com.czg.account.vo.HandoverProductListVo; import com.czg.account.vo.HandoverProductListVo;
import com.czg.account.vo.HandoverTotalVo; import com.czg.account.vo.HandoverTotalVo;
import com.czg.annotation.SaAdminCheckPermission;
import com.czg.annotation.SaStaffCheckPermission; import com.czg.annotation.SaStaffCheckPermission;
import com.czg.config.RabbitPublisher; import com.czg.config.RabbitPublisher;
import com.czg.enums.YesNoEnum; import com.czg.enums.YesNoEnum;
@ -42,8 +43,8 @@ public class HandoverRecordController {
*/ */
@GetMapping("page") @GetMapping("page")
@OperationLog("交班记录-分页") @OperationLog("交班记录-分页")
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu") // @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
//@SaAdminCheckPermission("handoverRecord:page") @SaAdminCheckPermission("handoverRecord:page")
public CzgResult<Page<HandoverRecordDTO>> page(@RequestParam(required = false) String beginDate, @RequestParam(required = false) String endDate) { public CzgResult<Page<HandoverRecordDTO>> page(@RequestParam(required = false) String beginDate, @RequestParam(required = false) String endDate) {
Page<HandoverRecordDTO> page = handoverRecordService.getHandoverRecordPage(beginDate, endDate); Page<HandoverRecordDTO> page = handoverRecordService.getHandoverRecordPage(beginDate, endDate);
return CzgResult.success(page); return CzgResult.success(page);
@ -56,8 +57,8 @@ public class HandoverRecordController {
*/ */
@GetMapping("{id}") @GetMapping("{id}")
@OperationLog("交班记录-查看") @OperationLog("交班记录-查看")
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu") // @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
//@SaAdminCheckPermission("handoverRecord:info") @SaAdminCheckPermission("handoverRecord:info")
public CzgResult<List<HandoverProductListVo>> info(@PathVariable Long id) { public CzgResult<List<HandoverProductListVo>> info(@PathVariable Long id) {
List<HandoverProductListVo> data = handoverRecordService.getHandoverProductListById(id); List<HandoverProductListVo> data = handoverRecordService.getHandoverProductListById(id);
return CzgResult.success(data); return CzgResult.success(data);
@ -71,8 +72,8 @@ public class HandoverRecordController {
@ResponseExcel(name = "交班售出商品明细") @ResponseExcel(name = "交班售出商品明细")
@GetMapping("/export/{id}") @GetMapping("/export/{id}")
@OperationLog("交班记录-导出") @OperationLog("交班记录-导出")
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu") // @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
//@SaAdminCheckPermission("handoverRecord:export") @SaAdminCheckPermission("handoverRecord:export")
public List<HandoverProductListVo> export(@PathVariable Long id) { public List<HandoverProductListVo> export(@PathVariable Long id) {
return handoverRecordService.getHandoverProductListById(id); return handoverRecordService.getHandoverProductListById(id);
} }
@ -82,8 +83,8 @@ public class HandoverRecordController {
*/ */
@GetMapping("total") @GetMapping("total")
@OperationLog("收银机-交班数据统计") @OperationLog("收银机-交班数据统计")
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu") // @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
//@SaAdminCheckPermission("handoverRecord:total") @SaAdminCheckPermission("handoverRecord:total")
public CzgResult<HandoverTotalVo> total() { public CzgResult<HandoverTotalVo> total() {
HandoverTotalVo data = handoverRecordService.totalHandoverData(); HandoverTotalVo data = handoverRecordService.totalHandoverData();
return CzgResult.success(data); return CzgResult.success(data);
@ -96,8 +97,8 @@ public class HandoverRecordController {
*/ */
@PostMapping("handover") @PostMapping("handover")
@OperationLog("收银机-交班/关班") @OperationLog("收银机-交班/关班")
@SaStaffCheckPermission("yun_xu_jiao_ban") // @SaStaffCheckPermission("yun_xu_jiao_ban")
//@SaAdminCheckPermission("handoverRecord:handover") @SaAdminCheckPermission("handoverRecord:handover")
public CzgResult<Long> handover(@RequestParam Integer isPrint) { public CzgResult<Long> handover(@RequestParam Integer isPrint) {
Long id = handoverRecordService.handover(); Long id = handoverRecordService.handover();
return CzgResult.success(id); return CzgResult.success(id);
@ -110,8 +111,8 @@ public class HandoverRecordController {
*/ */
@PostMapping("/network/print/{id}") @PostMapping("/network/print/{id}")
@OperationLog("收银机-交班/关班-网络打印机打印交班小票") @OperationLog("收银机-交班/关班-网络打印机打印交班小票")
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu") // @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
//@SaAdminCheckPermission("handoverRecord:networkPrint") @SaAdminCheckPermission("handoverRecord:networkPrint")
public CzgResult<Void> handover(@PathVariable Long id) { public CzgResult<Void> handover(@PathVariable Long id) {
handoverRecordService.printHandoverReceipt(id, YesNoEnum.YES.value()); handoverRecordService.printHandoverReceipt(id, YesNoEnum.YES.value());
return CzgResult.success(); return CzgResult.success();

View File

@ -41,7 +41,7 @@ public class ShopUserController {
*/ */
@SaAdminCheckPermission(value = "shopUser:summary", name = "店铺用户概述信息") @SaAdminCheckPermission(value = "shopUser:summary", name = "店铺用户概述信息")
@GetMapping("/summary") @GetMapping("/summary")
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi") // @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
public CzgResult<ShopUserSummaryDTO> summary(Integer isVip) { public CzgResult<ShopUserSummaryDTO> summary(Integer isVip) {
return CzgResult.success(shopUserService.getSummary(StpKit.USER.getUsableShopId(), isVip)); return CzgResult.success(shopUserService.getSummary(StpKit.USER.getUsableShopId(), isVip));
} }
@ -65,7 +65,7 @@ public class ShopUserController {
*/ */
@SaAdminCheckPermission(value = "shopUser:flow", name = "店铺用户充值记录") @SaAdminCheckPermission(value = "shopUser:flow", name = "店铺用户充值记录")
@GetMapping("/flow") @GetMapping("/flow")
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi") // @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
public CzgResult<Page<ShopUserFlowVO>> flow(Integer userId, String bizCode, String startTime, String endTime) { public CzgResult<Page<ShopUserFlowVO>> flow(Integer userId, String bizCode, String startTime, String endTime) {
return CzgResult.success(shopUserFlowService.pageInfo(StpKit.USER.getUsableShopId(), userId, bizCode, startTime, endTime)); return CzgResult.success(shopUserFlowService.pageInfo(StpKit.USER.getUsableShopId(), userId, bizCode, startTime, endTime));
} }
@ -81,7 +81,7 @@ public class ShopUserController {
*/ */
@SaAdminCheckPermission(value = "shopUser:flow:downLoad", name = "店铺用户充值记录导出") @SaAdminCheckPermission(value = "shopUser:flow:downLoad", name = "店铺用户充值记录导出")
@GetMapping("/flow/download") @GetMapping("/flow/download")
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi") // @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
public void flowDownload(Integer userId, String bizCode, String startTime, String endTime, HttpServletResponse response) throws IOException { public void flowDownload(Integer userId, String bizCode, String startTime, String endTime, HttpServletResponse response) throws IOException {
shopUserFlowService.flowDownload(StpKit.USER.getUsableShopId(), userId, bizCode, startTime, endTime, response); shopUserFlowService.flowDownload(StpKit.USER.getUsableShopId(), userId, bizCode, startTime, endTime, response);
} }
@ -93,7 +93,7 @@ public class ShopUserController {
* @param isVip 0 非vip 1 vip * @param isVip 0 非vip 1 vip
* @return 用户列表 * @return 用户列表
*/ */
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi") // @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
@SaAdminCheckPermission(value = "shopUser:list", name = "店铺用户列表") @SaAdminCheckPermission(value = "shopUser:list", name = "店铺用户列表")
@GetMapping @GetMapping
public CzgResult<Page<ShopUserDTO>> list(String key, Integer isVip, BigDecimal amount) { public CzgResult<Page<ShopUserDTO>> list(String key, Integer isVip, BigDecimal amount) {
@ -106,7 +106,7 @@ public class ShopUserController {
* @param userId 用户id * @param userId 用户id
* @return 用户详情 * @return 用户详情
*/ */
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi") // @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
@SaAdminCheckPermission(value = "shopUser:detail", name = "店铺用户详情") @SaAdminCheckPermission(value = "shopUser:detail", name = "店铺用户详情")
@GetMapping("/detail") @GetMapping("/detail")
public CzgResult<ShopUser> detail(Integer id, Integer userId) { public CzgResult<ShopUser> detail(Integer id, Integer userId) {
@ -121,7 +121,7 @@ public class ShopUserController {
* *
* @return 是否成功 * @return 是否成功
*/ */
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi") // @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
@SaAdminCheckPermission(value = "shopUser:add", name = "店铺用户添加") @SaAdminCheckPermission(value = "shopUser:add", name = "店铺用户添加")
@PostMapping @PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) { public CzgResult<Boolean> add(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) {
@ -133,7 +133,7 @@ public class ShopUserController {
* *
* @return 是否成功 * @return 是否成功
*/ */
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi") // @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
@SaAdminCheckPermission(value = "shopUser:edit", name = "店铺用户修改") @SaAdminCheckPermission(value = "shopUser:edit", name = "店铺用户修改")
@PutMapping @PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopUserEditDTO shopUserEditDTO) { public CzgResult<Boolean> edit(@RequestBody @Validated ShopUserEditDTO shopUserEditDTO) {
@ -145,7 +145,7 @@ public class ShopUserController {
* *
* @return 是否成功 * @return 是否成功
*/ */
@SaStaffCheckPermission("yun_xu_xiu_gai_hui_yuan_yu_e") // @SaStaffCheckPermission("yun_xu_xiu_gai_hui_yuan_yu_e")
@SaAdminCheckPermission(value = "shopUser:editFlow", name = "店铺用户余额修改") @SaAdminCheckPermission(value = "shopUser:editFlow", name = "店铺用户余额修改")
@PutMapping("/money") @PutMapping("/money")
public CzgResult<Boolean> editMoney(@RequestBody @Validated ShopUserMoneyEditDTO shopUserMoneyEditDTO) { public CzgResult<Boolean> editMoney(@RequestBody @Validated ShopUserMoneyEditDTO shopUserMoneyEditDTO) {

View File

@ -34,7 +34,7 @@ public class VipPayController {
* 现金充值 * 现金充值
* 如果shop_info的 is_member_in_pwd=1 则pwd必填 店铺操作密码 * 如果shop_info的 is_member_in_pwd=1 则pwd必填 店铺操作密码
*/ */
@SaStaffCheckPermission("yun_xu_shou_kuan") //@SaStaffCheckPermission("yun_xu_shou_kuan")
@PostMapping("/cashPayVip") @PostMapping("/cashPayVip")
@Debounce(value = "#payParam.shopUserId") @Debounce(value = "#payParam.shopUserId")
public CzgResult<Object> cashPayVip(@Validated @RequestBody VipPayParamDTO payParam) { public CzgResult<Object> cashPayVip(@Validated @RequestBody VipPayParamDTO payParam) {
@ -72,7 +72,7 @@ public class VipPayController {
/** /**
* 正扫 * 正扫
*/ */
@SaStaffCheckPermission("yun_xu_shou_kuan") //@SaStaffCheckPermission("yun_xu_shou_kuan")
@PostMapping("/scanPayVip") @PostMapping("/scanPayVip")
@Debounce(value = "#payParam.shopUserId") @Debounce(value = "#payParam.shopUserId")
public CzgResult<Map<String, Object>> scanPayVip(HttpServletRequest request, @Validated @RequestBody VipPayParamDTO payParam) { public CzgResult<Map<String, Object>> scanPayVip(HttpServletRequest request, @Validated @RequestBody VipPayParamDTO payParam) {
@ -85,7 +85,7 @@ public class VipPayController {
* 反扫 * 反扫
* authCode 必填 扫描码 * authCode 必填 扫描码
*/ */
@SaStaffCheckPermission("yun_xu_shou_kuan") //@SaStaffCheckPermission("yun_xu_shou_kuan")
@PostMapping("/microPayVip") @PostMapping("/microPayVip")
@Debounce(value = "#payParam.shopUserId") @Debounce(value = "#payParam.shopUserId")
public CzgResult<Map<String, Object>> microPayVip(@Validated @RequestBody VipPayParamDTO payParam) { public CzgResult<Map<String, Object>> microPayVip(@Validated @RequestBody VipPayParamDTO payParam) {
@ -98,7 +98,7 @@ public class VipPayController {
* 退款前置 * 退款前置
* 最大退款金额 充值金额 inAmount * 最大退款金额 充值金额 inAmount
*/ */
@SaStaffCheckPermission("yun_xu_tui_kuan") //@SaStaffCheckPermission("yun_xu_tui_kuan")
@PostMapping("/refundVipBefore") @PostMapping("/refundVipBefore")
@Debounce(value = "#payParam.flowId") @Debounce(value = "#payParam.flowId")
public CzgResult<Map<String, BigDecimal>> refundVipBefore(@Validated @RequestBody VipRefundDTO payParam) { public CzgResult<Map<String, BigDecimal>> refundVipBefore(@Validated @RequestBody VipRefundDTO payParam) {
@ -114,7 +114,7 @@ public class VipPayController {
* 实际可退最大金额为 充值金额 * 实际可退最大金额为 充值金额
* 如果实际 大于 理论 需要勾选 outOfRange 超额退款 为true 默认为false * 如果实际 大于 理论 需要勾选 outOfRange 超额退款 为true 默认为false
*/ */
@SaStaffCheckPermission("yun_xu_tui_kuan") //@SaStaffCheckPermission("yun_xu_tui_kuan")
@PostMapping("/refundVip") @PostMapping("/refundVip")
@Debounce(value = "#payParam.flowId") @Debounce(value = "#payParam.flowId")
public CzgResult<Object> refundVip(HttpServletRequest request, @Validated @RequestBody VipRefundDTO payParam) { public CzgResult<Object> refundVip(HttpServletRequest request, @Validated @RequestBody VipRefundDTO payParam) {

View File

@ -64,7 +64,7 @@ public class AdminOrderController {
return CzgResult.success(orderInfoService.historyOrder(orderId, tableCode)); return CzgResult.success(orderInfoService.historyOrder(orderId, tableCode));
} }
@SaStaffCheckPermission("yun_xu_xia_dan") //@SaStaffCheckPermission("yun_xu_xia_dan")
@PostMapping("/createOrder") @PostMapping("/createOrder")
@Debounce(value = "#addDto.tableCode") @Debounce(value = "#addDto.tableCode")
public CzgResult<OrderInfo> createOrder(@Validated @RequestBody OrderInfoAddDTO addDto) { public CzgResult<OrderInfo> createOrder(@Validated @RequestBody OrderInfoAddDTO addDto) {
@ -87,7 +87,7 @@ public class AdminOrderController {
* 订单全额退款 只传订单id * 订单全额退款 只传订单id
* 部分退款 传参refundDetail * 部分退款 传参refundDetail
*/ */
@SaStaffCheckPermission("yun_xu_tui_kuan") //@SaStaffCheckPermission("yun_xu_tui_kuan")
@PostMapping("/refundOrder") @PostMapping("/refundOrder")
@Debounce(value = "#refundDTO.orderId") @Debounce(value = "#refundDTO.orderId")
public CzgResult<Object> refundOrder(@Validated @RequestBody OrderInfoRefundDTO refundDTO) { public CzgResult<Object> refundOrder(@Validated @RequestBody OrderInfoRefundDTO refundDTO) {

View File

@ -1,5 +1,6 @@
package com.czg.controller.admin; package com.czg.controller.admin;
import com.czg.annotation.SaAdminCheckPermission;
import com.czg.annotation.SaStaffCheckPermission; import com.czg.annotation.SaStaffCheckPermission;
import com.czg.log.annotation.OperationLog; import com.czg.log.annotation.OperationLog;
import com.czg.order.entity.ShopOrderStatistic; import com.czg.order.entity.ShopOrderStatistic;
@ -39,8 +40,8 @@ public class DataSummaryController {
*/ */
@GetMapping("trade") @GetMapping("trade")
@OperationLog("营业板块-上半部分") @OperationLog("营业板块-上半部分")
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju") // @SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
//@SaAdminCheckPermission("dataSummary:trade") @SaAdminCheckPermission("dataSummary:trade")
public CzgResult<ShopOrderStatistic> getTradeData(DataSummaryTradeParam param) { public CzgResult<ShopOrderStatistic> getTradeData(DataSummaryTradeParam param) {
ValidatorUtil.validateEntity(param, DefaultGroup.class); ValidatorUtil.validateEntity(param, DefaultGroup.class);
Long shopId = StpKit.USER.getShopId(0L); Long shopId = StpKit.USER.getShopId(0L);
@ -56,8 +57,8 @@ public class DataSummaryController {
*/ */
@GetMapping("productSaleDate") @GetMapping("productSaleDate")
@OperationLog("商品销售-右下") @OperationLog("商品销售-右下")
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju") // @SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
//@SaAdminCheckPermission("dataSummary:productSaleData") @SaAdminCheckPermission("dataSummary:productSaleData")
public CzgResult<Page<DataSummaryProductSaleRankingVo>> getProductSaleData(DataSummaryProductSaleParam param) { public CzgResult<Page<DataSummaryProductSaleRankingVo>> getProductSaleData(DataSummaryProductSaleParam param) {
ValidatorUtil.validateEntity(param, DefaultGroup.class); ValidatorUtil.validateEntity(param, DefaultGroup.class);
Long shopId = StpKit.USER.getShopId(0L); Long shopId = StpKit.USER.getShopId(0L);
@ -76,8 +77,8 @@ public class DataSummaryController {
*/ */
@GetMapping("dateAmount") @GetMapping("dateAmount")
@OperationLog("销售趋势柱状图 左下") @OperationLog("销售趋势柱状图 左下")
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju") // @SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
//@SaAdminCheckPermission("dataSummary:dateAmount") @SaAdminCheckPermission("dataSummary:dateAmount")
public CzgResult<DataSummaryDateAmountVo> getDateAmount(@RequestParam Integer day, @RequestParam(required = false) Long shopId) { public CzgResult<DataSummaryDateAmountVo> getDateAmount(@RequestParam Integer day, @RequestParam(required = false) Long shopId) {
AssertUtil.isNull(day, "天数不能为空"); AssertUtil.isNull(day, "天数不能为空");
if (shopId == null) { if (shopId == null) {
@ -95,8 +96,8 @@ public class DataSummaryController {
*/ */
@GetMapping("datePayType") @GetMapping("datePayType")
@OperationLog("支付占比饼图 左下") @OperationLog("支付占比饼图 左下")
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju") // @SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
//@SaAdminCheckPermission("dataSummary:datePayType") @SaAdminCheckPermission("dataSummary:datePayType")
public CzgResult<DataSummaryPayTypeVo> shopSummaryPayType(@RequestParam Integer day, @RequestParam(required = false) Long shopId) { public CzgResult<DataSummaryPayTypeVo> shopSummaryPayType(@RequestParam Integer day, @RequestParam(required = false) Long shopId) {
if (shopId == null) { if (shopId == null) {
shopId = StpKit.USER.getShopId(0L); shopId = StpKit.USER.getShopId(0L);

View File

@ -37,7 +37,7 @@ public class ConsStockFlowController {
*/ */
@PostMapping("in") @PostMapping("in")
@OperationLog("耗材入库") @OperationLog("耗材入库")
@SaStaffCheckPermission("yun_xu_hao_cai_ru_ku") //@SaStaffCheckPermission("yun_xu_hao_cai_ru_ku")
//@SaAdminCheckPermission("consStockFlow:in") //@SaAdminCheckPermission("consStockFlow:in")
public CzgResult<Void> inStock(@RequestBody ConsInOutStockHeadParam param) { public CzgResult<Void> inStock(@RequestBody ConsInOutStockHeadParam param) {
ValidatorUtil.validateEntity(param, DefaultGroup.class); ValidatorUtil.validateEntity(param, DefaultGroup.class);
@ -51,7 +51,7 @@ public class ConsStockFlowController {
*/ */
@PostMapping("out") @PostMapping("out")
@OperationLog("耗材出库") @OperationLog("耗材出库")
@SaStaffCheckPermission("yun_xu_hao_cai_chu_ku") //@SaStaffCheckPermission("yun_xu_hao_cai_chu_ku")
//@SaAdminCheckPermission("consStockFlow:out") //@SaAdminCheckPermission("consStockFlow:out")
public CzgResult<Void> outStock(@RequestBody ConsInOutStockHeadParam param) { public CzgResult<Void> outStock(@RequestBody ConsInOutStockHeadParam param) {
ValidatorUtil.validateEntity(param, DefaultGroup.class); ValidatorUtil.validateEntity(param, DefaultGroup.class);
@ -78,7 +78,7 @@ public class ConsStockFlowController {
*/ */
@PostMapping("check") @PostMapping("check")
@OperationLog("库存盘点") @OperationLog("库存盘点")
@SaStaffCheckPermission("yun_xu_hao_cai_pan_dian") //@SaStaffCheckPermission("yun_xu_hao_cai_pan_dian")
//@SaAdminCheckPermission("consStockFlow:check") //@SaAdminCheckPermission("consStockFlow:check")
public CzgResult<Void> checkStock(@RequestBody ConsCheckStockParam param) { public CzgResult<Void> checkStock(@RequestBody ConsCheckStockParam param) {
ValidatorUtil.validateEntity(param, DefaultGroup.class); ValidatorUtil.validateEntity(param, DefaultGroup.class);

View File

@ -116,7 +116,7 @@ public class ProductController {
*/ */
@PutMapping @PutMapping
@OperationLog("商品-修改") @OperationLog("商品-修改")
@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin") //@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
//@SaAdminCheckPermission("product:update") //@SaAdminCheckPermission("product:update")
public CzgResult<Void> updateProduct(@RequestBody @Validated({UpdateGroup.class, DefaultGroup.class}) ProductDTO dto) { public CzgResult<Void> updateProduct(@RequestBody @Validated({UpdateGroup.class, DefaultGroup.class}) ProductDTO dto) {
if (dto.getCategoryId() != null) { if (dto.getCategoryId() != null) {
@ -142,7 +142,7 @@ public class ProductController {
@PostMapping("modifyStock") @PostMapping("modifyStock")
@OperationLog("商品-修改库存") @OperationLog("商品-修改库存")
@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin") //@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
public CzgResult<Void> updateProductStock(@RequestBody ProductModifyStockParam param) { public CzgResult<Void> updateProductStock(@RequestBody ProductModifyStockParam param) {
ValidatorUtil.validateEntity(param, DefaultGroup.class); ValidatorUtil.validateEntity(param, DefaultGroup.class);
Long shopId = StpKit.USER.getShopId(0L); Long shopId = StpKit.USER.getShopId(0L);
@ -161,7 +161,7 @@ public class ProductController {
*/ */
@DeleteMapping("{id}") @DeleteMapping("{id}")
@OperationLog("商品-删除") @OperationLog("商品-删除")
@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin") //@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
//@SaAdminCheckPermission("product:delete") //@SaAdminCheckPermission("product:delete")
public CzgResult<Void> deleteProduct(@PathVariable("id") Long id) { public CzgResult<Void> deleteProduct(@PathVariable("id") Long id) {
//效验数据 //效验数据
@ -180,7 +180,7 @@ public class ProductController {
*/ */
@PostMapping("onOff") @PostMapping("onOff")
@OperationLog("商品-上下架") @OperationLog("商品-上下架")
@SaStaffCheckPermission("yun_xu_shang_xia_jia_shang_pin") //@SaStaffCheckPermission("yun_xu_shang_xia_jia_shang_pin")
//@SaAdminCheckPermission("product:on-off") //@SaAdminCheckPermission("product:on-off")
public CzgResult<Void> onOffProduct(@RequestBody @Validated({DefaultGroup.class}) ProductIsSaleParam param) { public CzgResult<Void> onOffProduct(@RequestBody @Validated({DefaultGroup.class}) ProductIsSaleParam param) {
Long shopId = StpKit.USER.getShopId(0L); Long shopId = StpKit.USER.getShopId(0L);
@ -197,7 +197,7 @@ public class ProductController {
*/ */
@PostMapping("markIsSoldOut") @PostMapping("markIsSoldOut")
@OperationLog("商品-标记售罄") @OperationLog("商品-标记售罄")
@SaStaffCheckPermission("yun_xu_shou_qing_shang_pin") //@SaStaffCheckPermission("yun_xu_shou_qing_shang_pin")
//@SaAdminCheckPermission("product:markIsSoldOut") //@SaAdminCheckPermission("product:markIsSoldOut")
public CzgResult<Void> markIsSoldOutProduct(@RequestBody @Validated({DefaultGroup.class}) ProductIsSoldOutParam param) { public CzgResult<Void> markIsSoldOutProduct(@RequestBody @Validated({DefaultGroup.class}) ProductIsSoldOutParam param) {
Long shopId = StpKit.USER.getShopId(0L); Long shopId = StpKit.USER.getShopId(0L);
@ -253,7 +253,7 @@ public class ProductController {
*/ */
@PostMapping("reportDamage") @PostMapping("reportDamage")
@OperationLog("商品-报损") @OperationLog("商品-报损")
@SaStaffCheckPermission("yun_xu_ti_jiao_bao_sun") //@SaStaffCheckPermission("yun_xu_ti_jiao_bao_sun")
//@SaAdminCheckPermission("product:reportDamage") //@SaAdminCheckPermission("product:reportDamage")
public CzgResult<Void> reportDamage(@RequestBody ProductReportDamageParam param) { public CzgResult<Void> reportDamage(@RequestBody ProductReportDamageParam param) {
ValidatorUtil.validateEntity(param, DefaultGroup.class); ValidatorUtil.validateEntity(param, DefaultGroup.class);