Commit dedbcb64 by 吕明尚

验劵失败不删除redis

parent 09ce4e33
......@@ -235,13 +235,6 @@ public class QPServiceImpl implements QPService {
TuangouReceiptConsume tuangouReceiptConsume = new TuangouReceiptConsume(request);
TuangouReceiptConsumeResponse invoke = openAPIClient.invoke(tuangouReceiptConsume);
if (invoke.getCode() != 200) {
//删除redis中的值
String value = redisUtil.get(ReceiptRdeisEnum.PREPARE.getValue() + code);
JSONObject jsonObject = new JSONObject(value);
Long consumerCouponId = jsonObject.getLong("consumerCouponId");
//删除数据库中的值
isConsumerCouponService.deleteSConsumerCouponById(consumerCouponId);
redisUtil.delete(ReceiptRdeisEnum.PREPARE.getValue() + code);
throw new RuntimeException(invoke.getMsg());
}
redisUtil.delete(ReceiptRdeisEnum.PREPARE.getValue() + code);
......
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