Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
framework-tools
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 32026e95
authored
Jul 11, 2024
by
henry
Browse files
Options
Browse Files
Download
Plain Diff
添加知识库
2 parents
10b40879
1183ac16
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
167 additions
and
0 deletions
framework-asset/src/main/java/org/arch/overall/controller/ArchiModelDictController.java
framework-asset/src/main/java/org/arch/overall/controller/ArchiModelDictDetailController.java
framework-asset/src/main/java/org/arch/overall/controller/ArchiModelDictController.java
0 → 100644
View file @
32026e9
package
org
.
arch
.
overall
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.arch.base.Result
;
import
org.arch.common.modules.archoverall.dto.ele.ArchiModelDictDTO
;
import
org.arch.common.modules.archoverall.vo.ArchiModelDictVO
;
import
org.arch.common.modules.base.dto.BathRemoveDTO
;
import
org.arch.log.annotation.OperLog
;
import
org.arch.log.logenum.LogOperTypeEnum
;
import
org.arch.log.logenum.LogTypeEnum
;
import
org.arch.overall.service.ArchiModelDictService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 元模型数据字典 前端控制器
* </p>
*
* @author
* @since 2024-02-22
*/
@Api
(
value
=
"/archi-model-dict"
,
tags
=
{
"元模型数据字典"
})
@RestController
@RequestMapping
(
"/archi-model-dict"
)
public
class
ArchiModelDictController
{
@Autowired
private
ArchiModelDictService
archiModelDictService
;
@ApiOperation
(
value
=
"分页列表"
)
@PostMapping
(
value
=
"/"
)
//@AutoLog(value = LogEventTypeEnum.SEARCH, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.LOW)
@OperLog
(
value
=
LogOperTypeEnum
.
QUERY
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"分页列表"
,
moduleName
=
"元模型数据字典"
)
public
Result
<
IPage
<
ArchiModelDictVO
>>
page
(
@RequestBody
ArchiModelDictDTO
dto
)
{
return
Result
.
success
(
archiModelDictService
.
page
(
dto
));
}
@ApiOperation
(
value
=
"新增"
)
@PostMapping
(
value
=
"/cModelDict"
)
// @AutoLog(value = LogEventTypeEnum.INSERT, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.MIDDLE)
@OperLog
(
value
=
LogOperTypeEnum
.
ADD
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"新增"
,
moduleName
=
"元模型数据字典"
)
public
Result
create
(
@RequestBody
ArchiModelDictDTO
dto
)
{
return
Result
.
success
(
archiModelDictService
.
insert
(
dto
));
}
@ApiOperation
(
value
=
"更新"
)
@PostMapping
(
value
=
"/uModelDict"
)
// @AutoLog(value = LogEventTypeEnum.UPDATE, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.MIDDLE)
@OperLog
(
value
=
LogOperTypeEnum
.
UPDATE
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"更新"
,
moduleName
=
"元模型数据字典"
)
public
Result
update
(
@RequestBody
ArchiModelDictDTO
dto
)
{
return
Result
.
success
(
archiModelDictService
.
update
(
dto
));
}
@ApiOperation
(
value
=
"详情"
)
@PostMapping
(
value
=
"/dModelDict"
)
// @AutoLog(value = LogEventTypeEnum.SEARCH, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.LOW)
@OperLog
(
value
=
LogOperTypeEnum
.
UPDATE
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"详情"
,
moduleName
=
"元模型数据字典"
)
public
Result
<
IPage
<
ArchiModelDictVO
>>
detail
(
@RequestBody
ArchiModelDictDTO
dto
)
{
return
Result
.
success
(
archiModelDictService
.
detail
(
dto
));
}
@ApiOperation
(
value
=
"发布/停用"
)
@PostMapping
(
value
=
"/pModelDict"
)
//@AutoLog(value = LogEventTypeEnum.UPDATE, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.MIDDLE)
@OperLog
(
value
=
LogOperTypeEnum
.
UPDATE
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"发布/停用"
,
moduleName
=
"元模型数据字典"
)
public
Result
<
IPage
<
ArchiModelDictVO
>>
post
(
@RequestBody
ArchiModelDictDTO
dto
)
{
return
Result
.
success
(
archiModelDictService
.
post
(
dto
));
}
@ApiOperation
(
value
=
"删除"
)
@PostMapping
(
value
=
"/del"
)
//@AutoLog(value = LogEventTypeEnum.DELETE, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.HIGH)
@OperLog
(
value
=
LogOperTypeEnum
.
DELETE
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"删除"
,
moduleName
=
"元模型数据字典"
)
public
Result
delete
(
@RequestBody
BathRemoveDTO
model
)
{
return
archiModelDictService
.
del
(
model
)
?
Result
.
success
(
"删除成功"
)
:
Result
.
error
(
"删除失败"
);
}
}
framework-asset/src/main/java/org/arch/overall/controller/ArchiModelDictDetailController.java
0 → 100644
View file @
32026e9
package
org
.
arch
.
overall
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.arch.base.Result
;
import
org.arch.common.modules.archoverall.dto.ele.ArchiModelDictDTO
;
import
org.arch.common.modules.archoverall.dto.ele.ArchiModelDictDetailDTO
;
import
org.arch.common.modules.base.dto.BathRemoveDTO
;
import
org.arch.log.annotation.OperLog
;
import
org.arch.log.logenum.LogOperTypeEnum
;
import
org.arch.log.logenum.LogTypeEnum
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.arch.overall.service.ArchiModelDictDetailService
;
import
java.util.List
;
/**
* <p>
* 元模型数据字典详情 前端控制器
* </p>
*
* @author
* @since 2024-02-22
*/
@Api
(
value
=
"/archi-model-dict"
,
tags
=
{
"元模型数据字典详情"
})
@RestController
@RequestMapping
(
"/archi-model-dict-detail"
)
public
class
ArchiModelDictDetailController
{
@Autowired
private
ArchiModelDictDetailService
service
;
@ApiOperation
(
value
=
"新增"
)
@PostMapping
(
value
=
"/cModelDict"
)
//@AutoLog(value = LogEventTypeEnum.INSERT, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.MIDDLE)
@OperLog
(
value
=
LogOperTypeEnum
.
ADD
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"新增"
,
moduleName
=
"元模型数据字典详情"
)
public
Result
create
(
@RequestBody
List
<
ArchiModelDictDetailDTO
>
dto
)
{
return
Result
.
success
(
service
.
insert
(
dto
));
}
@ApiOperation
(
value
=
"更新"
)
@PostMapping
(
value
=
"/uModelDict"
)
//@AutoLog(value = LogEventTypeEnum.UPDATE, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.MIDDLE)
@OperLog
(
value
=
LogOperTypeEnum
.
UPDATE
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"更新"
,
moduleName
=
"元模型数据字典详情"
)
public
Result
update
(
@RequestBody
ArchiModelDictDetailDTO
dto
)
{
return
Result
.
success
(
service
.
update
(
dto
));
}
@ApiOperation
(
value
=
"删除"
)
@PostMapping
(
value
=
"/del"
)
//@AutoLog(value = LogEventTypeEnum.DELETE, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.HIGH)
@OperLog
(
value
=
LogOperTypeEnum
.
DELETE
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"删除"
,
moduleName
=
"元模型数据字典详情"
)
public
Result
delete
(
@RequestBody
BathRemoveDTO
model
)
{
return
service
.
del
(
model
)
?
Result
.
success
(
"删除成功"
)
:
Result
.
error
(
"删除失败"
);
}
@ApiOperation
(
value
=
"获取字典所有key"
)
@PostMapping
(
value
=
"/gAllDictKey"
)
//@AutoLog(value = LogEventTypeEnum.SEARCH, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.LOW)
@OperLog
(
value
=
LogOperTypeEnum
.
QUERY
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"获取字典所有key"
,
moduleName
=
"元模型数据字典详情"
)
public
Result
<
Object
>
getDictByKey
()
{
return
Result
.
success
(
service
.
getAllDict
());
}
@ApiOperation
(
value
=
"根据字典标识取字典"
)
@PostMapping
(
value
=
"/gDictByKey"
)
//@AutoLog(value = LogEventTypeEnum.SEARCH, LogTypeValue = LogTypeEnum.BUSI_LOG, LogLevValue = LogLevEnum.LOW)
@OperLog
(
value
=
LogOperTypeEnum
.
QUERY
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"根据字典标识取字典"
,
moduleName
=
"元模型数据字典详情"
)
public
Result
getDictByKey
(
@RequestBody
ArchiModelDictDTO
model
)
{
String
key
=
model
.
getTypeValue
();
return
Result
.
success
(
service
.
getDictDetails
(
key
));
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment