优惠券 出入
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user