|
|
@ -84,9 +84,10 @@ public class HighCouponSchedule { |
|
|
|
|
|
|
|
|
|
|
|
if (jsonObject.getString("respCode").equals("0000")) { |
|
|
|
if (jsonObject.getString("respCode").equals("0000")) { |
|
|
|
JSONObject data = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data")); |
|
|
|
JSONObject data = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data")); |
|
|
|
|
|
|
|
if (data.getString("respCode").equals("0000")) { |
|
|
|
if (data.getString("respCode").equals("0000") && data.getJSONObject("data").getInteger("state") != 20) { |
|
|
|
JSONObject responseObject = JSONObject.parseObject(data.getString("data")); |
|
|
|
couponCodeOther.setStatus(data.getJSONObject("data").getInteger("state")); |
|
|
|
if (responseObject.getInteger("state") != 20) { |
|
|
|
|
|
|
|
couponCodeOther.setStatus(responseObject.getInteger("state")); |
|
|
|
highCouponCodeOtherMapper.updateByPrimaryKey(couponCodeOther); |
|
|
|
highCouponCodeOtherMapper.updateByPrimaryKey(couponCodeOther); |
|
|
|
|
|
|
|
|
|
|
|
if (couponCodeOther.getCouponAgentCodeId() != null) { |
|
|
|
if (couponCodeOther.getCouponAgentCodeId() != null) { |
|
|
@ -103,7 +104,7 @@ public class HighCouponSchedule { |
|
|
|
List<HighUserCoupon> list = highUserCouponMapper.selectByExample(userCouponExample); |
|
|
|
List<HighUserCoupon> list = highUserCouponMapper.selectByExample(userCouponExample); |
|
|
|
if (list.size() > 0) { |
|
|
|
if (list.size() > 0) { |
|
|
|
HighUserCoupon userCoupon = list.get(0); |
|
|
|
HighUserCoupon userCoupon = list.get(0); |
|
|
|
if (data.getJSONObject("data").getInteger("state") == 40) { |
|
|
|
if (responseObject.getInteger("state") == 40) { |
|
|
|
userCoupon.setStatus(2); |
|
|
|
userCoupon.setStatus(2); |
|
|
|
userCoupon.setConsumeTime(new Date()); |
|
|
|
userCoupon.setConsumeTime(new Date()); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -118,7 +119,7 @@ public class HighCouponSchedule { |
|
|
|
highOrderService.childOrderComplete(couponCodeOther.getChildOrderId()); |
|
|
|
highOrderService.childOrderComplete(couponCodeOther.getChildOrderId()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|