From 4f5a5b0a00c01491f009074351089f086f950d3e Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 01 六月 2021 19:09:48 +0800 Subject: [PATCH] 系统配置改为数据库 --- fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java | 42 +++++++++++++++++++----------------------- 1 files changed, 19 insertions(+), 23 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java index a1fbb3b..60ed236 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java @@ -12,6 +12,7 @@ import com.yeshi.fanli.entity.xinge.PushRecord; import com.yeshi.fanli.exception.push.PushException; import com.yeshi.fanli.service.inter.config.AppVersionService; +import com.yeshi.fanli.service.inter.config.SystemConfigService; import com.yeshi.fanli.service.inter.push.*; import com.yeshi.fanli.service.inter.user.SystemZnxService; import com.yeshi.fanli.util.Constant; @@ -24,22 +25,13 @@ @Service public class PushServiceImpl implements PushService { - static String IOSBundleId = ""; static String PROJECT_NAME = ""; static { - IOSBundleId = Constant.systemCommonConfig.getIosBundleId(); PROJECT_NAME = Constant.systemCommonConfig.getProjectChineseName(); } - - @Resource - private PushRecordService pushRecordService; - @Resource private SystemZnxService systemZnxService; - - @Resource - private DeviceTokenHWService deviceTokenHWService; @Resource private IOSPushService iosPushService; @@ -65,6 +57,10 @@ @Resource private AppVersionService appVersionService; + + @Resource + private SystemConfigService systemConfigService; + @Override public void pushGoods(Long uid, String title, String content, String url, List<String> listIOS, List<String> listAndroid, SystemEnum system) throws PushException { @@ -82,7 +78,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�0 String codes = getEffectiveVersionCodes(0, AppVersionInfo.PLATFORM_IOS, listIOS, system); if (listIOS == null || (listIOS.size() > 0 && codes != null && codes.trim().length() > 0)) { - iosPushService.pushGoods(uid, Long.parseLong(gid), title, content, codes); + iosPushService.pushGoods(uid, Long.parseLong(gid), title, content, codes, system); } } @@ -91,7 +87,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�0 String versions = getEffectiveVersions(0, AppVersionInfo.PLATFORM_ANDROID, listAndroid, system); if (listAndroid == null || (listAndroid.size() > 0 && versions != null && versions.trim().length() > 0)) { - xmPushService.pushGoods(uid, Long.parseLong(gid), title, content, versions); + xmPushService.pushGoods(uid, Long.parseLong(gid), title, content, versions, system); } // 鍗庝负鎺ㄩ�� if (listAndroid == null || listAndroid.size() > 0) { @@ -146,7 +142,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�0 String codes = getEffectiveVersionCodes(0, AppVersionInfo.PLATFORM_IOS, listIOS, system); if (listIOS == null || (listIOS.size() > 0 && codes != null && codes.trim().length() > 0)) { - iosPushService.pushUrl(uid, url, title, content, codes); + iosPushService.pushUrl(uid, url, title, content, codes,system); } } @@ -155,7 +151,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�0 String versions = getEffectiveVersions(0, AppVersionInfo.PLATFORM_ANDROID, listAndroid, system); if (listAndroid == null || (listAndroid.size() > 0 && versions != null && versions.trim().length() > 0)) { - xmPushService.pushUrl(uid, url, title, content, versions); + xmPushService.pushUrl(uid, url, title, content, versions,system); } // 鍗庝负鎺ㄩ�� @@ -229,7 +225,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�0 String codes = getEffectiveVersionCodes(0, AppVersionInfo.PLATFORM_IOS, listIOS, system); if (listIOS == null || (listIOS.size() > 0 && codes != null && codes.trim().length() > 0)) { - iosPushService.pushZNX(uId, accountMessage, systemZnx, codes); + iosPushService.pushZNX(uId, accountMessage, systemZnx, codes,system); } } @@ -238,7 +234,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�0 String versions = getEffectiveVersions(0, AppVersionInfo.PLATFORM_ANDROID, listAndroid, system); if (listAndroid == null || (listAndroid.size() > 0 && versions != null && versions.trim().length() > 0)) { - xmPushService.pushZNX(uId, accountMessage, systemZnx, versions); + xmPushService.pushZNX(uId, accountMessage, systemZnx, versions,system); } // 鍗庝负鎺ㄩ�� @@ -292,7 +288,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�0 String codes = getEffectiveVersionCodes(0, AppVersionInfo.PLATFORM_IOS, listIOS, system); if (listIOS == null || (listIOS.size() > 0 && codes != null && codes.trim().length() > 0)) { - iosPushService.pushWEEX(uid, title, content, weexUrl, codes); + iosPushService.pushWEEX(uid, title, content, weexUrl, codes,system); } } @@ -301,7 +297,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�31 String versions = getEffectiveVersions(0, AppVersionInfo.PLATFORM_ANDROID, listAndroid, system); if (listAndroid == null || (listAndroid.size() > 0 && versions != null && versions.trim().length() > 0)) { - xmPushService.pushWEEX(uid, title, content, weexUrl, versions); + xmPushService.pushWEEX(uid, title, content, weexUrl, versions,system); } } @@ -356,7 +352,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�0 String codes = getEffectiveVersionCodes(0, AppVersionInfo.PLATFORM_IOS, listIOS, system); if (listIOS == null || (listIOS.size() > 0 && codes != null && codes.trim().length() > 0)) { - iosPushService.pushBaiChuanUrl(uid, title, content, url, codes); + iosPushService.pushBaiChuanUrl(uid, title, content, url, codes,system); } } @@ -365,7 +361,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�31 String versions = getEffectiveVersions(31, AppVersionInfo.PLATFORM_ANDROID, listAndroid, system); if (listAndroid == null || (listAndroid.size() > 0 && versions != null && versions.trim().length() > 0)) { - xmPushService.pushBaiChuanUrl(uid, title, content, url, versions); + xmPushService.pushBaiChuanUrl(uid, title, content, url, versions,system); } } @@ -419,7 +415,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�0 String codes = getEffectiveVersionCodes(0, AppVersionInfo.PLATFORM_IOS, listIOS, system); if (listIOS == null || (listIOS.size() > 0 && codes != null && codes.trim().length() > 0)) { - iosPushService.pushWelfareCenter(uid, title, content, codes); + iosPushService.pushWelfareCenter(uid, title, content, codes,system); } } @@ -428,7 +424,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�36 String versions = getEffectiveVersions(36, AppVersionInfo.PLATFORM_ANDROID, listAndroid, system); if (listAndroid == null || (listAndroid.size() > 0 && versions != null && versions.trim().length() > 0)) { - xmPushService.pushWelfareCenter(uid, title, content, versions); + xmPushService.pushWelfareCenter(uid, title, content, versions,system); } } @@ -558,7 +554,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�1.6.5浠ュ悗 String codes = getEffectiveVersionCodes(60, AppVersionInfo.PLATFORM_IOS, listIOS, system); if (listIOS == null || (listIOS.size() > 0 && codes != null && codes.trim().length() > 0)) { - iosPushService.pushUserSignInNotification(uid, title, content, codes); + iosPushService.pushUserSignInNotification(uid, title, content, codes,system); } } @@ -567,7 +563,7 @@ // 闄愬埗鎺ㄩ�佺増鏈彿锛�1.6.5浠ュ悗 String versions = getEffectiveVersions(47, AppVersionInfo.PLATFORM_ANDROID, listAndroid, system); if (listAndroid == null || (listAndroid.size() > 0 && versions != null && versions.trim().length() > 0)) { - xmPushService.pushUserSignInNotification(uid, title, content, versions); + xmPushService.pushUserSignInNotification(uid, title, content, versions,system); } } -- Gitblit v1.8.0