Commit bd77492a authored by 周健威's avatar 周健威

优惠券相关

parent 87bfb286
package com.xxfc.platform.activity.dto;
import com.xxfc.platform.activity.entity.Coupon;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -13,7 +14,7 @@ import java.math.BigDecimal;
* @data 2019/7/23 15:00
*/
@Data
public class CouponDTO {
public class CouponDTO extends Coupon {
@ApiModelProperty("主键id")
private Integer id;
......@@ -34,7 +35,7 @@ public class CouponDTO {
private Integer used;
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地")
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇")
private Integer channel;
......@@ -86,7 +87,7 @@ public class CouponDTO {
private Long endTime;
@ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)")
@ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)3永久有效")
private Integer validType;
......@@ -111,4 +112,11 @@ public class CouponDTO {
@Column(name = "company_ids")
@ApiModelProperty(value = "可使用门店ids")
private String companyIds;
/**
* 是否可领取;0-否;1-是
*/
@Column(name = "is_led")
@ApiModelProperty(value = "是否可领取;0-否;1-是")
private Integer isLed;
}
......@@ -63,10 +63,10 @@ public class Coupon implements Serializable {
private Integer used;
/**
* 0-全平台;1-租车;2-旅游;3-营地
* 0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇
*/
@Column(name = "channel")
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地")
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇")
private Integer channel;
/**
......@@ -154,10 +154,10 @@ public class Coupon implements Serializable {
private Long endTime;
/**
* 时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)
* 时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)3永久有效
*/
@Column(name = "valid_type")
@ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)")
@ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)3永久有效")
private Integer validType;
/**
......@@ -257,4 +257,11 @@ public class Coupon implements Serializable {
@Column(name = "is_led")
@ApiModelProperty(value = "是否可领取;0-否;1-是")
private Integer isLed;
/**
* 平台类型 1--运营平台;2--商家平台
*/
@Column(name = "biz_type")
@ApiModelProperty(value = "平台类型 1--运营平台;2--商家平台")
private Integer bizType;
}
......@@ -27,7 +27,7 @@ public class CouponPagVo extends Coupon {
@ApiModelProperty(value = "图片")
private String icon;
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地")
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇")
private Integer channel;
@ApiModelProperty(value = "1满减券 2叠加满减券 3无门槛券(需要限制大小)")
......
......@@ -33,7 +33,7 @@ public class CouponVo {
private Integer used;
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地")
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇")
private Integer channel;
......@@ -85,7 +85,7 @@ public class CouponVo {
private Long endTime;
@ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)")
@ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)3永久有效")
private Integer validType;
......
......@@ -102,9 +102,9 @@ public class UserCouponVo {
private Integer used;
/**
* 0-全平台;1-租车;2-旅游;3-营地
* 0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇
*/
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地")
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇")
private Integer channel;
/**
......
......@@ -67,6 +67,9 @@ public class CouponBiz extends BaseBiz<CouponMapper, Coupon> {
if (Objects.nonNull(couponFindDTO.getStatus())){
criteria.andEqualTo("status",couponFindDTO.getStatus());
}
if (Objects.nonNull(couponFindDTO.getBizType())){
criteria.andEqualTo("bizType",couponFindDTO.getBizType());
}
if(CollUtil.isNotEmpty(couponFindDTO.getCompanyIds())) {
criteria.andIn("companyIds", couponFindDTO.getCompanyIds());
}
......
......@@ -63,7 +63,7 @@ public class CouponAdminController implements UserRestInterface {
}
@ApiOperation("查询优惠券详情")
@GetMapping("/{id}")
@GetMapping("/operate/{id}")
public ObjectRestResponse<CouponVo> findCouponById(@PathVariable(value = "id") Integer id){
CouponVo couponVo = couponBiz.findCouponById(id);
return ObjectRestResponse.succ(couponVo);
......@@ -83,10 +83,10 @@ public class CouponAdminController implements UserRestInterface {
}
@ApiOperation("优惠劵逻辑删除")
@DeleteMapping("/{id}")
@DeleteMapping("/operate/{id}")
public ObjectRestResponse<Void> deleteCouponById(@PathVariable(value = "id") Integer id,UserDTO userDTO){
couponBiz.updateCouponDelStateById(id,userDTO);
return ObjectRestResponse.succ();
couponBiz.updateCouponDelStateById(id,userDTO);
return ObjectRestResponse.succ();
}
@ApiOperation("检查优惠劵是否已经在使用阶段")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment