Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz商业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz商业套件
iBiz商业中心
提交
d4892296
提交
d4892296
编写于
10月 29, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码,后台体系[Spring Boot]
上级
18244a38
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
62 行增加
和
0 行删除
+62
-0
Res_usersExService.java
...sscentral/core/extensions/service/Res_usersExService.java
+35
-0
res_usersFallback.java
...inesscentral/core/odoo_base/client/res_usersFallback.java
+4
-0
res_usersFeignClient.java
...sscentral/core/odoo_base/client/res_usersFeignClient.java
+4
-0
IRes_usersService.java
...nesscentral/core/odoo_base/service/IRes_usersService.java
+1
-0
Res_usersServiceImpl.java
...ral/core/odoo_base/service/impl/Res_usersServiceImpl.java
+7
-0
Res_usersResource.java
.../ibizlab/businesscentral/core/rest/Res_usersResource.java
+11
-0
未找到文件。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/extensions/service/Res_usersExService.java
0 → 100644
浏览文件 @
d4892296
package
cn
.
ibizlab
.
businesscentral
.
core
.
extensions
.
service
;
import
cn.ibizlab.businesscentral.core.odoo_base.service.impl.Res_usersServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.businesscentral.core.odoo_base.domain.Res_users
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[用户] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"Res_usersExService"
)
public
class
Res_usersExService
extends
Res_usersServiceImpl
{
@Override
protected
Class
currentModelClass
()
{
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* 自定义行为[A]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Res_users
a
(
Res_users
et
)
{
return
super
.
a
(
et
);
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_base/client/res_usersFallback.java
浏览文件 @
d4892296
...
...
@@ -64,6 +64,10 @@ public class res_usersFallback implements res_usersFeignClient{
public
Res_users
a
(
Long
id
,
Res_users
res_users
){
return
null
;
}
public
Boolean
checkKey
(
Res_users
res_users
){
return
false
;
}
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_base/client/res_usersFeignClient.java
浏览文件 @
d4892296
...
...
@@ -60,6 +60,10 @@ public interface res_usersFeignClient {
Res_users
getDraft
();
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_users/{id}/a"
)
Res_users
a
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Res_users
res_users
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_users/checkkey"
)
Boolean
checkKey
(
@RequestBody
Res_users
res_users
);
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_base/service/IRes_usersService.java
浏览文件 @
d4892296
...
...
@@ -33,6 +33,7 @@ public interface IRes_usersService extends IService<Res_users>{
void
removeBatch
(
Collection
<
Long
>
idList
)
;
Res_users
get
(
Long
key
)
;
Res_users
getDraft
(
Res_users
et
)
;
Res_users
a
(
Res_users
et
)
;
boolean
checkKey
(
Res_users
et
)
;
boolean
save
(
Res_users
et
)
;
void
saveBatch
(
List
<
Res_users
>
list
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_base/service/impl/Res_usersServiceImpl.java
浏览文件 @
d4892296
...
...
@@ -1391,6 +1391,13 @@ public class Res_usersServiceImpl extends EBSServiceImpl<Res_usersMapper, Res_us
return
et
;
}
@Override
@Transactional
public
Res_users
a
(
Res_users
et
)
{
//自定义代码
return
et
;
}
@Override
public
boolean
checkKey
(
Res_users
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
...
...
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/rest/Res_usersResource.java
浏览文件 @
d4892296
...
...
@@ -115,6 +115,17 @@ public class Res_usersResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
res_usersMapping
.
toDto
(
res_usersService
.
getDraft
(
new
Res_users
())));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_users-A-all')"
)
@ApiOperation
(
value
=
"A"
,
tags
=
{
"用户"
},
notes
=
"A"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_users/{res_users_id}/a"
)
public
ResponseEntity
<
Res_usersDTO
>
a
(
@PathVariable
(
"res_users_id"
)
Long
res_users_id
,
@RequestBody
Res_usersDTO
res_usersdto
)
{
Res_users
domain
=
res_usersMapping
.
toDomain
(
res_usersdto
);
domain
.
setId
(
res_users_id
);
domain
=
res_usersService
.
a
(
domain
);
res_usersdto
=
res_usersMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
res_usersdto
);
}
@ApiOperation
(
value
=
"检查用户"
,
tags
=
{
"用户"
},
notes
=
"检查用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_users/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
Res_usersDTO
res_usersdto
)
{
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录