mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 01:01:52 +08:00
1、修改coupon的页面、以及增加coupon的enum
This commit is contained in:
parent
ab6fd30551
commit
02aede0417
@ -15,17 +15,18 @@
|
||||
<name>${project.artifactId}</name>
|
||||
|
||||
<description>
|
||||
商城大模块,由 product 商品、market 营销、trade 交易等组成
|
||||
商城大模块,由 product 商品、market 营销、trade 交易 coupon等组成
|
||||
</description>
|
||||
<modules>
|
||||
<module>yudao-module-coupon-api</module>
|
||||
<module>yudao-module-coupon-biz</module>
|
||||
<module>yudao-module-market-api</module>
|
||||
<module>yudao-module-market-biz</module>
|
||||
<module>yudao-module-product-api</module>
|
||||
<module>yudao-module-product-biz</module>
|
||||
<module>yudao-module-trade-api</module>
|
||||
<module>yudao-module-trade-biz</module>
|
||||
<module>yudao-module-coupon-api</module>
|
||||
<module>yudao-module-coupon-biz</module>
|
||||
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
|
@ -23,6 +23,13 @@
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 参数校验 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -14,7 +14,8 @@ import lombok.RequiredArgsConstructor;
|
||||
@Getter
|
||||
public enum CouponExpireTimeTypeEnum {
|
||||
|
||||
OPEN(1,"不开启"),CLOSE(0,"开启"),;
|
||||
OPEN(1,"不开启"),
|
||||
CLOSE(0,"开启"),;
|
||||
|
||||
/**
|
||||
* 是否开启过期提醒
|
||||
|
@ -14,7 +14,8 @@ import lombok.RequiredArgsConstructor;
|
||||
@Getter
|
||||
public enum CouponFetchTypeEnum {
|
||||
|
||||
LIMIT(0,"否"),NOT_LIMIT(0,"开启"),;
|
||||
LIMIT(1,"限制"),
|
||||
NOT_LIMIT(0,"不限制"),;
|
||||
|
||||
/**
|
||||
* 是否开启过期提醒
|
||||
|
@ -6,17 +6,16 @@ import lombok.RequiredArgsConstructor;
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券 - 优惠券类型
|
||||
* 优惠券 - 优惠叠加类型
|
||||
*
|
||||
* @author Sin
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum CouponProductTypeEnum {
|
||||
public enum CouponForbidPreferenceEnum {
|
||||
|
||||
PROCESSING(1,"进行中"),
|
||||
END(2,"已结束"),
|
||||
CLOSE(3,"已关闭"),;
|
||||
UN_FORBID(0,"不限制"),
|
||||
FORBID(1,"优惠券仅原价购买商品时可用");
|
||||
|
||||
/**
|
||||
* 优惠券类型
|
@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.CouponTemplete.enums;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券 - 优惠券商品使用类型
|
||||
*
|
||||
* @author Sin
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum CouponGoodsTypeEnum {
|
||||
|
||||
ALL(1,"全部商品可用"),
|
||||
POINT_PRODUCT(2,"指定商品可用"),
|
||||
POINT_PRODUCT_NOT(3,"指定商品不可用"),;
|
||||
|
||||
/**
|
||||
* 优惠券商品使用类型
|
||||
*/
|
||||
private final Integer type;
|
||||
/**
|
||||
* 优惠券商品使用类型名
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
}
|
@ -6,7 +6,7 @@ import lombok.RequiredArgsConstructor;
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券 - 优惠券类型
|
||||
* 优惠券 - 优惠券状态类型
|
||||
*
|
||||
* @author Sin
|
||||
*/
|
||||
@ -14,9 +14,9 @@ import lombok.RequiredArgsConstructor;
|
||||
@Getter
|
||||
public enum CouponStatusTypeEnum {
|
||||
|
||||
ALL(1,"全部商品可用"),
|
||||
POINT_PRODUCT(2,"指定商品可用"),
|
||||
POINT_PRODUCT_NOT(3,"指定商品不可用不能为空"),;
|
||||
PROCESSING(1,"进行中"),
|
||||
END(2,"已结束"),
|
||||
CLOSE(3,"已关闭"),;
|
||||
|
||||
/**
|
||||
* 优惠券类型
|
||||
|
@ -6,7 +6,7 @@ import lombok.RequiredArgsConstructor;
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券 - 优惠券类型
|
||||
* 优惠券使用类型 - 优惠券使用类型类型
|
||||
*
|
||||
* @author Sin
|
||||
*/
|
||||
@ -18,11 +18,11 @@ public enum CouponUseLimitEnum {
|
||||
NO_LIMIT(2,"有门槛"),;
|
||||
|
||||
/**
|
||||
* 优惠券类型
|
||||
* 优惠券使用类型
|
||||
*/
|
||||
private final Integer type;
|
||||
/**
|
||||
* 优惠券类型名
|
||||
* 优惠券使用类型名
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
|
@ -14,7 +14,7 @@ public enum CouponValidityTypeEnum {
|
||||
|
||||
TIME_RANGE_EXPIRTED(1,"时间范围过期"),
|
||||
EXPIRES_AFTER_FIXED_DATE(2,"领取之日固定日期后过期"),
|
||||
EXPIRES_DATE_NEXT_FIEXD_DATE(3,"领取次日固定日期后过期不能为空"),;
|
||||
EXPIRES_DATE_NEXT_FIEXD_DATE(3,"领取次日固定日期后过期"),;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -3,19 +3,18 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>yudao-module-mall</artifactId>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-mall</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>yudao-module-coupon-biz</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<artifactId>yudao-module-coupon-biz</artifactId>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
|
||||
<description>
|
||||
trade 模块,主要实现交易相关功能
|
||||
例如:订单、退款、购物车等功能。
|
||||
coupon模块,主要负责优惠券的一些业务,含发布优惠券模板,分发优惠券等
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
@ -21,7 +21,7 @@ import cn.iocoder.yudao.module.coupon.service.coupon.CouponService;
|
||||
|
||||
@Api(tags = "管理后台 - 优惠券")
|
||||
@RestController
|
||||
@RequestMapping("/coupon/coupon/")
|
||||
@RequestMapping("/coupon/item")
|
||||
@Validated
|
||||
public class CouponController {
|
||||
|
||||
@ -69,7 +69,7 @@ public class CouponController {
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("获得优惠券列表")
|
||||
// @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
|
||||
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
|
||||
@PreAuthorize("@ss.hasPermission('coupon::query')")
|
||||
public CommonResult<List<CouponRespVO>> getList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<CouponDO> list = couponService.getList(ids);
|
||||
|
@ -68,7 +68,7 @@ public class CouponBaseVO {
|
||||
private Boolean whetherForbidPreference;
|
||||
|
||||
@ApiModelProperty(value = "是否开启过期提醒0-不开启 1-开启", required = true)
|
||||
@NotNull(message = "是否开启过期提醒0-不开启 1-开启不能为空")
|
||||
@NotNull(message = "是否开启过期提醒0-不开启 1-开启")
|
||||
private Boolean whetherExpireNotice;
|
||||
|
||||
@ApiModelProperty(value = "过期前N天提醒", required = true)
|
||||
|
@ -1,81 +0,0 @@
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete;
|
||||
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.*;
|
||||
import cn.iocoder.yudao.module.coupon.convert.CouponTemplete.CouponTempleteConvert;
|
||||
import cn.iocoder.yudao.module.coupon.dal.dataobject.CouponTemplete.CouponTempleteDO;
|
||||
import cn.iocoder.yudao.module.coupon.service.CouponTemplete.CouponTempleteService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import javax.validation.*;
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Api(tags = "管理后台 - 优惠券模板")
|
||||
@RestController
|
||||
@RequestMapping("/coupon/CouponTemplete/")
|
||||
@Validated
|
||||
public class CouponTempleteController {
|
||||
|
||||
@Resource
|
||||
private CouponTempleteService Service;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建优惠券模板")
|
||||
@PreAuthorize("@ss.hasPermission('CouponTemplete::create')")
|
||||
public CommonResult<Long> create(@Valid @RequestBody CouponTempleteCreateReqVO createReqVO) {
|
||||
return success(Service.create(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("更新优惠券模板")
|
||||
@PreAuthorize("@ss.hasPermission('CouponTemplete::update')")
|
||||
public CommonResult<Boolean> update(@Valid @RequestBody CouponTempleteUpdateReqVO updateReqVO) {
|
||||
Service.update(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除优惠券模板")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('CouponTemplete::delete')")
|
||||
public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
Service.delete(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@ApiOperation("获得优惠券模板")
|
||||
// @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('CouponTemplete::query')")
|
||||
public CommonResult<CouponTempleteRespVO> get(@RequestParam("id") Long id) {
|
||||
CouponTempleteDO couponTempleteDO = Service.get(id);
|
||||
return success(CouponTempleteConvert.INSTANCE.convert(couponTempleteDO));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("获得优惠券模板列表")
|
||||
// @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
|
||||
@PreAuthorize("@ss.hasPermission('CouponTemplete::query')")
|
||||
public CommonResult<List<CouponTempleteRespVO>> getList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<CouponTempleteDO> list = Service.getList(ids);
|
||||
return success(CouponTempleteConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得优惠券模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('CouponTemplete::query')")
|
||||
public CommonResult<PageResult<CouponTempleteRespVO>> getPage(@Valid CouponTempletePageReqVO pageVO) {
|
||||
PageResult<CouponTempleteDO> pageResult = Service.getPage(pageVO);
|
||||
return success(CouponTempleteConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.templete;
|
||||
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.*;
|
||||
import cn.iocoder.yudao.module.coupon.convert.CouponTemplete.CouponTempleteConvert;
|
||||
import cn.iocoder.yudao.module.coupon.dal.dataobject.CouponTemplete.CouponTempleteDO;
|
||||
import cn.iocoder.yudao.module.coupon.service.CouponTemplete.CouponTempleteService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import javax.validation.*;
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Api(tags = "管理后台 - 优惠券模板")
|
||||
@RestController
|
||||
@RequestMapping("/coupon/template")
|
||||
@Validated
|
||||
public class CouponTempleteController {
|
||||
|
||||
@Resource
|
||||
private CouponTempleteService couponTempleteServiceService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建优惠券模板")
|
||||
@PreAuthorize("@ss.hasPermission('CouponTemplete::create')")
|
||||
public CommonResult<Long> create(@Valid @RequestBody CouponTempleteCreateReqVO createReqVO) {
|
||||
return success(couponTempleteServiceService.create(createReqVO));
|
||||
}
|
||||
|
||||
// @PutMapping("/update")
|
||||
// @ApiOperation("更新优惠券模板")
|
||||
// @PreAuthorize("@ss.hasPermission('CouponTemplete::update')")
|
||||
// public CommonResult<Boolean> update(@Valid @RequestBody CouponTempleteUpdateReqVO updateReqVO) {
|
||||
// couponTempleteServiceService.update(updateReqVO);
|
||||
// return success(true);
|
||||
// }
|
||||
//
|
||||
// @DeleteMapping("/delete")
|
||||
// @ApiOperation("删除优惠券模板")
|
||||
// @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
|
||||
// @PreAuthorize("@ss.hasPermission('CouponTemplete::delete')")
|
||||
// public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
// couponTempleteServiceService.delete(id);
|
||||
// return success(true);
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/get")
|
||||
// @ApiOperation("获得优惠券模板")
|
||||
// @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
// @PreAuthorize("@ss.hasPermission('CouponTemplete::query')")
|
||||
// public CommonResult<CouponTempleteRespVO> get(@RequestParam("id") Long id) {
|
||||
// CouponTempleteDO couponTempleteDO = couponTempleteServiceService.get(id);
|
||||
// return success(CouponTempleteConvert.INSTANCE.convert(couponTempleteDO));
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/list")
|
||||
// @ApiOperation("获得优惠券模板列表")
|
||||
// @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
|
||||
// @PreAuthorize("@ss.hasPermission('CouponTemplete::query')")
|
||||
// public CommonResult<List<CouponTempleteRespVO>> getList(@RequestParam("ids") Collection<Long> ids) {
|
||||
// List<CouponTempleteDO> list = couponTempleteServiceService.getList(ids);
|
||||
// return success(CouponTempleteConvert.INSTANCE.convertList(list));
|
||||
// }
|
||||
//
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得优惠券模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('CouponTemplete::query')")
|
||||
public CommonResult<PageResult<CouponTempleteRespVO>> getPage(@Valid CouponTempletePageReqVO pageVO) {
|
||||
PageResult<CouponTempleteDO> pageResult = couponTempleteServiceService.getPage(pageVO);
|
||||
return success(CouponTempleteConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo;
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.templete.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -34,7 +34,7 @@ public class CouponTempleteBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "适用商品类型1-全部商品可用;2-指定商品可用;3-指定商品不可用", required = true)
|
||||
@NotNull(message = "适用商品类型1-全部商品可用;2-指定商品可用;3-指定商品不可用不能为空")
|
||||
private Boolean goodsType;
|
||||
private Integer goodsType;
|
||||
|
||||
@ApiModelProperty(value = "适用商品id")
|
||||
private String productIds;
|
||||
@ -104,7 +104,7 @@ public class CouponTempleteBaseVO {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "领取是否无限制0-否 1是", required = true)
|
||||
@NotNull(message = "是否无限制0-否 1是 不能为空")
|
||||
@NotNull(message = "是否无限制0-否 1是")
|
||||
private Boolean whetherLimitless;
|
||||
|
||||
@ApiModelProperty(value = "每人最大领取个数", required = true)
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo;
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.templete.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo;
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.templete.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -39,7 +39,7 @@ public class CouponTempleteExcelVO {
|
||||
private Integer usedCount;
|
||||
|
||||
@ExcelProperty("适用商品类型1-全部商品可用;2-指定商品可用;3-指定商品不可用")
|
||||
private Boolean goodsType;
|
||||
private Integer goodsType;
|
||||
|
||||
@ExcelProperty("适用商品id")
|
||||
private String productIds;
|
||||
@ -66,7 +66,7 @@ public class CouponTempleteExcelVO {
|
||||
private BigDecimal maxMoney;
|
||||
|
||||
@ExcelProperty("过期类型1-时间范围过期 2-领取之日固定日期后过期 3-领取次日固定日期后过期")
|
||||
private Boolean validityType;
|
||||
private Integer validityType;
|
||||
|
||||
@ExcelProperty("使用开始日期 过期类型1时必填")
|
||||
private Date startUseTime;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo;
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.templete.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo;
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.templete.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo;
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.templete.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo;
|
||||
package cn.iocoder.yudao.module.coupon.controller.admin.templete.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
@ -4,10 +4,10 @@ import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.CouponTempleteCreateReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.CouponTempleteExcelVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.CouponTempleteRespVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.CouponTempleteUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.CouponTempleteCreateReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.CouponTempleteExcelVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.CouponTempleteRespVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.CouponTempleteUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.dal.dataobject.CouponTemplete.CouponTempleteDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
@ -57,7 +57,7 @@ public class CouponTempleteDO extends BaseDO {
|
||||
/**
|
||||
* 适用商品类型1-全部商品可用;2-指定商品可用;3-指定商品不可用
|
||||
*/
|
||||
private Boolean goodsType;
|
||||
private Integer goodsType;
|
||||
/**
|
||||
* 适用商品id
|
||||
*/
|
||||
@ -93,7 +93,7 @@ public class CouponTempleteDO extends BaseDO {
|
||||
/**
|
||||
* 过期类型1-时间范围过期 2-领取之日固定日期后过期 3-领取次日固定日期后过期
|
||||
*/
|
||||
private Boolean validityType;
|
||||
private Integer validityType;
|
||||
/**
|
||||
* 使用开始日期 过期类型1时必填
|
||||
*/
|
||||
|
@ -5,8 +5,8 @@ import java.util.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.CouponTempleteExportReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.CouponTempletePageReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.CouponTempleteExportReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.CouponTempletePageReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.dal.dataobject.CouponTemplete.CouponTempleteDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* coupon模块,主要负责麦一些优惠券的额增删
|
||||
*
|
||||
* 1. Controller URL:以 /coumon/ 开头,避免和其它 Module 冲突
|
||||
*/
|
||||
package cn.iocoder.yudao.module.coupon;
|
@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.coupon.service.CouponTemplete;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.*;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.coupon.dal.dataobject.CouponTemplete.CouponTempleteDO;
|
||||
|
||||
|
@ -2,14 +2,13 @@ package cn.iocoder.yudao.module.coupon.service.CouponTemplete;
|
||||
|
||||
import cn.iocoder.yudao.module.CouponTemplete.enums.CouponTypeEnum;
|
||||
import cn.iocoder.yudao.module.CouponTemplete.enums.CouponValidityTypeEnum;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.CouponTempleteCreateReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.CouponTempleteExportReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.CouponTempletePageReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.coupontemplete.vo.CouponTempleteUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.CouponTempleteCreateReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.CouponTempleteExportReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.CouponTempletePageReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.controller.admin.templete.vo.CouponTempleteUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.coupon.convert.CouponTemplete.CouponTempleteConvert;
|
||||
import cn.iocoder.yudao.module.coupon.dal.dataobject.CouponTemplete.CouponTempleteDO;
|
||||
import cn.iocoder.yudao.module.coupon.dal.mysql.CouponTemplete.CouponTempleteMapper;
|
||||
import cn.iocoder.yudao.module.coupon.service.CouponTemplete.CouponTempleteService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -41,7 +40,7 @@ public class CouponTempleteServiceImpl implements CouponTempleteService {
|
||||
/* 验证类型、判断必填*/
|
||||
checkCouponType(createReqVO);
|
||||
|
||||
/*todo 验证过期类型、判断必填*/
|
||||
/*验证过期类型、判断必填*/
|
||||
checkValidityType(createReqVO);
|
||||
|
||||
|
||||
|
@ -56,6 +56,11 @@
|
||||
<artifactId>yudao-module-trade-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-coupon-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- 数据报表 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.iocoder.boot</groupId>-->
|
||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
// 创建优惠券模板
|
||||
export function create(data) {
|
||||
return request({
|
||||
url: '/coupon/CouponTemplete/create',
|
||||
url: '/coupon/template/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@ -12,7 +12,7 @@ export function create(data) {
|
||||
// 更新优惠券模板
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/coupon/CouponTemplete/update',
|
||||
url: '/coupon/template/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@ -21,7 +21,7 @@ export function update(data) {
|
||||
// 删除优惠券模板
|
||||
export function deleteCouponTemplete (id) {
|
||||
return request({
|
||||
url: '/coupon/CouponTemplete/delete?id=' + id,
|
||||
url: '/coupon/template/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -29,7 +29,7 @@ export function deleteCouponTemplete (id) {
|
||||
// 获得优惠券模板
|
||||
export function get(id) {
|
||||
return request({
|
||||
url: '/coupon/CouponTemplete/get?id=' + id,
|
||||
url: '/coupon/template/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@ -37,7 +37,7 @@ export function get(id) {
|
||||
// 获得优惠券模板分页
|
||||
export function getPage(query) {
|
||||
return request({
|
||||
url: '/coupon/CouponTemplete/page',
|
||||
url: '/coupon/template/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@ -46,7 +46,7 @@ export function getPage(query) {
|
||||
// 导出优惠券模板 Excel
|
||||
export function exportExcel(query) {
|
||||
return request({
|
||||
url: '/coupon/CouponTemplete/export-excel',
|
||||
url: '/coupon/template/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
|
@ -43,7 +43,6 @@
|
||||
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="用户ID" align="center" prop="id" />
|
||||
|
||||
<!-- todo 优惠券类型-->
|
||||
<el-table-column label="优惠券类型" align="center" prop="type" />
|
||||
@ -229,6 +228,7 @@
|
||||
|
||||
<script>
|
||||
import { create, update, deleteCouponTemplete, get, getPage, exportExcel } from "@/api/mall/CouponTemplete/CouponTemplete.js";
|
||||
import {getDictDatas} from "@/utils/dict";
|
||||
|
||||
export default {
|
||||
name: "",
|
||||
@ -288,6 +288,9 @@ export default {
|
||||
endTime: [],
|
||||
createTime: [],
|
||||
},
|
||||
//数据字典
|
||||
datas:getDictDatas(),
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
Loading…
Reference in New Issue
Block a user