Commit 2dac0d21 authored by 周健威's avatar 周健威

优惠券,权限相关

parent 321b7e80
package com.github.wxiaoqi.security.auth.client.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 检测是否符合端登录
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(value={ElementType.METHOD,ElementType.TYPE})
public @interface CheckBizType {
}
...@@ -91,6 +91,9 @@ public class User { ...@@ -91,6 +91,9 @@ public class User {
@Column(name = "data_corporation") @Column(name = "data_corporation")
private String dataCorporation; private String dataCorporation;
@Column(name = "biz_type")
private String bizType;
private String attr1; private String attr1;
private String attr2; private String attr2;
......
...@@ -3,6 +3,7 @@ package com.xxfc.platform.activity.dto; ...@@ -3,6 +3,7 @@ package com.xxfc.platform.activity.dto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.persistence.Column;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
...@@ -103,4 +104,11 @@ public class CouponDTO { ...@@ -103,4 +104,11 @@ public class CouponDTO {
@ApiModelProperty(value = "跳转链接") @ApiModelProperty(value = "跳转链接")
private String url; private String url;
/**
* 可使用门店ids
*/
@Column(name = "company_ids")
@ApiModelProperty(value = "可使用门店ids")
private String companyIds;
} }
...@@ -237,11 +237,18 @@ public class Coupon implements Serializable { ...@@ -237,11 +237,18 @@ public class Coupon implements Serializable {
@ApiModelProperty(value = "创建时间", hidden = true ) @ApiModelProperty(value = "创建时间", hidden = true )
private Long updTime; private Long updTime;
/** /**
* 是否删除;0-正常;1-删除 * 是否删除;0-正常;1-删除
*/ */
@Column(name = "is_del") @Column(name = "is_del")
@ApiModelProperty(value = "是否删除;0-正常;1-删除") @ApiModelProperty(value = "是否删除;0-正常;1-删除")
private Integer isDel; private Integer isDel;
/**
* 可使用门店ids
*/
@Column(name = "company_ids")
@ApiModelProperty(value = "可使用门店ids")
private String companyIds;
} }
...@@ -106,6 +106,12 @@ public class UserCoupon implements Serializable { ...@@ -106,6 +106,12 @@ public class UserCoupon implements Serializable {
@Column(name = "is_del") @Column(name = "is_del")
@ApiModelProperty(value = "是否删除;0-正常;1-删除") @ApiModelProperty(value = "是否删除;0-正常;1-删除")
private Integer isDel; private Integer isDel;
/**
* 可使用门店ids
*/
@Column(name = "company_ids")
@ApiModelProperty(value = "可使用门店ids")
private String companyIds;
} }
...@@ -161,6 +161,7 @@ public class OrderCalculateBiz { ...@@ -161,6 +161,7 @@ public class OrderCalculateBiz {
if(StrUtil.isNotBlank(baseOrder.getCouponTickerNos())) { if(StrUtil.isNotBlank(baseOrder.getCouponTickerNos())) {
List<BigDecimal> couponAmounts = Lists.newArrayList(); List<BigDecimal> couponAmounts = Lists.newArrayList();
for(String tickerNo : baseOrder.getCouponTickerNos().split(",")) { for(String tickerNo : baseOrder.getCouponTickerNos().split(",")) {
//如果优惠券已经使用了,则会返回 0 元
BigDecimal couponAmount = activityFeign.use(baseOrder.getUserId(), Lists.newArrayList(tickerNo), baseOrder.getNo(), Coupon.CHANNEL_RENT, consumeAmount, ActivityFeign.TYPE_CHECK); BigDecimal couponAmount = activityFeign.use(baseOrder.getUserId(), Lists.newArrayList(tickerNo), baseOrder.getNo(), Coupon.CHANNEL_RENT, consumeAmount, ActivityFeign.TYPE_CHECK);
if(couponAmount.compareTo(BigDecimal.ZERO) > 0) { if(couponAmount.compareTo(BigDecimal.ZERO) > 0) {
//能够使用优惠券,则不返还 //能够使用优惠券,则不返还
......
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