@@ -0,0 +1,91 @@ | |||
package cc.smtweb.system.bpm.web.sys.user.role; | |||
import cc.smtweb.framework.core.annotation.SwTable; | |||
import cc.smtweb.framework.core.common.SwMap; | |||
import cc.smtweb.framework.core.db.impl.DefaultEntity; | |||
/** | |||
* Created by 1 at 2022-07-28 19:15:18 | |||
* 实体【[角色表](SYS_ROLE)】的Entity类 | |||
*/ | |||
@SwTable("SYS_ROLE") | |||
public class Role extends DefaultEntity { | |||
public static final String ENTITY_NAME = "SYS_ROLE"; | |||
public Role() { | |||
super(ENTITY_NAME); | |||
} | |||
/** 主键 */ | |||
public long getId() { | |||
return getLong("srl_id"); | |||
} | |||
/** 主键 */ | |||
public void setId(long srl_id) { | |||
put("srl_id", srl_id); | |||
} | |||
/** 类别 */ | |||
public long getType() { | |||
return getLong("srl_type"); | |||
} | |||
/** 类别 */ | |||
public void setType(long srl_type) { | |||
put("srl_type", srl_type); | |||
} | |||
/** 编码 */ | |||
public String getCode() { | |||
return getStr("srl_code"); | |||
} | |||
/** 编码 */ | |||
public void setCode(String srl_code) { | |||
put("srl_code", srl_code); | |||
} | |||
/** 名称 */ | |||
public String getName() { | |||
return getStr("srl_name"); | |||
} | |||
/** 名称 */ | |||
public void setName(String srl_name) { | |||
put("srl_name", srl_name); | |||
} | |||
/** 备注 */ | |||
public String getRemark() { | |||
return getStr("srl_remark"); | |||
} | |||
/** 备注 */ | |||
public void setRemark(String srl_remark) { | |||
put("srl_remark", srl_remark); | |||
} | |||
/** 等级 */ | |||
public long getLevel() { | |||
return getLong("srl_level"); | |||
} | |||
/** 等级 */ | |||
public void setLevel(long srl_level) { | |||
put("srl_level", srl_level); | |||
} | |||
/** 菜单方案 */ | |||
public long getSmpId() { | |||
return getLong("srl_smp_id"); | |||
} | |||
/** 菜单方案 */ | |||
public void setSmpId(long srl_smp_id) { | |||
put("srl_smp_id", srl_smp_id); | |||
} | |||
/** 权限详细 */ | |||
public String getPrivilege() { | |||
return getStr("srl_privilege"); | |||
} | |||
/** 权限详细 */ | |||
public void setPrivilege(String srl_privilege) { | |||
put("srl_privilege", srl_privilege); | |||
} | |||
} |
@@ -0,0 +1,34 @@ | |||
package cc.smtweb.system.bpm.web.sys.user.role; | |||
import cc.smtweb.framework.core.annotation.SwCache; | |||
import cc.smtweb.framework.core.cache.AbstractEntityCache; | |||
import cc.smtweb.framework.core.cache.CacheManager; | |||
import java.util.ArrayList; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
import java.util.Set; | |||
/** | |||
* Created by 1 at 2022-07-28 19:15:18 | |||
* 实体【[角色表](SYS_ROLE)】的缓存类 | |||
*/ | |||
@SwCache(ident = "SYS_ROLE", title = "角色表") | |||
public class RoleCache extends AbstractEntityCache<Role> { | |||
//缓存key:按编码 | |||
public final static String mk_code = "code"; | |||
public static RoleCache getInstance() { | |||
return CacheManager.getIntance().getCache(RoleCache.class); | |||
} | |||
public RoleCache() { | |||
//缓存key:按编码 | |||
regMap(mk_code, "srl_code"); | |||
} | |||
//缓存key:按编码 | |||
public final Role getByCode(String key) { | |||
return getByKey(mk_code, key); | |||
} | |||
} |
@@ -0,0 +1,30 @@ | |||
package cc.smtweb.system.bpm.web.sys.user.role; | |||
import cc.smtweb.framework.core.annotation.SwBody; | |||
import cc.smtweb.framework.core.annotation.SwService; | |||
import cc.smtweb.framework.core.common.R; | |||
import cc.smtweb.framework.core.common.SwMap; | |||
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageService; | |||
import cc.smtweb.framework.core.mvc.service.AbstractHandler; | |||
import cc.smtweb.framework.core.session.UserSession; | |||
/** | |||
* Created by 1 at 2022-07-28 19:15:18 | |||
* 页面【[角色列表]的服务类 | |||
*/ | |||
@SwService | |||
public class RoleService extends DynPageService { | |||
//public final static String TYPE_DEMO = "demo"; | |||
@Override | |||
protected AbstractHandler createHandler(String type) { | |||
return super.createHandler(type); | |||
} | |||
/* demo | |||
//自定义 | |||
public R demo(@SwBody SwMap params, UserSession us) { | |||
return pageHandler(params, us, TYPE_DEMO, handler -> ((DemoHandler)handler).demo()); | |||
} | |||
*/ | |||
} |
@@ -0,0 +1,91 @@ | |||
package cc.smtweb.system.bpm.web.sys.user.user; | |||
import cc.smtweb.framework.core.annotation.SwTable; | |||
import cc.smtweb.framework.core.common.SwMap; | |||
import cc.smtweb.framework.core.db.impl.DefaultEntity; | |||
/** | |||
* Created by 1 at 2022-07-28 20:05:08 | |||
* 实体【[角色表](SYS_ROLE)】的Entity类 | |||
*/ | |||
@SwTable("SYS_ROLE") | |||
public class Role extends DefaultEntity { | |||
public static final String ENTITY_NAME = "SYS_ROLE"; | |||
public Role() { | |||
super(ENTITY_NAME); | |||
} | |||
/** 主键 */ | |||
public long getId() { | |||
return getLong("srl_id"); | |||
} | |||
/** 主键 */ | |||
public void setId(long srl_id) { | |||
put("srl_id", srl_id); | |||
} | |||
/** 类别 */ | |||
public long getType() { | |||
return getLong("srl_type"); | |||
} | |||
/** 类别 */ | |||
public void setType(long srl_type) { | |||
put("srl_type", srl_type); | |||
} | |||
/** 编码 */ | |||
public String getCode() { | |||
return getStr("srl_code"); | |||
} | |||
/** 编码 */ | |||
public void setCode(String srl_code) { | |||
put("srl_code", srl_code); | |||
} | |||
/** 名称 */ | |||
public String getName() { | |||
return getStr("srl_name"); | |||
} | |||
/** 名称 */ | |||
public void setName(String srl_name) { | |||
put("srl_name", srl_name); | |||
} | |||
/** 备注 */ | |||
public String getRemark() { | |||
return getStr("srl_remark"); | |||
} | |||
/** 备注 */ | |||
public void setRemark(String srl_remark) { | |||
put("srl_remark", srl_remark); | |||
} | |||
/** 等级 */ | |||
public long getLevel() { | |||
return getLong("srl_level"); | |||
} | |||
/** 等级 */ | |||
public void setLevel(long srl_level) { | |||
put("srl_level", srl_level); | |||
} | |||
/** 菜单方案 */ | |||
public long getSmpId() { | |||
return getLong("srl_smp_id"); | |||
} | |||
/** 菜单方案 */ | |||
public void setSmpId(long srl_smp_id) { | |||
put("srl_smp_id", srl_smp_id); | |||
} | |||
/** 权限详细 */ | |||
public String getPrivilege() { | |||
return getStr("srl_privilege"); | |||
} | |||
/** 权限详细 */ | |||
public void setPrivilege(String srl_privilege) { | |||
put("srl_privilege", srl_privilege); | |||
} | |||
} |
@@ -0,0 +1,34 @@ | |||
package cc.smtweb.system.bpm.web.sys.user.user; | |||
import cc.smtweb.framework.core.annotation.SwCache; | |||
import cc.smtweb.framework.core.cache.AbstractEntityCache; | |||
import cc.smtweb.framework.core.cache.CacheManager; | |||
import java.util.ArrayList; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
import java.util.Set; | |||
/** | |||
* Created by 1 at 2022-07-28 20:05:08 | |||
* 实体【[角色表](SYS_ROLE)】的缓存类 | |||
*/ | |||
@SwCache(ident = "SYS_ROLE", title = "角色表") | |||
public class RoleCache extends AbstractEntityCache<Role> { | |||
//缓存key:按编码 | |||
public final static String mk_code = "code"; | |||
public static RoleCache getInstance() { | |||
return CacheManager.getIntance().getCache(RoleCache.class); | |||
} | |||
public RoleCache() { | |||
//缓存key:按编码 | |||
regMap(mk_code, "srl_code"); | |||
} | |||
//缓存key:按编码 | |||
public final Role getByCode(String key) { | |||
return getByKey(mk_code, key); | |||
} | |||
} |
@@ -9,6 +9,8 @@ import cc.smtweb.system.bpm.web.engine.dynPage.DynPageListHandler; | |||
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageLoadHandler; | |||
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageSaveHandler; | |||
import java.util.Set; | |||
/** | |||
* Created by Akmm at 2022/7/1 15:47 | |||
* 区划保存 | |||
@@ -19,6 +21,15 @@ public class UserHandler { | |||
private UserStatu userStatu; | |||
@Override | |||
protected DefaultEntity readBeanFromPage(PageDataset pageDataSet, SwMap data) { | |||
if (pageDataSet.name.equals("userPartyCard")) { | |||
String userRoles = data.readString("sup_roles"); | |||
return readBeanFromPage(pageDataSet, data); | |||
} | |||
return super.readBeanFromPage(pageDataSet, data); | |||
} | |||
@Override | |||
protected void saveBean(DefaultEntity bean) { | |||
super.saveBean(bean); | |||
userStatu = UserStatuCache.getInstance().get(bean.getEntityId()); | |||
@@ -0,0 +1,55 @@ | |||
package cc.smtweb.system.bpm.web.sys.user.user; | |||
import cc.smtweb.framework.core.annotation.SwTable; | |||
import cc.smtweb.framework.core.common.SwMap; | |||
import cc.smtweb.framework.core.db.impl.DefaultEntity; | |||
/** | |||
* Created by 1 at 2022-07-28 20:05:08 | |||
* 实体【[用户机构关系](SYS_USER_PARTY)】的Entity类 | |||
*/ | |||
@SwTable("SYS_USER_PARTY") | |||
public class UserParty extends DefaultEntity { | |||
public static final String ENTITY_NAME = "SYS_USER_PARTY"; | |||
public UserParty() { | |||
super(ENTITY_NAME); | |||
} | |||
/** 主键 */ | |||
public long getId() { | |||
return getLong("sup_id"); | |||
} | |||
/** 主键 */ | |||
public void setId(long sup_id) { | |||
put("sup_id", sup_id); | |||
} | |||
/** 机构 */ | |||
public long getPartyId() { | |||
return getLong("sup_party_id"); | |||
} | |||
/** 机构 */ | |||
public void setPartyId(long sup_party_id) { | |||
put("sup_party_id", sup_party_id); | |||
} | |||
/** 部门 */ | |||
public long getDeptId() { | |||
return getLong("sup_dept_id"); | |||
} | |||
/** 部门 */ | |||
public void setDeptId(long sup_dept_id) { | |||
put("sup_dept_id", sup_dept_id); | |||
} | |||
/** 用户 */ | |||
public long getUserId() { | |||
return getLong("sup_user_id"); | |||
} | |||
/** 用户 */ | |||
public void setUserId(long sup_user_id) { | |||
put("sup_user_id", sup_user_id); | |||
} | |||
} |
@@ -0,0 +1,26 @@ | |||
package cc.smtweb.system.bpm.web.sys.user.user; | |||
import cc.smtweb.framework.core.annotation.SwCache; | |||
import cc.smtweb.framework.core.cache.AbstractEntityCache; | |||
import cc.smtweb.framework.core.cache.CacheManager; | |||
import java.util.ArrayList; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
import java.util.Set; | |||
/** | |||
* Created by 1 at 2022-07-28 20:05:08 | |||
* 实体【[用户机构关系](SYS_USER_PARTY)】的缓存类 | |||
*/ | |||
@SwCache(ident = "SYS_USER_PARTY", title = "用户机构关系") | |||
public class UserPartyCache extends AbstractEntityCache<UserParty> { | |||
public static UserPartyCache getInstance() { | |||
return CacheManager.getIntance().getCache(UserPartyCache.class); | |||
} | |||
public UserPartyCache() { | |||
} | |||
} |