Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdict
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdict
提交
f679b40d
提交
f679b40d
编写于
4月 17, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
7cffb530
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
19 行删除
+8
-19
IBZDictResource.java
.../cn/ibizlab/service/dictapi/resource/IBZDictResource.java
+8
-19
未找到文件。
ibzdict-provider/ibzdict-provider-dictapi/src/main/java/cn/ibizlab/service/dictapi/resource/IBZDictResource.java
浏览文件 @
f679b40d
...
@@ -35,7 +35,7 @@ import cn.ibizlab.core.dict.filter.IBZDictSearchContext;
...
@@ -35,7 +35,7 @@ import cn.ibizlab.core.dict.filter.IBZDictSearchContext;
import
cn.ibizlab.core.dict.service.mapping.IBZDictMapping
;
import
cn.ibizlab.core.dict.service.mapping.IBZDictMapping
;
import
cn.ibizlab.
service.dictapi
.dto.IBZDictItemDTO
;
import
cn.ibizlab.
core.dict.service
.dto.IBZDictItemDTO
;
import
cn.ibizlab.core.dict.domain.IBZDictItem
;
import
cn.ibizlab.core.dict.domain.IBZDictItem
;
import
cn.ibizlab.core.dict.service.IIBZDictItemService
;
import
cn.ibizlab.core.dict.service.IIBZDictItemService
;
...
@@ -59,7 +59,7 @@ public class IBZDictResource {
...
@@ -59,7 +59,7 @@ public class IBZDictResource {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}"
)
public
ResponseEntity
<
IBZDictDTO
>
get
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
)
{
public
ResponseEntity
<
IBZDictDTO
>
get
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
)
{
IBZDict
domain
=
ibzdictService
.
get
(
ibzdict_id
);
IBZDict
domain
=
ibzdictService
.
get
(
ibzdict_id
);
IBZDictDTO
dto
=
IBZDictMapping
.
MAPPER
.
toDto
(
domain
);
IBZDictDTO
dto
=
ibzdictMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
...
@@ -77,7 +77,7 @@ public class IBZDictResource {
...
@@ -77,7 +77,7 @@ public class IBZDictResource {
@ApiOperation
(
value
=
"CheckKey"
,
tags
=
{
"IBZDict"
},
notes
=
"CheckKey"
)
@ApiOperation
(
value
=
"CheckKey"
,
tags
=
{
"IBZDict"
},
notes
=
"CheckKey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dictapi/ibzdicts/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dictapi/ibzdicts/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
IBZDictDTO
ibzdictdto
)
{
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
IBZDictDTO
ibzdictdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdictService
.
checkKey
(
ibzdictMapping
.
toDomain
(
itemCodeNameLC
+
"dto"
))
);
}
}
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"IBZDict"
},
notes
=
"GetDraft"
)
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"IBZDict"
},
notes
=
"GetDraft"
)
...
@@ -90,10 +90,10 @@ public class IBZDictResource {
...
@@ -90,10 +90,10 @@ public class IBZDictResource {
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}"
)
@Transactional
@Transactional
public
ResponseEntity
<
IBZDictDTO
>
update
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
@RequestBody
IBZDictDTO
ibzdictdto
)
{
public
ResponseEntity
<
IBZDictDTO
>
update
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
,
@RequestBody
IBZDictDTO
ibzdictdto
)
{
IBZDict
domain
=
IBZDictMapping
.
MAPPER
.
toDomain
(
ibzdictdto
);
IBZDict
domain
=
ibzdictMapping
.
toDomain
(
ibzdictdto
);
domain
.
setDict
I
d
(
ibzdict_id
);
domain
.
setDict
i
d
(
ibzdict_id
);
ibzdictService
.
update
(
domain
);
ibzdictService
.
update
(
domain
);
IBZDictDTO
dto
=
IBZDictMapping
.
MAPPER
.
toDto
(
domain
);
IBZDictDTO
dto
=
ibzdictMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
...
@@ -101,25 +101,14 @@ public class IBZDictResource {
...
@@ -101,25 +101,14 @@ public class IBZDictResource {
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}"
)
@Transactional
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
)
{
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"ibzdict_id"
)
String
ibzdict_id
)
{
IBZDictDTO
ibzdictdto
=
new
IBZDictDTO
();
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdictService
.
remove
(
ibzdict_id
));
IBZDict
domain
=
new
IBZDict
();
ibzdictdto
.
setDictId
(
ibzdict_id
);
domain
.
setDictId
(
ibzdict_id
);
Boolean
rst
=
ibzdictService
.
remove
(
domain
.
getDictId
());
if
(
rst
){
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
rst
);
}
else
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
rst
);
}
}
}
//SAVE
//SAVE
@ApiOperation
(
value
=
"Save"
,
tags
=
{
"IBZDict"
},
notes
=
"Save"
)
@ApiOperation
(
value
=
"Save"
,
tags
=
{
"IBZDict"
},
notes
=
"Save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dictapi/ibzdicts/{ibzdict_id}/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
IBZDictDTO
ibzdictdto
)
{
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
IBZDictDTO
ibzdictdto
)
{
IBZDict
ibzdict
=
IBZDictMapping
.
MAPPER
.
toDomain
(
ibzdictdto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdictService
.
save
(
ibzdictMapping
.
toDomain
(
ibzdictdto
)));
Boolean
b
=
ibzdictService
.
save
(
ibzdict
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
b
);
}
}
//9
//9
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录