Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskcenter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Odysseus
taskcenter
Commits
d3961464
Commit
d3961464
authored
Jan 15, 2025
by
贾浩@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update default pass status
parent
f47323ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
task.go
server/task.go
+2
-2
task.go
service/task.go
+5
-1
No files found.
server/task.go
View file @
d3961464
...
...
@@ -151,7 +151,7 @@ func submitTask(c *gin.Context) {
// 没有initdata,sync模块处理状态
if
initData
==
""
{
_
,
err
=
srv
.
SubmitTask
(
taskId
,
userId
,
task
.
Daily
,
constant
.
TaskHistoryStatusPending
)
_
,
err
=
srv
.
SubmitTask
(
taskId
,
userId
,
task
.
Pass
,
task
.
Daily
,
constant
.
TaskHistoryStatusPending
)
if
err
!=
nil
{
c
.
JSON
(
200
,
withError
(
constant
.
InternalError
))
return
...
...
@@ -183,7 +183,7 @@ func submitTask(c *gin.Context) {
if
isPremium
{
taskStatus
=
constant
.
TaskHistoryStatusSuccess
}
_
,
err
=
srv
.
SubmitTask
(
taskId
,
userId
,
task
.
Daily
,
taskStatus
)
_
,
err
=
srv
.
SubmitTask
(
taskId
,
userId
,
task
.
Pass
,
task
.
Daily
,
taskStatus
)
if
err
!=
nil
{
c
.
JSON
(
200
,
withError
(
constant
.
InternalError
))
return
...
...
service/task.go
View file @
d3961464
...
...
@@ -157,7 +157,11 @@ func (s *Service) GetTaskResult(isDailyTask bool, taskId int, userId string) (st
return
}
func
(
s
*
Service
)
SubmitTask
(
taskId
int
,
userId
string
,
isDailyTask
bool
,
status
string
)
(
exist
bool
,
err
error
)
{
func
(
s
*
Service
)
SubmitTask
(
taskId
int
,
userId
string
,
passTask
,
isDailyTask
bool
,
status
string
)
(
exist
bool
,
err
error
)
{
if
passTask
{
status
=
constant
.
TaskHistoryStatusSuccess
}
exist
,
err
=
s
.
d
.
CreateTaskHistory
(
taskId
,
userId
,
isDailyTask
,
status
)
if
err
!=
nil
{
log
.
WithError
(
err
)
.
Error
(
"create task history error"
)
...
...
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