提交 94549211 编写于 作者: ibizdev's avatar ibizdev

laizhilong 发布系统代码

上级 3ab9ae7b
...@@ -717,6 +717,140 @@ mock.onGet(new RegExp(/^\/sys_role_permissions\/fetchdefault(\?[\w-./?%&=,]*)*$/ ...@@ -717,6 +717,140 @@ mock.onGet(new RegExp(/^\/sys_role_permissions\/fetchdefault(\?[\w-./?%&=,]*)*$/
return [status, records ? records : []]; return [status, records ? records : []];
}); });
// FetchPermissionenable1
mock.onGet(new RegExp(/^\/sys_roles\/([a-zA-Z0-9\-\;]{1,35})\/sys_role_permissions\/fetchpermissionenable1$/)).reply((config: any) => {
console.groupCollapsed("实体:sys_role_permission 方法: FetchPermissionenable1");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['roleid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/sys_roles\/([a-zA-Z0-9\-\;]{1,35})\/sys_role_permissions\/fetchpermissionenable1$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchPermissionenable1
mock.onGet(new RegExp(/^\/sys_permissions\/([a-zA-Z0-9\-\;]{1,35})\/sys_role_permissions\/fetchpermissionenable1$/)).reply((config: any) => {
console.groupCollapsed("实体:sys_role_permission 方法: FetchPermissionenable1");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['permissionid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/sys_permissions\/([a-zA-Z0-9\-\;]{1,35})\/sys_role_permissions\/fetchpermissionenable1$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchPermissionenable1
mock.onGet(new RegExp(/^\/sys_role_permissions\/fetchpermissionenable1$/)).reply((config: any) => {
console.groupCollapsed("实体:sys_role_permission 方法: FetchPermissionenable1");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchPermissionenable1
mock.onGet(new RegExp(/^\/sys_role_permissions\/fetchpermissionenable1(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:sys_role_permission 方法: FetchPermissionenable1");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
loaddraftAction="" loaddraftAction=""
loadAction="" loadAction=""
createAction="" createAction=""
fetchAction="FetchDefault" fetchAction="FetchPermissionenable1"
:newdata="newdata" :newdata="newdata"
:opendata="opendata" :opendata="opendata"
name="grid" name="grid"
......
...@@ -244,4 +244,26 @@ export default class SYS_ROLE_PERMISSIONServiceBase extends EntityService { ...@@ -244,4 +244,26 @@ export default class SYS_ROLE_PERMISSIONServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/sys_role_permissions/fetchdefault`,tempData,isloading); return Http.getInstance().get(`/sys_role_permissions/fetchdefault`,tempData,isloading);
} }
/**
* FetchPermissionenable1接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SYS_ROLE_PERMISSIONServiceBase
*/
public async FetchPermissionenable1(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sys_role && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/sys_roles/${context.sys_role}/sys_role_permissions/fetchpermissionenable1`,tempData,isloading);
}
if(context.sys_permission && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/sys_permissions/${context.sys_permission}/sys_role_permissions/fetchpermissionenable1`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/sys_role_permissions/fetchpermissionenable1`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -37,11 +37,6 @@ ...@@ -37,11 +37,6 @@
git clone -b master $para2 ibzuaa/ git clone -b master $para2 ibzuaa/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzuaa/ cd ibzuaa/
mvn clean package -Pweb
cd ibzuaa-app/ibzuaa-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-app-web.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-app-web.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-app-web.jar
EXPOSE 30002 EXPOSE 8080
ADD ibzuaa-app-web.jar /ibzuaa-app-web.jar ADD ibzuaa-app-web.jar /ibzuaa-app-web.jar
...@@ -3,23 +3,9 @@ services: ...@@ -3,23 +3,9 @@ services:
ibzuaa-app-web: ibzuaa-app-web:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-app-web:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-app-web:latest
ports: ports:
- "30002:30002" - "8080:8080"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=30002
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
- SPRING_REDIS_HOST=172.16.100.243
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
- SPRING_DATASOURCE_PASSWORD=@6dEfb3@
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- ABC=1
- DEC=2
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 1
......
...@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject;
public interface SYS_ROLE_PERMISSIONMapper extends BaseMapper<SYS_ROLE_PERMISSION>{ public interface SYS_ROLE_PERMISSIONMapper extends BaseMapper<SYS_ROLE_PERMISSION>{
Page<SYS_ROLE_PERMISSION> searchDefault(IPage page, @Param("srf") SYS_ROLE_PERMISSIONSearchContext context, @Param("ew") Wrapper<SYS_ROLE_PERMISSION> wrapper) ; Page<SYS_ROLE_PERMISSION> searchDefault(IPage page, @Param("srf") SYS_ROLE_PERMISSIONSearchContext context, @Param("ew") Wrapper<SYS_ROLE_PERMISSION> wrapper) ;
Page<SYS_ROLE_PERMISSION> searchPermissionenable1(IPage page, @Param("srf") SYS_ROLE_PERMISSIONSearchContext context, @Param("ew") Wrapper<SYS_ROLE_PERMISSION> wrapper) ;
@Override @Override
SYS_ROLE_PERMISSION selectById(Serializable id); SYS_ROLE_PERMISSION selectById(Serializable id);
@Override @Override
......
...@@ -36,6 +36,7 @@ public interface ISYS_ROLE_PERMISSIONService extends IService<SYS_ROLE_PERMISSIO ...@@ -36,6 +36,7 @@ public interface ISYS_ROLE_PERMISSIONService extends IService<SYS_ROLE_PERMISSIO
boolean update(SYS_ROLE_PERMISSION et) ; boolean update(SYS_ROLE_PERMISSION et) ;
void updateBatch(List<SYS_ROLE_PERMISSION> list) ; void updateBatch(List<SYS_ROLE_PERMISSION> list) ;
Page<SYS_ROLE_PERMISSION> searchDefault(SYS_ROLE_PERMISSIONSearchContext context) ; Page<SYS_ROLE_PERMISSION> searchDefault(SYS_ROLE_PERMISSIONSearchContext context) ;
Page<SYS_ROLE_PERMISSION> searchPermissionenable1(SYS_ROLE_PERMISSIONSearchContext context) ;
List<SYS_ROLE_PERMISSION> selectByPermissionid(String permissionid) ; List<SYS_ROLE_PERMISSION> selectByPermissionid(String permissionid) ;
void removeByPermissionid(String permissionid) ; void removeByPermissionid(String permissionid) ;
void saveByPermissionid(String permissionid,List<SYS_ROLE_PERMISSION> list) ; void saveByPermissionid(String permissionid,List<SYS_ROLE_PERMISSION> list) ;
......
...@@ -236,6 +236,15 @@ public class SYS_ROLE_PERMISSIONServiceImpl extends ServiceImpl<SYS_ROLE_PERMISS ...@@ -236,6 +236,15 @@ public class SYS_ROLE_PERMISSIONServiceImpl extends ServiceImpl<SYS_ROLE_PERMISS
return new PageImpl<SYS_ROLE_PERMISSION>(pages.getRecords(), context.getPageable(), pages.getTotal()); return new PageImpl<SYS_ROLE_PERMISSION>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
/**
* 查询集合 permissionenable1
*/
@Override
public Page<SYS_ROLE_PERMISSION> searchPermissionenable1(SYS_ROLE_PERMISSIONSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SYS_ROLE_PERMISSION> pages=baseMapper.searchPermissionenable1(context.getPages(),context,context.getSelectCond());
return new PageImpl<SYS_ROLE_PERMISSION>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/** /**
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 --> <!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-49-2"> <changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-58-2">
<createTable tableName="IBZROLE_PERMISSION"> <createTable tableName="IBZROLE_PERMISSION">
<column name="SYS_ROLE_PERMISSIONID" remarks="" type="VARCHAR(100)"> <column name="SYS_ROLE_PERMISSIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_PERMISSION_SYS_ROL"/> <constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_PERMISSION_SYS_ROL"/>
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
<!--输出实体[SYS_PSDEOPPRIV]外键关系 --> <!--输出实体[SYS_PSDEOPPRIV]外键关系 -->
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 --> <!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_role_permission-49-10"> <changeSet author="a_A_5d9d78509" id="fk-sys_role_permission-58-10">
<addForeignKeyConstraint baseColumnNames="SYS_PERMISSIONID" baseTableName="IBZROLE_PERMISSION" constraintName="DER1N_SYS_ROLE_PERMISSION_SYS_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_PERMISSIONID" referencedTableName="IBZPERMISSION" validate="true"/> <addForeignKeyConstraint baseColumnNames="SYS_PERMISSIONID" baseTableName="IBZROLE_PERMISSION" constraintName="DER1N_SYS_ROLE_PERMISSION_SYS_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_PERMISSIONID" referencedTableName="IBZPERMISSION" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[SYS_USER]外键关系 --> <!--输出实体[SYS_USER]外键关系 -->
......
...@@ -45,11 +45,27 @@ ...@@ -45,11 +45,27 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if> <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select> </select>
<!--数据集合[Permissionenable1]-->
<select id="searchPermissionenable1" parameterType="cn.ibizlab.core.uaa.filter.SYS_ROLE_PERMISSIONSearchContext" resultMap="SYS_ROLE_PERMISSIONResultMap">
select t1.* from (
<include refid="Permissionenable1" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`SYSTEMID`, t1.`SYS_PERMISSIONID`, t1.`SYS_PERMISSIONNAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`SYS_ROLE_PERMISSIONID`, t1.`SYS_ROLE_PERMISSIONNAME`, t1.`UPDATEDATE` FROM `IBZROLE_PERMISSION` t1 <![CDATA[ SELECT t1.`CREATEDATE`, t1.`SYSTEMID`, t1.`SYS_PERMISSIONID`, t1.`SYS_PERMISSIONNAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`SYS_ROLE_PERMISSIONID`, t1.`SYS_ROLE_PERMISSIONNAME`, t1.`UPDATEDATE` FROM `IBZROLE_PERMISSION` t1
]]> ]]>
</sql> </sql>
<!--数据查询[Permissionenable1]-->
<sql id="Permissionenable1" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`SYSTEMID`, t1.`SYS_PERMISSIONID`, t1.`SYS_PERMISSIONNAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`SYS_ROLE_PERMISSIONID`, t1.`SYS_ROLE_PERMISSIONNAME`, t1.`UPDATEDATE` FROM `IBZROLE_PERMISSION` t1 LEFT JOIN IBZPERMISSION t11 ON t1.SYS_PERMISSIONID = t11.SYS_PERMISSIONID
WHERE ( t11.enable=1 )
]]>
</sql>
</mapper> </mapper>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"dename":"SYS_ROLE_PERMISSION", "dename":"SYS_ROLE_PERMISSION",
"delogicname":"角色权限关系", "delogicname":"角色权限关系",
"sysmoudle":{"id":"UAA","name":"uaa"}, "sysmoudle":{"id":"UAA","name":"uaa"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}], "dedataset":[{"id":"Default" , "name":"DEFAULT"},{"id":"Permissionenable1" , "name":"permissionenable1"}],
"deaction":[{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" }], "deaction":[{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}] "datascope":[{"id":"all","name":"全部数据"}]
} }
......
...@@ -80,7 +80,7 @@ public class SYS_PERMISSIONResource { ...@@ -80,7 +80,7 @@ public class SYS_PERMISSIONResource {
@PreAuthorize("hasPermission('Remove',{#sys_permission_id,{this.getEntity(),'Sql'}})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PERMISSION-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SYS_PERMISSION" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SYS_PERMISSION" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sys_permissions/{sys_permission_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sys_permissions/{sys_permission_id}")
@Transactional @Transactional
...@@ -98,7 +98,7 @@ public class SYS_PERMISSIONResource { ...@@ -98,7 +98,7 @@ public class SYS_PERMISSIONResource {
@PreAuthorize("hasPermission(#sys_permission_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PERMISSION-Update-all')")
@ApiOperation(value = "Update", tags = {"SYS_PERMISSION" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SYS_PERMISSION" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_permissions/{sys_permission_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sys_permissions/{sys_permission_id}")
@Transactional @Transactional
...@@ -110,7 +110,7 @@ public class SYS_PERMISSIONResource { ...@@ -110,7 +110,7 @@ public class SYS_PERMISSIONResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(#sys_permission_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PERMISSION-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SYS_PERMISSION" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SYS_PERMISSION" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_permissions/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sys_permissions/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_PERMISSIONDTO> sys_permissiondtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_PERMISSIONDTO> sys_permissiondtos) {
...@@ -121,7 +121,7 @@ public class SYS_PERMISSIONResource { ...@@ -121,7 +121,7 @@ public class SYS_PERMISSIONResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PERMISSION-Create-all')")
@ApiOperation(value = "Create", tags = {"SYS_PERMISSION" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SYS_PERMISSION" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sys_permissions") @RequestMapping(method = RequestMethod.POST, value = "/sys_permissions")
@Transactional @Transactional
...@@ -131,8 +131,7 @@ public class SYS_PERMISSIONResource { ...@@ -131,8 +131,7 @@ public class SYS_PERMISSIONResource {
SYS_PERMISSIONDTO dto = sys_permissionMapping.toDto(domain); SYS_PERMISSIONDTO dto = sys_permissionMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PERMISSION-Create-all')")
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@ApiOperation(value = "createBatch", tags = {"SYS_PERMISSION" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SYS_PERMISSION" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sys_permissions/batch") @RequestMapping(method = RequestMethod.POST, value = "/sys_permissions/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_PERMISSIONDTO> sys_permissiondtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_PERMISSIONDTO> sys_permissiondtos) {
...@@ -152,7 +151,7 @@ public class SYS_PERMISSIONResource { ...@@ -152,7 +151,7 @@ public class SYS_PERMISSIONResource {
@PreAuthorize("hasPermission(#sys_permission_id,'Get',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PERMISSION-Get-all')")
@ApiOperation(value = "Get", tags = {"SYS_PERMISSION" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SYS_PERMISSION" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sys_permissions/{sys_permission_id}") @RequestMapping(method = RequestMethod.GET, value = "/sys_permissions/{sys_permission_id}")
public ResponseEntity<SYS_PERMISSIONDTO> get(@PathVariable("sys_permission_id") String sys_permission_id) { public ResponseEntity<SYS_PERMISSIONDTO> get(@PathVariable("sys_permission_id") String sys_permission_id) {
...@@ -161,7 +160,7 @@ public class SYS_PERMISSIONResource { ...@@ -161,7 +160,7 @@ public class SYS_PERMISSIONResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PERMISSION-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SYS_PERMISSION" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SYS_PERMISSION" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sys_permissions/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sys_permissions/fetchdefault")
public ResponseEntity<List<SYS_PERMISSIONDTO>> fetchDefault(SYS_PERMISSIONSearchContext context) { public ResponseEntity<List<SYS_PERMISSIONDTO>> fetchDefault(SYS_PERMISSIONSearchContext context) {
...@@ -174,7 +173,7 @@ public class SYS_PERMISSIONResource { ...@@ -174,7 +173,7 @@ public class SYS_PERMISSIONResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PERMISSION-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SYS_PERMISSION" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SYS_PERMISSION" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sys_permissions/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sys_permissions/searchdefault")
public ResponseEntity<Page<SYS_PERMISSIONDTO>> searchDefault(@RequestBody SYS_PERMISSIONSearchContext context) { public ResponseEntity<Page<SYS_PERMISSIONDTO>> searchDefault(@RequestBody SYS_PERMISSIONSearchContext context) {
......
...@@ -71,7 +71,7 @@ public class SYS_PSAPPMENUITEMResource { ...@@ -71,7 +71,7 @@ public class SYS_PSAPPMENUITEMResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSAPPMENUITEM-Create-all')")
@ApiOperation(value = "Create", tags = {"SYS_PSAPPMENUITEM" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SYS_PSAPPMENUITEM" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sys_psappmenuitems") @RequestMapping(method = RequestMethod.POST, value = "/sys_psappmenuitems")
@Transactional @Transactional
...@@ -81,8 +81,7 @@ public class SYS_PSAPPMENUITEMResource { ...@@ -81,8 +81,7 @@ public class SYS_PSAPPMENUITEMResource {
SYS_PSAPPMENUITEMDTO dto = sys_psappmenuitemMapping.toDto(domain); SYS_PSAPPMENUITEMDTO dto = sys_psappmenuitemMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSAPPMENUITEM-Create-all')")
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@ApiOperation(value = "createBatch", tags = {"SYS_PSAPPMENUITEM" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SYS_PSAPPMENUITEM" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sys_psappmenuitems/batch") @RequestMapping(method = RequestMethod.POST, value = "/sys_psappmenuitems/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_PSAPPMENUITEMDTO> sys_psappmenuitemdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_PSAPPMENUITEMDTO> sys_psappmenuitemdtos) {
...@@ -93,7 +92,7 @@ public class SYS_PSAPPMENUITEMResource { ...@@ -93,7 +92,7 @@ public class SYS_PSAPPMENUITEMResource {
@PreAuthorize("hasPermission(#sys_psappmenuitem_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSAPPMENUITEM-Update-all')")
@ApiOperation(value = "Update", tags = {"SYS_PSAPPMENUITEM" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SYS_PSAPPMENUITEM" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_psappmenuitems/{sys_psappmenuitem_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sys_psappmenuitems/{sys_psappmenuitem_id}")
@Transactional @Transactional
...@@ -105,7 +104,7 @@ public class SYS_PSAPPMENUITEMResource { ...@@ -105,7 +104,7 @@ public class SYS_PSAPPMENUITEMResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(#sys_psappmenuitem_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSAPPMENUITEM-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SYS_PSAPPMENUITEM" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SYS_PSAPPMENUITEM" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_psappmenuitems/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sys_psappmenuitems/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_PSAPPMENUITEMDTO> sys_psappmenuitemdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_PSAPPMENUITEMDTO> sys_psappmenuitemdtos) {
...@@ -134,7 +133,7 @@ public class SYS_PSAPPMENUITEMResource { ...@@ -134,7 +133,7 @@ public class SYS_PSAPPMENUITEMResource {
@PreAuthorize("hasPermission('Remove',{#sys_psappmenuitem_id,{this.getEntity(),'Sql'}})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSAPPMENUITEM-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SYS_PSAPPMENUITEM" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SYS_PSAPPMENUITEM" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sys_psappmenuitems/{sys_psappmenuitem_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sys_psappmenuitems/{sys_psappmenuitem_id}")
@Transactional @Transactional
...@@ -152,7 +151,7 @@ public class SYS_PSAPPMENUITEMResource { ...@@ -152,7 +151,7 @@ public class SYS_PSAPPMENUITEMResource {
@PreAuthorize("hasPermission(#sys_psappmenuitem_id,'Get',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSAPPMENUITEM-Get-all')")
@ApiOperation(value = "Get", tags = {"SYS_PSAPPMENUITEM" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SYS_PSAPPMENUITEM" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sys_psappmenuitems/{sys_psappmenuitem_id}") @RequestMapping(method = RequestMethod.GET, value = "/sys_psappmenuitems/{sys_psappmenuitem_id}")
public ResponseEntity<SYS_PSAPPMENUITEMDTO> get(@PathVariable("sys_psappmenuitem_id") String sys_psappmenuitem_id) { public ResponseEntity<SYS_PSAPPMENUITEMDTO> get(@PathVariable("sys_psappmenuitem_id") String sys_psappmenuitem_id) {
...@@ -161,7 +160,7 @@ public class SYS_PSAPPMENUITEMResource { ...@@ -161,7 +160,7 @@ public class SYS_PSAPPMENUITEMResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSAPPMENUITEM-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SYS_PSAPPMENUITEM" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SYS_PSAPPMENUITEM" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sys_psappmenuitems/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sys_psappmenuitems/fetchdefault")
public ResponseEntity<List<SYS_PSAPPMENUITEMDTO>> fetchDefault(SYS_PSAPPMENUITEMSearchContext context) { public ResponseEntity<List<SYS_PSAPPMENUITEMDTO>> fetchDefault(SYS_PSAPPMENUITEMSearchContext context) {
...@@ -174,7 +173,7 @@ public class SYS_PSAPPMENUITEMResource { ...@@ -174,7 +173,7 @@ public class SYS_PSAPPMENUITEMResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSAPPMENUITEM-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SYS_PSAPPMENUITEM" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SYS_PSAPPMENUITEM" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sys_psappmenuitems/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sys_psappmenuitems/searchdefault")
public ResponseEntity<Page<SYS_PSAPPMENUITEMDTO>> searchDefault(@RequestBody SYS_PSAPPMENUITEMSearchContext context) { public ResponseEntity<Page<SYS_PSAPPMENUITEMDTO>> searchDefault(@RequestBody SYS_PSAPPMENUITEMSearchContext context) {
......
...@@ -55,7 +55,7 @@ public class SYS_PSDEOPPRIVResource { ...@@ -55,7 +55,7 @@ public class SYS_PSDEOPPRIVResource {
@PreAuthorize("hasPermission('Remove',{#sys_psdeoppriv_id,{this.getEntity(),'Sql'}})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSDEOPPRIV-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SYS_PSDEOPPRIV" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SYS_PSDEOPPRIV" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sys_psdeopprivs/{sys_psdeoppriv_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sys_psdeopprivs/{sys_psdeoppriv_id}")
@Transactional @Transactional
...@@ -91,7 +91,7 @@ public class SYS_PSDEOPPRIVResource { ...@@ -91,7 +91,7 @@ public class SYS_PSDEOPPRIVResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSDEOPPRIV-Create-all')")
@ApiOperation(value = "Create", tags = {"SYS_PSDEOPPRIV" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SYS_PSDEOPPRIV" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sys_psdeopprivs") @RequestMapping(method = RequestMethod.POST, value = "/sys_psdeopprivs")
@Transactional @Transactional
...@@ -101,8 +101,7 @@ public class SYS_PSDEOPPRIVResource { ...@@ -101,8 +101,7 @@ public class SYS_PSDEOPPRIVResource {
SYS_PSDEOPPRIVDTO dto = sys_psdeopprivMapping.toDto(domain); SYS_PSDEOPPRIVDTO dto = sys_psdeopprivMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSDEOPPRIV-Create-all')")
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@ApiOperation(value = "createBatch", tags = {"SYS_PSDEOPPRIV" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SYS_PSDEOPPRIV" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sys_psdeopprivs/batch") @RequestMapping(method = RequestMethod.POST, value = "/sys_psdeopprivs/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_PSDEOPPRIVDTO> sys_psdeopprivdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_PSDEOPPRIVDTO> sys_psdeopprivdtos) {
...@@ -113,7 +112,7 @@ public class SYS_PSDEOPPRIVResource { ...@@ -113,7 +112,7 @@ public class SYS_PSDEOPPRIVResource {
@PreAuthorize("hasPermission(#sys_psdeoppriv_id,'Get',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSDEOPPRIV-Get-all')")
@ApiOperation(value = "Get", tags = {"SYS_PSDEOPPRIV" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SYS_PSDEOPPRIV" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sys_psdeopprivs/{sys_psdeoppriv_id}") @RequestMapping(method = RequestMethod.GET, value = "/sys_psdeopprivs/{sys_psdeoppriv_id}")
public ResponseEntity<SYS_PSDEOPPRIVDTO> get(@PathVariable("sys_psdeoppriv_id") String sys_psdeoppriv_id) { public ResponseEntity<SYS_PSDEOPPRIVDTO> get(@PathVariable("sys_psdeoppriv_id") String sys_psdeoppriv_id) {
...@@ -125,7 +124,7 @@ public class SYS_PSDEOPPRIVResource { ...@@ -125,7 +124,7 @@ public class SYS_PSDEOPPRIVResource {
@PreAuthorize("hasPermission(#sys_psdeoppriv_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSDEOPPRIV-Update-all')")
@ApiOperation(value = "Update", tags = {"SYS_PSDEOPPRIV" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SYS_PSDEOPPRIV" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_psdeopprivs/{sys_psdeoppriv_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sys_psdeopprivs/{sys_psdeoppriv_id}")
@Transactional @Transactional
...@@ -137,7 +136,7 @@ public class SYS_PSDEOPPRIVResource { ...@@ -137,7 +136,7 @@ public class SYS_PSDEOPPRIVResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(#sys_psdeoppriv_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSDEOPPRIV-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SYS_PSDEOPPRIV" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SYS_PSDEOPPRIV" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_psdeopprivs/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sys_psdeopprivs/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_PSDEOPPRIVDTO> sys_psdeopprivdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_PSDEOPPRIVDTO> sys_psdeopprivdtos) {
...@@ -161,7 +160,7 @@ public class SYS_PSDEOPPRIVResource { ...@@ -161,7 +160,7 @@ public class SYS_PSDEOPPRIVResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSDEOPPRIV-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SYS_PSDEOPPRIV" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SYS_PSDEOPPRIV" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sys_psdeopprivs/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sys_psdeopprivs/fetchdefault")
public ResponseEntity<List<SYS_PSDEOPPRIVDTO>> fetchDefault(SYS_PSDEOPPRIVSearchContext context) { public ResponseEntity<List<SYS_PSDEOPPRIVDTO>> fetchDefault(SYS_PSDEOPPRIVSearchContext context) {
...@@ -174,7 +173,7 @@ public class SYS_PSDEOPPRIVResource { ...@@ -174,7 +173,7 @@ public class SYS_PSDEOPPRIVResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_PSDEOPPRIV-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SYS_PSDEOPPRIV" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SYS_PSDEOPPRIV" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sys_psdeopprivs/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sys_psdeopprivs/searchdefault")
public ResponseEntity<Page<SYS_PSDEOPPRIVDTO>> searchDefault(@RequestBody SYS_PSDEOPPRIVSearchContext context) { public ResponseEntity<Page<SYS_PSDEOPPRIVDTO>> searchDefault(@RequestBody SYS_PSDEOPPRIVSearchContext context) {
......
...@@ -71,7 +71,7 @@ public class SYS_ROLEResource { ...@@ -71,7 +71,7 @@ public class SYS_ROLEResource {
@PreAuthorize("hasPermission(#sys_role_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE-Update-all')")
@ApiOperation(value = "Update", tags = {"SYS_ROLE" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SYS_ROLE" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_roles/{sys_role_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sys_roles/{sys_role_id}")
@Transactional @Transactional
...@@ -83,7 +83,7 @@ public class SYS_ROLEResource { ...@@ -83,7 +83,7 @@ public class SYS_ROLEResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(#sys_role_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SYS_ROLE" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SYS_ROLE" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_roles/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sys_roles/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_ROLEDTO> sys_roledtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_ROLEDTO> sys_roledtos) {
...@@ -94,7 +94,7 @@ public class SYS_ROLEResource { ...@@ -94,7 +94,7 @@ public class SYS_ROLEResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE-Create-all')")
@ApiOperation(value = "Create", tags = {"SYS_ROLE" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SYS_ROLE" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sys_roles") @RequestMapping(method = RequestMethod.POST, value = "/sys_roles")
@Transactional @Transactional
...@@ -104,8 +104,7 @@ public class SYS_ROLEResource { ...@@ -104,8 +104,7 @@ public class SYS_ROLEResource {
SYS_ROLEDTO dto = sys_roleMapping.toDto(domain); SYS_ROLEDTO dto = sys_roleMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE-Create-all')")
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@ApiOperation(value = "createBatch", tags = {"SYS_ROLE" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SYS_ROLE" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sys_roles/batch") @RequestMapping(method = RequestMethod.POST, value = "/sys_roles/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_ROLEDTO> sys_roledtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_ROLEDTO> sys_roledtos) {
...@@ -116,7 +115,7 @@ public class SYS_ROLEResource { ...@@ -116,7 +115,7 @@ public class SYS_ROLEResource {
@PreAuthorize("hasPermission(#sys_role_id,'Get',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE-Get-all')")
@ApiOperation(value = "Get", tags = {"SYS_ROLE" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SYS_ROLE" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sys_roles/{sys_role_id}") @RequestMapping(method = RequestMethod.GET, value = "/sys_roles/{sys_role_id}")
public ResponseEntity<SYS_ROLEDTO> get(@PathVariable("sys_role_id") String sys_role_id) { public ResponseEntity<SYS_ROLEDTO> get(@PathVariable("sys_role_id") String sys_role_id) {
...@@ -128,7 +127,7 @@ public class SYS_ROLEResource { ...@@ -128,7 +127,7 @@ public class SYS_ROLEResource {
@PreAuthorize("hasPermission('Remove',{#sys_role_id,{this.getEntity(),'Sql'}})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SYS_ROLE" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SYS_ROLE" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sys_roles/{sys_role_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sys_roles/{sys_role_id}")
@Transactional @Transactional
...@@ -161,7 +160,7 @@ public class SYS_ROLEResource { ...@@ -161,7 +160,7 @@ public class SYS_ROLEResource {
return ResponseEntity.status(HttpStatus.OK).body(sys_roleService.checkKey(sys_roleMapping.toDomain(sys_roledto))); return ResponseEntity.status(HttpStatus.OK).body(sys_roleService.checkKey(sys_roleMapping.toDomain(sys_roledto)));
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SYS_ROLE" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SYS_ROLE" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sys_roles/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sys_roles/fetchdefault")
public ResponseEntity<List<SYS_ROLEDTO>> fetchDefault(SYS_ROLESearchContext context) { public ResponseEntity<List<SYS_ROLEDTO>> fetchDefault(SYS_ROLESearchContext context) {
...@@ -174,7 +173,7 @@ public class SYS_ROLEResource { ...@@ -174,7 +173,7 @@ public class SYS_ROLEResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SYS_ROLE" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SYS_ROLE" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sys_roles/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sys_roles/searchdefault")
public ResponseEntity<Page<SYS_ROLEDTO>> searchDefault(@RequestBody SYS_ROLESearchContext context) { public ResponseEntity<Page<SYS_ROLEDTO>> searchDefault(@RequestBody SYS_ROLESearchContext context) {
......
...@@ -55,7 +55,7 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -55,7 +55,7 @@ public class SYS_ROLE_PERMISSIONResource {
@PreAuthorize("hasPermission(#sys_role_permission_id,'Get',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE_PERMISSION-Get-all')")
@ApiOperation(value = "Get", tags = {"SYS_ROLE_PERMISSION" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SYS_ROLE_PERMISSION" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sys_role_permissions/{sys_role_permission_id}") @RequestMapping(method = RequestMethod.GET, value = "/sys_role_permissions/{sys_role_permission_id}")
public ResponseEntity<SYS_ROLE_PERMISSIONDTO> get(@PathVariable("sys_role_permission_id") String sys_role_permission_id) { public ResponseEntity<SYS_ROLE_PERMISSIONDTO> get(@PathVariable("sys_role_permission_id") String sys_role_permission_id) {
...@@ -67,7 +67,7 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -67,7 +67,7 @@ public class SYS_ROLE_PERMISSIONResource {
@PreAuthorize("hasPermission('Remove',{#sys_role_permission_id,{this.getEntity(),'Sql'}})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE_PERMISSION-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SYS_ROLE_PERMISSION" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SYS_ROLE_PERMISSION" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sys_role_permissions/{sys_role_permission_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sys_role_permissions/{sys_role_permission_id}")
@Transactional @Transactional
...@@ -94,7 +94,7 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -94,7 +94,7 @@ public class SYS_ROLE_PERMISSIONResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE_PERMISSION-Create-all')")
@ApiOperation(value = "Create", tags = {"SYS_ROLE_PERMISSION" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SYS_ROLE_PERMISSION" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sys_role_permissions") @RequestMapping(method = RequestMethod.POST, value = "/sys_role_permissions")
@Transactional @Transactional
...@@ -104,8 +104,7 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -104,8 +104,7 @@ public class SYS_ROLE_PERMISSIONResource {
SYS_ROLE_PERMISSIONDTO dto = sys_role_permissionMapping.toDto(domain); SYS_ROLE_PERMISSIONDTO dto = sys_role_permissionMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE_PERMISSION-Create-all')")
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@ApiOperation(value = "createBatch", tags = {"SYS_ROLE_PERMISSION" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SYS_ROLE_PERMISSION" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sys_role_permissions/batch") @RequestMapping(method = RequestMethod.POST, value = "/sys_role_permissions/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_ROLE_PERMISSIONDTO> sys_role_permissiondtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_ROLE_PERMISSIONDTO> sys_role_permissiondtos) {
...@@ -141,7 +140,7 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -141,7 +140,7 @@ public class SYS_ROLE_PERMISSIONResource {
@PreAuthorize("hasPermission(#sys_role_permission_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE_PERMISSION-Update-all')")
@ApiOperation(value = "Update", tags = {"SYS_ROLE_PERMISSION" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SYS_ROLE_PERMISSION" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_role_permissions/{sys_role_permission_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sys_role_permissions/{sys_role_permission_id}")
@Transactional @Transactional
...@@ -153,7 +152,7 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -153,7 +152,7 @@ public class SYS_ROLE_PERMISSIONResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(#sys_role_permission_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE_PERMISSION-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SYS_ROLE_PERMISSION" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SYS_ROLE_PERMISSION" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_role_permissions/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sys_role_permissions/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_ROLE_PERMISSIONDTO> sys_role_permissiondtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_ROLE_PERMISSIONDTO> sys_role_permissiondtos) {
...@@ -161,7 +160,7 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -161,7 +160,7 @@ public class SYS_ROLE_PERMISSIONResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE_PERMISSION-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SYS_ROLE_PERMISSION" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SYS_ROLE_PERMISSION" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sys_role_permissions/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sys_role_permissions/fetchdefault")
public ResponseEntity<List<SYS_ROLE_PERMISSIONDTO>> fetchDefault(SYS_ROLE_PERMISSIONSearchContext context) { public ResponseEntity<List<SYS_ROLE_PERMISSIONDTO>> fetchDefault(SYS_ROLE_PERMISSIONSearchContext context) {
...@@ -174,7 +173,7 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -174,7 +173,7 @@ public class SYS_ROLE_PERMISSIONResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE_PERMISSION-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SYS_ROLE_PERMISSION" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SYS_ROLE_PERMISSION" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sys_role_permissions/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sys_role_permissions/searchdefault")
public ResponseEntity<Page<SYS_ROLE_PERMISSIONDTO>> searchDefault(@RequestBody SYS_ROLE_PERMISSIONSearchContext context) { public ResponseEntity<Page<SYS_ROLE_PERMISSIONDTO>> searchDefault(@RequestBody SYS_ROLE_PERMISSIONSearchContext context) {
...@@ -183,6 +182,28 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -183,6 +182,28 @@ public class SYS_ROLE_PERMISSIONResource {
.body(new PageImpl(sys_role_permissionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(sys_role_permissionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE_PERMISSION-Permissionenable1-all')")
@ApiOperation(value = "fetchpermissionenable1", tags = {"SYS_ROLE_PERMISSION" } ,notes = "fetchpermissionenable1")
@RequestMapping(method= RequestMethod.GET , value="/sys_role_permissions/fetchpermissionenable1")
public ResponseEntity<List<SYS_ROLE_PERMISSIONDTO>> fetchPermissionenable1(SYS_ROLE_PERMISSIONSearchContext context) {
Page<SYS_ROLE_PERMISSION> domains = sys_role_permissionService.searchPermissionenable1(context) ;
List<SYS_ROLE_PERMISSIONDTO> list = sys_role_permissionMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_ROLE_PERMISSION-Permissionenable1-all')")
@ApiOperation(value = "searchpermissionenable1", tags = {"SYS_ROLE_PERMISSION" } ,notes = "searchpermissionenable1")
@RequestMapping(method= RequestMethod.POST , value="/sys_role_permissions/searchpermissionenable1")
public ResponseEntity<Page<SYS_ROLE_PERMISSIONDTO>> searchPermissionenable1(@RequestBody SYS_ROLE_PERMISSIONSearchContext context) {
Page<SYS_ROLE_PERMISSION> domains = sys_role_permissionService.searchPermissionenable1(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(sys_role_permissionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@ApiOperation(value = "GetBySYS_PERMISSION", tags = {"SYS_ROLE_PERMISSION" }, notes = "GetBySYS_PERMISSION") @ApiOperation(value = "GetBySYS_PERMISSION", tags = {"SYS_ROLE_PERMISSION" }, notes = "GetBySYS_PERMISSION")
...@@ -307,6 +328,28 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -307,6 +328,28 @@ public class SYS_ROLE_PERMISSIONResource {
.body(new PageImpl(sys_role_permissionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(sys_role_permissionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@ApiOperation(value = "fetchpermissionenable1BySYS_PERMISSION", tags = {"SYS_ROLE_PERMISSION" } ,notes = "fetchpermissionenable1BySYS_PERMISSION")
@RequestMapping(method= RequestMethod.GET , value="/sys_permissions/{sys_permission_id}/sys_role_permissions/fetchpermissionenable1")
public ResponseEntity<List<SYS_ROLE_PERMISSIONDTO>> fetchSYS_ROLE_PERMISSIONPermissionenable1BySYS_PERMISSION(@PathVariable("sys_permission_id") String sys_permission_id,SYS_ROLE_PERMISSIONSearchContext context) {
context.setN_sys_permissionid_eq(sys_permission_id);
Page<SYS_ROLE_PERMISSION> domains = sys_role_permissionService.searchPermissionenable1(context) ;
List<SYS_ROLE_PERMISSIONDTO> list = sys_role_permissionMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@ApiOperation(value = "searchpermissionenable1BySYS_PERMISSION", tags = {"SYS_ROLE_PERMISSION" } ,notes = "searchpermissionenable1BySYS_PERMISSION")
@RequestMapping(method= RequestMethod.POST , value="/sys_permissions/{sys_permission_id}/sys_role_permissions/searchpermissionenable1")
public ResponseEntity<Page<SYS_ROLE_PERMISSIONDTO>> searchSYS_ROLE_PERMISSIONPermissionenable1BySYS_PERMISSION(@PathVariable("sys_permission_id") String sys_permission_id, @RequestBody SYS_ROLE_PERMISSIONSearchContext context) {
context.setN_sys_permissionid_eq(sys_permission_id);
Page<SYS_ROLE_PERMISSION> domains = sys_role_permissionService.searchPermissionenable1(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(sys_role_permissionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@ApiOperation(value = "GetBySYS_ROLE", tags = {"SYS_ROLE_PERMISSION" }, notes = "GetBySYS_ROLE") @ApiOperation(value = "GetBySYS_ROLE", tags = {"SYS_ROLE_PERMISSION" }, notes = "GetBySYS_ROLE")
...@@ -431,6 +474,28 @@ public class SYS_ROLE_PERMISSIONResource { ...@@ -431,6 +474,28 @@ public class SYS_ROLE_PERMISSIONResource {
.body(new PageImpl(sys_role_permissionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(sys_role_permissionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@ApiOperation(value = "fetchpermissionenable1BySYS_ROLE", tags = {"SYS_ROLE_PERMISSION" } ,notes = "fetchpermissionenable1BySYS_ROLE")
@RequestMapping(method= RequestMethod.GET , value="/sys_roles/{sys_role_id}/sys_role_permissions/fetchpermissionenable1")
public ResponseEntity<List<SYS_ROLE_PERMISSIONDTO>> fetchSYS_ROLE_PERMISSIONPermissionenable1BySYS_ROLE(@PathVariable("sys_role_id") String sys_role_id,SYS_ROLE_PERMISSIONSearchContext context) {
context.setN_sys_roleid_eq(sys_role_id);
Page<SYS_ROLE_PERMISSION> domains = sys_role_permissionService.searchPermissionenable1(context) ;
List<SYS_ROLE_PERMISSIONDTO> list = sys_role_permissionMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@ApiOperation(value = "searchpermissionenable1BySYS_ROLE", tags = {"SYS_ROLE_PERMISSION" } ,notes = "searchpermissionenable1BySYS_ROLE")
@RequestMapping(method= RequestMethod.POST , value="/sys_roles/{sys_role_id}/sys_role_permissions/searchpermissionenable1")
public ResponseEntity<Page<SYS_ROLE_PERMISSIONDTO>> searchSYS_ROLE_PERMISSIONPermissionenable1BySYS_ROLE(@PathVariable("sys_role_id") String sys_role_id, @RequestBody SYS_ROLE_PERMISSIONSearchContext context) {
context.setN_sys_roleid_eq(sys_role_id);
Page<SYS_ROLE_PERMISSION> domains = sys_role_permissionService.searchPermissionenable1(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(sys_role_permissionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
/** /**
* 用户权限校验 * 用户权限校验
......
...@@ -55,7 +55,7 @@ public class SYS_USERResource { ...@@ -55,7 +55,7 @@ public class SYS_USERResource {
@PreAuthorize("hasPermission('Remove',{#sys_user_id,{this.getEntity(),'Sql'}})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SYS_USER" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SYS_USER" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sys_users/{sys_user_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sys_users/{sys_user_id}")
@Transactional @Transactional
...@@ -73,7 +73,7 @@ public class SYS_USERResource { ...@@ -73,7 +73,7 @@ public class SYS_USERResource {
@PreAuthorize("hasPermission(#sys_user_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER-Update-all')")
@ApiOperation(value = "Update", tags = {"SYS_USER" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SYS_USER" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_users/{sys_user_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sys_users/{sys_user_id}")
@Transactional @Transactional
...@@ -85,7 +85,7 @@ public class SYS_USERResource { ...@@ -85,7 +85,7 @@ public class SYS_USERResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(#sys_user_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SYS_USER" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SYS_USER" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_users/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sys_users/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_USERDTO> sys_userdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_USERDTO> sys_userdtos) {
...@@ -105,7 +105,7 @@ public class SYS_USERResource { ...@@ -105,7 +105,7 @@ public class SYS_USERResource {
@PreAuthorize("hasPermission(#sys_user_id,'Get',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER-Get-all')")
@ApiOperation(value = "Get", tags = {"SYS_USER" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SYS_USER" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sys_users/{sys_user_id}") @RequestMapping(method = RequestMethod.GET, value = "/sys_users/{sys_user_id}")
public ResponseEntity<SYS_USERDTO> get(@PathVariable("sys_user_id") String sys_user_id) { public ResponseEntity<SYS_USERDTO> get(@PathVariable("sys_user_id") String sys_user_id) {
...@@ -142,7 +142,7 @@ public class SYS_USERResource { ...@@ -142,7 +142,7 @@ public class SYS_USERResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER-Create-all')")
@ApiOperation(value = "Create", tags = {"SYS_USER" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SYS_USER" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sys_users") @RequestMapping(method = RequestMethod.POST, value = "/sys_users")
@Transactional @Transactional
...@@ -152,8 +152,7 @@ public class SYS_USERResource { ...@@ -152,8 +152,7 @@ public class SYS_USERResource {
SYS_USERDTO dto = sys_userMapping.toDto(domain); SYS_USERDTO dto = sys_userMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER-Create-all')")
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@ApiOperation(value = "createBatch", tags = {"SYS_USER" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SYS_USER" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sys_users/batch") @RequestMapping(method = RequestMethod.POST, value = "/sys_users/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_USERDTO> sys_userdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_USERDTO> sys_userdtos) {
...@@ -161,7 +160,7 @@ public class SYS_USERResource { ...@@ -161,7 +160,7 @@ public class SYS_USERResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SYS_USER" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SYS_USER" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sys_users/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sys_users/fetchdefault")
public ResponseEntity<List<SYS_USERDTO>> fetchDefault(SYS_USERSearchContext context) { public ResponseEntity<List<SYS_USERDTO>> fetchDefault(SYS_USERSearchContext context) {
...@@ -174,7 +173,7 @@ public class SYS_USERResource { ...@@ -174,7 +173,7 @@ public class SYS_USERResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SYS_USER" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SYS_USER" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sys_users/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sys_users/searchdefault")
public ResponseEntity<Page<SYS_USERDTO>> searchDefault(@RequestBody SYS_USERSearchContext context) { public ResponseEntity<Page<SYS_USERDTO>> searchDefault(@RequestBody SYS_USERSearchContext context) {
......
...@@ -73,7 +73,7 @@ public class SYS_USER_ROLEResource { ...@@ -73,7 +73,7 @@ public class SYS_USER_ROLEResource {
@PreAuthorize("hasPermission(#sys_user_role_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER_ROLE-Update-all')")
@ApiOperation(value = "Update", tags = {"SYS_USER_ROLE" }, notes = "Update") @ApiOperation(value = "Update", tags = {"SYS_USER_ROLE" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_user_roles/{sys_user_role_id}") @RequestMapping(method = RequestMethod.PUT, value = "/sys_user_roles/{sys_user_role_id}")
@Transactional @Transactional
...@@ -85,7 +85,7 @@ public class SYS_USER_ROLEResource { ...@@ -85,7 +85,7 @@ public class SYS_USER_ROLEResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasPermission(#sys_user_role_id,'Update',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER_ROLE-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"SYS_USER_ROLE" }, notes = "UpdateBatch") @ApiOperation(value = "UpdateBatch", tags = {"SYS_USER_ROLE" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/sys_user_roles/batch") @RequestMapping(method = RequestMethod.PUT, value = "/sys_user_roles/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_USER_ROLEDTO> sys_user_roledtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<SYS_USER_ROLEDTO> sys_user_roledtos) {
...@@ -96,7 +96,7 @@ public class SYS_USER_ROLEResource { ...@@ -96,7 +96,7 @@ public class SYS_USER_ROLEResource {
@PreAuthorize("hasPermission('Remove',{#sys_user_role_id,{this.getEntity(),'Sql'}})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER_ROLE-Remove-all')")
@ApiOperation(value = "Remove", tags = {"SYS_USER_ROLE" }, notes = "Remove") @ApiOperation(value = "Remove", tags = {"SYS_USER_ROLE" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/sys_user_roles/{sys_user_role_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/sys_user_roles/{sys_user_role_id}")
@Transactional @Transactional
...@@ -114,7 +114,7 @@ public class SYS_USER_ROLEResource { ...@@ -114,7 +114,7 @@ public class SYS_USER_ROLEResource {
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER_ROLE-Create-all')")
@ApiOperation(value = "Create", tags = {"SYS_USER_ROLE" }, notes = "Create") @ApiOperation(value = "Create", tags = {"SYS_USER_ROLE" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/sys_user_roles") @RequestMapping(method = RequestMethod.POST, value = "/sys_user_roles")
@Transactional @Transactional
...@@ -124,8 +124,7 @@ public class SYS_USER_ROLEResource { ...@@ -124,8 +124,7 @@ public class SYS_USER_ROLEResource {
SYS_USER_ROLEDTO dto = sys_user_roleMapping.toDto(domain); SYS_USER_ROLEDTO dto = sys_user_roleMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER_ROLE-Create-all')")
@PreAuthorize("hasPermission('','Create',{this.getEntity(),'Sql'})")
@ApiOperation(value = "createBatch", tags = {"SYS_USER_ROLE" }, notes = "createBatch") @ApiOperation(value = "createBatch", tags = {"SYS_USER_ROLE" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/sys_user_roles/batch") @RequestMapping(method = RequestMethod.POST, value = "/sys_user_roles/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_USER_ROLEDTO> sys_user_roledtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<SYS_USER_ROLEDTO> sys_user_roledtos) {
...@@ -136,7 +135,7 @@ public class SYS_USER_ROLEResource { ...@@ -136,7 +135,7 @@ public class SYS_USER_ROLEResource {
@PreAuthorize("hasPermission(#sys_user_role_id,'Get',{this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER_ROLE-Get-all')")
@ApiOperation(value = "Get", tags = {"SYS_USER_ROLE" }, notes = "Get") @ApiOperation(value = "Get", tags = {"SYS_USER_ROLE" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/sys_user_roles/{sys_user_role_id}") @RequestMapping(method = RequestMethod.GET, value = "/sys_user_roles/{sys_user_role_id}")
public ResponseEntity<SYS_USER_ROLEDTO> get(@PathVariable("sys_user_role_id") String sys_user_role_id) { public ResponseEntity<SYS_USER_ROLEDTO> get(@PathVariable("sys_user_role_id") String sys_user_role_id) {
...@@ -161,7 +160,7 @@ public class SYS_USER_ROLEResource { ...@@ -161,7 +160,7 @@ public class SYS_USER_ROLEResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER_ROLE-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"SYS_USER_ROLE" } ,notes = "fetchDEFAULT") @ApiOperation(value = "fetchDEFAULT", tags = {"SYS_USER_ROLE" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sys_user_roles/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/sys_user_roles/fetchdefault")
public ResponseEntity<List<SYS_USER_ROLEDTO>> fetchDefault(SYS_USER_ROLESearchContext context) { public ResponseEntity<List<SYS_USER_ROLEDTO>> fetchDefault(SYS_USER_ROLESearchContext context) {
...@@ -174,7 +173,7 @@ public class SYS_USER_ROLEResource { ...@@ -174,7 +173,7 @@ public class SYS_USER_ROLEResource {
.body(list); .body(list);
} }
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity(),'Sql'})") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_USER_ROLE-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"SYS_USER_ROLE" } ,notes = "searchDEFAULT") @ApiOperation(value = "searchDEFAULT", tags = {"SYS_USER_ROLE" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sys_user_roles/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/sys_user_roles/searchdefault")
public ResponseEntity<Page<SYS_USER_ROLEDTO>> searchDefault(@RequestBody SYS_USER_ROLESearchContext context) { public ResponseEntity<Page<SYS_USER_ROLEDTO>> searchDefault(@RequestBody SYS_USER_ROLESearchContext context) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册