Commit d256f4b0 by 吴博

feat:[1005577] H5本书服务大礼包:仅教辅书展示

parent ca9ee30a
...@@ -451,5 +451,5 @@ public interface BookAdviserBiz { ...@@ -451,5 +451,5 @@ public interface BookAdviserBiz {
* @param channelId * @param channelId
* @return * @return
*/ */
UserGradeLabelIdDTO getBookGradeLabel(Long bookId, Long adviserId, Long channelId); BookLabelAndClassifyVO getBookGradeLabel(Long bookId, Long adviserId, Long channelId);
} }
...@@ -3307,10 +3307,11 @@ public class BookAdviserBizImpl implements BookAdviserBiz { ...@@ -3307,10 +3307,11 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
} }
@Override @Override
public UserGradeLabelIdDTO getBookGradeLabel(Long bookId, Long adviserId, Long channelId) { public BookLabelAndClassifyVO getBookGradeLabel(Long bookId, Long adviserId, Long channelId) {
BookLabelAndClassifyVO bookLabelAndClassifyVO = new BookLabelAndClassifyVO();
BookAdviserDto base = this.getBase(bookId, channelId, adviserId); BookAdviserDto base = this.getBase(bookId, channelId, adviserId);
if (null == base) { if (null == base) {
return new UserGradeLabelIdDTO(); return new BookLabelAndClassifyVO();
} }
Long gradeId = null; Long gradeId = null;
if (null != base.getGraLabelId()) { if (null != base.getGraLabelId()) {
...@@ -3324,6 +3325,14 @@ public class BookAdviserBizImpl implements BookAdviserBiz { ...@@ -3324,6 +3325,14 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
gradeId = 29L; gradeId = 29L;
} }
UserGradeLabelIdDTO userGradeLabelIdDTO = readerConsr.getUserParentGradeId(gradeId); UserGradeLabelIdDTO userGradeLabelIdDTO = readerConsr.getUserParentGradeId(gradeId);
return null != userGradeLabelIdDTO ? userGradeLabelIdDTO : new UserGradeLabelIdDTO(); if (null != userGradeLabelIdDTO) {
BeanUtils.copyProperties(userGradeLabelIdDTO, bookLabelAndClassifyVO);
if (CollUtil.toList(RightsSettingConstant.K12_TEMPLET_ID_NEW).contains(base.getTempletId())) {
bookLabelAndClassifyVO.setIsK12(YesOrNoNumEnum.YES.getValue());
} else {
bookLabelAndClassifyVO.setIsK12(YesOrNoNumEnum.NO.getValue());
}
}
return null != bookLabelAndClassifyVO ? bookLabelAndClassifyVO : new BookLabelAndClassifyVO();
} }
} }
...@@ -21,6 +21,7 @@ import com.pcloud.book.book.dto.QrcodeStatisticsDTO; ...@@ -21,6 +21,7 @@ import com.pcloud.book.book.dto.QrcodeStatisticsDTO;
import com.pcloud.book.book.entity.BookAdviser; import com.pcloud.book.book.entity.BookAdviser;
import com.pcloud.book.book.facade.BookAdviserFacade; import com.pcloud.book.book.facade.BookAdviserFacade;
import com.pcloud.book.book.vo.AgentBookStatsDetailVO; import com.pcloud.book.book.vo.AgentBookStatsDetailVO;
import com.pcloud.book.book.vo.BookLabelAndClassifyVO;
import com.pcloud.book.book.vo.BookServeInfo; import com.pcloud.book.book.vo.BookServeInfo;
import com.pcloud.book.book.vo.PcloudAdviserBookVO; import com.pcloud.book.book.vo.PcloudAdviserBookVO;
import com.pcloud.book.book.vo.QrCodeVO; import com.pcloud.book.book.vo.QrCodeVO;
...@@ -504,6 +505,6 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade { ...@@ -504,6 +505,6 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade {
@RequestParam(value = "bookId" ) Long bookId, @RequestParam(value = "bookId" ) Long bookId,
@RequestParam(value = "adviserId" ) Long adviserId, @RequestParam(value = "adviserId" ) Long adviserId,
@RequestParam(value = "channelId" ) Long channelId) throws PermissionException { @RequestParam(value = "channelId" ) Long channelId) throws PermissionException {
return new ResponseDto<UserGradeLabelIdDTO>(bookAdviserBiz.getBookGradeLabel(bookId, adviserId, channelId)); return new ResponseDto<BookLabelAndClassifyVO>(bookAdviserBiz.getBookGradeLabel(bookId, adviserId, channelId));
} }
} }
package com.pcloud.book.book.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class BookLabelAndClassifyVO {
@ApiModelProperty("用户年级标签id")
private Long labelId;
@ApiModelProperty("父标签id")
private Long parentId;
@ApiModelProperty("用户年级标签")
private String labelName;
@ApiModelProperty("是否k12教辅 0 不是 1 是的")
private Integer isK12;
}
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