Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
point-project
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
point-project
Commits
b152f992
Commit
b152f992
authored
Nov 12, 2025
by
“Kongxiangkun”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改评论发放积分和首次打开小程序发放积分逻辑
parent
4ddcd6a1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
cloud-point/src/main/java/com/yizhi/application/service/impl/PointDetailsServiceImpl.java
+4
-4
cloud-point/src/main/java/com/yizhi/application/service/impl/PointServiceImpl.java
+5
-4
No files found.
cloud-point/src/main/java/com/yizhi/application/service/impl/PointDetailsServiceImpl.java
View file @
b152f992
...
@@ -461,14 +461,14 @@ public class PointDetailsServiceImpl extends ServiceImpl<PointDetailsMapper, com
...
@@ -461,14 +461,14 @@ public class PointDetailsServiceImpl extends ServiceImpl<PointDetailsMapper, com
Integer
readCount
=
pointDetailsMapper
.
getCountTodayByLearnType
(
accountId
,
PointTypeEnum
.
READ
.
getKey
());
Integer
readCount
=
pointDetailsMapper
.
getCountTodayByLearnType
(
accountId
,
PointTypeEnum
.
READ
.
getKey
());
pointDetailVO
.
addPoint
(
PointChangeReasonConstant
.
POINT_READ
.
getKey
(),
PointChangeReasonConstant
.
POINT_READ
.
getValue
(),
pointDetailVO
.
addPoint
(
PointChangeReasonConstant
.
POINT_READ
.
getKey
(),
PointChangeReasonConstant
.
POINT_READ
.
getValue
(),
readCount
,
(
readCount
!=
null
&&
readCount
>=
5
)
?
1
:
0
);
readCount
,
(
readCount
!=
null
&&
readCount
>=
5
)
?
1
:
0
);
//投稿
Integer
pubCount
=
pointDetailsMapper
.
getCountTodayByLearnType
(
accountId
,
PointTypeEnum
.
PUBLICATION
.
getKey
());
pointDetailVO
.
addPoint
(
PointChangeReasonConstant
.
POINT_DRAFT
.
getKey
(),
PointChangeReasonConstant
.
POINT_DRAFT
.
getValue
(),
pubCount
,
0
);
//评论
//评论
Integer
commentCount
=
pointDetailsMapper
.
getCountTodayByLearnType
(
accountId
,
PointTypeEnum
.
COMMENT
.
getKey
());
Integer
commentCount
=
pointDetailsMapper
.
getCountTodayByLearnType
(
accountId
,
PointTypeEnum
.
COMMENT
.
getKey
());
pointDetailVO
.
addPoint
(
PointChangeReasonConstant
.
POINT_COMMENT
.
getKey
(),
pointDetailVO
.
addPoint
(
PointChangeReasonConstant
.
POINT_COMMENT
.
getKey
(),
PointChangeReasonConstant
.
POINT_COMMENT
.
getValue
(),
commentCount
,
0
);
PointChangeReasonConstant
.
POINT_COMMENT
.
getValue
(),
commentCount
,
0
);
//投稿
Integer
pubCount
=
pointDetailsMapper
.
getCountTodayByLearnType
(
accountId
,
PointTypeEnum
.
PUBLICATION
.
getKey
());
pointDetailVO
.
addPoint
(
PointChangeReasonConstant
.
POINT_DRAFT
.
getKey
(),
PointChangeReasonConstant
.
POINT_DRAFT
.
getValue
(),
pubCount
,
0
);
//活动
//活动
Integer
activityCount
=
pointDetailsMapper
.
getCountTodayByLearnType
(
accountId
,
PointTypeEnum
.
ACITVITY
.
getKey
());
Integer
activityCount
=
pointDetailsMapper
.
getCountTodayByLearnType
(
accountId
,
PointTypeEnum
.
ACITVITY
.
getKey
());
pointDetailVO
.
addPoint
(
PointChangeReasonConstant
.
CREDITSIGNDONE
.
getKey
(),
pointDetailVO
.
addPoint
(
PointChangeReasonConstant
.
CREDITSIGNDONE
.
getKey
(),
...
...
cloud-point/src/main/java/com/yizhi/application/service/impl/PointServiceImpl.java
View file @
b152f992
...
@@ -169,7 +169,7 @@ public class PointServiceImpl extends ServiceImpl<PointMapper, Point> implements
...
@@ -169,7 +169,7 @@ public class PointServiceImpl extends ServiceImpl<PointMapper, Point> implements
pd
.
setLearnSource
(
date
);
pd
.
setLearnSource
(
date
);
EntityWrapper
<
PointDetails
>
wrapper
=
new
EntityWrapper
<
PointDetails
>(
pd
);
EntityWrapper
<
PointDetails
>
wrapper
=
new
EntityWrapper
<
PointDetails
>(
pd
);
int
cnt
=
pointDetailsService
.
selectCount
(
wrapper
);
int
cnt
=
pointDetailsService
.
selectCount
(
wrapper
);
log
.
info
(
"
登录 赠送积分判断是否为首次登录
:{}"
,
cnt
);
log
.
info
(
"
当日首次打开小程序首页 赠送积分判断是否为首次打开
:{}"
,
cnt
);
if
(
cnt
<=
0
)
{
if
(
cnt
<=
0
)
{
return
new
PointTypeStrategy
(
PointTypeEnum
.
LOGIN
,
date
,
PointTypeEnum
.
LOGIN
.
getPoint
());
return
new
PointTypeStrategy
(
PointTypeEnum
.
LOGIN
,
date
,
PointTypeEnum
.
LOGIN
.
getPoint
());
}
}
...
@@ -195,15 +195,16 @@ public class PointServiceImpl extends ServiceImpl<PointMapper, Point> implements
...
@@ -195,15 +195,16 @@ public class PointServiceImpl extends ServiceImpl<PointMapper, Point> implements
return
null
;
return
null
;
}
}
if
(
type
.
equals
(
PointTypeEnum
.
COMMENT
.
getKey
())){
if
(
type
.
equals
(
PointTypeEnum
.
COMMENT
.
getKey
())){
String
date
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
);
PointDetails
pd
=
new
PointDetails
();
PointDetails
pd
=
new
PointDetails
();
pd
.
setAccountId
(
accountId
);
pd
.
setAccountId
(
accountId
);
pd
.
setLearnType
(
PointTypeEnum
.
COMMENT
.
getKey
());
pd
.
setLearnType
(
PointTypeEnum
.
COMMENT
.
getKey
());
pd
.
setLearnSource
(
sourceId
);
pd
.
setLearnSource
(
date
);
EntityWrapper
<
PointDetails
>
wrapper
=
new
EntityWrapper
<
PointDetails
>(
pd
);
EntityWrapper
<
PointDetails
>
wrapper
=
new
EntityWrapper
<
PointDetails
>(
pd
);
int
cnt
=
pointDetailsService
.
selectCount
(
wrapper
);
int
cnt
=
pointDetailsService
.
selectCount
(
wrapper
);
log
.
info
(
"评论上架 赠送积分判断此活动是不是首次评论上架:{}"
,
cnt
);
log
.
info
(
"评论上架 赠送积分判断此活动是不是首次评论上架:{}"
,
cnt
);
if
(
cnt
<=
0
)
{
if
(
cnt
<=
5
)
{
return
new
PointTypeStrategy
(
PointTypeEnum
.
COMMENT
,
sourceId
,
PointTypeEnum
.
COMMENT
.
getPoint
());
return
new
PointTypeStrategy
(
PointTypeEnum
.
COMMENT
,
date
,
PointTypeEnum
.
COMMENT
.
getPoint
());
}
}
return
null
;
return
null
;
}
}
...
...
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