!190 fitler data except H5 data

Merge pull request !190 from Admin/sit-Carl-V3
This commit is contained in:
Admin 2022-02-18 08:12:20 +00:00 committed by Gitee
commit 248f2d426d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -89,9 +89,10 @@ public class OrderController {
JSONObject jsonObject = JSONObject.parseObject(couponInfo);
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data"));
JSONObject jsonObjectData = (JSONObject) jsonArray.get(0);
if (jsonObjectData.getString("udf2") != "H5"){
return ResponseDTO.wrap(OrderResponseCodeConst.COUPON_USE_FAIL);
if (jsonObjectData.getString("udf2") != null){
if (!jsonObjectData.getString("udf2").equals("H5")){
return ResponseDTO.wrap(OrderResponseCodeConst.COUPON_USE_FAIL);
}
}
ordersEntity.setCouponAmount(jsonObjectData.getString("couponAmount") == null ? jsonObjectData.getString("discount") : jsonObjectData.getString("couponAmount"));
ordersEntity.setCouponCode(jsonObjectData.getString("couponCode"));