接口目录
This commit is contained 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) {
|
||||
|
||||
Reference in New Issue
Block a user