记得上下班打卡 | 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
e0f80058
Commit
e0f80058
authored
Feb 03, 2026
by
姜秀龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分过期脚本
parent
46a09ccb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
19 deletions
+26
-19
StoneScoreLogsMapper.java
.../liquidnet/service/stone/mapper/StoneScoreLogsMapper.java
+1
-1
StoneScoreLogsMapper.xml
...m/liquidnet/service/stone/mapper/StoneScoreLogsMapper.xml
+11
-5
InnerController.java
...et/service/platform/controller/stone/InnerController.java
+4
-3
StoneServerImpl.java
.../service/platform/service/impl/stone/StoneServerImpl.java
+10
-10
No files found.
liquidnet-bus-do/liquidnet-service-stone-do/src/main/java/com/liquidnet/service/stone/mapper/StoneScoreLogsMapper.java
View file @
e0f80058
...
...
@@ -18,6 +18,6 @@ import java.util.List;
*/
public
interface
StoneScoreLogsMapper
extends
BaseMapper
<
StoneScoreLogs
>
{
List
<
StoneInvalidDto
>
getInvalidScore
(
@Param
(
"
st"
)
LocalDate
st
,
@Param
(
"et"
)
LocalDate
et
,
@Param
(
"strTime"
)
String
strTime
);
List
<
StoneInvalidDto
>
getInvalidScore
(
@Param
(
"
et"
)
LocalDate
et
);
}
liquidnet-bus-do/liquidnet-service-stone-do/src/main/resources/com/liquidnet/service/stone/mapper/StoneScoreLogsMapper.xml
View file @
e0f80058
...
...
@@ -8,11 +8,17 @@
</resultMap>
<select
id=
"getInvalidScore"
resultMap=
"StoneScoreListDtoResult"
>
SELECT uid,sum(score) as 'invalid_score' from stone_score_logs
WHERE
(created_at
<![CDATA[>=]]>
#{st} and created_at
<![CDATA[<]]>
#{et})
OR
content = #{strTime}
SELECT uid,
(
SUM(CASE WHEN score > 0 AND overdue_at
<![CDATA[<=]]>
#{et} THEN score ELSE 0 END)
+
SUM(CASE WHEN score
<![CDATA[<]]>
0 THEN score ELSE 0 END)
) as 'invalid_score'
from stone_score_logs
<where>
AND 1 = 1
-- AND uid = '3955717574002769928338009'
</where>
GROUP BY uid
HAVING invalid_score
<![CDATA[>]]>
0
ORDER BY uid
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/stone/InnerController.java
View file @
e0f80058
...
...
@@ -29,10 +29,11 @@ public class InnerController {
@PostMapping
(
"refreshScore"
)
@ApiOperation
(
"积分过期"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"time"
,
value
=
"格式[202
2-12-01]"
,
example
=
"2022-12-01
"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"time"
,
value
=
"格式[202
5-12-27]"
,
example
=
"2025-12-27
"
),
})
public
void
refreshScore
(
@RequestParam
(
"time"
)
String
time
)
{
data
.
refreshScore
(
time
);
public
ResponseDto
<
Boolean
>
refreshScore
(
@RequestParam
(
"time"
)
String
time
)
{
boolean
res
=
data
.
refreshScore
(
time
);
return
ResponseDto
.
success
(
res
);
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/stone/StoneServerImpl.java
View file @
e0f80058
...
...
@@ -21,7 +21,6 @@ import java.time.LocalDate;
import
java.time.LocalDateTime
;
import
java.util.List
;
@Service
@Slf4j
public
class
StoneServerImpl
{
...
...
@@ -38,30 +37,31 @@ public class StoneServerImpl {
@Autowired
TempScoreMapper
tempScoreMapper
;
public
boolean
refreshScore
(
String
time
)
{
//获取需要跑积分的用户
//
获取需要跑积分的用户
LocalDate
et
=
LocalDate
.
parse
(
time
);
LocalDate
st
=
et
.
minusYears
(
1
);
int
year
=
et
.
getYear
();
String
strTime
=
year
+
"年积分过期"
;
List
<
StoneInvalidDto
>
logsList
=
stoneScoreLogsMapper
.
getInvalidScore
(
st
,
et
,
strTime
);
List
<
StoneInvalidDto
>
logsList
=
stoneScoreLogsMapper
.
getInvalidScore
(
et
);
for
(
StoneInvalidDto
logs
:
logsList
)
{
stoneIntegralClient
.
de2111
(
logs
.
getUid
(),
new
BigDecimal
(
logs
.
getInvalidScore
()
+
""
).
intValu
e
(),
strTime
);
stoneIntegralClient
.
de2111
(
logs
.
getUid
(),
logs
.
getInvalidScor
e
(),
strTime
);
}
return
true
;
}
public
boolean
initScore
(
String
uid
)
{
try
{
TempScore
dataBean
=
tempScoreMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
TempScore
.
class
).
eq
(
TempScore:
:
getUid
,
uid
));
TempScore
dataBean
=
tempScoreMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
TempScore
.
class
).
eq
(
TempScore:
:
getUid
,
uid
));
int
score
=
dataBean
.
getPriceCost
().
intValue
();
int
isLog
=
stoneScoreLogsMapper
.
selectCount
(
Wrappers
.
lambdaQuery
(
StoneScoreLogs
.
class
).
eq
(
StoneScoreLogs:
:
getUid
,
uid
).
eq
(
StoneScoreLogs:
:
getContent
,
"历史积分"
));
int
isLog
=
stoneScoreLogsMapper
.
selectCount
(
Wrappers
.
lambdaQuery
(
StoneScoreLogs
.
class
)
.
eq
(
StoneScoreLogs:
:
getUid
,
uid
).
eq
(
StoneScoreLogs:
:
getContent
,
"历史积分"
));
if
(
isLog
>
0
)
{
return
true
;
}
//创建 用户积分数据
int
isExists
=
stoneScoreUserMapper
.
selectCount
(
Wrappers
.
lambdaQuery
(
StoneScoreUser
.
class
).
eq
(
StoneScoreUser:
:
getUid
,
uid
));
// 创建 用户积分数据
int
isExists
=
stoneScoreUserMapper
.
selectCount
(
Wrappers
.
lambdaQuery
(
StoneScoreUser
.
class
).
eq
(
StoneScoreUser:
:
getUid
,
uid
));
if
(
isExists
<=
0
)
{
StoneScoreUser
data
=
StoneScoreUser
.
getNew
();
data
.
setStatus
(
1
);
...
...
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