Compare commits

...

2 Commits

Author SHA1 Message Date
郑皇 07dc56d98b 权限代码 4 years ago
郑皇 cb0ce5e1e7 权限代码 4 years ago

@ -0,0 +1,140 @@
package com.ipsos.plugins.xpack.impl;
import com.ipsos.common.constants.PluginSystemConstants;
import com.ipsos.common.dto.PluginSysMenu;
import com.ipsos.plugins.xpack.auth.dto.request.XpackBaseTreeRequest;
import com.ipsos.plugins.xpack.auth.dto.request.XpackSysAuthRequest;
import com.ipsos.plugins.xpack.auth.dto.response.*;
import com.ipsos.plugins.xpack.auth.entity.XpackVAuthModelExample;
import com.ipsos.plugins.xpack.auth.service.AuthXpackService;
import com.ipsos.plugins.xpack.mapper.auth.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.io.InputStream;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class AuthXpackDefaultService extends AuthXpackService {
private static List<String> MODEL_TYPES;
@Autowired
private XpackSysAuthMapper sysAuthMapper;
@Autowired
private XpackSysAuthDetailMapper sysAuthDetailMapper;
@Autowired
private XpackExtSysAuthDetailMapper extSysAuthDetailMapper;
@Autowired
private XpackExtVAuthModelMapper extVAuthModelMapper;
@Autowired
private XpackExtSysAuthMapper extSysAuthMapper;
public Map<String, List<XpackSysAuthDetailDTO>> searchAuthDetails(XpackSysAuthRequest request) {
return (Map) ((List) Optional.ofNullable(extSysAuthMapper.search(request)).orElse(new ArrayList())).stream().collect(Collectors.groupingBy(XpackSysAuthDetailDTO::getAuthSource));
}
protected InputStream readContent(String name) {
return name.getClass().getClassLoader().getResourceAsStream((new StringBuilder()).insert(0, "static/").append(name).toString());
}
public List<XpackVAuthModelDTO> searchAuthModelTree(XpackBaseTreeRequest request, Long userId, Boolean isAdmin) {
request.setCreateBy(String.valueOf(userId));
if (!MODEL_TYPES.contains(request.getModelType()) || userId != null && isAdmin) {
request.setWithAuth("0");
} else {
request.setWithAuth("1");
}
return extVAuthModelMapper.searchTree(request);
}
public void authChange(XpackSysAuthRequest request, Long userId, String userName, Boolean isAdmin) {
XpackSysAuthDetail sysAuthDetail = request.getAuthDetail();
List<String> authIds;
if (CollectionUtils.isEmpty(authIds = vAuthIds(request.getAuthSource(), request.getAuthSourceType(), userId, isAdmin))) {
throw new RuntimeException("i18n_auth_source_be_canceled");
} else {
List<String> var = vAuthIds(request.getAuthTarget(), request.getAuthTargetType(), userId, isAdmin);
if (!CollectionUtils.isEmpty(authIds) && !CollectionUtils.isEmpty(var)) {
List ids = new ArrayList();
var.stream().forEach((ax) -> {
authIds.forEach((id) -> {
String authId = getAuthId(id, request.getAuthSourceType(), ax, request.getAuthTargetType(), userName);
ids.add(authId);
});
});
if (sysAuthDetail.getPrivilegeValue() == PluginSystemConstants.PRIVILEGE_VALUE.ON) {
extSysAuthDetailMapper.authDetailsChange(PluginSystemConstants.PRIVILEGE_VALUE.OFF, sysAuthDetail.getPrivilegeType(), ids);
return;
}
extSysAuthDetailMapper.authDetailsChange(PluginSystemConstants.PRIVILEGE_VALUE.ON, sysAuthDetail.getPrivilegeType(), ids);
}
}
}
public List<XpackSysAuthDetail> searchAuthDetailsModel(String authType) {
return extSysAuthDetailMapper.searchAuthTypeModel(authType);
}
public List<PluginSysMenu> menus() {
final PluginSysMenu pluginSysMenu = new PluginSysMenu();
pluginSysMenu.setMenuId(41L);
pluginSysMenu.setPid(1L);
pluginSysMenu.setHidden(false);
pluginSysMenu.setComponent("SystemAuth");
pluginSysMenu.setIcon("password");
pluginSysMenu.setTitle("权限管理");
pluginSysMenu.setName("system-auth");
pluginSysMenu.setPath("system-auth");
pluginSysMenu.setPermission("auth:read");
pluginSysMenu.setNoLayout(true);
pluginSysMenu.setType(1);
pluginSysMenu.setMenuSort(4);
return new ArrayList<PluginSysMenu>() {
{
add(pluginSysMenu);
}
};
}
static {
String[] modelTypes = new String[5];
boolean var10002 = true;
modelTypes[0] = "link";
modelTypes[1] = "dataset";
modelTypes[2] = "chart";
modelTypes[3] = "panel";
modelTypes[4] = "menu";
MODEL_TYPES = Arrays.asList(modelTypes);
}
// $FF: synthetic method
private List vAuthIds(String authSource, String authSourceType, Long userId, Boolean isAdmin) {
return (List) ((List<XpackVAuthModel>) Optional.ofNullable(searchAuthModelTree(new XpackBaseTreeRequest(authSource, authSourceType, "children"), userId, isAdmin)).orElse(new ArrayList())).stream().map(XpackVAuthModel::getId).collect(Collectors.toList());
}
private String getAuthId(String authSource, String authSourceType, String authTarget, String authTargetType, String authUser) {
String authId;
if (StringUtils.isEmpty(authId = extSysAuthMapper.findAuthId(authSource, authSourceType, authTarget, authTargetType))) {
authId = UUID.randomUUID().toString();
XpackSysAuth sysAuth = new XpackSysAuth();
sysAuth.setId(authId);
sysAuth.setAuthSource(authSource);
sysAuth.setAuthSourceType(authSourceType);
sysAuth.setAuthTarget(authTarget);
sysAuth.setAuthTargetType(authTargetType);
sysAuth.setAuthTime(System.currentTimeMillis());
sysAuth.setAuthUser(authUser);
sysAuthMapper.insertSelective(sysAuth);
extSysAuthDetailMapper.copyAuthModel(authSourceType, authId, authUser);
}
return authId;
}
}

