Commit a6cc56c0 by 郑永强

feat: [1007001] 【优化】编辑运营需求(RAYS码开关)

parent 1061ded9
...@@ -859,6 +859,8 @@ public class BookDto extends BaseDto { ...@@ -859,6 +859,8 @@ public class BookDto extends BaseDto {
*/ */
private Integer appointBook; private Integer appointBook;
private Integer openRaysCode;
public Integer getAppointBook() { public Integer getAppointBook() {
return appointBook; return appointBook;
} }
...@@ -2427,6 +2429,14 @@ public class BookDto extends BaseDto { ...@@ -2427,6 +2429,14 @@ public class BookDto extends BaseDto {
this.erpNumbers = erpNumbers; this.erpNumbers = erpNumbers;
} }
public Integer getOpenRaysCode() {
return openRaysCode;
}
public void setOpenRaysCode(Integer openRaysCode) {
this.openRaysCode = openRaysCode;
}
@Override @Override
public String toString() { public String toString() {
return "BookDto{" + return "BookDto{" +
......
...@@ -118,4 +118,6 @@ public class BookAdviser extends BaseEntity { ...@@ -118,4 +118,6 @@ public class BookAdviser extends BaseEntity {
* 上下册标签id * 上下册标签id
*/ */
private Long volLabelId; private Long volLabelId;
private Integer openRaysCode;
} }
...@@ -505,4 +505,6 @@ public interface BookAdviserBiz { ...@@ -505,4 +505,6 @@ public interface BookAdviserBiz {
Map<Long, AdviserBookStatisDto> getAdviserBookStatis(AdviserBookStatisRequestDto requestDto); Map<Long, AdviserBookStatisDto> getAdviserBookStatis(AdviserBookStatisRequestDto requestDto);
Integer getBookIsOpenCatalog(Long bookId, Long channelId, Long adviserId); Integer getBookIsOpenCatalog(Long bookId, Long channelId, Long adviserId);
void updateOpenRaysCode(BookAdviser bookAdviser);
} }
...@@ -3567,4 +3567,16 @@ public class BookAdviserBizImpl implements BookAdviserBiz { ...@@ -3567,4 +3567,16 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
Integer isOpenCatalog = bookAdviserDao.getBookIsOpenCatalog(bookId,channelId,adviserId); Integer isOpenCatalog = bookAdviserDao.getBookIsOpenCatalog(bookId,channelId,adviserId);
return null == isOpenCatalog?0:isOpenCatalog; return null == isOpenCatalog?0:isOpenCatalog;
} }
@Override
public void updateOpenRaysCode(BookAdviser bookAdviser) {
if (bookAdviser == null || bookAdviser.getBookAdviserId() == null) {
throw BizException.PARAM_DELETION;
}
BookAdviser model = new BookAdviser();
model.setBookAdviserId(bookAdviser.getBookAdviserId());
model.setOpenRaysCode(bookAdviser.getOpenRaysCode());
bookAdviserDao.update(model);
}
} }
...@@ -180,7 +180,8 @@ public interface BookFacade { ...@@ -180,7 +180,8 @@ public interface BookFacade {
@RequestParam(value = "graLabelId", required = false) Integer graLabelId, @RequestParam(value = "graLabelId", required = false) Integer graLabelId,
@RequestParam(value = "subLabelId", required = false) Integer subLabelId, @RequestParam(value = "subLabelId", required = false) Integer subLabelId,
@RequestParam(value = "verLabelId", required = false) Integer verLabelId, @RequestParam(value = "verLabelId", required = false) Integer verLabelId,
@RequestParam(value = "appointBook", required = false) Integer appointBook) @RequestParam(value = "appointBook", required = false) Integer appointBook,
@RequestParam(value = "openRaysCode", required = false) Integer openRaysCode)
throws BizException, PermissionException; throws BizException, PermissionException;
@ApiOperation(value = "首页获取正在做的图书", httpMethod = "GET") @ApiOperation(value = "首页获取正在做的图书", httpMethod = "GET")
......
...@@ -597,4 +597,13 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade { ...@@ -597,4 +597,13 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade {
return new ResponseDto<>(bookAdviserBiz.multiGetBookScanCount(param)); return new ResponseDto<>(bookAdviserBiz.multiGetBookScanCount(param));
} }
/**
* 更新
*/
@PostMapping("updateOpenRaysCode")
public ResponseDto<?> updateOpenRaysCode(@RequestHeader("token") String token, @RequestBody BookAdviser bookAdviser) throws PermissionException {
Long adviserId = (Long)SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
bookAdviserBiz.updateOpenRaysCode(bookAdviser);
return new ResponseDto<>();
}
} }
...@@ -288,7 +288,8 @@ public class BookFacadeImpl implements BookFacade { ...@@ -288,7 +288,8 @@ public class BookFacadeImpl implements BookFacade {
@RequestParam(value = "graLabelId", required = false) Integer graLabelId, @RequestParam(value = "graLabelId", required = false) Integer graLabelId,
@RequestParam(value = "subLabelId", required = false) Integer subLabelId, @RequestParam(value = "subLabelId", required = false) Integer subLabelId,
@RequestParam(value = "verLabelId", required = false) Integer verLabelId, @RequestParam(value = "verLabelId", required = false) Integer verLabelId,
@RequestParam(value = "appointBook", required = false) Integer appointBook) @RequestParam(value = "appointBook", required = false) Integer appointBook,
@RequestParam(value = "openRaysCode", required = false) Integer openRaysCode)
throws BizException, PermissionException { throws BizException, PermissionException {
Long adviserId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID); Long adviserId = (Long) SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
if (currentPage == null || numPerPage == null || currentPage < 0 || numPerPage < 0) { if (currentPage == null || numPerPage == null || currentPage < 0 || numPerPage < 0) {
...@@ -332,6 +333,7 @@ public class BookFacadeImpl implements BookFacade { ...@@ -332,6 +333,7 @@ public class BookFacadeImpl implements BookFacade {
paramMap.put("graLabelId", graLabelId); paramMap.put("graLabelId", graLabelId);
paramMap.put("subLabelId", subLabelId); paramMap.put("subLabelId", subLabelId);
paramMap.put("verLabelId", verLabelId); paramMap.put("verLabelId", verLabelId);
paramMap.put("openRaysCode", openRaysCode);
PageBean pageBean = bookBiz.getListPage4Adviser(paramMap, new PageParam(currentPage, numPerPage), adviserId, hasQrcode,appointBook); PageBean pageBean = bookBiz.getListPage4Adviser(paramMap, new PageParam(currentPage, numPerPage), adviserId, hasQrcode,appointBook);
return new ResponseDto<>(pageBean); return new ResponseDto<>(pageBean);
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<mapper namespace="com.pcloud.book.book.dao.impl.BookDaoImpl"> <mapper namespace="com.pcloud.book.book.dao.impl.BookDaoImpl">
<!-- 书籍实体DTO --> <!-- 书籍实体DTO -->
<resultMap id="bookMap" type="bookDto"> <resultMap id="bookMap" type="com.pcloud.book.book.dto.BookDto">
<id column="BOOK_ID" property="bookId" jdbcType="BIGINT" /> <id column="BOOK_ID" property="bookId" jdbcType="BIGINT" />
<result column="TYPE_CODE" property="typeCode" jdbcType="VARCHAR" /> <result column="TYPE_CODE" property="typeCode" jdbcType="VARCHAR" />
<result column="TYPE_NAME" property="typeName" jdbcType="VARCHAR" /> <result column="TYPE_NAME" property="typeName" jdbcType="VARCHAR" />
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
<result column="book_phone_auth" property="bookPhoneAuth" jdbcType="BIT" /> <result column="book_phone_auth" property="bookPhoneAuth" jdbcType="BIT" />
<result column="is_wechat_auth" property="isWechatAuth" jdbcType="BIT" /> <result column="is_wechat_auth" property="isWechatAuth" jdbcType="BIT" />
<result column="is_jump_book" property="isJumpBook" jdbcType="TINYINT" /> <result column="is_jump_book" property="isJumpBook" jdbcType="TINYINT" />
<result column="open_rays_code" property="openRaysCode" jdbcType="INTEGER" />
</resultMap> </resultMap>
<resultMap id="bookListPageMap" type="bookDto" extends ="bookMap"> <resultMap id="bookListPageMap" type="bookDto" extends ="bookMap">
...@@ -322,7 +323,7 @@ ...@@ -322,7 +323,7 @@
BA.GRA_LABEL_ID,BA.SUB_LABEL_ID,BA.VER_LABEL_ID,BA.AREA_LABEL_ID, BA.IS_PRINT isPrint, BA.is_relate, BA.GRA_LABEL_ID,BA.SUB_LABEL_ID,BA.VER_LABEL_ID,BA.AREA_LABEL_ID, BA.IS_PRINT isPrint, BA.is_relate,
BA.pro_label_id, BA.dep_label_id,BA.pur_label_id,BA.vol_label_id,if(G.ID IS NULL, 0, 1) isBookGroup, G.id BOOK_GROUP_ID,G.join_group_type, BA.pro_label_id, BA.dep_label_id,BA.pur_label_id,BA.vol_label_id,if(G.ID IS NULL, 0, 1) isBookGroup, G.id BOOK_GROUP_ID,G.join_group_type,
BA.is_open_robot_process,BA.vol_label_id,b.unique_number,BA.CREATED_DATE,b.edition,BA.is_send_mini_url, BA.is_open_robot_process,BA.vol_label_id,b.unique_number,BA.CREATED_DATE,b.edition,BA.is_send_mini_url,
BA.is_open_catalog ,BA.is_approval, BA.book_phone_auth,BA.is_wechat_auth,BA.is_jump_book BA.is_open_catalog ,BA.is_approval, BA.book_phone_auth,BA.is_wechat_auth,BA.is_jump_book,BA.open_rays_code
FROM FROM
BOOK_ADVISER BA BOOK_ADVISER BA
INNER JOIN INNER JOIN
...@@ -660,6 +661,9 @@ ...@@ -660,6 +661,9 @@
<if test="verLabelId != null"> <if test="verLabelId != null">
AND A.ver_label_id = #{verLabelId} AND A.ver_label_id = #{verLabelId}
</if> </if>
<if test="openRaysCode != null and openRaysCode == 1">
AND A.open_rays_code = 1
</if>
GROUP BY A.BOOK_ID, A.CHANNEL_ID GROUP BY A.BOOK_ID, A.CHANNEL_ID
ORDER BY ORDER BY
LAST_MODIFIED_DATE DESC LAST_MODIFIED_DATE DESC
...@@ -1517,9 +1521,10 @@ ...@@ -1517,9 +1521,10 @@
<!-- 书刊列表-出版端 --> <!-- 书刊列表-出版端 -->
<select id="listPage4Agent" parameterType="map" resultMap="bookMap"> <select id="listPage4Agent" parameterType="map" resultMap="bookMap">
SELECT SELECT
A.BOOK_ID, A.CHANNEL_ID, A.ADVISER_ID, A.IS_MAIN_EDITOR, T.TYPE_CODE, T.TYPE_NAME, B.ISBN, B.BOOK_NAME, B.REMARK, A.BOOK_ADVISER_ID, A.BOOK_ID, A.CHANNEL_ID, A.ADVISER_ID, A.IS_MAIN_EDITOR, T.TYPE_CODE, T.TYPE_NAME, B.ISBN, B.BOOK_NAME, B.REMARK,
B.AUTHOR, B.PUBLISH, B.PUBLISH_DATE, B.COVER_IMG, B.ORIGIN_NAME, B.BOOK_PRICE, B.ISSN, B.BOOK_NUM, B.SERIAL_NUMBER, 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.IS_PRINT isPrint, IF(ISNULL(s.id),0,1) minimumSupport,B.CREATED_DATE IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT, A.TEMPLET_ID, A.IS_PRINT isPrint, IF(ISNULL(s.id),0,1) minimumSupport,B.CREATED_DATE
,A.open_rays_code
FROM FROM
BOOK_ADVISER A BOOK_ADVISER A
INNER JOIN INNER JOIN
......
...@@ -1420,4 +1420,16 @@ ...@@ -1420,4 +1420,16 @@
ADVISER_ID = #{adviserId} ADVISER_ID = #{adviserId}
</select> </select>
<!-- 更新 -->
<update id="update" parameterType="bookAdviser">
UPDATE book_adviser
SET
<if test="openRaysCode != null">
open_rays_code = #{openRaysCode},
</if>
LAST_MODIFIED_DATE = NOW()
WHERE
book_adviser_id = #{bookAdviserId}
</update>
</mapper> </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