Sfoglia il codice sorgente

[积分][修改]:积分兑换添加券过期判断

release_toaliyun_real
hanxueda 7 anni fa
parent
commit
6da8f3bc2d
2 ha cambiato i file con 12 aggiunte e 7 eliminazioni
  1. +7
    -6
      mallinkService/src/main/java/com/iformall/domain/po/WxCreditHistory.java
  2. +5
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java

+ 7
- 6
mallinkService/src/main/java/com/iformall/domain/po/WxCreditHistory.java Vedi File

@@ -1,13 +1,14 @@
package com.iformall.domain.po; package com.iformall.domain.po;


import lombok.Data; import lombok.Data;
import javax.persistence.*;
import java.util.*;
import java.math.*;
import javax.persistence.Transient;
import java.util.List;

import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@Table(name = "wx_credit_history") @Table(name = "wx_credit_history")
@Data @Data
@@ -60,7 +61,7 @@ public class WxCreditHistory implements Serializable {
@io.swagger.annotations.ApiModelProperty(value="小票URL",name="receiptUrl") @io.swagger.annotations.ApiModelProperty(value="小票URL",name="receiptUrl")
private String receiptUrl; private String receiptUrl;
/**操作人类型*/ /**操作人类型*/
@io.swagger.annotations.ApiModelProperty(value="操作人类型",name="operatorType")
@io.swagger.annotations.ApiModelProperty(value="操作人类型 1:C端用户,2:A端会员,3:B端用户,4:A端用户",name="operatorType")
private Integer operatorType; private Integer operatorType;
/**操作人ID*/ /**操作人ID*/
@io.swagger.annotations.ApiModelProperty(value="操作人ID",name="operatorId") @io.swagger.annotations.ApiModelProperty(value="操作人ID",name="operatorId")


+ 5
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java Vedi File

@@ -321,9 +321,13 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService {
log.error("券已下架, couponId: " + couponIdStr); log.error("券已下架, couponId: " + couponIdStr);
throw new MallinkException(ErrorCode.COUPON_IS_TAKE_OFF); throw new MallinkException(ErrorCode.COUPON_IS_TAKE_OFF);
} }
if (coupon.getSalePrice() != 0) {
/*if (coupon.getSalePrice() != 0) {
log.error("券不免费, couponId: " + couponIdStr); log.error("券不免费, couponId: " + couponIdStr);
throw new MallinkException(ErrorCode.COUPON_IS_NOT_FREE); throw new MallinkException(ErrorCode.COUPON_IS_NOT_FREE);
}*/
if (coupon.getValidEndDate() != null && coupon.getValidEndDate().before(new Date())) {
log.error("此券已过期, couponId: " + couponIdStr);
throw new MallinkException(ErrorCode.COUPON_IS_EXPIRED);
} }


// 减库存操作 // 减库存操作


Caricamento…
Annulla
Salva