Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
admin-backend
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
admin-backend
Commits
5f52e2d2
Commit
5f52e2d2
authored
Mar 22, 2024
by
brent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify task type
parent
43238bda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
task.go
controllers/task.go
+7
-7
task.go
models/task.go
+4
-4
No files found.
controllers/task.go
View file @
5f52e2d2
...
@@ -2198,7 +2198,7 @@ func (server *TaskController) Examples() {
...
@@ -2198,7 +2198,7 @@ func (server *TaskController) Examples() {
AccessStatus
:
data
.
AccessStatus
,
AccessStatus
:
data
.
AccessStatus
,
PublishStatus
:
data
.
PublishStatus
,
PublishStatus
:
data
.
PublishStatus
,
Price
:
float64
(
data
.
Price
/
1000000
),
Price
:
float64
(
data
.
Price
/
1000000
),
U
int
:
data
.
Uin
t
,
U
nit
:
data
.
Uni
t
,
}
}
remodels
=
append
(
remodels
,
&
remodel
)
remodels
=
append
(
remodels
,
&
remodel
)
}
}
...
@@ -2213,14 +2213,14 @@ func (server *TaskController) Examples() {
...
@@ -2213,14 +2213,14 @@ func (server *TaskController) Examples() {
}
}
func
(
server
*
TaskController
)
RunCount
()
{
func
(
server
*
TaskController
)
RunCount
()
{
_
,
err
:=
server
.
Check
()
//
_, err := server.Check()
if
err
!=
nil
{
//
if err != nil {
server
.
respond
(
http
.
StatusUnauthorized
,
err
.
Error
())
//
server.respond(http.StatusUnauthorized, err.Error())
return
//
return
}
//
}
body
:=
server
.
Ctx
.
Input
.
RequestBody
body
:=
server
.
Ctx
.
Input
.
RequestBody
appRequest
:=
models
.
AppRequest
{}
appRequest
:=
models
.
AppRequest
{}
err
=
json
.
Unmarshal
(
body
,
&
appRequest
)
//解析body中数据
err
:
=
json
.
Unmarshal
(
body
,
&
appRequest
)
//解析body中数据
logs
.
Debug
(
"appRequest"
,
appRequest
)
logs
.
Debug
(
"appRequest"
,
appRequest
)
if
err
!=
nil
{
if
err
!=
nil
{
server
.
respond
(
models
.
NoRequestBody
,
err
.
Error
())
server
.
respond
(
models
.
NoRequestBody
,
err
.
Error
())
...
...
models/task.go
View file @
5f52e2d2
...
@@ -88,7 +88,7 @@ type TaskType struct {
...
@@ -88,7 +88,7 @@ type TaskType struct {
ResultFileExpires
int
`json:"result_file_expires";orm:"column(result_file_expires)"`
ResultFileExpires
int
`json:"result_file_expires";orm:"column(result_file_expires)"`
AccessStatus
int
`json:"access_status,omitempty"`
AccessStatus
int
`json:"access_status,omitempty"`
PublishStatus
int
`json:"publish_status,omitempty"`
PublishStatus
int
`json:"publish_status,omitempty"`
U
in
t
string
`json:"unit";orm:"column(unit)"`
U
ni
t
string
`json:"unit";orm:"column(unit)"`
CreatedTime
time
.
Time
`json:"created_time";orm:"column(created_time);type(datetime)"`
CreatedTime
time
.
Time
`json:"created_time";orm:"column(created_time);type(datetime)"`
UpdatedTime
time
.
Time
`json:"updated_time";orm:"column(updated_time);type(datetime)"`
UpdatedTime
time
.
Time
`json:"updated_time";orm:"column(updated_time);type(datetime)"`
Deleted
int
`json:"deleted";orm:"column(deleted);size(1)"`
Deleted
int
`json:"deleted";orm:"column(deleted);size(1)"`
...
@@ -129,7 +129,7 @@ type NewTaskType struct {
...
@@ -129,7 +129,7 @@ type NewTaskType struct {
ResultFileExpires
int
`json:"result_file_expires";orm:"column(result_file_expires)"`
ResultFileExpires
int
`json:"result_file_expires";orm:"column(result_file_expires)"`
AccessStatus
int
`json:"access_status,omitempty"`
AccessStatus
int
`json:"access_status,omitempty"`
PublishStatus
int
`json:"publish_status,omitempty"`
PublishStatus
int
`json:"publish_status,omitempty"`
U
in
t
string
`json:"unit";orm:"column(unit)"`
U
ni
t
string
`json:"unit";orm:"column(unit)"`
CreatedTime
time
.
Time
`json:"created_time";orm:"column(created_time);type(datetime)"`
CreatedTime
time
.
Time
`json:"created_time";orm:"column(created_time);type(datetime)"`
UpdatedTime
time
.
Time
`json:"updated_time";orm:"column(updated_time);type(datetime)"`
UpdatedTime
time
.
Time
`json:"updated_time";orm:"column(updated_time);type(datetime)"`
Deleted
int
`json:"deleted";orm:"column(deleted);size(1)"`
Deleted
int
`json:"deleted";orm:"column(deleted);size(1)"`
...
@@ -155,7 +155,7 @@ type Model struct {
...
@@ -155,7 +155,7 @@ type Model struct {
AccessStatus
int
`json:"access_status,omitempty"`
AccessStatus
int
`json:"access_status,omitempty"`
PublishStatus
int
`json:"publish_status,omitempty"`
PublishStatus
int
`json:"publish_status,omitempty"`
Price
int64
`json:"price";orm:"column(price)"`
Price
int64
`json:"price";orm:"column(price)"`
U
in
t
string
`json:"unit";orm:"column(unit)"`
U
ni
t
string
`json:"unit";orm:"column(unit)"`
}
}
type
ResonseModel
struct
{
type
ResonseModel
struct
{
...
@@ -178,7 +178,7 @@ type ResonseModel struct {
...
@@ -178,7 +178,7 @@ type ResonseModel struct {
AccessStatus
int
`json:"access_status,omitempty"`
AccessStatus
int
`json:"access_status,omitempty"`
PublishStatus
int
`json:"publish_status,omitempty"`
PublishStatus
int
`json:"publish_status,omitempty"`
Price
float64
`json:"price";orm:"column(price)"`
Price
float64
`json:"price";orm:"column(price)"`
U
in
t
string
`json:"unit";orm:"column(unit)"`
U
ni
t
string
`json:"unit";orm:"column(unit)"`
}
}
type
Bills
struct
{
type
Bills
struct
{
...
...
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