Compare commits
6 Commits
0398b33eb3
...
4b5137900f
Author | SHA1 | Date | |
---|---|---|---|
|
4b5137900f | ||
|
a5c12582b9 | ||
|
1db874a37f | ||
|
42239d3990 | ||
|
a7bb425eb3 | ||
|
5de142a5b9 |
@ -11,8 +11,12 @@ 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 cn.iocoder.yudao.module.order.entity.RepairOrderInfo;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@ -40,6 +44,8 @@ public class CustomerMainApi {
|
||||
private MemberLevelService levelService;
|
||||
@Resource
|
||||
private CustomerActiveService activeService;
|
||||
@Resource
|
||||
private ActiveMainService activeMainService;
|
||||
|
||||
/**
|
||||
* 查询当前登录客户信息
|
||||
@ -83,8 +89,31 @@ public class CustomerMainApi {
|
||||
**/
|
||||
@PostMapping("/attendActive")
|
||||
@Operation(summary = "参加活动")
|
||||
public CommonResult<Boolean> attendActive(@RequestBody CustomerActiveSaveReqVO createReqVO) {
|
||||
activeService.attendActive(createReqVO);
|
||||
return success(true);
|
||||
public CommonResult<RepairOrderInfo> attendActive(@RequestBody CustomerActiveSaveReqVO createReqVO) {
|
||||
RepairOrderInfo orderInfo = activeService.attendActive(createReqVO);
|
||||
return success(orderInfo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@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));
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public class CustomerActiveServiceImpl extends ServiceImpl<CustomerActiveMapper,
|
||||
orderInfo.setOrderNo(System.currentTimeMillis() + Math.abs(item.getId().hashCode() % 1000) + "");
|
||||
orderInfo.setGoodsId(item.getId());
|
||||
orderInfo.setActiveId(active.getId());
|
||||
orderInfo.setGoodsTitle(active.getName());
|
||||
orderInfo.setGoodsTitle(item.getName());
|
||||
orderInfo.setTenantName(ORDER_TENANT_NAME);
|
||||
orderInfo.setGoodsType(ORDER_KKYL);
|
||||
orderInfo.setUserId(customer.getUserId());
|
||||
|
@ -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) {
|
||||
|
@ -223,6 +223,7 @@ yudao:
|
||||
- /admin-api/system/config/configKey/**
|
||||
- /websocket/**
|
||||
- /userClient/pay/**
|
||||
- /userClient/banner/list
|
||||
- /userClient/weChat/**
|
||||
- /admin-api/websocket/**
|
||||
- /admin-api/rescue/wxLoginRescue
|
||||
|
Loading…
Reference in New Issue
Block a user