Merge branch 'master_hotfix' into develop

master
wangning 7 years ago
commit 15f8023802

@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.List;
@ -28,6 +29,9 @@ public class BillOrderCheckTask {
@Scheduled(cron = "0 0/3 * * * ?")
public void checkGreenChannel() {
List<String> orderIds = billOrderMapper.findOrderIdByStatus("0");
if(CollectionUtils.isEmpty(orderIds)){
return;
}
orderIds.forEach((p) -> {
JSONObject order = orderMapper.find(p);
if(order.getIntValue("status")==3||order.getIntValue("status")==1){

@ -1,15 +1,16 @@
package au.com.royalpay.payment.manage.task;
import java.util.List;
import javax.annotation.Resource;
import au.com.royalpay.payment.manage.mappers.ofei.TopUpOrderMapper;
import au.com.royalpay.payment.manage.ofei.core.OfeiServer;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import au.com.royalpay.payment.manage.mappers.ofei.TopUpOrderMapper;
import au.com.royalpay.payment.manage.ofei.core.OfeiServer;
import java.util.List;
import javax.annotation.Resource;
/**
* Created by wangning on 2018/1/2.
@ -24,6 +25,9 @@ public class OfeiOrderCheckTask {
@Scheduled(cron = "0 0/20 * * * ?")
public void checkGreenChannel(){
List<String> orderIds = topUpOrderMapper.findOrderIdByStatus("10");
if(CollectionUtils.isEmpty(orderIds)){
return;
}
for (String orderId : orderIds) {
ofeiServer.checkOrder(orderId);
}

Loading…
Cancel
Save