接口目录

This commit is contained in:
2025-12-10 11:04:12 +08:00
parent f5b67ac11d
commit b7c037f63b
43 changed files with 219 additions and 239 deletions

View File

@@ -40,7 +40,7 @@ public class BkContactListController {
/**
* 通讯录 获取联系人订单数等
*/
@SaAdminCheckPermission(value = "bk:bkContactList:list", name = "预约端-联系人列表")
@SaAdminCheckPermission(parentName = "预约端", value = "bk:bkContactList:list", name = "预约端-联系人列表")
@PostMapping("/contactList")
public CzgResult<List<BkContactList>> getUserList(@RequestBody Set<String> phones) {
return CzgResult.success(contactListService.getUserList(StpKit.USER.getShopId(), phones));
@@ -49,7 +49,7 @@ public class BkContactListController {
/**
* 预约端-台桌:查询台桌列表
*/
@SaAdminCheckPermission(value = "bk:bkOrder:table", name = "预约端-台桌:查询台桌列表")
@SaAdminCheckPermission(parentName = "预约端", value = "bk:bkOrder:table", name = "预约端-台桌:查询台桌列表")
@GetMapping("/bkOrder/table")
public CzgResult<List<BkTableVO>> table(@RequestParam(value = "areaId", required = false) Long areaId,
@RequestParam LocalDate day,
@@ -61,7 +61,7 @@ public class BkContactListController {
/**
* 预约端-预定单:预约单统计
*/
@SaAdminCheckPermission(value = "bk:bookings:statistics", name = "预约端-预约单:预约单统计")
@SaAdminCheckPermission(parentName = "预约端", value = "bk:bookings:statistics", name = "预约端-预约单:预约单统计")
@GetMapping("/bkOrder/booking/statistics")
public CzgResult<BookingOrderStatisticsVO> bookingOrderStatistics(@RequestParam(required = false) String search,
@RequestParam(required = false) LocalDate start,
@@ -74,7 +74,7 @@ public class BkContactListController {
/**
* 预约端-预定单:查询预约单列表
*/
@SaAdminCheckPermission(value = "bk:bkOrder:bookings", name = "预约端-预约单:列表")
@SaAdminCheckPermission(parentName = "预约端", value = "bk:bkOrder:bookings", name = "预约端-预约单:列表")
@GetMapping("/bkOrder/bookings")
public CzgResult<List<BkOrder>> bookings(@RequestParam(required = false) String search,
@RequestParam(required = false) LocalDate start,
@@ -87,7 +87,7 @@ public class BkContactListController {
/**
* 预约端-预定单:查询预约单选中台桌
*/
@SaAdminCheckPermission(value = "bk:bkOrder:tables", name = "预约端-预约单:查询预约单选中的台桌")
@SaAdminCheckPermission(parentName = "预约端", value = "bk:bkOrder:tables", name = "预约端-预约单:查询预约单选中的台桌")
@GetMapping("/bkOrder/bookings/tables")
public CzgResult<List<BkOrderTable>> bookingTables(Long id) {
List<BkOrderTable> tables = bkOrderService.bookingTables(StpKit.USER.getShopId(), id);
@@ -98,7 +98,7 @@ public class BkContactListController {
/**
* 预约端-预约单:预约/修改预约
*/
@SaAdminCheckPermission(value = "bk:bkOrder:booking", name = "预约端-预约单:预约/修改")
@SaAdminCheckPermission(parentName = "预约端", value = "bk:bkOrder:booking", name = "预约端-预约单:预约/修改")
@PostMapping("/bkOrder/booking")
public CzgResult<Void> booking(@RequestBody BkOrderDTO bkOrder) {
Long shopId = StpKit.USER.getShopId();
@@ -112,7 +112,7 @@ public class BkContactListController {
/**
* 预约端-预约单:取消预约
*/
@SaAdminCheckPermission(value = "bk:bkOrder:cancel", name = "预约端-预约单:取消预约")
@SaAdminCheckPermission(parentName = "预约端", value = "bk:bkOrder:cancel", name = "预约端-预约单:取消预约")
@PostMapping("/bkOrder/cancel")
public CzgResult<Void> cancel(@RequestBody BkOrderDTO bkOrder) {
AssertUtil.isNull(bkOrder.getId(), "需要撤销的预约单id不能为空");
@@ -124,7 +124,7 @@ public class BkContactListController {
/**
* 预约端-预约单:已到店
*/
@SaAdminCheckPermission(value = "bk:bkOrder:storeArrival", name = "预约端-预约单:已到店")
@SaAdminCheckPermission(parentName = "预约端", value = "bk:bkOrder:storeArrival", name = "预约端-预约单:已到店")
@PostMapping("/bkOrder/storeArrival")
public CzgResult<Void> storeArrival(@RequestBody BkOrderDTO bkOrder) {
AssertUtil.isNull(bkOrder.getId(), "已到店的预约单id不能为空");

View File

@@ -1,6 +1,5 @@
package com.czg.controller.admin;
import com.czg.account.dto.WxMsgSubDTO;
import com.czg.account.dto.calltable.*;
import com.czg.account.entity.CallConfig;
import com.czg.account.entity.CallQueue;
@@ -35,7 +34,7 @@ public class CallTableController {
* @param state 0禁用 1使用
* @return 分页数据
*/
@SaAdminCheckPermission(value = "callTable:list", name = "叫号桌型获取")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:list", name = "叫号桌型获取")
@GetMapping
public CzgResult<CallTablePage> get(Long callTableId, Integer state) {
return CzgResult.success(callTableService.get(StpKit.USER.getShopId(), callTableId, state));
@@ -47,7 +46,7 @@ public class CallTableController {
* @param addCallTableDTO 新增数据
* @return 是否成功
*/
@SaAdminCheckPermission(value = "callTable:add", name = "叫号桌型添加")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:add", name = "叫号桌型添加")
@PostMapping
public CzgResult<Boolean> add(@Validated @RequestBody CallTableDTO addCallTableDTO) {
return CzgResult.success(callTableService.add(StpKit.USER.getShopId(), addCallTableDTO));
@@ -58,7 +57,7 @@ public class CallTableController {
*
* @return 是否成功
*/
@SaAdminCheckPermission(value = "callTable:edit", name = "叫号桌型修改")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:edit", name = "叫号桌型修改")
@PutMapping
public CzgResult<Boolean> update(@Validated @RequestBody UpdateCallTableDTO callTableDTO) {
return CzgResult.success(callTableService.update(StpKit.USER.getShopId(), callTableDTO));
@@ -69,7 +68,7 @@ public class CallTableController {
*
* @return 是否成功
*/
@SaAdminCheckPermission(value = "callTable:del", name = "叫号桌型删除")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:del", name = "叫号桌型删除")
@DeleteMapping
public CzgResult<Boolean> delete(@Validated @RequestBody BaseCallTableDTO baseCallTableDTO) {
return CzgResult.success(callTableService.remove(new QueryWrapper().eq(CallTable::getShopId, StpKit.USER.getShopId()).eq(CallTable::getId, baseCallTableDTO.getCallTableId())));
@@ -78,7 +77,7 @@ public class CallTableController {
/**
* 获取叫号号码
*/
@SaAdminCheckPermission(value = "callTable:takeNumber", name = "获取叫号号码")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:takeNumber", name = "获取叫号号码")
@PostMapping("takeNumber")
public CzgResult<CallTableNumDTO> takeNumber(@Validated @RequestBody TakeNumberDTO takeNumberDTO) {
return CzgResult.success(callTableService.takeNumber(StpKit.USER.getShopId(), takeNumberDTO));
@@ -91,7 +90,7 @@ public class CallTableController {
* @param callTableId 叫号桌型id
* @return base64编码
*/
@SaAdminCheckPermission(value = "callTable:takeNumberCode", name = "获取叫号页面二维码")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:takeNumberCode", name = "获取叫号页面二维码")
@GetMapping("takeNumberCode")
public CzgResult<String> takeNumberCode(@RequestParam Integer callTableId) {
return CzgResult.success(callTableService.takeNumberCode(StpKit.USER.getShopId(), callTableId));
@@ -103,7 +102,7 @@ public class CallTableController {
*
* @return 0失败 1成功 -1用户未订阅
*/
@SaAdminCheckPermission(value = "callTable:call", name = "执行叫号")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:call", name = "执行叫号")
@PostMapping("call")
public CzgResult<Integer> call(@Validated @RequestBody CallQueueDTO callQueueDTO) {
try {
@@ -120,7 +119,7 @@ public class CallTableController {
*
* @return 是否成功
*/
@SaAdminCheckPermission(value = "callTable:updateState", name = "修改叫号队列状态")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:updateState", name = "修改叫号队列状态")
@PutMapping("updateState")
public CzgResult<Boolean> confirm(@Validated @RequestBody UpdateCallQueueDTO updateCallQueueDTO) {
return CzgResult.success(callTableService.updateInfo(StpKit.USER.getShopId(), updateCallQueueDTO));
@@ -134,7 +133,7 @@ public class CallTableController {
* @param state 状态 -1已取消 0排队中 1叫号中 2已入座 3 已过号
* @return 分页数据
*/
@SaAdminCheckPermission(value = "callTable:queue:list", name = "获取叫号队列")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:queue:list", name = "获取叫号队列")
@GetMapping("queue")
public CzgResult<Page<CallQueue>> getQueue(Long callTableId, Integer state, String openId) {
return CzgResult.success(callTableService.getQueue(StpKit.USER.getShopId(), openId, callTableId, state));
@@ -147,7 +146,7 @@ public class CallTableController {
* @param callTableId 桌型id
* @return 数据
*/
@SaAdminCheckPermission(value = "callTable:callRecord:list", name = "获取叫号记录列表")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:callRecord:list", name = "获取叫号记录列表")
@GetMapping("callRecord")
public CzgResult<Page<CallRecordVO>> getCallRecord(Integer callTableId) {
return CzgResult.success(callTableService.getCallRecord(StpKit.USER.getShopId(), callTableId));
@@ -158,7 +157,7 @@ public class CallTableController {
*
* @return 配置信息
*/
@SaAdminCheckPermission(value = "callTable:config:list", name = "获取叫号配置")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:config:list", name = "获取叫号配置")
@GetMapping("config")
public CzgResult<CallConfig> getConfig() {
return CzgResult.success(callTableService.getConfig(StpKit.USER.getShopId()));
@@ -169,7 +168,7 @@ public class CallTableController {
*
* @return 是否成功
*/
@SaAdminCheckPermission(value = "callTable:config:edit", name = "修改叫号配置")
@SaAdminCheckPermission(parentName = "叫号管理", value = "callTable:config:edit", name = "修改叫号配置")
@PutMapping("config")
public CzgResult<Boolean> updateConfig(@RequestBody UpdateConfigDTO configDTO) {
return CzgResult.success(callTableService.updateConfig(StpKit.USER.getShopId(), configDTO));
@@ -177,6 +176,7 @@ public class CallTableController {
/**
* 消息订阅
*
* @return 是否成功
*/
@PostMapping("subMsg")

View File

@@ -24,7 +24,7 @@ public class FreeDingController {
* 获取当前店铺霸王餐配置信息列表
* @return 霸王餐配置信息 (不存在会新建)
*/
@SaAdminCheckPermission(value = "freeDing:detail", name = "获取霸王餐配置信息")
@SaAdminCheckPermission(parentName = "霸王餐",value = "freeDing:detail", name = "获取霸王餐配置信息")
@GetMapping
public CzgResult<FreeDineConfigVO> getConfig() {
return CzgResult.success(freeDineConfigService.getConfig(StpKit.USER.getMainShopId()));
@@ -35,7 +35,7 @@ public class FreeDingController {
* @param freeDineConfigEditDTO 修改信息
* @return 霸王餐配置信息
*/
@SaAdminCheckPermission(value = "freeDing:edit", name = "修改霸王餐配置信息")
@SaAdminCheckPermission(parentName = "霸王餐",value = "freeDing:edit", name = "修改霸王餐配置信息")
@PutMapping
@SaCheckMainShop
public CzgResult<Boolean> edit(@RequestBody FreeDineConfigEditDTO freeDineConfigEditDTO) {

View File

@@ -38,8 +38,7 @@ public class HandoverRecordController {
*/
@GetMapping("page")
@OperationLog("交班记录-分页")
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
@SaAdminCheckPermission(value = "handoverRecord:page",name = "交班记录-分页")
@SaAdminCheckPermission(parentName = "交班记录", value = "handoverRecord:page", name = "交班记录-分页")
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);
@@ -52,8 +51,7 @@ public class HandoverRecordController {
*/
@GetMapping("{id}")
@OperationLog("交班记录-查看")
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
@SaAdminCheckPermission(value = "handoverRecord:info",name = "交班记录-查看")
@SaAdminCheckPermission(parentName = "交班记录", value = "handoverRecord:info", name = "交班记录-查看")
public CzgResult<List<HandoverProductListVo>> info(@PathVariable Long id) {
List<HandoverProductListVo> data = handoverRecordService.getHandoverProductListById(id);
return CzgResult.success(data);
@@ -67,8 +65,7 @@ public class HandoverRecordController {
@ResponseExcel(name = "交班售出商品明细")
@GetMapping("/export/{id}")
@OperationLog("交班记录-导出")
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
@SaAdminCheckPermission(value = "handoverRecord:export",name = "交班记录-导出")
@SaAdminCheckPermission(parentName = "交班记录", value = "handoverRecord:export", name = "交班记录-导出")
public List<HandoverProductListVo> export(@PathVariable Long id) {
return handoverRecordService.getHandoverProductListById(id);
}
@@ -78,8 +75,7 @@ public class HandoverRecordController {
*/
@GetMapping("total")
@OperationLog("收银机-交班数据统计")
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
@SaAdminCheckPermission(value = "handoverRecord:total",name = "收银机-交班数据统计")
@SaAdminCheckPermission(parentName = "交班记录", value = "handoverRecord:total", name = "收银机-交班数据统计")
public CzgResult<HandoverTotalVo> total() {
HandoverTotalVo data = handoverRecordService.totalHandoverData();
return CzgResult.success(data);
@@ -92,8 +88,7 @@ public class HandoverRecordController {
*/
@PostMapping("handover")
@OperationLog("收银机-交班/关班")
// @SaStaffCheckPermission("yun_xu_jiao_ban")
@SaAdminCheckPermission(value = "handoverRecord:handover",name = "收银机-交班/关班")
@SaAdminCheckPermission(parentName = "交班记录", value = "handoverRecord:handover", name = "收银机-交班/关班")
public CzgResult<Long> handover(@RequestParam Integer isPrint) {
Long id = handoverRecordService.handover();
return CzgResult.success(id);
@@ -106,8 +101,7 @@ public class HandoverRecordController {
*/
@PostMapping("/network/print/{id}")
@OperationLog("收银机-交班/关班-网络打印机打印交班小票")
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
@SaAdminCheckPermission(value = "handoverRecord:networkPrint",name = "收银机-交班/关班-网络打印机打印交班小票")
@SaAdminCheckPermission(parentName = "交班记录", value = "handoverRecord:networkPrint", name = "收银机-交班/关班-网络打印机打印交班小票")
public CzgResult<Void> handover(@PathVariable Long id) {
handoverRecordService.printHandoverReceipt(id, YesNoEnum.YES.value());
return CzgResult.success();
@@ -121,8 +115,7 @@ public class HandoverRecordController {
*/
@GetMapping("/detail/{id}")
@OperationLog("交班记录-详情")
//@SaAdminCheckPermission("handoverRecord:detail")
@SaAdminCheckPermission(value = "handoverRecord:detail",name = "交班记录-详情")
@SaAdminCheckPermission(parentName = "交班记录", value = "handoverRecord:detail", name = "交班记录-详情")
public CzgResult<HandoverRecordDTO> detail(@PathVariable Long id) {
HandoverRecord entity = handoverRecordService.getById(id);
HandoverRecordDTO data = BeanUtil.copyProperties(entity, HandoverRecordDTO.class);

View File

@@ -51,7 +51,7 @@ public class MenuController {
* 获取所有菜单
* @return 菜单结构
*/
@SaAdminCheckPermission(value = "menu:list", name = "菜单列表")
@SaAdminCheckPermission(parentName = "菜单管理", value = "menu:list", name = "菜单列表")
@GetMapping("/list")
public CzgResult<List<MenuVO>> all(String title, String startTime, String endTime) {
if (StpKit.USER.isAdmin()) {
@@ -65,7 +65,7 @@ public class MenuController {
* @return 菜单结构
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "menu:detail", name = "菜单详情")
@SaAdminCheckPermission(parentName = "菜单管理", value = "menu:detail", name = "菜单详情")
@GetMapping("/detail")
public CzgResult<SysMenu> detail(@RequestParam Integer id) {
return CzgResult.success(menuService.getById(id));
@@ -76,7 +76,7 @@ public class MenuController {
* @return 是否成功
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "menu:add", name = "菜单添加")
@SaAdminCheckPermission(parentName = "菜单管理", value = "menu:add", name = "菜单添加")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated MenuAddDTO menuAddDTO) {
return CzgResult.success(menuService.add(menuAddDTO));
@@ -87,7 +87,7 @@ public class MenuController {
* @return 是否成功
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "menu:edit", name = "菜单编辑")
@SaAdminCheckPermission(parentName = "菜单管理", value = "menu:edit", name = "菜单编辑")
@PutMapping()
public CzgResult<Boolean> edit(@RequestBody @Validated MenuEditDTO menuEditDTO) {
return CzgResult.success(menuService.edit(menuEditDTO));
@@ -98,7 +98,7 @@ public class MenuController {
* @return 是否成功
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "menu:del", name = "菜单删除")
@SaAdminCheckPermission(parentName = "菜单管理", value = "menu:del", name = "菜单删除")
@DeleteMapping()
public CzgResult<Boolean> edit(@RequestBody @Validated MenuDelDTO menuDelDTO) {
return CzgResult.success(menuService.removeById(menuDelDTO.getId()));

View File

@@ -33,7 +33,7 @@ public class MerchantRegisterController {
* @return 激活码列表
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "merchantRegister:list", name = "激活码列表")
@SaAdminCheckPermission(parentName = "激活码", value = "merchantRegister:list", name = "激活码列表")
@GetMapping
public CzgResult<Page<MerchantRegister>> get(PageDTO pageDTO, Integer state, String startTime, String endTime) {
return CzgResult.success(merchantRegisterService.get(pageDTO, state, startTime, endTime));
@@ -46,7 +46,7 @@ public class MerchantRegisterController {
* @return 是否成功
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "merchantRegister:add", name = "生成激活码")
@SaAdminCheckPermission(parentName = "激活码", value = "merchantRegister:add", name = "生成激活码")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated MerchantRegisterDTO merchantRegisterDTO) {
return CzgResult.success(merchantRegisterService.add(merchantRegisterDTO));

View File

@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
/**
* pad点餐相关
*
* @author Administrator
*/
@RestController
@@ -27,9 +28,10 @@ public class PadProdController {
/**
* pad布局列表
*
* @return 数据
*/
@SaAdminCheckPermission(value = "padProd:layout:list", name = "pad布局列表")
@SaAdminCheckPermission(parentName = "pad布局", value = "padProd:layout:list", name = "pad布局列表")
@GetMapping("/layout")
public CzgResult<Page<PadLayout>> layout() {
return CzgResult.success(padLayoutService.page(PageUtil.buildPage()));
@@ -37,10 +39,11 @@ public class PadProdController {
/**
* 获取点餐列表
*
* @param productCategoryId 分类id
* @return 数据
*/
@SaAdminCheckPermission(value = "padProd:list", name = "pad点餐列表")
@SaAdminCheckPermission(parentName = "pad布局", value = "padProd:list", name = "pad点餐列表")
@GetMapping
public CzgResult<Page<PadProductCategoryDTO>> list(Long productCategoryId) {
return CzgResult.success(padProdService.pageInfo(PageUtil.buildPage(), productCategoryId, StpKit.USER.getShopId()));
@@ -48,10 +51,11 @@ public class PadProdController {
/**
* 获取点餐详情
*
* @param id tb_pad_product_category Id
* @return 数据
*/
@SaAdminCheckPermission(value = "padProd:detail", name = "pad点餐详情")
@SaAdminCheckPermission(parentName = "pad布局", value = "padProd:detail", name = "pad点餐详情")
@GetMapping("/detail")
public CzgResult<PadDetailDTO> detail(Long id) {
return CzgResult.success(padProdService.detail(StpKit.USER.getShopId(), id));
@@ -59,9 +63,10 @@ public class PadProdController {
/**
* pad点餐新增
*
* @return 是否成功
*/
@SaAdminCheckPermission(value = "padProd:add", name = "pad点餐新增")
@SaAdminCheckPermission(parentName = "pad布局", value = "padProd:add", name = "pad点餐新增")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated PadDetailAddDTO padDetailAddDTO) {
return CzgResult.success(padProdService.add(StpKit.USER.getShopId(), padDetailAddDTO));
@@ -69,9 +74,10 @@ public class PadProdController {
/**
* pad点餐修改
*
* @return 是否成功
*/
@SaAdminCheckPermission(value = "padProd:edit", name = "pad点餐修改")
@SaAdminCheckPermission(parentName = "pad布局", value = "padProd:edit", name = "pad点餐修改")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated PadDetailEditDTO padDetailEditDTO) {
return CzgResult.success(padProdService.edit(StpKit.USER.getShopId(), padDetailEditDTO));
@@ -79,9 +85,10 @@ public class PadProdController {
/**
* pad点餐删除
*
* @return 是否成功
*/
@SaAdminCheckPermission(value = "padProd:del", name = "pad点餐删除")
@SaAdminCheckPermission(parentName = "pad布局", value = "padProd:del", name = "pad点餐删除")
@DeleteMapping
public CzgResult<Boolean> del(@RequestBody @Validated PadDetailDelDTO delDTO) {
return CzgResult.success(padProdService.del(StpKit.USER.getShopId(), delDTO));

View File

@@ -35,7 +35,7 @@ public class PrintMachineController {
* @param connectionType 类型 USB 网络 蓝牙
* @return 打印机列表
*/
@SaAdminCheckPermission(value = "printer:list", name = "打印机列表获取")
@SaAdminCheckPermission(parentName = "打印机管理", value = "printer:list", name = "打印机列表获取")
@GetMapping
public CzgResult<Page<PrintMachine>> list(String name, String connectionType, String subType) {
QueryWrapper queryWrapper = new QueryWrapper().eq(PrintMachine::getShopId, StpKit.USER.getShopId());
@@ -65,7 +65,7 @@ public class PrintMachineController {
* @param id 打印机id
* @return 是否成功
*/
@SaAdminCheckPermission(value = "printer:detail", name = "打印机详情获取")
@SaAdminCheckPermission(parentName = "打印机管理", value = "printer:detail", name = "打印机详情获取")
@GetMapping("/detail")
public CzgResult<PrintMachine> detail(@RequestParam Integer id) {
PrintMachine printMachine = printMachineService.getOne(new QueryWrapper().eq(PrintMachine::getId, id).eq(PrintMachine::getShopId, StpKit.USER.getShopId()));
@@ -80,7 +80,7 @@ public class PrintMachineController {
* 打印机新增
* @return 打印机列表
*/
@SaAdminCheckPermission(value = "printer:add", name = "打印机新增")
@SaAdminCheckPermission(parentName = "打印机管理", value = "printer:add", name = "打印机新增")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated PrinterAddDTO printerAddDTO) {
return CzgResult.success(printMachineService.add(StpKit.USER.getShopId(), printerAddDTO));
@@ -90,7 +90,7 @@ public class PrintMachineController {
* 打印机修改
* @return 打印机列表
*/
@SaAdminCheckPermission(value = "printer:edit", name = "打印机编辑")
@SaAdminCheckPermission(parentName = "打印机管理", value = "printer:edit", name = "打印机编辑")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated PrinterEditDTO printerEditDTO) {
return CzgResult.success(printMachineService.edit(StpKit.USER.getShopId(), printerEditDTO));
@@ -100,7 +100,7 @@ public class PrintMachineController {
* 打印机删除
* @return 打印机列表
*/
@SaAdminCheckPermission(value = "printer:del", name = "打印机删除")
@SaAdminCheckPermission(parentName = "打印机管理", value = "printer:del", name = "打印机删除")
@DeleteMapping
public CzgResult<Boolean> edit(@RequestBody @Validated PrinterDelDTO printerDelDTO) {
return CzgResult.success(printMachineService.remove(new QueryWrapper().eq(PrintMachine::getShopId, StpKit.USER.getShopId()).eq(PrintMachine::getId, printerDelDTO.getId())));

View File

@@ -32,7 +32,7 @@ public class RoleController {
* @param pageDTO 分页信息
* @return 分页数据
*/
@SaAdminCheckPermission(value = "role:list", name = "角色列表")
@SaAdminCheckPermission(parentName = "角色管理", value = "role:list", name = "角色列表")
@GetMapping("/list")
public CzgResult<Page<SysRole>> getList(PageDTO pageDTO, String key, String startTime, String endTime) {
return CzgResult.success(roleService.getList(StpKit.USER.getShopId(), pageDTO, key, startTime, endTime));
@@ -45,7 +45,7 @@ public class RoleController {
* @param type 0管理端 1收银机
* @return 分页数据
*/
@SaAdminCheckPermission(value = "role:menu", name = "角色菜单")
@SaAdminCheckPermission(parentName = "角色管理", value = "role:menu", name = "角色菜单")
@GetMapping("/menu")
public CzgResult<List<Long>> getRoleMenu(@RequestParam Integer id, @RequestParam Integer type) {
return CzgResult.success(roleService.getRoleMenu(StpKit.USER.getLoginIdAsLong(), id, type));
@@ -57,7 +57,7 @@ public class RoleController {
* @param roleAddDTO 角色信息
* @return 是否成功
*/
@SaAdminCheckPermission(value = "role:add", name = "角色添加")
@SaAdminCheckPermission(parentName = "角色管理", value = "role:add", name = "角色添加")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated RoleAddDTO roleAddDTO) {
return CzgResult.success(roleService.add(roleAddDTO));
@@ -79,7 +79,7 @@ public class RoleController {
* @param roleEditDTO 角色信息
* @return 是否成功
*/
@SaAdminCheckPermission(value = "role:edit", name = "角色编辑")
@SaAdminCheckPermission(parentName = "角色管理", value = "role:edit", name = "角色编辑")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated RoleEditDTO roleEditDTO) {
return CzgResult.success(roleService.edit(roleEditDTO));
@@ -91,7 +91,7 @@ public class RoleController {
* @param roleRemoveDTO 角色信息
* @return 是否成功
*/
@SaAdminCheckPermission(value = "role:remove", name = "角色删除")
@SaAdminCheckPermission(parentName = "角色管理", value = "role:remove", name = "角色删除")
@DeleteMapping
public CzgResult<Boolean> remove(@RequestBody @Validated RoleRemoveDTO roleRemoveDTO) {
if (roleRemoveDTO.id() == 1L || roleRemoveDTO.id() == 2L) {

View File

@@ -33,7 +33,7 @@ public class ShopAdController {
* @param status 状态 0未启用1已启用
* @return 列表
*/
@SaAdminCheckPermission(value = "shopAd:list", name = "小程序广告列表")
@SaAdminCheckPermission(parentName = "小程序广告",value = "shopAd:list", name = "小程序广告列表")
@GetMapping
public CzgResult<List<ShopAd>> list(String showPosition, Integer status) {
QueryWrapper queryWrapper = new QueryWrapper().eq(ShopAd::getShopId, StpKit.USER.getShopId());
@@ -50,7 +50,7 @@ public class ShopAdController {
* @param id adId
* @return 详情
*/
@SaAdminCheckPermission(value = "shopAd:detail", name = "小程序广告详情")
@SaAdminCheckPermission(parentName = "小程序广告",value = "shopAd:detail", name = "小程序广告详情")
@GetMapping("/detail")
public CzgResult<ShopAd> detail(@RequestParam Integer id) {
return CzgResult.success(shopAdService.getOne(new QueryWrapper().eq(ShopAd::getId, id).eq(ShopAd::getShopId, StpKit.USER.getShopId())));
@@ -60,7 +60,7 @@ public class ShopAdController {
* 小程序广告编辑
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopAd:edit", name = "小程序广告编辑")
@SaAdminCheckPermission(parentName = "小程序广告",value = "shopAd:edit", name = "小程序广告编辑")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated(UpdateGroup.class) ShopAdDTO shopAdEditDTO) {
ShopAd shopAd = BeanUtil.copyProperties(shopAdEditDTO, ShopAd.class);
@@ -76,7 +76,7 @@ public class ShopAdController {
* 小程序广告添加
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopAd:add", name = "小程序广告添加")
@SaAdminCheckPermission(parentName = "小程序广告",value = "shopAd:add", name = "小程序广告添加")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated(InsertGroup.class) ShopAdDTO shopAdEditDTO) {
long count = shopAdService.count(new QueryWrapper().eq(ShopAd::getShopId, StpKit.USER.getShopId()).like(ShopAd::getShowPosition, shopAdEditDTO.getShowPosition()));
@@ -92,7 +92,7 @@ public class ShopAdController {
* 小程序广告删除
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopAd:del", name = "小程序广告添加")
@SaAdminCheckPermission(parentName = "小程序广告",value = "shopAd:del", name = "小程序广告删除")
@DeleteMapping
public CzgResult<Boolean> delete(@RequestBody @Validated(UpdateGroup.class) ShopAdDTO shopAd) {
return CzgResult.success(shopAdService.remove(new QueryWrapper().eq(ShopAd::getShopId, StpKit.USER.getShopId()).eq(ShopAd::getId, shopAd.getId())));

View File

@@ -1,6 +1,5 @@
package com.czg.controller.admin;
import cn.hutool.core.util.StrUtil;
import com.czg.account.dto.extend.ShopExtendDTO;
import com.czg.account.entity.ShopExtend;
import com.czg.account.service.ShopExtendService;
@@ -16,6 +15,7 @@ import java.util.List;
/**
* 店铺拓展配置/装修
*
* @author Administrator
*/
@RestController
@@ -26,10 +26,11 @@ public class ShopExtendController {
/**
* 获取当前店铺拓展参数
*
* @param autoKey key名称
* @return 参数列表
*/
@SaAdminCheckPermission(value = "shopExtend:list", name = "店铺拓展参数列表")
@SaAdminCheckPermission(parentName = "店铺拓展参数", value = "shopExtend:list", name = "店铺拓展参数列表")
@GetMapping
public CzgResult<List<ShopExtend>> list(String autoKey) {
return CzgResult.success(shopExtendService.listInfo(StpKit.USER.getShopId(), autoKey));
@@ -37,10 +38,11 @@ public class ShopExtendController {
/**
* 获取当前店铺拓展参数详情
*
* @param autoKey key名称 小票logo ticket_logo
* @return 详细信息
*/
@SaAdminCheckPermission(value = "shopExtend:detail", name = "店铺拓展参数详情")
@SaAdminCheckPermission(parentName = "店铺拓展参数", value = "shopExtend:detail", name = "店铺拓展参数详情")
@GetMapping("/detail")
public CzgResult<ShopExtend> detail(@RequestParam String autoKey) {
return CzgResult.success(shopExtendService.getOne(new QueryWrapper().eq(ShopExtend::getShopId, StpKit.USER.getShopId()).eq(ShopExtend::getAutoKey, autoKey)));
@@ -48,9 +50,10 @@ public class ShopExtendController {
/**
* 店铺拓展参数修改
*
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopExtend:edit", name = "店铺拓展参数修改")
@SaAdminCheckPermission(parentName = "店铺拓展参数", value = "shopExtend:edit", name = "店铺拓展参数修改")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopExtendDTO shopExtendDTO) {
return CzgResult.success(shopExtendService.edit(StpKit.USER.getShopId(), shopExtendDTO));

View File

@@ -1,7 +1,5 @@
package com.czg.controller.admin;
import cn.dev33.satoken.session.TokenSign;
import cn.hutool.core.collection.CollUtil;
import com.czg.account.dto.PageDTO;
import com.czg.account.dto.shopinfo.ShopBranchSelectDTO;
import com.czg.account.dto.shopinfo.ShopDetailDTO;
@@ -40,7 +38,7 @@ public class ShopInfoController {
* 权限标识: shopInfo:list
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "shopInfo:list", name = "店铺列表")
@SaAdminCheckPermission(parentName = "店铺管理", value = "shopInfo:list", name = "店铺列表")
@GetMapping
public CzgResult<Page<ShopInfo>> get(PageDTO pageDTO, String shopName, Integer status, Integer isHeadShop) {
return CzgResult.success(shopInfoService.get(pageDTO, shopName, status, isHeadShop));
@@ -73,7 +71,7 @@ public class ShopInfoController {
* 权限标识: shopInfo:add
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "shopInfo:add", name = "店铺添加")
@SaAdminCheckPermission(parentName = "店铺管理", value = "shopInfo:add", name = "店铺添加")
@PostMapping
public CzgResult<?> add(@RequestBody @Validated ShopInfoAddDTO shopInfoAddDTO) {
return CzgResult.success(shopInfoService.add(shopInfoAddDTO));
@@ -83,7 +81,7 @@ public class ShopInfoController {
* 店铺编辑
* 权限标识: shopInfo:edit
*/
@SaAdminCheckPermission(value = "shopInfo:edit", name = "店铺编辑")
@SaAdminCheckPermission(parentName = "店铺管理", value = "shopInfo:edit", name = "店铺编辑")
@PutMapping
public CzgResult<?> edit(@RequestBody @Validated ShopInfoEditDTO shopInfoEditDTO) {
return CzgResult.success(shopInfoService.edit(shopInfoEditDTO));
@@ -94,7 +92,7 @@ public class ShopInfoController {
* 权限标识: shopInfo:del
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "shopInfo:del", name = "店铺删除")
@SaAdminCheckPermission(parentName = "店铺管理", value = "shopInfo:del", name = "店铺删除")
@DeleteMapping
public CzgResult<?> delete(@RequestParam Integer id) {
return CzgResult.success(shopInfoService.remove(new QueryWrapper().eq(ShopInfo::getId, id)));

View File

@@ -28,7 +28,7 @@ public class ShopMerchantController {
* @return 支付信息
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "shopMerchant:detail", name = "商户支付信息获取")
@SaAdminCheckPermission(parentName = "支付参数信息", value = "shopMerchant:detail", name = "商户支付信息获取")
@GetMapping
public CzgResult<ShopMerchant> detail(@RequestParam Integer shopId) {
return CzgResult.success(shopMerchantService.detail(shopId));
@@ -40,7 +40,7 @@ public class ShopMerchantController {
* @return 是否成功
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(value = "shopMerchant:edit", name = "商户支付信息修改")
@SaAdminCheckPermission(parentName = "支付参数信息", value = "shopMerchant:edit", name = "商户支付信息修改")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopMerchantEditDTO shopMerchantEditDTO) {
return CzgResult.success(shopMerchantService.edit(shopMerchantEditDTO));

View File

@@ -63,7 +63,7 @@ public class ShopMsgPushController {
/**
* 店铺推送状态获取
*/
@SaAdminCheckPermission(value = "shopMsgPush:state:list", name = "店铺推送状态获取")
@SaAdminCheckPermission(parentName = "店铺消息推送", value = "shopMsgPush:state:list", name = "店铺推送状态获取")
@GetMapping("/shopState")
public CzgResult<?> get() {
return CzgResult.success(shopMsgStateService.getState(StpKit.USER.getShopId()));
@@ -75,7 +75,7 @@ public class ShopMsgPushController {
* @param shopMsgEditDTO 修改嘻嘻你
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopMsgPush:state:edit", name = "店铺推送状态修改")
@SaAdminCheckPermission(parentName = "店铺消息推送", value = "shopMsgPush:state:edit", name = "店铺推送状态修改")
@PutMapping("/shopState")
public CzgResult<Boolean> edit(@RequestBody @Validated ShopMsgEditDTO shopMsgEditDTO) {
return CzgResult.success(shopMsgStateService.edit(StpKit.USER.getShopId(), shopMsgEditDTO));
@@ -86,7 +86,7 @@ public class ShopMsgPushController {
*
* @return 分页数据
*/
@SaAdminCheckPermission(value = "shopMsgPush:list", name = "订阅用户列表")
@SaAdminCheckPermission(parentName = "店铺消息推送", value = "shopMsgPush:list", name = "订阅用户列表")
@GetMapping
public CzgResult<Page<ShopPushOpenId>> allInfo() {
return CzgResult.success(shopPushOpenIdService.pageInfo(StpKit.USER.getShopId()));
@@ -98,7 +98,7 @@ public class ShopMsgPushController {
* @param openId 唯一推送标识
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopMsgPush:del", name = "订阅解绑")
@SaAdminCheckPermission(parentName = "店铺消息推送", value = "shopMsgPush:del", name = "订阅解绑")
@DeleteMapping
public CzgResult<Boolean> unbind(@RequestParam String openId) {
return CzgResult.success(shopPushOpenIdService.remove(new QueryWrapper().eq(ShopPushOpenId::getShopId, StpKit.USER.getShopId()).eq(ShopPushOpenId::getOpenId, openId)));
@@ -110,7 +110,7 @@ public class ShopMsgPushController {
* @param shopPushOpenIdEditDTO 修改信息
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopMsgPush:edit", name = "推送状态修改")
@SaAdminCheckPermission(parentName = "店铺消息推送", value = "shopMsgPush:edit", name = "推送状态修改")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopPushOpenIdEditDTO shopPushOpenIdEditDTO) {
return CzgResult.success(shopPushOpenIdService.edit(StpKit.USER.getShopId(), shopPushOpenIdEditDTO));
@@ -122,7 +122,7 @@ public class ShopMsgPushController {
* @return 二维码信息
* @throws Exception 异常
*/
@SaAdminCheckPermission(value = "shopMsgPush:code", name = "获取订阅二维码")
@SaAdminCheckPermission(parentName = "店铺消息推送", value = "shopMsgPush:code", name = "获取订阅二维码")
@GetMapping("/code")
public CzgResult<String> getCoed() throws Exception {
return CzgResult.success(shopMsgStateService.getCode(StpKit.USER.getShopId()));
@@ -132,7 +132,7 @@ public class ShopMsgPushController {
/**
* 配置订阅消息类型
*/
@SaAdminCheckPermission(value = "shopMsgPush:config", name = "配置订阅消息类型")
@SaAdminCheckPermission(parentName = "店铺消息推送", value = "shopMsgPush:config", name = "配置订阅消息类型")
@PostMapping("/config")
public CzgResult<String> config(@RequestBody ShopPushConfigParam param) {
ValidatorUtil.validateEntity(param, DefaultGroup.class);

View File

@@ -29,7 +29,7 @@ public class ShopPayTypeController {
/**
* 支付方式列表
*/
// @SaAdminCheckPermission(value = "shopPayType:list", name = "支付方式列表")
// @SaAdminCheckPermission(parentName = "支付方式", value = "shopPayType:list", name = "支付方式列表")
@GetMapping
public CzgResult<List<ShopPayType>> list() {
return CzgResult.success(shopPayTypeService.getList(StpKit.USER.getShopId()));
@@ -38,7 +38,7 @@ public class ShopPayTypeController {
/**
* 支付方式详情获取
*/
@SaAdminCheckPermission(value = "shopPayType:detail", name = "支付方式详情获取")
@SaAdminCheckPermission(parentName = "支付方式", value = "shopPayType:detail", name = "支付方式详情获取")
@GetMapping("/detail")
public CzgResult<ShopPayType> detail(@RequestParam Integer id) {
return CzgResult.success(shopPayTypeService.getOne(new QueryWrapper().eq(ShopPayType::getId, id)));
@@ -47,7 +47,7 @@ public class ShopPayTypeController {
/**
* 支付方式编辑
*/
@SaAdminCheckPermission(value = "shopPayType:edit", name = "支付方式编辑")
@SaAdminCheckPermission(parentName = "支付方式", value = "shopPayType:edit", name = "支付方式编辑")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody ShopPayTypeDTO shopPayTypeDTO) {
return CzgResult.success(shopPayTypeService.edit(StpKit.USER.getShopId(), shopPayTypeDTO));
@@ -56,7 +56,7 @@ public class ShopPayTypeController {
/**
* 支付方式添加
*/
@SaAdminCheckPermission(value = "shopPayType:save", name = "支付方式添加")
@SaAdminCheckPermission(parentName = "支付方式", value = "shopPayType:save", name = "支付方式添加")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated(InsertGroup.class) ShopPayTypeAddDTO shopPayTypeAddDTO) {
ShopPayType shopPayType = BeanUtil.copyProperties(shopPayTypeAddDTO, ShopPayType.class);

View File

@@ -25,7 +25,7 @@ public class ShopPermissionController {
* 获取店铺权限列表
* @return 权限列表
*/
@SaAdminCheckPermission(value = "shopPermission:list", name = "店铺权限列表")
@SaAdminCheckPermission(parentName = "店铺权限",value = "shopPermission:list", name = "店铺权限列表")
@GetMapping
public CzgResult<List<ShopPermission>> getPermission() {
return CzgResult.success(shopPermissionService.getPermission());

View File

@@ -30,7 +30,7 @@ public class ShopSongController {
* 点歌页面地址
* @return url
*/
@SaAdminCheckPermission(value = "shopSong:url", name = "点歌页面地址")
@SaAdminCheckPermission(parentName = "点歌管理", value = "shopSong:url", name = "点歌页面地址")
@GetMapping("/url")
public CzgResult<String> getSongUrl(){
return CzgResult.success(shopSongService.getSongUrl(StpKit.USER.getShopId()));
@@ -40,7 +40,7 @@ public class ShopSongController {
* 歌曲列表
* @return 分页数据
*/
@SaAdminCheckPermission(value = "shopSong:list", name = "店铺歌曲查询")
@SaAdminCheckPermission(parentName = "点歌管理", value = "shopSong:list", name = "店铺歌曲查询")
@GetMapping
public CzgResult<Page<ShopSong>> list(){
return CzgResult.success(shopSongService.page(PageUtil.buildPage(), new QueryWrapper().eq(ShopSong::getShopId, StpKit.USER.getShopId()).orderBy(ShopSong::getCreateTime, false)));
@@ -50,7 +50,7 @@ public class ShopSongController {
* 歌曲详情
* @return 分页数据
*/
@SaAdminCheckPermission(value = "shopSong:detail", name = "店铺歌曲详情")
@SaAdminCheckPermission(parentName = "点歌管理", value = "shopSong:detail", name = "店铺歌曲详情")
@GetMapping("/detail")
public CzgResult<ShopSong> detail(@RequestParam Integer id){
return CzgResult.success(shopSongService.getOne(new QueryWrapper().eq(ShopSong::getShopId, StpKit.USER.getShopId()).eq(ShopSong::getId, id)));
@@ -62,7 +62,7 @@ public class ShopSongController {
* @param shopSongAddDTO 歌曲数据
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopSong:add", name = "店铺歌曲新增")
@SaAdminCheckPermission(parentName = "点歌管理", value = "shopSong:add", name = "店铺歌曲新增")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated ShopSongAddDTO shopSongAddDTO){
return CzgResult.success(shopSongService.add(StpKit.USER.getShopId(), shopSongAddDTO));
@@ -73,7 +73,7 @@ public class ShopSongController {
* @param shopSongEditDTO 修改信息
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopSong:edit", name = "店铺歌曲修改")
@SaAdminCheckPermission(parentName = "点歌管理", value = "shopSong:edit", name = "店铺歌曲修改")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopSongEditDTO shopSongEditDTO){
return CzgResult.success(shopSongService.edit(StpKit.USER.getShopId(), shopSongEditDTO));
@@ -84,7 +84,7 @@ public class ShopSongController {
* @param shopSongEditDTO 删除信息
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopSong:del", name = "店铺歌曲删除")
@SaAdminCheckPermission(parentName = "点歌管理", value = "shopSong:del", name = "店铺歌曲删除")
@DeleteMapping
public CzgResult<Boolean> delete(@RequestBody @Validated BaseShopSongDTO shopSongEditDTO){
return CzgResult.success(shopSongService.remove(new QueryWrapper().eq(ShopSong::getShopId, StpKit.USER.getShopId()).eq(ShopSong::getId, shopSongEditDTO.getId())));

View File

@@ -40,7 +40,7 @@ public class ShopStaffController {
* @param code 员工编号
* @return 分页数据
*/
@SaAdminCheckPermission(value = "shopStaff:list", name = "员工列表")
@SaAdminCheckPermission(parentName = "员工管理", value = "shopStaff:list", name = "员工列表")
@GetMapping
public CzgResult<Page<ShopStaff>> list(String name, String code) {
return CzgResult.success(shopStaffService.get(name, code));
@@ -51,7 +51,7 @@ public class ShopStaffController {
* 权限标识: shopStaff:permission
* @return 权限id集合
*/
@SaAdminCheckPermission(value = "shopStaff:permission", name = "获取员工对应的权限id")
@SaAdminCheckPermission(parentName = "员工管理", value = "shopStaff:permission", name = "获取员工对应的权限id")
@GetMapping("/permission")
public CzgResult<List<Long>> permission(@RequestParam Long id) {
return CzgResult.success(shopStaffService.permission(id));
@@ -77,7 +77,7 @@ public class ShopStaffController {
* @param id shopStaff id
* @return 详细信息
*/
@SaAdminCheckPermission(value = "shopStaff:detail", name = "员工详情")
@SaAdminCheckPermission(parentName = "员工管理", value = "shopStaff:detail", name = "员工详情")
@GetMapping("/detail")
public CzgResult<ShopStaff> detail(@RequestParam Long id) {
return CzgResult.success(shopStaffService.detail(StpKit.USER.getShopId(), id));
@@ -89,7 +89,7 @@ public class ShopStaffController {
* @param shopStaffAddDTO 添加信息
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopStaff:add", name = "员工添加")
@SaAdminCheckPermission(parentName = "员工管理", value = "shopStaff:add", name = "员工添加")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated ShopStaffAddDTO shopStaffAddDTO) {
return CzgResult.success(shopStaffService.add(shopStaffAddDTO));
@@ -101,7 +101,7 @@ public class ShopStaffController {
* @param shopStaffEditDTO 添加信息
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopStaff:edit", name = "员工修改")
@SaAdminCheckPermission(parentName = "员工管理", value = "shopStaff:edit", name = "员工修改")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopStaffEditDTO shopStaffEditDTO) {
return CzgResult.success(shopStaffService.edit(shopStaffEditDTO));
@@ -113,7 +113,7 @@ public class ShopStaffController {
* @param shopStaffRemoveDTO 删除信息
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopStaff:del", name = "员工删除")
@SaAdminCheckPermission(parentName = "员工管理", value = "shopStaff:del", name = "员工删除")
@DeleteMapping
public CzgResult<Boolean> delete(@RequestBody @Validated ShopStaffRemoveDTO shopStaffRemoveDTO) {
return CzgResult.success(shopStaffService.delete(shopStaffRemoveDTO));

View File

@@ -29,7 +29,7 @@ public class ShopTableAreaController {
* @param name 区域名称
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopArea:list", name = "区域列表")
@SaAdminCheckPermission(parentName = "区域管理", value = "shopArea:list", name = "区域列表")
@GetMapping
public CzgResult<Page<ShopTableArea>> list(String name) {
return CzgResult.success(shopTableAreaService.pageInfo(StpKit.USER.getShopId(), name));
@@ -40,7 +40,7 @@ public class ShopTableAreaController {
* 权限标识: shopArea:edit
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopArea:edit", name = "区域修改")
@SaAdminCheckPermission(parentName = "区域管理", value = "shopArea:edit", name = "区域修改")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopAreaEditDTO shopAreaEditDTO) {
return CzgResult.success(shopTableAreaService.edit(StpKit.USER.getShopId(), shopAreaEditDTO));
@@ -51,7 +51,7 @@ public class ShopTableAreaController {
* 权限标识: shopArea:del
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopArea:del", name = "区域删除")
@SaAdminCheckPermission(parentName = "区域管理", value = "shopArea:del", name = "区域删除")
@DeleteMapping
public CzgResult<Boolean> remove(@RequestBody @Validated ShopAreaEditDTO shopAreaEditDTO) {
return CzgResult.success(shopTableAreaService.remove(new QueryWrapper().eq(ShopTableArea::getShopId, StpKit.USER.getShopId()).eq(ShopTableArea::getId, shopAreaEditDTO.getId())));
@@ -62,7 +62,7 @@ public class ShopTableAreaController {
* 权限标识: shopArea:add
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopArea:add", name = "区域新增")
@SaAdminCheckPermission(parentName = "区域管理", value = "shopArea:add", name = "区域新增")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated ShopAreaAddDTO shopAreaAddDTO) {
return CzgResult.success(shopTableAreaService.add(shopAreaAddDTO));

View File

@@ -38,7 +38,7 @@ public class ShopTableController {
* 批量生成台桌码
* 权限标识: shopTable:code
*/
@SaAdminCheckPermission(value = "shopTable:code", name = "生成台桌码")
@SaAdminCheckPermission(parentName = "台桌管理", value = "shopTable:code", name = "生成台桌码")
@PostMapping("/code")
public void createCode(@RequestParam Integer num, HttpServletResponse response, HttpServletRequest request) throws IOException {
if (num > 100) {
@@ -55,7 +55,7 @@ public class ShopTableController {
* @param status 台桌状态
* @return 台桌列表
*/
@SaAdminCheckPermission(value = "shopTable:list", name = "获取台桌列表")
@SaAdminCheckPermission(parentName = "台桌管理", value = "shopTable:list", name = "获取台桌列表")
@GetMapping
public CzgResult<Page<ShopTableVO>> list(Integer areaId, String tableCode, String status, String name, Boolean isBind) {
return CzgResult.success(shopTableService.pageInfo(StpKit.USER.getShopId(), areaId, tableCode, status, name, isBind));
@@ -67,7 +67,7 @@ public class ShopTableController {
* @param id 台桌id
* @return 台桌列表
*/
@SaAdminCheckPermission(value = "shopTable:detail", name = "获取台桌详情")
@SaAdminCheckPermission(parentName = "台桌管理", value = "shopTable:detail", name = "获取台桌详情")
@GetMapping("/detail")
public CzgResult<ShopTable> detail(Long id, String tableCode) {
if (id == null && StrUtil.isBlank(tableCode)) {
@@ -90,7 +90,7 @@ public class ShopTableController {
* 权限标识: shopTable:edit
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopTable:edit", name = "台桌信息修改")
@SaAdminCheckPermission(parentName = "台桌管理", value = "shopTable:edit", name = "台桌信息修改")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopTableDTO shopTableDTO) {
return CzgResult.success(shopTableService.updateInfo(StpKit.USER.getLoginIdAsLong(), shopTableDTO));
@@ -140,7 +140,7 @@ public class ShopTableController {
* 权限标识: shopTable:clear
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopTable:clear", name = "台桌清台")
@SaAdminCheckPermission(parentName = "台桌管理", value = "shopTable:clear", name = "台桌清台")
@PutMapping("/clear")
public CzgResult<Boolean> clear(@RequestBody @Validated ShopTableClearDTO shopTableClearDTO) {
return CzgResult.success(shopTableService.clear(StpKit.USER.getLoginIdAsLong(), shopTableClearDTO));
@@ -151,7 +151,7 @@ public class ShopTableController {
* 权限标识: shopTable:del
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopTable:del", name = "台桌信息删除")
@SaAdminCheckPermission(parentName = "台桌管理", value = "shopTable:del", name = "台桌信息删除")
@DeleteMapping
public CzgResult<Boolean> remove(@RequestBody @Validated ShopTableDTO shopTableDTO) {
return CzgResult.success(shopTableService.remove(new QueryWrapper().eq(ShopTable::getShopId, StpKit.USER.getShopId()).eq(ShopTable::getId, shopTableDTO.getId())));
@@ -162,7 +162,7 @@ public class ShopTableController {
* 权限标识: shopTable:add
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopTable:add", name = "台桌信息增加")
@SaAdminCheckPermission(parentName = "台桌管理", value = "shopTable:add", name = "台桌信息增加")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated ShopTableAddDTO shopTableAddDTO) {
if (shopTableAddDTO.getStart() >= shopTableAddDTO.getEnd()){
@@ -176,7 +176,7 @@ public class ShopTableController {
* 权限标识: shopTable:bind
* @return 是否成功
*/
@SaAdminCheckPermission(value = "shopTable:bind", name = "台桌绑定")
@SaAdminCheckPermission(parentName = "台桌管理", value = "shopTable:bind", name = "台桌绑定")
@PostMapping("/bind")
public CzgResult<Boolean> bind(@RequestBody @Validated ShopTableBindDTO shopTableBindDTO) {
return CzgResult.success(shopTableService.bind(StpKit.USER.getShopId(), shopTableBindDTO));

View File

@@ -40,9 +40,8 @@ public class ShopUserController {
* @param isVip 0 非vip 1 vip
* @return 概述信息
*/
@SaAdminCheckPermission(value = "shopUser:summary", name = "店铺用户概述信息")
@SaAdminCheckPermission(parentName = "店铺用户",value = "shopUser:summary", name = "店铺用户概述信息")
@GetMapping("/summary")
// @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
public CzgResult<ShopUserSummaryDTO> summary(Integer isVip) {
return CzgResult.success(shopUserService.getSummary(StpKit.USER.getHeadShopIdBySession(), isVip));
}
@@ -64,9 +63,8 @@ public class ShopUserController {
* adminOut管理员消费
* @return 充值记录
*/
@SaAdminCheckPermission(value = "shopUser:flow", name = "店铺用户充值记录")
@SaAdminCheckPermission(parentName = "店铺用户",value = "shopUser:flow", name = "店铺用户充值记录")
@GetMapping("/flow")
// @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.getShopId(), userId, bizCode, startTime, endTime));
}
@@ -80,9 +78,8 @@ public class ShopUserController {
* @param response 响应
* @throws IOException 异常
*/
@SaAdminCheckPermission(value = "shopUser:flow:downLoad", name = "店铺用户充值记录导出")
@SaAdminCheckPermission(parentName = "店铺用户",value = "shopUser:flow:downLoad", name = "店铺用户充值记录导出")
@GetMapping("/flow/download")
// @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.getHeadShopIdBySession(), userId, bizCode, startTime, endTime, response);
}
@@ -94,8 +91,7 @@ public class ShopUserController {
* @param isVip 0 非vip 1 vip
* @return 用户列表
*/
// @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
@SaAdminCheckPermission(value = "shopUser:list", name = "店铺用户列表")
@SaAdminCheckPermission(parentName = "店铺用户",value = "shopUser:list", name = "店铺用户列表")
@GetMapping
public CzgResult<Page<ShopUserDTO>> list(String key, Integer isVip, BigDecimal amount) {
return CzgResult.success(shopUserService.getPage(key, isVip, amount));
@@ -112,8 +108,7 @@ public class ShopUserController {
* @param userId 用户id
* @return 用户详情
*/
// @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
@SaAdminCheckPermission(value = "shopUser:detail", name = "店铺用户详情")
@SaAdminCheckPermission(parentName = "店铺用户",value = "shopUser:detail", name = "店铺用户详情")
@GetMapping("/detail")
public CzgResult<ShopUser> detail(Integer id, Integer userId) {
if (id == null && userId == null) {
@@ -127,8 +122,7 @@ public class ShopUserController {
*
* @return 是否成功
*/
// @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
@SaAdminCheckPermission(value = "shopUser:add", name = "店铺用户添加")
@SaAdminCheckPermission(parentName = "店铺用户",value = "shopUser:add", name = "店铺用户添加")
@PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) {
return CzgResult.success(shopUserService.add(StpKit.USER.getHeadShopIdBySession(), shopUserAddDTO));
@@ -139,8 +133,7 @@ public class ShopUserController {
*
* @return 是否成功
*/
// @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
@SaAdminCheckPermission(value = "shopUser:edit", name = "店铺用户修改")
@SaAdminCheckPermission(parentName = "店铺用户",value = "shopUser:edit", name = "店铺用户修改")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopUserEditDTO shopUserEditDTO) {
return CzgResult.success(shopUserService.updateInfo(StpKit.USER.getHeadShopIdBySession(), shopUserEditDTO));
@@ -151,8 +144,7 @@ public class ShopUserController {
*
* @return 是否成功
*/
// @SaStaffCheckPermission("yun_xu_xiu_gai_hui_yuan_yu_e")
@SaAdminCheckPermission(value = "shopUser:editFlow", name = "店铺用户余额修改")
@SaAdminCheckPermission(parentName = "店铺用户",value = "shopUser:editFlow", name = "店铺用户余额修改")
@PutMapping("/money")
public CzgResult<Boolean> editMoney(@RequestBody @Validated ShopUserMoneyEditDTO shopUserMoneyEditDTO) {
shopUserMoneyEditDTO.setBizEnum(ShopUserFlowBizEnum.ADMIN_IN);