Commit 2e83a418 by 田超

Merge branch 'feature/1004834' into 'master'

feat: [1004834] H5本书服务页面优化升级,支持背景自定义

See merge request rays/pcloud-book!1322
parents 2751aa17 8a5706f7
...@@ -233,6 +233,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -233,6 +233,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
} }
//校验能否开启小睿 //校验能否开启小睿
this.checkOpenRays(resourcePage.getBookId(), updateResourcePageVO.getOpenRays()); this.checkOpenRays(resourcePage.getBookId(), updateResourcePageVO.getOpenRays());
resourcePage.setBackgroundImg(updateResourcePageVO.getBackgroundImg());
resourcePageDao.update(resourcePage); resourcePageDao.update(resourcePage);
} }
if (updateResourcePageVO.getOpenRays() == 1) { if (updateResourcePageVO.getOpenRays() == 1) {
...@@ -289,6 +290,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -289,6 +290,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
//校验能否开启小睿 //校验能否开启小睿
this.checkOpenRays(resourcePage.getBookId(), updateResourcePageVO.getOpenRays()); this.checkOpenRays(resourcePage.getBookId(), updateResourcePageVO.getOpenRays());
resourcePage.setBookCover(updateResourcePageVO.getBookCover()); resourcePage.setBookCover(updateResourcePageVO.getBookCover());
resourcePage.setBackgroundImg(updateResourcePageVO.getBackgroundImg());
resourcePageDao.update(resourcePage); resourcePageDao.update(resourcePage);
} }
if (updateResourcePageVO.getOpenRays() == 1) { if (updateResourcePageVO.getOpenRays() == 1) {
...@@ -1095,6 +1097,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -1095,6 +1097,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
resourcePageVO.setQrcodeUrl(resourcePage.getQrcodeUrl()); resourcePageVO.setQrcodeUrl(resourcePage.getQrcodeUrl());
resourcePageVO.setId(resourcePage.getId()); resourcePageVO.setId(resourcePage.getId());
resourcePageVO.setBookCover(resourcePage.getBookCover()); resourcePageVO.setBookCover(resourcePage.getBookCover());
resourcePageVO.setBackgroundImg(resourcePage.getBackgroundImg());
} }
return resourcePageVO; return resourcePageVO;
} }
...@@ -1128,6 +1131,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -1128,6 +1131,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
resourcePageVO.setQrcodeUrl(resourcePage.getQrcodeUrl()); resourcePageVO.setQrcodeUrl(resourcePage.getQrcodeUrl());
resourcePageVO.setId(resourcePage.getId()); resourcePageVO.setId(resourcePage.getId());
resourcePageVO.setBookCover(resourcePage.getBookCover()); resourcePageVO.setBookCover(resourcePage.getBookCover());
resourcePageVO.setBackgroundImg(resourcePage.getBackgroundImg());
} }
return resourcePageVO; return resourcePageVO;
} }
......
...@@ -58,4 +58,8 @@ public class ResourcePage extends BaseEntity { ...@@ -58,4 +58,8 @@ public class ResourcePage extends BaseEntity {
* 渠道id * 渠道id
*/ */
private Long channelId; private Long channelId;
/**
* 背景图
*/
private String backgroundImg;
} }
\ No newline at end of file
...@@ -78,4 +78,9 @@ public class ResourcePageVO extends BaseDto { ...@@ -78,4 +78,9 @@ public class ResourcePageVO extends BaseDto {
* 扫码推送二维码名称权限状态 * 扫码推送二维码名称权限状态
*/ */
private Integer pushTextOpenStatus; private Integer pushTextOpenStatus;
/**
* 背景图
*/
private String backgroundImg;
} }
\ No newline at end of file
...@@ -49,4 +49,9 @@ public class UpdateResourcePageVO { ...@@ -49,4 +49,9 @@ public class UpdateResourcePageVO {
* 自定义配置的图书封面 * 自定义配置的图书封面
*/ */
private String bookCover; private String bookCover;
/**
* 背景图
*/
private String backgroundImg;
} }
...@@ -17,16 +17,18 @@ ...@@ -17,16 +17,18 @@
<result property="bookCover" column="book_cover" jdbcType="VARCHAR"/> <result property="bookCover" column="book_cover" jdbcType="VARCHAR"/>
<result property="bookId" column="book_id" jdbcType="INTEGER"/> <result property="bookId" column="book_id" jdbcType="INTEGER"/>
<result property="channelId" column="channel_id" jdbcType="INTEGER"/> <result property="channelId" column="channel_id" jdbcType="INTEGER"/>
<result property="backgroundImg" column="background_img" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, book_group_id, style, show_book, open_rays, create_time, update_time, create_user, qrcode_url, scene_id, official_scene_id, book_id, channel_id id, book_group_id, style, show_book, open_rays, create_time, update_time, create_user, qrcode_url, scene_id, official_scene_id,
book_cover, book_id, channel_id, background_img
</sql> </sql>
<!--查询单个--> <!--查询单个-->
<select id="getById" resultMap="ResourcePageMap"> <select id="getById" resultMap="ResourcePageMap">
select select
id, book_group_id, style, show_book, open_rays, create_time, update_time, create_user, qrcode_url, scene_id, official_scene_id, book_cover, book_id, channel_id <include refid="Base_Column_List"/>
from book.resource_page from book.resource_page
where id = #{id} where id = #{id}
</select> </select>
...@@ -35,9 +37,9 @@ ...@@ -35,9 +37,9 @@
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into book.resource_page(book_group_id, style, show_book, open_rays, create_time, update_time, create_user, insert into book.resource_page(book_group_id, style, show_book, open_rays, create_time, update_time, create_user,
qrcode_url, scene_id, book_cover, book_id, channel_id) qrcode_url, scene_id, book_cover, book_id, channel_id, background_img)
values (#{bookGroupId}, #{style}, #{showBook}, #{openRays}, now(), now(), #{createUser}, #{qrcodeUrl}, #{sceneId}, #{bookCover}, values (#{bookGroupId}, #{style}, #{showBook}, #{openRays}, now(), now(), #{createUser}, #{qrcodeUrl}, #{sceneId}, #{bookCover},
#{bookId}, #{channelId}) #{bookId}, #{channelId}, #{backgroundImg})
</insert> </insert>
<!--通过主键修改数据--> <!--通过主键修改数据-->
...@@ -64,6 +66,7 @@ ...@@ -64,6 +66,7 @@
</if> </if>
book_cover = #{bookCover}, book_cover = #{bookCover},
update_time = NOW(), update_time = NOW(),
background_img = #{backgroundImg},
</set> </set>
where id = #{id} where id = #{id}
</update> </update>
...@@ -75,8 +78,9 @@ ...@@ -75,8 +78,9 @@
<select id="getByBookGroupId" parameterType="long" resultMap="ResourcePageMap"> <select id="getByBookGroupId" parameterType="long" resultMap="ResourcePageMap">
select select
id, book_group_id, style, show_book, open_rays, qrcode_url, official_scene_id, book_cover, book_id, channel_id, create_user id, book_group_id, style, show_book, open_rays, qrcode_url, official_scene_id, book_cover, book_id, channel_id, create_user,
from book.resource_page background_img
from book.resource_page
where book_group_id = #{bookGroupId} where book_group_id = #{bookGroupId}
limit 1 limit 1
</select> </select>
...@@ -89,7 +93,8 @@ ...@@ -89,7 +93,8 @@
p.show_book, p.show_book,
p.book_cover, p.book_cover,
p.open_rays, p.open_rays,
p.scene_id p.scene_id,
p.background_img
FROM FROM
resource_page p resource_page p
LEFT JOIN resource_page_item i ON p.id = i.resource_page_id LEFT JOIN resource_page_item i ON p.id = i.resource_page_id
...@@ -118,7 +123,8 @@ ...@@ -118,7 +123,8 @@
<select id="getBySceneId" parameterType="long" resultMap="ResourcePageMap"> <select id="getBySceneId" parameterType="long" resultMap="ResourcePageMap">
select select
id, book_group_id, style, show_book, open_rays, qrcode_url, scene_id, official_scene_id, book_cover,book_id, channel_id, create_user id, book_group_id, style, show_book, open_rays, qrcode_url, scene_id, official_scene_id, book_cover,book_id, channel_id, create_user,
background_img
from book.resource_page from book.resource_page
where scene_id = #{sceneId} where scene_id = #{sceneId}
limit 1 limit 1
......
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