Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cloud-account
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.account
pica-cloud-account
提交
3d91da5a
提交
3d91da5a
编写于
3月 05, 2022
作者:
wenhao.qin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix --根据测试xmind文档(自测功能)
上级
9a7816d1
流水线
#43018
已取消 于阶段
变更
3
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
9 行增加
和
7 行删除
+9
-7
HospitalSaasRoleController.java
...account/server/controller/HospitalSaasRoleController.java
+5
-4
HospitalSaasRoleServiceImpl.java
...ount/server/service/impl/HospitalSaasRoleServiceImpl.java
+3
-2
PermissionRoleMapper.xml
server/src/main/resources/mybatis/PermissionRoleMapper.xml
+1
-1
未找到文件。
server/src/main/java/com/pica/cloud/account/account/server/controller/HospitalSaasRoleController.java
浏览文件 @
3d91da5a
...
@@ -21,12 +21,13 @@ import org.springframework.web.bind.annotation.*;
...
@@ -21,12 +21,13 @@ import org.springframework.web.bind.annotation.*;
*/
*/
@Api
(
description
=
"机构saas角色资源"
)
@Api
(
description
=
"机构saas角色资源"
)
@RestController
@RestController
@RequestMapping
(
"/hospital"
)
public
class
HospitalSaasRoleController
extends
AccountBaseController
{
public
class
HospitalSaasRoleController
extends
AccountBaseController
{
@Autowired
@Autowired
HospitalSaasRoleService
hospitalSaasRoleService
;
HospitalSaasRoleService
hospitalSaasRoleService
;
@ApiOperation
(
"机构saas角色-新增或更新"
)
@ApiOperation
(
"机构saas角色-新增或更新"
)
@PostMapping
(
value
=
"/
hospital/
role/insertAndModify"
)
@PostMapping
(
value
=
"/role/insertAndModify"
)
@EnabledLoginValidate
@EnabledLoginValidate
public
PicaResponse
<
Integer
>
insertAndModify
(
@Validated
@RequestBody
HospitalRoleDetailReq
req
)
{
public
PicaResponse
<
Integer
>
insertAndModify
(
@Validated
@RequestBody
HospitalRoleDetailReq
req
)
{
PicaUser
user
=
fetchPicaUser
();
PicaUser
user
=
fetchPicaUser
();
...
@@ -34,7 +35,7 @@ public class HospitalSaasRoleController extends AccountBaseController {
...
@@ -34,7 +35,7 @@ public class HospitalSaasRoleController extends AccountBaseController {
}
}
@ApiOperation
(
"机构saas角色-删除"
)
@ApiOperation
(
"机构saas角色-删除"
)
@DeleteMapping
(
value
=
"/
hospital/
role/delete/{id}"
)
@DeleteMapping
(
value
=
"/role/delete/{id}"
)
@EnabledLoginValidate
@EnabledLoginValidate
public
PicaResponse
<
Integer
>
delete
(
@PathVariable
(
"id"
)
Long
id
)
{
public
PicaResponse
<
Integer
>
delete
(
@PathVariable
(
"id"
)
Long
id
)
{
PicaUser
user
=
fetchPicaUser
();
PicaUser
user
=
fetchPicaUser
();
...
@@ -42,7 +43,7 @@ public class HospitalSaasRoleController extends AccountBaseController {
...
@@ -42,7 +43,7 @@ public class HospitalSaasRoleController extends AccountBaseController {
}
}
@ApiOperation
(
"机构saas平台角色列表"
)
@ApiOperation
(
"机构saas平台角色列表"
)
@PostMapping
(
value
=
"/
hospital/
role/listByPage"
)
@PostMapping
(
value
=
"/role/listByPage"
)
@EnabledLoginValidate
@EnabledLoginValidate
public
PicaResponse
<
HospitalRoleResp
>
listByPage
(
@RequestBody
HospitalRoleListReq
req
)
{
public
PicaResponse
<
HospitalRoleResp
>
listByPage
(
@RequestBody
HospitalRoleListReq
req
)
{
HospitalRoleResp
hospitalRoleResp
=
hospitalSaasRoleService
.
listByPage
(
req
);
HospitalRoleResp
hospitalRoleResp
=
hospitalSaasRoleService
.
listByPage
(
req
);
...
@@ -51,7 +52,7 @@ public class HospitalSaasRoleController extends AccountBaseController {
...
@@ -51,7 +52,7 @@ public class HospitalSaasRoleController extends AccountBaseController {
@ApiOperation
(
"机构saas角色-角色详情"
)
@ApiOperation
(
"机构saas角色-角色详情"
)
@GetMapping
(
value
=
"/
hospital/
role/getRoleDetail/{id}"
)
@GetMapping
(
value
=
"/role/getRoleDetail/{id}"
)
@EnabledLoginValidate
@EnabledLoginValidate
public
PicaResponse
<
HospitalRoleDetailDto
>
getRoleDetail
(
@PathVariable
(
"id"
)
Long
id
)
{
public
PicaResponse
<
HospitalRoleDetailDto
>
getRoleDetail
(
@PathVariable
(
"id"
)
Long
id
)
{
return
PicaResponse
.
toResponse
(
hospitalSaasRoleService
.
getRoleDetail
(
id
));
return
PicaResponse
.
toResponse
(
hospitalSaasRoleService
.
getRoleDetail
(
id
));
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/HospitalSaasRoleServiceImpl.java
浏览文件 @
3d91da5a
...
@@ -39,7 +39,7 @@ public class HospitalSaasRoleServiceImpl implements HospitalSaasRoleService {
...
@@ -39,7 +39,7 @@ public class HospitalSaasRoleServiceImpl implements HospitalSaasRoleService {
throw
new
PicaWarnException
(
PicaResultCode
.
DATA_EXCEPTION
.
code
(),
"姓名长度≤16字符"
);
throw
new
PicaWarnException
(
PicaResultCode
.
DATA_EXCEPTION
.
code
(),
"姓名长度≤16字符"
);
}
}
if
(
StringUtils
.
is
Empty
(
req
.
getRemark
())
||
req
.
getName
().
trim
().
length
()
>
100
)
{
if
(
StringUtils
.
is
NotEmpty
(
req
.
getRemark
())
&&
req
.
getName
().
trim
().
length
()
>
100
)
{
throw
new
PicaWarnException
(
PicaResultCode
.
DATA_EXCEPTION
.
code
(),
"备注长度≤100字符"
);
throw
new
PicaWarnException
(
PicaResultCode
.
DATA_EXCEPTION
.
code
(),
"备注长度≤100字符"
);
}
}
...
@@ -87,7 +87,8 @@ public class HospitalSaasRoleServiceImpl implements HospitalSaasRoleService {
...
@@ -87,7 +87,8 @@ public class HospitalSaasRoleServiceImpl implements HospitalSaasRoleService {
map
.
put
(
"pageSize"
,
req
.
getPageSize
());
map
.
put
(
"pageSize"
,
req
.
getPageSize
());
List
<
HospitalRoleDto
>
roleDtos
=
permissionRoleMapper
.
listByPage
(
map
);
List
<
HospitalRoleDto
>
roleDtos
=
permissionRoleMapper
.
listByPage
(
map
);
for
(
HospitalRoleDto
roleDto
:
roleDtos
)
{
for
(
HospitalRoleDto
roleDto
:
roleDtos
)
{
if
(
Objects
.
equals
(
roleDto
.
getRoleId
(),
SaasRoleEnum
.
SAAS_MAIN_ADMIN
.
getCode
()))
{
if
(
Objects
.
equals
(
roleDto
.
getRoleId
(),
SaasRoleEnum
.
SAAS_MAIN_ADMIN
.
getCode
())
||
Objects
.
equals
(
roleDto
.
getRoleId
(),
SaasRoleEnum
.
SAAS_DOCTOR
.
getCode
()))
{
roleDto
.
setAdminSaasFlag
(
1
);
roleDto
.
setAdminSaasFlag
(
1
);
}
}
}
}
...
...
server/src/main/resources/mybatis/PermissionRoleMapper.xml
浏览文件 @
3d91da5a
...
@@ -151,7 +151,7 @@
...
@@ -151,7 +151,7 @@
)
)
</if>
</if>
<if
test=
"name != null and name != ''"
>
<if
test=
"name != null and name != ''"
>
and pr.role_name like concat(
trim(#{name,jdbcType=VARCHAR})
,'%')
and pr.role_name like concat(
#{name,jdbcType=VARCHAR}
,'%')
</if>
</if>
</sql>
</sql>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录