权限注解增加备注
This commit is contained in:
parent
a6766590cc
commit
5af5fc689b
|
|
@ -46,7 +46,7 @@ public class MerchantRegisterController {
|
|||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckRole("管理员")
|
||||
@SaAdminCheckPermission("merchantRegister:add")
|
||||
@SaAdminCheckPermission(value = "merchantRegister:add", name = "生成激活码")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated MerchantRegisterDTO merchantRegisterDTO) {
|
||||
return CzgResult.success(merchantRegisterService.add(merchantRegisterDTO));
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class RoleController {
|
|||
* @param pageDTO 分页信息
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "role:list")
|
||||
@SaAdminCheckPermission(value = "role:list", name = "角色列表")
|
||||
@GetMapping("/list")
|
||||
public CzgResult<Page<SysRole>> getList(PageDTO pageDTO, String key, String startTime, String endTime) {
|
||||
return CzgResult.success(roleService.getList(pageDTO, key, startTime, endTime));
|
||||
|
|
@ -46,7 +46,7 @@ public class RoleController {
|
|||
* @param id 角色id
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "role:menu")
|
||||
@SaAdminCheckPermission(value = "role:menu", name = "角色菜单")
|
||||
@GetMapping("/menu")
|
||||
public CzgResult<List<Long>> getRoleMenu(@RequestParam Integer id) {
|
||||
return CzgResult.success(roleService.getRoleMenu(StpKit.USER.getLoginIdAsLong(), id));
|
||||
|
|
@ -58,7 +58,7 @@ public class RoleController {
|
|||
* @param roleAddDTO 角色信息
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "role:add")
|
||||
@SaAdminCheckPermission(value = "role:add", name = "角色添加")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated RoleAddDTO roleAddDTO) {
|
||||
return CzgResult.success(roleService.add(roleAddDTO));
|
||||
|
|
@ -70,7 +70,7 @@ public class RoleController {
|
|||
* @param roleEditDTO 角色信息
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "role:edit")
|
||||
@SaAdminCheckPermission(value = "role:edit", name = "角色编辑")
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated RoleEditDTO roleEditDTO) {
|
||||
return CzgResult.success(roleService.edit(roleEditDTO));
|
||||
|
|
@ -82,7 +82,7 @@ public class RoleController {
|
|||
* @param roleRemoveDTO 角色信息
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission(value = "role:remove")
|
||||
@SaAdminCheckPermission(value = "role:remove", name = "角色删除")
|
||||
@DeleteMapping
|
||||
public CzgResult<Boolean> remove(@RequestBody @Validated RoleRemoveDTO roleRemoveDTO) {
|
||||
return CzgResult.success(roleService.removeById(roleRemoveDTO.id()));
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class ShopCouponController {
|
|||
* 权限标识: coupon:list
|
||||
* 状态 0 未使用 1已使用 2已过期
|
||||
*/
|
||||
@SaAdminCheckPermission("coupon:list")
|
||||
@SaAdminCheckPermission(value = "coupon:list", name = "优惠券列表")
|
||||
@GetMapping
|
||||
public CzgResult<List<ShopCouponDTO>> detail(@RequestParam(required = false) Integer type,
|
||||
@RequestParam(required = false) Integer status) {
|
||||
|
|
@ -44,7 +44,7 @@ public class ShopCouponController {
|
|||
* 店铺优惠券新增
|
||||
* 权限标识: coupon:add
|
||||
*/
|
||||
@SaAdminCheckPermission("coupon:add")
|
||||
@SaAdminCheckPermission(value = "coupon:add", name = "优惠券添加")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated ShopCouponDTO couponDTO) {
|
||||
couponDTO.setShopId(StpKit.USER.getShopId());
|
||||
|
|
@ -55,7 +55,7 @@ public class ShopCouponController {
|
|||
* 店铺优惠券修改
|
||||
* 权限标识: coupon:edit
|
||||
*/
|
||||
@SaAdminCheckPermission("coupon:edit")
|
||||
@SaAdminCheckPermission(value = "coupon:edit", name = "优惠券修改")
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopCouponDTO couponDTO) {
|
||||
couponDTO.setShopId(StpKit.USER.getShopId());
|
||||
|
|
@ -66,7 +66,7 @@ public class ShopCouponController {
|
|||
* 店铺优惠券获取记录
|
||||
* 权限标识: coupon:delete
|
||||
*/
|
||||
@SaAdminCheckPermission("coupon:queryReceive")
|
||||
@SaAdminCheckPermission(value = "coupon:queryReceive", name = "优惠券领取记录")
|
||||
@GetMapping("/queryReceive")
|
||||
public CzgResult<Page<CouponReceiveVo>> queryReceive(@Validated QueryReceiveDto param) {
|
||||
return CzgResult.success(couponService.queryReceive(param));
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class ShopMsgPushController {
|
|||
/**
|
||||
* 店铺推送状态获取
|
||||
*/
|
||||
@SaAdminCheckPermission("shopMsgPush:state:list")
|
||||
@SaAdminCheckPermission(value = "shopMsgPush:state:list", name = "店铺推送状态获取")
|
||||
@GetMapping("/shopState")
|
||||
public CzgResult<?> get() {
|
||||
return CzgResult.success(shopMsgStateService.getState(StpKit.USER.getShopId()));
|
||||
|
|
@ -40,7 +40,7 @@ public class ShopMsgPushController {
|
|||
* @param shopMsgEditDTO 修改嘻嘻你
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission("shopMsgPush:state:edit")
|
||||
@SaAdminCheckPermission(value = "shopMsgPush:state:edit", name = "店铺推送状态修改")
|
||||
@PutMapping("/shopState")
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopMsgEditDTO shopMsgEditDTO) {
|
||||
return CzgResult.success(shopMsgStateService.edit(StpKit.USER.getShopId(), shopMsgEditDTO));
|
||||
|
|
@ -50,7 +50,7 @@ public class ShopMsgPushController {
|
|||
* 订阅用户列表
|
||||
* @return 分页数据
|
||||
*/
|
||||
@SaAdminCheckPermission("shopMsgPush:list")
|
||||
@SaAdminCheckPermission(value = "shopMsgPush:list", name = "订阅用户列表")
|
||||
@GetMapping
|
||||
public CzgResult<Page<ShopPushOpenId>> allInfo() {
|
||||
return CzgResult.success(shopPushOpenIdService.pageInfo(StpKit.USER.getShopId()));
|
||||
|
|
@ -61,7 +61,7 @@ public class ShopMsgPushController {
|
|||
* @param openId 唯一推送标识
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission("shopMsgPush:del")
|
||||
@SaAdminCheckPermission(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)));
|
||||
|
|
@ -72,7 +72,7 @@ public class ShopMsgPushController {
|
|||
* @param shopPushOpenIdEditDTO 修改信息
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckPermission("shopMsgPush:edit")
|
||||
@SaAdminCheckPermission(value = "shopMsgPush:edit", name = "推送状态修改")
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopPushOpenIdEditDTO shopPushOpenIdEditDTO) {
|
||||
return CzgResult.success(shopPushOpenIdService.edit(StpKit.USER.getShopId(), shopPushOpenIdEditDTO));
|
||||
|
|
@ -83,7 +83,7 @@ public class ShopMsgPushController {
|
|||
* @return 二维码信息
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
@SaAdminCheckPermission("shopMsgPush:code")
|
||||
@SaAdminCheckPermission(value = "shopMsgPush:code", name = "获取订阅二维码")
|
||||
@GetMapping("/code")
|
||||
public CzgResult<String> getCoed() throws Exception {
|
||||
return CzgResult.success(shopMsgStateService.getCode(StpKit.USER.getShopId()));
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class ShopUserController {
|
|||
* @param isVip 0 非vip 1 vip
|
||||
* @return 概述信息
|
||||
*/
|
||||
@SaAdminCheckPermission("shopUser:summary")
|
||||
@SaAdminCheckPermission(value = "shopUser:summary", name = "店铺用户概述信息")
|
||||
@GetMapping("/summary")
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
public CzgResult<ShopUserSummaryDTO> summary(Integer isVip) {
|
||||
|
|
@ -63,7 +63,7 @@ public class ShopUserController {
|
|||
* adminOut管理员消费
|
||||
* @return 充值记录
|
||||
*/
|
||||
@SaAdminCheckPermission("shopUser:flow")
|
||||
@SaAdminCheckPermission(value = "shopUser:flow", name = "店铺用户充值记录")
|
||||
@GetMapping("/flow")
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
public CzgResult<Page<ShopUserFlow>> flow(@RequestParam Integer userId, String bizCode) {
|
||||
|
|
@ -83,7 +83,7 @@ public class ShopUserController {
|
|||
* @return 用户列表
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission("shopUser:list")
|
||||
@SaAdminCheckPermission(value = "shopUser:list", name = "店铺用户列表")
|
||||
@GetMapping
|
||||
public CzgResult<Page<ShopUser>> list(String key, Integer isVip) {
|
||||
return CzgResult.success(shopUserService.getPage(key, isVip));
|
||||
|
|
@ -96,7 +96,7 @@ public class ShopUserController {
|
|||
* @return 用户详情
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission("shopUser:detail")
|
||||
@SaAdminCheckPermission(value = "shopUser:detail", name = "店铺用户详情")
|
||||
@GetMapping("/detail")
|
||||
public CzgResult<ShopUser> detail(Integer id, Integer userId) {
|
||||
if (id == null && userId == null) {
|
||||
|
|
@ -111,7 +111,7 @@ public class ShopUserController {
|
|||
* @return 是否成功
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission("shopUser:add")
|
||||
@SaAdminCheckPermission(value = "shopUser:add", name = "店铺用户添加")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) {
|
||||
return CzgResult.success(shopUserService.add(StpKit.USER.getShopId(), shopUserAddDTO));
|
||||
|
|
@ -123,7 +123,7 @@ public class ShopUserController {
|
|||
* @return 是否成功
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission("shopUser:edit")
|
||||
@SaAdminCheckPermission(value = "shopUser:edit", name = "店铺用户修改")
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopUserEditDTO shopUserEditDTO) {
|
||||
return CzgResult.success(shopUserService.updateInfo(StpKit.USER.getShopId(), shopUserEditDTO));
|
||||
|
|
@ -135,7 +135,7 @@ public class ShopUserController {
|
|||
* @return 是否成功
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_xiu_gai_hui_yuan_yu_e")
|
||||
@SaAdminCheckPermission("shopUser:editFlow")
|
||||
@SaAdminCheckPermission(value = "shopUser:editFlow", name = "店铺用户余额修改")
|
||||
@PutMapping("/money")
|
||||
public CzgResult<Boolean> editMoney(@RequestBody @Validated ShopUserMoneyEditDTO shopUserMoneyEditDTO) {
|
||||
shopUserMoneyEditDTO.setBizEnum(ShopUserFlowBizEnum.ADMIN_IN);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.czg.controller;
|
|||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.czg.CzgPayUtils;
|
||||
import com.czg.entity.CzgBaseRespParams;
|
||||
import com.czg.mq.PrintMqListener;
|
||||
import com.czg.order.service.OrderInfoService;
|
||||
import com.czg.task.StatisticTask;
|
||||
import com.czg.utils.AssertUtil;
|
||||
|
|
@ -10,6 +11,7 @@ import jakarta.annotation.Resource;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
|
|
@ -47,8 +49,10 @@ public class NotifyController {
|
|||
return SUCCESS;
|
||||
}
|
||||
|
||||
@Resource
|
||||
private PrintMqListener printMqListener;
|
||||
@RequestMapping("/test")
|
||||
public void test() {
|
||||
statisticTask.run();
|
||||
public void test(@RequestParam String id) {
|
||||
printMqListener.orderPrint(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public class MiniAppPagesController {
|
|||
* 新增小程序页面
|
||||
*/
|
||||
@PostMapping
|
||||
@SaAdminCheckPermission("miniAppPages:add")
|
||||
@SaAdminCheckPermission(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("miniAppPages:update")
|
||||
@SaAdminCheckPermission(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("miniAppPages:delete")
|
||||
@SaAdminCheckPermission(value = "miniAppPages:delete", name = "小程序页面删除")
|
||||
public CzgResult<Boolean> deleteMiniAppPage(@PathVariable Long id) {
|
||||
return miniAppPageService.deleteMiniAppPageById(id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class SysParamController {
|
|||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
@SaAdminCheckPermission("sysParams:add")
|
||||
@SaAdminCheckPermission(value = "sysParams:add", name = "新增参数")
|
||||
public CzgResult<String> insertParams(@RequestBody @Validated({InsertGroup.class}) SysParamsDTO paramsDTO) {
|
||||
return sysParamsService.insertParams(paramsDTO);
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ public class SysParamController {
|
|||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
@SaAdminCheckPermission("sysParams:update")
|
||||
@SaAdminCheckPermission(value = "sysParams:update", name = "修改参数")
|
||||
public CzgResult<String> updateParams(@RequestBody @Validated({UpdateGroup.class}) SysParamsDTO paramsDTO) {
|
||||
return sysParamsService.updateParams(paramsDTO);
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ public class SysParamController {
|
|||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("/{code}")
|
||||
@SaAdminCheckPermission("sysParams:delete")
|
||||
@SaAdminCheckPermission(value = "sysParams:delete", name = "删除参数")
|
||||
public CzgResult<Boolean> deleteParams(@PathVariable String code) {
|
||||
return sysParamsService.deleteParams(code);
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ public class SysParamController {
|
|||
* @return 参数
|
||||
*/
|
||||
@GetMapping("/code/{code}")
|
||||
@SaAdminCheckPermission("sysParams:get:code")
|
||||
@SaAdminCheckPermission(value = "sysParams:get:code", name = "获取参数根据code")
|
||||
public CzgResult<SysParamsDTO> getParamByCode(@PathVariable String code) {
|
||||
return sysParamsService.getParamsByCode(code);
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ public class SysParamController {
|
|||
* @return 参数列表
|
||||
*/
|
||||
@GetMapping("/type/{type}")
|
||||
@SaAdminCheckPermission("sysParams:get:type")
|
||||
@SaAdminCheckPermission(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("version:add")
|
||||
@SaAdminCheckPermission(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("version:update")
|
||||
@SaAdminCheckPermission(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("version:delete")
|
||||
@SaAdminCheckPermission(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("version:get")
|
||||
@SaAdminCheckPermission(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("version:getList")
|
||||
@SaAdminCheckPermission(value = "version:getList", name = "版本列表")
|
||||
public CzgResult<List<VersionDTO>> getVersionList() {
|
||||
return versionService.getVersionList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue