diff --git a/src/main/java/au/com/royalpay/payment/manage/management/sysconfig/core/impls/SysPaymentConfigImpl.java b/src/main/java/au/com/royalpay/payment/manage/management/sysconfig/core/impls/SysPaymentConfigImpl.java index 11623dbda..67d7af1ef 100644 --- a/src/main/java/au/com/royalpay/payment/manage/management/sysconfig/core/impls/SysPaymentConfigImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/management/sysconfig/core/impls/SysPaymentConfigImpl.java @@ -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 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); } } diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysPaymentConfigMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysChannelConfigMapper.java similarity index 84% rename from src/main/java/au/com/royalpay/payment/manage/mappers/system/SysPaymentConfigMapper.java rename to src/main/java/au/com/royalpay/payment/manage/mappers/system/SysChannelConfigMapper.java index 04d707498..2d4eb5549 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysPaymentConfigMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysChannelConfigMapper.java @@ -1,6 +1,5 @@ package au.com.royalpay.payment.manage.mappers.system; -import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect; import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper; import cn.yixblog.support.mybatis.autosql.annotations.AutoSql; import cn.yixblog.support.mybatis.autosql.annotations.SqlType; @@ -10,8 +9,8 @@ import org.apache.ibatis.annotations.Param; import java.util.Date; import java.util.List; -@AutoMapper(tablename = "sys_payment_config",pkName = "channel") -public interface SysPaymentConfigMapper { +@AutoMapper(tablename = "cb_channel_config",pkName = "channel_id") +public interface SysChannelConfigMapper { @AutoSql(type = SqlType.SELECT) List selectAll(); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 220fe6366..124e10295 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -296,7 +296,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Resource private RiskAttentionMerchantsMapper riskAttentionMerchantsMapper; @Resource - private SysPaymentConfigMapper sysPaymentConfigMapper; + private SysChannelConfigMapper sysChannelConfigMapper; @Resource private SmsSender smsSender; @@ -4265,7 +4265,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (client == null) { throw new BadRequestException("partner code is not exists!"); } - JSONObject paymentConfig = sysPaymentConfigMapper.findOne(1); + JSONObject paymentConfig = sysChannelConfigMapper.findOne(1); if (paymentConfig == null) { throw new BadRequestException("服务商未开启快捷支付"); } @@ -4297,7 +4297,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (client == null) { throw new BadRequestException("partner code is not exists!"); } - JSONObject paymentConfig = sysPaymentConfigMapper.findOne(1); + JSONObject paymentConfig = sysChannelConfigMapper.findOne(1); if (paymentConfig == null) { throw new BadRequestException("服务商未开启快捷支付"); } diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/SysPaymentConfigMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/SysChannelConfigMapper.xml similarity index 82% rename from src/main/resources/au/com/royalpay/payment/manage/mappers/system/SysPaymentConfigMapper.xml rename to src/main/resources/au/com/royalpay/payment/manage/mappers/system/SysChannelConfigMapper.xml index 6b270ceed..a7bc1b1af 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/SysPaymentConfigMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/SysChannelConfigMapper.xml @@ -1,8 +1,8 @@ - + - update sys_payment_config + update cb_channel_config SET is_valid = #{is_valid},last_update_by = #{last_update_by},last_update_date = #{last_update_date} type = #{type} @@ -15,6 +15,6 @@ \ No newline at end of file