Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
5bcbce87
Commit
5bcbce87
authored
Jan 08, 2025
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签到进度百分比
parent
80514973
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserSignInServiceImpl.java
.../com/wwdz/ch/wx/impl/qiandao/QdUserSignInServiceImpl.java
+11
-0
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserSignInServiceImpl.java
View file @
5bcbce87
...
@@ -4,6 +4,7 @@ import com.wwdz.ch.core.api.wxpay.WxPayServiceApi;
...
@@ -4,6 +4,7 @@ import com.wwdz.ch.core.api.wxpay.WxPayServiceApi;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.consts.SigninEnum
;
import
com.wwdz.ch.core.consts.SigninEnum
;
import
com.wwdz.ch.core.consts.qiandao.SignInTaskEnum
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.IdUtils
;
import
com.wwdz.ch.core.util.IdUtils
;
import
com.wwdz.ch.db.dao.distribution.DistributionOrderDao
;
import
com.wwdz.ch.db.dao.distribution.DistributionOrderDao
;
...
@@ -210,6 +211,16 @@ public class QdUserSignInServiceImpl implements QdUserSignInService {
...
@@ -210,6 +211,16 @@ public class QdUserSignInServiceImpl implements QdUserSignInService {
//查询累计签到天数
//查询累计签到天数
long
totalDays
=
qdUserSignInDao
.
countTotalRecord
(
dto
.
getUserId
(),
taskId
);
long
totalDays
=
qdUserSignInDao
.
countTotalRecord
(
dto
.
getUserId
(),
taskId
);
map
.
put
(
"totalDays"
,
totalDays
);
map
.
put
(
"totalDays"
,
totalDays
);
//进度条
if
(
taskId
!=
null
&&
taskId
!=
CommConsts
.
DEFAULT_TASK_ID
.
longValue
())
{
SignInTask
signInTask
=
signInTaskDao
.
findById
(
taskId
);
int
goalDays
=
signInTask
.
getGoalDays
();
if
(
signInTask
.
getType
()
==
SignInTaskEnum
.
TypeEnum
.
CONTINUOUS
.
getCode
())
{
map
.
put
(
"rate"
,
(
int
)
Math
.
ceil
((
Double
.
valueOf
(
map
.
get
(
"consecutiveDays"
).
toString
())
/
goalDays
)
*
100
));
}
else
{
map
.
put
(
"rate"
,
(
int
)
Math
.
ceil
((
Double
.
valueOf
(
map
.
get
(
"totalDays"
).
toString
())
/
goalDays
)
*
100
));
}
}
return
Result
.
success
(
map
);
return
Result
.
success
(
map
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询签到信息失败 error:{}"
,
e
);
logger
.
error
(
"查询签到信息失败 error:{}"
,
e
);
...
...
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