diff --git a/mallinkService/src/main/java/com/iformall/service/park/impl/haikangweishiv3/HaiKangWeiShiV3ParkService.java b/mallinkService/src/main/java/com/iformall/service/park/impl/haikangweishiv3/HaiKangWeiShiV3ParkService.java index b177a29f1..b3a5e0d71 100644 --- a/mallinkService/src/main/java/com/iformall/service/park/impl/haikangweishiv3/HaiKangWeiShiV3ParkService.java +++ b/mallinkService/src/main/java/com/iformall/service/park/impl/haikangweishiv3/HaiKangWeiShiV3ParkService.java @@ -186,14 +186,14 @@ public class HaiKangWeiShiV3ParkService extends BaseParkService implements ParkA return new ResultData(ErrorCode.CYF_STOP_FEE_FAIL.getCode(),"当前用户未查询到手机号!"+userCar.getcUserId()); } - Map valueMap = WxParkCouponConfig.parseValue(userCar.getVendorParams()); - if (null == valueMap) { - return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"当前停车券没有关联停车场优惠券配置。"+coupon.getTitle()); - } - String couponCode = valueMap.get("couponCode"); - if (StringUtils.isBlank(couponCode)) { - return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"当前停车券没有关联停车场优惠券配置[couponCode]。"+coupon.getTitle()); - } +// Map valueMap = WxParkCouponConfig.parseValue(userCar.getVendorParams()); +// if (null == valueMap) { +// return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"当前停车券没有关联停车场优惠券配置。"+coupon.getTitle()); +// } +// String couponCode = valueMap.get("couponCode"); +// if (StringUtils.isBlank(couponCode)) { +// return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"当前停车券没有关联停车场优惠券配置[couponCode]。"+coupon.getTitle()); +// } //查询临停信息,判断缓存是否已经存在 JSONObject stopInfo = haikangV3.getCarStopFee(park, carNumber, getConfig(park),null); @@ -208,7 +208,7 @@ public class HaiKangWeiShiV3ParkService extends BaseParkService implements ParkA String couponStart = dateToISO8601Time(coupon.getValidStartDate()); String couponEnd = dateToISO8601Time(coupon.getValidEndDate()); ArtemisConfig config = getConfig(park); - JSONObject retObj = haikangV3.useCoupon(park,config,carNumber,couponCode,couponStart,couponEnd,coupon); + JSONObject retObj = haikangV3.useCoupon(park,config,carNumber,couponStart,couponEnd,coupon); haikangV3.getCarStopFee(park, carNumber, config,null); RedisCacheUtils.cache(redisTemplate, "carStop:haikangv3StopInfoUseCoupon:"+carNumber+":"+inRecordSyscode, 1, 24*3600); return new ResultData(); diff --git a/mallinkService/src/main/java/com/iformall/service/park/impl/haikangweishiv3/HaiKangWeiShiV3Util.java b/mallinkService/src/main/java/com/iformall/service/park/impl/haikangweishiv3/HaiKangWeiShiV3Util.java index f7af87f50..2c88289fb 100644 --- a/mallinkService/src/main/java/com/iformall/service/park/impl/haikangweishiv3/HaiKangWeiShiV3Util.java +++ b/mallinkService/src/main/java/com/iformall/service/park/impl/haikangweishiv3/HaiKangWeiShiV3Util.java @@ -12,6 +12,7 @@ import com.iformall.domain.po.WxPark; import com.iformall.enums.EnumCouponUnit; import com.iformall.exception.MallinkException; import com.iformall.utils.DateUtils; +import com.iformall.utils.Utility; import lombok.extern.slf4j.Slf4j; @@ -154,7 +155,7 @@ public class HaiKangWeiShiV3Util { /** * 使用优惠券 **/ - public JSONObject useCoupon(WxPark wxPark,ArtemisConfig config,String carNumber,String couponCode,String start,String end,WxCoupon coupon){ + public JSONObject useCoupon(WxPark wxPark,ArtemisConfig config,String carNumber,String start,String end,WxCoupon coupon){ String vendroParams = wxPark.getVendorParams(); JSONObject vp = JSON.parseObject(vendroParams); @@ -164,7 +165,7 @@ public class HaiKangWeiShiV3Util { JSONObject ob = new JSONObject(); //ob.put("ruleSyscode", ruleSyscode); ob.put("merchantSyscode", merchantSysCode); - ob.put("couponCode", couponCode); + ob.put("couponCode", Utility.generate32UUID()); ob.put("plateNo", carNumber); ob.put("parkSyscode", wxPark.getParkingId()); if (coupon.getUnit().intValue() == EnumCouponUnit.MONEY.getCode().intValue()) {