|  | @ -26,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 | 
												
													
														
															|  | import org.springframework.data.redis.core.StringRedisTemplate;
 |  | import org.springframework.data.redis.core.StringRedisTemplate;
 | 
												
													
														
															|  | import org.springframework.stereotype.Service;
 |  | import org.springframework.stereotype.Service;
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | import javax.annotation.PostConstruct;
 | 
												
													
														
															|  | import java.util.List;
 |  | import java.util.List;
 | 
												
													
														
															|  | import java.util.Map;
 |  | import java.util.Map;
 | 
												
													
														
															|  | 
 |  | 
 | 
												
											
												
													
														
															|  | @ -65,6 +66,17 @@ public class GetuiService {
 | 
												
													
														
															|  |     /**
 |  |     /**
 | 
												
													
														
															|  |      * 初始化接口参数
 |  |      * 初始化接口参数
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  | 
 |  |     @PostConstruct
 | 
												
													
														
															|  | 
 |  |     public void clientInit(){
 | 
												
													
														
															|  | 
 |  |         if(pushApi == null){
 | 
												
													
														
															|  | 
 |  |             synchronized(GetuiService.class){
 | 
												
													
														
															|  | 
 |  |                 if(pushApi == null){
 | 
												
													
														
															|  | 
 |  |                     pushApi = forceInit();
 | 
												
													
														
															|  | 
 |  |                 }
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     private void init(){
 |  |     private void init(){
 | 
												
													
														
															|  |         if(redisTemplate.hasKey(key+ ":AppID")){
 |  |         if(redisTemplate.hasKey(key+ ":AppID")){
 | 
												
													
														
															|  |             AppID = redisTemplate.opsForValue().get(key + ":AppID");
 |  |             AppID = redisTemplate.opsForValue().get(key + ":AppID");
 | 
												
											
												
													
														
															|  | @ -85,7 +97,7 @@ public class GetuiService {
 | 
												
													
														
															|  |     /**
 |  |     /**
 | 
												
													
														
															|  |      * 如果修改了数据库参数,调用下这个方法
 |  |      * 如果修改了数据库参数,调用下这个方法
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  |     public void forceInit(){
 |  | 
 | 
												
													
														
															|  | 
 |  |     public PushApi forceInit(){
 | 
												
													
														
															|  |         List<WlyyHospitalSysDictDO> dictDOList = sysDictDao.findByDictName(key);
 |  |         List<WlyyHospitalSysDictDO> dictDOList = sysDictDao.findByDictName(key);
 | 
												
													
														
															|  |         for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:dictDOList){
 |  |         for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:dictDOList){
 | 
												
													
														
															|  |             if (wlyyHospitalSysDictDO.getDictCode().equalsIgnoreCase("AppID")){
 |  |             if (wlyyHospitalSysDictDO.getDictCode().equalsIgnoreCase("AppID")){
 | 
												
											
												
													
														
															|  | @ -102,7 +114,7 @@ public class GetuiService {
 | 
												
													
														
															|  |                 redisTemplate.opsForValue().set(key + ":MasterSecret",MasterSecret);
 |  |                 redisTemplate.opsForValue().set(key + ":MasterSecret",MasterSecret);
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         pushApi = getPushApi();
 |  | 
 | 
												
													
														
															|  | 
 |  |         return getPushApi();
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     private PushApi getPushApi(){
 |  |     private PushApi getPushApi(){
 | 
												
											
												
													
														
															|  | @ -125,7 +137,6 @@ public class GetuiService {
 | 
												
													
														
															|  |      * type 1 安卓 2 ios
 |  |      * type 1 安卓 2 ios
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  |     public void push2(String cid,int type,JSONObject json){
 |  |     public void push2(String cid,int type,JSONObject json){
 | 
												
													
														
															|  |         init();
 |  | 
 | 
												
													
														
															|  |         //根据cid进行单推
 |  |         //根据cid进行单推
 | 
												
													
														
															|  |         PushDTO<Audience> pushDTO = new PushDTO<Audience>();
 |  |         PushDTO<Audience> pushDTO = new PushDTO<Audience>();
 | 
												
													
														
															|  |         // 设置推送参数
 |  |         // 设置推送参数
 |