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
7af5a9bf
Commit
7af5a9bf
authored
Aug 06, 2021
by
吴博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [1005211] 部分资讯转作品
parent
91ec974d
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
0 deletions
+64
-0
AppletNewsBiz.java
...c/main/java/com/pcloud/book/applet/biz/AppletNewsBiz.java
+7
-0
AppletNewsBizImpl.java
...va/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
+5
-0
AppletNewsDao.java
...c/main/java/com/pcloud/book/applet/dao/AppletNewsDao.java
+7
-0
AppletNewsDaoImpl.java
...va/com/pcloud/book/applet/dao/impl/AppletNewsDaoImpl.java
+5
-0
RightsSettingBiz.java
...a/com/pcloud/book/rightsSetting/biz/RightsSettingBiz.java
+5
-0
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+16
-0
RightsSettingFacede.java
...pcloud/book/rightsSetting/facade/RightsSettingFacede.java
+7
-0
AppletNews.xml
...vice-book/src/main/resources/mapper/applet/AppletNews.xml
+12
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/AppletNewsBiz.java
View file @
7af5a9bf
...
@@ -327,4 +327,11 @@ public interface AppletNewsBiz {
...
@@ -327,4 +327,11 @@ public interface AppletNewsBiz {
* * @param null
* * @param null
*/
*/
Map
<
Long
,
Integer
>
getStayOnlineAppClickCount
();
Map
<
Long
,
Integer
>
getStayOnlineAppClickCount
();
/**
* 批量获取资讯详情
* @param newsIds
* @return
*/
List
<
AppletNews
>
getListByIds
(
List
<
Long
>
newsIds
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
View file @
7af5a9bf
...
@@ -1362,4 +1362,9 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
...
@@ -1362,4 +1362,9 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
}
}
return
map
;
return
map
;
}
}
@Override
public
List
<
AppletNews
>
getListByIds
(
List
<
Long
>
newsIds
)
{
return
appletNewsDao
.
getListByIds
(
newsIds
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/dao/AppletNewsDao.java
View file @
7af5a9bf
...
@@ -186,4 +186,11 @@ public interface AppletNewsDao extends BaseDao<AppletNews> {
...
@@ -186,4 +186,11 @@ public interface AppletNewsDao extends BaseDao<AppletNews> {
* @return
* @return
*/
*/
Map
<
Long
,
AppletNewsDTO
>
getByIds4Record
(
List
<
Long
>
newsIds
);
Map
<
Long
,
AppletNewsDTO
>
getByIds4Record
(
List
<
Long
>
newsIds
);
/**
* 批量获取资讯详情
* @param newsIds
* @return
*/
List
<
AppletNews
>
getListByIds
(
List
<
Long
>
newsIds
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/dao/impl/AppletNewsDaoImpl.java
View file @
7af5a9bf
...
@@ -247,6 +247,11 @@ public class AppletNewsDaoImpl extends BaseDaoImpl<AppletNews> implements Applet
...
@@ -247,6 +247,11 @@ public class AppletNewsDaoImpl extends BaseDaoImpl<AppletNews> implements Applet
}
}
@Override
@Override
public
List
<
AppletNews
>
getListByIds
(
List
<
Long
>
newsIds
)
{
return
this
.
getSqlSession
().
selectList
(
getStatement
(
"getListByIds"
),
newsIds
);
}
@Override
public
Integer
listAppletNews4WechatCount
(
Map
<
String
,
Object
>
paramMap
)
{
public
Integer
listAppletNews4WechatCount
(
Map
<
String
,
Object
>
paramMap
)
{
return
getSessionTemplate
().
selectOne
(
getStatement
(
"listAppletNews4WechatCount"
),
paramMap
);
return
getSessionTemplate
().
selectOne
(
getStatement
(
"listAppletNews4WechatCount"
),
paramMap
);
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/RightsSettingBiz.java
View file @
7af5a9bf
...
@@ -273,4 +273,9 @@ public interface RightsSettingBiz {
...
@@ -273,4 +273,9 @@ public interface RightsSettingBiz {
* 处理资讯
* 处理资讯
*/
*/
void
handleNews
();
void
handleNews
();
/**
* 处理指定资讯
*/
void
handleNews4Ids
(
List
<
Long
>
newsIds
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
7af5a9bf
...
@@ -1265,6 +1265,20 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -1265,6 +1265,20 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
}
}
@Override
public
void
handleNews4Ids
(
List
<
Long
>
newsIds
)
{
log
.
info
(
"handleNews4Ids:{}"
,
newsIds
);
List
<
AppletNews
>
appletNews
=
appletNewsBiz
.
getListByIds
(
newsIds
);
if
(
ListUtils
.
isEmpty
(
appletNews
))
{
return
;
}
//获取资讯与作品关系集合
Map
<
Long
,
Long
>
newsProductMap
=
getNewsProductMap
(
appletNews
);
if
(
MapUtils
.
isNotEmpty
(
newsProductMap
))
{
log
.
info
(
newsProductMap
.
toString
());
}
}
private
Map
<
Long
,
Long
>
getNewsProductMap
(
List
<
AppletNews
>
appletNews
)
{
private
Map
<
Long
,
Long
>
getNewsProductMap
(
List
<
AppletNews
>
appletNews
)
{
String
defaultPic1
=
"https://oss.5rs.me/oss/uploadfe/jpg/5b47ff1c2b9a47a7d9fab10ef0990255.jpg"
;
String
defaultPic1
=
"https://oss.5rs.me/oss/uploadfe/jpg/5b47ff1c2b9a47a7d9fab10ef0990255.jpg"
;
Long
partyId
=
null
;
Long
partyId
=
null
;
...
@@ -1280,6 +1294,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -1280,6 +1294,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
//填充数据
//填充数据
Long
finalPartyId
=
partyId
;
Long
finalPartyId
=
partyId
;
appletNews
.
stream
().
forEach
(
news
->
{
appletNews
.
stream
().
forEach
(
news
->
{
log
.
info
(
"批量将资讯转成作品开始:{}"
,
news
);
Product
product
=
new
Product
();
Product
product
=
new
Product
();
product
.
setCoverImg
(
"https://oss.5rs.me/oss/uploadfe/jpg/03024429744ee9bf16abc728236b7ee7.jpg"
);
product
.
setCoverImg
(
"https://oss.5rs.me/oss/uploadfe/jpg/03024429744ee9bf16abc728236b7ee7.jpg"
);
product
.
setDetailDesc
(
StringUtil
.
isEmpty
(
news
.
getDigest
())
?
news
.
getNewsName
()
:
news
.
getDigest
());
product
.
setDetailDesc
(
StringUtil
.
isEmpty
(
news
.
getDigest
())
?
news
.
getNewsName
()
:
news
.
getDigest
());
...
@@ -1325,6 +1340,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -1325,6 +1340,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(
null
!=
news
.
getId
()
&&
null
!=
productId
)
{
if
(
null
!=
news
.
getId
()
&&
null
!=
productId
)
{
newsProductMap
.
put
(
news
.
getId
(),
productId
);
newsProductMap
.
put
(
news
.
getId
(),
productId
);
}
}
log
.
info
(
"批量将资讯转成作品结束:newsId:{},productId:{}"
,
news
.
getId
(),
productId
);
});
});
return
newsProductMap
;
return
newsProductMap
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/facade/RightsSettingFacede.java
View file @
7af5a9bf
...
@@ -436,4 +436,10 @@ public class RightsSettingFacede {
...
@@ -436,4 +436,10 @@ public class RightsSettingFacede {
rightsSettingBiz
.
handleNews
();
rightsSettingBiz
.
handleNews
();
return
new
ResponseDto
<>();
return
new
ResponseDto
<>();
}
}
@ApiOperation
(
"将资讯转成作品"
)
@PostMapping
(
"handleNews4Ids"
)
public
ResponseDto
<?>
handleNews4Ids
(
@RequestBody
List
<
Long
>
newsIds
)
{
rightsSettingBiz
.
handleNews4Ids
(
newsIds
);
return
new
ResponseDto
<>();
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/applet/AppletNews.xml
View file @
7af5a9bf
...
@@ -1077,4 +1077,16 @@
...
@@ -1077,4 +1077,16 @@
group by n.id
group by n.id
</select>
</select>
<select
id=
"getListByIds"
parameterType=
"list"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from
applet_news news
where
id IN
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</select>
</mapper>
</mapper>
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