| | |
| | | import com.taoke.autopay.utils.order.DYOrderApi; |
| | | import com.taoke.autopay.utils.order.OrderChannelUtil; |
| | | import com.taoke.autopay.vo.SubmitKeyInfo; |
| | | import com.taoke.autopay.vo.admin.IgnoreAgentOrderSettingVO; |
| | | import net.sf.json.JSONArray; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | } |
| | | } |
| | | |
| | | // 获取渠道忽略订单的配置 |
| | | String config = systemConfigService.getValueCache(SystemConfigKeyEnum.IGNORE_AGENT_ORDER_SETTING); |
| | | if (!StringUtil.isNullOrEmpty(config)) { |
| | | IgnoreAgentOrderSettingVO ignore = JsonUtil.getSimpleGson().fromJson(config, IgnoreAgentOrderSettingVO.class); |
| | | if (ignore.getPercent() > 0) { |
| | | // 获取当前代理今日的订单数量 |
| | | KeyOrderMapper.DaoQuery daoQuery = new KeyOrderMapper.DaoQuery(); |
| | | daoQuery.agentId = agent.getId(); |
| | | daoQuery.minCreateTime = new Date(TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyyMMdd"), "yyyyMMdd")); |
| | | long keyCount = count(daoQuery); |
| | | if (keyCount > ignore.getBeginCount()) { |
| | | if ((keyCount - ignore.getBeginCount()) % (100 / ignore.getPercent()) == 0) { |
| | | order.setIgnore(true); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | order.setAgentId(agent.getId()); |
| | | } |
| | | } |