接口目录
This commit is contained in:
@@ -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不能为空");
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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())));
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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())));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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)));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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())));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -31,7 +31,7 @@ public class AChatCouponController {
|
||||
* 群聊优惠券活动-创建
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
@SaAdminCheckPermission(value = "chat:coupon:create", name = "群聊优惠券活动-创建")
|
||||
@SaAdminCheckPermission(parentName = "群聊优惠券", value = "chat:coupon:create", name = "群聊优惠券活动-创建")
|
||||
public CzgResult<ChatCoupon> createChatCoupon(@RequestBody @Validated ChatCouponDTO chatCoupon) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
ChatCoupon coupon = chatCouponService.createChatCoupon(shopId, chatCoupon);
|
||||
@@ -42,10 +42,10 @@ public class AChatCouponController {
|
||||
* 群聊优惠券活动-分页查询
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@SaAdminCheckPermission(value = "chat:coupon:page", name = "群聊优惠券活动-分页查询")
|
||||
@SaAdminCheckPermission(parentName = "群聊优惠券", value = "chat:coupon:page", name = "群聊优惠券活动-分页查询")
|
||||
public CzgResult<Page<ChatCouponVO>> pageChatCoupon(@RequestParam(required = false, defaultValue = "1") Integer page,
|
||||
@RequestParam(required = false, defaultValue = "10") Integer size,
|
||||
@RequestParam(required = false) Integer status) {
|
||||
@RequestParam(required = false, defaultValue = "10") Integer size,
|
||||
@RequestParam(required = false) Integer status) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
return CzgResult.success(chatCouponService.pageChatCoupon(shopId, page, size, status));
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class AChatCouponController {
|
||||
* 群聊优惠券活动-失效
|
||||
*/
|
||||
@DeleteMapping("/expired/{id}")
|
||||
@SaAdminCheckPermission(value = "chat:coupon:expired", name = "群聊优惠券活动-失效")
|
||||
@SaAdminCheckPermission(parentName = "群聊优惠券", value = "chat:coupon:expired", name = "群聊优惠券活动-失效")
|
||||
public CzgResult<Boolean> expiredChatCoupon(@PathVariable Long id) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
return CzgResult.success(chatCouponService.expiredChatCoupon(shopId, id));
|
||||
@@ -64,7 +64,7 @@ public class AChatCouponController {
|
||||
* 群聊优惠券活动-发放记录
|
||||
*/
|
||||
@GetMapping("/record")
|
||||
@SaAdminCheckPermission(value = "chat:coupon:record", name = "群聊优惠券活动-发放记录")
|
||||
@SaAdminCheckPermission(parentName = "群聊优惠券", value = "chat:coupon:record", name = "群聊优惠券活动-发放记录")
|
||||
public CzgResult<Page<MkShopCouponRecordDTO>> grantChatCouponRecord(@RequestParam Long id,
|
||||
@RequestParam(required = false) Integer status,
|
||||
@RequestParam(required = false, defaultValue = "1") Integer page,
|
||||
|
||||
@@ -51,7 +51,6 @@ public class ACouponController {
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("page")
|
||||
// @OperationLog("优惠券列表-分页")
|
||||
// @SaAdminCheckPermission("coupon:page")
|
||||
public CzgResult<Page<ShopCouponDTO>> getCouponPage(ShopCouponDTO param) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
@@ -66,7 +65,6 @@ public class ACouponController {
|
||||
* @param id 主键id
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
// @OperationLog("优惠券-详情")
|
||||
// @SaAdminCheckPermission("coupon:info")
|
||||
public CzgResult<ShopCouponDTO> getCouponById(@PathVariable("id") Long id) {
|
||||
AssertUtil.isNull(id, "{}不能为空", "id");
|
||||
|
||||
@@ -37,7 +37,7 @@ public class BirthdayGiftController {
|
||||
* 配置信息获取
|
||||
* 权限标识: activate:list
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "birthdayGift:detail", name = "生日有礼详情")
|
||||
@SaAdminCheckPermission(parentName = "生日有礼",value = "birthdayGift:detail", name = "生日有礼详情")
|
||||
@GetMapping
|
||||
public CzgResult<MkBirthdayGiftVO> detail() {
|
||||
return CzgResult.success(service.detail(StpKit.USER.getMainShopId()));
|
||||
@@ -47,7 +47,7 @@ public class BirthdayGiftController {
|
||||
* 配置信息修改
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "birthdayGift:edit", name = "生日有礼修改")
|
||||
@SaAdminCheckPermission(parentName = "生日有礼",value = "birthdayGift:edit", name = "生日有礼修改")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> edit(@Validated @RequestBody MkBirthdayGiftDTO giftDTO) {
|
||||
return CzgResult.success(service.edit(StpKit.USER.getMainShopId(), giftDTO));
|
||||
@@ -58,7 +58,7 @@ public class BirthdayGiftController {
|
||||
* 记录获取
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "birthdayGift:record", name = "生日有礼记录")
|
||||
@SaAdminCheckPermission(parentName = "生日有礼",value = "birthdayGift:record", name = "生日有礼记录")
|
||||
@GetMapping("/record")
|
||||
public CzgResult<Page<MkBirthdayGiftRecordVO>> record(@RequestParam(required = false) LocalDateTime dateTime, @RequestParam(required = false) String key) {
|
||||
return CzgResult.success(service.getRecord(StpKit.USER.getMainShopId(), key, dateTime));
|
||||
@@ -69,7 +69,7 @@ public class BirthdayGiftController {
|
||||
* 记录获取
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "birthdayGift:summary", name = "生日有礼概述")
|
||||
@SaAdminCheckPermission(parentName = "生日有礼",value = "birthdayGift:summary", name = "生日有礼概述")
|
||||
@GetMapping("/summary")
|
||||
public CzgResult<MkBirthdayGiftRecordSummaryVO> summary(@RequestParam(required = false) String dateTime, @RequestParam(required = false) String key) {
|
||||
return CzgResult.success(service.summary(StpKit.USER.getMainShopId(), key, StrUtil.isNotBlank(dateTime) ? DateUtil.parseLocalDateTime(dateTime) : null));
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ConsumeCashbackController {
|
||||
* 配置信息获取
|
||||
* 权限标识: activate:list
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "consumeDiscount:detail", name = "消费返现详情")
|
||||
@SaAdminCheckPermission(parentName = "消费返现",value = "consumeDiscount:detail", name = "消费返现详情")
|
||||
@GetMapping
|
||||
public CzgResult<MkConsumeCashbackVO> detail() {
|
||||
return CzgResult.success(service.detail(StpKit.USER.getMainShopId()));
|
||||
@@ -44,7 +44,7 @@ public class ConsumeCashbackController {
|
||||
* 配置信息修改
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "consumeDiscount:edit", name = "消费返现修改")
|
||||
@SaAdminCheckPermission(parentName = "消费返现",value = "consumeDiscount:edit", name = "消费返现修改")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> edit(@Validated @RequestBody MkConsumeCashbackDTO consumeDiscountDTO) {
|
||||
return CzgResult.success(service.edit(StpKit.USER.getShopId(), consumeDiscountDTO));
|
||||
@@ -55,7 +55,7 @@ public class ConsumeCashbackController {
|
||||
* 记录获取
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "consumeDiscount:record", name = "消费返现记录")
|
||||
@SaAdminCheckPermission(parentName = "消费返现",value = "consumeDiscount:record", name = "消费返现记录")
|
||||
@GetMapping("/record")
|
||||
public CzgResult<Map<String, Object>> record(@RequestParam(required = false) Long shopId, @RequestParam(required = false) String key,
|
||||
@RequestParam(required = false)String startTime, @RequestParam(required = false) String endTime) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class CouponRedemptionController {
|
||||
/**
|
||||
* 开关。可用门店修改
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "couponRedemption:enable", name = "券兑换码状态修改")
|
||||
@SaAdminCheckPermission(parentName = "券兑换码",value = "couponRedemption:enable", name = "券兑换码状态修改")
|
||||
@PutMapping("/enable")
|
||||
public CzgResult<Boolean> upEnable(@Validated @RequestBody MkEnableConfigDTO dto) {
|
||||
return CzgResult.success(enableConfigService.upEnable(StpKit.USER.getMainShopId(),StpKit.USER.getLoginIdAsLong(), dto, TableValueConstant.EnableConfig.Type.COUPON_REDEMPTION));
|
||||
@@ -54,7 +54,7 @@ public class CouponRedemptionController {
|
||||
/**
|
||||
* 配置信息详情
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "couponRedemption:detail", name = "券兑换码列表")
|
||||
@SaAdminCheckPermission(parentName = "券兑换码",value = "couponRedemption:detail", name = "券兑换码详情")
|
||||
@GetMapping
|
||||
public CzgResult<MkRedemptionConfigVO> detail(@RequestParam Long id) {
|
||||
return CzgResult.success(configService.detail(StpKit.USER.getMainShopId(), id));
|
||||
@@ -63,7 +63,7 @@ public class CouponRedemptionController {
|
||||
/**
|
||||
* 配置信息获取 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "couponRedemption:list", name = "券兑换码列表")
|
||||
@SaAdminCheckPermission(parentName = "券兑换码",value = "couponRedemption:list", name = "券兑换码列表")
|
||||
@GetMapping("/list")
|
||||
public CzgResult<Page<MkRedemptionConfigVO>> list(@RequestParam(required = false, defaultValue = "-1") Integer status) {
|
||||
return CzgResult.success(configService.pageInfo(StpKit.USER.getMainShopId(), status, false));
|
||||
@@ -72,7 +72,7 @@ public class CouponRedemptionController {
|
||||
/**
|
||||
* 配置信息添加
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "couponRedemption:add", name = "券兑换码配置添加")
|
||||
@SaAdminCheckPermission(parentName = "券兑换码",value = "couponRedemption:add", name = "券兑换码配置添加")
|
||||
@PostMapping
|
||||
@SaCheckMainShop
|
||||
public CzgResult<Boolean> add(@Validated @RequestBody MkRedemptionConfigDTO dto) {
|
||||
@@ -84,7 +84,7 @@ public class CouponRedemptionController {
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "couponRedemption:edit", name = "券兑换码修改")
|
||||
@SaAdminCheckPermission(parentName = "券兑换码",value = "couponRedemption:edit", name = "券兑换码修改")
|
||||
@SaCheckMainShop
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@Validated({UpdateGroup.class, Default.class}) @RequestBody MkRedemptionConfigDTO dto) {
|
||||
@@ -96,7 +96,7 @@ public class CouponRedemptionController {
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "couponRedemption:codeList", name = "券兑换码码列表")
|
||||
@SaAdminCheckPermission(parentName = "券兑换码",value = "couponRedemption:codeList", name = "券兑换码码列表")
|
||||
@GetMapping("/code/list")
|
||||
public CzgResult<Page<MkRedemptionCodeVO>> codeList(@RequestParam Long redemptionId, @RequestParam(required = false) String code, @RequestParam(required = false) Integer status) {
|
||||
return CzgResult.success(configService.codeList(StpKit.USER.getMainShopId(), redemptionId, code, status, false));
|
||||
@@ -105,7 +105,7 @@ public class CouponRedemptionController {
|
||||
/**
|
||||
* 券兑换码码导出
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "couponRedemption:codeExport", name = "券兑换码码列表导出")
|
||||
@SaAdminCheckPermission(parentName = "券兑换码",value = "couponRedemption:codeExport", name = "券兑换码码列表导出")
|
||||
@GetMapping("/code/export")
|
||||
public void exportCodeList(@RequestParam Long redemptionId, @RequestParam(required = false) String code, @RequestParam(required = false) Integer status,
|
||||
HttpServletResponse response, HttpServletRequest request) {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class DistributionController {
|
||||
/**
|
||||
* 配置信息详情
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "distribution:detail", name = "分销配置")
|
||||
@SaAdminCheckPermission(parentName = "分销相关",value = "distribution:detail", name = "分销配置")
|
||||
@GetMapping
|
||||
public CzgResult<MkDistributionConfigVO> detail() {
|
||||
return CzgResult.success(configService.detail(StpKit.USER.getShopId()));
|
||||
@@ -55,7 +55,7 @@ public class DistributionController {
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "distribution:edit", name = "分销修改")
|
||||
@SaAdminCheckPermission(parentName = "分销相关",value = "distribution:edit", name = "分销修改")
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit( @RequestBody MkDistributionConfigDTO dto) {
|
||||
return CzgResult.success(configService.edit(StpKit.USER.getShopId(), dto));
|
||||
|
||||
@@ -59,7 +59,7 @@ public class DistributionUserController {
|
||||
*/
|
||||
@PostMapping
|
||||
@OperationLog("分销员-添加")
|
||||
@SaAdminCheckPermission(value = "distribution:user:add", name = "分销员添加")
|
||||
@SaAdminCheckPermission(parentName = "分销相关",value = "distribution:user:add", name = "分销员添加")
|
||||
public CzgResult<Void> addDistributionUser(@RequestBody MkDistributionUser param) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
param.setShopId(shopId);
|
||||
@@ -73,7 +73,7 @@ public class DistributionUserController {
|
||||
*/
|
||||
@PutMapping
|
||||
@OperationLog("分销员-修改")
|
||||
@SaAdminCheckPermission(value = "distribution:user:update", name = "分销员修改/分销员修改")
|
||||
@SaAdminCheckPermission(parentName = "分销相关",value = "distribution:user:update", name = "分销员修改/分销员修改")
|
||||
public CzgResult<Void> updateDistributionUser(@RequestBody @Validated({UpdateGroup.class, DefaultGroup.class}) MkDistributionUserDTO dto) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
dto.setShopId(shopId);
|
||||
@@ -84,7 +84,7 @@ public class DistributionUserController {
|
||||
|
||||
@PostMapping("/resetLevel")
|
||||
@OperationLog("分销员-重置分销组")
|
||||
@SaAdminCheckPermission(value = "distribution:user:update", name = "分销员修改/分销员修改")
|
||||
@SaAdminCheckPermission(parentName = "分销相关",value = "distribution:user:update", name = "分销员修改/分销员修改")
|
||||
public CzgResult<Void> resetDistributionUserLevel(@RequestBody MkDistributionUserDTO dto) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
dto.setShopId(shopId);
|
||||
@@ -97,7 +97,7 @@ public class DistributionUserController {
|
||||
*/
|
||||
@DeleteMapping
|
||||
@OperationLog("分销员-删除")
|
||||
@SaAdminCheckPermission(value = "distribution:user:delete", name = "分销员删除")
|
||||
@SaAdminCheckPermission(parentName = "分销相关",value = "distribution:user:delete", name = "分销员删除")
|
||||
public CzgResult<String> deleteDistributionUser(@RequestParam Long id) {
|
||||
AssertUtil.isNull(id, "{}不能为空", "id");
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
|
||||
@@ -1,26 +1,18 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.market.dto.MkBirthdayGiftDTO;
|
||||
import com.czg.market.dto.MkDrainageConfigDTO;
|
||||
import com.czg.market.entity.MkDrainageConfig;
|
||||
import com.czg.market.service.MkBirthdayGiftService;
|
||||
import com.czg.market.service.MkDrainageConfigService;
|
||||
import com.czg.market.vo.MkBirthdayGiftRecordSummaryVO;
|
||||
import com.czg.market.vo.MkBirthdayGiftRecordVO;
|
||||
import com.czg.market.vo.MkBirthdayGiftVO;
|
||||
import com.czg.market.vo.MkDrainageConfigVO;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 私域引流配置
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
@RestController
|
||||
@@ -34,7 +26,7 @@ public class DrainageConfigController {
|
||||
* 配置信息获取
|
||||
* 权限标识: activate:list
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "drainageConfig:detail", name = "私域引流详情")
|
||||
@SaAdminCheckPermission(parentName = "私域引流", value = "drainageConfig:detail", name = "私域引流详情")
|
||||
@GetMapping
|
||||
public CzgResult<MkDrainageConfigVO> detail() {
|
||||
return CzgResult.success(service.detail(StpKit.USER.getShopId()));
|
||||
@@ -42,15 +34,14 @@ public class DrainageConfigController {
|
||||
|
||||
/**
|
||||
* 配置信息修改
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "drainageConfig:edit", name = "私域引流修改")
|
||||
@SaAdminCheckPermission(parentName = "私域引流",value = "drainageConfig:edit", name = "私域引流修改")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> edit(@Validated @RequestBody MkDrainageConfigDTO config) {
|
||||
return CzgResult.success(service.edit(StpKit.USER.getShopId(), config));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ public class MemberController {
|
||||
* 配置信息获取
|
||||
* 权限标识: activate:list
|
||||
*/
|
||||
// @SaAdminCheckPermission(value = "member:detail", name = "会员配置列表")
|
||||
@GetMapping
|
||||
public CzgResult<MemberConfigVO> detail() {
|
||||
return CzgResult.success(memberConfigService.detail(StpKit.USER.getShopId()));
|
||||
@@ -63,7 +62,6 @@ public class MemberController {
|
||||
* 配置信息修改
|
||||
* @return 是否成功
|
||||
*/
|
||||
// @SaAdminCheckPermission(value = "member:edit", name = "会员配置列表")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> edit(@Validated @RequestBody MemberConfigDTO memberDTO) {
|
||||
AssertUtil.isTrue(!StpKit.USER.isMainShop(), "无权限操作");
|
||||
@@ -75,7 +73,6 @@ public class MemberController {
|
||||
* 会员等级添加
|
||||
* @return 是否成功
|
||||
*/
|
||||
// @SaAdminCheckPermission(value = "member:edit", name = "会员配置列表")
|
||||
@PostMapping("/level")
|
||||
public CzgResult<Boolean> addLevel(@Validated @RequestBody MemberLevelDTO levelDTO) throws CzgException {
|
||||
AssertUtil.isTrue(!StpKit.USER.isMainShop(), "无权限操作");
|
||||
@@ -86,7 +83,6 @@ public class MemberController {
|
||||
* 会员等级修改
|
||||
* @return 是否成功
|
||||
*/
|
||||
// @SaAdminCheckPermission(value = "member:edit", name = "会员配置列表")
|
||||
@PutMapping("/level")
|
||||
public CzgResult<Boolean> editLevel(@Validated({UpdateGroup.class, Default.class}) @RequestBody MemberLevelDTO levelDTO) throws CzgException {
|
||||
AssertUtil.isTrue(!StpKit.USER.isMainShop(), "无权限操作");
|
||||
@@ -97,7 +93,6 @@ public class MemberController {
|
||||
* 会员等级删除
|
||||
* @return 是否成功
|
||||
*/
|
||||
// @SaAdminCheckPermission(value = "member:edit", name = "会员配置列表")
|
||||
@DeleteMapping("/level/{id}")
|
||||
public CzgResult<Boolean> deleteLevel(@PathVariable Long id) {
|
||||
AssertUtil.isTrue(!StpKit.USER.isMainShop(), "无权限操作");
|
||||
@@ -108,7 +103,6 @@ public class MemberController {
|
||||
* 会员等级列表
|
||||
* @return 是否成功
|
||||
*/
|
||||
// @SaAdminCheckPermission(value = "member:edit", name = "会员配置列表")
|
||||
@GetMapping("/level/list")
|
||||
public CzgResult<ArrayList<MemberLevelVO>> levelList() {
|
||||
return CzgResult.success(memberConfigService.listLevel(StpKit.USER.getShopId()));
|
||||
@@ -119,7 +113,6 @@ public class MemberController {
|
||||
* 会员等级详情
|
||||
* @return 是否成功
|
||||
*/
|
||||
// @SaAdminCheckPermission(value = "member:edit", name = "会员配置列表")
|
||||
@PutMapping("/level/detail")
|
||||
public CzgResult<ArrayList<MemberLevelVO>> levelList(@RequestParam Integer id) {
|
||||
AssertUtil.isTrue(!StpKit.USER.isMainShop(), "无权限操作");
|
||||
|
||||
@@ -42,7 +42,7 @@ public class PointsConfigController {
|
||||
* 积分:配置:详情
|
||||
*/
|
||||
@GetMapping("/config")
|
||||
@SaAdminCheckPermission(parentName = "积分配置", value = "points:config:info", name = "积分-配置-详情")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:config:info", name = "积分-配置-详情")
|
||||
public CzgResult<MkPointsConfig> getPointsBasicSetting() {
|
||||
MkPointsConfig entity = pointsConfigService.getById(StpKit.USER.getShopId());
|
||||
return CzgResult.success(entity);
|
||||
@@ -52,7 +52,7 @@ public class PointsConfigController {
|
||||
* 积分:配置:新增/更新
|
||||
*/
|
||||
@PostMapping("/config")
|
||||
@SaAdminCheckPermission(value = "points:config:up", name = "积分-配置-新增/更新")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:config:up", name = "积分-配置-新增/更新")
|
||||
public CzgResult<Void> savePointsBasicSetting(@RequestBody @Validated MkPointsConfigDTO dto) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
dto.setShopId(shopId);
|
||||
@@ -70,7 +70,7 @@ public class PointsConfigController {
|
||||
* 积分:用户:列表
|
||||
*/
|
||||
@GetMapping("/userPage")
|
||||
@SaAdminCheckPermission(value = "points:user:list", name = "积分-用户-积分列表")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:user:list", name = "积分-用户-积分列表")
|
||||
public CzgResult<Page<MkPointsUserDTO>> getPointsUserPage(
|
||||
@RequestParam(required = false) @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确") String phone,
|
||||
@RequestParam(required = false, defaultValue = "1") Integer page,
|
||||
@@ -82,7 +82,7 @@ public class PointsConfigController {
|
||||
* 积分:用户:积分详情
|
||||
*/
|
||||
@GetMapping("/userRecord")
|
||||
@SaAdminCheckPermission(value = "points:user:record", name = "积分-用户-积分记录")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:user:record", name = "积分-用户-积分记录")
|
||||
public CzgResult<Page<MkPointsUserRecord>> getPointsUserRecord(@RequestParam(required = false, defaultValue = "1") Integer page,
|
||||
@RequestParam(required = false, defaultValue = "10") Integer size,
|
||||
@RequestParam Long id) {
|
||||
|
||||
@@ -31,7 +31,7 @@ public class PointsGoodsController {
|
||||
* 积分:商品:列表
|
||||
*/
|
||||
@GetMapping("page")
|
||||
@SaAdminCheckPermission(value = "points:goods:info", name = "积分-商品-列表")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:goods:info", name = "积分-商品-列表")
|
||||
public CzgResult<Page<MkPointsGoods>> getPointsGoodsSettingPage(BaseQueryParam param) {
|
||||
Page<MkPointsGoods> data = pointsGoodsSettingService.getPointsGoodsPage(param, StpKit.USER.getShopId());
|
||||
return CzgResult.success(data);
|
||||
@@ -41,7 +41,7 @@ public class PointsGoodsController {
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
@SaAdminCheckPermission(value = "points:goods:info", name = "积分-商品-列表")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:goods:info", name = "积分-商品-列表")
|
||||
public CzgResult<MkPointsGoods> getPointsGoodsSettingById(@PathVariable("id") Long id) {
|
||||
return CzgResult.success(pointsGoodsSettingService.getById(id));
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public class PointsGoodsController {
|
||||
* 积分:商品:新增/修改
|
||||
*/
|
||||
@PostMapping
|
||||
@SaAdminCheckPermission(value = "points:goods:up", name = "积分-商品-新增/修改")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:goods:up", name = "积分-商品-新增/修改")
|
||||
public CzgResult<Boolean> addPointsGoodsSetting(@RequestBody @Validated MkPointsGoodsDTO dto) {
|
||||
dto.setShopId(StpKit.USER.getShopId());
|
||||
MkPointsGoods entity = BeanUtil.copyProperties(dto, MkPointsGoods.class);
|
||||
@@ -62,7 +62,7 @@ public class PointsGoodsController {
|
||||
* 删除
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
@SaAdminCheckPermission(value = "points:goods:delete", name = "积分-商品-删除")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:goods:delete", name = "积分-商品-删除")
|
||||
public CzgResult<Void> deletePointsGoodsSetting(@PathVariable("id") Long id) {
|
||||
MkPointsGoods entity = pointsGoodsSettingService.getById(id);
|
||||
entity.setDelFlag(DeleteEnum.DELETED.value());
|
||||
|
||||
@@ -3,13 +3,13 @@ package com.czg.controller.admin;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.annotation.SaCheckMainShop;
|
||||
import com.czg.constant.TableValueConstant;
|
||||
import com.czg.market.dto.MkRedemptionConfigDTO;
|
||||
import com.czg.market.dto.MkEnableConfigDTO;
|
||||
import com.czg.market.service.MkRedemptionConfigService;
|
||||
import com.czg.market.dto.MkRedemptionConfigDTO;
|
||||
import com.czg.market.service.MkEnableConfigService;
|
||||
import com.czg.market.service.MkRedemptionConfigService;
|
||||
import com.czg.market.vo.MkEnableConfigVO;
|
||||
import com.czg.market.vo.MkRedemptionCodeVO;
|
||||
import com.czg.market.vo.MkRedemptionConfigVO;
|
||||
import com.czg.market.vo.MkEnableConfigVO;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.validator.group.UpdateGroup;
|
||||
@@ -37,7 +37,7 @@ public class RechargeRedemptionController {
|
||||
/**
|
||||
* 开关。可用门店修改
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "rechargeRedemption:enable", name = "充值兑换状态修改")
|
||||
@SaAdminCheckPermission(parentName = "充值兑换",value = "rechargeRedemption:enable", name = "充值兑换状态修改")
|
||||
@PutMapping("/enable")
|
||||
public CzgResult<Boolean> upEnable(@Validated @RequestBody MkEnableConfigDTO dto) {
|
||||
return CzgResult.success(enableConfigService.upEnable(StpKit.USER.getMainShopId(),StpKit.USER.getLoginIdAsLong(), dto, TableValueConstant.EnableConfig.Type.RECHARGE_REDEMPTION));
|
||||
@@ -54,7 +54,7 @@ public class RechargeRedemptionController {
|
||||
/**
|
||||
* 配置信息详情
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "rechargeRedemption:detail", name = "充值兑换列表")
|
||||
@SaAdminCheckPermission(parentName = "充值兑换",value = "rechargeRedemption:detail", name = "充值兑换详情")
|
||||
@GetMapping
|
||||
public CzgResult<MkRedemptionConfigVO> detail(@RequestParam Long id) {
|
||||
return CzgResult.success(configService.detail(StpKit.USER.getMainShopId(), id));
|
||||
@@ -63,7 +63,7 @@ public class RechargeRedemptionController {
|
||||
/**
|
||||
* 配置信息获取 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "rechargeRedemption:list", name = "充值兑换列表")
|
||||
@SaAdminCheckPermission(parentName = "充值兑换",value = "rechargeRedemption:list", name = "充值兑换列表")
|
||||
@GetMapping("/list")
|
||||
public CzgResult<Page<MkRedemptionConfigVO>> list(@RequestParam(required = false, defaultValue = "-1") Integer status) {
|
||||
return CzgResult.success(configService.pageInfo(StpKit.USER.getMainShopId(), status, true));
|
||||
@@ -72,7 +72,7 @@ public class RechargeRedemptionController {
|
||||
/**
|
||||
* 配置信息添加
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "rechargeRedemption:add", name = "充值兑换配置添加")
|
||||
@SaAdminCheckPermission(parentName = "充值兑换",value = "rechargeRedemption:add", name = "充值兑换配置添加")
|
||||
@PostMapping
|
||||
@SaCheckMainShop
|
||||
public CzgResult<Boolean> add(@Validated @RequestBody MkRedemptionConfigDTO dto) {
|
||||
@@ -84,7 +84,7 @@ public class RechargeRedemptionController {
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "rechargeRedemption:edit", name = "充值兑换修改")
|
||||
@SaAdminCheckPermission(parentName = "充值兑换",value = "rechargeRedemption:edit", name = "充值兑换修改")
|
||||
@SaCheckMainShop
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@Validated({UpdateGroup.class, Default.class}) @RequestBody MkRedemptionConfigDTO dto) {
|
||||
@@ -96,7 +96,7 @@ public class RechargeRedemptionController {
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "rechargeRedemption:codeList", name = "充值兑换码列表")
|
||||
@SaAdminCheckPermission(parentName = "充值兑换",value = "rechargeRedemption:codeList", name = "充值兑换码列表")
|
||||
@GetMapping("/code/list")
|
||||
public CzgResult<Page<MkRedemptionCodeVO>> codeList(@RequestParam Long redemptionId, @RequestParam(required = false) String code, @RequestParam(required = false) Integer status) {
|
||||
return CzgResult.success(configService.codeList(StpKit.USER.getMainShopId(), redemptionId, code, status, true));
|
||||
@@ -105,7 +105,7 @@ public class RechargeRedemptionController {
|
||||
/**
|
||||
* 充值兑换码导出
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "rechargeRedemption:codeExport", name = "充值兑换码列表导出")
|
||||
@SaAdminCheckPermission(parentName = "充值兑换",value = "rechargeRedemption:codeExport", name = "充值兑换码导出")
|
||||
@GetMapping("/code/export")
|
||||
public void exportCodeList(@RequestParam Long redemptionId, @RequestParam(required = false) String code, @RequestParam(required = false) Integer status,
|
||||
HttpServletResponse response, HttpServletRequest request) {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class DataSummaryController {
|
||||
* 营业板块-上半部分
|
||||
*/
|
||||
@GetMapping("trade")
|
||||
@SaAdminCheckPermission(value = "dataSummary:trade", name = "营业板块-上半部分")
|
||||
@SaAdminCheckPermission(parentName = "营业板块",value = "dataSummary:trade", name = "营业板块-上半部分")
|
||||
public CzgResult<ShopOrderStatistic> getTradeData(@Validated DataSummaryTradeParam param) {
|
||||
Boolean hasKey = redisService.hasKey("task:statistic:date:");
|
||||
if (hasKey) {
|
||||
@@ -64,7 +64,7 @@ public class DataSummaryController {
|
||||
* 商品销售 右下
|
||||
*/
|
||||
@GetMapping("productSaleDate")
|
||||
@SaAdminCheckPermission(value = "dataSummary:productSaleData", name = "商品销售-右下")
|
||||
@SaAdminCheckPermission(parentName = "营业板块",value = "dataSummary:productSaleData", name = "商品销售-右下")
|
||||
public CzgResult<List<ShopProdStatistic>> getProductSaleData(@RequestParam Integer day,@RequestParam(required = false) Long shopId) {
|
||||
if (shopId == null) {
|
||||
shopId = StpKit.USER.getShopId();
|
||||
@@ -80,7 +80,7 @@ public class DataSummaryController {
|
||||
* @param shopId 店铺id
|
||||
*/
|
||||
@GetMapping("dateAmount")
|
||||
@SaAdminCheckPermission(value = "dataSummary:dateAmount", name = "销售趋势柱状图 左下")
|
||||
@SaAdminCheckPermission(parentName = "营业板块",value = "dataSummary:dateAmount", name = "销售趋势柱状图 左下")
|
||||
public CzgResult<List<TotalVo>> getDateAmount(@RequestParam Integer day, @RequestParam(required = false) Long shopId) {
|
||||
AssertUtil.isNull(day, "天数不能为空");
|
||||
if (shopId == null) {
|
||||
@@ -97,7 +97,7 @@ public class DataSummaryController {
|
||||
* @param shopId 店铺id
|
||||
*/
|
||||
@GetMapping("datePayType")
|
||||
@SaAdminCheckPermission(value = "dataSummary:datePayType", name = "支付占比饼图 左下2")
|
||||
@SaAdminCheckPermission(parentName = "营业板块",value = "dataSummary:datePayType", name = "支付占比饼图 左下2")
|
||||
public CzgResult<List<CountPayTypeVo>> shopSummaryPayType(@RequestParam Integer day, @RequestParam(required = false) Long shopId) {
|
||||
if (shopId == null) {
|
||||
shopId = StpKit.USER.getShopId();
|
||||
@@ -113,7 +113,7 @@ public class DataSummaryController {
|
||||
* @param shopId 店铺id
|
||||
*/
|
||||
@GetMapping("profitRateBarChart")
|
||||
@SaAdminCheckPermission(value = "dataSummary:profitRateBarChart", name = "毛利率/净利率柱状图 左下下")
|
||||
@SaAdminCheckPermission(parentName = "营业板块",value = "dataSummary:profitRateBarChart", name = "毛利率/净利率柱状图 左下下")
|
||||
public CzgResult<List<ProfitRateVO>> profitRateBarChart(@RequestParam Integer day, @RequestParam(required = false) Long shopId) {
|
||||
AssertUtil.isNull(day, "天数不能为空");
|
||||
if (shopId == null) {
|
||||
@@ -129,7 +129,7 @@ public class DataSummaryController {
|
||||
* @param shopId 店铺id
|
||||
*/
|
||||
@GetMapping("costLineChart")
|
||||
@SaAdminCheckPermission(value = "dataSummary:costLineChart", name = "成本折线图 右下下")
|
||||
@SaAdminCheckPermission(parentName = "营业板块",value = "dataSummary:costLineChart", name = "成本折线图 右下下")
|
||||
public CzgResult<List<CostLineChartVO>> costLineChart(@RequestParam Integer day, @RequestParam(required = false) Long shopId) {
|
||||
AssertUtil.isNull(day, "天数不能为空");
|
||||
if (shopId == null) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class PointsGoodsRecordController {
|
||||
* 积分:积分商品:兑换记录
|
||||
*/
|
||||
@GetMapping("page")
|
||||
@SaAdminCheckPermission(value = "points:goodsRecord:list", name = "积分-积分商品-兑换记录")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:goodsRecord:list", name = "积分-积分商品-兑换记录")
|
||||
public CzgResult<Page<MkPointsGoodsRecordDTO>> getGoodsRecordPage(MkPointsGoodsRecordQueryDTO param) {
|
||||
param.setShopId(StpKit.USER.getShopId());
|
||||
Page<MkPointsGoodsRecordDTO> page = goodsRecordService.getGoodsRecordPage(param);
|
||||
@@ -48,7 +48,7 @@ public class PointsGoodsRecordController {
|
||||
* 积分:积分商品:统计
|
||||
*/
|
||||
@GetMapping("total")
|
||||
@SaAdminCheckPermission(value = "points:goodsRecord:total", name = "积分-积分商品-统计")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:goodsRecord:total", name = "积分-积分商品-统计")
|
||||
public CzgResult<PointsExchangeSummaryVo> total(MkPointsGoodsRecordQueryDTO param) {
|
||||
param.setShopId(StpKit.USER.getShopId());
|
||||
PointsExchangeSummaryVo data = goodsRecordService.total(param);
|
||||
@@ -62,7 +62,7 @@ public class PointsGoodsRecordController {
|
||||
*/
|
||||
@PostMapping("checkout")
|
||||
@OperationLog("积分兑换-核销")
|
||||
@SaAdminCheckPermission(value = "points:goodsRecord:checkout", name = "积分-积分商品-核销")
|
||||
@SaAdminCheckPermission(parentName = "积分相关", value = "points:goodsRecord:checkout", name = "积分-积分商品-核销")
|
||||
public CzgResult<Boolean> checkout(@RequestBody String couponCode) {
|
||||
return CzgResult.success(goodsRecordService.checkout(couponCode, StpKit.USER.getShopId()));
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TableController {
|
||||
* 按台桌查看
|
||||
*/
|
||||
@GetMapping("getKitchenTable")
|
||||
@SaAdminCheckPermission(value = "kitchen:table", name = "后厨-按台桌查看")
|
||||
@SaAdminCheckPermission(parentName = "后厨相关", value = "kitchen:table", name = "后厨-按台桌查看")
|
||||
public CzgResult<List<KitchenTableVO>> getKitchenTable(@RequestParam(required = false) String tableName, @RequestParam(required = false) Long areaId) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
List<KitchenTableVO> kitchenTables = kitchenDetailMapper.getKitchenTable(shopId, tableName, areaId);
|
||||
@@ -44,7 +44,7 @@ public class TableController {
|
||||
* 按台桌查看 商品内容
|
||||
*/
|
||||
@GetMapping("getKitchenTableFoods")
|
||||
@SaAdminCheckPermission(value = "kitchen:tableFood", name = "后厨-按台桌查看商品内容")
|
||||
@SaAdminCheckPermission(parentName = "后厨相关", value = "kitchen:tableFood", name = "后厨-按台桌查看商品内容")
|
||||
public CzgResult<List<KitchenTableFoodVO>> getKitchenTableFoods(@RequestParam(required = false) Long orderId,
|
||||
@RequestParam(required = false) String tableCode,
|
||||
@RequestParam(required = false) Long isNoTable) {
|
||||
@@ -61,7 +61,7 @@ public class TableController {
|
||||
* 按商品查看
|
||||
*/
|
||||
@GetMapping("getKitchenFood")
|
||||
@SaAdminCheckPermission(value = "kitchen:table", name = "后厨-按台桌查看")
|
||||
@SaAdminCheckPermission(parentName = "后厨相关", value = "kitchen:table", name = "后厨-按台桌查看")
|
||||
public CzgResult<List<KitchenFoodVO>> getKitchenFood(@RequestParam(required = false) String productName, @RequestParam(required = false) Long categoryId) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
List<KitchenFoodVO> kitchenFood = kitchenDetailMapper.getKitchenFood(shopId, productName, categoryId);
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ShopStorageController {
|
||||
* @param status 0:已取完;1:未取完;2:已过期
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "shopStorage:list", name = "获取存酒记录列表")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "shopStorage:list", name = "获取存酒记录列表")
|
||||
@GetMapping
|
||||
public CzgResult<Page<ShopStorage>> list(String key, String phone, Integer status) {
|
||||
return CzgResult.success(shopStorageService.pageInfo(StpKit.USER.getShopId(), key, phone, status));
|
||||
@@ -43,7 +43,7 @@ public class ShopStorageController {
|
||||
* 存酒记录添加
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "shopStorage:add", name = "添加存酒")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "shopStorage:add", name = "添加存酒")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated ShopStorageAddDTO shopStorageAddDTO) {
|
||||
return CzgResult.success(shopStorageService.add(StpKit.USER.getShopId(), shopStorageAddDTO));
|
||||
@@ -53,7 +53,7 @@ public class ShopStorageController {
|
||||
* 存酒取酒
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "shopStorage:edit", name = "修改存酒数量")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "shopStorage:edit", name = "修改存酒数量")
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopStorageEditDTO shopStorageEditDTO) {
|
||||
if (shopStorageEditDTO.getNum() == 0) {
|
||||
@@ -67,7 +67,7 @@ public class ShopStorageController {
|
||||
* @param id 存酒id
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "shopStorage:record", name = "查询存取酒记录")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "shopStorage:record", name = "查询存取酒记录")
|
||||
@GetMapping("/record")
|
||||
public CzgResult<List<ShopStorageRecord>> recordList(@RequestParam Integer id) {
|
||||
return CzgResult.success(shopStorageService.getRecord(StpKit.USER.getShopId(), id));
|
||||
@@ -77,7 +77,7 @@ public class ShopStorageController {
|
||||
* 存酒统计
|
||||
* @return 统计信息
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "shopStorage:count", name = "存酒统计")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "shopStorage:count", name = "存酒统计")
|
||||
@GetMapping("/count")
|
||||
public CzgResult<List<CountStorageDTO>> countRecord() {
|
||||
return CzgResult.success(shopStorageService.countRecord(StpKit.USER.getShopId()));
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ShopStorageGoodController {
|
||||
* @param name 商品名
|
||||
* @return 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "storageGood:list", name = "获取存酒商品列表")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "storageGood:list", name = "获取存酒商品列表")
|
||||
@GetMapping
|
||||
public CzgResult<Page<ShopStorageGood>> list(String name) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper().eq(ShopStorageGood::getShopId, StpKit.USER.getShopId());
|
||||
@@ -48,7 +48,7 @@ public class ShopStorageGoodController {
|
||||
* @param id 商品id
|
||||
* @return 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "storageGood:detail", name = "获取存酒商品详情")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "storageGood:detail", name = "获取存酒商品详情")
|
||||
@GetMapping("/detail")
|
||||
public CzgResult<ShopStorageGood> detail(@RequestParam Integer id) {
|
||||
return CzgResult.success(shopStorageGoodService.getOne(new QueryWrapper().eq(ShopStorageGood::getShopId, StpKit.USER.getShopId()).eq(ShopStorageGood::getId, id)));
|
||||
@@ -58,7 +58,7 @@ public class ShopStorageGoodController {
|
||||
* 编辑存酒商品
|
||||
* @return 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "storageGood:edit", name = "存酒商品编辑")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "storageGood:edit", name = "存酒商品编辑")
|
||||
@PutMapping("/edit")
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated({UpdateGroup.class}) ShopStorageGoodDTO shopStorageGoodDTO) {
|
||||
return CzgResult.success(shopStorageGoodService.edit(StpKit.USER.getShopId(), shopStorageGoodDTO));
|
||||
@@ -68,7 +68,7 @@ public class ShopStorageGoodController {
|
||||
* 添加存酒商品
|
||||
* @return 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "storageGood:add", name = "存酒商品新增")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "storageGood:add", name = "存酒商品新增")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated({InsertGroup.class}) ShopStorageGoodDTO shopStorageGoodDTO) {
|
||||
return CzgResult.success(shopStorageGoodService.saveInfo(StpKit.USER.getShopId(), shopStorageGoodDTO));
|
||||
@@ -78,7 +78,7 @@ public class ShopStorageGoodController {
|
||||
* 删除存酒商品
|
||||
* @return 列表
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "storageGood:del", name = "存酒商品删除")
|
||||
@SaAdminCheckPermission(parentName = "存酒相关", value = "storageGood:del", name = "存酒商品删除")
|
||||
@DeleteMapping
|
||||
public CzgResult<Boolean> del(@RequestParam Integer id) {
|
||||
return CzgResult.success(shopStorageGoodService.remove(new QueryWrapper().eq(ShopStorageGood::getShopId, StpKit.USER.getShopId()).eq(ShopStorageGood::getId, id)));
|
||||
|
||||
@@ -27,7 +27,7 @@ public class MiniAppPagesController {
|
||||
* 新增小程序页面
|
||||
*/
|
||||
@PostMapping
|
||||
@SaAdminCheckPermission(value = "miniAppPages:add", name = "小程序页面添加")
|
||||
@SaAdminCheckPermission(parentName = "小程序页面",value = "miniAppPages:add", name = "小程序页面添加")
|
||||
public CzgResult<Long> insertMiniAppPage(@RequestBody @Validated({InsertGroup.class}) MiniAppPagesDTO pagesDTO) {
|
||||
return miniAppPageService.insertMiniAppPage(pagesDTO);
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class MiniAppPagesController {
|
||||
* 修改小程序页面
|
||||
*/
|
||||
@PutMapping
|
||||
@SaAdminCheckPermission(value = "miniAppPages:update", name = "小程序页面修改")
|
||||
@SaAdminCheckPermission(parentName = "小程序页面",value = "miniAppPages:update", name = "小程序页面修改")
|
||||
public CzgResult<Boolean> updateMiniAppPage(@RequestBody @Validated({UpdateGroup.class}) MiniAppPagesDTO pagesDTO) {
|
||||
return miniAppPageService.updateMiniAppPage(pagesDTO);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class MiniAppPagesController {
|
||||
* @param id 小程序页面主键
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
@SaAdminCheckPermission(value = "miniAppPages:delete", name = "小程序页面删除")
|
||||
@SaAdminCheckPermission(parentName = "小程序页面",value = "miniAppPages:delete", name = "小程序页面删除")
|
||||
public CzgResult<Boolean> deleteMiniAppPage(@PathVariable Long id) {
|
||||
return miniAppPageService.deleteMiniAppPageById(id);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class MiniAppPagesController {
|
||||
* @param status 小程序页面状态 -1 查全部 1 启用 0 禁用
|
||||
*/
|
||||
@GetMapping("page")
|
||||
@SaAdminCheckPermission(value = "miniAppPages:page", name = "小程序页面分页")
|
||||
@SaAdminCheckPermission(parentName = "小程序页面",value = "miniAppPages:page", name = "小程序页面分页")
|
||||
public CzgResult<Page<MiniAppPagesDTO>> getMiniAppPage(String name, String path, Integer status) {
|
||||
return miniAppPageService.getMiniAppPage(name, path, status);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SysLogController {
|
||||
* @param param 参数
|
||||
* @return 分页信息
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "sysLog:list", name = "日志列表")
|
||||
@SaAdminCheckPermission(parentName = "日志管理",value = "sysLog:list", name = "日志列表")
|
||||
@GetMapping
|
||||
public CzgResult<Page<OperationLogDTO>> get(OperationLogDTO param) {
|
||||
return CzgResult.success(operationLogService.page(param));
|
||||
@@ -39,7 +39,7 @@ public class SysLogController {
|
||||
* 日志删除
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "sysLog:del", name = "日志删除")
|
||||
@SaAdminCheckPermission(parentName = "日志管理",value = "sysLog:del", name = "日志删除")
|
||||
@DeleteMapping
|
||||
public CzgResult<Boolean> del() {
|
||||
return CzgResult.success(operationLogService.remove(new QueryWrapper().eq(OperationLog::getShopId, StpKit.USER.getShopId())));
|
||||
|
||||
@@ -29,51 +29,55 @@ public class SysParamController {
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
@SaAdminCheckPermission(value = "sysParams:add", name = "新增参数")
|
||||
@SaAdminCheckPermission(parentName = "系统参数", value = "sysParams:add", name = "新增参数")
|
||||
public CzgResult<String> insertParams(@RequestBody @Validated({InsertGroup.class}) SysParamsDTO paramsDTO) {
|
||||
return sysParamsService.insertParams(paramsDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改参数
|
||||
*
|
||||
* @param paramsDTO 参数
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
@SaAdminCheckPermission(value = "sysParams:update", name = "修改参数")
|
||||
@SaAdminCheckPermission(parentName = "系统参数", value = "sysParams:update", name = "修改参数")
|
||||
public CzgResult<String> updateParams(@RequestBody @Validated({UpdateGroup.class}) SysParamsDTO paramsDTO) {
|
||||
return sysParamsService.updateParams(paramsDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除参数
|
||||
*
|
||||
* @param code 参数code
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("/{code}")
|
||||
@SaAdminCheckPermission(value = "sysParams:delete", name = "删除参数")
|
||||
@SaAdminCheckPermission(parentName = "系统参数", value = "sysParams:delete", name = "删除参数")
|
||||
public CzgResult<Boolean> deleteParams(@PathVariable String code) {
|
||||
return sysParamsService.deleteParams(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据参数编码获取参数
|
||||
* @param code 参数编码
|
||||
* @return 参数
|
||||
*
|
||||
* @param code 参数编码
|
||||
* @return 参数
|
||||
*/
|
||||
@GetMapping("/code/{code}")
|
||||
@SaAdminCheckPermission(value = "sysParams:get:code", name = "获取参数根据code")
|
||||
@SaAdminCheckPermission(parentName = "系统参数", value = "sysParams:get:code", name = "获取参数根据code")
|
||||
public CzgResult<SysParamsDTO> getParamByCode(@PathVariable String code) {
|
||||
return sysParamsService.getParamsByCode(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据参数类型获取参数列表
|
||||
* @param type 参数类型
|
||||
* @return 参数列表
|
||||
*
|
||||
* @param type 参数类型
|
||||
* @return 参数列表
|
||||
*/
|
||||
@GetMapping("/type/{type}")
|
||||
@SaAdminCheckPermission(value = "sysParams:get:type", name = "获取参数根据类型")
|
||||
@SaAdminCheckPermission(parentName = "系统参数", value = "sysParams:get:type", name = "获取参数根据类型")
|
||||
public CzgResult<List<SysParamsDTO>> getParamsByType(@PathVariable String type) {
|
||||
return sysParamsService.getParamsByType(Integer.valueOf(type));
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class VersionController {
|
||||
* @return Long id
|
||||
*/
|
||||
@PostMapping
|
||||
@SaAdminCheckPermission(value = "version:add", name = "版本添加")
|
||||
@SaAdminCheckPermission(parentName = "版本控制", value = "version:add", name = "版本添加")
|
||||
public CzgResult<Long> insertVersion(@RequestBody @Validated({InsertGroup.class}) VersionDTO versionDTO) {
|
||||
return versionService.insertVersion(versionDTO);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class VersionController {
|
||||
* @return Long id
|
||||
*/
|
||||
@PutMapping
|
||||
@SaAdminCheckPermission(value = "version:update", name = "版本修改")
|
||||
@SaAdminCheckPermission(parentName = "版本控制", value = "version:update", name = "版本修改")
|
||||
public CzgResult<Long> updateVersion(@RequestBody @Validated({UpdateGroup.class}) VersionDTO versionDTO) {
|
||||
return versionService.updateVersion(versionDTO);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class VersionController {
|
||||
* @return Long id
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
@SaAdminCheckPermission(value = "version:delete", name = "版本删除")
|
||||
@SaAdminCheckPermission(parentName = "版本控制", value = "version:delete", name = "版本删除")
|
||||
public CzgResult<Long> deleteVersion(@PathVariable Long id) {
|
||||
return versionService.deleteVersion(id);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ public class VersionController {
|
||||
* @return VersionDTO
|
||||
*/
|
||||
@GetMapping("/{source}/{type}")
|
||||
// @SaAdminCheckPermission(value = "version:get", name = "版本获取")
|
||||
// @SaAdminCheckPermission(parentName = "版本控制",value = "version:get", name = "版本获取")
|
||||
public CzgResult<VersionDTO> getVersionInfo(@PathVariable("source") String source, @PathVariable("type") String type) {
|
||||
return versionService.getVersionInfo(source, type);
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public class VersionController {
|
||||
* @return List<VersionDTO>
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@SaAdminCheckPermission(value = "version:getList", name = "版本列表")
|
||||
@SaAdminCheckPermission(parentName = "版本控制", value = "version:getList", name = "版本列表")
|
||||
public CzgResult<List<VersionDTO>> getVersionList() {
|
||||
return versionService.getVersionList();
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@ public class LoadingRole implements CommandLineRunner {
|
||||
Long menuId = menu1.getLong("menu_id");
|
||||
String title = menu1.getString("title");
|
||||
String url = menu1.getString("url");
|
||||
String type = menu1.getString("type");
|
||||
String method1 = menu1.getString("method");
|
||||
String permission = menu1.getString("permission");
|
||||
String pid = menu1.getString("pid");
|
||||
@@ -138,7 +139,7 @@ public class LoadingRole implements CommandLineRunner {
|
||||
log.info("接口菜单添加成功, 菜单名称: {}, 菜单权限: {}", title, permission);
|
||||
}
|
||||
|
||||
if (!title.equals(permissionName) || !fullPath.equals(url) || !httpMethod.equals(method1) || !parentId.equals(pid)) {
|
||||
if (!title.equals(permissionName) || !fullPath.equals(url) || !httpMethod.equals(method1) || !parentId.equals(pid) || !"3".equals(type)) {
|
||||
sql = "update sys_menu set title=?, url=?, method=?, pid=? where menu_id=?";
|
||||
Db.updateBySql(sql, permissionName, fullPath, httpMethod, parentId, menuId);
|
||||
log.info("接口菜单修改成功, 旧名称: {}, 新菜单名称: {}", title, permissionName);
|
||||
@@ -147,7 +148,7 @@ public class LoadingRole implements CommandLineRunner {
|
||||
}
|
||||
|
||||
sql = "INSERT INTO `czg_cashier`.`sys_menu` ( `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`, `active_menu`, `is_shop`, `url`, `method`, `pid`) VALUES " +
|
||||
"(0, 2, ?, NULL, '', 2, '', '', b'0', b'0', b'0', ?, NULL, NULL, ?, NULL, NULL, 0, ?, ?, ?);";
|
||||
"(0, 3, ?, NULL, '', 2, '', '', b'0', b'0', b'0', ?, NULL, NULL, ?, NULL, NULL, 0, ?, ?, ?);";
|
||||
Db.insertBySql(sql, StrUtil.isNotBlank(permissionName) ? permissionName : s, s, DateUtil.date(), fullPath, httpMethod, parentId);
|
||||
sql = "select * from sys_menu where permission=?";
|
||||
Row info = Db.selectOneBySql(sql, s);
|
||||
|
||||
Reference in New Issue
Block a user