|
|
|
@ -2,7 +2,7 @@ package au.com.royalpay.payment.manage.management.sysconfig.core.impls;
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.management.sysconfig.core.SysPaymentConfig;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.RateMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.SysPaymentConfigMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.SysChannelConfigMapper;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -14,21 +14,21 @@ import java.util.List;
|
|
|
|
|
@Service
|
|
|
|
|
public class SysPaymentConfigImpl implements SysPaymentConfig {
|
|
|
|
|
@Resource
|
|
|
|
|
private SysPaymentConfigMapper sysPaymentConfigMapper;
|
|
|
|
|
private SysChannelConfigMapper sysChannelConfigMapper;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<JSONObject> getPaymentChannel() {
|
|
|
|
|
return sysPaymentConfigMapper.selectAll();
|
|
|
|
|
return sysChannelConfigMapper.selectAll();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void updatePaymentChannel(JSONObject manager, String channel, int type) {
|
|
|
|
|
JSONObject paymentConfig = sysPaymentConfigMapper.find(channel, type);
|
|
|
|
|
JSONObject paymentConfig = sysChannelConfigMapper.find(channel, type);
|
|
|
|
|
if (paymentConfig == null) {
|
|
|
|
|
throw new BadRequestException("不存在该快捷通道");
|
|
|
|
|
}
|
|
|
|
|
Date lastUpdateTime = new Date();
|
|
|
|
|
sysPaymentConfigMapper.updatePaymentConfig(channel, type, lastUpdateTime, manager.getString("display_name"), false);
|
|
|
|
|
sysPaymentConfigMapper.updatePaymentConfig(channel, type, lastUpdateTime, manager.getString("display_name"), true);
|
|
|
|
|
sysChannelConfigMapper.updatePaymentConfig(channel, type, lastUpdateTime, manager.getString("display_name"), false);
|
|
|
|
|
sysChannelConfigMapper.updatePaymentConfig(channel, type, lastUpdateTime, manager.getString("display_name"), true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|