admin
2020-07-03 651a15c78f668bef3859d9ed1bb7ad0b669d3600
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/FloatADServiceImpl.java
@@ -12,6 +12,7 @@
import javax.annotation.Resource;
import com.yeshi.fanli.entity.SystemEnum;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -174,7 +175,6 @@
   /**
    * 删除图片-不更新数据库
    * @param record
    * @throws Exception
    */
   public void removePicture(String picture) throws Exception {
@@ -392,13 +392,12 @@
      }
   }
   
   @Cacheable(value = "configCache", key = "'getValidFloatADCache-'+#position+'-'+#type+'-'+#platform+'-'+#versionCode")
   @Cacheable(value = "configCache", key = "'getValidFloatADCache-'+#position+'-'+#type+'-'+#platform+'-'+#versionCode+'-'+system")
   @Override
   public List<FloatAD> getValidFloatADCache(String position, Integer type, String platform, Integer versionCode) {
   public List<FloatAD> getValidFloatADCache(String position, Integer type, String platform, Integer versionCode, SystemEnum system) {
      List<FloatAD> list = floatADMapper.getValidFloatAD(position, type);
      // 过滤
      filterFloatAD(list, platform, versionCode);
      filterFloatAD(list, platform, versionCode,system);
      return list;
   }
   
@@ -409,10 +408,10 @@
    * @param platform
    * @param versionCode
    */
   private void filterFloatAD(List<FloatAD> list, String platform, int versionCode) {
   private void filterFloatAD(List<FloatAD> list, String platform, int versionCode, SystemEnum system) {
      if (list == null || list.size() == 0)
         return;
      AppVersionInfo app = appVersionService.getClientVersion(platform, versionCode);
      AppVersionInfo app = appVersionService.getClientVersion(platform, versionCode,system);
      if (app == null) {
         list.clear();
         return;