会员营销
This commit is contained in:
parent
882d69f499
commit
21203a73ac
@ -0,0 +1,118 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveMain;
|
||||
import cn.iocoder.yudao.module.member.service.ActiveMainService;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveMainPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveMainRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveMainSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 营销活动")
|
||||
@RestController
|
||||
@RequestMapping("/member/active-main")
|
||||
@Validated
|
||||
public class ActiveMainController {
|
||||
|
||||
@Resource
|
||||
private ActiveMainService activeMainService;
|
||||
|
||||
/**
|
||||
* 创建营销活动
|
||||
*
|
||||
* @param createReqVO ActiveMainSaveReqVO实体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.String>
|
||||
* @author PQZ
|
||||
* @date 14:12 2024/9/19
|
||||
**/
|
||||
@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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新营销活动
|
||||
*
|
||||
* @param updateReqVO ActiveMainSaveReqVO实体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 14:12 2024/9/19
|
||||
**/
|
||||
@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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除营销活动
|
||||
*
|
||||
* @param id 营销活动id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 14:12 2024/9/19
|
||||
**/
|
||||
@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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过营销活动id获取营销活动
|
||||
*
|
||||
* @param id 营销活动id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.member.vo.ActiveMainRespVO>
|
||||
* @author PQZ
|
||||
* @date 14:13 2024/9/19
|
||||
**/
|
||||
@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);
|
||||
return success(BeanUtils.toBean(activeMain, ActiveMainRespVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询营销活动
|
||||
*
|
||||
* @param pageReqVO ActiveMainPageReqVO
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.framework.common.pojo.PageResult < cn.iocoder.yudao.module.member.vo.ActiveMainRespVO>>
|
||||
* @author PQZ
|
||||
* @date 14:13 2024/9/19
|
||||
**/
|
||||
@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) {
|
||||
Page<ActiveMainRespVO> page = new Page<>(pageNo, pageSize);
|
||||
return success(activeMainService.queryListPage(pageReqVO, page));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveRule;
|
||||
import cn.iocoder.yudao.module.member.service.ActiveRuleService;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRulePageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 营销活动规则")
|
||||
@RestController
|
||||
@RequestMapping("/member/active-rule")
|
||||
@Validated
|
||||
public class ActiveRuleController {
|
||||
|
||||
@Resource
|
||||
private ActiveRuleService activeRuleService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建营销活动规则")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule:create')")
|
||||
public CommonResult<String> createActiveRule(@Valid @RequestBody ActiveRuleSaveReqVO createReqVO) {
|
||||
return success(activeRuleService.createActiveRule(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新营销活动规则")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule:update')")
|
||||
public CommonResult<Boolean> updateActiveRule(@Valid @RequestBody ActiveRuleSaveReqVO updateReqVO) {
|
||||
activeRuleService.updateActiveRule(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除营销活动规则")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule:delete')")
|
||||
public CommonResult<Boolean> deleteActiveRule(@RequestParam("id") String id) {
|
||||
activeRuleService.deleteActiveRule(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得营销活动规则")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule:query')")
|
||||
public CommonResult<ActiveRuleRespVO> getActiveRule(@RequestParam("id") String id) {
|
||||
ActiveRule activeRule = activeRuleService.getActiveRule(id);
|
||||
return success(BeanUtils.toBean(activeRule, ActiveRuleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得营销活动规则分页")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule:query')")
|
||||
public CommonResult<PageResult<ActiveRuleRespVO>> getActiveRulePage(@Valid ActiveRulePageReqVO pageReqVO) {
|
||||
PageResult<ActiveRule> pageResult = activeRuleService.getActiveRulePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ActiveRuleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出营销活动规则 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportActiveRuleExcel(@Valid ActiveRulePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ActiveRule> list = activeRuleService.getActiveRulePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "营销活动规则.xls", "数据", ActiveRuleRespVO.class,
|
||||
BeanUtils.toBean(list, ActiveRuleRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveRuleCoupon;
|
||||
import cn.iocoder.yudao.module.member.service.ActiveRuleCouponService;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleCouponPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleCouponRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleCouponSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 营销活动、规则及会员等级与基础卡券关联关系")
|
||||
@RestController
|
||||
@RequestMapping("/member/active-rule-coupon")
|
||||
@Validated
|
||||
public class ActiveRuleCouponController {
|
||||
|
||||
@Resource
|
||||
private ActiveRuleCouponService activeRuleCouponService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建营销活动、规则及会员等级与基础卡券关联关系")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule-coupon:create')")
|
||||
public CommonResult<String> createActiveRuleCoupon(@Valid @RequestBody ActiveRuleCouponSaveReqVO createReqVO) {
|
||||
return success(activeRuleCouponService.createActiveRuleCoupon(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新营销活动、规则及会员等级与基础卡券关联关系")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule-coupon:update')")
|
||||
public CommonResult<Boolean> updateActiveRuleCoupon(@Valid @RequestBody ActiveRuleCouponSaveReqVO updateReqVO) {
|
||||
activeRuleCouponService.updateActiveRuleCoupon(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除营销活动、规则及会员等级与基础卡券关联关系")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule-coupon:delete')")
|
||||
public CommonResult<Boolean> deleteActiveRuleCoupon(@RequestParam("id") String id) {
|
||||
activeRuleCouponService.deleteActiveRuleCoupon(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得营销活动、规则及会员等级与基础卡券关联关系")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule-coupon:query')")
|
||||
public CommonResult<ActiveRuleCouponRespVO> getActiveRuleCoupon(@RequestParam("id") String id) {
|
||||
ActiveRuleCoupon activeRuleCoupon = activeRuleCouponService.getActiveRuleCoupon(id);
|
||||
return success(BeanUtils.toBean(activeRuleCoupon, ActiveRuleCouponRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得营销活动、规则及会员等级与基础卡券关联关系分页")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule-coupon:query')")
|
||||
public CommonResult<PageResult<ActiveRuleCouponRespVO>> getActiveRuleCouponPage(@Valid ActiveRuleCouponPageReqVO pageReqVO) {
|
||||
PageResult<ActiveRuleCoupon> pageResult = activeRuleCouponService.getActiveRuleCouponPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ActiveRuleCouponRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出营销活动、规则及会员等级与基础卡券关联关系 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('member:active-rule-coupon:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportActiveRuleCouponExcel(@Valid ActiveRuleCouponPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ActiveRuleCoupon> list = activeRuleCouponService.getActiveRuleCouponPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "营销活动、规则及会员等级与基础卡券关联关系.xls", "数据", ActiveRuleCouponRespVO.class,
|
||||
BeanUtils.toBean(list, ActiveRuleCouponRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.member.entity.MemberCoupon;
|
||||
import cn.iocoder.yudao.module.member.service.MemberCouponService;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberCouponPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberCouponRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberCouponSaveReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 基础卡券")
|
||||
@RestController
|
||||
@RequestMapping("/member/coupon")
|
||||
@Validated
|
||||
public class MemberCouponController {
|
||||
|
||||
@Resource
|
||||
private MemberCouponService couponService;
|
||||
|
||||
/**
|
||||
* 创建基础卡券
|
||||
*
|
||||
* @param createReqVO MemberCouponSaveReqVO
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.String>
|
||||
* @author PQZ
|
||||
* @date 14:19 2024/9/19
|
||||
**/
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建基础卡券")
|
||||
@PreAuthorize("@ss.hasPermission('member:coupon:create')")
|
||||
public CommonResult<Boolean> createCoupon(@Valid @RequestBody MemberCouponSaveReqVO saveReqVO) {
|
||||
couponService.saveCoupon(saveReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新基础卡券
|
||||
*
|
||||
* @param updateReqVO MemberCouponSaveReqVO
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 14:19 2024/9/19
|
||||
**/
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新基础卡券")
|
||||
@PreAuthorize("@ss.hasPermission('member:coupon:update')")
|
||||
public CommonResult<Boolean> updateCoupon(@Valid @RequestBody MemberCouponSaveReqVO saveReqVO) {
|
||||
couponService.saveCoupon(saveReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除基础卡券
|
||||
*
|
||||
* @param id 基础卡券id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 14:19 2024/9/19
|
||||
**/
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除基础卡券")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('member:coupon:delete')")
|
||||
public CommonResult<Boolean> deleteCoupon(@RequestParam("id") String id) {
|
||||
couponService.deleteCoupon(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id获取基础卡券
|
||||
*
|
||||
* @param id 卡券id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.member.vo.MemberCouponRespVO>
|
||||
* @author PQZ
|
||||
* @date 14:20 2024/9/19
|
||||
**/
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得基础卡券")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('member:coupon:query')")
|
||||
public CommonResult<MemberCouponRespVO> getCoupon(@RequestParam("id") String id) {
|
||||
MemberCoupon coupon = couponService.getCoupon(id);
|
||||
return success(BeanUtils.toBean(coupon, MemberCouponRespVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询基础卡券信息
|
||||
*
|
||||
* @param pageReqVO MemberCouponPageReqVO实体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.framework.common.pojo.PageResult < cn.iocoder.yudao.module.member.vo.MemberCouponRespVO>>
|
||||
* @author PQZ
|
||||
* @date 14:20 2024/9/19
|
||||
**/
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得基础卡券分页")
|
||||
@PreAuthorize("@ss.hasPermission('member:coupon:query')")
|
||||
public CommonResult<IPage<?>> getCouponPage(@Valid MemberCouponPageReqVO pageReqVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<MemberCouponRespVO> page = new Page<>(pageNo, pageSize);
|
||||
return success(couponService.queryListPage(pageReqVO, page));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.member.entity.MemberLevel;
|
||||
import cn.iocoder.yudao.module.member.service.MemberLevelService;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 会员等级")
|
||||
@RestController
|
||||
@RequestMapping("/member/level")
|
||||
@Validated
|
||||
public class MemberLevelController {
|
||||
|
||||
@Resource
|
||||
private MemberLevelService levelService;
|
||||
|
||||
/**
|
||||
* 创建会员等级
|
||||
*
|
||||
* @param createReqVO MemberLevelSaveReqVO实体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.String>
|
||||
* @author PQZ
|
||||
* @date 13:37 2024/9/19
|
||||
**/
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建会员等级")
|
||||
@PreAuthorize("@ss.hasPermission('member:level:create')")
|
||||
public CommonResult<Boolean> createLevel(@Valid @RequestBody MemberLevelSaveReqVO createReqVO) {
|
||||
levelService.saveLevel(createReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新会员等级
|
||||
*
|
||||
* @param updateReqVO MemberLevelSaveReqVO实体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 13:37 2024/9/19
|
||||
**/
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新会员等级")
|
||||
@PreAuthorize("@ss.hasPermission('member:level:update')")
|
||||
public CommonResult<Boolean> updateLevel(@Valid @RequestBody MemberLevelSaveReqVO updateReqVO) {
|
||||
levelService.saveLevel(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员等级
|
||||
*
|
||||
* @param id 会员等级id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 13:38 2024/9/19
|
||||
**/
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除会员等级")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('member:level:delete')")
|
||||
public CommonResult<Boolean> deleteLevel(@RequestParam("id") String id) {
|
||||
levelService.deleteLevel(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员等级
|
||||
*
|
||||
* @param id 会员等级id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.member.vo.MemberLevelRespVO>
|
||||
* @author PQZ
|
||||
* @date 13:38 2024/9/19
|
||||
**/
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得会员等级")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('member:level:query')")
|
||||
public CommonResult<MemberLevelRespVO> getLevel(@RequestParam("id") String id) {
|
||||
MemberLevel level = levelService.getLevel(id);
|
||||
return success(BeanUtils.toBean(level, MemberLevelRespVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取会员等级
|
||||
*
|
||||
* @param pageReqVO MemberLevelPageReqVO实体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.framework.common.pojo.PageResult < cn.iocoder.yudao.module.member.vo.MemberLevelRespVO>>
|
||||
* @author PQZ
|
||||
* @date 13:38 2024/9/19
|
||||
**/
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得会员等级分页")
|
||||
@PreAuthorize("@ss.hasPermission('member:level:query')")
|
||||
public CommonResult<IPage<?>> getLevelPage(MemberLevelPageReqVO pageReqVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<MemberLevelRespVO> page = new Page<>(pageNo, pageSize);
|
||||
return success(levelService.queryListPage(pageReqVO,page));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package cn.iocoder.yudao.module.member.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 营销活动 DO
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@TableName("dl_active_main")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ActiveMain extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
/**
|
||||
* 活动名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 活动类型(充值有礼;注册有礼;开卡有礼)
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 活动开始时间
|
||||
*/
|
||||
private LocalDateTime beginTime;
|
||||
/**
|
||||
* 活动结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 活动状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 活动描述
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 是否区分会员等级
|
||||
*/
|
||||
private String isMember;
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package cn.iocoder.yudao.module.member.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 营销活动规则 DO
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@TableName("dl_active_rule")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ActiveRule extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
/**
|
||||
* 活动id
|
||||
*/
|
||||
private String activeId;
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 会员等级
|
||||
*/
|
||||
private String memberLevel;
|
||||
/**
|
||||
* 充值金额
|
||||
*/
|
||||
private BigDecimal rechAmount;
|
||||
/**
|
||||
* 赠送金额
|
||||
*/
|
||||
private String giveAmount;
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.member.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 营销活动、规则及会员等级与基础卡券关联关系 DO
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@TableName("dl_active_rule_coupon")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ActiveRuleCoupon extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
/**
|
||||
* 基础卡券表id
|
||||
*/
|
||||
private String couponId;
|
||||
/**
|
||||
* 营销活动、规则、会员等级表id
|
||||
*/
|
||||
private String mainId;
|
||||
/**
|
||||
* 主表名称
|
||||
*/
|
||||
private String mainTable;
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package cn.iocoder.yudao.module.member.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 基础卡券 DO
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@TableName("dl_member_coupon")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MemberCoupon extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
/**
|
||||
* 卡券名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 卡券类型(保养卡、服务券、礼包券)
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 适用车型(数据字典)
|
||||
*/
|
||||
private String carModel;
|
||||
/**
|
||||
* 开始有效期
|
||||
*/
|
||||
private LocalDateTime beginTime;
|
||||
/**
|
||||
* 结束有效期
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 适用子公司
|
||||
*/
|
||||
private String corpIds;
|
||||
/**
|
||||
* 面额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**单价*/
|
||||
private BigDecimal unitPrice;
|
||||
/**
|
||||
* 效果图片
|
||||
*/
|
||||
private String image;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 核销规则(记次核销、面额核销、一次性核销)
|
||||
*/
|
||||
private String outRule;
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.member.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 会员等级 DO
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@TableName("dl_member_level")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MemberLevel extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
/**
|
||||
* 等级排序
|
||||
*/
|
||||
private String sort;
|
||||
/**
|
||||
* 等级名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 状态(01启用,02禁用)
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 升级所需积分
|
||||
*/
|
||||
private String growthValue;
|
||||
/**会员折扣*/
|
||||
private BigDecimal discount;
|
||||
/**
|
||||
* 等级说明
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 等级权益
|
||||
*/
|
||||
private String userEquity;
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.member.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveMain;
|
||||
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.MemberLevelRespVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 营销活动 Mapper
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Mapper
|
||||
public interface ActiveMainMapper extends BaseMapper<ActiveMain> {
|
||||
|
||||
/**
|
||||
* 分页查询活动规则
|
||||
*
|
||||
* @param entity ActiveMainPageReqVO实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.member.vo.ActiveMainRespVO>
|
||||
* @author PQZ
|
||||
* @date 14:10 2024/9/19
|
||||
**/
|
||||
IPage<ActiveMainRespVO> selectListPage(@Param("entity") ActiveMainPageReqVO entity, Page<ActiveMainRespVO> page);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package cn.iocoder.yudao.module.member.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveRuleCoupon;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 营销活动、规则及会员等级与基础卡券关联关系 Mapper
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Mapper
|
||||
public interface ActiveRuleCouponMapper extends BaseMapper<ActiveRuleCoupon> {
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.member.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveRule;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 营销活动规则 Mapper
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Mapper
|
||||
public interface ActiveRuleMapper extends BaseMapper<ActiveRule> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.member.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.MemberCoupon;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberCouponPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberCouponRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelRespVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 基础卡券 Mapper
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Mapper
|
||||
public interface MemberCouponMapper extends BaseMapper<MemberCoupon> {
|
||||
|
||||
/**
|
||||
* 分页查询基础卡券信息
|
||||
*
|
||||
* @param entity MemberCouponPageReqVO实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.member.vo.MemberCouponRespVO>
|
||||
* @author PQZ
|
||||
* @date 14:06 2024/9/19
|
||||
**/
|
||||
IPage<MemberCouponRespVO> selectListPage(@Param("entity") MemberCouponPageReqVO entity, Page<MemberCouponRespVO> page);
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.member.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.company.entity.Company;
|
||||
import cn.iocoder.yudao.module.company.vo.CompanyReqVO;
|
||||
import cn.iocoder.yudao.module.member.entity.MemberLevel;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelRespVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 会员等级 Mapper
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Mapper
|
||||
public interface MemberLevelMapper extends BaseMapper<MemberLevel> {
|
||||
|
||||
/**
|
||||
* 分页查询会员
|
||||
*
|
||||
* @param entity MemberLevelPageReqVO实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.member.vo.MemberLevelRespVO>
|
||||
* @author PQZ
|
||||
* @date 13:48 2024/9/19
|
||||
**/
|
||||
IPage<MemberLevelRespVO> selectListPage(@Param("entity") MemberLevelPageReqVO entity, Page<MemberLevelRespVO> page);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.member.service;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveMain;
|
||||
import cn.iocoder.yudao.module.member.vo.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 营销活动 Service 接口
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
public interface ActiveMainService extends IService<ActiveMain> {
|
||||
|
||||
/**
|
||||
* 保存营销活动
|
||||
*
|
||||
* @param saveReqVO ActiveMainSaveReqVO
|
||||
* @author PQZ
|
||||
* @date 14:14 2024/9/19
|
||||
**/
|
||||
void saveActiveMain(ActiveMainSaveReqVO saveReqVO);
|
||||
|
||||
|
||||
/**
|
||||
* 删除营销活动
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteActiveMain(String id);
|
||||
|
||||
/**
|
||||
* 获得营销活动
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 营销活动
|
||||
*/
|
||||
ActiveMain getActiveMain(String id);
|
||||
|
||||
/**
|
||||
* 分页查询营销活动
|
||||
*
|
||||
* @param pageReqVO ActiveMainPageReqVO实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.member.vo.ActiveMainRespVO>
|
||||
* @author PQZ
|
||||
* @date 14:17 2024/9/19
|
||||
**/
|
||||
IPage<ActiveMainRespVO> queryListPage(ActiveMainPageReqVO pageReqVO, Page<ActiveMainRespVO> page);
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.member.service;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveRuleCoupon;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleCouponPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleCouponSaveReqVO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 营销活动、规则及会员等级与基础卡券关联关系 Service 接口
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
public interface ActiveRuleCouponService extends IService<ActiveRuleCoupon> {
|
||||
|
||||
/**
|
||||
* 创建营销活动、规则及会员等级与基础卡券关联关系
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
String createActiveRuleCoupon(@Valid ActiveRuleCouponSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新营销活动、规则及会员等级与基础卡券关联关系
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateActiveRuleCoupon(@Valid ActiveRuleCouponSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除营销活动、规则及会员等级与基础卡券关联关系
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteActiveRuleCoupon(String id);
|
||||
|
||||
/**
|
||||
* 获得营销活动、规则及会员等级与基础卡券关联关系
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 营销活动、规则及会员等级与基础卡券关联关系
|
||||
*/
|
||||
ActiveRuleCoupon getActiveRuleCoupon(String id);
|
||||
|
||||
/**
|
||||
* 获得营销活动、规则及会员等级与基础卡券关联关系分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 营销活动、规则及会员等级与基础卡券关联关系分页
|
||||
*/
|
||||
PageResult<ActiveRuleCoupon> getActiveRuleCouponPage(ActiveRuleCouponPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.member.service;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveRule;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRulePageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleSaveReqVO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 营销活动规则 Service 接口
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
public interface ActiveRuleService extends IService<ActiveRule> {
|
||||
|
||||
/**
|
||||
* 创建营销活动规则
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
String createActiveRule(@Valid ActiveRuleSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新营销活动规则
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateActiveRule(@Valid ActiveRuleSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除营销活动规则
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteActiveRule(String id);
|
||||
|
||||
/**
|
||||
* 获得营销活动规则
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 营销活动规则
|
||||
*/
|
||||
ActiveRule getActiveRule(String id);
|
||||
|
||||
/**
|
||||
* 获得营销活动规则分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 营销活动规则分页
|
||||
*/
|
||||
PageResult<ActiveRule> getActiveRulePage(ActiveRulePageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.member.service;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.member.entity.MemberCoupon;
|
||||
import cn.iocoder.yudao.module.member.vo.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 基础卡券 Service 接口
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
public interface MemberCouponService extends IService<MemberCoupon> {
|
||||
|
||||
|
||||
/**
|
||||
* 保存基础卡券信息
|
||||
*
|
||||
* @param saveReqVO TODO
|
||||
* @return void
|
||||
* @author PQZ
|
||||
* @date 14:22 2024/9/19
|
||||
**/
|
||||
void saveCoupon(@Valid MemberCouponSaveReqVO saveReqVO);
|
||||
|
||||
/**
|
||||
* 删除基础卡券
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteCoupon(String id);
|
||||
|
||||
/**
|
||||
* 获得基础卡券
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 基础卡券
|
||||
*/
|
||||
MemberCoupon getCoupon(String id);
|
||||
|
||||
/**
|
||||
* 分页查询基础卡券信息
|
||||
*
|
||||
* @param pageReqVO MemberCouponPageReqVO实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.member.vo.MemberCouponRespVO>
|
||||
* @author PQZ
|
||||
* @date 14:22 2024/9/19
|
||||
**/
|
||||
IPage<MemberCouponRespVO> queryListPage(MemberCouponPageReqVO pageReqVO, Page<MemberCouponRespVO> page);
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.member.service;
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.MemberLevel;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 会员等级 Service 接口
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
public interface MemberLevelService extends IService<MemberLevel> {
|
||||
|
||||
|
||||
/**
|
||||
* 保存会员等级
|
||||
*
|
||||
* @param saveReqVO MemberLevelSaveReqVO
|
||||
* @author PQZ
|
||||
* @date 13:39 2024/9/19
|
||||
**/
|
||||
void saveLevel(MemberLevelSaveReqVO saveReqVO);
|
||||
|
||||
/**
|
||||
* 删除会员等级
|
||||
*
|
||||
* @param id 会员等级id
|
||||
* @author PQZ
|
||||
* @date 13:41 2024/9/19
|
||||
**/
|
||||
void deleteLevel(String id);
|
||||
|
||||
/**
|
||||
* 根据会员等级id查询会员等级信息
|
||||
*
|
||||
* @param id 会员等级id
|
||||
* @return cn.iocoder.yudao.module.member.entity.MemberLevel
|
||||
* @author PQZ
|
||||
* @date 13:41 2024/9/19
|
||||
**/
|
||||
MemberLevel getLevel(String id);
|
||||
|
||||
/**
|
||||
* 分页查询会员等级
|
||||
*
|
||||
* @param pageReqVO MemberLevelPageReqVO实体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.PageResult<cn.iocoder.yudao.module.member.entity.MemberLevel>
|
||||
* @author PQZ
|
||||
* @date 13:42 2024/9/19
|
||||
**/
|
||||
IPage<MemberLevelRespVO> queryListPage(MemberLevelPageReqVO pageReqVO, Page<MemberLevelRespVO> page);
|
||||
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package cn.iocoder.yudao.module.member.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveMain;
|
||||
import cn.iocoder.yudao.module.member.mapper.ActiveMainMapper;
|
||||
import cn.iocoder.yudao.module.member.service.ActiveMainService;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveMainPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveMainRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveMainSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 营销活动 Service 实现类
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ActiveMainServiceImpl extends ServiceImpl<ActiveMainMapper, ActiveMain> implements ActiveMainService {
|
||||
|
||||
@Resource
|
||||
private ActiveMainMapper activeMainMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 保存营销活动
|
||||
*
|
||||
* @param saveReqVO ActiveMainSaveReqVO
|
||||
* @author PQZ
|
||||
* @date 14:14 2024/9/19
|
||||
**/
|
||||
@Override
|
||||
public void saveActiveMain(ActiveMainSaveReqVO saveReqVO) {
|
||||
ActiveMain activeMain = BeanUtils.toBean(saveReqVO,ActiveMain.class);
|
||||
saveOrUpdate(activeMain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteActiveMain(String id) {
|
||||
// 删除
|
||||
activeMainMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ActiveMain getActiveMain(String id) {
|
||||
return activeMainMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询营销活动
|
||||
*
|
||||
* @param pageReqVO ActiveMainPageReqVO实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.member.vo.ActiveMainRespVO>
|
||||
* @author PQZ
|
||||
* @date 14:17 2024/9/19
|
||||
**/
|
||||
@Override
|
||||
public IPage<ActiveMainRespVO> queryListPage(ActiveMainPageReqVO pageReqVO, Page<ActiveMainRespVO> page) {
|
||||
return activeMainMapper.selectListPage(pageReqVO,page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package cn.iocoder.yudao.module.member.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveRuleCoupon;
|
||||
import cn.iocoder.yudao.module.member.mapper.ActiveRuleCouponMapper;
|
||||
import cn.iocoder.yudao.module.member.service.ActiveRuleCouponService;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleCouponPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleCouponSaveReqVO;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 营销活动、规则及会员等级与基础卡券关联关系 Service 实现类
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ActiveRuleCouponServiceImpl extends ServiceImpl<ActiveRuleCouponMapper, ActiveRuleCoupon> implements ActiveRuleCouponService {
|
||||
|
||||
@Resource
|
||||
private ActiveRuleCouponMapper activeRuleCouponMapper;
|
||||
|
||||
@Override
|
||||
public String createActiveRuleCoupon(ActiveRuleCouponSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ActiveRuleCoupon activeRuleCoupon = BeanUtils.toBean(createReqVO, ActiveRuleCoupon.class);
|
||||
activeRuleCouponMapper.insert(activeRuleCoupon);
|
||||
// 返回
|
||||
return activeRuleCoupon.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateActiveRuleCoupon(ActiveRuleCouponSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
// 更新
|
||||
ActiveRuleCoupon updateObj = BeanUtils.toBean(updateReqVO, ActiveRuleCoupon.class);
|
||||
activeRuleCouponMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteActiveRuleCoupon(String id) {
|
||||
// 校验存在
|
||||
// 删除
|
||||
activeRuleCouponMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ActiveRuleCoupon getActiveRuleCoupon(String id) {
|
||||
return activeRuleCouponMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ActiveRuleCoupon> getActiveRuleCouponPage(ActiveRuleCouponPageReqVO pageReqVO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.member.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.member.entity.ActiveRule;
|
||||
import cn.iocoder.yudao.module.member.mapper.ActiveRuleMapper;
|
||||
import cn.iocoder.yudao.module.member.service.ActiveRuleService;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRulePageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.ActiveRuleSaveReqVO;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 营销活动规则 Service 实现类
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ActiveRuleServiceImpl extends ServiceImpl<ActiveRuleMapper, ActiveRule> implements ActiveRuleService {
|
||||
|
||||
@Resource
|
||||
private ActiveRuleMapper activeRuleMapper;
|
||||
|
||||
@Override
|
||||
public String createActiveRule(ActiveRuleSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ActiveRule activeRule = BeanUtils.toBean(createReqVO, ActiveRule.class);
|
||||
activeRuleMapper.insert(activeRule);
|
||||
// 返回
|
||||
return activeRule.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateActiveRule(ActiveRuleSaveReqVO updateReqVO) {
|
||||
// 更新
|
||||
ActiveRule updateObj = BeanUtils.toBean(updateReqVO, ActiveRule.class);
|
||||
activeRuleMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteActiveRule(String id) {
|
||||
// 删除
|
||||
activeRuleMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ActiveRule getActiveRule(String id) {
|
||||
return activeRuleMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ActiveRule> getActiveRulePage(ActiveRulePageReqVO pageReqVO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.member.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.member.entity.MemberCoupon;
|
||||
import cn.iocoder.yudao.module.member.mapper.MemberCouponMapper;
|
||||
import cn.iocoder.yudao.module.member.service.MemberCouponService;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberCouponPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberCouponRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberCouponSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 基础卡券 Service 实现类
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class MemberCouponServiceImpl extends ServiceImpl<MemberCouponMapper, MemberCoupon> implements MemberCouponService {
|
||||
|
||||
@Resource
|
||||
private MemberCouponMapper couponMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 保存基础卡券信息
|
||||
*
|
||||
* @param saveReqVO MemberCouponSaveReqVO实体
|
||||
* @return void
|
||||
* @author PQZ
|
||||
* @date 14:22 2024/9/19
|
||||
**/
|
||||
@Override
|
||||
public void saveCoupon(MemberCouponSaveReqVO saveReqVO) {
|
||||
MemberCoupon memberCoupon = BeanUtils.toBean(saveReqVO,MemberCoupon.class);
|
||||
saveOrUpdate(memberCoupon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteCoupon(String id) {
|
||||
// 删除
|
||||
couponMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public MemberCoupon getCoupon(String id) {
|
||||
return couponMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询基础卡券信息
|
||||
*
|
||||
* @param pageReqVO MemberCouponPageReqVO实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.member.vo.MemberCouponRespVO>
|
||||
* @author PQZ
|
||||
* @date 14:22 2024/9/19
|
||||
**/
|
||||
@Override
|
||||
public IPage<MemberCouponRespVO> queryListPage(MemberCouponPageReqVO pageReqVO, Page<MemberCouponRespVO> page) {
|
||||
return couponMapper.selectListPage(pageReqVO,page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package cn.iocoder.yudao.module.member.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.member.entity.MemberLevel;
|
||||
import cn.iocoder.yudao.module.member.mapper.MemberLevelMapper;
|
||||
import cn.iocoder.yudao.module.member.service.MemberLevelService;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelRespVO;
|
||||
import cn.iocoder.yudao.module.member.vo.MemberLevelSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 会员等级 Service 实现类
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class MemberLevelServiceImpl extends ServiceImpl<MemberLevelMapper, MemberLevel> implements MemberLevelService {
|
||||
|
||||
@Resource
|
||||
private MemberLevelMapper levelMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 保存会员等级
|
||||
*
|
||||
* @param saveReqVO MemberLevelSaveReqVO
|
||||
* @author PQZ
|
||||
* @date 13:39 2024/9/19
|
||||
**/
|
||||
@Override
|
||||
public void saveLevel(MemberLevelSaveReqVO saveReqVO) {
|
||||
MemberLevel memberLevel = BeanUtils.toBean(saveReqVO, MemberLevel.class);
|
||||
saveOrUpdate(memberLevel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员等级
|
||||
*
|
||||
* @param id 会员等级id
|
||||
* @author PQZ
|
||||
* @date 13:41 2024/9/19
|
||||
**/
|
||||
@Override
|
||||
public void deleteLevel(String id) {
|
||||
// 删除
|
||||
levelMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据会员等级id查询会员等级信息
|
||||
*
|
||||
* @param id 会员等级id
|
||||
* @return cn.iocoder.yudao.module.member.entity.MemberLevel
|
||||
* @author PQZ
|
||||
* @date 13:41 2024/9/19
|
||||
**/
|
||||
@Override
|
||||
public MemberLevel getLevel(String id) {
|
||||
return levelMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询会员等级
|
||||
*
|
||||
* @param pageReqVO MemberLevelPageReqVO实体
|
||||
* @param page
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.PageResult<cn.iocoder.yudao.module.member.entity.MemberLevel>
|
||||
* @author PQZ
|
||||
* @date 13:42 2024/9/19
|
||||
**/
|
||||
@Override
|
||||
public IPage<MemberLevelRespVO> queryListPage(MemberLevelPageReqVO pageReqVO, Page<MemberLevelRespVO> page) {
|
||||
return levelMapper.selectListPage(pageReqVO,page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 营销活动分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ActiveMainPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "活动名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "活动类型(充值有礼;注册有礼;开卡有礼)", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "活动开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] beginTime;
|
||||
|
||||
@Schema(description = "活动结束时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "活动状态", example = "1")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "活动描述", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "是否区分会员等级")
|
||||
private String isMember;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 营销活动 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ActiveMainRespVO {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "10407")
|
||||
@ExcelProperty("主键标识")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "活动名称", example = "王五")
|
||||
@ExcelProperty("活动名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "活动类型(充值有礼;注册有礼;开卡有礼)", example = "1")
|
||||
@ExcelProperty("活动类型(充值有礼;注册有礼;开卡有礼)")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "活动开始时间")
|
||||
@ExcelProperty("活动开始时间")
|
||||
private LocalDateTime beginTime;
|
||||
|
||||
@Schema(description = "活动结束时间")
|
||||
@ExcelProperty("活动结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "活动状态", example = "1")
|
||||
@ExcelProperty("活动状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "活动描述", example = "随便")
|
||||
@ExcelProperty("活动描述")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "是否区分会员等级")
|
||||
@ExcelProperty("是否区分会员等级")
|
||||
private String isMember;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 营销活动新增/修改 Request VO")
|
||||
@Data
|
||||
public class ActiveMainSaveReqVO {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "10407")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "活动名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "活动类型(充值有礼;注册有礼;开卡有礼)", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "活动开始时间")
|
||||
private LocalDateTime beginTime;
|
||||
|
||||
@Schema(description = "活动结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "活动状态", example = "1")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "活动描述", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "是否区分会员等级")
|
||||
private String isMember;
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 营销活动、规则及会员等级与基础卡券关联关系分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ActiveRuleCouponPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "基础卡券表id", example = "780")
|
||||
private String couponId;
|
||||
|
||||
@Schema(description = "营销活动、规则、会员等级表id", example = "19295")
|
||||
private String mainId;
|
||||
|
||||
@Schema(description = "主表名称")
|
||||
private String mainTable;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 营销活动、规则及会员等级与基础卡券关联关系 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ActiveRuleCouponRespVO {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "26827")
|
||||
@ExcelProperty("主键标识")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "基础卡券表id", example = "780")
|
||||
@ExcelProperty("基础卡券表id")
|
||||
private String couponId;
|
||||
|
||||
@Schema(description = "营销活动、规则、会员等级表id", example = "19295")
|
||||
@ExcelProperty("营销活动、规则、会员等级表id")
|
||||
private String mainId;
|
||||
|
||||
@Schema(description = "主表名称")
|
||||
@ExcelProperty("主表名称")
|
||||
private String mainTable;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 营销活动、规则及会员等级与基础卡券关联关系新增/修改 Request VO")
|
||||
@Data
|
||||
public class ActiveRuleCouponSaveReqVO {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "26827")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "基础卡券表id", example = "780")
|
||||
private String couponId;
|
||||
|
||||
@Schema(description = "营销活动、规则、会员等级表id", example = "19295")
|
||||
private String mainId;
|
||||
|
||||
@Schema(description = "主表名称")
|
||||
private String mainTable;
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 营销活动规则分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ActiveRulePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "活动id", example = "2412")
|
||||
private String activeId;
|
||||
|
||||
@Schema(description = "规则名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "会员等级")
|
||||
private String memberLevel;
|
||||
|
||||
@Schema(description = "充值金额")
|
||||
private BigDecimal rechAmount;
|
||||
|
||||
@Schema(description = "赠送金额")
|
||||
private String giveAmount;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 营销活动规则 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ActiveRuleRespVO {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "20194")
|
||||
@ExcelProperty("主键标识")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "活动id", example = "2412")
|
||||
@ExcelProperty("活动id")
|
||||
private String activeId;
|
||||
|
||||
@Schema(description = "规则名称", example = "王五")
|
||||
@ExcelProperty("规则名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "会员等级")
|
||||
@ExcelProperty("会员等级")
|
||||
private String memberLevel;
|
||||
|
||||
@Schema(description = "充值金额")
|
||||
@ExcelProperty("充值金额")
|
||||
private BigDecimal rechAmount;
|
||||
|
||||
@Schema(description = "赠送金额")
|
||||
@ExcelProperty("赠送金额")
|
||||
private String giveAmount;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 营销活动规则新增/修改 Request VO")
|
||||
@Data
|
||||
public class ActiveRuleSaveReqVO {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "20194")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "活动id", example = "2412")
|
||||
private String activeId;
|
||||
|
||||
@Schema(description = "规则名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "会员等级")
|
||||
private String memberLevel;
|
||||
|
||||
@Schema(description = "充值金额")
|
||||
private BigDecimal rechAmount;
|
||||
|
||||
@Schema(description = "赠送金额")
|
||||
private String giveAmount;
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.MemberCoupon;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 基础卡券分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class MemberCouponPageReqVO extends MemberCoupon {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.MemberCoupon;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 基础卡券 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MemberCouponRespVO extends MemberCoupon {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.MemberCoupon;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 基础卡券新增/修改 Request VO")
|
||||
@Data
|
||||
public class MemberCouponSaveReqVO extends MemberCoupon {
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.MemberLevel;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 会员等级分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class MemberLevelPageReqVO extends MemberLevel {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.MemberLevel;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 会员等级 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MemberLevelRespVO extends MemberLevel {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.iocoder.yudao.module.member.vo;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.member.entity.MemberLevel;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 会员等级新增/修改 Request VO")
|
||||
@Data
|
||||
public class MemberLevelSaveReqVO extends MemberLevel {
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.member.mapper.ActiveMainMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="selectListPage" resultType="cn.iocoder.yudao.module.member.vo.ActiveMainRespVO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
dl_active_main dam
|
||||
<where>
|
||||
dam.deleted = 0
|
||||
<if test="entity.name != null and entity.name != ''">
|
||||
and dam.name like concat('%', #{entity.name}, '%')
|
||||
</if>
|
||||
<if test="entity.type != null and entity.type != ''">
|
||||
and dam.type like concat('%', #{entity.type}, '%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY dam.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.member.mapper.ActiveRuleCouponMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.member.mapper.ActiveRuleMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.member.mapper.MemberCouponMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="selectListPage" resultType="cn.iocoder.yudao.module.member.vo.MemberCouponRespVO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
dl_member_coupon dmc
|
||||
<where>
|
||||
dmc.deleted = 0
|
||||
<if test="entity.name != null and entity.name != ''">
|
||||
and dmc.name like concat('%', #{entity.name}, '%')
|
||||
</if>
|
||||
<if test="entity.type != null and entity.type != ''">
|
||||
and dmc.type like concat('%', #{entity.type}, '%')
|
||||
</if>
|
||||
<if test="entity.outRule != null and entity.outRule != ''">
|
||||
and dmc.out_rule like concat('%', #{entity.outRule}, '%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY dmc.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.member.mapper.MemberLevelMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="selectListPage" resultType="cn.iocoder.yudao.module.member.vo.MemberLevelRespVO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
dl_member_level dml
|
||||
<where>
|
||||
dml.deleted = 0
|
||||
<if test="entity.name != null and entity.name != ''">
|
||||
and dml.name like concat('%', #{entity.name}, '%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY dml.create_time DESC
|
||||
|
||||
</select>
|
||||
</mapper>
|
@ -16,7 +16,7 @@
|
||||
<if test="entity.name != null and entity.name != ''">
|
||||
and dbs.name like concat('%', #{entity.name}, '%')
|
||||
</if>
|
||||
<if test="entity.name != null and entity.name != ''">
|
||||
<if test="entity.corpId != null and entity.corpId != ''">
|
||||
and dbs.corp_id like concat('%', #{entity.corpId}, '%')
|
||||
</if>
|
||||
</where>
|
||||
|
Loading…
Reference in New Issue
Block a user