|
@@ -1,5 +1,6 @@
|
|
|
package cn.com.yusys.yusp.controller;
|
|
package cn.com.yusys.yusp.controller;
|
|
|
|
|
|
|
|
|
|
+import cn.com.yusys.yusp.annotation.ApiOperationType;
|
|
|
import cn.com.yusys.yusp.commons.exception.BizException;
|
|
import cn.com.yusys.yusp.commons.exception.BizException;
|
|
|
import cn.com.yusys.yusp.commons.module.adapter.web.rest.ResultDto;
|
|
import cn.com.yusys.yusp.commons.module.adapter.web.rest.ResultDto;
|
|
|
import cn.com.yusys.yusp.util.SessionCommonUtil;
|
|
import cn.com.yusys.yusp.util.SessionCommonUtil;
|
|
@@ -60,7 +61,7 @@ public class AitagTagInfoController {
|
|
|
* @param aitagTagInfoQueryVo
|
|
* @param aitagTagInfoQueryVo
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("列表标签分页信息")
|
|
|
|
|
|
|
+ @ApiOperationType("列表标签分页信息")
|
|
|
@GetMapping("/page")
|
|
@GetMapping("/page")
|
|
|
public ResultDto<List<AitagTagInfoEntity>> page(AitagTagInfoQueryVo aitagTagInfoQueryVo) {
|
|
public ResultDto<List<AitagTagInfoEntity>> page(AitagTagInfoQueryVo aitagTagInfoQueryVo) {
|
|
|
IPage<AitagTagInfoEntity> page = aitagTagInfoService.queryPage(aitagTagInfoQueryVo);
|
|
IPage<AitagTagInfoEntity> page = aitagTagInfoService.queryPage(aitagTagInfoQueryVo);
|
|
@@ -74,7 +75,7 @@ public class AitagTagInfoController {
|
|
|
* @param aitagTagInfoQueryVo
|
|
* @param aitagTagInfoQueryVo
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("标签列表查询")
|
|
|
|
|
|
|
+ @ApiOperationType("标签列表查询")
|
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
|
public ResultDto<List<AitagTagInfoEntity>> list(AitagTagInfoQueryVo aitagTagInfoQueryVo) {
|
|
public ResultDto<List<AitagTagInfoEntity>> list(AitagTagInfoQueryVo aitagTagInfoQueryVo) {
|
|
|
List<AitagTagInfoEntity> page = aitagTagInfoService.queryList(aitagTagInfoQueryVo);
|
|
List<AitagTagInfoEntity> page = aitagTagInfoService.queryList(aitagTagInfoQueryVo);
|
|
@@ -87,7 +88,7 @@ public class AitagTagInfoController {
|
|
|
* @param aitagTagInfoQueryVo
|
|
* @param aitagTagInfoQueryVo
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("查询标签树")
|
|
|
|
|
|
|
+ @ApiOperationType("查询标签树")
|
|
|
@PostMapping("/queryTagTree")
|
|
@PostMapping("/queryTagTree")
|
|
|
public ResultDto<List<TagNodeVo>> queryTagTree(@RequestBody AitagTagInfoQueryVo aitagTagInfoQueryVo) {
|
|
public ResultDto<List<TagNodeVo>> queryTagTree(@RequestBody AitagTagInfoQueryVo aitagTagInfoQueryVo) {
|
|
|
if(StringUtils.isBlank(aitagTagInfoQueryVo.getCategoryId())){
|
|
if(StringUtils.isBlank(aitagTagInfoQueryVo.getCategoryId())){
|
|
@@ -97,13 +98,14 @@ public class AitagTagInfoController {
|
|
|
return ResultDto.success(tagNodeVos);
|
|
return ResultDto.success(tagNodeVos);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 详细
|
|
* 详细
|
|
|
*
|
|
*
|
|
|
* @param id
|
|
* @param id
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("详细")
|
|
|
|
|
|
|
+ @ApiOperationType("标签详细")
|
|
|
@GetMapping("/info/{id}")
|
|
@GetMapping("/info/{id}")
|
|
|
public ResultDto<TagInfoDto> info(@PathVariable("id") String id) {
|
|
public ResultDto<TagInfoDto> info(@PathVariable("id") String id) {
|
|
|
TagInfoDto aitagTagInfo = aitagTagInfoService.getTagInfo(id);
|
|
TagInfoDto aitagTagInfo = aitagTagInfoService.getTagInfo(id);
|
|
@@ -116,7 +118,7 @@ public class AitagTagInfoController {
|
|
|
* @param aitagTagInfoEntity
|
|
* @param aitagTagInfoEntity
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("保存")
|
|
|
|
|
|
|
+ @ApiOperationType("标签保存")
|
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
|
public ResultDto save(@RequestBody AitagTagInfoEntity aitagTagInfoEntity) {
|
|
public ResultDto save(@RequestBody AitagTagInfoEntity aitagTagInfoEntity) {
|
|
|
String id = aitagTagInfoService.saveTag(aitagTagInfoEntity);
|
|
String id = aitagTagInfoService.saveTag(aitagTagInfoEntity);
|
|
@@ -133,7 +135,7 @@ public class AitagTagInfoController {
|
|
|
* @param aitagTagInfoEntity
|
|
* @param aitagTagInfoEntity
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("修改")
|
|
|
|
|
|
|
+ @ApiOperationType("标签修改")
|
|
|
@PostMapping("/update")
|
|
@PostMapping("/update")
|
|
|
public ResultDto update(@RequestBody AitagTagInfoEntity aitagTagInfoEntity) {
|
|
public ResultDto update(@RequestBody AitagTagInfoEntity aitagTagInfoEntity) {
|
|
|
aitagTagInfoService.updateTag(aitagTagInfoEntity);
|
|
aitagTagInfoService.updateTag(aitagTagInfoEntity);
|
|
@@ -150,7 +152,7 @@ public class AitagTagInfoController {
|
|
|
* @param versionRollbackVo
|
|
* @param versionRollbackVo
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("版本回溯")
|
|
|
|
|
|
|
+ @ApiOperationType("版本回溯")
|
|
|
@PostMapping("/versionRollback")
|
|
@PostMapping("/versionRollback")
|
|
|
public ResultDto versionRollback(@RequestBody VersionRollbackVo versionRollbackVo) {
|
|
public ResultDto versionRollback(@RequestBody VersionRollbackVo versionRollbackVo) {
|
|
|
String id = aitagTagInfoService.versionRollback(versionRollbackVo);
|
|
String id = aitagTagInfoService.versionRollback(versionRollbackVo);
|
|
@@ -170,7 +172,7 @@ public class AitagTagInfoController {
|
|
|
* @param ids
|
|
* @param ids
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("删除")
|
|
|
|
|
|
|
+ @ApiOperationType("删除标签")
|
|
|
@PostMapping("/delete")
|
|
@PostMapping("/delete")
|
|
|
public ResultDto delete(@RequestBody Map<String,List> ids) {
|
|
public ResultDto delete(@RequestBody Map<String,List> ids) {
|
|
|
List<String> idsList = ids.get("ids");
|
|
List<String> idsList = ids.get("ids");
|
|
@@ -187,7 +189,7 @@ public class AitagTagInfoController {
|
|
|
* @param file
|
|
* @param file
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("批量导入")
|
|
|
|
|
|
|
+ @ApiOperationType("批量导入")
|
|
|
@PostMapping("/batchImport")
|
|
@PostMapping("/batchImport")
|
|
|
public ResultDto batchImport( @RequestParam("file") MultipartFile file,
|
|
public ResultDto batchImport( @RequestParam("file") MultipartFile file,
|
|
|
@RequestParam("reviser") String reviser,
|
|
@RequestParam("reviser") String reviser,
|
|
@@ -217,7 +219,7 @@ public class AitagTagInfoController {
|
|
|
* @param regexVo
|
|
* @param regexVo
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("生成正则表达式")
|
|
|
|
|
|
|
+ @ApiOperationType("生成正则表达式")
|
|
|
@PostMapping("/generateRegex")
|
|
@PostMapping("/generateRegex")
|
|
|
public ResultDto<String> generateRegex( @RequestBody GenerateRegexVo regexVo) throws IOException {
|
|
public ResultDto<String> generateRegex( @RequestBody GenerateRegexVo regexVo) throws IOException {
|
|
|
Map body = JSONObject.parseObject(JSONObject.toJSONString(regexVo), Map.class);
|
|
Map body = JSONObject.parseObject(JSONObject.toJSONString(regexVo), Map.class);
|
|
@@ -236,7 +238,7 @@ public class AitagTagInfoController {
|
|
|
*
|
|
*
|
|
|
* @return ResultDto
|
|
* @return ResultDto
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation("批量导入模板下载")
|
|
|
|
|
|
|
+ @ApiOperationType("批量导入模板下载")
|
|
|
@GetMapping("/downloadFile")
|
|
@GetMapping("/downloadFile")
|
|
|
public ResponseEntity<Resource> downloadFile( ) throws IOException {
|
|
public ResponseEntity<Resource> downloadFile( ) throws IOException {
|
|
|
|
|
|
|
@@ -263,4 +265,20 @@ public class AitagTagInfoController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 外部页面查询标签树,无需token
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param aitagTagInfoQueryVo
|
|
|
|
|
+ * @return ResultDto
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperationType("外部查询标签树")
|
|
|
|
|
+ @PostMapping("/queryTagTreeNoAuth")
|
|
|
|
|
+ public ResultDto<List<TagNodeVo>> queryTagTreeNoAuth(@RequestBody AitagTagInfoQueryVo aitagTagInfoQueryVo) {
|
|
|
|
|
+ if(StringUtils.isBlank(aitagTagInfoQueryVo.getCategoryId())){
|
|
|
|
|
+ throw BizException.of("E001");
|
|
|
|
|
+ }
|
|
|
|
|
+ List<TagNodeVo> tagNodeVos = aitagTagInfoService.queryTagTree(aitagTagInfoQueryVo);
|
|
|
|
|
+ return ResultDto.success(tagNodeVos);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|