|
|
|
@@ -1,6 +1,6 @@ |
|
|
|
package com.iformall.service.wechat; |
|
|
|
|
|
|
|
import com.iformall.config.RedisProperies; |
|
|
|
import com.iformall.config.WechatRedisProperies; |
|
|
|
import com.iformall.config.WechatOpenProperties; |
|
|
|
import com.iformall.mapper.WxAuthorizerInfoMapper; |
|
|
|
import com.iformall.mapper.WxComponentVerifyTicketMapper; |
|
|
|
@@ -19,13 +19,13 @@ import javax.annotation.PostConstruct; |
|
|
|
* Stormeye WU |
|
|
|
*/ |
|
|
|
@Service |
|
|
|
@EnableConfigurationProperties({WechatOpenProperties.class, RedisProperies.class}) |
|
|
|
public class WxOpenService extends WxOpenServiceImpl { |
|
|
|
@EnableConfigurationProperties({WechatOpenProperties.class, WechatRedisProperies.class}) |
|
|
|
public class FmOpenService extends WxOpenServiceImpl { |
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass()); |
|
|
|
@Autowired |
|
|
|
private WechatOpenProperties wechatProperties; |
|
|
|
@Autowired |
|
|
|
private RedisProperies redisProperies; |
|
|
|
private WechatRedisProperies redisProperies; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxComponentVerifyTicketMapper componentVerifyTicketMapper; |
|
|
|
@@ -38,7 +38,7 @@ public class WxOpenService extends WxOpenServiceImpl { |
|
|
|
|
|
|
|
@PostConstruct |
|
|
|
public void init() { |
|
|
|
WxOpenInRedisDBConfigStorage configStorage = new WxOpenInRedisDBConfigStorage(getJedisPool(), componentVerifyTicketMapper, authorizerInfoMapper); |
|
|
|
FmOpenInRedisDBConfigStorage configStorage = new FmOpenInRedisDBConfigStorage(getJedisPool(), componentVerifyTicketMapper, authorizerInfoMapper); |
|
|
|
configStorage.setComponentAppId(wechatProperties.getComponentAppId()); |
|
|
|
configStorage.setComponentAppSecret(wechatProperties.getComponentSecret()); |
|
|
|
configStorage.setComponentToken(wechatProperties.getComponentToken()); |
|
|
|
@@ -57,7 +57,7 @@ public class WxOpenService extends WxOpenServiceImpl { |
|
|
|
|
|
|
|
private JedisPool getJedisPool() { |
|
|
|
if (pool == null) { |
|
|
|
synchronized (WxOpenService.class) { |
|
|
|
synchronized (FmOpenService.class) { |
|
|
|
if (pool == null) { |
|
|
|
pool = new JedisPool(redisProperies, redisProperies.getHost(), |
|
|
|
redisProperies.getPort(), redisProperies.getConnectionTimeout(), |