|
|
|
@@ -16,9 +16,14 @@ import com.iformall.service.park.entity.ParkNotifyPaid; |
|
|
|
import com.iformall.service.park.entity.ParkPaidNotifyResult; |
|
|
|
import com.iformall.service.park.entity.ParkStopFee; |
|
|
|
import com.iformall.service.park.impl.BaseParkService; |
|
|
|
import com.iformall.utils.RedisCacheUtils; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Qualifier; |
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
@@ -30,6 +35,11 @@ public class BoLinkParkService extends BaseParkService implements ParkAdapterSer |
|
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Qualifier("objectCommonRedisTemplate") |
|
|
|
RedisTemplate<String, Object> redisTemplate; |
|
|
|
|
|
|
|
BoLinkUtil bolinkUtil = new BoLinkUtil(); |
|
|
|
|
|
|
|
@Override |
|
|
|
@@ -129,6 +139,14 @@ public class BoLinkParkService extends BaseParkService implements ParkAdapterSer |
|
|
|
|
|
|
|
String orderId = feeDataObj.getString("order_id"); |
|
|
|
|
|
|
|
Integer used = RedisCacheUtils.getCacheInteger(redisTemplate, "carStop:bolinkStopInfoUseCoupon:"+carNumber+":"+orderId); |
|
|
|
if (null == used || (null != used && used.intValue() < 1) ) { |
|
|
|
//do nothing |
|
|
|
}else { |
|
|
|
return new ResultData(ErrorCode.CYF_STOP_FEE_FAIL.getCode(), "已经使用过优惠券, 不能重复使用."); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String amount = ""; |
|
|
|
if (coupon.getUnit().equals(EnumCouponUnit.MONEY.getCode())) { |
|
|
|
amount = coupon.getPriceStr(); |
|
|
|
|