记得上下班打卡 | 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
e85d3763
Commit
e85d3763
authored
Nov 16, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
脚本修改,增加历史积分不拦截每月上限
parent
85d65c0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
32 deletions
+33
-32
DataImpl.java
...quidnet/service/platform/service/impl/kylin/DataImpl.java
+19
-18
StoneScoreLogsServiceImpl.java
...service/stone/service/impl/StoneScoreLogsServiceImpl.java
+14
-14
No files found.
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/kylin/DataImpl.java
View file @
e85d3763
...
...
@@ -81,11 +81,12 @@ public class DataImpl {
}
//获取演出每日任务积分
Integer
performancePrice
=
orderTicketsMapper
.
getOrderScore
(
uid
);
score
+=
performancePrice
.
intValue
()
*
5
;
score
+=
(
performancePrice
.
intValue
()
/
100
)
;
//获取商品每日任务积分
String
resultData
=
HttpUtil
.
get
(
"http://devmall.zhengzai.tv/admin/sumUserCost?user_id="
+
1
,
null
);
int
goodsPrice
=
(
int
)
JSONObject
.
parseObject
(
resultData
).
get
(
"cost"
);
score
+=
goodsPrice
*
5
;
score
+=
(
goodsPrice
/
100
);
//获取 关注摩登天空服务号
if
(
getUnionIdByPhone
(
mobile
)
!=
null
)
{
MultiValueMap
<
String
,
String
>
params
=
CollectionUtil
.
linkedMultiValueMapStringString
();
...
...
@@ -108,13 +109,13 @@ public class DataImpl {
params
.
add
(
"taskId"
,
6
+
""
);
HttpUtil
.
post
(
stoneUrl
+
"/user/inner/doTask"
,
params
);
}
if
(
userInfoVo
.
getIsComplete
()
==
11
)
{
//获取 首次体验在场
MultiValueMap
<
String
,
String
>
params
=
CollectionUtil
.
linkedMultiValueMapStringString
();
params
.
add
(
"uid"
,
uid
);
params
.
add
(
"taskId"
,
8
+
""
);
HttpUtil
.
post
(
stoneUrl
+
"/user/inner/doTask"
,
params
);
}
//
if (userInfoVo.getIsComplete() == 11) {
//
//获取 首次体验在场
//
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
//
params.add("uid", uid);
//
params.add("taskId", 8 + "");
//
HttpUtil.post(stoneUrl + "/user/inner/doTask", params);
//
}
//生成用户积分日志
int
isLog
=
stoneScoreLogsMapper
.
selectCount
(
Wrappers
.
lambdaQuery
(
StoneScoreLogs
.
class
).
eq
(
StoneScoreLogs:
:
getUid
,
uid
).
eq
(
StoneScoreLogs:
:
getContent
,
"历史积分"
));
if
(
isLog
<=
0
)
{
...
...
@@ -156,11 +157,11 @@ public class DataImpl {
}
//获取演出每日任务积分
Integer
performancePrice
=
orderTicketsMapper
.
getOrderScore
(
uid
);
score
+=
performancePrice
.
intValue
()
*
5
;
score
+=
performancePrice
.
intValue
()
/
100
;
//获取商品每日任务积分
String
resultData
=
HttpUtil
.
get
(
"http://devmall.zhengzai.tv/admin/sumUserCost?user_id="
+
1
,
null
);
int
goodsPrice
=
(
int
)
JSONObject
.
parseObject
(
resultData
).
get
(
"cost"
);
score
+=
goodsPrice
*
5
;
score
+=
goodsPrice
/
100
;
//获取 关注摩登天空服务号
if
(
getUnionIdByPhone
(
mobile
)
!=
null
)
{
...
...
@@ -184,13 +185,13 @@ public class DataImpl {
params
.
add
(
"taskId"
,
6
+
""
);
HttpUtil
.
post
(
stoneUrl
+
"/user/inner/doTask"
,
params
);
}
if
(
userInfoVo
.
getIsComplete
()
==
11
)
{
//获取 首次体验在场
MultiValueMap
<
String
,
String
>
params
=
CollectionUtil
.
linkedMultiValueMapStringString
();
params
.
add
(
"uid"
,
uid
);
params
.
add
(
"taskId"
,
8
+
""
);
HttpUtil
.
post
(
stoneUrl
+
"/user/inner/doTask"
,
params
);
}
//
if (userInfoVo.getIsComplete() == 11) {
//
//获取 首次体验在场
//
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
//
params.add("uid", uid);
//
params.add("taskId", 8 + "");
//
HttpUtil.post(stoneUrl + "/user/inner/doTask", params);
//
}
//生成用户积分日志
int
isLog
=
stoneScoreLogsMapper
.
selectCount
(
Wrappers
.
lambdaQuery
(
StoneScoreLogs
.
class
).
eq
(
StoneScoreLogs:
:
getUid
,
uid
).
eq
(
StoneScoreLogs:
:
getContent
,
"历史积分"
));
if
(
isLog
<=
0
)
{
...
...
liquidnet-bus-service/liquidnet-service-stone/liquidnet-service-stone-impl/src/main/java/com/liquidnet/service/stone/service/impl/StoneScoreLogsServiceImpl.java
View file @
e85d3763
...
...
@@ -70,7 +70,7 @@ public class StoneScoreLogsServiceImpl implements IStoneScoreLogsService {
return
"积分不能小于0"
;
}
if
(
TaskId
==
2111
)
{
if
(
TaskId
==
2111
&&
!
reason
.
equals
(
"历史积分"
)
)
{
StoneUserVo
vo
=
stoneRedisUtils
.
getUserData
(
uid
);
if
(
vo
==
null
)
{
vo
=
StoneUserVo
.
getNew
();
...
...
@@ -86,10 +86,8 @@ public class StoneScoreLogsServiceImpl implements IStoneScoreLogsService {
SqlMapping
.
get
(
"stone_score_user.insert"
,
IDGenerator
.
nextTimeId2
(),
vo
.
getUid
(),
vo
.
getStatus
(),
LocalDateTime
.
now
())
);
}
// Date userDay = DateUtil.parse(vo.getCurrentDay()==null ? DateUtil.getNowTime() : vo.getCurrentDay(), "yyyy-MM-dd");
Date
userMonth
=
DateUtil
.
parse
(
vo
.
getCurrentMonth
()==
null
?
DateUtil
.
getNowTime
()
:
vo
.
getCurrentMonth
(),
"yyyy-MM"
);
Date
userMonth
=
DateUtil
.
parse
(
vo
.
getCurrentMonth
()
==
null
?
DateUtil
.
getNowTime
()
:
vo
.
getCurrentMonth
(),
"yyyy-MM"
);
int
monthScore
=
vo
.
getMonthScore
()
==
null
?
0
:
vo
.
getMonthScore
();
// int dayScore = vo.getDayScore() == null ? 0 : vo.getDayScore();
if
(
DateUtil
.
compareMonth
(
userMonth
,
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM"
))
==
0
)
{
//当月
if
((
monthScore
+
score
)
>=
monthMax
)
{
score
=
monthMax
-
monthScore
;
...
...
@@ -99,17 +97,19 @@ public class StoneScoreLogsServiceImpl implements IStoneScoreLogsService {
score
=
monthMax
;
}
}
// if (DateUtil.compareDay(userDay, DateUtil.parse(DateUtil.getNowTime(), "yyyy-MM-dd")) == 0) {//当日
// if ((dayScore + score) >= dayMax) {
// score = dayMax - dayScore;
// }
// } else {
// if (score >= dayMax) {
// score = dayMax;
// Date userDay = DateUtil.parse(vo.getCurrentDay() == null ? DateUtil.getNowTime() : vo.getCurrentDay(), "yyyy-MM-dd");
// int dayScore = vo.getDayScore() == null ? 0 : vo.getDayScore();
// if (DateUtil.compareDay(userDay, DateUtil.parse(DateUtil.getNowTime(), "yyyy-MM-dd")) == 0) {//当日
// if ((dayScore + score) >= dayMax) {
// score = dayMax - dayScore;
// }
// } else {
// if (score >= dayMax) {
// score = dayMax;
// }
// }
// }
vo
.
setCurrentMonth
(
DateUtil
.
format
(
userMonth
,
DateUtil
.
Formatter
.
yyyyMMddHHmmss
));
vo
.
setMonthScore
(
monthScore
+
score
);
vo
.
setCurrentMonth
(
DateUtil
.
format
(
userMonth
,
DateUtil
.
Formatter
.
yyyyMMddHHmmss
));
vo
.
setMonthScore
(
monthScore
+
score
);
stoneRedisUtils
.
setUserData
(
uid
,
vo
);
if
(
score
==
0
)
{
return
"成功"
;
...
...
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