Commit bc302b2f authored by hezhen's avatar hezhen

Merge branch 'dev-chw' of http://113.105.137.151:22280/youjj/cloud-platform into dev-chw

parents 9bf36139 ae9c84d9
package com.xxfc.platform.activity.dto; package com.xxfc.platform.activity.dto;
import com.xxfc.platform.activity.entity.Coupon;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -13,7 +14,7 @@ import java.math.BigDecimal; ...@@ -13,7 +14,7 @@ import java.math.BigDecimal;
* @data 2019/7/23 15:00 * @data 2019/7/23 15:00
*/ */
@Data @Data
public class CouponDTO { public class CouponDTO extends Coupon {
@ApiModelProperty("主键id") @ApiModelProperty("主键id")
private Integer id; private Integer id;
...@@ -34,7 +35,7 @@ public class CouponDTO { ...@@ -34,7 +35,7 @@ public class CouponDTO {
private Integer used; private Integer used;
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地") @ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇")
private Integer channel; private Integer channel;
...@@ -86,7 +87,7 @@ public class CouponDTO { ...@@ -86,7 +87,7 @@ public class CouponDTO {
private Long endTime; private Long endTime;
@ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)") @ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)3永久有效")
private Integer validType; private Integer validType;
...@@ -111,4 +112,11 @@ public class CouponDTO { ...@@ -111,4 +112,11 @@ public class CouponDTO {
@Column(name = "company_ids") @Column(name = "company_ids")
@ApiModelProperty(value = "可使用门店ids") @ApiModelProperty(value = "可使用门店ids")
private String companyIds; 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 { ...@@ -63,10 +63,10 @@ public class Coupon implements Serializable {
private Integer used; private Integer used;
/** /**
* 0-全平台;1-租车;2-旅游;3-营地 * 0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇
*/ */
@Column(name = "channel") @Column(name = "channel")
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地") @ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇")
private Integer channel; private Integer channel;
/** /**
...@@ -154,10 +154,10 @@ public class Coupon implements Serializable { ...@@ -154,10 +154,10 @@ public class Coupon implements Serializable {
private Long endTime; private Long endTime;
/** /**
* 时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效) * 时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)3永久有效
*/ */
@Column(name = "valid_type") @Column(name = "valid_type")
@ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)") @ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)3永久有效")
private Integer validType; private Integer validType;
/** /**
...@@ -257,4 +257,11 @@ public class Coupon implements Serializable { ...@@ -257,4 +257,11 @@ public class Coupon implements Serializable {
@Column(name = "is_led") @Column(name = "is_led")
@ApiModelProperty(value = "是否可领取;0-否;1-是") @ApiModelProperty(value = "是否可领取;0-否;1-是")
private Integer isLed; 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 { ...@@ -27,7 +27,7 @@ public class CouponPagVo extends Coupon {
@ApiModelProperty(value = "图片") @ApiModelProperty(value = "图片")
private String icon; private String icon;
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地") @ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇")
private Integer channel; private Integer channel;
@ApiModelProperty(value = "1满减券 2叠加满减券 3无门槛券(需要限制大小)") @ApiModelProperty(value = "1满减券 2叠加满减券 3无门槛券(需要限制大小)")
......
...@@ -33,7 +33,7 @@ public class CouponVo { ...@@ -33,7 +33,7 @@ public class CouponVo {
private Integer used; private Integer used;
@ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地") @ApiModelProperty(value = "0-全平台;1-租车;2-旅游;3-营地;4--会员; 5-机车;6-游艇")
private Integer channel; private Integer channel;
...@@ -85,7 +85,7 @@ public class CouponVo { ...@@ -85,7 +85,7 @@ public class CouponVo {
private Long endTime; private Long endTime;
@ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)") @ApiModelProperty(value = "时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)3永久有效")
private Integer validType; private Integer validType;
......
...@@ -102,9 +102,9 @@ public class UserCouponVo { ...@@ -102,9 +102,9 @@ public class UserCouponVo {
private Integer used; 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; private Integer channel;
/** /**
......
...@@ -67,6 +67,9 @@ public class CouponBiz extends BaseBiz<CouponMapper, Coupon> { ...@@ -67,6 +67,9 @@ public class CouponBiz extends BaseBiz<CouponMapper, Coupon> {
if (Objects.nonNull(couponFindDTO.getStatus())){ if (Objects.nonNull(couponFindDTO.getStatus())){
criteria.andEqualTo("status",couponFindDTO.getStatus()); criteria.andEqualTo("status",couponFindDTO.getStatus());
} }
if (Objects.nonNull(couponFindDTO.getBizType())){
criteria.andEqualTo("bizType",couponFindDTO.getBizType());
}
if(CollUtil.isNotEmpty(couponFindDTO.getCompanyIds())) { if(CollUtil.isNotEmpty(couponFindDTO.getCompanyIds())) {
criteria.andIn("companyIds", couponFindDTO.getCompanyIds()); criteria.andIn("companyIds", couponFindDTO.getCompanyIds());
} }
......
...@@ -20,6 +20,8 @@ import org.springframework.web.bind.annotation.*; ...@@ -20,6 +20,8 @@ import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_FALSE;
/** /**
* @author libin * @author libin
* @version 1.0 * @version 1.0
...@@ -64,10 +66,14 @@ public class CouponAdminController implements UserRestInterface { ...@@ -64,10 +66,14 @@ public class CouponAdminController implements UserRestInterface {
} }
@ApiOperation("查询优惠券详情") @ApiOperation("查询优惠券详情")
@GetMapping("/{id}") @GetMapping("/operate/{id}")
public ObjectRestResponse<CouponVo> findCouponById(@PathVariable(value = "id") Integer id){ public ObjectRestResponse<Coupon> findCouponById(@PathVariable(value = "id") Integer id){
CouponVo couponVo = couponBiz.findCouponById(id); Coupon coupon = couponBiz.selectByWeekend(w -> {
return ObjectRestResponse.succ(couponVo); w.andEqualTo(Coupon::getId, id);
w.andEqualTo(Coupon::getIsDel, SYS_FALSE);
return w;
}).get(0);
return ObjectRestResponse.succ(coupon);
} }
@ApiOperation("获取优惠劵标题列表") @ApiOperation("获取优惠劵标题列表")
...@@ -84,10 +90,10 @@ public class CouponAdminController implements UserRestInterface { ...@@ -84,10 +90,10 @@ public class CouponAdminController implements UserRestInterface {
} }
@ApiOperation("优惠劵逻辑删除") @ApiOperation("优惠劵逻辑删除")
@DeleteMapping("/{id}") @DeleteMapping("/operate/{id}")
public ObjectRestResponse<Void> deleteCouponById(@PathVariable(value = "id") Integer id,UserDTO userDTO){ public ObjectRestResponse<Void> deleteCouponById(@PathVariable(value = "id") Integer id,UserDTO userDTO){
couponBiz.updateCouponDelStateById(id,userDTO); couponBiz.updateCouponDelStateById(id,userDTO);
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
} }
@ApiOperation("检查优惠劵是否已经在使用阶段") @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