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
00bb996a
Commit
00bb996a
authored
May 12, 2020
by
郑永强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【1023191】每周权益线上读书活动的社群,应该是最多展示3个社群,当前最多展示1个社群
parent
04ac18b8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
20 deletions
+35
-20
AppletGroupSearchRecordBizImpl.java
.../book/applet/biz/impl/AppletGroupSearchRecordBizImpl.java
+1
-1
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+18
-14
RightsSettingItem.java
...m/pcloud/book/rightsSetting/entity/RightsSettingItem.java
+4
-0
PcloudGroupActivityDao.java
...ava/com/pcloud/book/skill/dao/PcloudGroupActivityDao.java
+2
-1
PcloudGroupActivityDaoImpl.java
...cloud/book/skill/dao/impl/PcloudGroupActivityDaoImpl.java
+8
-2
PcloudGroupActivityDao.xml
...rc/main/resources/mapper/skill/PcloudGroupActivityDao.xml
+2
-2
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletGroupSearchRecordBizImpl.java
View file @
00bb996a
...
...
@@ -176,7 +176,7 @@ public class AppletGroupSearchRecordBizImpl implements AppletGroupSearchRecordBi
}
}
//根据分类推荐相关
List
<
GroupActivity4AppletDTO
>
groupActivity4AppletDTOS
=
pcloudGroupActivityDao
.
getTishBookSchoolList
(
baseTempletClassify
);
List
<
GroupActivity4AppletDTO
>
groupActivity4AppletDTOS
=
pcloudGroupActivityDao
.
getTishBookSchoolList
(
baseTempletClassify
,
10
);
if
(!
ListUtils
.
isEmpty
(
groupActivity4AppletDTOS
))
{
tishBookSchoolList
.
addAll
(
groupActivity4AppletDTOS
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
00bb996a
...
...
@@ -956,7 +956,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(
ListUtils
.
isEmpty
(
list
)){
return
;
}
GroupActivity4AppletDTO
groupActivity4AppletDTO
=
null
;
List
<
GroupActivity4AppletDTO
>
groupActivity4AppletDTOList
=
null
;
// 书刊分类
BookAdviserDto
bookAdviserDto
=
bookAdviserBiz
.
getOneMainBook
(
list
.
get
(
0
).
getBookId
());
if
(
bookAdviserDto
!=
null
&&
NumberUtil
.
isNumber
(
bookAdviserDto
.
getTempletId
())){
...
...
@@ -968,31 +968,35 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
setClassifyAndLabel
(
baseTempletClassify
);
if
(
NumberUtil
.
isNumber
(
baseTempletClassify
.
getFirstClassify
())){
// 通过书刊分类拿群
groupActivity4AppletDTO
=
pcloudGroupActivityDao
.
getGroupActivity4Applet
(
baseTempletClassify
.
getFirstClassify
(),
baseTempletClassify
.
getSecondClassify
(),
baseTempletClassify
.
getGradeLabelId
(),
baseTempletClassify
.
getSubjectLabelId
()
);
groupActivity4AppletDTO
List
=
pcloudGroupActivityDao
.
getTishBookSchoolList
(
baseTempletClassify
,
3
);
}
}
if
(
groupActivity4AppletDTO
==
null
){
if
(
ListUtils
.
isEmpty
(
groupActivity4AppletDTOList
)
){
// 如果书刊没拿到群,则通过权益分类拿群
RightsSetting
rightsSetting
=
rightsSettingDAO
.
selectByPrimaryKey
(
list
.
get
(
0
).
getRightsSettingId
());
setClassifyAndLabel
(
rightsSetting
);
if
(
NumberUtil
.
isNumber
(
rightsSetting
.
getFirstClassify
())){
groupActivity4AppletDTO
=
pcloudGroupActivityDao
.
getGroupActivity4Applet
(
rightsSetting
.
getFirstClassify
(),
rightsSetting
.
getSecondClassify
(),
rightsSetting
.
getGradeLabelId
(),
rightsSetting
.
getSubjectLabelId
()
);
groupActivity4AppletDTO
List
=
pcloudGroupActivityDao
.
getTishBookSchoolList
(
rightsSetting
,
3
);
}
}
if
(
groupActivity4AppletDTO
!=
null
){
String
filterStr
=
StringUtilParent
.
replaceHtml
(
groupActivity4AppletDTO
.
getDesc
());
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
groupActivity4AppletDTO
.
setCutDesc
(
subStr
);
//头像列表从缓存里取
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
.
getHeadUrlList
(
groupActivity4AppletDTO
.
getUserNumber
(),
groupActivity4AppletDTO
.
getBookGroupQrcodeId
());
groupActivity4AppletDTO
.
setHeadUrlList
(
headUrlList
);
List
<
AppletGroupStatementDTO
>
statementDTOS
=
appletGroupSearchRecordBiz
.
getStatementList
(
groupActivity4AppletDTO
.
getUserNumber
(),
headUrlList
,
groupActivity4AppletDTO
.
getBookGroupQrcodeId
());
groupActivity4AppletDTO
.
setStatementDTOList
(
statementDTOS
);
if
(!
ListUtils
.
isEmpty
(
groupActivity4AppletDTOList
)){
for
(
GroupActivity4AppletDTO
groupActivity4AppletDTO
:
groupActivity4AppletDTOList
){
String
filterStr
=
StringUtilParent
.
replaceHtml
(
groupActivity4AppletDTO
.
getDesc
());
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
groupActivity4AppletDTO
.
setCutDesc
(
subStr
);
//头像列表从缓存里取
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
.
getHeadUrlList
(
groupActivity4AppletDTO
.
getUserNumber
(),
groupActivity4AppletDTO
.
getBookGroupQrcodeId
());
groupActivity4AppletDTO
.
setHeadUrlList
(
headUrlList
);
List
<
AppletGroupStatementDTO
>
statementDTOS
=
appletGroupSearchRecordBiz
.
getStatementList
(
groupActivity4AppletDTO
.
getUserNumber
(),
headUrlList
,
groupActivity4AppletDTO
.
getBookGroupQrcodeId
());
groupActivity4AppletDTO
.
setStatementDTOList
(
statementDTOS
);
}
for
(
RightsSettingItem
rightsSettingItem
:
list
){
if
(
rightsSettingItemIds
.
contains
(
rightsSettingItem
.
getId
())){
rightsSettingItem
.
setGroupActivity4Applet
DTO
(
groupActivity4AppletDTO
);
rightsSettingItem
.
setGroupActivity4Applet
List
(
groupActivity4AppletDTOList
);
}
// 小程序兼容处理,新版发布后,可删除
rightsSettingItem
.
setGroupActivity4AppletDTO
(
groupActivity4AppletDTOList
.
get
(
0
));
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSettingItem.java
View file @
00bb996a
...
...
@@ -76,4 +76,7 @@ public class RightsSettingItem extends BaseEntity {
@ApiModelProperty
(
"社群"
)
private
GroupActivity4AppletDTO
groupActivity4AppletDTO
;
@ApiModelProperty
(
"社群"
)
private
List
<
GroupActivity4AppletDTO
>
groupActivity4AppletList
;
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/skill/dao/PcloudGroupActivityDao.java
View file @
00bb996a
...
...
@@ -17,5 +17,5 @@ public interface PcloudGroupActivityDao extends BaseDao<PcloudGroupActivity> {
GroupActivity4AppletDTO
getGroupActivity4Applet
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
);
List
<
GroupActivity4AppletDTO
>
getTishBookSchoolList
(
BaseTempletClassify
baseTempletClassify
);
List
<
GroupActivity4AppletDTO
>
getTishBookSchoolList
(
BaseTempletClassify
baseTempletClassify
,
Integer
limit
);
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/skill/dao/impl/PcloudGroupActivityDaoImpl.java
View file @
00bb996a
...
...
@@ -37,8 +37,14 @@ public class PcloudGroupActivityDaoImpl extends BaseDaoImpl<PcloudGroupActivity>
}
@Override
public
List
<
GroupActivity4AppletDTO
>
getTishBookSchoolList
(
BaseTempletClassify
baseTempletClassify
)
{
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getTishBookSchoolList"
),
baseTempletClassify
);
public
List
<
GroupActivity4AppletDTO
>
getTishBookSchoolList
(
BaseTempletClassify
baseTempletClassify
,
Integer
limit
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"firstClassify"
,
baseTempletClassify
.
getFirstClassify
());
map
.
put
(
"secondClassify"
,
baseTempletClassify
.
getSecondClassify
());
map
.
put
(
"gradeLabelId"
,
baseTempletClassify
.
getGradeLabelId
());
map
.
put
(
"subjectLabelId"
,
baseTempletClassify
.
getSubjectLabelId
());
map
.
put
(
"limit"
,
(
limit
!=
null
?
limit
:
10
));
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getTishBookSchoolList"
),
map
);
}
}
pcloud-service-book/src/main/resources/mapper/skill/PcloudGroupActivityDao.xml
View file @
00bb996a
...
...
@@ -83,7 +83,7 @@
order by a.id desc
</select>
<select
id=
"getTishBookSchoolList"
resultType=
"com.pcloud.book.skill.dto.GroupActivity4AppletDTO"
parameterType=
"
com.pcloud.book.rightsSetting.entity.BaseTempletClassify
"
>
<select
id=
"getTishBookSchoolList"
resultType=
"com.pcloud.book.skill.dto.GroupActivity4AppletDTO"
parameterType=
"
map
"
>
SELECT
a.id,
a.id groupActivityId,
...
...
@@ -119,7 +119,7 @@
and a.subject_label_id = #{subjectLabelId}
</if>
ORDER BY id DESC
LIMIT
10
LIMIT
#{limit}
</select>
<select
id=
"getById"
resultMap=
"BaseResultMap"
parameterType=
"long"
>
...
...
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