| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.taoke.autopay.dto.UserSubmitKeyLimitDto; |
| | | import com.taoke.autopay.entity.OrderChannelEnum; |
| | | import com.taoke.autopay.entity.SystemConfigKeyEnum; |
| | | import com.taoke.autopay.service.SystemConfigService; |
| | | import com.taoke.autopay.service.UserSettingService; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int getLimitCountByTotalCount(int totalCount) { |
| | | public int getLimitCountByTotalCount(long totalCount, OrderChannelEnum orderChannel) { |
| | | List<UserSubmitKeyLimitDto> list = getUserSubmitKeyCountList(true); |
| | | if (list.size() == 0) { |
| | | return Integer.MAX_VALUE; |
| | | } |
| | | for (UserSubmitKeyLimitDto t : list) { |
| | | if (totalCount >= t.getTotalCount()) { |
| | | return t.getPerCount(); |
| | | if(orderChannel==OrderChannelEnum.cyx){ |
| | | return t.getPerCountCyx(); |
| | | } |
| | | else if(orderChannel==OrderChannelEnum.bps){ |
| | | return t.getPerCountBps(); |
| | | } |
| | | else if(orderChannel==OrderChannelEnum.unknown){ |
| | | return t.getPerCountUnknown(); |
| | | } |
| | | return Integer.MAX_VALUE; |
| | | } |
| | | } |
| | | return Integer.MAX_VALUE; |