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
33f1c7d2
Commit
33f1c7d2
authored
Jul 29, 2019
by
阮思源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C1001319苏总演示前提的几点小优化
parent
818c4aed
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+24
-0
AppStatisticsDTO.java
...main/java/com/pcloud/book/group/dto/AppStatisticsDTO.java
+24
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
33f1c7d2
...
...
@@ -585,6 +585,16 @@ public class BookGroupBizImpl implements BookGroupBiz {
Map
<
Long
,
ProductDto
>
productDtoMap
=
productConsr
.
getProBasesByIds
(
productIds
);
List
<
AppPriceCacheDTO
>
appPriceCacheDTOS
=
new
ArrayList
<>();
for
(
Long
appId
:
appIds
)
{
if
(
appDtoMap
.
get
(
appId
)
!=
null
)
{
AppPriceCacheDTO
appPriceCacheDTO
=
new
AppPriceCacheDTO
();
appPriceCacheDTO
.
setAppTypeEnum
(
AppTypeEnum
.
APP_TYPE_MAP
.
get
(
appDtoMap
.
get
(
appId
).
getTypeCode
()));
appPriceCacheDTO
.
setAppId
(
appId
);
appPriceCacheDTOS
.
add
(
appPriceCacheDTO
);
}
}
Map
<
Long
,
BigDecimal
>
appPriceMap
=
ResponseHandleUtil
.
parseMapResponse
(
appPriceCacheService
.
getCaches
(
appPriceCacheDTOS
),
Long
.
class
,
BigDecimal
.
class
);
//结算接口
Map
<
Long
,
BigDecimal
>
productIncomeMap
=
settlementConsr
.
getAdviserIncomeByCondition
(
productIds
,
"PRODUCT"
,
partyId
,
qrcodeId
,
bookGroupId
);
Map
<
Long
,
BigDecimal
>
appIncomeMap
=
settlementConsr
.
getAdviserIncomeByCondition
(
appIds
,
"APP"
,
partyId
,
qrcodeId
,
bookGroupId
);
...
...
@@ -633,6 +643,14 @@ public class BookGroupBizImpl implements BookGroupBiz {
if
(
productTypeDto
!=
null
)
{
appStatisticsDTO
.
setTypeName
(
productTypeDto
.
getTypeName
());
}
List
<
SpecificationDto
>
specificationDtos
=
productDto
.
getSpecification
();
if
(!
ListUtils
.
isEmpty
(
specificationDtos
))
{
SpecificationDto
specificationDto
=
specificationDtos
.
get
(
0
);
if
(
specificationDto
!=
null
)
{
appStatisticsDTO
.
setDealPrice
(
specificationDto
.
getDealPrice
());
appStatisticsDTO
.
setRetailPrice
(
specificationDto
.
getAdvisePrice
());
}
}
}
}
if
(
"APP"
.
equalsIgnoreCase
(
type
))
{
...
...
@@ -653,6 +671,12 @@ public class BookGroupBizImpl implements BookGroupBiz {
appStatisticsDTO
.
setServeName
(
appDto
.
getTitle
());
appStatisticsDTO
.
setImage
(
appDto
.
getSquareImg
());
}
if
(
appPriceMap
!=
null
)
{
if
(
appPriceMap
.
get
(
id
)
!=
null
)
{
appStatisticsDTO
.
setRetailPrice
(
appPriceMap
.
get
(
id
).
doubleValue
());
appStatisticsDTO
.
setDealPrice
(
0
D
);
}
}
}
if
(
buyCount
==
null
||
buyCount
==
0
||
clickCount
==
null
||
clickCount
==
0
)
{
appStatisticsDTO
.
setBuyRate
(
0
D
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/AppStatisticsDTO.java
View file @
33f1c7d2
...
...
@@ -48,6 +48,12 @@ public class AppStatisticsDTO implements Serializable {
@ApiModelProperty
(
"收益总额"
)
private
Double
incomeAmount
;
@ApiModelProperty
(
"销售价"
)
private
Double
retailPrice
;
@ApiModelProperty
(
"协议价"
)
private
Double
dealPrice
;
public
Long
getServeId
()
{
return
serveId
;
...
...
@@ -137,6 +143,22 @@ public class AppStatisticsDTO implements Serializable {
this
.
incomeAmount
=
incomeAmount
;
}
public
Double
getRetailPrice
()
{
return
retailPrice
;
}
public
void
setRetailPrice
(
Double
retailPrice
)
{
this
.
retailPrice
=
retailPrice
;
}
public
Double
getDealPrice
()
{
return
dealPrice
;
}
public
void
setDealPrice
(
Double
dealPrice
)
{
this
.
dealPrice
=
dealPrice
;
}
@Override
public
String
toString
()
{
return
"AppStatisticsDTO{"
+
...
...
@@ -151,6 +173,8 @@ public class AppStatisticsDTO implements Serializable {
", buyRate="
+
buyRate
+
", saleAmount="
+
saleAmount
+
", incomeAmount="
+
incomeAmount
+
", retailPrice="
+
retailPrice
+
", dealPrice="
+
dealPrice
+
'}'
;
}
}
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