店铺签约
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import com.czg.account.dto.PageDTO;
|
||||
import com.czg.account.dto.register.MerchantRegisterDTO;
|
||||
import com.czg.account.entity.MerchantRegister;
|
||||
import com.czg.account.service.MerchantRegisterService;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.annotation.SaAdminCheckRole;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 激活码管理
|
||||
* @author Administrator
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/merchantRegister")
|
||||
public class MerchantRegisterController {
|
||||
@Resource
|
||||
private MerchantRegisterService merchantRegisterService;
|
||||
|
||||
|
||||
/**
|
||||
* 激活码列表
|
||||
* 权限标识: merchantRegister:list
|
||||
* @param pageDTO 分页参数
|
||||
* @param state 状态 0未激活 1已激活
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 激活码列表
|
||||
*/
|
||||
@SaAdminCheckRole("管理员")
|
||||
@SaAdminCheckPermission(parentName = "激活码", value = "merchantRegister:list", name = "激活码列表")
|
||||
@GetMapping
|
||||
public CzgResult<Page<MerchantRegister>> get(PageDTO pageDTO, Integer state, String startTime, String endTime) {
|
||||
return CzgResult.success(merchantRegisterService.get(pageDTO, state, startTime, endTime));
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成激活码
|
||||
* 权限标识: merchantRegister:add
|
||||
* @param merchantRegisterDTO 激活码信息
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaAdminCheckRole("管理员")
|
||||
@SaAdminCheckPermission(parentName = "激活码", value = "merchantRegister:add", name = "生成激活码")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated MerchantRegisterDTO merchantRegisterDTO) {
|
||||
return CzgResult.success(merchantRegisterService.add(merchantRegisterDTO));
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,10 @@ import com.czg.account.dto.shopinfo.ShopBranchSelectDTO;
|
||||
import com.czg.account.dto.shopinfo.ShopDetailDTO;
|
||||
import com.czg.account.dto.shopinfo.ShopInfoAddDTO;
|
||||
import com.czg.account.dto.shopinfo.ShopInfoEditDTO;
|
||||
import com.czg.account.entity.ShopRegister;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
import com.czg.account.service.AuthorizationService;
|
||||
import com.czg.account.service.ShopRegisterService;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.annotation.SaAdminCheckRole;
|
||||
@@ -32,6 +34,8 @@ public class ShopInfoController {
|
||||
private ShopInfoService shopInfoService;
|
||||
@Resource
|
||||
private AuthorizationService authorizationService;
|
||||
@Resource
|
||||
private ShopRegisterService shopRegisterService;
|
||||
|
||||
/**
|
||||
* 店铺列表, 只允许管理员调用
|
||||
@@ -118,4 +122,17 @@ public class ShopInfoController {
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 续期记录
|
||||
*
|
||||
* @param pageDTO 分页参数
|
||||
* @return 续期记录列表
|
||||
*/
|
||||
@SaAdminCheckRole("管理员")
|
||||
@GetMapping("/registerRecord")
|
||||
public CzgResult<Page<ShopRegister>> get(PageDTO pageDTO, Long shopId) {
|
||||
Page<ShopRegister> page = shopRegisterService.page(new Page<>(pageDTO.page(), pageDTO.size()),
|
||||
new QueryWrapper().eq(ShopRegister::getShopId, shopId).orderBy(ShopRegister::getCreateTime, false));
|
||||
return CzgResult.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user