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
38490458
Commit
38490458
authored
Jan 15, 2021
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixbug/fixqrcode' into 'master'
bug: [none] fixqrcode See merge request rays/pcloud-book!1154
parents
25f080bd
5d8a9354
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
5 deletions
+56
-5
ChannelConsr.java
...main/java/com/pcloud/book/consumer/user/ChannelConsr.java
+12
-0
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+3
-4
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+37
-1
BookAdviser.Mapper.xml
...ook/src/main/resources/mapper/book/BookAdviser.Mapper.xml
+4
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/consumer/user/ChannelConsr.java
View file @
38490458
...
...
@@ -259,4 +259,16 @@ public class ChannelConsr {
}
return
new
ArrayList
<>();
}
public
Map
<
Long
,
QrcodeSceneDto
>
listQrcodeScene4Rights
(
List
<
Long
>
bookIds
)
{
if
(
CollectionUtils
.
isEmpty
(
bookIds
))
{
return
new
HashMap
<>();
}
try
{
return
ResponseHandleUtil
.
parseMap
(
qrcodeSceneService
.
listQrcodeScene4Rights
(
bookIds
),
Long
.
class
,
QrcodeSceneDto
.
class
);
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"批量获取二维码及其印码位置 失败:{} "
,
e
.
getMessage
(),
e
);
}
return
new
HashMap
<>();
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
38490458
...
...
@@ -5481,9 +5481,9 @@ public class BookGroupBizImpl implements BookGroupBiz {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
//是否小睿,小睿权益id
BookGroupDTO
bookGroupDTO
=
bookGroupDao
.
getDTOByBookId
(
bookId
,
channelId
,
adviserId
);
Boolean
isXIAORUI
=
false
;
if
(
null
!=
bookGroupDTO
&&
JoinGroupTypeEnum
.
XIAORUI
.
getCode
().
equals
(
bookGroupDTO
.
getJoinGroupType
()))
{
isXIAORUI
=
true
;
Integer
isXIAORUI
=
bookAdviserDao
.
getIsRui
(
adviserId
,
bookId
,
channelId
)
;
map
.
put
(
"isXIAORUI"
,
YesOrNoEnums
.
YES
.
getValue
().
equals
(
isXIAORUI
)
?
Boolean
.
TRUE
:
Boolean
.
FALSE
);
if
(
YesOrNoEnums
.
YES
.
getValue
().
equals
(
isXIAORUI
))
{
RightsSettingDto
rightsSettingDto
=
rightsSettingBiz
.
getRightsSettingByBookId4AppletHome
(
bookId
,
adviserId
,
channelId
);
if
(
null
!=
rightsSettingDto
)
{
map
.
put
(
"rightsSettingId"
,
rightsSettingDto
.
getId
());
...
...
@@ -5511,7 +5511,6 @@ public class BookGroupBizImpl implements BookGroupBiz {
map
.
put
(
"coverImg"
,
bookDto
.
getCoverImg
());
map
.
put
(
"publish"
,
bookDto
.
getPublish
());
}
map
.
put
(
"isXIAORUI"
,
isXIAORUI
);
map
.
put
(
"isLibraryBook"
,
bookBiz
.
checkIsLibraryBook
(
adviserId
,
bookId
)
?
1
:
0
);
if
(
Objects
.
isNull
(
map
.
get
(
"rightsSettingId"
)))
{
map
.
put
(
"rightsSettingId"
,
bookBiz
.
getDefaultRightsSettingId
());
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
38490458
...
...
@@ -40,6 +40,7 @@ import com.pcloud.book.consumer.erp.ErpConsr;
import
com.pcloud.book.consumer.reader.ReaderConsr
;
import
com.pcloud.book.consumer.resource.ProductConsr
;
import
com.pcloud.book.consumer.user.AdviserConsr
;
import
com.pcloud.book.consumer.user.ChannelConsr
;
import
com.pcloud.book.consumer.user.PartyConsr
;
import
com.pcloud.book.cultivate.enums.ReadTypeEnum
;
import
com.pcloud.book.custom.biz.CustomPlanBiz
;
...
...
@@ -245,6 +246,8 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
private
LabelService
labelService
;
@Autowired
private
PartyConsr
partyConsr
;
@Autowired
private
ChannelConsr
channelConsr
;
@Override
@ParamLog
(
"新增权益设置"
)
...
...
@@ -1944,7 +1947,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
//填充编辑名称
fillAdviserName
(
rightsSettingDtoPageBeanNew
.
getRecordList
());
fillPartyName
(
rightsSettingDtoPageBeanNew
.
getRecordList
());
fill
LabelNames4DTO
(
rightsSettingDtoPageBeanNew
.
getRecordList
());
fill
BookGroupUrl
(
rightsSettingDtoPageBeanNew
.
getRecordList
());
}
else
{
paramMap
.
put
(
"firstClassify"
,
rightsSetting
.
getFirstClassify
());
paramMap
.
put
(
"secondClassify"
,
rightsSetting
.
getSecondClassify
());
...
...
@@ -1965,6 +1968,39 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
return
rightsSettingDtoPageBeanNew
;
}
private
void
fillBookGroupUrl
(
List
<
RightsSettingDto
>
recordList
)
{
if
(
ListUtils
.
isEmpty
(
recordList
)
)
{
return
;
}
List
<
Long
>
bookIds
=
new
ArrayList
<>();
recordList
.
stream
().
forEach
(
rightsSettingDto
->
{
List
<
RightsSettingBookRelation
>
rightsSettingBookRelations
=
rightsSettingDto
.
getRightsSettingBookRelations
();
if
(
ListUtils
.
isEmpty
(
rightsSettingBookRelations
))
{
return
;
}
rightsSettingBookRelations
.
stream
().
forEach
(
rightsSettingBookRelation
->
bookIds
.
add
(
rightsSettingBookRelation
.
getBookId
()));
});
if
(
ListUtils
.
isEmpty
(
bookIds
))
{
return
;
}
Map
<
Long
,
QrcodeSceneDto
>
qrcodeSceneDtoMap
=
channelConsr
.
listQrcodeScene4Rights
(
bookIds
);
if
(
MapUtils
.
isEmpty
(
qrcodeSceneDtoMap
))
{
return
;
}
recordList
.
forEach
(
rightsSettingDto
->
{
List
<
RightsSettingBookRelation
>
rightsSettingBookRelations
=
rightsSettingDto
.
getRightsSettingBookRelations
();
if
(
ListUtils
.
isEmpty
(
rightsSettingBookRelations
))
{
return
;
}
rightsSettingBookRelations
.
stream
().
forEach
(
rightsSettingBookRelation
->
{
if
(
null
==
rightsSettingBookRelation
.
getGroupQrcodeUrl
()
&&
null
!=
qrcodeSceneDtoMap
.
get
(
rightsSettingBookRelation
.
getBookId
()))
{
rightsSettingBookRelation
.
setGroupQrcodeUrl
(
qrcodeSceneDtoMap
.
get
(
rightsSettingBookRelation
.
getBookId
()).
getQrcodeUrl
());
}
});
});
}
private
void
fillLabelNames4DTO
(
List
<
RightsSettingDto
>
rightsSettingList
)
{
if
(
ListUtils
.
isEmpty
(
rightsSettingList
))
{
return
;
...
...
pcloud-service-book/src/main/resources/mapper/book/BookAdviser.Mapper.xml
View file @
38490458
...
...
@@ -835,6 +835,10 @@
a.CHANNEL_ID = #{channelId}
AND
a.ADVISER_ID = #{adviserId}
and
a.is_delete =0
and
b.is_delete = 0
limit 1
</select>
...
...
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