Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
86bf2eba
Commit
86bf2eba
authored
Apr 20, 2021
by
朱亚洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:[1004458]H5资源落地页
parent
26b29549
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
192 additions
and
34 deletions
+192
-34
BookAdviserBizImpl.java
...ava/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
+4
-1
QrcodeSceneConsr.java
...va/com/pcloud/book/consumer/channel/QrcodeSceneConsr.java
+10
-0
ResourcePageBiz.java
.../main/java/com/pcloud/book/group/biz/ResourcePageBiz.java
+5
-3
ResourcePageBizImpl.java
...a/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
+112
-23
ResourcePageColumnDao.java
...java/com/pcloud/book/group/dao/ResourcePageColumnDao.java
+3
-0
ResourcePageItemDao.java
...n/java/com/pcloud/book/group/dao/ResourcePageItemDao.java
+5
-0
ResourcePageColumnDaoImpl.java
...pcloud/book/group/dao/impl/ResourcePageColumnDaoImpl.java
+5
-0
ResourcePageItemDaoImpl.java
...m/pcloud/book/group/dao/impl/ResourcePageItemDaoImpl.java
+10
-0
ResourcePageFacade.java
...com/pcloud/book/group/facade/impl/ResourcePageFacade.java
+4
-4
Book.Mapper.xml
...rvice-book/src/main/resources/mapper/book/Book.Mapper.xml
+4
-3
ResourcePageColumnDao.xml
...src/main/resources/mapper/group/ResourcePageColumnDao.xml
+4
-0
ResourcePageItemDao.xml
...k/src/main/resources/mapper/group/ResourcePageItemDao.xml
+26
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
View file @
86bf2eba
...
@@ -73,6 +73,7 @@ import com.pcloud.book.group.biz.BookGroupBiz;
...
@@ -73,6 +73,7 @@ import com.pcloud.book.group.biz.BookGroupBiz;
import
com.pcloud.book.group.dao.BookAppletSceneDao
;
import
com.pcloud.book.group.dao.BookAppletSceneDao
;
import
com.pcloud.book.group.dao.BookGroupDao
;
import
com.pcloud.book.group.dao.BookGroupDao
;
import
com.pcloud.book.group.dao.BookGroupServeDao
;
import
com.pcloud.book.group.dao.BookGroupServeDao
;
import
com.pcloud.book.group.dao.ResourcePageItemDao
;
import
com.pcloud.book.group.dto.BookAppletSceneDTO
;
import
com.pcloud.book.group.dto.BookAppletSceneDTO
;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.dto.BookGroupServeCountDTO
;
import
com.pcloud.book.group.dto.BookGroupServeCountDTO
;
...
@@ -248,6 +249,8 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -248,6 +249,8 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
private
BookLabelBiz
bookLabelBiz
;
private
BookLabelBiz
bookLabelBiz
;
@Autowired
@Autowired
private
BookGroupServeDao
bookGroupServeDao
;
private
BookGroupServeDao
bookGroupServeDao
;
@Autowired
private
ResourcePageItemDao
resourcePageItemDao
;
@Override
@Override
public
List
<
BookDto
>
listByAdviserId
(
Long
adviserId
)
{
public
List
<
BookDto
>
listByAdviserId
(
Long
adviserId
)
{
...
@@ -2916,7 +2919,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -2916,7 +2919,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
// 填充配置的服务信息
// 填充配置的服务信息
// 查询 book_group_serve
// 查询 book_group_serve
CompletableFuture
<
List
<
BookGroupServe
>>
bookGroupServeFuture
=
CompletableFuture
.
completedFuture
(
CompletableFuture
<
List
<
BookGroupServe
>>
bookGroupServeFuture
=
CompletableFuture
.
completedFuture
(
Optional
.
ofNullable
(
bookGroupServeDao
.
get
ListByBookGroupIds
(
bookGroupIds
)).
orElse
(
new
ArrayList
<>()));
Optional
.
ofNullable
(
resourcePageItemDao
.
getServe
ListByBookGroupIds
(
bookGroupIds
)).
orElse
(
new
ArrayList
<>()));
// 查询 book_group_serve 作品信息
// 查询 book_group_serve 作品信息
// 查询作品ID
// 查询作品ID
...
...
pcloud-service-book/src/main/java/com/pcloud/book/consumer/channel/QrcodeSceneConsr.java
View file @
86bf2eba
...
@@ -539,4 +539,14 @@ public class QrcodeSceneConsr {
...
@@ -539,4 +539,14 @@ public class QrcodeSceneConsr {
}
}
return
map
;
return
map
;
}
}
@ParamLog
(
"二维码信息(含资源配置)"
)
public
QrcodeSceneDto
getDetail
(
Long
sceneId
)
{
try
{
return
ResponseHandleUtil
.
parseResponse
(
qrcodeSceneService
.
getDetail
(
sceneId
),
QrcodeSceneDto
.
class
);
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"调用qrcodeSceneService.getDetail失败"
+
e
.
getMessage
(),
e
);
}
return
null
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/ResourcePageBiz.java
View file @
86bf2eba
...
@@ -137,12 +137,13 @@ public interface ResourcePageBiz {
...
@@ -137,12 +137,13 @@ public interface ResourcePageBiz {
*/
*/
List
<
BookGroupServe
>
getServeListByBookGroupId
(
Long
bookGroupId
);
List
<
BookGroupServe
>
getServeListByBookGroupId
(
Long
bookGroupId
);
/**
/**
* 批量更新
预览
二维码
* 批量更新
资源聚合页
二维码
* @author:zhuyajie
* @author:zhuyajie
* @date:2021/4/20 1:14
* @date:2021/4/20 1:14
* * @param null
* * @param null
*/
*/
void
batchUpdateQrcode
(
List
<
Long
>
bookGroupIds
);
void
batchUpdateResourceQrcode
(
List
<
Long
>
qrcodeIdList
,
String
qrcodeType
);
/**
/**
* 根据书籍id和channel获取资源配置页
* 根据书籍id和channel获取资源配置页
...
@@ -151,4 +152,4 @@ public interface ResourcePageBiz {
...
@@ -151,4 +152,4 @@ public interface ResourcePageBiz {
* @return
* @return
*/
*/
ResourcePageVO
getResourcePageByBookIdAndChannelId
(
Long
adviserBookId
,
Long
channelId
);
ResourcePageVO
getResourcePageByBookIdAndChannelId
(
Long
adviserBookId
,
Long
channelId
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
View file @
86bf2eba
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/ResourcePageColumnDao.java
View file @
86bf2eba
...
@@ -61,4 +61,6 @@ public interface ResourcePageColumnDao extends BaseDao<ResourcePageColumn> {
...
@@ -61,4 +61,6 @@ public interface ResourcePageColumnDao extends BaseDao<ResourcePageColumn> {
* * @param null
* * @param null
*/
*/
void
updateSeq4Batch
(
List
<
ResourceColumnAndServeVO
>
list
);
void
updateSeq4Batch
(
List
<
ResourceColumnAndServeVO
>
list
);
void
deleteByPageId
(
Long
resourcePageId
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/ResourcePageItemDao.java
View file @
86bf2eba
...
@@ -53,4 +53,8 @@ public interface ResourcePageItemDao extends BaseDao<ResourcePageItem>{
...
@@ -53,4 +53,8 @@ public interface ResourcePageItemDao extends BaseDao<ResourcePageItem>{
* * @param null
* * @param null
*/
*/
List
<
BookGroupServe
>
getServeListByBookGroupId
(
Long
bookGroupId
);
List
<
BookGroupServe
>
getServeListByBookGroupId
(
Long
bookGroupId
);
void
deleteByPageId
(
Long
resourcePageId
);
List
<
BookGroupServe
>
getServeListByBookGroupIds
(
List
<
Long
>
bookGroupIds
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/ResourcePageColumnDaoImpl.java
View file @
86bf2eba
...
@@ -59,4 +59,9 @@ public class ResourcePageColumnDaoImpl extends BaseDaoImpl<ResourcePageColumn> i
...
@@ -59,4 +59,9 @@ public class ResourcePageColumnDaoImpl extends BaseDaoImpl<ResourcePageColumn> i
public
void
updateSeq4Batch
(
List
<
ResourceColumnAndServeVO
>
list
)
{
public
void
updateSeq4Batch
(
List
<
ResourceColumnAndServeVO
>
list
)
{
getSessionTemplate
().
update
(
getStatement
(
"updateSeq4Batch"
),
list
);
getSessionTemplate
().
update
(
getStatement
(
"updateSeq4Batch"
),
list
);
}
}
@Override
public
void
deleteByPageId
(
Long
resourcePageId
)
{
getSessionTemplate
().
delete
(
getStatement
(
"deleteByPageId"
),
resourcePageId
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/ResourcePageItemDaoImpl.java
View file @
86bf2eba
...
@@ -51,4 +51,14 @@ public class ResourcePageItemDaoImpl extends BaseDaoImpl<ResourcePageItem> imple
...
@@ -51,4 +51,14 @@ public class ResourcePageItemDaoImpl extends BaseDaoImpl<ResourcePageItem> imple
public
List
<
BookGroupServe
>
getServeListByBookGroupId
(
Long
bookGroupId
)
{
public
List
<
BookGroupServe
>
getServeListByBookGroupId
(
Long
bookGroupId
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getServeListByBookGroupId"
),
bookGroupId
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getServeListByBookGroupId"
),
bookGroupId
);
}
}
@Override
public
void
deleteByPageId
(
Long
resourcePageId
)
{
getSessionTemplate
().
delete
(
getStatement
(
"deleteByPageId"
),
resourcePageId
);
}
@Override
public
List
<
BookGroupServe
>
getServeListByBookGroupIds
(
List
<
Long
>
bookGroupIds
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getServeListByBookGroupIds"
),
bookGroupIds
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/impl/ResourcePageFacade.java
View file @
86bf2eba
...
@@ -153,10 +153,10 @@ public class ResourcePageFacade {
...
@@ -153,10 +153,10 @@ public class ResourcePageFacade {
return
new
ResponseDto
<>(
resourcePageBiz
.
getResourcePageByBookGroupIdOrSceneId4Wechat
(
bookGroupId
,
wechatUserId
,
sceneId
));
return
new
ResponseDto
<>(
resourcePageBiz
.
getResourcePageByBookGroupIdOrSceneId4Wechat
(
bookGroupId
,
wechatUserId
,
sceneId
));
}
}
@ApiOperation
(
"批量更新
预览
二维码"
)
@ApiOperation
(
"批量更新
资源页
二维码"
)
@PostMapping
(
"batchUpdateQrcode"
)
@PostMapping
(
"batchUpdate
Resource
Qrcode"
)
public
ResponseDto
<?>
batchUpdate
Qrcode
(
@RequestBody
List
<
Long
>
bookGroupIds
)
{
public
ResponseDto
<?>
batchUpdate
ResourceQrcode
(
@RequestBody
List
<
Long
>
qrcodeIdList
,
@RequestParam
(
"qrcodeType"
)
String
qrcodeType
)
{
resourcePageBiz
.
batchUpdate
Qrcode
(
bookGroupIds
);
resourcePageBiz
.
batchUpdate
ResourceQrcode
(
qrcodeIdList
,
qrcodeType
);
return
new
ResponseDto
<>();
return
new
ResponseDto
<>();
}
}
}
}
pcloud-service-book/src/main/resources/mapper/book/Book.Mapper.xml
View file @
86bf2eba
...
@@ -687,9 +687,9 @@
...
@@ -687,9 +687,9 @@
G.group_qrcode_name groupQrcodeName, G.dep_label_id bookGroupDepLabelId, G.join_group_type, G.book_group_cipher, G.short_book_name
G.group_qrcode_name groupQrcodeName, G.dep_label_id bookGroupDepLabelId, G.join_group_type, G.book_group_cipher, G.short_book_name
, if(IFNULL(case G.join_group_type
, if(IFNULL(case G.join_group_type
WHEN 1 then bk.id
WHEN 1 then bk.id
WHEN 2 THEN
bgs
.id
WHEN 2 THEN
i
.id
WHEN 3 THEN srk.id
WHEN 3 THEN srk.id
WHEN 4 THEN
bgs
.id
WHEN 4 THEN
i
.id
else null END,0)=0,0,1)as has_serve, A.IS_PRINT isPrint, G.open_weapp openWeapp,
else null END,0)=0,0,1)as has_serve, A.IS_PRINT isPrint, G.open_weapp openWeapp,
G.single_group singleGroup, G.related_book_group_id relatedBookGroupId, G.group_qrcode_link groupQrcodeLink,
G.single_group singleGroup, G.related_book_group_id relatedBookGroupId, G.group_qrcode_link groupQrcodeLink,
G.jump_type jumpType, G.jump_url jumpUrl, G.seq
G.jump_type jumpType, G.jump_url jumpUrl, G.seq
...
@@ -699,9 +699,10 @@
...
@@ -699,9 +699,10 @@
LEFT JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID
LEFT JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID
LEFT JOIN BOOK_TYPE T ON B.TYPE_CODE = T.TYPE_CODE
LEFT JOIN BOOK_TYPE T ON B.TYPE_CODE = T.TYPE_CODE
LEFT JOIN BOOK_FUND BF ON BF.BOOK_ID = A.BOOK_ID AND BF.END_TIME
<![CDATA[ > ]]>
NOW() AND BF.START_TIME
<![CDATA[ < ]]>
NOW()
LEFT JOIN BOOK_FUND BF ON BF.BOOK_ID = A.BOOK_ID AND BF.END_TIME
<![CDATA[ > ]]>
NOW() AND BF.START_TIME
<![CDATA[ < ]]>
NOW()
LEFT JOIN BOOK_GROUP_SERVE bgs on G.id=bgs.book_group_id
LEFT JOIN BOOK_KEYWORD bk on G.id=bk.book_group_id and bk.is_delete=0
LEFT JOIN BOOK_KEYWORD bk on G.id=bk.book_group_id and bk.is_delete=0
LEFT JOIN self_robot_keyword srk ON G.id = srk.book_group_id
LEFT JOIN self_robot_keyword srk ON G.id = srk.book_group_id
LEFT JOIN resource_page p ON g.id = p.book_group_id
LEFT JOIN resource_page_item i ON p.id = i.resource_page_id
WHERE
WHERE
G.create_user = #{adviserId} AND G.is_delete = 0
G.create_user = #{adviserId} AND G.is_delete = 0
AND (
AND (
...
...
pcloud-service-book/src/main/resources/mapper/group/ResourcePageColumnDao.xml
View file @
86bf2eba
...
@@ -150,4 +150,7 @@
...
@@ -150,4 +150,7 @@
</foreach>
</foreach>
</update>
</update>
<delete
id=
"deleteByPageId"
parameterType=
"long"
>
delete from book.resource_page_column where resource_page_id = #{resourcePageId}
</delete>
</mapper>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/group/ResourcePageItemDao.xml
View file @
86bf2eba
...
@@ -145,4 +145,29 @@
...
@@ -145,4 +145,29 @@
c.column_seq ASC
c.column_seq ASC
</select>
</select>
<delete
id=
"deleteByPageId"
parameterType=
"long"
>
delete from book.resource_page_item where resource_page_id = #{resourcePageId}
</delete>
<select
id=
"getServeListByBookGroupIds"
parameterType=
"list"
resultType=
"com.pcloud.book.group.entity.BookGroupServe"
>
SELECT
i.serve_id serveId,
i.serve_type serveType,
i.link_url serveUrl,
p.book_group_id bookGroupId,
p.create_user createUser,
i.type_code typeCode
FROM
resource_page_item i
LEFT JOIN resource_page p ON i.resource_page_id = p.id
LEFT JOIN resource_page_column c ON i.resource_page_column_id = c.id
WHERE
p.book_group_id IN
<foreach
collection=
"list"
index=
"index"
separator=
","
open=
"("
close=
")"
item=
"item"
>
#{item}
</foreach>
AND i.serve_type IN ('APP', 'PRODUCT')
ORDER BY
c.column_seq ASC
</select>
</mapper>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment