|
|
|
@ -30,6 +30,7 @@ import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.parser.Feature;
|
|
|
|
|
import org.apache.commons.codec.binary.Base64;
|
|
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
@ -459,16 +460,14 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<JSONObject> getSysRate(JSONObject sysConfig){
|
|
|
|
|
JSONObject sysConfigs = JSONObject.parseObject(sysConfig.getString("sys_apply_rates"));
|
|
|
|
|
|
|
|
|
|
HashMap<String, JSONObject> map = JSON.parseObject(sysConfig.getString("sys_apply_rates"),LinkedHashMap.class, Feature.OrderedField);
|
|
|
|
|
List<JSONObject> rates= new ArrayList<>();
|
|
|
|
|
JSONObject tName = new JSONObject();
|
|
|
|
|
tName.put("t1","T+1");
|
|
|
|
|
tName.put("t2","T+2");
|
|
|
|
|
tName.put("t3","T+3");
|
|
|
|
|
|
|
|
|
|
for(String strt:sysConfigs.keySet()){
|
|
|
|
|
JSONObject t = sysConfigs.getJSONObject(strt);
|
|
|
|
|
for( String strt:map.keySet()){
|
|
|
|
|
JSONObject t = map.get(strt);
|
|
|
|
|
List<JSONObject> data = new ArrayList<>();
|
|
|
|
|
for(String str:t.keySet()){
|
|
|
|
|
JSONObject rate = new JSONObject();
|
|
|
|
@ -477,7 +476,6 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
|
|
|
|
|
data.add(rate);
|
|
|
|
|
}
|
|
|
|
|
JSONObject temp = new JSONObject();
|
|
|
|
|
data = data.stream().sorted((log1, log2) -> log1.getString("channel").compareTo(log2.getString("channel"))).collect(Collectors.toList());
|
|
|
|
|
temp.put("data",data);
|
|
|
|
|
temp.put("name",tName.getString(strt));
|
|
|
|
|
rates.add(temp);
|
|
|
|
@ -755,7 +753,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
|
|
|
|
|
sysRate.put("remark", "自主申请");
|
|
|
|
|
sysRate.put("create_time", new Date());
|
|
|
|
|
sysRate.put("update_time", new Date());
|
|
|
|
|
sysRate.put("active_time", DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
|
|
|
|
|
sysRate.put("active_time", DateFormatUtils.format(DateUtils.addDays(new Date(),-1), "yyyy-MM-dd"));
|
|
|
|
|
sysRate.put("expiry_time", DateFormatUtils.format(DateUtils.addYears(new Date(), 1), "yyyy-MM-dd"));
|
|
|
|
|
|
|
|
|
|
JSONObject rateConfig = JSONObject.parseObject(sysConfig.getString("sys_apply_rates"));
|
|
|
|
|