coupon Date

This commit is contained in:
376654749@qq.com 2022-03-14 15:18:34 +08:00
parent 666b2c581d
commit b3ddebce4e

View File

@ -59,11 +59,10 @@ public class CouponService {
for(int i = 0;i < jsonArray.size();i ++){ for(int i = 0;i < jsonArray.size();i ++){
JSONObject jsonResult = (JSONObject)jsonArray.get(i); JSONObject jsonResult = (JSONObject)jsonArray.get(i);
if(jsonResult.getString("udf2") != null) { if(jsonResult.getString("udf2") != null) {
//&&compareDate.compareTo(currentDate)>=0 Date compareDate = SmartDateUtil.parseYMD(jsonResult.get("fValidTo").toString());
Date compareDate = SmartDateUtil.parseYMD(jsonResult.get("fValidFrom").toString()); if ("H5".equals(jsonResult.getString("udf2"))&&"".equals(productCode)&&compareDate.compareTo(currentDate)!=-1) {
if ("H5".equals(jsonResult.getString("udf2"))&&"".equals(productCode)&&compareDate.compareTo(currentDate)==-1) {
afterFilterArrary.add(jsonResult); afterFilterArrary.add(jsonResult);
}else if ("H5".equals(jsonResult.getString("udf2"))&&!"".equals(productCode)&&compareDate.compareTo(currentDate)==-1){ }else if ("H5".equals(jsonResult.getString("udf2"))&&!"".equals(productCode)&&compareDate.compareTo(currentDate)!=-1){
for(int g = 0 ;g<productCode.length;g++) { for(int g = 0 ;g<productCode.length;g++) {
if ((jsonResult.get("productCodes") != null ? jsonResult.get("productCodes").toString().indexOf(productCode[g]) : "".indexOf(productCode[g])) != -1 || jsonResult.get("productCodes") == null) { if ((jsonResult.get("productCodes") != null ? jsonResult.get("productCodes").toString().indexOf(productCode[g]) : "".indexOf(productCode[g])) != -1 || jsonResult.get("productCodes") == null) {
afterFilterArrary.add(jsonResult); afterFilterArrary.add(jsonResult);