|
|
@ -5,16 +5,14 @@ import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.events.ClientSignEvent;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.events.ClientSignEvent;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
|
|
import org.joda.time.DateTime;
|
|
|
|
import org.joda.time.DateTime;
|
|
|
|
import org.springframework.context.ApplicationListener;
|
|
|
|
import org.springframework.context.ApplicationListener;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Created by yixian on 2017-04-11.
|
|
|
|
* Created by yixian on 2017-04-11.
|
|
|
@ -41,7 +39,7 @@ public class NewRateEventListener implements ApplicationListener<ClientSignEvent
|
|
|
|
rate.setActiveTime(new DateTime(2017, 5, 1, 0, 0, 0, 0).toDate());
|
|
|
|
rate.setActiveTime(new DateTime(2017, 5, 1, 0, 0, 0, 0).toDate());
|
|
|
|
rate.setExpiryTime(new DateTime(2018, 5, 1, 0, 0, 0, 0).toDate());
|
|
|
|
rate.setExpiryTime(new DateTime(2018, 5, 1, 0, 0, 0, 0).toDate());
|
|
|
|
rate.setCleanDays(currentRate.getInteger("clean_days") == null ? clientConfig.getIntValue("clean_days") : currentRate.getIntValue("clean_days"));
|
|
|
|
rate.setCleanDays(currentRate.getInteger("clean_days") == null ? clientConfig.getIntValue("clean_days") : currentRate.getIntValue("clean_days"));
|
|
|
|
rate.setRateValue(Math.min(1.4, currentRate.getDoubleValue("rate_value")));
|
|
|
|
rate.setRateValue(BigDecimal.valueOf(1.4).min(currentRate.getBigDecimal("rate_value")));
|
|
|
|
JSONObject mockManager = new JSONObject();
|
|
|
|
JSONObject mockManager = new JSONObject();
|
|
|
|
mockManager.put("manager_id", 0);
|
|
|
|
mockManager.put("manager_id", 0);
|
|
|
|
mockManager.put("display_name", "System");
|
|
|
|
mockManager.put("display_name", "System");
|
|
|
|