记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
f547a5dd
Commit
f547a5dd
authored
Aug 29, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug:用户总营收计算错误问题,打款后数据读取修改
parent
7ea3cf66
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
93 deletions
+94
-93
SmileShowServiceImpl.java
...min/zhengzai/smile/service/impl/SmileShowServiceImpl.java
+94
-93
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/smile/service/impl/SmileShowServiceImpl.java
View file @
f547a5dd
...
...
@@ -156,12 +156,10 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
@Override
public
AjaxResult
price
(
SmilePriceParam
smilePriceParam
)
{
//查询演出状态
AjaxResult
showStatue
=
showStatue
(
smilePriceParam
);
/*
AjaxResult showStatue = showStatue(smilePriceParam);
if (showStatue != null) {
return showStatue;
}
//该uid本次打款金额
BigDecimal
priceByUid
=
new
BigDecimal
(
"0"
);
}*/
//用户是否打款
Integer
status
=
smileRedisUtils
.
getShowPriceUid
(
smilePriceParam
.
getPerformancesId
(),
smilePriceParam
.
getUid
());
if
(
status
!=
null
)
{
...
...
@@ -202,9 +200,6 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
smilePriceByUidAndPerId
.
setPerformancesId
(
smilePriceParam
.
getPerformancesId
());
smilePriceByUidAndPerId
.
setUid
(
smileUser
.
getUid
());
smilePriceByUidAndPerId
.
setPrice
(
price
);
if
(
smileUser
.
getUid
().
equals
(
smilePriceParam
.
getUid
()))
{
priceByUid
=
price
;
}
smilePriceByUidAndPerId
.
setCreatedDate
(
LocalDateTime
.
now
());
String
userDataJson
=
JSON
.
toJSONString
(
userDataByUid
);
...
...
@@ -223,12 +218,12 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
smilePriceUpdate
.
setStatus
(
1
);
smilePriceUpdate
.
setUpdatedDate
(
LocalDateTime
.
now
());
smilePriceMapper
.
update
(
smilePriceUpdate
,
lambdaQueryWrapper
);
SmilePrice
smilePrice
=
smilePriceMapper
.
selectOne
(
lambdaQueryWrapper
);
//该用户该演出标记打款
smileRedisUtils
.
setPriceByUid
(
smilePriceParam
.
getPerformancesId
(),
smilePriceParam
.
getUid
());
//计算总营收
BigDecimal
userTotalPrice
=
smileRedisUtils
.
getUserTotalPrice
(
smilePriceParam
.
getUid
());
smileRedisUtils
.
setUserTotalPrice
(
smilePriceParam
.
getUid
(),
priceByUid
.
add
(
userTotalPrice
));
smileRedisUtils
.
setUserTotalPrice
(
smilePriceParam
.
getUid
(),
smilePrice
.
getPrice
().
add
(
userTotalPrice
));
}
return
AjaxResult
.
success
();
}
...
...
@@ -361,10 +356,6 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
showAgentVoList
.
add
(
showAgentVo
);
}
//根据演出id查询出所有代理人的销售
List
<
ShowBaseVoDto
>
showBaseVoList
=
smileAgentMapper
.
selectMapByPerId
(
performancesId
);
//根据代理id进行分组
Map
<
String
,
List
<
ShowBaseVoDto
>>
stringListMap
=
showBaseVoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ShowBaseVoDto:
:
getAgentId
));
List
<
String
>
ids
=
ObjectUtil
.
cloneLinkedListStr
();
//创建list长度定位分组数量
List
<
UserData
>
userDataList
=
new
ArrayList
<>();
...
...
@@ -377,12 +368,21 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
for
(
SmilePrice
smilePrice
:
smilePrices
)
{
if
(
smilePrice
.
getRecord
()
!=
null
&&
!
smilePrice
.
getRecord
().
equals
(
""
))
{
UserData
userData
=
JSON
.
parseObject
(
smilePrice
.
getRecord
(),
UserData
.
class
);
//保存打款标识
userData
.
setPriceStatus
(
smileRedisUtils
.
getShowPriceUid
(
performancesId
,
userData
.
getUid
()));
userDataList
.
add
(
userData
);
ids
.
add
(
userData
.
getUid
());
}
}
//判断该演出是否有打款
Integer
showPriceId
=
smileRedisUtils
.
getShowPriceId
(
performancesId
);
if
(
showPriceId
==
null
){
//根据演出id查询出所有代理人的销售
List
<
ShowBaseVoDto
>
showBaseVoList
=
smileAgentMapper
.
selectMapByPerId
(
performancesId
);
//根据代理id进行分组
Map
<
String
,
List
<
ShowBaseVoDto
>>
stringListMap
=
showBaseVoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ShowBaseVoDto:
:
getAgentId
));
//遍历分组
for
(
Map
.
Entry
<
String
,
List
<
ShowBaseVoDto
>>
showMap
:
stringListMap
.
entrySet
())
{
UserData
userData
=
UserData
.
getNew
();
...
...
@@ -476,6 +476,7 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
smileRedisUtils
.
setUserDataByUid
(
userData
,
performancesId
);
}
});
}
saleDataVo
.
setUserDataList
(
userDataList
);
saleDataVo
.
setShowAgentVoList
(
showAgentVoList
);
return
saleDataVo
;
...
...
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