Commit 61abed3f by 田超

Merge branch 'fixbug/1005354' into 'master'

bug: [1005354] 生产error处理

See merge request rays/pcloud-book!1393
parents a66c0ac8 a4755935
...@@ -449,4 +449,9 @@ public class BookConstant { ...@@ -449,4 +449,9 @@ public class BookConstant {
public static String IGNOR_BOOK_KEY = CacheConstant.BOOK + "ignorBookKey"; public static String IGNOR_BOOK_KEY = CacheConstant.BOOK + "ignorBookKey";
/**
* qq公众号
*/
public static final Long QQ_ACCOUNT_SETTING_ID = 999L;
} }
...@@ -43,6 +43,8 @@ import java.util.Map; ...@@ -43,6 +43,8 @@ import java.util.Map;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import static com.pcloud.book.book.constant.BookConstant.QQ_ACCOUNT_SETTING_ID;
/** /**
* @ClassName com.pcloud.book.applet.biz.impl.AnswerSubscribeBizImpl * @ClassName com.pcloud.book.applet.biz.impl.AnswerSubscribeBizImpl
* @Author zhuyajie * @Author zhuyajie
...@@ -294,6 +296,10 @@ public class AnswerSubscribeBizImpl implements AnswerSubscribeBiz { ...@@ -294,6 +296,10 @@ public class AnswerSubscribeBizImpl implements AnswerSubscribeBiz {
@Override @Override
public AnswerSubscribeDTO getSubscribeQrcodeState(Long wechatUserId, Long accountSettingId) { public AnswerSubscribeDTO getSubscribeQrcodeState(Long wechatUserId, Long accountSettingId) {
AnswerSubscribeDTO dto = new AnswerSubscribeDTO();
if (QQ_ACCOUNT_SETTING_ID.equals(accountSettingId)) {
return dto;
}
String openId = readerConsr.getOpenIdByWechatUserIdAndOfficialAccountsId(wechatUserId, accountSettingId); String openId = readerConsr.getOpenIdByWechatUserIdAndOfficialAccountsId(wechatUserId, accountSettingId);
WechatUserOfficialAccounts accounts = readerConsr.getOfficialAccounts(accountSettingId, openId, wechatUserId); WechatUserOfficialAccounts accounts = readerConsr.getOfficialAccounts(accountSettingId, openId, wechatUserId);
Boolean isSubscribe = false; Boolean isSubscribe = false;
...@@ -301,7 +307,6 @@ public class AnswerSubscribeBizImpl implements AnswerSubscribeBiz { ...@@ -301,7 +307,6 @@ public class AnswerSubscribeBizImpl implements AnswerSubscribeBiz {
isSubscribe = accounts.getIsSubscribe() == 1 ? true : false; isSubscribe = accounts.getIsSubscribe() == 1 ? true : false;
} }
GroupQrcodeVO groupQrcodeVO = qrcodeSceneConsr.getSubscribeQrcode(accountSettingId); GroupQrcodeVO groupQrcodeVO = qrcodeSceneConsr.getSubscribeQrcode(accountSettingId);
AnswerSubscribeDTO dto = new AnswerSubscribeDTO();
dto.setQrcodeUrl(groupQrcodeVO.getQrcodeUrl()); dto.setQrcodeUrl(groupQrcodeVO.getQrcodeUrl());
dto.setIsSubscribe(isSubscribe); dto.setIsSubscribe(isSubscribe);
return dto; return dto;
......
...@@ -91,7 +91,8 @@ public class AppletThirdResourcesStaticBizImpl implements AppletThirdResourcesSt ...@@ -91,7 +91,8 @@ public class AppletThirdResourcesStaticBizImpl implements AppletThirdResourcesSt
@Override @Override
@ParamLog("获取跟谁学统计数据") @ParamLog("获取跟谁学统计数据")
public void getAppletThirdResourceStatic(Integer isAll) { public void getAppletThirdResourceStatic(Integer isAll) {
PageBeanNew pageBeanNew = null; //20210831 接口调用不通 ,暂停调用
/*PageBeanNew pageBeanNew = null;
//PageBeanNew pageBeanNew = appletThirdResourcesStaticDao.listPageNew(new PageParam(0, 10), null, "getList"); //PageBeanNew pageBeanNew = appletThirdResourcesStaticDao.listPageNew(new PageParam(0, 10), null, "getList");
if (null != pageBeanNew && !ListUtils.isEmpty(pageBeanNew.getRecordList()) && YesOrNoEnums.YES.getValue().equals(isAll)) { if (null != pageBeanNew && !ListUtils.isEmpty(pageBeanNew.getRecordList()) && YesOrNoEnums.YES.getValue().equals(isAll)) {
throw new BookBizException(BookBizException.ERROR, "当统计数据表不为空时不能导入全部数据只能导入昨日数据"); throw new BookBizException(BookBizException.ERROR, "当统计数据表不为空时不能导入全部数据只能导入昨日数据");
...@@ -134,7 +135,7 @@ public class AppletThirdResourcesStaticBizImpl implements AppletThirdResourcesSt ...@@ -134,7 +135,7 @@ public class AppletThirdResourcesStaticBizImpl implements AppletThirdResourcesSt
} catch (ParseException e) { } catch (ParseException e) {
LOGGER.error("获取跟谁学统计数据失败", e); LOGGER.error("获取跟谁学统计数据失败", e);
} }
} }*/
} }
......
...@@ -1608,7 +1608,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz { ...@@ -1608,7 +1608,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
Map<String, BookAdviserDto> bookAdviserDtoMap = new HashMap<>(); Map<String, BookAdviserDto> bookAdviserDtoMap = new HashMap<>();
try { try {
bookAdviserDtoMap = bookAdviserSubmit.get(ThreadPoolUtils.REMOTE_TIME_OUT, TimeUnit.SECONDS); bookAdviserDtoMap = bookAdviserSubmit.get(ThreadPoolUtils.REMOTE_TIME_OUT_LONG, TimeUnit.SECONDS);
} catch (InterruptedException | ExecutionException | TimeoutException e) { } catch (InterruptedException | ExecutionException | TimeoutException e) {
LOGGER.error("获取现代纸书是否小睿流程错误: {}==", e); LOGGER.error("获取现代纸书是否小睿流程错误: {}==", e);
} }
......
...@@ -118,6 +118,7 @@ import com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto; ...@@ -118,6 +118,7 @@ import com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto;
import com.pcloud.usercenter.party.agent.dto.SaleAgentDTO; import com.pcloud.usercenter.party.agent.dto.SaleAgentDTO;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.lucene.queryparser.classic.QueryParser;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -2740,6 +2741,9 @@ public class BookBizImpl implements BookBiz { ...@@ -2740,6 +2741,9 @@ public class BookBizImpl implements BookBiz {
if (null != agentId) { if (null != agentId) {
adviserIds = adviserConsr.getByAgentId(agentId); adviserIds = adviserConsr.getByAgentId(agentId);
} }
if (!StringUtil.isEmpty(keyword)) {
keyword = QueryParser.escape(keyword);
}
Page<ESBookAndAdviser> esPage = esBookAndAdviserBiz.getESAdviserBooks4AppletV2(grayStatus, keyword, templetIds, graLabelIds, subLabelIds, Page<ESBookAndAdviser> esPage = esBookAndAdviserBiz.getESAdviserBooks4AppletV2(grayStatus, keyword, templetIds, graLabelIds, subLabelIds,
currentPage, numPerPage,scecondTempletIds, adviserIds, agentId); currentPage, numPerPage,scecondTempletIds, adviserIds, agentId);
......
...@@ -5103,11 +5103,11 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -5103,11 +5103,11 @@ public class BookGroupBizImpl implements BookGroupBiz {
} }
Long raysClassifyId = null; Long raysClassifyId = null;
BookAdviserDto bookAdviserDto = bookAdviserDao.getBase(bookId, channelId, adviserId); BookAdviserDto bookAdviserDto = bookAdviserDao.getBase(bookId, channelId, adviserId);
if (null != bookAdviserDto) { if (null != bookAdviserDto && null != bookAdviserDto.getTempletId()) {
raysClassifyId = bookRaysClassifyDao.getClassifyIdByBookTemplateId(bookAdviserDto.getTempletId()); raysClassifyId = bookRaysClassifyDao.getClassifyIdByBookTemplateId(bookAdviserDto.getTempletId());
} if (null == raysClassifyId) {
if (null == raysClassifyId) { LOGGER.warn("书刊分类没有对应的小睿分类" + bookGroupId);
LOGGER.error("书刊分类没有对应的小睿分类" + bookGroupId); }
} }
String page = null;//小程序跳转页 todo String page = null;//小程序跳转页 todo
String appletId = createOneAppletId(); String appletId = createOneAppletId();
......
...@@ -1798,6 +1798,9 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -1798,6 +1798,9 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
course.setTypeName(dto.getTypeName()); course.setTypeName(dto.getTypeName());
course.setAgentId(dto.getAgencyId()); course.setAgentId(dto.getAgencyId());
course.setChannelId(dto.getChannelId()); course.setChannelId(dto.getChannelId());
course.setProLabelId(dto.getProLableId()); course.setProLabelId(dto.getProLableId());
course.setDepLableId(dto.getDepLableId()); course.setDepLableId(dto.getDepLableId());
course.setPurLabelId(dto.getPurLableId()); course.setPurLabelId(dto.getPurLableId());
......
...@@ -322,7 +322,7 @@ public class PushBizImpl implements PushBiz { ...@@ -322,7 +322,7 @@ public class PushBizImpl implements PushBiz {
//获取群信息 //获取群信息
GroupQrcode groupQrcode = groupQrcodeDao.getById(pushGroup.getBookGroupQrcodeId()); GroupQrcode groupQrcode = groupQrcodeDao.getById(pushGroup.getBookGroupQrcodeId());
if (groupQrcode == null) { if (groupQrcode == null) {
LOGGER.error("未找到群信息!qrcodeId=" + pushGroup.getBookGroupQrcodeId()); LOGGER.warn("未找到群信息!qrcodeId=" + pushGroup.getBookGroupQrcodeId());
continue; continue;
} }
//获取机器人微信号 //获取机器人微信号
...@@ -334,9 +334,8 @@ public class PushBizImpl implements PushBiz { ...@@ -334,9 +334,8 @@ public class PushBizImpl implements PushBiz {
LOGGER.info("发送一个群里的一个消息结束,休眠1秒pushGroup=" + pushGroup.toString() + "pushItem=" + pushItem.toString() + "altId=" + altId); LOGGER.info("发送一个群里的一个消息结束,休眠1秒pushGroup=" + pushGroup.toString() + "pushItem=" + pushItem.toString() + "altId=" + altId);
Thread.sleep(1000); Thread.sleep(1000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
LOGGER.error("发消息休眠1秒出错", e); LOGGER.warn("发消息休眠1秒出错");
} }
} }
} }
} }
...@@ -349,8 +348,7 @@ public class PushBizImpl implements PushBiz { ...@@ -349,8 +348,7 @@ public class PushBizImpl implements PushBiz {
//获取群信息 //获取群信息
GroupQrcode groupQrcode = groupQrcodeDao.getById(pushGroup.getBookGroupQrcodeId()); GroupQrcode groupQrcode = groupQrcodeDao.getById(pushGroup.getBookGroupQrcodeId());
if (groupQrcode == null) { if (groupQrcode == null) {
LOGGER.error("未找到群信息!"); throw new BookBizException(BookBizException.PARAM_IS_NULL, "未找到群信息");
return;
} }
String groupId = groupQrcode.getWeixinGroupId(); String groupId = groupQrcode.getWeixinGroupId();
ClassifyDTO classifyDTO = bookGroupClassifyDao.getById(groupQrcode.getClassifyId()); ClassifyDTO classifyDTO = bookGroupClassifyDao.getById(groupQrcode.getClassifyId());
......
...@@ -14,6 +14,11 @@ public class ThreadPoolUtils { ...@@ -14,6 +14,11 @@ public class ThreadPoolUtils {
*/ */
public static final int REMOTE_TIME_OUT = 5; public static final int REMOTE_TIME_OUT = 5;
/**
* 远程调用超时时间(单位:秒)
*/
public static final int REMOTE_TIME_OUT_LONG = 30;
/** /**
* 异步导出线程池 * 异步导出线程池
......
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