@ -0,0 +1,365 @@
package com.ipsos.plugins.xpack.impl;
import com.ipsos.common.dto.PluginSimpleTreeNode;
import com.ipsos.common.dto.PluginSysMenu;
import com.ipsos.common.entity.XpackGridRequest;
import com.ipsos.common.util.PluginCommonUtil;
import com.ipsos.plugins.xpack.auth.entity.XpackSysAuthExample;
import com.ipsos.plugins.xpack.dept.dto.request.XpackCreateDept;
import com.ipsos.plugins.xpack.dept.dto.request.XpackDeleteDept;
import com.ipsos.plugins.xpack.dept.dto.request.XpackMoveDept;
import com.ipsos.plugins.xpack.dept.dto.response.XpackDeptTreeNode;
import com.ipsos.plugins.xpack.dept.dto.response.XpackSysDept;
import com.ipsos.plugins.xpack.dept.entity.XpackSysDeptExample;
import com.ipsos.plugins.xpack.dept.service.DeptXpackService;
import com.ipsos.plugins.xpack.mapper.dept.XpackExtDeptMapper;
import com.ipsos.plugins.xpack.mapper.dept.XpackSysDeptMapper;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.util.CollectionUtils;
@Service
public class DeptXpackDefaultService extends DeptXpackService {
public static final Long DEPT_ROOT_PID = 0L;
@Autowired(required = false)
private XpackExtDeptMapper c;
@Resource
TransactionDefinition ALLATORIxDEMO;
private static final Integer e = 0;
@Resource
private DataSourceTransactionManager C;
@Autowired(required = false)
private XpackSysDeptMapper m;
public int batchDelete(List<XpackDeleteDept> a) {
TransactionStatus transactionStatus = C.getTransaction(ALLATORIxDEMO);
try {
a = (List) a.stream().map((ax) -> {
Long var2;
if ((var2 = ax.getPid()) != DEPT_ROOT_PID) {
c.decreasingSubcount(var2);
}
return ax.getDeptId();
}).collect(Collectors.toList());
c.updateUserDeptId(a.stream().map(XpackDeleteDept::getDeptId).collect(Collectors.toList()));
int var5 = c.batchDelete(a.stream().map(XpackDeleteDept::getDeptId).collect(Collectors.toList()));
C.commit(transactionStatus);
return var5;
} catch (Exception var4) {
C.rollback(transactionStatus);
throw new RuntimeException(var4);
}
}
public List<XpackSysDept> nodesTreeByCondition(XpackGridRequest a) {
List<PluginSimpleTreeNode> allNodes = getAllNodes();
List pluginSimpleTreeNodes;
if (CollectionUtils.isEmpty(pluginSimpleTreeNodes = getPluginSimpleTreeNode(a))) {
return new ArrayList();
} else {
pluginSimpleTreeNodes = buildPluginSimpleTreeNodes(allNodes, pluginSimpleTreeNodes);
XpackSysDeptExample sysDeptExample = new XpackSysDeptExample();
if (!CollectionUtils.isEmpty(pluginSimpleTreeNodes)) {
sysDeptExample.createCriteria().andDeptIdIn(pluginSimpleTreeNodes);
}
sysDeptExample.setOrderByClause(XpackSysAuthExample.ALLATORIxDEMO("dept_sort"));
return m.selectByExample(sysDeptExample);
}
}
public List<PluginSysMenu> menus() {
PluginSysMenu var1 = createDept();
PluginSysMenu var2 = delDept();
PluginSysMenu var3 = editDept();
PluginSysMenu var4 = manageDept();
PluginSysMenu var5 = deptForm();
ArrayList var6;
(var6 = new ArrayList()).add(var1);
var6.add(var2);
var6.add(var3);
var6.add(var4);
var6.add(var5);
return var6;
}
protected InputStream readContent(String name) {
return name.getClass().getClassLoader().getResourceAsStream((new StringBuilder()).insert(0, "static/").append(name).toString());
}
public List<XpackDeptTreeNode> searchTree(Long a) {
List<XpackSysDept> deptList = nodesByPid(0L);
if (a == DEPT_ROOT_PID) {
return (List) deptList.stream().map((dept) -> {
XpackDeptTreeNode deptTreeNode = new XpackDeptTreeNode();
deptTreeNode.setId(dept.getDeptId());
deptTreeNode.setLabel(dept.getName());
deptTreeNode.setHasChildren(dept.getSubCount() > 0);
return deptTreeNode;
}).collect(Collectors.toList());
} else {
XpackSysDept var3 = m.selectByPrimaryKey(a);
if (deptList.stream().anyMatch((ax) -> ax.getDeptId() == a)) {
return (List) deptList.stream().map((ax) -> {
XpackDeptTreeNode var2 = new XpackDeptTreeNode();
var2.setId(ax.getDeptId());
var2.setLabel(ax.getName());
var2.setHasChildren(ax.getSubCount() > 0);
return var2;
}).collect(Collectors.toList());
} else {
// XpackDeptTreeNode var7 = a.ALLATORIxDEMO(var3);
//
// XpackSysDept var4;
// for (XpackSysDept var10000 = a; var10000.getPid() != DEPT_ROOT_PID; var10000 = var4) {
// XpackDeptTreeNode var5 = a.ALLATORIxDEMO(var4 = a.m.selectByPrimaryKey(a.getPid()));
// var5.setChildren(var7.toList());
// a = var4;
// var7 = var5;
// }
//
// return (List) var2.stream().map((ax) -> {
// return ax.getDeptId() == var7.getId() ? var7 : a.ALLATORIxDEMO(ax);
// }).collect(Collectors.toList());
return new ArrayList<>();
}
}
}
public int update(XpackCreateDept a) {
TransactionStatus var2 = C.getTransaction(ALLATORIxDEMO);
XpackSysDept var3 = (XpackSysDept) PluginCommonUtil.copyBean(new XpackSysDept(), a);
if (a.isTop()) {
var3.setPid(DEPT_ROOT_PID);
}
var3.setUpdateTime(System.currentTimeMillis());
var3.setUpdateBy((String) null);
Long deptId = var3.getDeptId();
XpackSysDept primaryKey = m.selectByPrimaryKey(deptId);
List<XpackSysDept> var4 = nodesByPid(var3.getPid());
try {
if (var3.getPid() != a.getPid()) {
Long var6 = a.getPid();
if (!CollectionUtils.isEmpty(var4) && var4.stream().anyMatch((ax) -> {
return StringUtils.equals(ax.getName(), var3.getName());
})) {
C.commit(var2);
return -2;
}
if (var6 != DEPT_ROOT_PID) {
c.decreasingSubcount(var6);
}
if (var3.getPid() != DEPT_ROOT_PID) {
c.incrementalSubcount(var3.getPid());
}
}
if (!CollectionUtils.isEmpty(var4) && var4.stream().anyMatch((ax) -> {
return StringUtils.equals(ax.getName(), var3.getName()) && var3.getDeptId() != ax.getDeptId();
})) {
C.commit(var2);
return -2;
} else {
int var10 = m.updateByPrimaryKeySelective(var3);
C.commit(var2);
return var10;
}
} catch (Exception var7) {
C.rollback(var2);
throw new RuntimeException(var7);
}
}
public int add(XpackCreateDept a) {
TransactionStatus var2 = C.getTransaction(ALLATORIxDEMO);
XpackSysDept var3 = (XpackSysDept) PluginCommonUtil.copyBean(new XpackSysDept(), a);
if (a.isTop()) {
var3.setPid(DEPT_ROOT_PID);
}
List<XpackSysDept> sysDeptList;
if (!CollectionUtils.isEmpty(sysDeptList = nodesByPid(var3.getPid())) && sysDeptList.stream().anyMatch((ax) -> {
return StringUtils.equals(ax.getName(), var3.getName());
})) {
C.commit(var2);
return -2;
} else {
long var4 = System.currentTimeMillis();
var3.setCreateTime(var4);
var3.setUpdateTime(var4);
var3.setCreateBy((String) null);
var3.setUpdateBy((String) null);
var3.setSubCount(e);
try {
int saveXpackSysDept = m.insert(var3);
Long var9 = null;
if ((var9 = var3.getPid()) != DEPT_ROOT_PID) {
c.incrementalSubcount(var9);
}
C.commit(var2);
return saveXpackSysDept == 1 ? saveXpackSysDept : -1;
} catch (Exception var6) {
C.rollback(var2);
throw new RuntimeException(var6);
}
}
}
public void move(XpackMoveDept a) {
TransactionStatus var2 = C.getTransaction(ALLATORIxDEMO);
try {
Long resourceId = a.getResourceId();
Long targetId = a.getTargetId();
XpackSysDept var4 = m.selectByPrimaryKey(resourceId);
c.decreasingSubcount(var4.getPid());
var4 = new XpackSysDept();
var4.setDeptId(resourceId);
var4.setPid(targetId);
m.updateByPrimaryKeySelective(var4);
c.incrementalSubcount(targetId);
C.commit(var2);
} catch (Exception var5) {
C.rollback(var2);
throw new RuntimeException(var5);
}
}
public List<XpackSysDept> nodesByPid(Long a) {
XpackSysDeptExample sysDeptExample;
XpackSysDeptExample.Criteria criteria = (sysDeptExample = new XpackSysDeptExample()).createCriteria();
if (ObjectUtils.isEmpty(a)) {
criteria.andPidEqualTo(0L);
} else {
criteria.andPidEqualTo(a);
}
sysDeptExample.setOrderByClause("dept_sort");
return m.selectByExample(sysDeptExample);
}
// $FF: synthetic method
private PluginSysMenu editDept() {
PluginSysMenu sysMenu = new PluginSysMenu();
sysMenu.setIcon((String)null);
sysMenu.setTitle("编辑组织");
sysMenu.setMenuId(20L);
sysMenu.setPid(4L);
sysMenu.setHidden(false);
sysMenu.setPermission("dept:edit");
sysMenu.setType(2);
sysMenu.setMenuSort(999);
return sysMenu;
}
// $FF: synthetic method
private List<PluginSimpleTreeNode> getAllNodes() {
return c.allNodes();
}
// $FF: synthetic method
private List<Long> buildPluginSimpleTreeNodes(List<PluginSimpleTreeNode> pluginSimpleTreeNodes, List<PluginSimpleTreeNode> pluginSimpleTreeNodes2) {
// List a = (Map)a.stream().collect(Collectors.toMap(PluginSimpleTreeNode::getId, (ax) -> {
// return ax;
// }));
// return (List)a.parallelStream().flatMap((ax) -> {
// ArrayList var2 = new ArrayList();
//
// Long var3;
// for(PluginSimpleTreeNode var10000 = ax = ax; var10000 != null; var10000 = ax = (PluginSimpleTreeNode)a.get(var3)) {
// var2.add(ax.getId());
// var3 = ax.getPid();
// }
//
// return var2.stream();
// }).distinct().collect(Collectors.toList());
return new ArrayList<>();
}
// $FF: synthetic method
private PluginSysMenu createDept() {
PluginSysMenu sysMenu = new PluginSysMenu();
sysMenu.setIcon((String)null);
sysMenu.setTitle("创建组织");
sysMenu.setMenuId(18L);
sysMenu.setPid(4L);
sysMenu.setHidden(false);
sysMenu.setPermission("dept:add");
sysMenu.setType(2);
sysMenu.setMenuSort(999);
return sysMenu;
}
// $FF: synthetic method
private List<PluginSimpleTreeNode> getPluginSimpleTreeNode(XpackGridRequest request) {
return c.nodesByExample(request.convertExample());
}
// $FF: synthetic method
private PluginSysMenu manageDept() {
PluginSysMenu sysMenu = new PluginSysMenu();
sysMenu.setIcon("dept");
sysMenu.setTitle("组织管理");
sysMenu.setMenuId(4L);
sysMenu.setPid(1L);
sysMenu.setHidden(false);
sysMenu.setComponent("SystemDept");
sysMenu.setName("system-dept");
sysMenu.setPath("dept");
sysMenu.setPermission("dept:read");
sysMenu.setType(1);
sysMenu.setSubCount(3);
sysMenu.setMenuSort(3);
return sysMenu;
}
// $FF: synthetic method
private PluginSysMenu delDept() {
PluginSysMenu sysMenu = new PluginSysMenu();
sysMenu.setIcon((String)null);
sysMenu.setTitle("删除组织");
sysMenu.setMenuId(19L);
sysMenu.setPid(4L);
sysMenu.setHidden(false);
sysMenu.setPermission("dept:del");
sysMenu.setType(2);
sysMenu.setMenuSort(999);
return sysMenu;
}
// $FF: synthetic method
private PluginSysMenu deptForm() {
PluginSysMenu sysMenu = new PluginSysMenu();
sysMenu.setIcon((String)null);
sysMenu.setTitle("组织表单");
sysMenu.setMenuId(37L);
sysMenu.setPid(1L);
sysMenu.setHidden(true);
sysMenu.setComponent("SystemDeptForm");
sysMenu.setName("system-dept-form");
sysMenu.setPath("dept-form");
sysMenu.setType(1);
sysMenu.setMenuSort(999);
return sysMenu;
}
}

