|
|
|
@ -10,6 +10,8 @@ import au.com.royalpay.payment.tools.env.PlatformEnvironment;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
@ -27,6 +29,8 @@ public class HfUpdateImpl implements HfUpdateService {
|
|
|
|
|
@Resource
|
|
|
|
|
private RpayApi rpayApi;
|
|
|
|
|
|
|
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String updateStatus() {
|
|
|
|
|
List<JSONObject> clientIds = clientMapper.findByhfPayUrlNotNull();
|
|
|
|
@ -48,10 +52,15 @@ public class HfUpdateImpl implements HfUpdateService {
|
|
|
|
|
@Override
|
|
|
|
|
public String rpayUpdate() {
|
|
|
|
|
List<JSONObject> clientIds = clientMapper.findByrpayNotNull();
|
|
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
|
|
clientIds.forEach(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";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|