员工权限废弃
This commit is contained in:
parent
677028e3d5
commit
626fec78e9
|
|
@ -6,6 +6,7 @@ import com.czg.account.entity.HandoverRecord;
|
|||
import com.czg.account.service.HandoverRecordService;
|
||||
import com.czg.account.vo.HandoverProductListVo;
|
||||
import com.czg.account.vo.HandoverTotalVo;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.annotation.SaStaffCheckPermission;
|
||||
import com.czg.config.RabbitPublisher;
|
||||
import com.czg.enums.YesNoEnum;
|
||||
|
|
@ -42,8 +43,8 @@ public class HandoverRecordController {
|
|||
*/
|
||||
@GetMapping("page")
|
||||
@OperationLog("交班记录-分页")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
//@SaAdminCheckPermission("handoverRecord:page")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
@SaAdminCheckPermission("handoverRecord:page")
|
||||
public CzgResult<Page<HandoverRecordDTO>> page(@RequestParam(required = false) String beginDate, @RequestParam(required = false) String endDate) {
|
||||
Page<HandoverRecordDTO> page = handoverRecordService.getHandoverRecordPage(beginDate, endDate);
|
||||
return CzgResult.success(page);
|
||||
|
|
@ -56,8 +57,8 @@ public class HandoverRecordController {
|
|||
*/
|
||||
@GetMapping("{id}")
|
||||
@OperationLog("交班记录-查看")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
//@SaAdminCheckPermission("handoverRecord:info")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
@SaAdminCheckPermission("handoverRecord:info")
|
||||
public CzgResult<List<HandoverProductListVo>> info(@PathVariable Long id) {
|
||||
List<HandoverProductListVo> data = handoverRecordService.getHandoverProductListById(id);
|
||||
return CzgResult.success(data);
|
||||
|
|
@ -71,8 +72,8 @@ public class HandoverRecordController {
|
|||
@ResponseExcel(name = "交班售出商品明细")
|
||||
@GetMapping("/export/{id}")
|
||||
@OperationLog("交班记录-导出")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
//@SaAdminCheckPermission("handoverRecord:export")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
@SaAdminCheckPermission("handoverRecord:export")
|
||||
public List<HandoverProductListVo> export(@PathVariable Long id) {
|
||||
return handoverRecordService.getHandoverProductListById(id);
|
||||
}
|
||||
|
|
@ -82,8 +83,8 @@ public class HandoverRecordController {
|
|||
*/
|
||||
@GetMapping("total")
|
||||
@OperationLog("收银机-交班数据统计")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
//@SaAdminCheckPermission("handoverRecord:total")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
@SaAdminCheckPermission("handoverRecord:total")
|
||||
public CzgResult<HandoverTotalVo> total() {
|
||||
HandoverTotalVo data = handoverRecordService.totalHandoverData();
|
||||
return CzgResult.success(data);
|
||||
|
|
@ -96,8 +97,8 @@ public class HandoverRecordController {
|
|||
*/
|
||||
@PostMapping("handover")
|
||||
@OperationLog("收银机-交班/关班")
|
||||
@SaStaffCheckPermission("yun_xu_jiao_ban")
|
||||
//@SaAdminCheckPermission("handoverRecord:handover")
|
||||
// @SaStaffCheckPermission("yun_xu_jiao_ban")
|
||||
@SaAdminCheckPermission("handoverRecord:handover")
|
||||
public CzgResult<Long> handover(@RequestParam Integer isPrint) {
|
||||
Long id = handoverRecordService.handover();
|
||||
return CzgResult.success(id);
|
||||
|
|
@ -110,8 +111,8 @@ public class HandoverRecordController {
|
|||
*/
|
||||
@PostMapping("/network/print/{id}")
|
||||
@OperationLog("收银机-交班/关班-网络打印机打印交班小票")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
//@SaAdminCheckPermission("handoverRecord:networkPrint")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
@SaAdminCheckPermission("handoverRecord:networkPrint")
|
||||
public CzgResult<Void> handover(@PathVariable Long id) {
|
||||
handoverRecordService.printHandoverReceipt(id, YesNoEnum.YES.value());
|
||||
return CzgResult.success();
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class ShopUserController {
|
|||
*/
|
||||
@SaAdminCheckPermission(value = "shopUser:summary", name = "店铺用户概述信息")
|
||||
@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) {
|
||||
return CzgResult.success(shopUserService.getSummary(StpKit.USER.getUsableShopId(), isVip));
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ public class ShopUserController {
|
|||
*/
|
||||
@SaAdminCheckPermission(value = "shopUser:flow", name = "店铺用户充值记录")
|
||||
@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) {
|
||||
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 = "店铺用户充值记录导出")
|
||||
@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 {
|
||||
shopUserFlowService.flowDownload(StpKit.USER.getUsableShopId(), userId, bizCode, startTime, endTime, response);
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ public class ShopUserController {
|
|||
* @param isVip 0 非vip 1 vip
|
||||
* @return 用户列表
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
// @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission(value = "shopUser:list", name = "店铺用户列表")
|
||||
@GetMapping
|
||||
public CzgResult<Page<ShopUserDTO>> list(String key, Integer isVip, BigDecimal amount) {
|
||||
|
|
@ -106,7 +106,7 @@ public class ShopUserController {
|
|||
* @param userId 用户id
|
||||
* @return 用户详情
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
// @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission(value = "shopUser:detail", name = "店铺用户详情")
|
||||
@GetMapping("/detail")
|
||||
public CzgResult<ShopUser> detail(Integer id, Integer userId) {
|
||||
|
|
@ -121,7 +121,7 @@ public class ShopUserController {
|
|||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
// @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission(value = "shopUser:add", name = "店铺用户添加")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) {
|
||||
|
|
@ -133,7 +133,7 @@ public class ShopUserController {
|
|||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
// @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission(value = "shopUser:edit", name = "店铺用户修改")
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopUserEditDTO shopUserEditDTO) {
|
||||
|
|
@ -145,7 +145,7 @@ public class ShopUserController {
|
|||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_xiu_gai_hui_yuan_yu_e")
|
||||
// @SaStaffCheckPermission("yun_xu_xiu_gai_hui_yuan_yu_e")
|
||||
@SaAdminCheckPermission(value = "shopUser:editFlow", name = "店铺用户余额修改")
|
||||
@PutMapping("/money")
|
||||
public CzgResult<Boolean> editMoney(@RequestBody @Validated ShopUserMoneyEditDTO shopUserMoneyEditDTO) {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class VipPayController {
|
|||
* 现金充值
|
||||
* 如果shop_info的 is_member_in_pwd=1 则pwd必填 店铺操作密码
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_shou_kuan")
|
||||
//@SaStaffCheckPermission("yun_xu_shou_kuan")
|
||||
@PostMapping("/cashPayVip")
|
||||
@Debounce(value = "#payParam.shopUserId")
|
||||
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")
|
||||
@Debounce(value = "#payParam.shopUserId")
|
||||
public CzgResult<Map<String, Object>> scanPayVip(HttpServletRequest request, @Validated @RequestBody VipPayParamDTO payParam) {
|
||||
|
|
@ -85,7 +85,7 @@ public class VipPayController {
|
|||
* 反扫
|
||||
* authCode 必填 扫描码
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_shou_kuan")
|
||||
//@SaStaffCheckPermission("yun_xu_shou_kuan")
|
||||
@PostMapping("/microPayVip")
|
||||
@Debounce(value = "#payParam.shopUserId")
|
||||
public CzgResult<Map<String, Object>> microPayVip(@Validated @RequestBody VipPayParamDTO payParam) {
|
||||
|
|
@ -98,7 +98,7 @@ public class VipPayController {
|
|||
* 退款前置
|
||||
* 最大退款金额 为 充值金额 inAmount
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_tui_kuan")
|
||||
//@SaStaffCheckPermission("yun_xu_tui_kuan")
|
||||
@PostMapping("/refundVipBefore")
|
||||
@Debounce(value = "#payParam.flowId")
|
||||
public CzgResult<Map<String, BigDecimal>> refundVipBefore(@Validated @RequestBody VipRefundDTO payParam) {
|
||||
|
|
@ -114,7 +114,7 @@ public class VipPayController {
|
|||
* 实际可退最大金额为 充值金额
|
||||
* 如果实际 大于 理论 则 需要勾选 outOfRange 超额退款 为true 默认为false
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_tui_kuan")
|
||||
//@SaStaffCheckPermission("yun_xu_tui_kuan")
|
||||
@PostMapping("/refundVip")
|
||||
@Debounce(value = "#payParam.flowId")
|
||||
public CzgResult<Object> refundVip(HttpServletRequest request, @Validated @RequestBody VipRefundDTO payParam) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class AdminOrderController {
|
|||
return CzgResult.success(orderInfoService.historyOrder(orderId, tableCode));
|
||||
}
|
||||
|
||||
@SaStaffCheckPermission("yun_xu_xia_dan")
|
||||
//@SaStaffCheckPermission("yun_xu_xia_dan")
|
||||
@PostMapping("/createOrder")
|
||||
@Debounce(value = "#addDto.tableCode")
|
||||
public CzgResult<OrderInfo> createOrder(@Validated @RequestBody OrderInfoAddDTO addDto) {
|
||||
|
|
@ -87,7 +87,7 @@ public class AdminOrderController {
|
|||
* 订单全额退款 只传订单id
|
||||
* 部分退款 传参refundDetail
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_tui_kuan")
|
||||
//@SaStaffCheckPermission("yun_xu_tui_kuan")
|
||||
@PostMapping("/refundOrder")
|
||||
@Debounce(value = "#refundDTO.orderId")
|
||||
public CzgResult<Object> refundOrder(@Validated @RequestBody OrderInfoRefundDTO refundDTO) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.czg.controller.admin;
|
||||
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.annotation.SaStaffCheckPermission;
|
||||
import com.czg.log.annotation.OperationLog;
|
||||
import com.czg.order.entity.ShopOrderStatistic;
|
||||
|
|
@ -39,8 +40,8 @@ public class DataSummaryController {
|
|||
*/
|
||||
@GetMapping("trade")
|
||||
@OperationLog("营业板块-上半部分")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
||||
//@SaAdminCheckPermission("dataSummary:trade")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
||||
@SaAdminCheckPermission("dataSummary:trade")
|
||||
public CzgResult<ShopOrderStatistic> getTradeData(DataSummaryTradeParam param) {
|
||||
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
|
|
@ -56,8 +57,8 @@ public class DataSummaryController {
|
|||
*/
|
||||
@GetMapping("productSaleDate")
|
||||
@OperationLog("商品销售-右下")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
||||
//@SaAdminCheckPermission("dataSummary:productSaleData")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
||||
@SaAdminCheckPermission("dataSummary:productSaleData")
|
||||
public CzgResult<Page<DataSummaryProductSaleRankingVo>> getProductSaleData(DataSummaryProductSaleParam param) {
|
||||
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
|
|
@ -76,8 +77,8 @@ public class DataSummaryController {
|
|||
*/
|
||||
@GetMapping("dateAmount")
|
||||
@OperationLog("销售趋势柱状图 左下")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
||||
//@SaAdminCheckPermission("dataSummary:dateAmount")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
||||
@SaAdminCheckPermission("dataSummary:dateAmount")
|
||||
public CzgResult<DataSummaryDateAmountVo> getDateAmount(@RequestParam Integer day, @RequestParam(required = false) Long shopId) {
|
||||
AssertUtil.isNull(day, "天数不能为空");
|
||||
if (shopId == null) {
|
||||
|
|
@ -95,8 +96,8 @@ public class DataSummaryController {
|
|||
*/
|
||||
@GetMapping("datePayType")
|
||||
@OperationLog("支付占比饼图 左下")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
||||
//@SaAdminCheckPermission("dataSummary:datePayType")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
||||
@SaAdminCheckPermission("dataSummary:datePayType")
|
||||
public CzgResult<DataSummaryPayTypeVo> shopSummaryPayType(@RequestParam Integer day, @RequestParam(required = false) Long shopId) {
|
||||
if (shopId == null) {
|
||||
shopId = StpKit.USER.getShopId(0L);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class ConsStockFlowController {
|
|||
*/
|
||||
@PostMapping("in")
|
||||
@OperationLog("耗材入库")
|
||||
@SaStaffCheckPermission("yun_xu_hao_cai_ru_ku")
|
||||
//@SaStaffCheckPermission("yun_xu_hao_cai_ru_ku")
|
||||
//@SaAdminCheckPermission("consStockFlow:in")
|
||||
public CzgResult<Void> inStock(@RequestBody ConsInOutStockHeadParam param) {
|
||||
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
||||
|
|
@ -51,7 +51,7 @@ public class ConsStockFlowController {
|
|||
*/
|
||||
@PostMapping("out")
|
||||
@OperationLog("耗材出库")
|
||||
@SaStaffCheckPermission("yun_xu_hao_cai_chu_ku")
|
||||
//@SaStaffCheckPermission("yun_xu_hao_cai_chu_ku")
|
||||
//@SaAdminCheckPermission("consStockFlow:out")
|
||||
public CzgResult<Void> outStock(@RequestBody ConsInOutStockHeadParam param) {
|
||||
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
||||
|
|
@ -78,7 +78,7 @@ public class ConsStockFlowController {
|
|||
*/
|
||||
@PostMapping("check")
|
||||
@OperationLog("库存盘点")
|
||||
@SaStaffCheckPermission("yun_xu_hao_cai_pan_dian")
|
||||
//@SaStaffCheckPermission("yun_xu_hao_cai_pan_dian")
|
||||
//@SaAdminCheckPermission("consStockFlow:check")
|
||||
public CzgResult<Void> checkStock(@RequestBody ConsCheckStockParam param) {
|
||||
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ public class ProductController {
|
|||
*/
|
||||
@PutMapping
|
||||
@OperationLog("商品-修改")
|
||||
@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
|
||||
//@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
|
||||
//@SaAdminCheckPermission("product:update")
|
||||
public CzgResult<Void> updateProduct(@RequestBody @Validated({UpdateGroup.class, DefaultGroup.class}) ProductDTO dto) {
|
||||
if (dto.getCategoryId() != null) {
|
||||
|
|
@ -142,7 +142,7 @@ public class ProductController {
|
|||
|
||||
@PostMapping("modifyStock")
|
||||
@OperationLog("商品-修改库存")
|
||||
@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
|
||||
//@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
|
||||
public CzgResult<Void> updateProductStock(@RequestBody ProductModifyStockParam param) {
|
||||
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
|
|
@ -161,7 +161,7 @@ public class ProductController {
|
|||
*/
|
||||
@DeleteMapping("{id}")
|
||||
@OperationLog("商品-删除")
|
||||
@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
|
||||
//@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
|
||||
//@SaAdminCheckPermission("product:delete")
|
||||
public CzgResult<Void> deleteProduct(@PathVariable("id") Long id) {
|
||||
//效验数据
|
||||
|
|
@ -180,7 +180,7 @@ public class ProductController {
|
|||
*/
|
||||
@PostMapping("onOff")
|
||||
@OperationLog("商品-上下架")
|
||||
@SaStaffCheckPermission("yun_xu_shang_xia_jia_shang_pin")
|
||||
//@SaStaffCheckPermission("yun_xu_shang_xia_jia_shang_pin")
|
||||
//@SaAdminCheckPermission("product:on-off")
|
||||
public CzgResult<Void> onOffProduct(@RequestBody @Validated({DefaultGroup.class}) ProductIsSaleParam param) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
|
|
@ -197,7 +197,7 @@ public class ProductController {
|
|||
*/
|
||||
@PostMapping("markIsSoldOut")
|
||||
@OperationLog("商品-标记售罄")
|
||||
@SaStaffCheckPermission("yun_xu_shou_qing_shang_pin")
|
||||
//@SaStaffCheckPermission("yun_xu_shou_qing_shang_pin")
|
||||
//@SaAdminCheckPermission("product:markIsSoldOut")
|
||||
public CzgResult<Void> markIsSoldOutProduct(@RequestBody @Validated({DefaultGroup.class}) ProductIsSoldOutParam param) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
|
|
@ -253,7 +253,7 @@ public class ProductController {
|
|||
*/
|
||||
@PostMapping("reportDamage")
|
||||
@OperationLog("商品-报损")
|
||||
@SaStaffCheckPermission("yun_xu_ti_jiao_bao_sun")
|
||||
//@SaStaffCheckPermission("yun_xu_ti_jiao_bao_sun")
|
||||
//@SaAdminCheckPermission("product:reportDamage")
|
||||
public CzgResult<Void> reportDamage(@RequestBody ProductReportDamageParam param) {
|
||||
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
||||
|
|
|
|||
Loading…
Reference in New Issue