Compare commits

...

6 Commits

Author SHA1 Message Date
PQZ
4b5137900f 1 2024-09-27 19:42:02 +08:00
PQZ
a5c12582b9 Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-system 2024-09-27 17:56:57 +08:00
PQZ
1db874a37f 1 2024-09-27 17:56:54 +08:00
PQZ
42239d3990 1 2024-09-27 17:46:41 +08:00
PQZ
a7bb425eb3 Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-system 2024-09-27 17:38:39 +08:00
PQZ
5de142a5b9 1 2024-09-27 17:38:36 +08:00
5 changed files with 36 additions and 15 deletions

View File

@ -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.CustomerActiveSaveReqVO;
import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO;
import cn.iocoder.yudao.module.member.entity.MemberLevel; 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.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.member.vo.MemberLevelPageReqVO;
import cn.iocoder.yudao.module.order.entity.RepairOrderInfo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
@ -40,6 +44,8 @@ public class CustomerMainApi {
private MemberLevelService levelService; private MemberLevelService levelService;
@Resource @Resource
private CustomerActiveService activeService; private CustomerActiveService activeService;
@Resource
private ActiveMainService activeMainService;
/** /**
* 查询当前登录客户信息 * 查询当前登录客户信息
@ -83,8 +89,31 @@ public class CustomerMainApi {
**/ **/
@PostMapping("/attendActive") @PostMapping("/attendActive")
@Operation(summary = "参加活动") @Operation(summary = "参加活动")
public CommonResult<Boolean> attendActive(@RequestBody CustomerActiveSaveReqVO createReqVO) { public CommonResult<RepairOrderInfo> attendActive(@RequestBody CustomerActiveSaveReqVO createReqVO) {
activeService.attendActive(createReqVO); RepairOrderInfo orderInfo = activeService.attendActive(createReqVO);
return success(true); 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));
} }
} }

View File

