Compare commits

..

No commits in common. "4b5137900f4144346c6cd491e42a12dbfd4691a4" and "0398b33eb3d6736712f57101d93466d17dd17e82" have entirely different histories.

5 changed files with 15 additions and 36 deletions

View File

@ -11,12 +11,8 @@ 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;
@ -44,8 +40,6 @@ public class CustomerMainApi {
private MemberLevelService levelService;
@Resource
private CustomerActiveService activeService;
@Resource
private ActiveMainService activeMainService;
/**
* 查询当前登录客户信息
@ -89,31 +83,8 @@ public class CustomerMainApi {
**/
@PostMapping("/attendActive")
@Operation(summary = "参加活动")
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));
public CommonResult<Boolean> attendActive(@RequestBody CustomerActiveSaveReqVO createReqVO) {
activeService.attendActive(createReqVO);
return success(true);
}
}

View File

@ -51,6 +51,7 @@ 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);
@ -59,6 +60,7 @@ 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));
@ -66,6 +68,7 @@ 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));
@ -81,6 +84,7 @@ 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));
}

View File

@ -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(item.getName());
orderInfo.setGoodsTitle(active.getName());
orderInfo.setTenantName(ORDER_TENANT_NAME);
orderInfo.setGoodsType(ORDER_KKYL);
orderInfo.setUserId(customer.getUserId());

View File

@ -42,6 +42,7 @@ 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);
@ -57,6 +58,7 @@ 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);
@ -73,6 +75,7 @@ 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);
@ -89,9 +92,10 @@ 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) {
ActiveMainRespVO activeMain = activeMainService.getActiveMain(id,false);
return success(activeMain);
ActiveMain activeMain = activeMainService.getActiveMain(id,false);
return success(BeanUtils.toBean(activeMain, ActiveMainRespVO.class));
}
/**
@ -104,6 +108,7 @@ 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) {

View File

@ -223,7 +223,6 @@ yudao:
- /admin-api/system/config/configKey/**
- /websocket/**
- /userClient/pay/**
- /userClient/banner/list
- /userClient/weChat/**
- /admin-api/websocket/**
- /admin-api/rescue/wxLoginRescue