mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
adding generateOrder error msg logic
This commit is contained in:
parent
fc878707a0
commit
ac5c91d901
@ -51,17 +51,17 @@ public class CouponConfigService {
|
|||||||
com.alibaba.fastjson.JSONArray afterFilterArrary = new JSONArray();
|
com.alibaba.fastjson.JSONArray afterFilterArrary = new JSONArray();
|
||||||
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&& !"0".equals(jsonResult.getString("leftAllotment"))) {
|
||||||
Date compareDate = SmartDateUtil.parseYMD(jsonResult.get("fPublishTo").toString());
|
Date compareDate = SmartDateUtil.parseYMD(jsonResult.get("fPublishTo").toString());
|
||||||
if ("H5".equals(jsonResult.getString("udf2"))&&"".equals(storeCode)&&!"".equals(productCode)) {
|
if ("H5".equals(jsonResult.getString("udf2"))&&"".equals(storeCode)&&!"".equals(productCode)) {
|
||||||
for(int g = 0 ;g<productCode.length;g++) {
|
for(int g = 0 ;g<productCode.length;g++) {
|
||||||
if (jsonResult.get("productCodes").toString().indexOf(productCode[g]) != -1&&compareDate.compareTo(currentDate)>=0) {
|
if ((jsonResult.get("productCodes")!=null?jsonResult.get("productCodes").toString().indexOf(productCode[g]):"".indexOf(productCode[g])) != -1&&compareDate.compareTo(currentDate)>=0) {
|
||||||
afterFilterArrary.add(jsonResult);
|
afterFilterArrary.add(jsonResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if ("H5".equals(jsonResult.getString("udf2"))&&!"".equals(storeCode)&&!"".equals(productCode)){
|
}else if ("H5".equals(jsonResult.getString("udf2"))&&!"".equals(storeCode)&&!"".equals(productCode)){
|
||||||
for(int g = 0 ;g<productCode.length;g++) {
|
for(int g = 0 ;g<productCode.length;g++) {
|
||||||
if (jsonResult.get("productCodes").toString().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 && couponConfigFindAllEntity.getStoreCode().equals(jsonResult.get("storeCodes")!=null ?jsonResult.get("storeCodes").toString():"")&&compareDate.compareTo(currentDate)>=0) {
|
||||||
afterFilterArrary.add(jsonResult);
|
afterFilterArrary.add(jsonResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public class CouponService {
|
|||||||
if ("H5".equals(jsonResult.getString("udf2"))&&"".equals(productCode)) {
|
if ("H5".equals(jsonResult.getString("udf2"))&&"".equals(productCode)) {
|
||||||
afterFilterArrary.add(jsonResult);
|
afterFilterArrary.add(jsonResult);
|
||||||
}else if ("H5".equals(jsonResult.getString("udf2"))&&!"".equals(productCode)){
|
}else if ("H5".equals(jsonResult.getString("udf2"))&&!"".equals(productCode)){
|
||||||
if (jsonResult.get("productCodes").toString().indexOf(productCode) != -1){
|
if ((jsonResult.get("productCodes")!=null?jsonResult.get("productCodes").toString().indexOf(productCode):"".indexOf(productCode)) != -1){
|
||||||
afterFilterArrary.add(jsonResult);
|
afterFilterArrary.add(jsonResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user