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

ibiz4j 发布系统代码

上级 335da9ed
<template>
<div class="index_view ">
<div class="index_view index">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="index"></app-studioaction>
<layout :class="themeClasses" :style="themeStyle">
<header class="index_header" >
<div class="header-left">
<header class="index_header">
<div class="header-left" >
<div class="page-logo">
<img src="../../../assets/img/logo.png" height="32" />
<span style="display: inline-block;margin-left: 10px;font-size: 22px;">{{$t(model.srfCaption)}}</span>
</div>
<div style="margin-left: 50px;">
</div>
<div class="header-right" style="display: flex;align-items: center;justify-content: space-between;">
<app-header-menus />
<app-lang style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-orgsector></app-orgsector>
<app-user></app-user>
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div>
</header>
<layout>
<sider :width="collapseChange ? 64 : 200" hide-trigger v-model="collapseChange">
<div class="sider-top">
<i class="ivu-icon ivu-icon-md-menu" @click="handleClick"></i>
</div>
<view_appmenu
:viewState="viewState"
:viewparams="viewparams"
......@@ -22,20 +36,15 @@
ref='appmenu'
@closeview="closeView($event)">
</view_appmenu>
</div>
</div>
<div class="header-right" style="display: flex;align-items: center;justify-content: space-between;">
<app-header-menus />
<app-lang style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-orgsector></app-orgsector>
<app-user></app-user>
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div>
</header>
<content style="height:calc(100vh - 50px);">
<router-view></router-view>
</sider>
<content class="index_content" :style="{'width':this.collapseChange ? 'calc(100vw - 64px)' : 'calc(100vw - 200px)' }">
<tab-page-exp></tab-page-exp>
<app-keep-alive :routerList="getRouterList">
<router-view :key="getRouterViewKey"></router-view>
</app-keep-alive>
</content>
</layout>
</layout>
</div>
</template>
......@@ -435,7 +444,7 @@ export default class IndexBase extends Vue {
* @type {string}
* @memberof IndexBase
*/
public mode: string ='horizontal';
public mode: string ='vertical';
/**
* 当前主题
......
......@@ -94,14 +94,6 @@ public class SysPermission extends EntityMP implements Serializable {
private Timestamp updatedate;
/**
* 角色权限关系
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private List<cn.ibizlab.core.uaa.domain.SysRolePermission> sysrolepermission;
/**
* 设置 [资源名称]
......
......@@ -78,22 +78,6 @@ public class SysRole extends EntityMP implements Serializable {
private Timestamp updatedate;
/**
* 角色权限关系
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private List<cn.ibizlab.core.uaa.domain.SysRolePermission> sysrolepermission;
/**
* 用户角色关系
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private List<cn.ibizlab.core.uaa.domain.SysUserRole> sysuserrole;
/**
* 设置 [角色表名称]
......
......@@ -66,14 +66,6 @@ public class SysUser extends EntityMP implements Serializable {
private String password;
/**
* 用户角色关系
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private List<cn.ibizlab.core.uaa.domain.SysUserRole> sysuserrole;
/**
* 设置 [用户全局名]
......
......@@ -39,10 +39,8 @@ public interface ISysRolePermissionService extends IService<SysRolePermission>{
Page<SysRolePermission> searchDefault(SysRolePermissionSearchContext context) ;
List<SysRolePermission> selectByPermissionid(String permissionid) ;
void removeByPermissionid(String permissionid) ;
void saveByPermissionid(String permissionid,List<SysRolePermission> list) ;
List<SysRolePermission> selectByRoleid(String roleid) ;
void removeByRoleid(String roleid) ;
void saveByRoleid(String roleid,List<SysRolePermission> list) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -39,10 +39,8 @@ public interface ISysUserRoleService extends IService<SysUserRole>{
Page<SysUserRole> searchDefault(SysUserRoleSearchContext context) ;
List<SysUserRole> selectByRoleid(String roleid) ;
void removeByRoleid(String roleid) ;
void saveByRoleid(String roleid,List<SysUserRole> list) ;
List<SysUserRole> selectByUserid(String userid) ;
void removeByUserid(String userid) ;
void saveByUserid(String userid,List<SysUserRole> list) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -89,7 +89,6 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
@Override
@Transactional
public boolean remove(String key) {
sysrolepermissionService.removeByPermissionid(key) ;
boolean result=removeById(key);
return result ;
}
......@@ -104,7 +103,6 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
public boolean update(SysPermission et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("sys_permissionid",et.getPermissionid())))
return false;
sysrolepermissionService.saveByPermissionid(et.getPermissionid(),et.getSysrolepermission());
CachedBeanCopier.copy(get(et.getPermissionid()),et);
return true;
}
......@@ -119,7 +117,6 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
public boolean create(SysPermission et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
sysrolepermissionService.saveByPermissionid(et.getPermissionid(),et.getSysrolepermission());
CachedBeanCopier.copy(get(et.getPermissionid()),et);
return true;
}
......@@ -143,7 +140,6 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
et.setPermissionid(key);
}
else{
et.setSysrolepermission(sysrolepermissionService.selectByPermissionid(key));
}
return et;
}
......
......@@ -165,35 +165,6 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
this.remove(new QueryWrapper<SysRolePermission>().eq("sys_permissionid",permissionid));
}
@Override
public void saveByPermissionid(String permissionid,List<SysRolePermission> list) {
if(list==null)
return;
Set<String> delIds=new HashSet<String>();
List<SysRolePermission> _update=new ArrayList<SysRolePermission>();
List<SysRolePermission> _create=new ArrayList<SysRolePermission>();
for(SysRolePermission before:selectByPermissionid(permissionid)){
delIds.add(before.getRolepermissionid());
}
for(SysRolePermission sub:list) {
sub.setPermissionid(permissionid);
if(ObjectUtils.isEmpty(sub.getRolepermissionid()))
sub.setRolepermissionid((String)sub.getDefaultKey(true));
if(delIds.contains(sub.getRolepermissionid())) {
delIds.remove(sub.getRolepermissionid());
_update.add(sub);
}
else
_create.add(sub);
}
if(_update.size()>0)
this.updateBatch(_update);
if(_create.size()>0)
this.createBatch(_create);
if(delIds.size()>0)
this.removeBatch(delIds);
}
@Override
public List<SysRolePermission> selectByRoleid(String roleid) {
return baseMapper.selectByRoleid(roleid);
......@@ -204,35 +175,6 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
this.remove(new QueryWrapper<SysRolePermission>().eq("sys_roleid",roleid));
}
@Override
public void saveByRoleid(String roleid,List<SysRolePermission> list) {
if(list==null)
return;
Set<String> delIds=new HashSet<String>();
List<SysRolePermission> _update=new ArrayList<SysRolePermission>();
List<SysRolePermission> _create=new ArrayList<SysRolePermission>();
for(SysRolePermission before:selectByRoleid(roleid)){
delIds.add(before.getRolepermissionid());
}
for(SysRolePermission sub:list) {
sub.setRoleid(roleid);
if(ObjectUtils.isEmpty(sub.getRolepermissionid()))
sub.setRolepermissionid((String)sub.getDefaultKey(true));
if(delIds.contains(sub.getRolepermissionid())) {
delIds.remove(sub.getRolepermissionid());
_update.add(sub);
}
else
_create.add(sub);
}
if(_update.size()>0)
this.updateBatch(_update);
if(_create.size()>0)
this.createBatch(_create);
if(delIds.size()>0)
this.removeBatch(delIds);
}
/**
* 查询集合 DEFAULT
......
......@@ -89,8 +89,6 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
public boolean update(SysRole et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("sys_roleid",et.getRoleid())))
return false;
sysrolepermissionService.saveByRoleid(et.getRoleid(),et.getSysrolepermission());
sysuserroleService.saveByRoleid(et.getRoleid(),et.getSysuserrole());
CachedBeanCopier.copy(get(et.getRoleid()),et);
return true;
}
......@@ -105,8 +103,6 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
public boolean create(SysRole et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
sysrolepermissionService.saveByRoleid(et.getRoleid(),et.getSysrolepermission());
sysuserroleService.saveByRoleid(et.getRoleid(),et.getSysuserrole());
CachedBeanCopier.copy(get(et.getRoleid()),et);
return true;
}
......@@ -125,8 +121,6 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
et.setRoleid(key);
}
else{
et.setSysrolepermission(sysrolepermissionService.selectByRoleid(key));
et.setSysuserrole(sysuserroleService.selectByRoleid(key));
}
return et;
}
......@@ -134,8 +128,6 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Override
@Transactional
public boolean remove(String key) {
sysrolepermissionService.removeByRoleid(key) ;
sysuserroleService.removeByRoleid(key) ;
boolean result=removeById(key);
return result ;
}
......
......@@ -165,35 +165,6 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
this.remove(new QueryWrapper<SysUserRole>().eq("sys_roleid",roleid));
}
@Override
public void saveByRoleid(String roleid,List<SysUserRole> list) {
if(list==null)
return;
Set<String> delIds=new HashSet<String>();
List<SysUserRole> _update=new ArrayList<SysUserRole>();
List<SysUserRole> _create=new ArrayList<SysUserRole>();
for(SysUserRole before:selectByRoleid(roleid)){
delIds.add(before.getUserroleid());
}
for(SysUserRole sub:list) {
sub.setRoleid(roleid);
if(ObjectUtils.isEmpty(sub.getUserroleid()))
sub.setUserroleid((String)sub.getDefaultKey(true));
if(delIds.contains(sub.getUserroleid())) {
delIds.remove(sub.getUserroleid());
_update.add(sub);
}
else
_create.add(sub);
}
if(_update.size()>0)
this.updateBatch(_update);
if(_create.size()>0)
this.createBatch(_create);
if(delIds.size()>0)
this.removeBatch(delIds);
}
@Override
public List<SysUserRole> selectByUserid(String userid) {
return baseMapper.selectByUserid(userid);
......@@ -204,35 +175,6 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
this.remove(new QueryWrapper<SysUserRole>().eq("sys_userid",userid));
}
@Override
public void saveByUserid(String userid,List<SysUserRole> list) {
if(list==null)
return;
Set<String> delIds=new HashSet<String>();
List<SysUserRole> _update=new ArrayList<SysUserRole>();
List<SysUserRole> _create=new ArrayList<SysUserRole>();
for(SysUserRole before:selectByUserid(userid)){
delIds.add(before.getUserroleid());
}
for(SysUserRole sub:list) {
sub.setUserid(userid);
if(ObjectUtils.isEmpty(sub.getUserroleid()))
sub.setUserroleid((String)sub.getDefaultKey(true));
if(delIds.contains(sub.getUserroleid())) {
delIds.remove(sub.getUserroleid());
_update.add(sub);
}
else
_create.add(sub);
}
if(_update.size()>0)
this.updateBatch(_update);
if(_create.size()>0)
this.createBatch(_create);
if(delIds.size()>0)
this.removeBatch(delIds);
}
/**
* 查询集合 DEFAULT
......
......@@ -53,7 +53,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Override
@Transactional
public boolean remove(String key) {
sysuserroleService.removeByUserid(key) ;
boolean result=removeById(key);
return result ;
}
......@@ -68,7 +67,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
public boolean update(SysUser et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("userid",et.getUserid())))
return false;
sysuserroleService.saveByUserid(et.getUserid(),et.getSysuserrole());
CachedBeanCopier.copy(get(et.getUserid()),et);
return true;
}
......@@ -92,7 +90,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
et.setUserid(key);
}
else{
et.setSysuserrole(sysuserroleService.selectByUserid(key));
}
return et;
}
......@@ -138,7 +135,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
public boolean create(SysUser et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
sysuserroleService.saveByUserid(et.getUserid(),et.getSysuserrole());
CachedBeanCopier.copy(get(et.getUserid()),et);
return true;
}
......
......@@ -66,7 +66,7 @@
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-91-3">
<changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-93-3">
<createTable tableName="IBZROLE_PERMISSION">
<column name="SYS_ROLE_PERMISSIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_PERMISSION_SYS_ROL"/>
......@@ -106,7 +106,7 @@
<!--输出实体[SYS_USER_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_user_role-57-5">
<changeSet author="a_A_5d9d78509" id="tab-sys_user_role-59-5">
<createTable tableName="IBZUSER_ROLE">
<column name="SYS_USER_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_USER_ROLE_SYS_USER_ROLE"/>
......@@ -124,7 +124,7 @@
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-212-6">
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-213-6">
<createTable tableName="IBZPERMISSION">
<column name="SYS_PERMISSIONID" remarks="" type="VARCHAR(200)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PERMISSION_SYS_PERMISSI"/>
......@@ -146,7 +146,7 @@
<!--输出实体[SYS_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role-83-7">
<changeSet author="a_A_5d9d78509" id="tab-sys_role-85-7">
<createTable tableName="IBZROLE">
<column name="SYS_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_SYS_ROLEID"/>
......@@ -209,12 +209,12 @@
<!--输出实体[SYS_AUTHLOG]外键关系 -->
<!--输出实体[SYS_PSDEOPPRIV]外键关系 -->
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_role_permission-91-10">
<changeSet author="a_A_5d9d78509" id="fk-sys_role_permission-93-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"/>
</changeSet>
<!--输出实体[SYS_PSSYSUNIRES]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_user_role-57-12">
<changeSet author="a_A_5d9d78509" id="fk-sys_user_role-59-12">
<addForeignKeyConstraint baseColumnNames="SYS_ROLEID" baseTableName="IBZUSER_ROLE" constraintName="DER1N_SYS_USER_ROLE_SYS_ROLE_S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/>
</changeSet>
<!--输出实体[SYS_PERMISSION]外键关系 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册