@ -0,0 +1,13 @@
package com.ipsos.plugins.xpack.mapper.auth;
import com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuthDetail;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface XpackExtSysAuthDetailMapper {
void copyAuthModel(@Param("authTypeModel") String authTypeModel, @Param("authId") String authId, @Param("createUser") String createUser);
void authDetailsChange(@Param("privilegeValue") Integer privilegeValue, @Param("privilegeType") Integer privilegeType, @Param("authIds") List<String> authIds);
List<XpackSysAuthDetail> searchAuthTypeModel(@Param("authTypeModel") String authTypeModel);
}

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ipsos.plugins.xpack.mapper.auth.XpackExtSysAuthDetailMapper">
<select id="searchAuthTypeModel" resultMap="com.ipsos.plugins.xpack.mapper.auth.XpackSysAuthDetailMapper.BaseResultMap">
select
sys_auth_detail.privilege_name ,
sys_auth_detail.privilege_type ,
sys_auth_detail.privilege_value
from sys_auth_detail where sys_auth_detail.auth_id =#{authTypeModel} order by sys_auth_detail.privilege_type desc
</select>
<insert id="copyAuthModel">
INSERT INTO sys_auth_detail (
id,
auth_id,
privilege_name,
privilege_type,
privilege_value,
privilege_extend,
remark,
create_user,
create_time
) SELECT
uuid() AS id,
#{authId} AS auth_id,
sys_auth_detail.privilege_name,
sys_auth_detail.privilege_type,
sys_auth_detail.privilege_value,
sys_auth_detail.privilege_extend,
sys_auth_detail.remark,
#{createUser} AS create_user,
unix_timestamp(now())* 1000 AS create_time
FROM
sys_auth_detail where auth_id =#{authTypeModel}
</insert>
<update id="authDetailsChange">
UPDATE sys_auth_detail
SET privilege_value = #{privilegeValue}
<where>
auth_id in
<foreach collection='authIds' item='authId' open='(' separator=',' close=')'>#{authId}</foreach>
<if test="privilegeValue == 1">
and privilege_type &lt;= #{privilegeType}
</if>
<if test="privilegeValue == 0">
and privilege_type &gt;= #{privilegeType}
</if>
</where>
</update>
</mapper>

@ -0,0 +1,14 @@
package com.ipsos.plugins.xpack.mapper.auth;
import com.ipsos.plugins.xpack.auth.dto.request.XpackSysAuthRequest;
import com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuthDetailDTO;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface XpackExtSysAuthMapper {
Boolean authExist(@Param("authSource") String authSource, @Param("authTarget") String authTarget);
String findAuthId(@Param("authSource") String authSource, @Param("authSourceType") String authSourceType, @Param("authTarget") String authTarget, @Param("authTargetType") String authTargetType);
List<XpackSysAuthDetailDTO> search(XpackSysAuthRequest authRequest);
}

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ipsos.plugins.xpack.mapper.auth.XpackExtSysAuthMapper">
<resultMap id="BaseResultMapAuthDetailDTO" type="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuthDetailDTO">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="auth_id" jdbcType="VARCHAR" property="authId" />
<result column="privilege_name" jdbcType="VARCHAR" property="privilegeName" />
<result column="privilege_type" jdbcType="INTEGER" property="privilegeType" />
<result column="privilege_value" jdbcType="INTEGER" property="privilegeValue" />
<result column="privilege_extend" jdbcType="VARCHAR" property="privilegeExtend" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
<result column="auth_source" jdbcType="VARCHAR" property="authSource" />
<result column="auth_source_type" jdbcType="VARCHAR" property="authSourceType" />
<result column="auth_target" jdbcType="VARCHAR" property="authTarget" />
<result column="auth_target_type" jdbcType="VARCHAR" property="authTargetType" />
</resultMap>
<select id="search" resultMap="BaseResultMapAuthDetailDTO">
select
sys_auth.id,
sys_auth.auth_source,
sys_auth.auth_source_type,
sys_auth.auth_target,
sys_auth.auth_target_type,
sys_auth.auth_time,
sys_auth.auth_details,
sys_auth.auth_user,
sys_auth.update_time,
sys_auth_detail.auth_id,
sys_auth_detail.privilege_name ,
sys_auth_detail.privilege_type ,
sys_auth_detail.privilege_value ,
sys_auth_detail.privilege_extend
from sys_auth left join sys_auth_detail on sys_auth.id = sys_auth_detail.auth_id
<where>
sys_auth_detail.auth_id is not null
<if test="authSources != null and authSources.size > 0">
and sys_auth.auth_source in
<foreach collection="authSources" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="authTargets != null and authTargets.size > 0">
and sys_auth.auth_target in
<foreach collection="authTargets" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="authSource != null">
and sys_auth.auth_source=#{authSource}
</if>
<if test="authSourceType != null">
and sys_auth.auth_source_type=#{authSourceType}
</if>
<if test="authTarget != null">
and sys_auth.auth_target=#{authTarget}
</if>
<if test="authTargetType != null">
and sys_auth.auth_target_type=#{authTargetType}
</if>
</where>
order by sys_auth_detail.privilege_type desc
</select>
<select id="authExist" resultType="Boolean">
select if(count(1)=0,0,1) from sys_auth where auth_source=#{authSource} and auth_target=#{authTarget}
</select>
<select id="findAuthId" resultType="String">
select id from sys_auth where auth_source=#{authSource} and auth_source_type=#{authSourceType} and auth_target=#{authTarget} and auth_target_type=#{authTargetType} limit 1
</select>
</mapper>

