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
041425fb
Commit
041425fb
authored
Jul 12, 2019
by
朱亚洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
广告详情支持修改
parent
ac8ea8c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
30 deletions
+18
-30
AdvertisingSpaceBizImpl.java
...ud/book/advertising/biz/impl/AdvertisingSpaceBizImpl.java
+14
-7
BmBizImpl.java
.../java/com/pcloud/book/advertising/biz/impl/BmBizImpl.java
+4
-23
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/advertising/biz/impl/AdvertisingSpaceBizImpl.java
View file @
041425fb
...
@@ -360,17 +360,22 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz {
...
@@ -360,17 +360,22 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz {
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"adId"
,
advertisingSpace
.
getId
());
paramMap
.
put
(
"adId"
,
advertisingSpace
.
getId
());
Integer
bookNum
=
(
Integer
)
advertisingDistributionBookDao
.
getBy
(
paramMap
,
"countByAdId"
);
Integer
bookNum
=
(
Integer
)
advertisingDistributionBookDao
.
getBy
(
paramMap
,
"countByAdId"
);
// 已投放
//CPA方式
if
(
null
!=
bookNum
&&
bookNum
>
0
)
{
Boolean
isCPA
=
false
;
if
(
SettlementMethodEnum
.
CPA
.
code
.
equals
(
advertisingSpace
.
getSettlementMethod
()))
{
isCPA
=
true
;
}
// 已投放,不是cpa模式
if
(
null
!=
bookNum
&&
bookNum
>
0
&&
!
isCPA
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"已投放书刊的广告位不能修改!"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"已投放书刊的广告位不能修改!"
);
}
}
//CPA方式
//CPA方式
if
(
SettlementMethodEnum
.
CPA
.
code
.
equals
(
advertisingSpace
.
getSettlementMethod
())
)
{
if
(
isCPA
)
{
advertisingSpace
=
equipCPA
(
advertisingSpace
);
advertisingSpace
=
equipCPA
(
advertisingSpace
);
}
}
advertisingSpaceDao
.
update
(
advertisingSpace
);
advertisingSpaceDao
.
update
(
advertisingSpace
);
//报名表单选项新增
//报名表单选项新增
if
(
SettlementMethodEnum
.
CPA
.
code
.
equals
(
advertisingSpace
.
getSettlementMethod
())
)
{
if
(
isCPA
)
{
bmBiz
.
addOptionList
(
advertisingSpace
.
getAdvertisingBmOptionList
(),
advertisingSpace
.
getId
());
bmBiz
.
addOptionList
(
advertisingSpace
.
getAdvertisingBmOptionList
(),
advertisingSpace
.
getId
());
}
else
{
//删除可能有的报名信息
}
else
{
//删除可能有的报名信息
bmBiz
.
deleteByAdId
(
advertisingSpace
.
getId
());
bmBiz
.
deleteByAdId
(
advertisingSpace
.
getId
());
...
@@ -626,6 +631,9 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz {
...
@@ -626,6 +631,9 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz {
adLink
=
advertisingSpace
.
getAdLink
()
+
"?book_group_id="
+
classifyDTO
.
getBookGroupId
()
+
"&classify_id="
+
group
.
getClassifyId
()
adLink
=
advertisingSpace
.
getAdLink
()
+
"?book_group_id="
+
classifyDTO
.
getBookGroupId
()
+
"&classify_id="
+
group
.
getClassifyId
()
+
"&qrcode_id="
+
group
.
getQrcodeId
()
+
"&ad_id="
+
advertisingSpace
.
getId
();
+
"&qrcode_id="
+
group
.
getQrcodeId
()
+
"&ad_id="
+
advertisingSpace
.
getId
();
}
}
if
(
null
!=
methodDTO
)
{
adLink
=
adLink
+
"&settlement_method="
+
methodDTO
.
getSettlementMethod
();
}
}
}
sendArticleMessageVO
.
setLinkUrl
(
adLink
);
sendArticleMessageVO
.
setLinkUrl
(
adLink
);
sendArticleMessageVO
.
setPicUrl
(
advertisingSpace
.
getAdPic
());
sendArticleMessageVO
.
setPicUrl
(
advertisingSpace
.
getAdPic
());
...
@@ -1078,13 +1086,12 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz {
...
@@ -1078,13 +1086,12 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz {
* 获取书刊广告位点击读者量(废弃,读者不走授权,读者信息全为空,没办法聚合,点击量就是读者量)
* 获取书刊广告位点击读者量(废弃,读者不走授权,读者信息全为空,没办法聚合,点击量就是读者量)
*/
*/
private
Long
getClickUserNumByGroupQrcodeId
(
Long
qrcodeId
,
Long
adId
,
String
statisMonth
)
{
private
Long
getClickUserNumByGroupQrcodeId
(
Long
qrcodeId
,
Long
adId
,
String
statisMonth
)
{
/*
Map<String, Object> paramMap = new HashMap<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"qrcodeId"
,
qrcodeId
);
paramMap
.
put
(
"qrcodeId"
,
qrcodeId
);
paramMap
.
put
(
"adId"
,
adId
);
paramMap
.
put
(
"adId"
,
adId
);
paramMap
.
put
(
"statisMonth"
,
statisMonth
);
paramMap
.
put
(
"statisMonth"
,
statisMonth
);
Long
clickUserNum
=
(
Long
)
advertisingClickRecordDao
.
getBy
(
paramMap
,
"getClickUserNumByGroupQrcodeId"
);
Long
clickUserNum
=
(
Long
)
advertisingClickRecordDao
.
getBy
(
paramMap
,
"getClickUserNumByGroupQrcodeId"
);
return null == clickUserNum ? 0L : clickUserNum;*/
return
null
==
clickUserNum
?
0L
:
clickUserNum
;
return
0L
;
}
}
/**
/**
...
...
pcloud-service-book/src/main/java/com/pcloud/book/advertising/biz/impl/BmBizImpl.java
View file @
041425fb
...
@@ -138,7 +138,6 @@ public class BmBizImpl implements BmBiz {
...
@@ -138,7 +138,6 @@ public class BmBizImpl implements BmBiz {
return
;
return
;
}
}
List
<
Long
>
optionIds
=
bmOptionDao
.
getOptionIdsByAdId
(
adId
);
List
<
Long
>
optionIds
=
bmOptionDao
.
getOptionIdsByAdId
(
adId
);
List
<
Long
>
deleteOptionIds
=
new
ArrayList
<>();
for
(
AdvertisingBmOption
bmOption
:
advertisingBmOptionList
)
{
for
(
AdvertisingBmOption
bmOption
:
advertisingBmOptionList
)
{
bmOption
.
setAdId
(
adId
);
bmOption
.
setAdId
(
adId
);
if
(!
ListUtils
.
isEmpty
(
optionIds
)
&&
null
!=
bmOption
.
getId
())
{
//修改选项
if
(!
ListUtils
.
isEmpty
(
optionIds
)
&&
null
!=
bmOption
.
getId
())
{
//修改选项
...
@@ -194,30 +193,12 @@ public class BmBizImpl implements BmBiz {
...
@@ -194,30 +193,12 @@ public class BmBizImpl implements BmBiz {
AdvertisingBmOptionItem
item
=
itemList
.
get
(
i
);
AdvertisingBmOptionItem
item
=
itemList
.
get
(
i
);
item
.
setOptionId
(
optionId
);
item
.
setOptionId
(
optionId
);
item
.
setCreateUser
(
partyId
);
item
.
setCreateUser
(
partyId
);
item
.
setParentId
(
parentId
);
String
text
=
item
.
getText
();
String
text
=
item
.
getText
();
if
(
text
!=
null
&&
!
text
.
trim
().
equals
(
""
))
{
if
(!
StringUtil
.
isEmpty
(
text
))
{
String
txt
=
text
.
replace
(
"#"
,
""
);
item
.
setText
(
text
);
// 二级
if
(
text
.
indexOf
(
"##"
)
>
-
1
)
{
item
.
setParentId
(
parentId
);
item
.
setText
(
txt
);
bmOptionItemDao
.
insert
(
item
);
}
// 一级
else
if
(
text
.
indexOf
(
"#"
)
>
-
1
)
{
item
.
setParentId
(
0L
);
item
.
setText
(
txt
);
bmOptionItemDao
.
insert
(
item
);
parentId
=
item
.
getId
();
}
else
{
item
.
setParentId
(
0L
);
item
.
setText
(
txt
);
bmOptionItemDao
.
insert
(
item
);
}
}
else
{
item
.
setParentId
(
0L
);
bmOptionItemDao
.
insert
(
item
);
}
}
bmOptionItemDao
.
insert
(
item
);
}
}
}
}
}
}
...
...
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