diff --git a/schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java b/schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java index 40c3535..b313d88 100644 --- a/schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java +++ b/schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java @@ -258,12 +258,12 @@ public class TradeOrderSchedule { @Scheduled(cron="0 0/1 * * * ?") public void tradeOrderSettle() { Map param = new HashMap<>(); - param.put("status", "3"); + param.put("statusList", "3,6"); param.put("settleAmountIsNull", true); Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DAY_OF_MONTH, -2); - param.put("payTimeS", calendar.getTimeInMillis()); + param.put("payTimeS", calendar.getTimeInMillis()); List tradeOrderList = tradeOrderService.getTradeOrderList(param); for (BsTradeOrder tradeOrder : tradeOrderList) { diff --git a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java index aeb22f5..eeb7c0b 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java @@ -24,10 +24,7 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.math.BigDecimal; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; @Service("tradeOrderService") public class BsTradeOrderServiceImpl implements BsTradeOrderService { @@ -405,6 +402,15 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService { criteria.andStatusEqualTo(MapUtils.getInteger(param, "status")); } + if (StringUtils.isNotBlank(MapUtils.getString(param, "statusList"))) { + String[] statusLists = MapUtils.getString(param, "statusList").split(","); + List statusList = new ArrayList<>(); + for (String s : statusLists) { + statusList.add(Integer.parseInt(s)); + } + criteria.andStatusIn(statusList); + } + if (StringUtils.isNotBlank(MapUtils.getString(param, "settleAmountIsNull"))) { criteria.andSettleAmountIsNull(); }