@ -0,0 +1,9 @@
package com.ipsos.plugins.xpack.mapper.auth;
import com.ipsos.plugins.xpack.auth.dto.request.XpackBaseTreeRequest;
import com.ipsos.plugins.xpack.auth.dto.response.XpackVAuthModelDTO;
import java.util.List;
public interface XpackExtVAuthModelMapper {
List<XpackVAuthModelDTO> searchTree(XpackBaseTreeRequest baseTreeRequest);
}

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ipsos.plugins.xpack.mapper.auth.XpackExtVAuthModelMapper">
<resultMap id="BaseResultMapDTO" type="com.ipsos.plugins.xpack.auth.dto.response.XpackVAuthModelDTO">
<result column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="label" jdbcType="VARCHAR" property="label" />
<result column="pid" jdbcType="VARCHAR" property="pid" />
<result column="node_type" jdbcType="VARCHAR" property="nodeType" />
<result column="model_type" jdbcType="VARCHAR" property="modelType" />
<result column="model_inner_type" jdbcType="VARCHAR" property="modelInnerType" />
<result column="auth_type" jdbcType="VARCHAR" property="authType" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="children_count" property="childrenCount"/>
<result column="leaf" property="leaf"/>
</resultMap>
<!-- 函数嵌套会导致循环调用函数 导致查询速度变慢 所有预先经需要嵌套查询的函数分解查询-->
<select id="searchTree" resultMap="BaseResultMapDTO">
SELECT
auth.id, auth.`name`, auth.`label`,
auth.pid, auth.node_type, auth.model_type,
auth.model_inner_type, auth.auth_type, auth.create_by,
authCount.children_count AS children_count,
IF
(( authCount.children_count > 0 ), 0, 1 ) AS leaf
FROM (select get_grant_auths (#{modelType},#{createBy}) c_auth_ids) t1,
( SELECT * FROM (select GET_V_AUTH_MODEL_WITH_PARENT(get_grant_auths (#{modelType},#{createBy}),#{modelType}) c_auth_parent_ids) t2,
<if test="withExtend == 'parent' and id != null">
(select GET_V_AUTH_MODEL_WITH_PARENT(#{id},#{modelType}) c_model_parent_ids) tmp,
</if>
<if test="withExtend == 'children' and id != null">
(select GET_V_AUTH_MODEL_WITH_CHILDREN(#{id},#{modelType}) c_model_children_ids) tmc,
</if>
<if test="name != null and name !='' and withExtend == 'parent'">
(select GET_V_AUTH_MODEL_WITH_PARENT ( (select GROUP_CONCAT(id) from
v_auth_model where model_type = #{modelType} and `name` like CONCAT('%', #{name},'%')) ,#{modelType}) c_model_parent_seartch_ids) tmsc,
</if>
v_auth_model
<where>
model_type = #{modelType}
<if test="1== withAuth">
and FIND_IN_SET(v_auth_model.id,c_auth_parent_ids)
</if>
<if test="pid !=null">
and v_auth_model.pid = #{pid}
</if>
<if test="withExtend == null and id != null">
and v_auth_model.id = #{id}
</if>
<if test="withExtend == 'parent' and id != null">
and FIND_IN_SET(v_auth_model.id,c_model_parent_ids)
</if>
<if test="withExtend == 'children' and id != null">
and FIND_IN_SET(v_auth_model.id,c_model_children_ids)
</if>
<if test="name != null and name !='' and withExtend == 'parent'">
and FIND_IN_SET(v_auth_model.id,c_model_parent_seartch_ids)
</if>
<if test="name != null and name =='' and withExtend == 'parent'">
and v_auth_model.pid = '0'
</if>
</where>
) auth
LEFT JOIN (
SELECT
count( 1 ) AS `children_count`,
`authTemp`.`pid` AS `pid`
FROM
( SELECT * FROM (select GET_V_AUTH_MODEL_WITH_PARENT(get_grant_auths (#{modelType},#{createBy}),#{modelType}) cids3) t3,v_auth_model
<where>
model_type = #{modelType}
<if test="1== withAuth">
and FIND_IN_SET(v_auth_model.id,cids3)
</if>
</where>
) authTemp
GROUP BY
authTemp.pid
) authCount ON
auth.id = authCount.pid
<where>
<if test="1== withAuth">
(authCount.children_count>0 or FIND_IN_SET(auth.id,c_auth_ids) )
</if>
</where>
</select>
</mapper>

@ -0,0 +1,31 @@
package com.ipsos.plugins.xpack.mapper.auth;
import com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuthDetail;
import java.util.List;
import com.ipsos.plugins.xpack.auth.entity.XpackSysAuthDetailExample;
import org.apache.ibatis.annotations.Param;
public interface XpackSysAuthDetailMapper {
List<XpackSysAuthDetail> selectByExample(XpackSysAuthDetailExample sysAuthDetailExample);
int deleteByExample(XpackSysAuthDetailExample sysAuthDetailExample);
XpackSysAuthDetail selectByPrimaryKey(String primaryKey);
int updateByPrimaryKey(XpackSysAuthDetail sysAuthDetail);
int deleteByPrimaryKey(String primaryKey);
int insert(XpackSysAuthDetail sysAuthDetail);
int updateByExample(@Param("record") XpackSysAuthDetail record, @Param("example") XpackSysAuthDetailExample example);
int updateByPrimaryKeySelective(XpackSysAuthDetail sysAuthDetail);
int updateByExampleSelective(@Param("record") XpackSysAuthDetail record, @Param("example") XpackSysAuthDetailExample example);
long countByExample(XpackSysAuthDetailExample sysAuthDetailExample);
int insertSelective(XpackSysAuthDetail sysAuthDetail);
}

@ -0,0 +1,291 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ipsos.plugins.xpack.mapper.auth.XpackSysAuthDetailMapper">
<resultMap id="BaseResultMap" type="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuthDetail">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="auth_id" jdbcType="VARCHAR" property="authId" />
<result column="privilege_name" jdbcType="VARCHAR" property="privilegeName" />
<result column="privilege_type" jdbcType="INTEGER" property="privilegeType" />
<result column="privilege_value" jdbcType="INTEGER" property="privilegeValue" />
<result column="privilege_extend" jdbcType="VARCHAR" property="privilegeExtend" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, auth_id, privilege_name, privilege_type, privilege_value, privilege_extend, remark,
create_user, create_time, update_time
</sql>
<select id="selectByExample" parameterType="com.ipsos.plugins.xpack.auth.entity.XpackSysAuthDetailExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from sys_auth_detail
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_auth_detail
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from sys_auth_detail
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.ipsos.plugins.xpack.auth.entity.XpackSysAuthDetailExample">
delete from sys_auth_detail
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuthDetail">
insert into sys_auth_detail (id, auth_id, privilege_name,
privilege_type, privilege_value, privilege_extend,
remark, create_user, create_time,
update_time)
values (#{id,jdbcType=VARCHAR}, #{authId,jdbcType=VARCHAR}, #{privilegeName,jdbcType=VARCHAR},
#{privilegeType,jdbcType=INTEGER}, #{privilegeValue,jdbcType=INTEGER}, #{privilegeExtend,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
#{updateTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuthDetail">
insert into sys_auth_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="authId != null">
auth_id,
</if>
<if test="privilegeName != null">
privilege_name,
</if>
<if test="privilegeType != null">
privilege_type,
</if>
<if test="privilegeValue != null">
privilege_value,
</if>
<if test="privilegeExtend != null">
privilege_extend,
</if>
<if test="remark != null">
remark,
</if>
<if test="createUser != null">
create_user,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="authId != null">
#{authId,jdbcType=VARCHAR},
</if>
<if test="privilegeName != null">
#{privilegeName,jdbcType=VARCHAR},
</if>
<if test="privilegeType != null">
#{privilegeType,jdbcType=INTEGER},
</if>
<if test="privilegeValue != null">
#{privilegeValue,jdbcType=INTEGER},
</if>
<if test="privilegeExtend != null">
#{privilegeExtend,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createUser != null">
#{createUser,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ipsos.plugins.xpack.auth.entity.XpackSysAuthDetailExample" resultType="java.lang.Long">
select count(*) from sys_auth_detail
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update sys_auth_detail
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.authId != null">
auth_id = #{record.authId,jdbcType=VARCHAR},
</if>
<if test="record.privilegeName != null">
privilege_name = #{record.privilegeName,jdbcType=VARCHAR},
</if>
<if test="record.privilegeType != null">
privilege_type = #{record.privilegeType,jdbcType=INTEGER},
</if>
<if test="record.privilegeValue != null">
privilege_value = #{record.privilegeValue,jdbcType=INTEGER},
</if>
<if test="record.privilegeExtend != null">
privilege_extend = #{record.privilegeExtend,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createUser != null">
create_user = #{record.createUser,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_auth_detail
set id = #{record.id,jdbcType=VARCHAR},
auth_id = #{record.authId,jdbcType=VARCHAR},
privilege_name = #{record.privilegeName,jdbcType=VARCHAR},
privilege_type = #{record.privilegeType,jdbcType=INTEGER},
privilege_value = #{record.privilegeValue,jdbcType=INTEGER},
privilege_extend = #{record.privilegeExtend,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
create_user = #{record.createUser,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuthDetail">
update sys_auth_detail
<set>
<if test="authId != null">
auth_id = #{authId,jdbcType=VARCHAR},
</if>
<if test="privilegeName != null">
privilege_name = #{privilegeName,jdbcType=VARCHAR},
</if>
<if test="privilegeType != null">
privilege_type = #{privilegeType,jdbcType=INTEGER},
</if>
<if test="privilegeValue != null">
privilege_value = #{privilegeValue,jdbcType=INTEGER},
</if>
<if test="privilegeExtend != null">
privilege_extend = #{privilegeExtend,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createUser != null">
create_user = #{createUser,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuthDetail">
update sys_auth_detail
set auth_id = #{authId,jdbcType=VARCHAR},
privilege_name = #{privilegeName,jdbcType=VARCHAR},
privilege_type = #{privilegeType,jdbcType=INTEGER},
privilege_value = #{privilegeValue,jdbcType=INTEGER},
privilege_extend = #{privilegeExtend,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_user = #{createUser,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

@ -0,0 +1,30 @@
package com.ipsos.plugins.xpack.mapper.auth;
import com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuth;
import com.ipsos.plugins.xpack.auth.entity.XpackSysAuthExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface XpackSysAuthMapper {
int updateByPrimaryKeySelective(XpackSysAuth var1);
int updateByExample(@Param("record") XpackSysAuth record, @Param("example") XpackSysAuthExample example);
int deleteByExample(XpackSysAuthExample example);
int insert(XpackSysAuth sysAuth);
int updateByPrimaryKey(XpackSysAuth sysAuth);
int insertSelective(XpackSysAuth sysAuth);
XpackSysAuth selectByPrimaryKey(String primaryKey);
int deleteByPrimaryKey(String primaryKey);
List<XpackSysAuth> selectByExample(XpackSysAuthExample example);
long countByExample(XpackSysAuthExample example);
int updateByExampleSelective(@Param("record") XpackSysAuth record, @Param("example") XpackSysAuthExample example);
}

@ -0,0 +1,276 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ipsos.plugins.xpack.mapper.auth.XpackSysAuthMapper">
<resultMap id="BaseResultMap" type="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuth">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="auth_source" jdbcType="VARCHAR" property="authSource" />
<result column="auth_source_type" jdbcType="VARCHAR" property="authSourceType" />
<result column="auth_target" jdbcType="VARCHAR" property="authTarget" />
<result column="auth_target_type" jdbcType="VARCHAR" property="authTargetType" />
<result column="auth_time" jdbcType="BIGINT" property="authTime" />
<result column="auth_details" jdbcType="VARCHAR" property="authDetails" />
<result column="auth_user" jdbcType="VARCHAR" property="authUser" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, auth_source, auth_source_type, auth_target, auth_target_type, auth_time, auth_details,
auth_user, update_time
</sql>
<select id="selectByExample" parameterType="com.ipsos.plugins.xpack.auth.entity.XpackSysAuthExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from sys_auth
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_auth
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from sys_auth
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.ipsos.plugins.xpack.auth.entity.XpackSysAuthExample">
delete from sys_auth
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuth">
insert into sys_auth (id, auth_source, auth_source_type,
auth_target, auth_target_type, auth_time,
auth_details, auth_user, update_time
)
values (#{id,jdbcType=VARCHAR}, #{authSource,jdbcType=VARCHAR}, #{authSourceType,jdbcType=VARCHAR},
#{authTarget,jdbcType=VARCHAR}, #{authTargetType,jdbcType=VARCHAR}, #{authTime,jdbcType=BIGINT},
#{authDetails,jdbcType=VARCHAR}, #{authUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuth">
insert into sys_auth
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="authSource != null">
auth_source,
</if>
<if test="authSourceType != null">
auth_source_type,
</if>
<if test="authTarget != null">
auth_target,
</if>
<if test="authTargetType != null">
auth_target_type,
</if>
<if test="authTime != null">
auth_time,
</if>
<if test="authDetails != null">
auth_details,
</if>
<if test="authUser != null">
auth_user,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="authSource != null">
#{authSource,jdbcType=VARCHAR},
</if>
<if test="authSourceType != null">
#{authSourceType,jdbcType=VARCHAR},
</if>
<if test="authTarget != null">
#{authTarget,jdbcType=VARCHAR},
</if>
<if test="authTargetType != null">
#{authTargetType,jdbcType=VARCHAR},
</if>
<if test="authTime != null">
#{authTime,jdbcType=BIGINT},
</if>
<if test="authDetails != null">
#{authDetails,jdbcType=VARCHAR},
</if>
<if test="authUser != null">
#{authUser,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ipsos.plugins.xpack.auth.entity.XpackSysAuthExample" resultType="java.lang.Long">
select count(*) from sys_auth
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update sys_auth
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.authSource != null">
auth_source = #{record.authSource,jdbcType=VARCHAR},
</if>
<if test="record.authSourceType != null">
auth_source_type = #{record.authSourceType,jdbcType=VARCHAR},
</if>
<if test="record.authTarget != null">
auth_target = #{record.authTarget,jdbcType=VARCHAR},
</if>
<if test="record.authTargetType != null">
auth_target_type = #{record.authTargetType,jdbcType=VARCHAR},
</if>
<if test="record.authTime != null">
auth_time = #{record.authTime,jdbcType=BIGINT},
</if>
<if test="record.authDetails != null">
auth_details = #{record.authDetails,jdbcType=VARCHAR},
</if>
<if test="record.authUser != null">
auth_user = #{record.authUser,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_auth
set id = #{record.id,jdbcType=VARCHAR},
auth_source = #{record.authSource,jdbcType=VARCHAR},
auth_source_type = #{record.authSourceType,jdbcType=VARCHAR},
auth_target = #{record.authTarget,jdbcType=VARCHAR},
auth_target_type = #{record.authTargetType,jdbcType=VARCHAR},
auth_time = #{record.authTime,jdbcType=BIGINT},
auth_details = #{record.authDetails,jdbcType=VARCHAR},
auth_user = #{record.authUser,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuth">
update sys_auth
<set>
<if test="authSource != null">
auth_source = #{authSource,jdbcType=VARCHAR},
</if>
<if test="authSourceType != null">
auth_source_type = #{authSourceType,jdbcType=VARCHAR},
</if>
<if test="authTarget != null">
auth_target = #{authTarget,jdbcType=VARCHAR},
</if>
<if test="authTargetType != null">
auth_target_type = #{authTargetType,jdbcType=VARCHAR},
</if>
<if test="authTime != null">
auth_time = #{authTime,jdbcType=BIGINT},
</if>
<if test="authDetails != null">
auth_details = #{authDetails,jdbcType=VARCHAR},
</if>
<if test="authUser != null">
auth_user = #{authUser,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuth">
update sys_auth
set auth_source = #{authSource,jdbcType=VARCHAR},
auth_source_type = #{authSourceType,jdbcType=VARCHAR},
auth_target = #{authTarget,jdbcType=VARCHAR},
auth_target_type = #{authTargetType,jdbcType=VARCHAR},
auth_time = #{authTime,jdbcType=BIGINT},
auth_details = #{authDetails,jdbcType=VARCHAR},
auth_user = #{authUser,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

@ -0,0 +1,23 @@
package com.ipsos.plugins.xpack.mapper.auth;
import com.ipsos.plugins.xpack.auth.dto.response.XpackVAuthModel;
import java.util.List;
import com.ipsos.plugins.xpack.auth.entity.XpackVAuthModelExample;
import org.apache.ibatis.annotations.Param;
public interface XpackVAuthModelMapper {
long countByExample(XpackVAuthModelExample var1);
int updateByExample(@Param("record") XpackVAuthModel var1, @Param("example") XpackVAuthModelExample var2);
int insert(XpackVAuthModel var1);
int deleteByExample(XpackVAuthModelExample var1);
int updateByExampleSelective(@Param("record") XpackVAuthModel var1, @Param("example") XpackVAuthModelExample var2);
int insertSelective(XpackVAuthModel var1);
List<XpackVAuthModel> selectByExample(XpackVAuthModelExample var1);
}

@ -0,0 +1,223 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ipsos.plugins.xpack.mapper.auth.XpackVAuthModelMapper">
<resultMap id="BaseResultMap" type="com.ipsos.plugins.xpack.auth.dto.response.XpackVAuthModel">
<result column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="label" jdbcType="VARCHAR" property="label" />
<result column="pid" jdbcType="VARCHAR" property="pid" />
<result column="node_type" jdbcType="VARCHAR" property="nodeType" />
<result column="model_type" jdbcType="VARCHAR" property="modelType" />
<result column="model_inner_type" jdbcType="VARCHAR" property="modelInnerType" />
<result column="auth_type" jdbcType="VARCHAR" property="authType" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, `name`, `label`, pid, node_type, model_type, model_inner_type, auth_type, create_by
</sql>
<select id="selectByExample" parameterType="com.ipsos.plugins.xpack.auth.entity.XpackVAuthModelExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from v_auth_model
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.ipsos.plugins.xpack.auth.entity.XpackVAuthModelExample">
delete from v_auth_model
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ipsos.plugins.xpack.auth.dto.response.XpackVAuthModel">
insert into v_auth_model (id, `name`, `label`,
pid, node_type, model_type,
model_inner_type, auth_type, create_by
)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{label,jdbcType=VARCHAR},
#{pid,jdbcType=VARCHAR}, #{nodeType,jdbcType=VARCHAR}, #{modelType,jdbcType=VARCHAR},
#{modelInnerType,jdbcType=VARCHAR}, #{authType,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.ipsos.plugins.xpack.auth.dto.response.XpackVAuthModel">
insert into v_auth_model
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
`name`,
</if>
<if test="label != null">
`label`,
</if>
<if test="pid != null">
pid,
</if>
<if test="nodeType != null">
node_type,
</if>
<if test="modelType != null">
model_type,
</if>
<if test="modelInnerType != null">
model_inner_type,
</if>
<if test="authType != null">
auth_type,
</if>
<if test="createBy != null">
create_by,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="label != null">
#{label,jdbcType=VARCHAR},
</if>
<if test="pid != null">
#{pid,jdbcType=VARCHAR},
</if>
<if test="nodeType != null">
#{nodeType,jdbcType=VARCHAR},
</if>
<if test="modelType != null">
#{modelType,jdbcType=VARCHAR},
</if>
<if test="modelInnerType != null">
#{modelInnerType,jdbcType=VARCHAR},
</if>
<if test="authType != null">
#{authType,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ipsos.plugins.xpack.auth.entity.XpackVAuthModelExample" resultType="java.lang.Long">
select count(*) from v_auth_model
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update v_auth_model
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.label != null">
`label` = #{record.label,jdbcType=VARCHAR},
</if>
<if test="record.pid != null">
pid = #{record.pid,jdbcType=VARCHAR},
</if>
<if test="record.nodeType != null">
node_type = #{record.nodeType,jdbcType=VARCHAR},
</if>
<if test="record.modelType != null">
model_type = #{record.modelType,jdbcType=VARCHAR},
</if>
<if test="record.modelInnerType != null">
model_inner_type = #{record.modelInnerType,jdbcType=VARCHAR},
</if>
<if test="record.authType != null">
auth_type = #{record.authType,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update v_auth_model
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
`label` = #{record.label,jdbcType=VARCHAR},
pid = #{record.pid,jdbcType=VARCHAR},
node_type = #{record.nodeType,jdbcType=VARCHAR},
model_type = #{record.modelType,jdbcType=VARCHAR},
model_inner_type = #{record.modelInnerType,jdbcType=VARCHAR},
auth_type = #{record.authType,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
</mapper>

@ -0,0 +1,29 @@
package com.ipsos.plugins.xpack.mapper.dept;
import java.util.List;
import com.ipsos.common.dto.PluginSimpleTreeNode;
import com.ipsos.common.entity.XpackGridExample;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
public interface XpackExtDeptMapper {
List<PluginSimpleTreeNode> allNodes();
@Delete({"<script> delete from sys_dept where dept_id in <foreach collection='ids' item='id' open='(' separator=',' close=')'>#{id}</foreach> </script>"})
int batchDelete(@Param("ids") List<Long> var1);
List<PluginSimpleTreeNode> nodesByExample(XpackGridExample var1);
@Update({" update sys_dept set sub_count = sub_count-1 where dept_id = #{deptId} and sub_count > 0"})
int decreasingSubcount(@Param("deptId") Long var1);
@Update({"<script> update sys_user set dept_id = 0 where dept_id in <foreach collection='ids' item='id' open='(' separator=',' close=')'>#{id}</foreach> </script>"})
int updateUserDeptId(@Param("ids") List<Long> var1);
@Update({" update sys_dept set sub_count = sub_count+1 where dept_id = #{deptId} "})
int incrementalSubcount(@Param("deptId") Long var1);
}

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ipsos.plugins.xpack.mapper.dept.XpackExtDeptMapper">
<resultMap id="simpleNode" type="com.ipsos.common.dto.PluginSimpleTreeNode">
<id property="id" column="id" javaType="java.lang.Long" />
<result property="pid" column="pid" javaType="java.lang.Long"/>
</resultMap>
<sql id="gridCondition">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<select id="allNodes" resultMap="simpleNode">
select dept_id as id, pid from sys_dept
</select>
<select id="nodesByExample" parameterType="com.ipsos.common.entity.XpackGridExample" resultMap="simpleNode">
select dept_id as id, pid from sys_dept
<include refid="gridCondition" />
</select>
</mapper>

@ -0,0 +1,31 @@
package com.ipsos.plugins.xpack.mapper.dept;
import java.util.List;
import com.ipsos.plugins.xpack.dept.dto.response.XpackSysDept;
import com.ipsos.plugins.xpack.dept.entity.XpackSysDeptExample;
import org.apache.ibatis.annotations.Param;
public interface XpackSysDeptMapper {
int insertSelective(XpackSysDept var1);
int deleteByPrimaryKey(Long var1);
int updateByExampleSelective(@Param("record") XpackSysDept record, @Param("example") XpackSysDeptExample example);
XpackSysDept selectByPrimaryKey(Long var1);
int updateByPrimaryKey(XpackSysDept var1);
int insert(XpackSysDept var1);
List<XpackSysDept> selectByExample(XpackSysDeptExample var1);
long countByExample(XpackSysDeptExample var1);
int deleteByExample(XpackSysDeptExample var1);
int updateByExample(@Param("record") XpackSysDept record, @Param("example") XpackSysDeptExample example);
int updateByPrimaryKeySelective(XpackSysDept var1);
}

@ -0,0 +1,275 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ipsos.plugins.xpack.mapper.dept.XpackSysDeptMapper">
<resultMap id="BaseResultMap" type="com.ipsos.plugins.xpack.dept.dto.response.XpackSysDept">
<id column="dept_id" jdbcType="BIGINT" property="deptId" />
<result column="pid" jdbcType="BIGINT" property="pid" />
<result column="sub_count" jdbcType="INTEGER" property="subCount" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="dept_sort" jdbcType="INTEGER" property="deptSort" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
dept_id, pid, sub_count, `name`, dept_sort, create_by, update_by, create_time, update_time
</sql>
<select id="selectByExample" parameterType="com.ipsos.plugins.xpack.dept.entity.XpackSysDeptExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from sys_dept
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_dept
where dept_id = #{deptId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_dept
where dept_id = #{deptId,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ipsos.plugins.xpack.dept.entity.XpackSysDeptExample">
delete from sys_dept
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ipsos.plugins.xpack.dept.dto.response.XpackSysDept">
insert into sys_dept (dept_id, pid, sub_count,
`name`, dept_sort, create_by,
update_by, create_time, update_time
)
values (#{deptId,jdbcType=BIGINT}, #{pid,jdbcType=BIGINT}, #{subCount,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, #{deptSort,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
#{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ipsos.plugins.xpack.dept.dto.response.XpackSysDept">
insert into sys_dept
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">
dept_id,
</if>
<if test="pid != null">
pid,
</if>
<if test="subCount != null">
sub_count,
</if>
<if test="name != null">
`name`,
</if>
<if test="deptSort != null">
dept_sort,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">
#{deptId,jdbcType=BIGINT},
</if>
<if test="pid != null">
#{pid,jdbcType=BIGINT},
</if>
<if test="subCount != null">
#{subCount,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="deptSort != null">
#{deptSort,jdbcType=INTEGER},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ipsos.plugins.xpack.dept.entity.XpackSysDeptExample" resultType="java.lang.Long">
select count(*) from sys_dept
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update sys_dept
<set>
<if test="record.deptId != null">
dept_id = #{record.deptId,jdbcType=BIGINT},
</if>
<if test="record.pid != null">
pid = #{record.pid,jdbcType=BIGINT},
</if>
<if test="record.subCount != null">
sub_count = #{record.subCount,jdbcType=INTEGER},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.deptSort != null">
dept_sort = #{record.deptSort,jdbcType=INTEGER},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_dept
set dept_id = #{record.deptId,jdbcType=BIGINT},
pid = #{record.pid,jdbcType=BIGINT},
sub_count = #{record.subCount,jdbcType=INTEGER},
`name` = #{record.name,jdbcType=VARCHAR},
dept_sort = #{record.deptSort,jdbcType=INTEGER},
create_by = #{record.createBy,jdbcType=VARCHAR},
update_by = #{record.updateBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ipsos.plugins.xpack.dept.dto.response.XpackSysDept">
update sys_dept
<set>
<if test="pid != null">
pid = #{pid,jdbcType=BIGINT},
</if>
<if test="subCount != null">
sub_count = #{subCount,jdbcType=INTEGER},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="deptSort != null">
dept_sort = #{deptSort,jdbcType=INTEGER},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
</set>
where dept_id = #{deptId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ipsos.plugins.xpack.dept.dto.response.XpackSysDept">
update sys_dept
set pid = #{pid,jdbcType=BIGINT},
sub_count = #{subCount,jdbcType=INTEGER},
`name` = #{name,jdbcType=VARCHAR},
dept_sort = #{deptSort,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT}
where dept_id = #{deptId,jdbcType=BIGINT}
</update>
</mapper>

@ -1,7 +1,7 @@
spring.application.name=dataease
server.port=8081
#spring.aop.proxy-target-class=true
# Hikari
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle=5

@ -10,14 +10,14 @@ export function post(url, data) {
}
export function authChange(data) {
return request({
url: '/api/sys_auth/authChange',
url: '/plugin/auth/authChange',
data: data,
method: 'post'
})
}
export function authDetails(data) {
return request({
url: '/api/sys_auth/authDetails',
url: '/plugin/auth/authDetails',
data: data,
method: 'post'
})
@ -25,9 +25,13 @@ export function authDetails(data) {
export function authDetailsModel(authType) {
return request({
url: '/api/sys_auth/authDetailsModel/' + authType,
url: '/plugin/auth/authDetailsModel/' + authType,
method: 'get'
})
// return request({
// url: '/api/sys_auth/authDetailsModel/' + authType,
// method: 'get'
// })
}
export function authModel(data) {

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ipsos.common.mapper.PluginGridSql">
<sql id="gridCondition">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
@ -31,5 +30,4 @@
</foreach>
</where>
</sql>
</mapper>

@ -19,6 +19,4 @@ public abstract class PluginMenuService {
return readContent(name);
}
}

@ -17,7 +17,7 @@ public class XpackBaseTreeRequest {
private String pid;
//now 返回当前条件查询的数据 parent 返回当前数据查询的数据同时递归父节点数据; children 返回当前数据查询的数据同时递归子节点数据
private String withExtend= PluginSystemConstants.WITH_EXTEND.NOW;
private String withExtend = PluginSystemConstants.WITH_EXTEND.NOW;
private String createBy;
@ -27,7 +27,7 @@ public class XpackBaseTreeRequest {
public XpackBaseTreeRequest() {
}
public XpackBaseTreeRequest(String id,String modelType, String withExtend) {
public XpackBaseTreeRequest(String id, String modelType, String withExtend) {
this.id = id;
this.modelType = modelType;
this.withExtend = withExtend;

@ -2,11 +2,15 @@ package com.ipsos.plugins.xpack.auth.dto.request;
import com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuth;
import com.ipsos.plugins.xpack.auth.dto.response.XpackSysAuthDetail;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class XpackSysAuthRequest extends XpackSysAuth {
private List<String> authSources;

@ -0,0 +1,147 @@
package com.ipsos.plugins.xpack.auth.entity;
import com.ipsos.common.annotation.PluginResultMap;
import java.util.ArrayList;
import java.util.List;
@PluginResultMap
public class XpackSysAuthDetailExample {
protected String orderByClause;
protected List<XpackSysAuthDetailExample.Criteria> oredCriteria = new ArrayList();
protected boolean distinct;
public boolean isDistinct() {
return distinct;
}
protected XpackSysAuthDetailExample.Criteria createCriteriaInternal() {
return new XpackSysAuthDetailExample.Criteria();
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setOrderByClause(String a) {
orderByClause = a;
}
public XpackSysAuthDetailExample.Criteria or() {
XpackSysAuthDetailExample.Criteria var1 = createCriteriaInternal();
oredCriteria.add(var1);
return var1;
}
public List<XpackSysAuthDetailExample.Criteria> getOredCriteria() {
return oredCriteria;
}
public void setDistinct(boolean a) {
distinct = a;
}
public void or(XpackSysAuthDetailExample.Criteria a) {
oredCriteria.add(a);
}
public String getOrderByClause() {
return orderByClause;
}
public XpackSysAuthDetailExample() {
}
public XpackSysAuthDetailExample.Criteria createCriteria() {
XpackSysAuthDetailExample.Criteria var1 = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(var1);
}
return var1;
}
public static class Criterion {
private boolean betweenValue;
private boolean listValue;
private String condition;
private Object value;
private Object secondValue;
private String typeHandler;
private boolean noValue;
private boolean singleValue;
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
protected Criterion(String condition, Object value, String var3) {
this.condition = condition;
this.value = value;
this.typeHandler = var3;
if (this.value instanceof List) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value) {
this(condition, value, (String) null);
}
public String getTypeHandler() {
return typeHandler;
}
public String getCondition() {
return condition;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, (String) null);
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isSingleValue() {
return singleValue;
}
public Object getValue() {
return value;
}
public boolean isListValue() {
return listValue;
}
protected Criterion(String condition) {
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
}
public static class Criteria extends XpackSysAuthDetailExample.GeneratedCriteria {
protected Criteria() {
}
}
protected abstract static class GeneratedCriteria {
protected List<XpackSysAuthDetailExample.Criterion> criteria = new ArrayList();
}
}

@ -0,0 +1,187 @@
package com.ipsos.plugins.xpack.auth.entity;
import com.ipsos.common.annotation.PluginResultMap;
import java.util.ArrayList;
import java.util.List;
@PluginResultMap
public class XpackSysAuthExample {
protected boolean distinct;
protected String orderByClause;
protected List<Criteria> oredCriteria = new ArrayList();
public List<XpackSysAuthExample.Criteria> getOredCriteria() {
return oredCriteria;
}
public void setDistinct(boolean a) {
distinct = a;
}
public String getOrderByClause() {
return orderByClause;
}
public XpackSysAuthExample.Criteria createCriteria() {
XpackSysAuthExample.Criteria var1 = createCriteriaInternal();
if (this.oredCriteria.size() == 0) {
oredCriteria.add(var1);
}
return var1;
}
public static String ALLATORIxDEMO(String a) {
int var10000 = (3 ^ 5) << 4;
int var10001 = 5 << 3 ^ 2 ^ 5;
int var10002 = 5 << 4 ^ 5;
int var10003 = (a = (String)a).length();
char[] var10004 = new char[var10003];
boolean var10006 = true;
int var5 = var10003 - 1;
var10003 = var10002;
int var3;
var10002 = var3 = var5;
char[] var1 = var10004;
int var4 = var10003;
var10000 = var10002;
for(int var2 = var10001; var10000 >= 0; var10000 = var3) {
var10001 = var3;
char var6 = a.charAt(var3);
--var3;
var1[var10001] = (char)(var6 ^ var2);
if (var3 < 0) {
break;
}
var10002 = var3--;
var1[var10002] = (char)(a.charAt(var10002) ^ var4);
}
return new String(var1);
}
public static void main(String[] args) {
System.out.println("我操: " + XpackSysAuthExample.ALLATORIxDEMO("K0_!3@'B"));
}
public XpackSysAuthExample.Criteria or() {
XpackSysAuthExample.Criteria var1 = createCriteriaInternal();
oredCriteria.add(var1);
return var1;
}
public XpackSysAuthExample() {
}
public void setOrderByClause(String a) {
orderByClause = a;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public boolean isDistinct() {
return distinct;
}
public void or(XpackSysAuthExample.Criteria a) {
oredCriteria.add(a);
}
protected XpackSysAuthExample.Criteria createCriteriaInternal() {
return new XpackSysAuthExample.Criteria();
}
public static class Criterion {
private boolean betweenValue;
private boolean listValue;
private String condition;
private Object value;
private Object secondValue;
private String typeHandler;
private boolean noValue;
private boolean singleValue;
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
protected Criterion(String condition, Object value, String var3) {
this.condition = condition;
this.value = value;
this.typeHandler = var3;
if (this.value instanceof List) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value) {
this(condition, value, (String) null);
}
public String getTypeHandler() {
return typeHandler;
}
public String getCondition() {
return condition;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, (String) null);
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isSingleValue() {
return singleValue;
}
public Object getValue() {
return value;
}
public boolean isListValue() {
return listValue;
}
protected Criterion(String condition) {
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
}
public static class Criteria extends XpackSysAuthExample.GeneratedCriteria {
protected Criteria() {
}
}
protected abstract static class GeneratedCriteria {
protected List<XpackSysAuthExample.Criterion> criteria = new ArrayList();
}
}

@ -0,0 +1,186 @@
package com.ipsos.plugins.xpack.auth.entity;
import com.ipsos.common.annotation.PluginResultMap;
import java.util.ArrayList;
import java.util.List;
@PluginResultMap
public class XpackVAuthModelExample {
protected List<XpackVAuthModelExample.Criteria> oredCriteria = new ArrayList();
protected boolean distinct;
protected String orderByClause;
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public boolean isDistinct() {
return distinct;
}
public void or(XpackVAuthModelExample.Criteria a) {
oredCriteria.add(a);
}
public void setDistinct(boolean a) {
distinct = a;
}
public void setOrderByClause(String a) {
orderByClause = a;
}
public XpackVAuthModelExample() {
}
protected XpackVAuthModelExample.Criteria createCriteriaInternal() {
return new XpackVAuthModelExample.Criteria();
}
public String getOrderByClause() {
return orderByClause;
}
public XpackVAuthModelExample.Criteria or() {
XpackVAuthModelExample.Criteria var1 = createCriteriaInternal();
oredCriteria.add(var1);
return var1;
}
public XpackVAuthModelExample.Criteria createCriteria() {
XpackVAuthModelExample.Criteria var1 = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(var1);
}
return var1;
}
public static String ALLATORIxDEMO(String a) {
int var10000 = 5 << 4 ^ 4 << 1;
int var10001 = 4 << 3 ^ 2 ^ 5;
int var10002 = 5 << 4 ^ 3 << 1;
int var10003 = (a = (String)a).length();
char[] var10004 = new char[var10003];
boolean var10006 = true;
int var5 = var10003 - 1;
var10003 = var10002;
int var3;
var10002 = var3 = var5;
char[] var1 = var10004;
int var4 = var10003;
var10000 = var10002;
for(int var2 = var10001; var10000 >= 0; var10000 = var3) {
var10001 = var3;
char var6 = a.charAt(var3);
--var3;
var1[var10001] = (char)(var6 ^ var2);
if (var3 < 0) {
break;
}
var10002 = var3--;
var1[var10002] = (char)(a.charAt(var10002) ^ var4);
}
return new String(var1);
}
public static void main(String[] args) {
String u = XpackVAuthModelExample.ALLATORIxDEMO("2B&S\tN2\u0007?I");
System.out.println("我操: " + u);
}
public List<XpackVAuthModelExample.Criteria> getOredCriteria() {
return oredCriteria;
}
public static class Criterion {
private boolean betweenValue;
private boolean listValue;
private String condition;
private Object value;
private Object secondValue;
private String typeHandler;
private boolean noValue;
private boolean singleValue;
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
protected Criterion(String condition, Object value, String var3) {
this.condition = condition;
this.value = value;
this.typeHandler = var3;
if (this.value instanceof List) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value) {
this(condition, value, (String) null);
}
public String getTypeHandler() {
return typeHandler;
}
public String getCondition() {
return condition;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, (String) null);
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isSingleValue() {
return singleValue;
}
public Object getValue() {
return value;
}
public boolean isListValue() {
return listValue;
}
protected Criterion(String condition) {
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
}
public static class Criteria extends XpackVAuthModelExample.GeneratedCriteria {
protected Criteria() {
}
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria = new ArrayList();
}
}

@ -0,0 +1,167 @@
package com.ipsos.plugins.xpack.dept.entity;
import com.ipsos.common.annotation.PluginResultMap;
import com.ipsos.plugins.xpack.auth.entity.XpackVAuthModelExample;
import com.ipsos.plugins.xpack.role.entity.XpackSysRoleExample;
import java.util.ArrayList;
import java.util.List;
@PluginResultMap
public class XpackSysDeptExample {
protected boolean distinct;
protected String orderByClause;
protected List<XpackSysDeptExample.Criteria> oredCriteria = new ArrayList();
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public boolean isDistinct() {
return distinct;
}
public String getOrderByClause() {
return orderByClause;
}
public XpackSysDeptExample() {
}
public List<XpackSysDeptExample.Criteria> getOredCriteria() {
return oredCriteria;
}
public void setOrderByClause(String a) {
orderByClause = a;
}
public void setDistinct(boolean a) {
distinct = a;
}
public XpackSysDeptExample.Criteria or() {
XpackSysDeptExample.Criteria var1 = createCriteriaInternal();
oredCriteria.add(var1);
return var1;
}
protected XpackSysDeptExample.Criteria createCriteriaInternal() {
return new XpackSysDeptExample.Criteria();
}
public void or(XpackSysDeptExample.Criteria a) {
oredCriteria.add(a);
}
public XpackSysDeptExample.Criteria createCriteria() {
XpackSysDeptExample.Criteria var1 = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(var1);
}
return var1;
}
public static class Criterion {
private boolean betweenValue;
private boolean listValue;
private String condition;
private Object value;
private Object secondValue;
private String typeHandler;
private boolean noValue;
private boolean singleValue;
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
protected Criterion(String condition, Object value, String var3) {
this.condition = condition;
this.value = value;
this.typeHandler = var3;
if (this.value instanceof List) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value) {
this(condition, value, (String) null);
}
public String getTypeHandler() {
return typeHandler;
}
public String getCondition() {
return condition;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, (String) null);
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isSingleValue() {
return singleValue;
}
public Object getValue() {
return value;
}
public boolean isListValue() {
return listValue;
}
protected Criterion(String condition) {
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
}
public static class Criteria extends XpackSysDeptExample.GeneratedCriteria {
protected Criteria() {
}
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria = new ArrayList();
protected void addCriterion(String condition, Object value, String column) {
if (value == null) {
throw new RuntimeException((new StringBuilder()).insert(0, "Value for").append(column).append("cannot be null").toString());
} else {
criteria.add(new XpackSysDeptExample.Criterion(condition, value));
}
}
public XpackSysDeptExample.Criteria andDeptIdIn(List<Long> ids) {
addCriterion("dept_id in", ids, "deptId");
return (XpackSysDeptExample.Criteria) this;
}
public XpackSysDeptExample.Criteria andPidEqualTo(Long value) {
addCriterion("pid = ", value, "pid");
return (XpackSysDeptExample.Criteria) this;
}
}
}

@ -0,0 +1,188 @@
package com.ipsos.plugins.xpack.role.entity;
import com.ipsos.common.annotation.PluginResultMap;
import java.util.ArrayList;
import java.util.List;
@PluginResultMap
public class XpackSysRoleExample {
protected boolean distinct;
protected List<Criteria> oredCriteria = new ArrayList();
protected String orderByClause;
public XpackSysRoleExample.Criteria or() {
XpackSysRoleExample.Criteria var1 = createCriteriaInternal();
oredCriteria.add(var1);
return var1;
}
public List<XpackSysRoleExample.Criteria> getOredCriteria() {
return oredCriteria;
}
protected XpackSysRoleExample.Criteria createCriteriaInternal() {
return new XpackSysRoleExample.Criteria();
}
public XpackSysRoleExample() {
}
public boolean isDistinct() {
return distinct;
}
public void or(XpackSysRoleExample.Criteria a) {
oredCriteria.add(a);
}
public String getOrderByClause() {
return orderByClause;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setOrderByClause(String a) {
orderByClause = a;
}
public XpackSysRoleExample.Criteria createCriteria() {
XpackSysRoleExample.Criteria var1 = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(var1);
}
return var1;
}
public static String ALLATORIxDEMO(String a) {
int var10000 = (2 ^ 5) << 4 ^ 3 << 1;
int var10001 = 2 << 3 ^ 3 ^ 5;
int var10002 = 2 << 3 ^ 2 ^ 5;
int var10003 = (a = (String)a).length();
char[] var10004 = new char[var10003];
boolean var10006 = true;
int var5 = var10003 - 1;
var10003 = var10002;
int var3;
var10002 = var3 = var5;
char[] var1 = var10004;
int var4 = var10003;
var10001 = var10000;
var10000 = var10002;
for(int var2 = var10001; var10000 >= 0; var10000 = var3) {
var10001 = var3;
char var6 = a.charAt(var3);
--var3;
var1[var10001] = (char)(var6 ^ var2);
if (var3 < 0) {
break;
}
var10002 = var3--;
var1[var10002] = (char)(a.charAt(var10002) ^ var4);
}
return new String(var1);
}
public static void main(String[] args) {
System.out.println("我操: " + XpackSysRoleExample.ALLATORIxDEMO("s\u0013g\u0002^\u0012"));
}
public void setDistinct(boolean a) {
distinct = a;
}
public static class Criterion {
private boolean betweenValue;
private boolean listValue;
private String condition;
private Object value;
private Object secondValue;
private String typeHandler;
private boolean noValue;
private boolean singleValue;
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
protected Criterion(String condition, Object value, String var3) {
this.condition = condition;
this.value = value;
this.typeHandler = var3;
if (this.value instanceof List) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value) {
this(condition, value, (String) null);
}
public String getTypeHandler() {
return typeHandler;
}
public String getCondition() {
return condition;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, (String) null);
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isSingleValue() {
return singleValue;
}
public Object getValue() {
return value;
}
public boolean isListValue() {
return listValue;
}
protected Criterion(String condition) {
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
}
public static class Criteria extends XpackSysRoleExample.GeneratedCriteria {
protected Criteria() {
}
}
protected abstract static class GeneratedCriteria {
protected List<XpackSysRoleExample.Criterion> criteria = new ArrayList();
}
}
Loading…
Cancel
Save