Browse Source

[A端][更改]:更改购买发券的数据结构

release_toaliyun_real
hupeng 7 years ago
parent
commit
fb0cc694ab
1 changed files with 26 additions and 5 deletions
  1. +26
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java

+ 26
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java View File

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.IdWorker;
@@ -72,13 +73,33 @@ public class WxCouponSendServiceImpl implements WxCouponSendService {

if (wxCouponSend.getSendType().equals(EnumCouponSendSendType.C_ORDER.getCode())){
WxOrder wxOrder = (WxOrder)param;
if (wxCouponSend.getCondition() == null)
return true;
if (wxOrder.getProductId().equals(Long.valueOf(wxCouponSend.getCondition())))
return true;

try {
JSONObject jo = JSONObject.parseObject(wxCouponSend.getCondition());
if (wxOrder.getProductId().equals(jo.getLong("id")))
return true;
else
return false;
} catch (Exception e) {
return false;
}

} else if (wxCouponSend.getSendType().equals(EnumCouponSendSendType.CAR_STOP.getCode())){


return true;
}else if (wxCouponSend.getSendType().equals(EnumCouponSendSendType.B_MICROPAY.getCode())){


return true;
}else if (wxCouponSend.getSendType().equals(EnumCouponSendSendType.COUPON_VERIFY.getCode())){


return true;
}else {
return false;
}
return true;
}

@Override


Loading…
Cancel
Save