Merge branch 'prod' into test

This commit is contained in:
2025-12-18 13:50:57 +08:00
13 changed files with 56 additions and 67 deletions

View File

@@ -34,7 +34,7 @@ public class RoleController {
* @param pageDTO 分页信息
* @return 分页数据
*/
@SaAdminCheckPermission(parentName = "角色管理", 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));
@@ -48,10 +48,10 @@ public class RoleController {
* @param type 0管理端 1收银机
* @return 分页数据
*/
@SaAdminCheckPermission(parentName = "角色管理", 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));
return CzgResult.success(roleService.getRoleMenu(StpKit.USER.getShopId(), id, type));
}
/**
@@ -61,7 +61,7 @@ public class RoleController {
* @param roleAddDTO 角色信息
* @return 是否成功
*/
@SaAdminCheckPermission(parentName = "角色管理", 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));
@@ -75,7 +75,7 @@ public class RoleController {
*/
@PutMapping("/permission")
public CzgResult<Boolean> editPermission(@RequestBody @Validated RolePermissionDTO rolePermissionDTO) {
return CzgResult.success(roleService.editPermission(StpKit.USER.getLoginIdAsLong(), rolePermissionDTO));
return CzgResult.success(roleService.editPermission(StpKit.USER.getShopId(), rolePermissionDTO));
}
/**
@@ -85,7 +85,7 @@ public class RoleController {
* @param roleEditDTO 角色信息
* @return 是否成功
*/
@SaAdminCheckPermission(parentName = "角色管理", 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));
@@ -98,7 +98,7 @@ public class RoleController {
* @param roleRemoveDTO 角色信息
* @return 是否成功
*/
@SaAdminCheckPermission(parentName = "角色管理", value = "role:remove", name = "角色删除")
@SaAdminCheckPermission(parentName = "角色管理接口", value = "role:remove", name = "角色删除")
@DeleteMapping
public CzgResult<Boolean> remove(@RequestBody @Validated RoleRemoveDTO roleRemoveDTO) {
if (roleRemoveDTO.id() == 1L || roleRemoveDTO.id() == 2L) {

View File

@@ -38,7 +38,7 @@ public class ShopInfoController {
* 权限标识: shopInfo:list
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(parentName = "店铺管理", 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));
@@ -71,7 +71,7 @@ public class ShopInfoController {
* 权限标识: shopInfo:add
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(parentName = "店铺管理", value = "shopInfo:add", name = "店铺添加")
@SaAdminCheckPermission(parentName = "店铺管理接口", value = "shopInfo:add", name = "店铺添加")
@PostMapping
public CzgResult<?> add(@RequestBody @Validated ShopInfoAddDTO shopInfoAddDTO) {
return CzgResult.success(shopInfoService.add(shopInfoAddDTO));
@@ -81,7 +81,7 @@ public class ShopInfoController {
* 店铺编辑
* 权限标识: shopInfo:edit
*/
@SaAdminCheckPermission(parentName = "店铺管理", value = "shopInfo:edit", name = "店铺编辑")
@SaAdminCheckPermission(parentName = "店铺管理接口", value = "shopInfo:edit", name = "店铺编辑")
@PutMapping
public CzgResult<?> edit(@RequestBody @Validated ShopInfoEditDTO shopInfoEditDTO) {
return CzgResult.success(shopInfoService.edit(shopInfoEditDTO));
@@ -92,7 +92,7 @@ public class ShopInfoController {
* 权限标识: shopInfo:del
*/
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(parentName = "店铺管理", 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)));