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
eb117ef7
Commit
eb117ef7
authored
Feb 26, 2021
by
朱亚洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:[1004306]自有码+公众号流程优化
parent
b47bcce0
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
185 additions
and
54 deletions
+185
-54
BookGroupDTO.java
...src/main/java/com/pcloud/book/group/dto/BookGroupDTO.java
+27
-0
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+24
-53
BookGroupDTO.java
...src/main/java/com/pcloud/book/group/dto/BookGroupDTO.java
+31
-0
BookGroupSceneDTO.java
...ain/java/com/pcloud/book/group/dto/BookGroupSceneDTO.java
+2
-0
BookGroup.java
...src/main/java/com/pcloud/book/group/entity/BookGroup.java
+30
-0
RightsSettingBiz.java
...a/com/pcloud/book/rightsSetting/biz/RightsSettingBiz.java
+9
-0
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+12
-0
RightsNowItemDao.java
...a/com/pcloud/book/rightsSetting/dao/RightsNowItemDao.java
+9
-0
RightsNowItemDaoImpl.java
...oud/book/rightsSetting/dao/impl/RightsNowItemDaoImpl.java
+10
-0
BookGroupMapper.xml
...-book/src/main/resources/mapper/group/BookGroupMapper.xml
+11
-1
RightNowItem.xml
.../src/main/resources/mapper/rightssetting/RightNowItem.xml
+20
-0
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/group/dto/BookGroupDTO.java
View file @
eb117ef7
...
@@ -143,6 +143,30 @@ public class BookGroupDTO implements Serializable {
...
@@ -143,6 +143,30 @@ public class BookGroupDTO implements Serializable {
* 小睿码跳转类型(默认进小睿小程序)
* 小睿码跳转类型(默认进小睿小程序)
*/
*/
private
Integer
jumpType
;
private
Integer
jumpType
;
/**
* 关注公众号后小睿入口文案标题
*/
private
String
entranceTitle
;
/**
* 关注公众号后小睿入口文案内容
*/
private
String
entranceContent
;
public
String
getEntranceTitle
()
{
return
entranceTitle
;
}
public
void
setEntranceTitle
(
String
entranceTitle
)
{
this
.
entranceTitle
=
entranceTitle
;
}
public
String
getEntranceContent
()
{
return
entranceContent
;
}
public
void
setEntranceContent
(
String
entranceContent
)
{
this
.
entranceContent
=
entranceContent
;
}
public
Integer
getJumpType
()
{
public
Integer
getJumpType
()
{
return
jumpType
;
return
jumpType
;
...
@@ -400,6 +424,8 @@ public class BookGroupDTO implements Serializable {
...
@@ -400,6 +424,8 @@ public class BookGroupDTO implements Serializable {
", appletUrl='"
+
appletUrl
+
'\''
+
", appletUrl='"
+
appletUrl
+
'\''
+
", appletId='"
+
appletId
+
'\''
+
", appletId='"
+
appletId
+
'\''
+
", jumpType="
+
jumpType
+
", jumpType="
+
jumpType
+
", entranceTitle='"
+
entranceTitle
+
'\''
+
", entranceContent='"
+
entranceContent
+
'\''
+
'}'
;
'}'
;
}
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
eb117ef7
...
@@ -1401,6 +1401,15 @@ public class BookGroupBizImpl implements BookGroupBiz {
...
@@ -1401,6 +1401,15 @@ public class BookGroupBizImpl implements BookGroupBiz {
bookGroupDTO
.
setAppletUrl
(
byBookGroupId
==
null
?
""
:
byBookGroupId
.
getAppletUrl
());
bookGroupDTO
.
setAppletUrl
(
byBookGroupId
==
null
?
""
:
byBookGroupId
.
getAppletUrl
());
bookGroupDTO
.
setUrl
(
bookGroupDTO
.
getGroupQrcodeLink
());
bookGroupDTO
.
setUrl
(
bookGroupDTO
.
getGroupQrcodeLink
());
bookGroupDTO
.
setAppletId
(
byBookGroupId
==
null
?
""
:
byBookGroupId
.
getAppletId
());
bookGroupDTO
.
setAppletId
(
byBookGroupId
==
null
?
""
:
byBookGroupId
.
getAppletId
());
if
(
QrcodeJumpType
.
H5_OFFICIAL_ACCOUNTS
.
getCode
().
equals
(
bookGroupDTO
.
getJumpType
()))
{
//关注公众号后小睿入口默认文案
if
(
StringUtil
.
isEmpty
(
bookGroupDTO
.
getEntranceTitle
()))
{
bookGroupDTO
.
setEntranceTitle
(
"领取「完整版」本书服务"
);
}
if
(
StringUtil
.
isEmpty
(
bookGroupDTO
.
getEntranceContent
()))
{
bookGroupDTO
.
setEntranceContent
(
"我是书僮小睿,你的专属伴读助手,我将为你提供本书配套服务,定制本书阅读计划"
);
}
}
}
}
return
bookGroupDTO
;
return
bookGroupDTO
;
}
}
...
@@ -6234,59 +6243,21 @@ public class BookGroupBizImpl implements BookGroupBiz {
...
@@ -6234,59 +6243,21 @@ public class BookGroupBizImpl implements BookGroupBiz {
bookGroupSceneDTO
.
setSceneId
(
bookGroupDTO
.
getSceneId
());
bookGroupSceneDTO
.
setSceneId
(
bookGroupDTO
.
getSceneId
());
QrcodeSceneDto
qrcodeSceneDto
=
qrcodeSceneConsr
.
getById
(
bookGroupDTO
.
getSceneId
());
QrcodeSceneDto
qrcodeSceneDto
=
qrcodeSceneConsr
.
getById
(
bookGroupDTO
.
getSceneId
());
bookGroupSceneDTO
.
setQrcodeUrl
(
null
==
qrcodeSceneDto
?
null
:
qrcodeSceneDto
.
getQrcodeUrl
());
bookGroupSceneDTO
.
setQrcodeUrl
(
null
==
qrcodeSceneDto
?
null
:
qrcodeSceneDto
.
getQrcodeUrl
());
//原流程保留
//1004306返回本书服务5个
List
<
BookServeDTO
>
bookServeDTOS
=
getBookAndBookGroupServeIds
(
bookGroupDTO
.
getCreateUser
(),
bookGroupDTO
.
getBookId
(),
bookGroupDTO
.
getChannelId
());
List
<
BookServeDTO
>
bookServeDTOS
=
getBookAndBookGroupServeIdsFive
(
bookGroupDTO
.
getCreateUser
(),
bookGroupDTO
.
getBookId
(),
bookGroupDTO
.
getChannelId
());
if
(
CollUtil
.
isEmpty
(
bookServeDTOS
))
{
if
(
ListUtils
.
isEmpty
(
bookServeDTOS
)
||
bookServeDTOS
.
size
()<
5
)
{
return
bookGroupSceneDTO
;
//权益中补充资源
}
List
<
BookServeDTO
>
serveDTOList
=
rightsSettingBiz
.
getRightsSettingAppProduct
(
bookGroupDTO
.
getBookId
(),
bookGroupDTO
.
getChannelId
(),
bookGroupDTO
.
getCreateUser
(),
5
-
bookServeDTOS
.
size
());
if
(!
ListUtils
.
isEmpty
(
serveDTOList
))
{
Map
<
String
,
Set
<
String
>>
collect
=
bookServeDTOS
.
stream
().
filter
(
Objects:
:
nonNull
).
collect
(
bookServeDTOS
.
addAll
(
serveDTOList
);
Collectors
.
groupingBy
(
BookServeDTO:
:
getServeType
,
}
Collectors
.
mapping
(
BookServeDTO:
:
getFromType
,
Collectors
.
toSet
()))
);
if
(
CollUtil
.
isEmpty
(
collect
)){
return
bookGroupSceneDTO
;
}
if
(
CollUtil
.
isEmpty
(
collect
.
get
(
"APP"
))
&&
CollUtil
.
isEmpty
(
collect
.
get
(
"PRODUCT"
))){
return
bookGroupSceneDTO
;
}
List
<
Integer
>
mpServices
=
mpServiceMappingMapper
.
selectMapping
(
collect
.
get
(
"APP"
),
collect
.
get
(
"PRODUCT"
));
if
(
CollUtil
.
isEmpty
(
mpServices
)){
mpServices
=
new
ArrayList
<>();
}
// 要求少于4个的时候要随机补成4个
fillMpServices
(
mpServices
,
0
,
6
);
bookGroupSceneDTO
.
setMpServices
(
mpServices
);
//新流程改编为返回书所配置的资源
List
<
BookGroupServe
>
serveList
=
bookGroupServeDao
.
getListByBookGroupId
(
bookGroupId
);
if
(
ListUtils
.
isEmpty
(
serveList
))
{
return
bookGroupSceneDTO
;
}
fillServeInfo
(
serveList
);
for
(
BookGroupServe
bookGroupServe
:
serveList
)
{
}
}
bookGroupSceneDTO
.
setBookServices
(
serveList
);
//填充资源信息
fillBookServe4RightsSetting
(
bookServeDTOS
);
bookGroupSceneDTO
.
setBookServeDTOS
(
bookServeDTOS
);
return
bookGroupSceneDTO
;
return
bookGroupSceneDTO
;
}
}
/**
* 要求少于4个的时候要随机补成4个
*
* @param mpServices 待填充列表
* @param min 随即填充的最小值 包含
* @param max 随即填充的最大值 不包含
*/
private
void
fillMpServices
(
List
<
Integer
>
mpServices
,
int
min
,
int
max
)
{
while
(
mpServices
.
size
()
<
4
)
{
int
randomInt
=
RandomUtil
.
randomInt
(
min
,
max
);
if
(!
mpServices
.
contains
(
randomInt
))
{
mpServices
.
add
(
randomInt
);
}
}
}
@Override
@Override
public
BackgroundGroupQrcodeDTO
getBackgroundGroupQr
(
BackgroundGroupQrcodeDTO
backgroundGroupQrcodeDTO
)
{
public
BackgroundGroupQrcodeDTO
getBackgroundGroupQr
(
BackgroundGroupQrcodeDTO
backgroundGroupQrcodeDTO
)
{
...
@@ -6423,10 +6394,6 @@ public class BookGroupBizImpl implements BookGroupBiz {
...
@@ -6423,10 +6394,6 @@ public class BookGroupBizImpl implements BookGroupBiz {
if
(
AppAndProductTypeEnum
.
PRODUCT
.
value
.
equals
(
bookServeDTO
.
getServeType
()))
{
if
(
AppAndProductTypeEnum
.
PRODUCT
.
value
.
equals
(
bookServeDTO
.
getServeType
()))
{
if
(!
MapUtils
.
isEmpty
(
productDtoMap
)
&&
null
!=
productDtoMap
.
get
(
bookServeDTO
.
getServeId
()))
{
if
(!
MapUtils
.
isEmpty
(
productDtoMap
)
&&
null
!=
productDtoMap
.
get
(
bookServeDTO
.
getServeId
()))
{
ProductDto
productDto
=
productDtoMap
.
get
(
bookServeDTO
.
getServeId
());
ProductDto
productDto
=
productDtoMap
.
get
(
bookServeDTO
.
getServeId
());
if
(
checkRayUrl
(
productDto
.
getSkipUrl
())
&&
ProductTypeConstant
.
ARTICLE
.
equals
(
bookServeDTO
.
getFromType
()))
{
removeList
.
add
(
bookServeDTO
);
continue
;
}
bookServeDTO
.
setServeName
(
productDto
.
getProductName
());
bookServeDTO
.
setServeName
(
productDto
.
getProductName
());
bookServeDTO
.
setCoverImg
(
productDto
.
getCoverImg
());
bookServeDTO
.
setCoverImg
(
productDto
.
getCoverImg
());
bookServeDTO
.
setTransverseImg
(
productDto
.
getPicture1
());
bookServeDTO
.
setTransverseImg
(
productDto
.
getPicture1
());
...
@@ -6434,6 +6401,10 @@ public class BookGroupBizImpl implements BookGroupBiz {
...
@@ -6434,6 +6401,10 @@ public class BookGroupBizImpl implements BookGroupBiz {
bookServeDTO
.
setFromType
(
productDto
.
getProductTypeDto
().
getTypeCode
());
bookServeDTO
.
setFromType
(
productDto
.
getProductTypeDto
().
getTypeCode
());
bookServeDTO
.
setFromTypeName
(
productDto
.
getProductTypeDto
().
getTypeName
());
bookServeDTO
.
setFromTypeName
(
productDto
.
getProductTypeDto
().
getTypeName
());
}
}
if
(
checkRayUrl
(
productDto
.
getSkipUrl
())
&&
ProductTypeConstant
.
ARTICLE
.
equals
(
bookServeDTO
.
getFromType
()))
{
removeList
.
add
(
bookServeDTO
);
continue
;
}
//获取channelId,/C1404/product/display/10234028?adviserId=1001587&proType=MEMBER&source_type=QRCODE
//获取channelId,/C1404/product/display/10234028?adviserId=1001587&proType=MEMBER&source_type=QRCODE
Long
channelId
=
null
;
Long
channelId
=
null
;
String
url
=
bookServeDTO
.
getUrl
();
String
url
=
bookServeDTO
.
getUrl
();
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/BookGroupDTO.java
View file @
eb117ef7
...
@@ -345,6 +345,31 @@ public class BookGroupDTO extends BaseDto {
...
@@ -345,6 +345,31 @@ public class BookGroupDTO extends BaseDto {
@ApiModelProperty
(
"是否第一次完成了今日任务 1是第一次完成所有任务 0 未完成或不是第一次"
)
@ApiModelProperty
(
"是否第一次完成了今日任务 1是第一次完成所有任务 0 未完成或不是第一次"
)
private
Integer
isFinshTask
;
private
Integer
isFinshTask
;
/**
* 关注公众号后小睿入口文案标题
*/
private
String
entranceTitle
;
/**
* 关注公众号后小睿入口文案内容
*/
private
String
entranceContent
;
public
String
getEntranceTitle
()
{
return
entranceTitle
;
}
public
void
setEntranceTitle
(
String
entranceTitle
)
{
this
.
entranceTitle
=
entranceTitle
;
}
public
String
getEntranceContent
()
{
return
entranceContent
;
}
public
void
setEntranceContent
(
String
entranceContent
)
{
this
.
entranceContent
=
entranceContent
;
}
public
Integer
getIsFinshTask
()
{
public
Integer
getIsFinshTask
()
{
return
isFinshTask
;
return
isFinshTask
;
}
}
...
@@ -995,6 +1020,12 @@ public class BookGroupDTO extends BaseDto {
...
@@ -995,6 +1020,12 @@ public class BookGroupDTO extends BaseDto {
", userCount="
+
userCount
+
", userCount="
+
userCount
+
", jumpType="
+
jumpType
+
", jumpType="
+
jumpType
+
", jumpUrl='"
+
jumpUrl
+
'\''
+
", jumpUrl='"
+
jumpUrl
+
'\''
+
", backgroundType="
+
backgroundType
+
", groupQrcodeStyle="
+
groupQrcodeStyle
+
", originUrl='"
+
originUrl
+
'\''
+
", isFinshTask="
+
isFinshTask
+
", entranceTitle='"
+
entranceTitle
+
'\''
+
", entranceContent='"
+
entranceContent
+
'\''
+
", openWeapp="
+
openWeapp
+
", openWeapp="
+
openWeapp
+
", adviserId="
+
adviserId
+
", adviserId="
+
adviserId
+
", adviserPhone='"
+
adviserPhone
+
'\''
+
", adviserPhone='"
+
adviserPhone
+
'\''
+
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/BookGroupSceneDTO.java
View file @
eb117ef7
...
@@ -38,4 +38,6 @@ public class BookGroupSceneDTO extends BaseDto {
...
@@ -38,4 +38,6 @@ public class BookGroupSceneDTO extends BaseDto {
private
List
<
Integer
>
mpServices
;
private
List
<
Integer
>
mpServices
;
@ApiModelProperty
(
"公众号配置的资源"
)
@ApiModelProperty
(
"公众号配置的资源"
)
private
List
<
BookGroupServe
>
bookServices
;
private
List
<
BookGroupServe
>
bookServices
;
@ApiModelProperty
(
"本书服务资源"
)
private
List
<
BookServeDTO
>
bookServeDTOS
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/entity/BookGroup.java
View file @
eb117ef7
...
@@ -223,6 +223,30 @@ public class BookGroup extends BaseEntity {
...
@@ -223,6 +223,30 @@ public class BookGroup extends BaseEntity {
* 微信选择颜色生成的原始码地址
* 微信选择颜色生成的原始码地址
*/
*/
private
String
originUrl
;
private
String
originUrl
;
/**
* 关注公众号后小睿入口文案标题
*/
private
String
entranceTitle
;
/**
* 关注公众号后小睿入口文案内容
*/
private
String
entranceContent
;
public
String
getEntranceTitle
()
{
return
entranceTitle
;
}
public
void
setEntranceTitle
(
String
entranceTitle
)
{
this
.
entranceTitle
=
entranceTitle
;
}
public
String
getEntranceContent
()
{
return
entranceContent
;
}
public
void
setEntranceContent
(
String
entranceContent
)
{
this
.
entranceContent
=
entranceContent
;
}
public
String
getOriginUrl
()
{
public
String
getOriginUrl
()
{
return
originUrl
;
return
originUrl
;
...
@@ -569,6 +593,11 @@ public class BookGroup extends BaseEntity {
...
@@ -569,6 +593,11 @@ public class BookGroup extends BaseEntity {
", groupQrcodeLink='"
+
groupQrcodeLink
+
'\''
+
", groupQrcodeLink='"
+
groupQrcodeLink
+
'\''
+
", jumpType="
+
jumpType
+
", jumpType="
+
jumpType
+
", jumpUrl='"
+
jumpUrl
+
'\''
+
", jumpUrl='"
+
jumpUrl
+
'\''
+
", backgroundType="
+
backgroundType
+
", groupQrcodeStyle="
+
groupQrcodeStyle
+
", originUrl='"
+
originUrl
+
'\''
+
", entranceTitle='"
+
entranceTitle
+
'\''
+
", entranceContent='"
+
entranceContent
+
'\''
+
'}'
;
'}'
;
}
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/RightsSettingBiz.java
View file @
eb117ef7
...
@@ -2,6 +2,7 @@ package com.pcloud.book.rightsSetting.biz;
...
@@ -2,6 +2,7 @@ package com.pcloud.book.rightsSetting.biz;
import
com.pcloud.book.applet.dto.AppletNewsDTO
;
import
com.pcloud.book.applet.dto.AppletNewsDTO
;
import
com.pcloud.book.applet.entity.AppletUserBookcase
;
import
com.pcloud.book.applet.entity.AppletUserBookcase
;
import
com.pcloud.book.group.dto.BookServeDTO
;
import
com.pcloud.book.rightsSetting.dto.FillRightsSettingAppletsDTO
;
import
com.pcloud.book.rightsSetting.dto.FillRightsSettingAppletsDTO
;
import
com.pcloud.book.rightsSetting.dto.PopupResourceInfoDTO
;
import
com.pcloud.book.rightsSetting.dto.PopupResourceInfoDTO
;
import
com.pcloud.book.rightsSetting.dto.ResourceList4Answer
;
import
com.pcloud.book.rightsSetting.dto.ResourceList4Answer
;
...
@@ -248,4 +249,12 @@ public interface RightsSettingBiz {
...
@@ -248,4 +249,12 @@ public interface RightsSettingBiz {
* * @param null
* * @param null
*/
*/
void
handleRightsSettingOld
(
List
<
Long
>
rightsSettingIdList
);
void
handleRightsSettingOld
(
List
<
Long
>
rightsSettingIdList
);
/**
* 书刊相应权益配置的应用和作品
* @author:zhuyajie
* @date:2021/2/19 17:42
* * @param null
*/
List
<
BookServeDTO
>
getRightsSettingAppProduct
(
Long
bookId
,
Long
channelId
,
Long
adviserId
,
Integer
limit
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
eb117ef7
...
@@ -4394,4 +4394,16 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -4394,4 +4394,16 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
rightsNowItemDao
.
batchInsert
(
nowItemList
);
rightsNowItemDao
.
batchInsert
(
nowItemList
);
}
}
}
}
@Override
public
List
<
BookServeDTO
>
getRightsSettingAppProduct
(
Long
bookId
,
Long
channelId
,
Long
adviserId
,
Integer
limit
)
{
RightsSettingDto
rightsSettingDto
=
this
.
getRightsSettingByBookId4AppletHome
(
bookId
,
adviserId
,
channelId
);
if
(
null
==
rightsSettingDto
||
null
==
rightsSettingDto
.
getId
())
{
return
new
ArrayList
<>();
}
List
<
String
>
serveTypes
=
Arrays
.
asList
(
AppAndProductTypeEnum
.
APP
.
value
,
AppAndProductTypeEnum
.
PRODUCT
.
value
);
List
<
BookServeDTO
>
list
=
rightsNowItemDao
.
getServeItemsByServeTypes
(
rightsSettingDto
.
getId
(),
serveTypes
,
limit
);
return
list
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/RightsNowItemDao.java
View file @
eb117ef7
package
com
.
pcloud
.
book
.
rightsSetting
.
dao
;
package
com
.
pcloud
.
book
.
rightsSetting
.
dao
;
import
com.pcloud.book.book.vo.BookResourceNumDTO
;
import
com.pcloud.book.book.vo.BookResourceNumDTO
;
import
com.pcloud.book.group.dto.BookServeDTO
;
import
com.pcloud.book.rightsSetting.entity.RightsNowItem
;
import
com.pcloud.book.rightsSetting.entity.RightsNowItem
;
import
com.pcloud.common.core.dao.BaseDao
;
import
com.pcloud.common.core.dao.BaseDao
;
...
@@ -75,4 +76,12 @@ public interface RightsNowItemDao extends BaseDao<RightsNowItem> {
...
@@ -75,4 +76,12 @@ public interface RightsNowItemDao extends BaseDao<RightsNowItem> {
void
deletePackageIds
(
List
<
Long
>
packageIds
);
void
deletePackageIds
(
List
<
Long
>
packageIds
);
List
<
BookResourceNumDTO
>
listResourceNum4AdviserBook
(
List
<
Long
>
adviserIds
,
List
<
Long
>
channelIds
,
List
<
Long
>
bookIds
);
List
<
BookResourceNumDTO
>
listResourceNum4AdviserBook
(
List
<
Long
>
adviserIds
,
List
<
Long
>
channelIds
,
List
<
Long
>
bookIds
);
/**
* 根据类型查权益配置的资源
* @author:zhuyajie
* @date:2021/2/19 17:50
* * @param null
*/
List
<
BookServeDTO
>
getServeItemsByServeTypes
(
Long
id
,
List
<
String
>
serveTypes
,
Integer
limit
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/impl/RightsNowItemDaoImpl.java
View file @
eb117ef7
...
@@ -2,6 +2,7 @@ package com.pcloud.book.rightsSetting.dao.impl;
...
@@ -2,6 +2,7 @@ package com.pcloud.book.rightsSetting.dao.impl;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.map.MapUtil
;
import
com.pcloud.book.book.vo.BookResourceNumDTO
;
import
com.pcloud.book.book.vo.BookResourceNumDTO
;
import
com.pcloud.book.group.dto.BookServeDTO
;
import
com.pcloud.book.rightsSetting.dao.RightsNowItemDao
;
import
com.pcloud.book.rightsSetting.dao.RightsNowItemDao
;
import
com.pcloud.book.rightsSetting.entity.RightsNowItem
;
import
com.pcloud.book.rightsSetting.entity.RightsNowItem
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
...
@@ -122,4 +123,13 @@ public class RightsNowItemDaoImpl extends BaseDaoImpl<RightsNowItem> implements
...
@@ -122,4 +123,13 @@ public class RightsNowItemDaoImpl extends BaseDaoImpl<RightsNowItem> implements
return
getSessionTemplate
().
selectList
(
getStatement
(
"listResourceNum4AdviserBook"
),
param
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"listResourceNum4AdviserBook"
),
param
);
}
}
@Override
public
List
<
BookServeDTO
>
getServeItemsByServeTypes
(
Long
rightsSettingId
,
List
<
String
>
serveTypes
,
Integer
limit
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"rightsSettingId"
,
rightsSettingId
);
map
.
put
(
"serveTypes"
,
serveTypes
);
map
.
put
(
"limit"
,
limit
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getServeItemsByServeTypes"
),
map
);
}
}
}
pcloud-service-book/src/main/resources/mapper/group/BookGroupMapper.xml
View file @
eb117ef7
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
<result
column=
"origin_url"
property=
"originUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"origin_url"
property=
"originUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"jump_type"
property=
"jumpType"
jdbcType=
"INTEGER"
/>
<result
column=
"jump_type"
property=
"jumpType"
jdbcType=
"INTEGER"
/>
<result
column=
"jump_url"
property=
"jumpUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"jump_url"
property=
"jumpUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"entrance_title"
property=
"entranceTitle"
jdbcType=
"VARCHAR"
/>
<result
column=
"entrance_content"
property=
"entranceContent"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<resultMap
id=
"BookGroupDTO"
type=
"com.pcloud.book.group.dto.BookGroupDTO"
>
<resultMap
id=
"BookGroupDTO"
type=
"com.pcloud.book.group.dto.BookGroupDTO"
>
...
@@ -86,6 +88,8 @@
...
@@ -86,6 +88,8 @@
<result
column=
"origin_url"
property=
"originUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"origin_url"
property=
"originUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"jump_type"
property=
"jumpType"
jdbcType=
"INTEGER"
/>
<result
column=
"jump_type"
property=
"jumpType"
jdbcType=
"INTEGER"
/>
<result
column=
"jump_url"
property=
"jumpUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"jump_url"
property=
"jumpUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"entrance_title"
property=
"entranceTitle"
jdbcType=
"VARCHAR"
/>
<result
column=
"entrance_content"
property=
"entranceContent"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -95,7 +99,7 @@
...
@@ -95,7 +99,7 @@
update_time, is_delete, is_show_book_name,join_group_type,add_friend_guide,customer_service_name,
update_time, is_delete, is_show_book_name,join_group_type,add_friend_guide,customer_service_name,
is_invite_group,book_group_cipher, last_push_update_time, is_some_update, agent_id, belong_special_agent,
is_invite_group,book_group_cipher, last_push_update_time, is_some_update, agent_id, belong_special_agent,
short_book_name, open_weapp, single_group, related_book_group_id,group_qrcode_page_num,group_qrcode_location_id,group_qrcode_remark,
short_book_name, open_weapp, single_group, related_book_group_id,group_qrcode_page_num,group_qrcode_location_id,group_qrcode_remark,
group_qrcode_link,back_ground_type, jump_type, jump_url,origin_url
group_qrcode_link,back_ground_type, jump_type, jump_url,origin_url
, entrance_title, entrance_content
</sql>
</sql>
<select
id=
"getById"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
<select
id=
"getById"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
...
@@ -399,6 +403,12 @@
...
@@ -399,6 +403,12 @@
<if
test=
"originUrl != null"
>
<if
test=
"originUrl != null"
>
origin_url = #{originUrl},
origin_url = #{originUrl},
</if>
</if>
<if
test=
"entranceTitle != null"
>
entrance_title = #{entranceTitle},
</if>
<if
test=
"entranceContent != null"
>
entrance_content = #{entranceContent},
</if>
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
...
...
pcloud-service-book/src/main/resources/mapper/rightssetting/RightNowItem.xml
View file @
eb117ef7
...
@@ -339,4 +339,23 @@
...
@@ -339,4 +339,23 @@
</foreach>
</foreach>
group by adviserId, bookId, channelId
group by adviserId, bookId, channelId
</select>
</select>
<select
id=
"getServeItemsByServeTypes"
parameterType=
"map"
resultType=
"com.pcloud.book.group.dto.BookServeDTO"
>
SELECT
serve_id serveId,
serve_type serveType,
link_url url
FROM
rights_now_item
WHERE
rights_setting_id = #{rightsSettingId}
AND serve_type IN
<foreach
collection=
"serveTypes"
open=
"("
close=
")"
item=
"item"
index=
"index"
separator=
","
>
#{item}
</foreach>
<if
test=
"limit > 0"
>
LIMIT #{limit}
</if>
</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