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
507941bd
Commit
507941bd
authored
May 24, 2021
by
郑永强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [none] 增加广告开关参数(默认关闭广告)
parent
14f64d67
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
15 deletions
+21
-15
AppletBannerBiz.java
...main/java/com/pcloud/book/applet/biz/AppletBannerBiz.java
+1
-1
AppletBannerBizImpl.java
.../com/pcloud/book/applet/biz/impl/AppletBannerBizImpl.java
+6
-3
AppletHomeFacade.java
.../java/com/pcloud/book/applet/facade/AppletHomeFacade.java
+3
-2
ResourcePageBiz.java
.../main/java/com/pcloud/book/group/biz/ResourcePageBiz.java
+1
-1
ResourcePageBizImpl.java
...a/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
+5
-4
ResourcePageFacade.java
...com/pcloud/book/group/facade/impl/ResourcePageFacade.java
+4
-3
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+1
-1
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/AppletBannerBiz.java
View file @
507941bd
...
@@ -53,7 +53,7 @@ public interface AppletBannerBiz {
...
@@ -53,7 +53,7 @@ public interface AppletBannerBiz {
* @date:2020/7/17 16:03
* @date:2020/7/17 16:03
* * @param null
* * @param null
*/
*/
PageBeanNew
<
AppletBannerDTO
>
listBanner4Wechat
(
Integer
currentPage
,
Integer
numPerPage
,
Boolean
showState
,
Long
officialAccountsId
,
Long
wechatUserId
);
PageBeanNew
<
AppletBannerDTO
>
listBanner4Wechat
(
Integer
currentPage
,
Integer
numPerPage
,
Boolean
showState
,
Long
officialAccountsId
,
Long
wechatUserId
,
Integer
enableAdverting
);
void
bannerClickRecord
(
Long
wechatUserId
,
Long
bannerId
,
Integer
locationType
);
void
bannerClickRecord
(
Long
wechatUserId
,
Long
bannerId
,
Integer
locationType
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletBannerBizImpl.java
View file @
507941bd
...
@@ -339,18 +339,21 @@ public class AppletBannerBizImpl implements AppletBannerBiz {
...
@@ -339,18 +339,21 @@ public class AppletBannerBizImpl implements AppletBannerBiz {
}
}
@Override
@Override
public
PageBeanNew
<
AppletBannerDTO
>
listBanner4Wechat
(
Integer
currentPage
,
Integer
numPerPage
,
Boolean
showState
,
Long
officialAccountsId
,
Long
wechatUserId
)
{
public
PageBeanNew
<
AppletBannerDTO
>
listBanner4Wechat
(
Integer
currentPage
,
Integer
numPerPage
,
Boolean
showState
,
Long
officialAccountsId
,
Long
wechatUserId
,
Integer
enableAdverting
)
{
Long
agentId
=
appletNewsBiz
.
getAgentIdByAccountId
(
officialAccountsId
);
Long
agentId
=
appletNewsBiz
.
getAgentIdByAccountId
(
officialAccountsId
);
PageBeanNew
<
AppletBannerDTO
>
pageBeanNew
=
listBanner
(
currentPage
,
numPerPage
,
showState
,
agentId
);
PageBeanNew
<
AppletBannerDTO
>
pageBeanNew
=
listBanner
(
currentPage
,
numPerPage
,
showState
,
agentId
);
// 依据当前用户正在读的书,所属分类获取最新上架的资讯
// 依据当前用户正在读的书,所属分类获取最新上架的资讯
processFillType
(
pageBeanNew
.
getRecordList
(),
wechatUserId
);
processFillType
(
pageBeanNew
.
getRecordList
(),
wechatUserId
);
// 填充广告banner
// 填充广告banner
this
.
fillAdvertising
(
pageBeanNew
.
getRecordList
());
this
.
fillAdvertising
(
pageBeanNew
.
getRecordList
()
,
enableAdverting
);
return
pageBeanNew
;
return
pageBeanNew
;
}
}
private
void
fillAdvertising
(
List
<
AppletBannerDTO
>
recordList
)
{
private
void
fillAdvertising
(
List
<
AppletBannerDTO
>
recordList
,
Integer
enableAdverting
)
{
try
{
try
{
if
(!
YesOrNoEnums
.
YES
.
getValue
().
equals
(
enableAdverting
)){
return
;
}
// 获取广告
// 获取广告
List
<
AdvertisingSpaceDTO
>
appletAdvertisingList
=
advertisingConsr
.
getAppletAdvertising
();
List
<
AdvertisingSpaceDTO
>
appletAdvertisingList
=
advertisingConsr
.
getAppletAdvertising
();
if
(
CollUtil
.
isEmpty
(
appletAdvertisingList
)){
if
(
CollUtil
.
isEmpty
(
appletAdvertisingList
)){
...
...
pcloud-service-book/src/main/java/com/pcloud/book/applet/facade/AppletHomeFacade.java
View file @
507941bd
...
@@ -358,14 +358,15 @@ public class AppletHomeFacade {
...
@@ -358,14 +358,15 @@ public class AppletHomeFacade {
public
ResponseDto
<
PageBeanNew
<
AppletBannerDTO
>>
listBanner4Wechat
(
public
ResponseDto
<
PageBeanNew
<
AppletBannerDTO
>>
listBanner4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
"currentPage"
)
@ApiParam
(
"当前页"
)
Integer
currentPage
,
@RequestParam
(
"currentPage"
)
@ApiParam
(
"当前页"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
@ApiParam
(
"每页数量"
)
Integer
numPerPage
)
{
@RequestParam
(
"numPerPage"
)
@ApiParam
(
"每页数量"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"enableAdverting"
,
required
=
false
)
@ApiParam
(
"开启广告"
)
Integer
enableAdverting
)
{
Long
officialAccountsId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_OFFICIAL_ACCOUNTS_ID
);
Long
officialAccountsId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_OFFICIAL_ACCOUNTS_ID
);
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
if
(
null
==
currentPage
||
null
==
numPerPage
){
if
(
null
==
currentPage
||
null
==
numPerPage
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"缺少分页参数"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"缺少分页参数"
);
}
}
return
new
ResponseDto
<>(
appletBannerBiz
.
listBanner4Wechat
(
currentPage
,
numPerPage
,
true
,
officialAccountsId
,
wechatUserId
));
return
new
ResponseDto
<>(
appletBannerBiz
.
listBanner4Wechat
(
currentPage
,
numPerPage
,
true
,
officialAccountsId
,
wechatUserId
,
enableAdverting
));
}
}
@ApiOperation
(
"获取书单下书籍列表"
)
@ApiOperation
(
"获取书单下书籍列表"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/ResourcePageBiz.java
View file @
507941bd
...
@@ -56,7 +56,7 @@ public interface ResourcePageBiz {
...
@@ -56,7 +56,7 @@ public interface ResourcePageBiz {
* @date:2021/3/29 11:49
* @date:2021/3/29 11:49
* * @param null
* * @param null
*/
*/
List
<
ResourceColumnAndServeVO
>
getColumnAndServeListByPageId
(
Long
resourcePageId
,
Boolean
isWechat
,
Long
bookId
,
Long
adviserId
,
Long
channelId
);
List
<
ResourceColumnAndServeVO
>
getColumnAndServeListByPageId
(
Long
resourcePageId
,
Boolean
isWechat
,
Long
bookId
,
Long
adviserId
,
Long
channelId
,
Integer
enableAdverting
);
/**
/**
* 根据书刊查资源页基本配置
* 根据书刊查资源页基本配置
* @author:zhuyajie
* @author:zhuyajie
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
View file @
507941bd
...
@@ -65,6 +65,7 @@ import com.pcloud.book.rightsSetting.entity.RightsSettingBanner;
...
@@ -65,6 +65,7 @@ import com.pcloud.book.rightsSetting.entity.RightsSettingBanner;
import
com.pcloud.book.rightsSetting.entity.RightsSettingTitle
;
import
com.pcloud.book.rightsSetting.entity.RightsSettingTitle
;
import
com.pcloud.book.skill.biz.PcloudGroupActivityBiz
;
import
com.pcloud.book.skill.biz.PcloudGroupActivityBiz
;
import
com.pcloud.book.util.common.ThreadPoolUtils
;
import
com.pcloud.book.util.common.ThreadPoolUtils
;
import
com.pcloud.book.util.common.YesOrNoEnums
;
import
com.pcloud.book.util.properties.BookProps
;
import
com.pcloud.book.util.properties.BookProps
;
import
com.pcloud.channelcenter.qrcode.dto.GroupQrcodeVO
;
import
com.pcloud.channelcenter.qrcode.dto.GroupQrcodeVO
;
import
com.pcloud.channelcenter.qrcode.dto.OwnMessageDTO
;
import
com.pcloud.channelcenter.qrcode.dto.OwnMessageDTO
;
...
@@ -560,7 +561,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -560,7 +561,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
}
@Override
@Override
public
List
<
ResourceColumnAndServeVO
>
getColumnAndServeListByPageId
(
Long
resourcePageId
,
Boolean
isWechat
,
Long
bookId
,
Long
adviserId
,
Long
channelId
)
{
public
List
<
ResourceColumnAndServeVO
>
getColumnAndServeListByPageId
(
Long
resourcePageId
,
Boolean
isWechat
,
Long
bookId
,
Long
adviserId
,
Long
channelId
,
Integer
enableAdverting
)
{
List
<
ResourceColumnAndServeVO
>
serveVOS
=
resourcePageColumnDao
.
getColumnListByPageId
(
resourcePageId
);
List
<
ResourceColumnAndServeVO
>
serveVOS
=
resourcePageColumnDao
.
getColumnListByPageId
(
resourcePageId
);
if
(
CollUtil
.
isNotEmpty
(
serveVOS
))
{
if
(
CollUtil
.
isNotEmpty
(
serveVOS
))
{
List
<
ResourcePageItemVO
>
itemVOList
;
List
<
ResourcePageItemVO
>
itemVOList
;
...
@@ -598,15 +599,15 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -598,15 +599,15 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
serveVOS
=
CollUtil
.
toList
();
serveVOS
=
CollUtil
.
toList
();
}
}
// 填充广告
// 填充广告
this
.
fillAdvertising
(
serveVOS
,
bookId
,
adviserId
,
channelId
);
this
.
fillAdvertising
(
serveVOS
,
bookId
,
adviserId
,
channelId
,
enableAdverting
);
return
serveVOS
;
return
serveVOS
;
}
}
/**
/**
* 填充广告
* 填充广告
*/
*/
private
void
fillAdvertising
(
List
<
ResourceColumnAndServeVO
>
serveVOS
,
Long
bookId
,
Long
adviserId
,
Long
channelId
)
{
private
void
fillAdvertising
(
List
<
ResourceColumnAndServeVO
>
serveVOS
,
Long
bookId
,
Long
adviserId
,
Long
channelId
,
Integer
enableAdverting
)
{
if
(
serveVOS
==
null
||
bookId
==
null
||
adviserId
==
null
||
channelId
==
null
){
if
(
serveVOS
==
null
||
bookId
==
null
||
adviserId
==
null
||
channelId
==
null
||
!
YesOrNoEnums
.
YES
.
getValue
().
equals
(
enableAdverting
)
){
return
;
return
;
}
}
try
{
try
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/impl/ResourcePageFacade.java
View file @
507941bd
...
@@ -69,7 +69,7 @@ public class ResourcePageFacade {
...
@@ -69,7 +69,7 @@ public class ResourcePageFacade {
public
ResponseDto
<?>
getColumnAndServeListByPageId
(
@RequestHeader
(
"token"
)
String
token
,
public
ResponseDto
<?>
getColumnAndServeListByPageId
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
"resourcePageId"
)
Long
resourcePageId
){
@RequestParam
(
"resourcePageId"
)
Long
resourcePageId
){
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageId
,
false
,
null
,
null
,
null
));
return
new
ResponseDto
<>(
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageId
,
false
,
null
,
null
,
null
,
null
));
}
}
@ApiOperation
(
"客户端-根据书刊查资源页基本配置"
)
@ApiOperation
(
"客户端-根据书刊查资源页基本配置"
)
...
@@ -88,9 +88,10 @@ public class ResourcePageFacade {
...
@@ -88,9 +88,10 @@ public class ResourcePageFacade {
@RequestParam
(
"resourcePageId"
)
Long
resourcePageId
,
@RequestParam
(
"resourcePageId"
)
Long
resourcePageId
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"adviserId"
,
required
=
false
)
Long
adviserId
,
@RequestParam
(
value
=
"adviserId"
,
required
=
false
)
Long
adviserId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
){
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"enableAdverting"
,
required
=
false
)
Integer
enableAdverting
){
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
return
new
ResponseDto
<>(
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageId
,
true
,
bookId
,
adviserId
,
channelId
));
return
new
ResponseDto
<>(
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageId
,
true
,
bookId
,
adviserId
,
channelId
,
enableAdverting
));
}
}
@ApiOperation
(
"客户端分页查栏目资源"
)
@ApiOperation
(
"客户端分页查栏目资源"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
507941bd
...
@@ -1201,7 +1201,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -1201,7 +1201,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(
null
==
resourcePageVO
||
null
==
resourcePageVO
.
getId
())
{
if
(
null
==
resourcePageVO
||
null
==
resourcePageVO
.
getId
())
{
return
;
return
;
}
}
List
<
ResourceColumnAndServeVO
>
serveVOList
=
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageVO
.
getId
(),
false
,
null
,
null
,
null
);
List
<
ResourceColumnAndServeVO
>
serveVOList
=
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageVO
.
getId
(),
false
,
null
,
null
,
null
,
null
);
UpdateResourceColumnVO
columnVO
=
new
UpdateResourceColumnVO
();
UpdateResourceColumnVO
columnVO
=
new
UpdateResourceColumnVO
();
columnVO
.
setColumnFormat
(
3
);
columnVO
.
setColumnFormat
(
3
);
columnVO
.
setColumnName
(
"精品资讯"
);
columnVO
.
setColumnName
(
"精品资讯"
);
...
...
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