Commit 8cdadb3d by 吴博

bug: [none] fixbook

parent f93433be
......@@ -162,6 +162,10 @@ public class AppletRecordBizImpl implements AppletRecordBiz {
if (null == appletRecord.getFromId() || StringUtil.isEmpty(appletRecord.getFromName())) {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "fromId或fromName为空");
}
if (AppletRecordTypeEnum.BOOK.value.equals(appletRecord.getRecordType()) && null != appletRecord.getFromId() &&
(null == appletRecord.getChannelId() || null == appletRecord.getAdviserId())) {
return;
}
}
......
......@@ -16,6 +16,7 @@ import com.pcloud.book.applet.entity.AppletThirdResources;
import com.pcloud.book.applet.entity.AppletUserBookcase;
import com.pcloud.book.applet.entity.AppletUserClickRecord;
import com.pcloud.book.applet.enums.AppletNewsServeTypeEnum;
import com.pcloud.book.applet.enums.AppletRecordTypeEnum;
import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.book.biz.BookAdviserBiz;
import com.pcloud.book.book.biz.BookBiz;
......@@ -132,6 +133,10 @@ public class AppletUserBookcaseBizImpl implements AppletUserBookcaseBiz {
if (BookConstant.visitorWechatUserId.equals(wechatUserId)) {
return;
}
if (null != appletUserBookcase.getBookId() &&
(null == appletUserBookcase.getChannelId() || null == appletUserBookcase.getAdviserId())) {
return;
}
if (null == appletUserBookcase.getRightsSettingId()) {//书刊对应的权益
RightsSettingDto rightsSettingDto = rightsSettingBiz.getReadType4Book(wechatUserId, appletUserBookcase.getBookId(), appletUserBookcase.getChannelId(), appletUserBookcase.getAdviserId());
appletUserBookcase.setRightsSettingId(rightsSettingDto == null ? null : rightsSettingDto.getId());
......
......@@ -1201,7 +1201,9 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
@Override
@GetMapping("getBookBaseInfo4Applet")
public ResponseDto<?> getBookBaseInfo4Applet(
@RequestParam("adviserId") Long adviserId, @RequestParam("bookId") Long bookId, @RequestParam("channelId") Long channelId ) {
@RequestParam(value = "adviserId", required = false) Long adviserId,
@RequestParam("bookId") Long bookId,
@RequestParam(value = "channelId", required = false) Long channelId ) {
if (null == adviserId || null == bookId || null == channelId) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数缺失!");
}
......
......@@ -198,8 +198,6 @@
AND d.IS_DELETE = 0
LEFT JOIN rights_setting r ON c.rights_setting_id = r.id AND d.join_group_type=4 and r.show_state = 1 and r.rights_setting_type = 2
WHERE
a.IS_DELETE = 0
and
c.is_delete = 0
and
c.id in
......
......@@ -199,8 +199,6 @@
AND d.IS_DELETE = 0
LEFT JOIN rights_setting r ON c.rights_setting_id = r.id AND d.join_group_type=4 and r.show_state = 1 and r.rights_setting_type = 2
WHERE
a.IS_DELETE = 0
and
c.is_delete = 0
and
c.id in
......
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