adding generateOrder error msg logic

This commit is contained in:
376654749@qq.com 2022-03-11 17:07:41 +08:00
parent ac5c91d901
commit 2f0ba25c69
2 changed files with 3 additions and 3 deletions

View File

@ -55,13 +55,13 @@ public class CouponConfigService {
Date compareDate = SmartDateUtil.parseYMD(jsonResult.get("fPublishTo").toString());
if ("H5".equals(jsonResult.getString("udf2"))&&"".equals(storeCode)&&!"".equals(productCode)) {
for(int g = 0 ;g<productCode.length;g++) {
if ((jsonResult.get("productCodes")!=null?jsonResult.get("productCodes").toString().indexOf(productCode[g]):"".indexOf(productCode[g])) != -1&&compareDate.compareTo(currentDate)>=0) {
if (((jsonResult.get("productCodes")!=null?jsonResult.get("productCodes").toString().indexOf(productCode[g]):"".indexOf(productCode[g])) != -1||jsonResult.get("productCodes")==null)&&compareDate.compareTo(currentDate)>=0) {
afterFilterArrary.add(jsonResult);
}
}
}else if ("H5".equals(jsonResult.getString("udf2"))&&!"".equals(storeCode)&&!"".equals(productCode)){
for(int g = 0 ;g<productCode.length;g++) {
if ((jsonResult.get("productCodes")!=null?jsonResult.get("productCodes").toString().indexOf(productCode[g]):"".indexOf(productCode[g])) != -1 && couponConfigFindAllEntity.getStoreCode().equals(jsonResult.get("storeCodes")!=null ?jsonResult.get("storeCodes").toString():"")&&compareDate.compareTo(currentDate)>=0) {
if (((jsonResult.get("productCodes")!=null?jsonResult.get("productCodes").toString().indexOf(productCode[g]):"".indexOf(productCode[g])) != -1 ||jsonResult.get("productCodes")==null)&& couponConfigFindAllEntity.getStoreCode().equals(jsonResult.get("storeCodes")!=null ?jsonResult.get("storeCodes").toString():"")&&compareDate.compareTo(currentDate)>=0) {
afterFilterArrary.add(jsonResult);
}
}

View File

@ -57,7 +57,7 @@ public class CouponService {
if ("H5".equals(jsonResult.getString("udf2"))&&"".equals(productCode)) {
afterFilterArrary.add(jsonResult);
}else if ("H5".equals(jsonResult.getString("udf2"))&&!"".equals(productCode)){
if ((jsonResult.get("productCodes")!=null?jsonResult.get("productCodes").toString().indexOf(productCode):"".indexOf(productCode)) != -1){
if ((jsonResult.get("productCodes")!=null?jsonResult.get("productCodes").toString().indexOf(productCode):"".indexOf(productCode)) != -1 ||jsonResult.get("productCodes")==null){
afterFilterArrary.add(jsonResult);
}
}