Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
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
poc
poc-api
Commits
4c7450fd
Commit
4c7450fd
authored
Jan 22, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 【【POE】分享应用时数据统计更改】 --bug=1009877
parent
950f26ad
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
DataAnalyzeReportService.java
.../poc/data_analyze/aggregate/DataAnalyzeReportService.java
+5
-4
DataAnalyzeReportServiceImpl.java
..._analyze/aggregate/impl/DataAnalyzeReportServiceImpl.java
+2
-2
MemberAgentUsageDetailsQuery.sql
...m/poc/data_analyze/query/MemberAgentUsageDetailsQuery.sql
+2
-1
AgentApplicationServiceImpl.java
...oc/expose/aggregate/impl/AgentApplicationServiceImpl.java
+1
-1
No files found.
src/main/java/cn/com/poc/data_analyze/aggregate/DataAnalyzeReportService.java
View file @
4c7450fd
...
...
@@ -39,8 +39,9 @@ public interface DataAnalyzeReportService {
*
* @param agentId 应用ID
* @param channel 渠道
* @param userId 用户ID
* @param userId 使用者
* @param deducted 积分扣减者
* @param pointDeductionNum 积分扣除数量-单位分
*/
boolean
dataReport
(
String
agentId
,
DataAnalyzeChannelEnum
channel
,
Long
userId
,
Long
pointDeductionNum
);
boolean
dataReport
(
String
agentId
,
DataAnalyzeChannelEnum
channel
,
Long
userId
,
Long
deducted
,
Long
pointDeductionNum
);
}
src/main/java/cn/com/poc/data_analyze/aggregate/impl/DataAnalyzeReportServiceImpl.java
View file @
4c7450fd
...
...
@@ -62,10 +62,10 @@ public class DataAnalyzeReportServiceImpl implements DataAnalyzeReportService {
}
@Override
public
boolean
dataReport
(
String
agentId
,
DataAnalyzeChannelEnum
channel
,
Long
userId
,
Long
pointDeductionNum
)
{
public
boolean
dataReport
(
String
agentId
,
DataAnalyzeChannelEnum
channel
,
Long
userId
,
Long
deducted
,
Long
pointDeductionNum
)
{
BigDecimal
points
=
new
BigDecimal
(
pointDeductionNum
).
divide
(
new
BigDecimal
(
100
),
2
,
RoundingMode
.
HALF_UP
);
this
.
dataReportByDialogue
(
userId
,
DataAnalyzeTypeEnum
.
AGENT
,
agentId
,
channel
);
this
.
dataReportByPoint
(
userI
d
,
points
,
DataAnalyzeTypeEnum
.
AGENT
,
agentId
,
channel
);
this
.
dataReportByPoint
(
deducte
d
,
points
,
DataAnalyzeTypeEnum
.
AGENT
,
agentId
,
channel
);
return
true
;
}
}
src/main/java/cn/com/poc/data_analyze/query/MemberAgentUsageDetailsQuery.sql
View file @
4c7450fd
...
...
@@ -4,7 +4,8 @@ select * from (select
count
(
bdapr
.
relation_id
)
as
usage_count
,
sum
(
bdapr
.
point_num
)
as
total_points
,
max
(
bdapr
.
datetime
)
as
last_usage_time
,
(
case
when
bdapr
.
channel
=
'preview'
or
bdapr
.
channel
=
'multi_preview'
then
"N"
else
"Y"
end
)
as
publish_status
(
case
when
baai
.
agent_publish_status
=
"publish"
then
"Y"
else
"N"
end
)
as
publish_status
-- (case when bdapr.channel = 'preview' or bdapr.channel = 'multi_preview' then "N" else "Y" end) as publish_status
from
biz_data_analyze_point_record
bdapr
left
join
biz_agent_application_info
baai
on
baai
.
agent_id
=
bdapr
.
relation_id
...
...
src/main/java/cn/com/poc/expose/aggregate/impl/AgentApplicationServiceImpl.java
View file @
4c7450fd
...
...
@@ -193,7 +193,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
if
(
StringUtils
.
isBlank
(
channel
))
{
channel
=
DataAnalyzeChannelEnum
.
link_share
.
getChannel
();
}
dataAnalyzeReportService
.
dataReport
(
agentId
,
DataAnalyzeChannelEnum
.
valueOf
(
channel
),
deducted
,
pointDeductionNum
);
dataAnalyzeReportService
.
dataReport
(
agentId
,
DataAnalyzeChannelEnum
.
valueOf
(
channel
),
userBaseEntity
.
getUserId
(),
deducted
,
deducted
.
equals
(
userBaseEntity
.
getUserId
())
?
pointDeductionNum
:
0L
);
}
catch
(
Exception
e
)
{
memberEquityService
.
rollbackPoint
(
reduceSn
);
throw
new
BusinessException
(
e
.
getMessage
());
...
...
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