1
This commit is contained in:
parent
90d46c0cc7
commit
5de142a5b9
@ -11,7 +11,10 @@ import cn.iocoder.yudao.module.custom.service.CustomerMainService;
|
||||
import cn.iocoder.yudao.module.custom.vo.CustomerActiveSaveReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO;
|
||||
import cn.iocoder.yudao.module.member.entity.MemberLevel;
|
||||
import cn.iocoder.yudao.module.member.service.ActiveMainService;
|
||||
import cn.iocoder.yudao.module.member.service.MemberLevelService;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveMainPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveMainRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelPageReqVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@ -40,6 +43,8 @@ public class CustomerMainApi {
|
||||
private MemberLevelService levelService;
|
||||
@Resource
|
||||
private CustomerActiveService activeService;
|
||||
@Resource
|
||||
private ActiveMainService activeMainService;
|
||||
|
||||
/**
|
||||
* 查询当前登录客户信息
|
||||
@ -87,4 +92,27 @@ public class CustomerMainApi {
|
||||
activeService.attendActive(createReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getActive")
|
||||
@Operation(summary = "获得营销活动")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<ActiveMainRespVO> getActiveMain(@RequestParam("id") String id) {
|
||||
ActiveMainRespVO activeMain = activeMainService.getActiveMain(id,false);
|
||||
return success(activeMain);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @author PQZ
|
||||
* @date 16:12 2024/9/23
|
||||
* @param pageReqVO ActiveMainPageReqVO实体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<com.baomidou.mybatisplus.core.metadata.IPage<?>>
|
||||
**/
|
||||
@GetMapping("/activeList")
|
||||
@Operation(summary = "可参与营销活动")
|
||||
public CommonResult<List<?>> getActiveMainPage(ActiveMainPageReqVO pageReqVO) {
|
||||
return success(activeService.isJoinActive(pageReqVO));
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ public class CustomerActiveController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除用户参与活动记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:customer-active:delete')")
|
||||
public CommonResult<Boolean> deleteCustomerActive(@RequestParam("id") String id) {
|
||||
customerActiveService.deleteCustomerActive(id);
|
||||
return success(true);
|
||||
@ -60,7 +59,6 @@ public class CustomerActiveController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得用户参与活动记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:customer-active:query')")
|
||||
public CommonResult<CustomerActiveRespVO> getCustomerActive(@RequestParam("id") String id) {
|
||||
CustomerActive customerActive = customerActiveService.getCustomerActive(id);
|
||||
return success(BeanUtils.toBean(customerActive, CustomerActiveRespVO.class));
|
||||
@ -68,7 +66,6 @@ public class CustomerActiveController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户参与活动记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:customer-active:query')")
|
||||
public CommonResult<PageResult<CustomerActiveRespVO>> getCustomerActivePage(@Valid CustomerActivePageReqVO pageReqVO) {
|
||||
PageResult<CustomerActive> pageResult = customerActiveService.getCustomerActivePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CustomerActiveRespVO.class));
|
||||
@ -84,7 +81,6 @@ public class CustomerActiveController {
|
||||
**/
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "可参与营销活动")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-main:query')")
|
||||
public CommonResult<List<?>> getActiveMainPage(ActiveMainPageReqVO pageReqVO) {
|
||||
return success(customerActiveService.isJoinActive(pageReqVO));
|
||||
}
|
||||
|
@ -42,7 +42,6 @@ public class ActiveMainController {
|
||||
**/
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建营销活动")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-main:create')")
|
||||
public CommonResult<Boolean> createActiveMain(@Valid @RequestBody ActiveMainSaveReqVO createReqVO) {
|
||||
activeMainService.saveActiveMain(createReqVO);
|
||||
return success(true);
|
||||
@ -58,7 +57,6 @@ public class ActiveMainController {
|
||||
**/
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新营销活动")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-main:update')")
|
||||
public CommonResult<Boolean> updateActiveMain(@Valid @RequestBody ActiveMainSaveReqVO updateReqVO) {
|
||||
activeMainService.saveActiveMain(updateReqVO);
|
||||
return success(true);
|
||||
@ -75,7 +73,6 @@ public class ActiveMainController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除营销活动")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('member:active-main:delete')")
|
||||
public CommonResult<Boolean> deleteActiveMain(@RequestParam("id") String id) {
|
||||
activeMainService.deleteActiveMain(id);
|
||||
return success(true);
|
||||
@ -92,10 +89,9 @@ public class ActiveMainController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得营销活动")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-main:query')")
|
||||
public CommonResult<ActiveMainRespVO> getActiveMain(@RequestParam("id") String id) {
|
||||
ActiveMain activeMain = activeMainService.getActiveMain(id,false);
|
||||
return success(BeanUtils.toBean(activeMain, ActiveMainRespVO.class));
|
||||
ActiveMainRespVO activeMain = activeMainService.getActiveMain(id,false);
|
||||
return success(activeMain);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -108,7 +104,6 @@ public class ActiveMainController {
|
||||
**/
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得营销活动分页")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-main:query')")
|
||||
public CommonResult<IPage<?>> getActiveMainPage(ActiveMainPageReqVO pageReqVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
|
@ -3,7 +3,7 @@ spring:
|
||||
name: yudao-server
|
||||
|
||||
profiles:
|
||||
active: prod
|
||||
active: local
|
||||
|
||||
main:
|
||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
||||
|
Loading…
Reference in New Issue
Block a user