luoyang 6 years ago
parent aba4101dd7
commit 71bad3b7c3

@ -10,6 +10,8 @@ import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@ -27,6 +29,8 @@ public class HfUpdateImpl implements HfUpdateService {
@Resource @Resource
private RpayApi rpayApi; private RpayApi rpayApi;
private Logger logger = LoggerFactory.getLogger(getClass());
@Override @Override
public String updateStatus() { public String updateStatus() {
List<JSONObject> clientIds = clientMapper.findByhfPayUrlNotNull(); List<JSONObject> clientIds = clientMapper.findByhfPayUrlNotNull();
@ -48,10 +52,15 @@ public class HfUpdateImpl implements HfUpdateService {
@Override @Override
public String rpayUpdate() { public String rpayUpdate() {
List<JSONObject> clientIds = clientMapper.findByrpayNotNull(); List<JSONObject> clientIds = clientMapper.findByrpayNotNull();
StringBuffer sb = new StringBuffer();
clientIds.forEach(dbResult -> { clientIds.forEach(dbResult -> {
rpayApi.modifySurchargeConfig(dbResult); try {
rpayApi.modifySurchargeConfig(dbResult);
} catch (Exception e) {
sb.append("【" + dbResult.getString("client_moniker") + "】、");
}
}); });
logger.info("test for update rpay clearing date,fail + " + sb.toString());
return "ok"; return "ok";
} }
} }

Loading…
Cancel
Save