Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chain33-pai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
szh
chain33-pai
Commits
0fe205e8
Commit
0fe205e8
authored
Jun 08, 2020
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f2f099ce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
raspDevList.go
models/raspDevList.go
+11
-0
pai.go
service/pai_service/pai.go
+4
-1
No files found.
models/raspDevList.go
View file @
0fe205e8
...
@@ -25,3 +25,13 @@ func UpdateDevList(rasp RaspDevList) error {
...
@@ -25,3 +25,13 @@ func UpdateDevList(rasp RaspDevList) error {
}
}
return
nil
return
nil
}
}
func
UpdateDevList1
(
rasp
RaspDevList
)
error
{
var
dev
RaspDevList
dev
.
Addr
=
rasp
.
Addr
tx
:=
db
.
Begin
()
if
tx
.
First
(
dev
)
.
RecordNotFound
()
{
return
tx
.
Create
(
rasp
)
.
Error
}
return
tx
.
Save
(
rasp
)
.
Error
}
\ No newline at end of file
service/pai_service/pai.go
View file @
0fe205e8
...
@@ -212,7 +212,7 @@ func UploadInfo(KP map[string]string) error {
...
@@ -212,7 +212,7 @@ func UploadInfo(KP map[string]string) error {
return
err
return
err
}
}
rasp
:=
convertDevList
(
KP
)
rasp
:=
convertDevList
(
KP
)
err
=
models
.
UpdateDevList
(
rasp
)
err
=
models
.
UpdateDevList
1
(
rasp
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -248,6 +248,8 @@ func convertDevList(params map[string]string) models.RaspDevList {
...
@@ -248,6 +248,8 @@ func convertDevList(params map[string]string) models.RaspDevList {
}
}
rasp
.
BtyVersion
=
pai
.
BtyVersion
.
App
rasp
.
BtyVersion
=
pai
.
BtyVersion
.
App
}
else
{
rasp
.
NodeStatus
=
0
}
}
return
rasp
return
rasp
}
}
\ No newline at end of file
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