商品统计

This commit is contained in:
Tankaikai
2025-03-14 14:18:46 +08:00
parent e08b220bc7
commit 9ad6b7b89c
3 changed files with 41 additions and 6 deletions

View File

@@ -3,11 +3,14 @@ package com.czg.controller.admin;
import com.czg.account.dto.msg.ShopMsgEditDTO;
import com.czg.account.dto.msg.ShopPushOpenIdEditDTO;
import com.czg.account.entity.ShopPushOpenId;
import com.czg.account.param.ShopPushConfigParam;
import com.czg.account.service.ShopMsgStateService;
import com.czg.account.service.ShopPushOpenIdService;
import com.czg.annotation.SaAdminCheckPermission;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import com.czg.validator.ValidatorUtil;
import com.czg.validator.group.DefaultGroup;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import jakarta.annotation.Resource;
@@ -16,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
/**
* 店铺消息推送相关
*
* @author Administrator
*/
@RestController
@@ -37,6 +41,7 @@ public class ShopMsgPushController {
/**
* 店铺推送状态修改
*
* @param shopMsgEditDTO 修改嘻嘻你
* @return 是否成功
*/
@@ -48,6 +53,7 @@ public class ShopMsgPushController {
/**
* 订阅用户列表
*
* @return 分页数据
*/
@SaAdminCheckPermission(value = "shopMsgPush:list", name = "订阅用户列表")
@@ -58,6 +64,7 @@ public class ShopMsgPushController {
/**
* 订阅解绑
*
* @param openId 唯一推送标识
* @return 是否成功
*/
@@ -69,6 +76,7 @@ public class ShopMsgPushController {
/**
* 推送状态修改
*
* @param shopPushOpenIdEditDTO 修改信息
* @return 是否成功
*/
@@ -80,6 +88,7 @@ public class ShopMsgPushController {
/**
* 获取订阅二维码
*
* @return 二维码信息
* @throws Exception 异常
*/
@@ -88,4 +97,16 @@ public class ShopMsgPushController {
public CzgResult<String> getCoed() throws Exception {
return CzgResult.success(shopMsgStateService.getCode(StpKit.USER.getShopId()));
}
/**
* 配置订阅消息类型
*/
@SaAdminCheckPermission(value = "shopMsgPush:config", name = "配置订阅消息类型")
@PostMapping("/config")
public CzgResult<String> config(@RequestBody ShopPushConfigParam param) {
ValidatorUtil.validateEntity(param, DefaultGroup.class);
shopMsgStateService.modifyConfig(param);
return CzgResult.success();
}
}