优惠券 出入

This commit is contained in:
2025-02-17 14:51:26 +08:00
parent 00f83f0e2d
commit ef3cbe85b1
34 changed files with 1224 additions and 24 deletions

View File

@@ -0,0 +1,54 @@
package com.czg.controller.admin;
import com.czg.account.dto.ShopActivateDTO;
import com.czg.account.service.ShopActivateService;
import com.czg.annotation.SaAdminCheckPermission;
import com.czg.resp.CzgResult;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 店铺充值活动管理
* @author ww
* @description
*/
@RestController
@RequestMapping("/admin/activate")
public class ShopActivateController {
@Resource
private ShopActivateService shopActivateService;
/**
* 店铺充值活动列表
* 权限标识: activate:list
*/
@SaAdminCheckPermission("activate:list")
@GetMapping
public CzgResult<List<ShopActivateDTO>> detail() {
return CzgResult.success(shopActivateService.getList());
}
/**
* 店铺充值活动新增
* 权限标识: activate:add
*/
@SaAdminCheckPermission("activate:add")
@PutMapping
public CzgResult<Boolean> add(@RequestBody @Validated ShopActivateDTO activateDTO) {
return CzgResult.success(shopActivateService.add(activateDTO));
}
/**
* 店铺充值活动修改
* 权限标识: activate:edit
*/
@SaAdminCheckPermission("activate:edit")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopActivateDTO activateDTO) {
return CzgResult.success(shopActivateService.edit(activateDTO));
}
}

View File

@@ -0,0 +1,20 @@
package com.czg.controller.admin;
import com.czg.account.service.ShopCouponService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author ww
* @description
*/
@RestController
@RequestMapping("/admin/coupon")
public class ShopCouponController {
@Resource
private ShopCouponService couponService;
}

View File

@@ -0,0 +1,31 @@
package com.czg.controller.user;
import com.czg.account.dto.ShopActivateDTO;
import com.czg.account.service.ShopActivateService;
import com.czg.resp.CzgResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 店铺充值活动管理
* @author ww
*/
@RestController
@RequestMapping("/user/activate")
public class UserShopActivateController {
@Resource
private ShopActivateService shopActivateService;
/**
* 店铺充值活动列表
*/
@GetMapping
public CzgResult<List<ShopActivateDTO>> detail() {
return CzgResult.success(shopActivateService.getList());
}
}