@ -51,7 +51,6 @@ public class CustomerActiveController {
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除用户参与活动记录") @Operation(summary = "删除用户参与活动记录")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('base:customer-active:delete')")
public CommonResult<Boolean> deleteCustomerActive(@RequestParam("id") String id) { public CommonResult<Boolean> deleteCustomerActive(@RequestParam("id") String id) {
customerActiveService.deleteCustomerActive(id); customerActiveService.deleteCustomerActive(id);
return success(true); return success(true);
@ -60,7 +59,6 @@ public class CustomerActiveController {
@GetMapping("/get") @GetMapping("/get")
@Operation(summary = "获得用户参与活动记录") @Operation(summary = "获得用户参与活动记录")
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('base:customer-active:query')")
public CommonResult<CustomerActiveRespVO> getCustomerActive(@RequestParam("id") String id) { public CommonResult<CustomerActiveRespVO> getCustomerActive(@RequestParam("id") String id) {
CustomerActive customerActive = customerActiveService.getCustomerActive(id); CustomerActive customerActive = customerActiveService.getCustomerActive(id);
return success(BeanUtils.toBean(customerActive, CustomerActiveRespVO.class)); return success(BeanUtils.toBean(customerActive, CustomerActiveRespVO.class));
@ -68,7 +66,6 @@ public class CustomerActiveController {
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得用户参与活动记录分页") @Operation(summary = "获得用户参与活动记录分页")
@PreAuthorize("@ss.hasPermission('base:customer-active:query')")
public CommonResult<PageResult<CustomerActiveRespVO>> getCustomerActivePage(@Valid CustomerActivePageReqVO pageReqVO) { public CommonResult<PageResult<CustomerActiveRespVO>> getCustomerActivePage(@Valid CustomerActivePageReqVO pageReqVO) {
PageResult<CustomerActive> pageResult = customerActiveService.getCustomerActivePage(pageReqVO); PageResult<CustomerActive> pageResult = customerActiveService.getCustomerActivePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, CustomerActiveRespVO.class)); return success(BeanUtils.toBean(pageResult, CustomerActiveRespVO.class));
@ -84,7 +81,6 @@ public class CustomerActiveController {
**/ **/
@GetMapping("/list") @GetMapping("/list")
@Operation(summary = "可参与营销活动") @Operation(summary = "可参与营销活动")
@PreAuthorize("@ss.hasPermission('member:active-main:query')")
public CommonResult<List<?>> getActiveMainPage(ActiveMainPageReqVO pageReqVO) { public CommonResult<List<?>> getActiveMainPage(ActiveMainPageReqVO pageReqVO) {
return success(customerActiveService.isJoinActive(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.setOrderNo(System.currentTimeMillis() + Math.abs(item.getId().hashCode() % 1000) + "");
orderInfo.setGoodsId(item.getId()); orderInfo.setGoodsId(item.getId());
orderInfo.setActiveId(active.getId()); orderInfo.setActiveId(active.getId());
orderInfo.setGoodsTitle(active.getName()); orderInfo.setGoodsTitle(item.getName());
orderInfo.setTenantName(ORDER_TENANT_NAME); orderInfo.setTenantName(ORDER_TENANT_NAME);
orderInfo.setGoodsType(ORDER_KKYL); orderInfo.setGoodsType(ORDER_KKYL);
orderInfo.setUserId(customer.getUserId()); orderInfo.setUserId(customer.getUserId());

View File

@ -42,7 +42,6 @@ public class ActiveMainController {
**/ **/
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "创建营销活动") @Operation(summary = "创建营销活动")
@PreAuthorize("@ss.hasPermission('member:active-main:create')")
public CommonResult<Boolean> createActiveMain(@Valid @RequestBody ActiveMainSaveReqVO createReqVO) { public CommonResult<Boolean> createActiveMain(@Valid @RequestBody ActiveMainSaveReqVO createReqVO) {
activeMainService.saveActiveMain(createReqVO); activeMainService.saveActiveMain(createReqVO);
return success(true); return success(true);
@ -58,7 +57,6 @@ public class ActiveMainController {
**/ **/
@PutMapping("/update") @PutMapping("/update")
@Operation(summary = "更新营销活动") @Operation(summary = "更新营销活动")
@PreAuthorize("@ss.hasPermission('member:active-main:update')")
public CommonResult<Boolean> updateActiveMain(@Valid @RequestBody ActiveMainSaveReqVO updateReqVO) { public CommonResult<Boolean> updateActiveMain(@Valid @RequestBody ActiveMainSaveReqVO updateReqVO) {
activeMainService.saveActiveMain(updateReqVO); activeMainService.saveActiveMain(updateReqVO);
return success(true); return success(true);
@ -75,7 +73,6 @@ public class ActiveMainController {
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除营销活动") @Operation(summary = "删除营销活动")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('member:active-main:delete')")
public CommonResult<Boolean> deleteActiveMain(@RequestParam("id") String id) { public CommonResult<Boolean> deleteActiveMain(@RequestParam("id") String id) {
activeMainService.deleteActiveMain(id); activeMainService.deleteActiveMain(id);
return success(true); return success(true);
@ -92,10 +89,9 @@ public class ActiveMainController {
@GetMapping("/get") @GetMapping("/get")
@Operation(summary = "获得营销活动") @Operation(summary = "获得营销活动")
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('member:active-main:query')")
public CommonResult<ActiveMainRespVO> getActiveMain(@RequestParam("id") String id) { public CommonResult<ActiveMainRespVO> getActiveMain(@RequestParam("id") String id) {
ActiveMain activeMain = activeMainService.getActiveMain(id,false); ActiveMainRespVO activeMain = activeMainService.getActiveMain(id,false);
return success(BeanUtils.toBean(activeMain, ActiveMainRespVO.class)); return success(activeMain);
} }
/** /**
@ -108,7 +104,6 @@ public class ActiveMainController {
**/ **/
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得营销活动分页") @Operation(summary = "获得营销活动分页")
@PreAuthorize("@ss.hasPermission('member:active-main:query')")
public CommonResult<IPage<?>> getActiveMainPage(ActiveMainPageReqVO pageReqVO, public CommonResult<IPage<?>> getActiveMainPage(ActiveMainPageReqVO pageReqVO,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {

View File

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