Commit 53b8bb1f by Administrator

Merge branch 'feature/listBookClassify' into 'master'

feat: [none] 增加立项筛选

See merge request rays/pcloud-book!1297
parents 3e7802b7 64381d1d
......@@ -800,6 +800,10 @@ public class BookDto extends BaseDto {
*/
private Integer isOpenCatalog;
/**
* 是否立项
*/
private Integer isApproval;
/**
* 排序值
*/
private Integer seq;
......@@ -832,6 +836,15 @@ public class BookDto extends BaseDto {
this.isOpenCatalog = isOpenCatalog;
}
public Integer getIsApproval() {
return isApproval;
}
public void setIsApproval(Integer isApproval) {
this.isApproval = isApproval;
}
private String qrcodeType;
public String getQrcodeType() {
......
......@@ -515,7 +515,8 @@ public interface BookFacade {
@ApiImplicitParam(name = "currentPage", value = "当前页数", dataType = "int", paramType = "query"),
@ApiImplicitParam(name = "numPerPage", value = "每页条数", dataType = "int", paramType = "query"),
@ApiImplicitParam(name = "secondTempletId", value = "书刊分类二级列表标识", dataType = "long", paramType = "query"),
@ApiImplicitParam(name = "isPrint", value = "是否已下印", dataType = "Boolean", paramType = "query")
@ApiImplicitParam(name = "isPrint", value = "是否已下印", dataType = "Boolean", paramType = "query"),
@ApiImplicitParam(name = "isApproval", value = "是否立项", dataType = "int", paramType = "query")
})
@RequestMapping(value = "listBookClassify", method = RequestMethod.GET)
ResponseDto<PageBean> listBookClassify(@RequestHeader("token") String token,
......@@ -529,7 +530,8 @@ public interface BookFacade {
@RequestParam(value = "numPerPage") Integer numPerPage,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId,
@RequestParam(value = "isPrint", required = false) Boolean isPrint)
@RequestParam(value = "isPrint", required = false) Boolean isPrint,
@RequestParam(value = "isApproval", required = false) Integer isApproval)
throws BizException, PermissionException, JsonParseException;
......
......@@ -695,7 +695,8 @@ public class BookFacadeImpl implements BookFacade {
@RequestParam(value = "numPerPage") Integer numPerPage,
@RequestParam(value = "secondTempletId", required = false) Long secondTempletId,
@RequestParam(value = "thirdTempletId", required = false) Long thirdTempletId,
@RequestParam(value = "isPrint", required = false) Boolean isPrint )
@RequestParam(value = "isPrint", required = false) Boolean isPrint,
@RequestParam(value = "isApproval", required = false) Integer isApproval)
throws BizException, PermissionException {
SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
if (currentPage == null || numPerPage == null || currentPage < 0 || numPerPage < 0) {
......@@ -718,6 +719,7 @@ public class BookFacadeImpl implements BookFacade {
paramMap.put("thirdTempletId", thirdTempletId);
paramMap.put("thirdTempletIds", Optional.ofNullable(paramMap.get("thirdTempletId")).map(Lists::newArrayList).orElse(Lists.newArrayList()));
paramMap.put("isPrint", isPrint);
paramMap.put("isApproval", isApproval);
PageBean pageBean = bookBiz.listBookClassify(new PageParam(currentPage, numPerPage), paramMap);
return new ResponseDto<>(pageBean);
}
......
......@@ -73,6 +73,7 @@
<result column="third_templet_id" property="thirdTempletId" jdbcType="BIGINT" />
<result column="is_send_mini_url" property="isSendMiniUrl" jdbcType="BIT" />
<result column="is_open_catalog" property="isOpenCatalog" jdbcType="BIT" />
<result column="is_approval" property="isApproval" jdbcType="BIT" />
</resultMap>
<resultMap id="bookListPageMap" type="bookDto" extends ="bookMap">
......@@ -529,7 +530,7 @@
B.AUTHOR, B.PUBLISH, B.PUBLISH_DATE, B.COVER_IMG, B.ORIGIN_NAME, B.BOOK_PRICE, B.ISSN, B.BOOK_NUM, B.SERIAL_NUMBER,
IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT,A.TEMPLET_ID, A.LAST_MODIFIED_DATE,
A.BOOK_ADVISER_ID,I.BOOK_STATUS, CONCAT('BK',A.BOOK_ID) uniqueNumber, if(G.ID IS NULL, 0, 1) isBookGroup, A.IS_PRINT isPrint,
G.id BOOK_GROUP_ID, G.group_qrcode_url groupQrcodeUrl,G.group_qrcode_name groupQrcodeName,A.is_approval isApproval,
G.id BOOK_GROUP_ID, G.group_qrcode_url groupQrcodeUrl,G.group_qrcode_name groupQrcodeName,A.is_approval,
G.join_group_type,G.single_group singleGroup, G.related_book_group_id relatedBookGroupId,
IF(ISNULL(s.id),0,1) minimumSupport, A.is_open_catalog
FROM
......@@ -1445,7 +1446,7 @@
b.BOOK_ID, b.BOOK_NAME, b.COVER_IMG, b.ISBN,b.SERIAL_NUMBER, b.PUBLISH,
ba.ADVISER_ID, ba.TEMPLET_ID, ba.CHANNEL_ID, ba.CREATED_DATE,
bt.TYPE_NAME, ba.IS_PRINT isPrint,
ba.SECOND_TEMPLET_ID, ba.GRA_LABEL_ID,ba.SUB_LABEL_ID,ba.VER_LABEL_ID,ba.AREA_LABEL_ID,ba.vol_label_id,
ba.SECOND_TEMPLET_ID, ba.GRA_LABEL_ID,ba.SUB_LABEL_ID,ba.VER_LABEL_ID,ba.AREA_LABEL_ID,ba.vol_label_id,ba.is_approval,
la1.`name` graLabelName,la2.`name` subLabelName,la3.`name` verLabelName,la4.`name` areaLabelName,la5.`name` volLabelName,
ba.third_TEMPLET_ID
FROM
......@@ -1508,6 +1509,9 @@
<if test="isPrint != null">
AND ba.IS_PRINT = #{isPrint}
</if>
<if test="isApproval != null">
AND ba.is_approval = #{isApproval}
</if>
ORDER BY ba.CREATED_DATE DESC
</select>
......@@ -1567,6 +1571,9 @@
<if test="isPrint != null">
AND ba.IS_PRINT = #{isPrint}
</if>
<if test="isApproval != null">
AND ba.is_approval = #{isApproval}
</if>
</select>
......
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