admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
fanli/src/main/java/com/yeshi/fanli/service/impl/push/OPPOPushServiceImpl.java
@@ -15,7 +15,6 @@
import com.yeshi.fanli.entity.AppVersionInfo;
import com.yeshi.fanli.entity.bus.user.UserCustomSettings;
import com.yeshi.fanli.entity.bus.user.UserCustomSettings.UserSettingTypeEnum;
import com.yeshi.fanli.entity.push.DeviceTokenHW;
import com.yeshi.fanli.entity.push.DeviceTokenOPPO;
import com.yeshi.fanli.exception.push.PushException;
import com.yeshi.fanli.log.PushLogHelper;
@@ -24,7 +23,6 @@
import com.yeshi.fanli.service.inter.push.OPPOPushService;
import com.yeshi.fanli.service.inter.user.UserCustomSettingsService;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.push.HWPushUtil;
import com.yeshi.fanli.util.push.OPPOPushUtil;
@Service
@@ -42,7 +40,7 @@
   private List<Integer> getVersionCodeList(List<Integer> versionCodeList) {
      List<Integer> versionList = new ArrayList<>();
      if (versionCodeList == null) {// 全推
         List<AppVersionInfo> appInfoList = appVersionService.listByPlatformAndMinVersionCode("android", 49);
         List<AppVersionInfo> appInfoList = appVersionService.listByPlatformAndMinVersionCode("android", 51);
         if (appInfoList != null)
            for (AppVersionInfo version : appInfoList) {
               versionList.add(version.getVersionCode());
@@ -50,7 +48,7 @@
      } else {// 按版本推送
         for (Integer versionCode : versionCodeList) {
            if (versionCode.intValue() >= 49) {// 2.0.1开始支持
            if (versionCode.intValue() >= 51) {// 2.0.1开始支持
               versionList.add(versionCode);
            }
         }
@@ -107,6 +105,11 @@
   }
   private List<DeviceTokenOPPO> filterDeviceToken(List<DeviceTokenOPPO> deviceList, int hour) {
      // TODO 消息免打扰关闭
      if (1 > 0)
         return deviceList;
      // 处理消息免打扰
      if (hour >= 20 || hour < 8) {
         Set<Long> uidSets = new HashSet<>();