Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
Project
Project
Details
Activity
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
曲欣亮
sentinel
Commits
a8d6fa2e
Commit
a8d6fa2e
authored
Aug 28, 2018
by
曲欣亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改翻译API
parent
a33f3d52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
LanguageController.java
src/main/java/com/egolm/lang/LanguageController.java
+32
-2
No files found.
src/main/java/com/egolm/lang/LanguageController.java
View file @
a8d6fa2e
...
...
@@ -193,13 +193,29 @@ public class LanguageController {
}
@ResponseBody
@PostMapping
(
"get
Tree
"
)
@PostMapping
(
"get
DocumentsByLink
"
)
@ApiOperation
(
"查询翻译文档"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"appid"
,
dataType
=
"string"
,
required
=
false
,
value
=
"appid"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sig"
,
dataType
=
"string"
,
required
=
false
,
value
=
"sig"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sLink"
,
dataType
=
"string"
,
required
=
true
,
value
=
"要查询文档树的目录"
)
})
public
Object
getTree
(
String
sTopLink
)
{
public
Object
getDocumentsByLink
(
String
sLink
)
{
String
sNodeID
=
service
.
getNodeIDByLink
(
sLink
);
Map
<
String
,
Object
>
map
=
service
.
getNodeMapByID
(
sNodeID
);
String
sContentText
=
(
String
)
map
.
get
(
"sContentText"
);
return
Rjx
.
jsonOk
().
setData
(
GsonUtil
.
toList
(
sContentText
));
}
@ResponseBody
@PostMapping
(
"getTreeByLink"
)
@ApiOperation
(
"查询翻译文档树"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"appid"
,
dataType
=
"string"
,
required
=
false
,
value
=
"appid"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sig"
,
dataType
=
"string"
,
required
=
false
,
value
=
"sig"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sTopLink"
,
dataType
=
"string"
,
required
=
true
,
value
=
"要查询文档树的根[最上层]目录"
)
})
public
Object
getTreeByLink
(
String
sTopLink
)
{
String
sTopID
=
service
.
getNodeIDByLink
(
sTopLink
);
List
<
Map
<
String
,
Object
>>
list
=
null
;
if
(
sTopID
==
null
)
{
...
...
@@ -240,6 +256,7 @@ public class LanguageController {
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"appid"
,
dataType
=
"string"
,
required
=
false
,
value
=
"appid"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sig"
,
dataType
=
"string"
,
required
=
false
,
value
=
"sig"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sDocument"
,
dataType
=
"string"
,
required
=
true
,
value
=
"翻译文档对象[JSON]结构"
)
})
public
Object
translate
(
String
sLink
,
String
sDocument
)
{
String
sNodeID
=
service
.
getNodeIDByLink
(
sLink
,
true
);
...
...
@@ -277,6 +294,19 @@ public class LanguageController {
return
Rjx
.
jsonOk
().
setData
(
dst
);
}
// @ResponseBody
// @PostMapping("translate")
// @ApiOperation("翻译文档")
// @ApiImplicitParams({
// @ApiImplicitParam(paramType = "query", name = "appid", dataType = "string", required = false, value = "appid"),
// @ApiImplicitParam(paramType = "query", name = "sig", dataType = "string", required = false, value = "sig"),
// })
// public Object translate(String sLink, String json) {
// String sNodeID = service.getNodeIDByLink(sLink, true);
//
// return Rjx.jsonOk();
// }
public
LanguageService
getService
()
{
return
service
;
}
...
...
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