Commit a21cafe4 by 朱亚洁

feat:[1003658]答案向其它资源和权益引流bug

parent 22424fa4
......@@ -266,4 +266,6 @@ public interface BookAdviserBiz {
PageBeanNew<PcloudAdviserBookVO> listAdviserBook4Pcloud(String keyword, Integer currentPage, Integer numPerPage);
Map<String, BookAdviserDto> getBookInfoByBookIds(List<Long> bookIds, List<Long> adviserIds, List<Long> channelIds);
BookAdviserDto getBookByBookIdAdviserId(Long bookId, Long adviserId);
}
......@@ -1412,4 +1412,9 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
return resultMap;
}
@Override
public BookAdviserDto getBookByBookIdAdviserId(Long bookId, Long adviserId){
return bookAdviserDao.getBookByBookIdAdviserId(bookId,adviserId);
}
}
......@@ -287,4 +287,6 @@ public interface BookAdviserDao extends BaseDao<BookAdviser> {
Integer getIsRui(Long adviserId, Long bookId, Long channelId);
List<BookAdviserDto> getBookInfoByBookIds(List<Long> bookIds, List<Long> adviserIds, List<Long> channelIds);
BookAdviserDto getBookByBookIdAdviserId(Long bookId, Long adviserId);
}
......@@ -308,4 +308,12 @@ public class BookAdviserDaoImpl extends BaseDaoImpl<BookAdviser> implements Book
paramMap.put("channelIds", channelIds);
return super.getSqlSession().selectList(this.getStatement("getBookInfoByBookIds"), paramMap);
}
@Override
public BookAdviserDto getBookByBookIdAdviserId(Long bookId, Long adviserId){
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("bookId",bookId);
paramMap.put("adviserId", adviserId);
return super.getSqlSession().selectOne(this.getStatement("getBookByBookIdAdviserId"), paramMap);
}
}
......@@ -3081,6 +3081,14 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if (null == bookId || null == channelId || null == adviserId){
return new ResourceList4Answer();
}
BookAdviserDto bookAdviserDto = bookAdviserBiz.getBase(bookId,channelId,adviserId);
//处理答案应用运营平台和书刊运营平台不一致的情况
if (null == bookAdviserDto){
BookAdviserDto adviserDto = bookAdviserBiz.getBookByBookIdAdviserId(bookId, adviserId);
if (null != adviserDto){
channelId = adviserDto.getChannelId();
}
}
ResourceList4Answer resourceList4Answer = new ResourceList4Answer();
resourceList4Answer.setBookId(bookId);
resourceList4Answer.setChannelId(channelId);
......
......@@ -855,4 +855,18 @@
</foreach>
</select>
<select id="getBookByBookIdAdviserId" parameterType="map" resultMap="bookAdviserMap">
SELECT
BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE,
TEMPLET_ID,SECOND_TEMPLET_ID,
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,vol_label_id
FROM
book_adviser
WHERE
BOOK_ID = #{bookId}
AND ADVISER_ID = #{adviserId}
ORDER BY IS_MAIN_EDITOR DESC,IS_DELETE ASC
LIMIT 1
</select>
</mapper>
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