| | |
| | |
|
| | | Long id = record.getId();
|
| | | if (id == null) {
|
| | | int maxOrder = floatADMapper.getMaxOrderByPosition(position);
|
| | | int maxOrder = floatADMapper.getMaxOrderByPosition(position,record.getSystem());
|
| | | record.setPicture(picture);
|
| | | Integer state = record.getState();
|
| | | if (state == null) {
|
| | |
| | | String position = resultObj.getPosition();
|
| | |
|
| | | // 获取交换对象
|
| | | FloatAD exchangeObject = floatADMapper.getByAdjoinOrder(position, order, moveType);
|
| | | FloatAD exchangeObject = floatADMapper.getByAdjoinOrder(position, order, moveType,resultObj.getSystem());
|
| | | if (exchangeObject == null) {
|
| | | if (moveType == 1) {
|
| | | throw new FloatADException(1, "在相同使用地方中优先级已经最低了");
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public List<FloatAD> listQuery(long start, int count, String key, Integer state) throws FloatADException {
|
| | | public List<FloatAD> listQuery(long start, int count, String key, Integer state,SystemEnum system) throws FloatADException {
|
| | |
|
| | | List<FloatAD> listQuery = floatADMapper.listQuery(start, count, key, state);
|
| | | List<FloatAD> listQuery = floatADMapper.listQuery(start, count, key, state,system);
|
| | | if (listQuery == null || listQuery.size() == 0) {
|
| | | return listQuery;
|
| | | }
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Integer state) {
|
| | | return floatADMapper.countQuery(key, state);
|
| | | public long countQuery(String key, Integer state,SystemEnum system) {
|
| | | return floatADMapper.countQuery(key, state,system);
|
| | | }
|
| | |
|
| | | @Cacheable(value = "configCache", key = "'getEffectiveFloatAD-'+#position+'-'+#type")
|
| | | @Override
|
| | | public FloatAD getEffectiveFloatAD(String position, Integer type) {
|
| | | FloatAD floatAD = floatADMapper.getEffectiveFloatAD(position, type);
|
| | | public FloatAD getEffectiveFloatAD(String position, Integer type,SystemEnum system) {
|
| | | FloatAD floatAD = floatADMapper.getEffectiveFloatAD(position, type,system);
|
| | | if (floatAD != null) {
|
| | | JumpDetailV2 jumpDetail = floatAD.getJumpDetail();
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Cacheable(value = "configCache", key = "'getValidFloatADCache-'+#position+'-'+#type+'-'+#platform+'-'+#versionCode+'-'+system")
|
| | | @Cacheable(value = "configCache", key = "'getValidFloatADCache-'+#position+'-'+#type+'-'+#platform+'-'+#versionCode+'-'+#system")
|
| | | @Override
|
| | | public List<FloatAD> getValidFloatADCache(String position, Integer type, String platform, Integer versionCode, SystemEnum system) {
|
| | | List<FloatAD> list = floatADMapper.getValidFloatAD(position, type);
|
| | | List<FloatAD> list = floatADMapper.getValidFloatAD(position, type,system);
|
| | | // 过滤
|
| | | filterFloatAD(list, platform, versionCode,system);
|
| | | return list;
|