Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tagManager
Overview
Overview
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
lanmw
tagManager
Commits
f2377711
Commit
f2377711
authored
Dec 13, 2019
by
lanmw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add updateSystemExtractInfo
parent
0ffd0831
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
0 deletions
+60
-0
TagCtrl.java
src/main/java/com/keymobile/tagmanager/api/TagCtrl.java
+11
-0
SysTag.java
src/main/java/com/keymobile/tagmanager/model/SysTag.java
+36
-0
TagService.java
...ain/java/com/keymobile/tagmanager/service/TagService.java
+13
-0
No files found.
src/main/java/com/keymobile/tagmanager/api/TagCtrl.java
View file @
f2377711
...
@@ -18,6 +18,7 @@ import com.keymobile.tagmanager.util.UserInfoUtils;
...
@@ -18,6 +18,7 @@ import com.keymobile.tagmanager.util.UserInfoUtils;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
@Api
(
value
=
"标签相关"
,
tags
=
"标签相关"
)
@Api
(
value
=
"标签相关"
,
tags
=
"标签相关"
)
...
@@ -141,6 +142,16 @@ public class TagCtrl {
...
@@ -141,6 +142,16 @@ public class TagCtrl {
return
tagService
.
getSystemByCode
(
code
);
return
tagService
.
getSystemByCode
(
code
);
}
}
@ApiOperation
(
value
=
"更新系统抽取信息"
,
notes
=
"更新系统抽取信息"
)
@PostMapping
(
value
=
"/updateSystemExtractInfo"
)
public
SysTag
updateSystemExtractInfo
(
@ApiParam
(
value
=
"系统编码"
)
@RequestParam
String
code
,
@ApiParam
(
value
=
"是否抽取"
)
@RequestParam
boolean
hasExtract
,
@ApiParam
(
value
=
"表数量"
)
@RequestParam
int
tableNum
,
@ApiParam
(
value
=
"字段数量"
)
@RequestParam
int
columnNum
)
throws
TagNotExistException
{
return
tagService
.
updateSystemExtractInfo
(
code
,
hasExtract
,
tableNum
,
columnNum
);
}
}
}
src/main/java/com/keymobile/tagmanager/model/SysTag.java
View file @
f2377711
...
@@ -137,6 +137,42 @@ public class SysTag implements Serializable, IExcelModel, IExcelDataModel{
...
@@ -137,6 +137,42 @@ public class SysTag implements Serializable, IExcelModel, IExcelDataModel{
private
String
onLineDate
;
private
String
onLineDate
;
@Excel
(
name
=
"系统状态"
,
orderNum
=
"60"
,
width
=
30
)
@Excel
(
name
=
"系统状态"
,
orderNum
=
"60"
,
width
=
30
)
private
String
systemState
;
private
String
systemState
;
private
boolean
hasExtract
;
private
int
tableNum
;
private
int
columnNum
;
public
boolean
isHasExtract
()
{
return
hasExtract
;
}
public
void
setHasExtract
(
boolean
hasExtract
)
{
this
.
hasExtract
=
hasExtract
;
}
public
int
getTableNum
()
{
return
tableNum
;
}
public
void
setTableNum
(
int
tableNum
)
{
this
.
tableNum
=
tableNum
;
}
public
int
getColumnNum
()
{
return
columnNum
;
}
public
void
setColumnNum
(
int
columnNum
)
{
this
.
columnNum
=
columnNum
;
}
public
String
getErrMsg
()
{
return
errMsg
;
}
public
void
setErrMsg
(
String
errMsg
)
{
this
.
errMsg
=
errMsg
;
}
public
int
getExcelRowNum
()
{
return
excelRowNum
;
}
public
void
setExcelRowNum
(
int
excelRowNum
)
{
this
.
excelRowNum
=
excelRowNum
;
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
...
...
src/main/java/com/keymobile/tagmanager/service/TagService.java
View file @
f2377711
...
@@ -16,6 +16,7 @@ import org.springframework.data.domain.Sort.Order;
...
@@ -16,6 +16,7 @@ import org.springframework.data.domain.Sort.Order;
import
org.springframework.data.mongodb.core.MongoOperations
;
import
org.springframework.data.mongodb.core.MongoOperations
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Update
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.keymobile.tagmanager.exception.TagDuplicateException
;
import
com.keymobile.tagmanager.exception.TagDuplicateException
;
import
com.keymobile.tagmanager.exception.TagException
;
import
com.keymobile.tagmanager.exception.TagException
;
...
@@ -393,4 +394,16 @@ public class TagService {
...
@@ -393,4 +394,16 @@ public class TagService {
return
mongoOperations
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"systemCode"
).
is
(
code
)),
SysTag
.
class
);
return
mongoOperations
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"systemCode"
).
is
(
code
)),
SysTag
.
class
);
}
}
public
SysTag
updateSystemExtractInfo
(
String
code
,
boolean
hasExtract
,
int
tableNum
,
int
columnNum
)
throws
TagNotExistException
{
SysTag
sysTag
=
mongoOperations
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"systemCode"
).
is
(
code
)),
SysTag
.
class
);
if
(
sysTag
==
null
)
{
throw
new
TagNotExistException
(
String
.
format
(
"编码[为%s]的系统不存在"
,
code
));
}
sysTag
.
setHasExtract
(
hasExtract
);
sysTag
.
setTableNum
(
tableNum
);
sysTag
.
setColumnNum
(
columnNum
);
mongoOperations
.
save
(
sysTag
);
return
sysTag
;
}
}
}
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