资产授权
parent
4c65e34042
commit
8ed8f6ebcf
|
@ -131,7 +131,7 @@ public class DataRunNameController {
|
||||||
authorization.setUserId(req.getUserId());
|
authorization.setUserId(req.getUserId());
|
||||||
authorization.setTableId(req.getTableId());
|
authorization.setTableId(req.getTableId());
|
||||||
authorization.setBasicId(req.getBasicId());
|
authorization.setBasicId(req.getBasicId());
|
||||||
boolean save = assetAuthorizationService.save(authorization);
|
boolean save = dataRunNameService.addUserAssetAuthorization(authorization);
|
||||||
return save?Result.success():Result.error();
|
return save?Result.success():Result.error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ public class DataRunNameController {
|
||||||
authorization.setDeptId(req.getDeptId());
|
authorization.setDeptId(req.getDeptId());
|
||||||
authorization.setTableId(req.getTableId());
|
authorization.setTableId(req.getTableId());
|
||||||
authorization.setBasicId(req.getBasicId());
|
authorization.setBasicId(req.getBasicId());
|
||||||
boolean save = assetAuthorizationService.save(authorization);
|
boolean save = dataRunNameService.addDeptAssetAuthorization(authorization);
|
||||||
return save?Result.success():Result.error();
|
return save?Result.success():Result.error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,4 +45,18 @@ public interface DataRunNameMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<AssetAuthorization> findTableIdAndBasicIdByDeptId(Long deptId);
|
List<AssetAuthorization> findTableIdAndBasicIdByDeptId(Long deptId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加用户权限的信息
|
||||||
|
* @param authorization 相应参数
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
Integer addUserAssetAuthorization(AssetAuthorization authorization);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加部门权限的信息
|
||||||
|
* @param authorization 响应参数
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
Integer addDeptAssetAuthorization(AssetAuthorization authorization);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,4 +65,18 @@ public interface DataRunNameService {
|
||||||
* @return 返回结果
|
* @return 返回结果
|
||||||
*/
|
*/
|
||||||
List<TableNames> extractDataTableNames(AssetAuthorization assetAuthorization);
|
List<TableNames> extractDataTableNames(AssetAuthorization assetAuthorization);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加用户权限的信息
|
||||||
|
* @param req 相应参数
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
boolean addUserAssetAuthorization(AssetAuthorization authorization);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加部门权限的信息
|
||||||
|
* @param authorization 响应参数
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
boolean addDeptAssetAuthorization(AssetAuthorization authorization);
|
||||||
}
|
}
|
||||||
|
|
|
@ -480,4 +480,32 @@ public class DataRunNameServiceImpl implements DataRunNameService {
|
||||||
.toList();
|
.toList();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加用户权限的信息
|
||||||
|
* @param authorization 相应参数
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean addUserAssetAuthorization(AssetAuthorization authorization) {
|
||||||
|
Integer add = dataRunNameMapper.addUserAssetAuthorization(authorization);
|
||||||
|
if (add>0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加部门权限的信息
|
||||||
|
* @param authorization 响应参数
|
||||||
|
* @return 返回结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean addDeptAssetAuthorization(AssetAuthorization authorization) {
|
||||||
|
Integer add = dataRunNameMapper.addDeptAssetAuthorization(authorization);
|
||||||
|
if (add>0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,18 @@
|
||||||
( #{init.name},#{init.dataId})
|
( #{init.name},#{init.dataId})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
<insert id="addUserAssetAuthorization">
|
||||||
|
INSERT INTO `h6_cloud_server`.`asset_authorization`
|
||||||
|
( `table_id`, `dept_id`, `basic_id`, `user_id`)
|
||||||
|
VALUES
|
||||||
|
( #{tableId}, #{deptId}, #{basicId}, #{userId});
|
||||||
|
</insert>
|
||||||
|
<insert id="addDeptAssetAuthorization">
|
||||||
|
INSERT INTO `h6_cloud_server`.`asset_authorization`
|
||||||
|
( `table_id`, `dept_id`, `basic_id`, `user_id`)
|
||||||
|
VALUES
|
||||||
|
( #{tableId}, #{deptId}, #{basicId}, #{userId});
|
||||||
|
</insert>
|
||||||
|
|
||||||
<select id="selectDeptList" parameterType="com.muyu.common.system.domain.SysDept" resultMap="SysDeptResult">
|
<select id="selectDeptList" parameterType="com.muyu.common.system.domain.SysDept" resultMap="SysDeptResult">
|
||||||
<include refid="selectDeptVo"/>
|
<include refid="selectDeptVo"/>
|
||||||
|
|
Loading…
Reference in New Issue