Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doc-service
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eifel邓鹏飞
doc-service
Commits
06a74034
Commit
06a74034
authored
Sep 27, 2024
by
Bess严根旺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
9bfb58b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
get_convert_command.go
console/get_convert_command.go
+11
-15
No files found.
console/get_convert_command.go
View file @
06a74034
...
@@ -61,35 +61,31 @@ func getConvertDoData(ctx context.Context) int8 {
...
@@ -61,35 +61,31 @@ func getConvertDoData(ctx context.Context) int8 {
list
,
err
:=
db
.
GetServerSiteMicrosDB
()
.
DocServerProject
.
Query
()
.
Where
(
list
,
err
:=
db
.
GetServerSiteMicrosDB
()
.
DocServerProject
.
Query
()
.
Where
(
docserverproject
.
StatusEQ
(
1
),
docserverproject
.
StatusEQ
(
1
),
)
.
All
(
ctx
)
)
.
All
(
ctx
)
if
err
!=
nil
{
if
err
!=
nil
{
return
0
return
0
}
}
if
len
(
list
)
<=
0
{
if
len
(
list
)
<=
0
{
return
0
return
0
}
}
for
_
,
items
:=
range
list
{
for
_
,
items
:=
range
list
{
res
:=
GetProjectInfo
(
ctx
,
items
.
ID
)
res
,
msg
:=
GetProjectInfo
(
ctx
,
items
.
ID
)
if
res
>
0
{
logger
.
Info
(
"状态: %d"
,
res
)
_
,
errUpdateSt
:=
db
.
GetServerSiteMicrosDB
()
.
DocServerProject
.
UpdateOneID
(
items
.
ID
)
.
SetStatus
(
2
)
.
Save
(
ctx
)
_
,
errUpdateSt
:=
db
.
GetServerSiteMicrosDB
()
.
DocServerProject
.
UpdateOneID
(
items
.
ID
)
.
SetStatus
(
2
)
.
SetCallbackRes
(
msg
)
.
Save
(
ctx
)
if
errUpdateSt
!=
nil
{
if
errUpdateSt
!=
nil
{
log
.
Info
(
"修改获取的文件进度状态失败"
+
errUpdateSt
.
Error
())
log
.
Info
(
"修改获取的文件进度状态失败"
+
errUpdateSt
.
Error
())
continue
continue
}
}
}
}
}
return
int8
(
len
(
list
))
return
0
}
}
func
GetProjectInfo
(
c
context
.
Context
,
projectId
int32
)
int8
{
func
GetProjectInfo
(
c
context
.
Context
,
projectId
int32
)
(
int8
,
string
)
{
defer
recoverPanicGetPro
()
defer
recoverPanicGetPro
()
projectInfo
,
infoErr
:=
db
.
GetServerSiteMicrosDB
()
.
DocServerProject
.
Get
(
c
,
projectId
)
projectInfo
,
infoErr
:=
db
.
GetServerSiteMicrosDB
()
.
DocServerProject
.
Get
(
c
,
projectId
)
if
infoErr
!=
nil
{
if
infoErr
!=
nil
{
return
0
return
0
,
infoErr
.
Error
()
}
}
request
:=
&
service
.
GetTaskRequest
{}
request
:=
&
service
.
GetTaskRequest
{}
request
.
ProjectId
=
projectId
request
.
ProjectId
=
projectId
...
@@ -103,9 +99,9 @@ func GetProjectInfo(c context.Context, projectId int32) int8 {
...
@@ -103,9 +99,9 @@ func GetProjectInfo(c context.Context, projectId int32) int8 {
if
errs
!=
nil
||
*
result
.
StatusCode
!=
200
||
*
result
.
Body
.
Status
!=
"Succeeded"
{
if
errs
!=
nil
||
*
result
.
StatusCode
!=
200
||
*
result
.
Body
.
Status
!=
"Succeeded"
{
logger
.
Info
(
result
)
logger
.
Info
(
result
)
logger
.
Error
(
"错误信息"
+
errs
.
Error
())
logger
.
Error
(
"错误信息"
+
errs
.
Error
())
return
0
return
0
,
errs
.
Error
()
}
}
service2
.
CreateGetProject
(
c
,
projectId
,
*
result
.
Body
.
Status
)
service2
.
CreateGetProject
(
c
,
projectId
,
*
result
.
Body
.
Status
)
return
1
return
1
,
"success"
}
}
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