Commit 5eccf61e by 吴博

feat: [1007030] 修复997获取关注二维码时报错

parent 6467eced
......@@ -297,8 +297,8 @@ public class AnswerSubscribeBizImpl implements AnswerSubscribeBiz {
@Override
public AnswerSubscribeDTO getSubscribeQrcodeState(Long wechatUserId, Long accountSettingId) {
AnswerSubscribeDTO dto = new AnswerSubscribeDTO();
if (QQ_ACCOUNT_SETTING_ID.equals(accountSettingId)) {
return dto;
if (BookProps.getIgnorOfficialAccountsId().contains(accountSettingId)) {
return dto;
}
String openId = readerConsr.getOpenIdByWechatUserIdAndOfficialAccountsId(wechatUserId, accountSettingId);
WechatUserOfficialAccounts accounts = readerConsr.getOfficialAccounts(accountSettingId, openId, wechatUserId);
......
......@@ -8,6 +8,6 @@ import org.springframework.context.annotation.Configuration;
@EnableNacosConfig
@NacosPropertySource(dataId = "bookdb.yml")
@NacosPropertySource(dataId = "book.yml")
@NacosPropertySource(dataId = "public_system.properties")
@NacosPropertySource(dataId = "public_system.properties", autoRefreshed = true)
public class NacosPropertyLoadConfig {
}
......@@ -3,9 +3,12 @@
*/
package com.pcloud.book.util.properties;
import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @描述:微信常量类
* @作者:songx
......@@ -48,6 +51,17 @@ public class BookProps {
//默认公众号id
private static Long defaultChannelId;
//可以忽略的公众号id
private static List<Long> ignorOfficialAccountsId;
public static List<Long> getIgnorOfficialAccountsId() {
return ignorOfficialAccountsId;
}
@NacosValue(value = "#{'${ignor_official_accounts_id}'.split(',')}",autoRefreshed = true)
public void setIgnorOfficialAccountsId(List<Long> ignorOfficialAccountsId) {
BookProps.ignorOfficialAccountsId = ignorOfficialAccountsId;
}
public static Long getDefaultChannelId() {
return defaultChannelId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment