mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 17:08:29 +08:00
瀚高 highgo db适配支持
瀚高db适配支持
This commit is contained in:
parent
6f5580a7aa
commit
64455c47c5
@ -286,6 +286,7 @@ subprojects {
|
|||||||
implementation group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
|
implementation group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
|
||||||
//database
|
//database
|
||||||
implementation group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
|
implementation group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
|
||||||
|
implementation group: 'org.postgresql', name: 'postgresql', version: "${postgresqlVersion}"
|
||||||
implementation group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
|
implementation group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
|
||||||
implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
|
implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
|
||||||
implementation group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
|
implementation group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
|
||||||
|
|||||||
@ -282,6 +282,7 @@ subprojects {
|
|||||||
implementation group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
|
implementation group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
|
||||||
//database
|
//database
|
||||||
implementation group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
|
implementation group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
|
||||||
|
implementation group: 'org.postgresql', name: 'postgresql', version: "${postgresqlVersion}"
|
||||||
implementation group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
|
implementation group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
|
||||||
implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
|
implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
|
||||||
implementation group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
|
implementation group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
|
||||||
|
|||||||
@ -282,6 +282,7 @@ subprojects {
|
|||||||
implementation group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
|
implementation group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
|
||||||
//database
|
//database
|
||||||
implementation group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
|
implementation group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
|
||||||
|
implementation group: 'org.postgresql', name: 'postgresql', version: "${postgresqlVersion}"
|
||||||
implementation group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
|
implementation group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
|
||||||
implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
|
implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
|
||||||
implementation group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
|
implementation group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
|
||||||
|
|||||||
@ -283,6 +283,7 @@ subprojects {
|
|||||||
implementation group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
|
implementation group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
|
||||||
//database
|
//database
|
||||||
implementation group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
|
implementation group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
|
||||||
|
implementation group: 'org.postgresql', name: 'postgresql', version: "${postgresqlVersion}"
|
||||||
implementation group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
|
implementation group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
|
||||||
implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
|
implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
|
||||||
implementation group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
|
implementation group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
|
||||||
|
|||||||
@ -61,6 +61,7 @@ swaggerVersion =1.6.2
|
|||||||
swaggerV3Version =2.1.6
|
swaggerV3Version =2.1.6
|
||||||
knife4jVersion =3.0.2
|
knife4jVersion =3.0.2
|
||||||
#database
|
#database
|
||||||
|
postgresqlVersion =42.2.20
|
||||||
mysqlconnectorjavaVersion =8.0.21
|
mysqlconnectorjavaVersion =8.0.21
|
||||||
druidVersion =1.2.5
|
druidVersion =1.2.5
|
||||||
druidspringbootstarterVersion =1.2.5
|
druidspringbootstarterVersion =1.2.5
|
||||||
|
|||||||
@ -67,7 +67,7 @@ public class Groups extends JpaBaseEntity implements Serializable {
|
|||||||
@Column
|
@Column
|
||||||
String modifiedDate;
|
String modifiedDate;
|
||||||
@Column
|
@Column
|
||||||
String status;
|
int status;
|
||||||
|
|
||||||
public Groups() {
|
public Groups() {
|
||||||
}
|
}
|
||||||
@ -153,11 +153,11 @@ public class Groups extends JpaBaseEntity implements Serializable {
|
|||||||
this.modifiedDate = modifiedDate;
|
this.modifiedDate = modifiedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStatus() {
|
public int getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStatus(String status) {
|
public void setStatus(int status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -78,13 +78,13 @@ public class Organizations extends JpaBaseEntity implements Serializable {
|
|||||||
@Column
|
@Column
|
||||||
private String email;
|
private String email;
|
||||||
@Column
|
@Column
|
||||||
private String sortIndex;
|
private long sortIndex;
|
||||||
@Column
|
@Column
|
||||||
private String ldapDn;
|
private String ldapDn;
|
||||||
@Column
|
@Column
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
private String status;
|
private int status;
|
||||||
@Column
|
@Column
|
||||||
private String extId;
|
private String extId;
|
||||||
@Column
|
@Column
|
||||||
@ -256,14 +256,6 @@ public class Organizations extends JpaBaseEntity implements Serializable {
|
|||||||
this.email = email;
|
this.email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSortOrder() {
|
|
||||||
return sortOrder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSortOrder(String sortOrder) {
|
|
||||||
this.sortOrder = sortOrder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
@ -288,11 +280,11 @@ public class Organizations extends JpaBaseEntity implements Serializable {
|
|||||||
this.namePath = namePath;
|
this.namePath = namePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSortIndex() {
|
public long getSortIndex() {
|
||||||
return sortIndex;
|
return sortIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSortIndex(String sortIndex) {
|
public void setSortIndex(long sortIndex) {
|
||||||
this.sortIndex = sortIndex;
|
this.sortIndex = sortIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,11 +298,11 @@ public class Organizations extends JpaBaseEntity implements Serializable {
|
|||||||
this.ldapDn = ldapDn;
|
this.ldapDn = ldapDn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStatus() {
|
public int getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStatus(String status) {
|
public void setStatus(int status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ public class LoginService {
|
|||||||
private static final String LOGOUT_USERINFO_UPDATE_STATEMENT = "update mxk_userinfo set lastlogofftime = ? , online = "
|
private static final String LOGOUT_USERINFO_UPDATE_STATEMENT = "update mxk_userinfo set lastlogofftime = ? , online = "
|
||||||
+ UserInfo.ONLINE.OFFLINE + " where id = ?";
|
+ UserInfo.ONLINE.OFFLINE + " where id = ?";
|
||||||
|
|
||||||
private static final String GROUPS_SELECT_STATEMENT = "select distinct g.id,g.name from mxk_userinfo u,`mxk_groups` g,mxk_group_member gm where u.id = ? and u.id=gm.memberid and gm.groupid=g.id ";
|
private static final String GROUPS_SELECT_STATEMENT = "select distinct g.id,g.name from mxk_userinfo u,mxk_groups g,mxk_group_member gm where u.id = ? and u.id=gm.memberid and gm.groupid=g.id ";
|
||||||
|
|
||||||
private static final String DEFAULT_USERINFO_SELECT_STATEMENT = "select * from mxk_userinfo where username = ?";
|
private static final String DEFAULT_USERINFO_SELECT_STATEMENT = "select * from mxk_userinfo where username = ?";
|
||||||
|
|
||||||
|
|||||||
@ -76,7 +76,7 @@ public class WorkweixinOrganizationService implements ISynchronizerService{
|
|||||||
org.setId(dept.getId()+"");
|
org.setId(dept.getId()+"");
|
||||||
org.setName(dept.getName());
|
org.setName(dept.getName());
|
||||||
org.setParentId(dept.getParentid()+"");
|
org.setParentId(dept.getParentid()+"");
|
||||||
org.setSortIndex(dept.getOrder()+"");
|
org.setSortIndex(dept.getOrder());
|
||||||
return org;
|
return org;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
maxkey-lib/hgjdbc-6.0.4-jdbc42.jar
Normal file
BIN
maxkey-lib/hgjdbc-6.0.4-jdbc42.jar
Normal file
Binary file not shown.
Binary file not shown.
@ -176,7 +176,7 @@ public class OrganizationsService extends JpaBaseService<Organizations>{
|
|||||||
// 排序
|
// 排序
|
||||||
Cell cell = row.getCell(k);
|
Cell cell = row.getCell(k);
|
||||||
String sortIndex=getValue(cell);
|
String sortIndex=getValue(cell);
|
||||||
organization.setSortIndex(sortIndex.equals("") ? "1" : sortIndex);
|
organization.setSortIndex(sortIndex.equals("") ? 1 : Integer.parseInt(sortIndex));
|
||||||
} else if (k == 11) {
|
} else if (k == 11) {
|
||||||
// 联系人
|
// 联系人
|
||||||
Cell cell = row.getCell(k);
|
Cell cell = row.getCell(k);
|
||||||
@ -219,7 +219,7 @@ public class OrganizationsService extends JpaBaseService<Organizations>{
|
|||||||
organization.setDescription(getValue(cell));
|
organization.setDescription(getValue(cell));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
organization.setStatus("1");
|
organization.setStatus(1);
|
||||||
orgsList.add(organization);
|
orgsList.add(organization);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,32 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.AccountsMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="appId != null and appId != ''">
|
||||||
|
and appid = #{appId}
|
||||||
|
</if>
|
||||||
|
<if test="username != null and username != ''">
|
||||||
|
and username = #{username}
|
||||||
|
</if>
|
||||||
|
<if test="relatedUsername != null and relatedUsername != ''">
|
||||||
|
and relatedusername = #{relatedUsername}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="Accounts" resultType="Accounts">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_accounts
|
||||||
|
where
|
||||||
|
(1=1)
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.AppsAdaptersMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and name like '%${name}%'
|
||||||
|
</if>
|
||||||
|
<if test="protocol != null and protocol != ''">
|
||||||
|
and protocol = #{protocol}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="AppsAdapters" resultType="AppsAdapters">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_apps_adapters
|
||||||
|
where
|
||||||
|
(1=1)
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
order by sortindex
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.AppsCasDetailsMapper">
|
||||||
|
<select id="getAppDetails" parameterType="string" resultType="AppsCasDetails">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_apps_cas_details cd,
|
||||||
|
mxk_apps app
|
||||||
|
where
|
||||||
|
status = 1
|
||||||
|
and cd.id = app.id
|
||||||
|
and (
|
||||||
|
app.id = #{value}
|
||||||
|
or lower(cd.service) = lower(substring(#{value},1,length(cd.service)))
|
||||||
|
)
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.AppsFormBasedDetailsMapper">
|
||||||
|
|
||||||
|
<select id="getAppDetails" parameterType="string" resultType="AppsFormBasedDetails">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_apps_form_based_details fbd,
|
||||||
|
mxk_apps app
|
||||||
|
where
|
||||||
|
app.id = #{value}
|
||||||
|
and fbd.id = #{value}
|
||||||
|
and fbd.id = app.id
|
||||||
|
and status = 1
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.AppsJwtDetailsMapper">
|
||||||
|
|
||||||
|
<select id="getAppDetails" parameterType="string" resultType="AppsJwtDetails">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_apps_jwt_details jd,
|
||||||
|
mxk_apps app
|
||||||
|
where
|
||||||
|
app.id = #{value}
|
||||||
|
and jd.id = #{value}
|
||||||
|
and jd.id = app.id
|
||||||
|
and status = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,197 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.AppsMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and name like '%${name}%'
|
||||||
|
</if>
|
||||||
|
<if test="protocol != null and protocol != ''">
|
||||||
|
and protocol = #{protocol}
|
||||||
|
</if>
|
||||||
|
<if test="credential != null and credential != ''">
|
||||||
|
and credential = #{credential}
|
||||||
|
</if>
|
||||||
|
<if test="category != null and category != ''">
|
||||||
|
and category = #{category}
|
||||||
|
</if>
|
||||||
|
<if test="vendor != null and vendor != ''">
|
||||||
|
and vendor = #{vendor}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="Apps" resultType="Apps">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_apps
|
||||||
|
where
|
||||||
|
(1=1)
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
order by sortindex
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insertApp" parameterType="Apps">
|
||||||
|
insert into mxk_apps(
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
icon,
|
||||||
|
loginurl,
|
||||||
|
protocol,
|
||||||
|
category,
|
||||||
|
secret,
|
||||||
|
description,
|
||||||
|
vendor,
|
||||||
|
vendorurl,
|
||||||
|
|
||||||
|
credential,
|
||||||
|
sharedusername,
|
||||||
|
sharedpassword,
|
||||||
|
systemuserattr,
|
||||||
|
|
||||||
|
isextendattr,
|
||||||
|
extendattr,
|
||||||
|
userpropertys,
|
||||||
|
|
||||||
|
issignature,
|
||||||
|
|
||||||
|
isadapter,
|
||||||
|
adapter,
|
||||||
|
|
||||||
|
principal,
|
||||||
|
credentials,
|
||||||
|
|
||||||
|
visible,
|
||||||
|
|
||||||
|
sortindex,
|
||||||
|
|
||||||
|
createdby,
|
||||||
|
createddate,
|
||||||
|
|
||||||
|
status,
|
||||||
|
|
||||||
|
logouturl,
|
||||||
|
logouttype
|
||||||
|
)values(
|
||||||
|
#{id},
|
||||||
|
#{name},
|
||||||
|
#{icon},
|
||||||
|
#{loginUrl},
|
||||||
|
#{protocol},
|
||||||
|
#{category},
|
||||||
|
#{secret},
|
||||||
|
#{description},
|
||||||
|
#{vendor} ,
|
||||||
|
#{vendorUrl},
|
||||||
|
|
||||||
|
#{credential},
|
||||||
|
#{sharedUsername},
|
||||||
|
#{sharedPassword},
|
||||||
|
#{systemUserAttr},
|
||||||
|
|
||||||
|
#{isExtendAttr},
|
||||||
|
#{extendAttr},
|
||||||
|
#{userPropertys},
|
||||||
|
#{isSignature},
|
||||||
|
|
||||||
|
#{isAdapter},
|
||||||
|
#{adapter},
|
||||||
|
|
||||||
|
#{principal},
|
||||||
|
#{credentials},
|
||||||
|
|
||||||
|
#{visible},
|
||||||
|
|
||||||
|
#{sortIndex},
|
||||||
|
|
||||||
|
#{createdBy},
|
||||||
|
#{createdDate} ,
|
||||||
|
|
||||||
|
#{status},
|
||||||
|
|
||||||
|
#{logoutUrl},
|
||||||
|
#{logoutType}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateApp" parameterType="Apps" >
|
||||||
|
update mxk_apps set
|
||||||
|
name = #{name},
|
||||||
|
<if test="icon != null">
|
||||||
|
icon = #{icon},
|
||||||
|
</if>
|
||||||
|
loginurl = #{loginUrl},
|
||||||
|
protocol = #{protocol},
|
||||||
|
category = #{category},
|
||||||
|
secret = #{secret},
|
||||||
|
description = #{description},
|
||||||
|
vendor = #{vendor},
|
||||||
|
vendorurl = #{vendorUrl},
|
||||||
|
|
||||||
|
credential = #{credential},
|
||||||
|
sharedusername = #{sharedUsername},
|
||||||
|
sharedpassword = #{sharedPassword},
|
||||||
|
systemuserattr = #{systemUserAttr},
|
||||||
|
<!--
|
||||||
|
isextendattr = #{isExtendAttr},
|
||||||
|
extendattr = #{extendAttr},
|
||||||
|
-->
|
||||||
|
userpropertys = #{userPropertys},
|
||||||
|
issignature = #{isSignature},
|
||||||
|
|
||||||
|
<if test="adapter != null">
|
||||||
|
isadapter = #{isAdapter},
|
||||||
|
adapter = #{adapter},
|
||||||
|
</if>
|
||||||
|
principal = #{principal},
|
||||||
|
credentials = #{credentials},
|
||||||
|
visible = #{visible},
|
||||||
|
sortindex = #{sortIndex},
|
||||||
|
|
||||||
|
modifiedby = #{modifiedBy},
|
||||||
|
modifieddate = #{modifiedDate},
|
||||||
|
|
||||||
|
status = #{status},
|
||||||
|
|
||||||
|
logouturl = #{logoutUrl},
|
||||||
|
logouttype = #{logoutType}
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="queryMyApps" parameterType="UserApps" resultType="UserApps">
|
||||||
|
select distinct
|
||||||
|
app.*
|
||||||
|
from
|
||||||
|
mxk_apps app,mxk_group_privileges gp,mxk_groups g
|
||||||
|
where
|
||||||
|
app.id=gp.appid
|
||||||
|
and gp.groupid=g.id
|
||||||
|
and app.visible != 0
|
||||||
|
and (
|
||||||
|
g.id='ROLE_ALL_USER'
|
||||||
|
or g.id in(
|
||||||
|
select
|
||||||
|
gm.groupid
|
||||||
|
from
|
||||||
|
mxk_group_member gm,mxk_userinfo u
|
||||||
|
where gm.memberid = u.id
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and u.id = #{userId}
|
||||||
|
</if>
|
||||||
|
<if test="username != null and username != ''">
|
||||||
|
and u.username = #{username}
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and name = #{name}
|
||||||
|
</if>
|
||||||
|
order by sortindex
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.AppsSaml20DetailsMapper">
|
||||||
|
|
||||||
|
<select id="getAppDetails" parameterType="string" resultType="AppsSaml20Details">
|
||||||
|
select
|
||||||
|
svd.certissuer,
|
||||||
|
svd.certsubject,
|
||||||
|
svd.certexpiration,
|
||||||
|
svd.keystore,
|
||||||
|
svd.spacsurl ,
|
||||||
|
svd.issuer,
|
||||||
|
svd.entityid,
|
||||||
|
svd.audience,
|
||||||
|
svd.validityinterval ,
|
||||||
|
svd.nameidformat,
|
||||||
|
svd.encrypted,
|
||||||
|
svd.binding,
|
||||||
|
svd.nameidconvert,
|
||||||
|
svd.signature,
|
||||||
|
svd.digestmethod,
|
||||||
|
svd.metaurl,
|
||||||
|
app.*
|
||||||
|
from
|
||||||
|
mxk_apps_saml_v20_details svd,
|
||||||
|
mxk_apps app
|
||||||
|
where
|
||||||
|
app.id = #{value}
|
||||||
|
and svd.id = #{value}
|
||||||
|
and svd.id = app.id
|
||||||
|
and app.status = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.AppsTokenBasedDetailsMapper">
|
||||||
|
|
||||||
|
<select id="getAppDetails" parameterType="string" resultType="AppsTokenBasedDetails">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_apps_token_based_details tbd,
|
||||||
|
mxk_apps app
|
||||||
|
where
|
||||||
|
app.id = #{value}
|
||||||
|
and tbd.id = #{value}
|
||||||
|
and tbd.id = app.id
|
||||||
|
and status = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.ForgotPasswordMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,260 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.GroupMemberMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and name = #{name}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- GROUP_MEMBER User Member-->
|
||||||
|
<select id="allMemberInGroup" parameterType="GroupMember" resultType="GroupMember">
|
||||||
|
select distinct
|
||||||
|
u.id,
|
||||||
|
u.username,
|
||||||
|
u.usertype,
|
||||||
|
u.windowsaccount,
|
||||||
|
|
||||||
|
u.displayname ,
|
||||||
|
u.nickname ,
|
||||||
|
u.namezhspell,
|
||||||
|
u.namezhshortspell,
|
||||||
|
u.givenname ,
|
||||||
|
u.middlename ,
|
||||||
|
u.familyname ,
|
||||||
|
|
||||||
|
u.gender,
|
||||||
|
|
||||||
|
u.authntype,
|
||||||
|
u.mobile,
|
||||||
|
u.email,
|
||||||
|
u.workemail,
|
||||||
|
u.workphonenumber,
|
||||||
|
|
||||||
|
u.employeenumber,
|
||||||
|
u.division,
|
||||||
|
u.costcenter,
|
||||||
|
u.organization,
|
||||||
|
u.departmentid,
|
||||||
|
u.department,
|
||||||
|
u.jobtitle,
|
||||||
|
u.joblevel,
|
||||||
|
|
||||||
|
|
||||||
|
u.createdby,
|
||||||
|
u.createddate,
|
||||||
|
u.modifiedby,
|
||||||
|
u.modifieddate,
|
||||||
|
|
||||||
|
u.status
|
||||||
|
from
|
||||||
|
mxk_userinfo u
|
||||||
|
where 1 = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="memberInGroup" parameterType="GroupMember" resultType="GroupMember">
|
||||||
|
select distinct
|
||||||
|
gm.id,
|
||||||
|
u.username,
|
||||||
|
u.usertype,
|
||||||
|
u.windowsaccount,
|
||||||
|
|
||||||
|
u.displayname ,
|
||||||
|
u.nickname ,
|
||||||
|
u.namezhspell,
|
||||||
|
u.namezhshortspell,
|
||||||
|
u.givenname ,
|
||||||
|
u.middlename ,
|
||||||
|
u.familyname ,
|
||||||
|
|
||||||
|
u.gender,
|
||||||
|
|
||||||
|
u.authntype,
|
||||||
|
u.mobile,
|
||||||
|
u.email,
|
||||||
|
u.workemail,
|
||||||
|
u.workphonenumber,
|
||||||
|
|
||||||
|
u.employeenumber,
|
||||||
|
u.division,
|
||||||
|
u.costcenter,
|
||||||
|
u.organization,
|
||||||
|
u.departmentid,
|
||||||
|
u.department,
|
||||||
|
u.jobtitle,
|
||||||
|
u.joblevel,
|
||||||
|
|
||||||
|
|
||||||
|
u.createdby,
|
||||||
|
u.createddate,
|
||||||
|
u.modifiedby,
|
||||||
|
u.modifieddate,
|
||||||
|
|
||||||
|
u.status
|
||||||
|
from
|
||||||
|
mxk_userinfo u,
|
||||||
|
mxk_groups g,
|
||||||
|
mxk_group_member gm
|
||||||
|
where 1 = 1
|
||||||
|
<if test="groupId != null and groupId != ''">
|
||||||
|
and gm.groupid = #{groupId}
|
||||||
|
and g.id = #{groupId}
|
||||||
|
</if>
|
||||||
|
<if test="groupName != null and groupName != ''">
|
||||||
|
and g.name = #{groupName}
|
||||||
|
</if>
|
||||||
|
<if test="username != null and username != ''">
|
||||||
|
and u.username = #{username}
|
||||||
|
</if>
|
||||||
|
<if test="displayName != null and displayName != ''">
|
||||||
|
and u.displayname like '%${displayName}%'
|
||||||
|
</if>
|
||||||
|
and gm.type in( 'USER','USER-DYNAMIC')
|
||||||
|
and gm.groupid = g.id
|
||||||
|
and gm.memberid = u.id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="memberNotInGroup" parameterType="GroupMember" resultType="GroupMember">
|
||||||
|
select distinct
|
||||||
|
u.id,
|
||||||
|
u.username,
|
||||||
|
u.usertype,
|
||||||
|
u.windowsaccount,
|
||||||
|
|
||||||
|
u.displayname ,
|
||||||
|
u.nickname ,
|
||||||
|
u.namezhspell,
|
||||||
|
u.namezhshortspell,
|
||||||
|
u.givenname ,
|
||||||
|
u.middlename ,
|
||||||
|
u.familyname ,
|
||||||
|
|
||||||
|
u.gender,
|
||||||
|
|
||||||
|
u.authntype,
|
||||||
|
u.mobile,
|
||||||
|
u.email,
|
||||||
|
u.workemail,
|
||||||
|
u.workphonenumber,
|
||||||
|
|
||||||
|
u.employeenumber,
|
||||||
|
u.division,
|
||||||
|
u.costcenter,
|
||||||
|
u.organization,
|
||||||
|
u.departmentid,
|
||||||
|
u.department,
|
||||||
|
u.jobtitle,
|
||||||
|
u.joblevel,
|
||||||
|
|
||||||
|
|
||||||
|
u.createdby,
|
||||||
|
u.createddate,
|
||||||
|
u.modifiedby,
|
||||||
|
u.modifieddate,
|
||||||
|
|
||||||
|
u.status
|
||||||
|
from
|
||||||
|
mxk_userinfo u
|
||||||
|
where
|
||||||
|
u.id not in(
|
||||||
|
select gm.memberid
|
||||||
|
from mxk_groups g,mxk_group_member gm
|
||||||
|
where 1 = 1
|
||||||
|
<if test="groupId != null and groupId != ''">
|
||||||
|
and gm.groupid = #{groupId}
|
||||||
|
and g.id = #{groupId}
|
||||||
|
</if>
|
||||||
|
<if test="groupName != null and groupName != ''">
|
||||||
|
and g.name = #{groupName}
|
||||||
|
</if>
|
||||||
|
and gm.type in( 'USER','USER-DYNAMIC')
|
||||||
|
and gm.groupid = g.id
|
||||||
|
)
|
||||||
|
<if test="username != null and username != ''">
|
||||||
|
and u.username = #{username}
|
||||||
|
</if>
|
||||||
|
<if test="displayName != null and displayName != ''">
|
||||||
|
and u.displayname like '%${displayName}%'
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- GROUP_MEMBER Group Member-->
|
||||||
|
<select id="groupMemberInGroup" parameterType="GroupMember" resultType="Groups">
|
||||||
|
select distinct
|
||||||
|
ig.*
|
||||||
|
from
|
||||||
|
mxk_groups ig,
|
||||||
|
mxk_groups g,
|
||||||
|
mxk_group_member gm
|
||||||
|
where
|
||||||
|
1 = 1
|
||||||
|
and gm.groupid = g.id
|
||||||
|
and gm.memberid = ig.id
|
||||||
|
and gm.type = 'GROUP'
|
||||||
|
<if test="groupId != null and groupId != ''">
|
||||||
|
and gm.groupid = #{groupId}
|
||||||
|
and g.id = #{groupId}
|
||||||
|
</if>
|
||||||
|
<if test="groupName != null and groupName != ''">
|
||||||
|
and g.name = #{groupName}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="addDynamicGroupMember" parameterType="Groups" >
|
||||||
|
insert into mxk_group_member(
|
||||||
|
id,
|
||||||
|
groupid,
|
||||||
|
memberid,
|
||||||
|
type
|
||||||
|
)
|
||||||
|
select
|
||||||
|
concat_ws('-','UD','${id}',u.id) id,
|
||||||
|
'${id}' groupid,
|
||||||
|
u.id memberid,
|
||||||
|
'USER-DYNAMIC' as type
|
||||||
|
from mxk_userinfo u
|
||||||
|
where not exists(
|
||||||
|
select 1 from mxk_group_member gm
|
||||||
|
where gm.groupid=#{id}
|
||||||
|
and gm.memberid=u.id
|
||||||
|
and gm.type='USER-DYNAMIC'
|
||||||
|
)
|
||||||
|
<if test="filters != null and filters != ''">
|
||||||
|
and (${filters})
|
||||||
|
</if>
|
||||||
|
<if test="orgIdsList != null and orgIdsList != ''">
|
||||||
|
and u.departmentid in( ${orgIdsList})
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteDynamicGroupMember" parameterType="Groups" >
|
||||||
|
delete from mxk_group_member gm
|
||||||
|
where type = 'user-dynamic'
|
||||||
|
and gm.groupid=#{id}
|
||||||
|
and not exists(
|
||||||
|
select 1
|
||||||
|
from mxk_userinfo u
|
||||||
|
where 1 = 1
|
||||||
|
and u.id=gm.memberid
|
||||||
|
<if test="filters != null and filters != ''">
|
||||||
|
and (${filters})
|
||||||
|
</if>
|
||||||
|
<if test="orgIdsList != null and orgIdsList != ''">
|
||||||
|
and u.departmentid in ( ${orgIdsList})
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByGroupId" parameterType="string" >
|
||||||
|
delete from mxk_group_member gm
|
||||||
|
where gm.groupid=#{value}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.GroupPrivilegesMapper" >
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and apps.id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and apps.name like '%${name}%'
|
||||||
|
</if>
|
||||||
|
<if test="protocol != null and protocol != ''">
|
||||||
|
and apps.protocol = #{protocol}
|
||||||
|
</if>
|
||||||
|
<if test="category != null and category != ''">
|
||||||
|
and apps.category = #{category}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- AppGroup -->
|
||||||
|
<select id="appsInGroup" parameterType="GroupPrivileges" resultType="GroupPrivileges">
|
||||||
|
select
|
||||||
|
gp.id,
|
||||||
|
gp.groupid,
|
||||||
|
gp.appid,
|
||||||
|
apps.name,
|
||||||
|
apps.icon,
|
||||||
|
apps.loginurl,
|
||||||
|
apps.protocol,
|
||||||
|
apps.category,
|
||||||
|
apps.description,
|
||||||
|
apps.vendor,
|
||||||
|
apps.vendorurl
|
||||||
|
from
|
||||||
|
mxk_apps apps,
|
||||||
|
mxk_group_privileges gp
|
||||||
|
where
|
||||||
|
gp.appid=apps.id
|
||||||
|
and gp.groupid = #{groupId}
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="appsNotInGroup" parameterType="GroupPrivileges" resultType="GroupPrivileges">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_apps apps
|
||||||
|
where
|
||||||
|
1 = 1
|
||||||
|
and apps.id not in(
|
||||||
|
select
|
||||||
|
appid
|
||||||
|
from
|
||||||
|
mxk_group_privileges
|
||||||
|
where
|
||||||
|
groupid = #{groupId}
|
||||||
|
)
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.GroupsMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and name like '%${name}%'
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="Groups" resultType="Groups">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_groups
|
||||||
|
where
|
||||||
|
(1=1)
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryDynamicGroups" parameterType="Groups" resultType="Groups">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_groups
|
||||||
|
where
|
||||||
|
dynamic = '1'
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="logisticDelete" parameterType="Groups" >
|
||||||
|
update mxk_groups set
|
||||||
|
status = '2'
|
||||||
|
where 1 = 1
|
||||||
|
<if test="id != null">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != name">
|
||||||
|
and name = #{name}
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||||
|
update mxk_groups set status='2' where id in
|
||||||
|
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -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="org.maxkey.persistence.mapper.HistoryLoginAppsMapper" >
|
||||||
|
|
||||||
|
<sql id="dao_where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="sessionId != null and sessionId != ''">
|
||||||
|
and sessionid = #{sessionId}
|
||||||
|
</if>
|
||||||
|
<if test="appId != null and appId != ''">
|
||||||
|
and appid = #{appId}
|
||||||
|
</if>
|
||||||
|
<if test="appName != null and appName != ''">
|
||||||
|
and appname like concat('%',#{appName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="uid != null and uid != ''">
|
||||||
|
and uid = #{uid}
|
||||||
|
</if>
|
||||||
|
<if test="username != null and username != ''">
|
||||||
|
and username like concat('%',#{username},'%')
|
||||||
|
</if>
|
||||||
|
<if test="displayName != null and displayName != ''">
|
||||||
|
and displayname like concat('%',#{displayName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="startDate != null and startDate != ''">
|
||||||
|
and logintime >= #{startDate}
|
||||||
|
</if>
|
||||||
|
<if test="endDate != null and endDate != ''">
|
||||||
|
and #{endDate} >= logintime
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="HistoryLoginApps" resultType="HistoryLoginApps">
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
sessionid,
|
||||||
|
appid,
|
||||||
|
appname,
|
||||||
|
uid,
|
||||||
|
username,
|
||||||
|
displayname,
|
||||||
|
to_char(logintime,'YYYY-MM-DD HH24:MI:SS') as logintime
|
||||||
|
from mxk_history_login_apps
|
||||||
|
where 1 = 1
|
||||||
|
<include refid="dao_where_statement"/>
|
||||||
|
|
||||||
|
order by logintime desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.HistoryLoginMapper" >
|
||||||
|
|
||||||
|
<sql id="dao_where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="uid != null and uid != ''">
|
||||||
|
and uid = #{uid}
|
||||||
|
</if>
|
||||||
|
<if test="username != null and username != '' ">
|
||||||
|
and lower(username) like lower(concat('%',#{username},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="message != null and message != '' ">
|
||||||
|
and lower(message) like lower(concat('%',#{message},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="displayName != null and displayName != '' ">
|
||||||
|
and lower(displayname) like lower(concat('%',#{displayName},'%'))
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="startDate != null and startDate != ''">
|
||||||
|
and logintime >= #{startDate}
|
||||||
|
</if>
|
||||||
|
<if test="endDate != null and endDate != ''">
|
||||||
|
and #{endDate} >= logintime
|
||||||
|
</if>
|
||||||
|
<if test="sessionId != null and sessionId != ''">
|
||||||
|
and sessionid = #{sessionId}
|
||||||
|
</if>
|
||||||
|
<if test="loginType != null and loginType != ''">
|
||||||
|
and logintype = #{loginType}
|
||||||
|
</if>
|
||||||
|
<if test="sourceIp != null and sourceIp != ''">
|
||||||
|
and sourceip = #{sourceIp}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="HistoryLogin" resultType="HistoryLogin">
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
sessionid,
|
||||||
|
uid,
|
||||||
|
username,
|
||||||
|
displayname,
|
||||||
|
logintype,
|
||||||
|
message,
|
||||||
|
code,
|
||||||
|
provider,
|
||||||
|
sourceip,
|
||||||
|
browser,
|
||||||
|
platform,
|
||||||
|
application,
|
||||||
|
loginurl,
|
||||||
|
to_char(logintime,'YYYY-MM-DD HH24:MI:SS') as logintime,
|
||||||
|
to_char(logouttime,'YYYY-MM-DD HH24:MI:SS') as logouttime
|
||||||
|
from mxk_history_login
|
||||||
|
where 1 = 1
|
||||||
|
<include refid="dao_where_statement"/>
|
||||||
|
|
||||||
|
order by logintime desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="logout" parameterType="java.lang.String" >
|
||||||
|
update mxk_history_login set
|
||||||
|
logouttime = current_timestamp
|
||||||
|
where
|
||||||
|
sessionid = #{value}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.HistoryLogsMapper" >
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="serviceName != null and serviceName != '' ">
|
||||||
|
and lower(servicename) like lower(concat('%',#{serviceName},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="message != null and message != '' ">
|
||||||
|
and lower(message) like lower(concat('%',#{message},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="startDate != null and startDate != '' ">
|
||||||
|
and createddate between #{startDate} and #{endDate}
|
||||||
|
</if>
|
||||||
|
<if test="createdBy != null and createdBy != ''">
|
||||||
|
and createdby = #{createdBy}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="username != null and username != ''">
|
||||||
|
and lower(username) like lower(concat('%',#{username},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="messageType != null and messageType != ''">
|
||||||
|
and messagetype = #{messageType}
|
||||||
|
</if>
|
||||||
|
<if test="operateType != null and operateType != ''">
|
||||||
|
and operatetype = #{operateType}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="HistoryLogs" resultType="HistoryLogs">
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
tid,
|
||||||
|
tname,
|
||||||
|
servicename ,
|
||||||
|
code,
|
||||||
|
message ,
|
||||||
|
content,
|
||||||
|
operatetype,
|
||||||
|
messagetype,
|
||||||
|
username,
|
||||||
|
createddate,
|
||||||
|
createdby
|
||||||
|
from mxk_history_logs
|
||||||
|
where 1 = 1
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
|
||||||
|
order by createddate desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.NoticesMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="title != null and title != ''">
|
||||||
|
and title like '%${title}%'
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="Notices" resultType="Notices">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_notices
|
||||||
|
where
|
||||||
|
(1=1)
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
order by modifieddate desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryLastedNotices" parameterType="Notices" resultType="Notices">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_notices
|
||||||
|
order by modifieddate desc
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.OrganizationsMapper" >
|
||||||
|
|
||||||
|
<sql id="dao_where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != '' ">
|
||||||
|
and name like '%#{name}%'
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null and parentId != '' ">
|
||||||
|
and parentid = #{parentId}
|
||||||
|
</if>
|
||||||
|
<if test="parentName != null and parentName != ''">
|
||||||
|
and parentname like '%#{parentName}%'
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="Organizations" resultType="Organizations">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from mxk_organizations
|
||||||
|
where 1 = 1
|
||||||
|
<include refid="dao_where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="logisticDelete" parameterType="Organizations" >
|
||||||
|
update mxk_organizations set status = '2'
|
||||||
|
where 1 = 1
|
||||||
|
<if test="id != null and id != '' ">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != name">
|
||||||
|
and name = #{name}
|
||||||
|
</if>
|
||||||
|
<if test="enable != null">
|
||||||
|
and status = '1'
|
||||||
|
</if>
|
||||||
|
<if test="codePath != null">
|
||||||
|
and codepath = #{codePath}
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||||
|
UPDATE MXK_ORGANIZATIONS SET STATUS = '2'
|
||||||
|
WHERE ID IN
|
||||||
|
<foreach collection="ids" item="selectId" open="(" separator="," close=")">
|
||||||
|
#{selectId}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +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="org.maxkey.persistence.mapper.PasswordPolicyMapper" >
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.RegistrationMapper">
|
||||||
|
|
||||||
|
<select id="queryUserInfoByEmail" parameterType="string" resultType="UserInfo">
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
email
|
||||||
|
from
|
||||||
|
userinfo
|
||||||
|
where
|
||||||
|
email = #{value}
|
||||||
|
union
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
workemail eamil
|
||||||
|
from
|
||||||
|
mxk_registration
|
||||||
|
where
|
||||||
|
workemail = #{value}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,82 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.ReportMapper" >
|
||||||
|
<!-- DAY COUNT 一天访问量 -->
|
||||||
|
<select id="analysisDay" resultType="Integer">
|
||||||
|
select
|
||||||
|
count(id) reportcount
|
||||||
|
from mxk_history_login
|
||||||
|
where
|
||||||
|
date(logintime) =current_date
|
||||||
|
</select>
|
||||||
|
<!-- 本月新用户统计 -->
|
||||||
|
<select id="analysisNewUsers" parameterType="String" resultType="Integer">
|
||||||
|
select
|
||||||
|
count(*) reportcount
|
||||||
|
from mxk_userinfo
|
||||||
|
where to_char(createddate,'YYYY-MM')=to_char(current_date,'YYYY-MM')
|
||||||
|
</select>
|
||||||
|
<!-- 在线用户统计 -->
|
||||||
|
<select id="analysisOnlineUsers" parameterType="String" resultType="Integer">
|
||||||
|
select
|
||||||
|
count(*) reportcount
|
||||||
|
from mxk_userinfo
|
||||||
|
where
|
||||||
|
lastlogintime >lastlogofftime
|
||||||
|
</select>
|
||||||
|
<!-- 30天活跃用户统计 -->
|
||||||
|
<select id="analysisActiveUsers" parameterType="String" resultType="Integer">
|
||||||
|
select
|
||||||
|
count(*) reportcount
|
||||||
|
from mxk_userinfo
|
||||||
|
where
|
||||||
|
date(lastlogintime) >(current_date - interval '30 day')
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- DAY HOUR COUNT 当天每小时 -->
|
||||||
|
<select id="analysisDayHour" parameterType="String" resultType="Map">
|
||||||
|
select
|
||||||
|
count(id) reportcount,
|
||||||
|
to_char(logintime,'HH24') reportstring
|
||||||
|
from mxk_history_login
|
||||||
|
where
|
||||||
|
date(logintime) =current_date
|
||||||
|
group by reportstring
|
||||||
|
order by reportstring
|
||||||
|
</select>
|
||||||
|
<!-- 30 DAY COUNT 最近30天每天访问量-->
|
||||||
|
<select id="analysisMonth" parameterType="String" resultType="Map">
|
||||||
|
select
|
||||||
|
count(id) reportcount,
|
||||||
|
date(logintime) reportstring
|
||||||
|
from mxk_history_login
|
||||||
|
where
|
||||||
|
date(logintime) >(current_date - interval '30 day')
|
||||||
|
group by reportstring
|
||||||
|
order by reportstring
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 30天浏览器的访问统计 -->
|
||||||
|
<select id="analysisBrowser" parameterType="Map" resultType="Map">
|
||||||
|
select
|
||||||
|
count(id) reportcount,
|
||||||
|
browser reportstring
|
||||||
|
from mxk_history_login
|
||||||
|
where
|
||||||
|
date(logintime) >(current_date - interval '30 day')
|
||||||
|
group by reportstring
|
||||||
|
order by reportcount desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 30天应用单点登录的访问统计 -->
|
||||||
|
<select id="analysisApp" parameterType="Map" resultType="Map">
|
||||||
|
select
|
||||||
|
count(id) reportcount,
|
||||||
|
appname
|
||||||
|
from mxk_history_login_apps
|
||||||
|
where
|
||||||
|
date(logintime) >(current_date - interval '30 day')
|
||||||
|
group by appname order by reportcount desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.ResourcesMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and res.id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="appId != null and appId != ''">
|
||||||
|
and res.appid = #{appId}
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null and parentId != ''">
|
||||||
|
and res.parentid = #{parentId}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and res.name like '%${name}%'
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="Resources" resultType="Resources">
|
||||||
|
select
|
||||||
|
res.*,app.name appname
|
||||||
|
from
|
||||||
|
mxk_resources res, mxk_apps app
|
||||||
|
where
|
||||||
|
(1=1) and res.appid=app.id
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
order by res.sortindex
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="logisticDelete" parameterType="Resources" >
|
||||||
|
update mxk_resources set
|
||||||
|
status = '2'
|
||||||
|
where 1 = 1
|
||||||
|
<if test="id != null">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != name">
|
||||||
|
and name = #{name}
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||||
|
update mxk_resources set status='2' where id in
|
||||||
|
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,261 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.RoleMemberMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and name = #{name}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ROLE_MEMBER User Member-->
|
||||||
|
<select id="allMemberInRole" parameterType="RoleMember" resultType="RoleMember">
|
||||||
|
select distinct
|
||||||
|
u.id,
|
||||||
|
u.username,
|
||||||
|
u.usertype,
|
||||||
|
u.windowsaccount,
|
||||||
|
|
||||||
|
u.displayname ,
|
||||||
|
u.nickname ,
|
||||||
|
u.namezhspell,
|
||||||
|
u.namezhshortspell,
|
||||||
|
u.givenname ,
|
||||||
|
u.middlename ,
|
||||||
|
u.familyname ,
|
||||||
|
|
||||||
|
u.gender,
|
||||||
|
|
||||||
|
u.authntype,
|
||||||
|
u.mobile,
|
||||||
|
u.email,
|
||||||
|
u.workemail,
|
||||||
|
u.workphonenumber,
|
||||||
|
|
||||||
|
u.employeenumber,
|
||||||
|
u.division,
|
||||||
|
u.costcenter,
|
||||||
|
u.organization,
|
||||||
|
u.departmentid,
|
||||||
|
u.department,
|
||||||
|
u.jobtitle,
|
||||||
|
u.joblevel,
|
||||||
|
|
||||||
|
|
||||||
|
u.createdby,
|
||||||
|
u.createddate,
|
||||||
|
u.modifiedby,
|
||||||
|
u.modifieddate,
|
||||||
|
|
||||||
|
u.status
|
||||||
|
from
|
||||||
|
mxk_userinfo u
|
||||||
|
where 1 = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="memberInRole" parameterType="RoleMember" resultType="RoleMember">
|
||||||
|
select distinct
|
||||||
|
rm.id,
|
||||||
|
u.username,
|
||||||
|
u.usertype,
|
||||||
|
u.windowsaccount,
|
||||||
|
|
||||||
|
u.displayname ,
|
||||||
|
u.nickname ,
|
||||||
|
u.namezhspell,
|
||||||
|
u.namezhshortspell,
|
||||||
|
u.givenname ,
|
||||||
|
u.middlename ,
|
||||||
|
u.familyname ,
|
||||||
|
|
||||||
|
u.gender,
|
||||||
|
|
||||||
|
u.authntype,
|
||||||
|
u.mobile,
|
||||||
|
u.email,
|
||||||
|
u.workemail,
|
||||||
|
u.workphonenumber,
|
||||||
|
|
||||||
|
u.employeenumber,
|
||||||
|
u.division,
|
||||||
|
u.costcenter,
|
||||||
|
u.organization,
|
||||||
|
u.departmentid,
|
||||||
|
u.department,
|
||||||
|
u.jobtitle,
|
||||||
|
u.joblevel,
|
||||||
|
|
||||||
|
|
||||||
|
u.createdby,
|
||||||
|
u.createddate,
|
||||||
|
u.modifiedby,
|
||||||
|
u.modifieddate,
|
||||||
|
|
||||||
|
u.status
|
||||||
|
from
|
||||||
|
mxk_userinfo u,
|
||||||
|
mxk_roles r,
|
||||||
|
mxk_role_member rm
|
||||||
|
where 1 = 1
|
||||||
|
<if test="roleId != null and roleId != ''">
|
||||||
|
and rm.roleid = #{roleId}
|
||||||
|
and r.id = #{roleId}
|
||||||
|
</if>
|
||||||
|
<if test="roleName != null and roleName != ''">
|
||||||
|
and r.name = #{roleName}
|
||||||
|
</if>
|
||||||
|
<if test="username != null and username != ''">
|
||||||
|
and u.username = #{username}
|
||||||
|
</if>
|
||||||
|
<if test="displayName != null and displayName != ''">
|
||||||
|
and u.displayname like '%${displayName}%'
|
||||||
|
</if>
|
||||||
|
and rm.type in( 'USER','USER-DYNAMIC')
|
||||||
|
and rm.roleid = r.id
|
||||||
|
and rm.memberid = u.id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="memberNotInRole" parameterType="RoleMember" resultType="RoleMember">
|
||||||
|
select distinct
|
||||||
|
u.id,
|
||||||
|
u.username,
|
||||||
|
u.usertype,
|
||||||
|
u.windowsaccount,
|
||||||
|
|
||||||
|
u.displayname ,
|
||||||
|
u.nickname ,
|
||||||
|
u.namezhspell,
|
||||||
|
u.namezhshortspell,
|
||||||
|
u.givenname ,
|
||||||
|
u.middlename ,
|
||||||
|
u.familyname ,
|
||||||
|
|
||||||
|
u.gender,
|
||||||
|
|
||||||
|
u.authntype,
|
||||||
|
u.mobile,
|
||||||
|
u.email,
|
||||||
|
u.workemail,
|
||||||
|
u.workphonenumber,
|
||||||
|
|
||||||
|
u.employeenumber,
|
||||||
|
u.division,
|
||||||
|
u.costcenter,
|
||||||
|
u.organization,
|
||||||
|
u.departmentid,
|
||||||
|
u.department,
|
||||||
|
u.jobtitle,
|
||||||
|
u.joblevel,
|
||||||
|
|
||||||
|
|
||||||
|
u.createdby,
|
||||||
|
u.createddate,
|
||||||
|
u.modifiedby,
|
||||||
|
u.modifieddate,
|
||||||
|
|
||||||
|
u.status
|
||||||
|
from
|
||||||
|
mxk_userinfo u
|
||||||
|
where
|
||||||
|
u.id not in(
|
||||||
|
select rm.memberid
|
||||||
|
from mxk_roles r,mxk_role_member rm
|
||||||
|
where 1 = 1
|
||||||
|
<if test="roleId != null and roleId != ''">
|
||||||
|
and rm.roleid = #{roleId}
|
||||||
|
and r.id = #{roleId}
|
||||||
|
</if>
|
||||||
|
<if test="roleName != null and roleName != ''">
|
||||||
|
and r.name = #{roleName}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
and rm.type in( 'USER','USER-DYNAMIC')
|
||||||
|
and rm.roleid = r.id
|
||||||
|
)
|
||||||
|
<if test="username != null and username != ''">
|
||||||
|
and u.username = #{username}
|
||||||
|
</if>
|
||||||
|
<if test="displayName != null and displayName != ''">
|
||||||
|
and u.displayname like '%${displayName}%'
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ROLE_MEMBER Roles Member-->
|
||||||
|
<select id="roleMemberInRole" parameterType="RoleMember" resultType="Roles">
|
||||||
|
select distinct
|
||||||
|
ir.*
|
||||||
|
from
|
||||||
|
mxk_roles ir,
|
||||||
|
mxk_roles r,
|
||||||
|
mxk_role_member rm
|
||||||
|
where
|
||||||
|
1 = 1
|
||||||
|
and rm.groupid = r.id
|
||||||
|
and rm.memberid = ir.id
|
||||||
|
and rm.type in( 'USER','USER-DYNAMIC')
|
||||||
|
<if test="roleId != null and roleId != ''">
|
||||||
|
and rm.roleid = #{roleId}
|
||||||
|
and r.id = #{roleId}
|
||||||
|
</if>
|
||||||
|
<if test="roleName != null and roleName != ''">
|
||||||
|
and r.name = #{roleName}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="addDynamicRoleMember" parameterType="Roles" >
|
||||||
|
insert into mxk_role_member(
|
||||||
|
id,
|
||||||
|
roleid,
|
||||||
|
memberid,
|
||||||
|
type
|
||||||
|
)
|
||||||
|
select
|
||||||
|
concat_ws('-','UD','${id}',u.id) id,
|
||||||
|
'${id}' ROLEID,
|
||||||
|
u.id memberid,
|
||||||
|
'USER-DYNAMIC' type
|
||||||
|
from mxk_userinfo u
|
||||||
|
where not exists(
|
||||||
|
select 1 from mxk_role_member rm
|
||||||
|
where rm.roleid=#{id}
|
||||||
|
and rm.memberid=u.id
|
||||||
|
and rm.type='USER-DYNAMIC'
|
||||||
|
)
|
||||||
|
<if test="filters != null and filters != ''">
|
||||||
|
${filters}
|
||||||
|
</if>
|
||||||
|
<if test="orgIdsList != null and orgIdsList != ''">
|
||||||
|
and u.departmentid in( ${orgIdsList})
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteDynamicRoleMember" parameterType="Roles" >
|
||||||
|
delete from mxk_role_member rm
|
||||||
|
where type = 'USER-DYNAMIC'
|
||||||
|
and rm.roleid = #{id}
|
||||||
|
and not exists(
|
||||||
|
select 1
|
||||||
|
from mxk_userinfo u
|
||||||
|
where 1 = 1
|
||||||
|
and u.id=rm.memberid
|
||||||
|
<if test="filters != null and filters != ''">
|
||||||
|
${filters}
|
||||||
|
</if>
|
||||||
|
<if test="orgIdsList != null and orgIdsList != ''">
|
||||||
|
and u.departmentid in( ${orgIdsList})
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByRoleId" parameterType="string" >
|
||||||
|
delete from mxk_role_member rm
|
||||||
|
where rm.roleid=#{value}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.RolesMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and name like '%${name}%'
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="queryDynamicRoles" parameterType="Roles" resultType="Roles">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_groups
|
||||||
|
where
|
||||||
|
dynamic = '1'
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="Roles" resultType="Roles">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_roles
|
||||||
|
where
|
||||||
|
(1=1)
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="logisticDelete" parameterType="Roles" >
|
||||||
|
update mxk_roles set
|
||||||
|
status = '2'
|
||||||
|
where 1 = 1
|
||||||
|
<if test="id != null">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != name">
|
||||||
|
and name = #{name}
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||||
|
update mxk_roles set status='2' where id in
|
||||||
|
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryRolePermissions" parameterType="RolePermissions" resultType="RolePermissions">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_role_permissions
|
||||||
|
where
|
||||||
|
status = 1
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="roleId != null and roleId != ''">
|
||||||
|
and roleid = #{roleId}
|
||||||
|
</if>
|
||||||
|
<if test="appId != null and appId != ''">
|
||||||
|
and appid = #{appId}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="logisticDeleteRolePermissions" parameterType="java.util.List">
|
||||||
|
update mxk_role_permissions set status=9 where id in
|
||||||
|
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||||
|
#{item.id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<insert id="insertRolePermissions" parameterType="java.util.List">
|
||||||
|
insert into mxk_role_permissions ( id,appid,roleid,resourceid,status)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" index="index" separator=",">
|
||||||
|
(#{item.id},#{item.appId},#{item.roleId},#{item.resourceId},#{item.status})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.SynchronizersMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and name like '%${name}%'
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="Synchronizers" resultType="Synchronizers">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_synchronizers
|
||||||
|
where
|
||||||
|
(1=1)
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.UserInfoAdjointMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and userid = #{userId}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="UserInfoAdjoint" resultType="UserInfoAdjoint">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_userinfo_adjunct
|
||||||
|
where
|
||||||
|
(1=1)
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="logisticDelete" parameterType="UserInfoAdjoint" >
|
||||||
|
update mxk_userinfo_adjunct set
|
||||||
|
status = '2'
|
||||||
|
where 1 = 1
|
||||||
|
<if test="id != null">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != name">
|
||||||
|
and name = #{name}
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||||
|
update mxk_userinfo_adjunct set status='2' where id in
|
||||||
|
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,252 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.UserInfoMapper">
|
||||||
|
|
||||||
|
<select id="loadByUsername" parameterType="string" resultType="UserInfo">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_userinfo
|
||||||
|
where username = #{value}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="UserInfo" resultType="UserInfo">
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
usertype,
|
||||||
|
windowsaccount,
|
||||||
|
|
||||||
|
displayname ,
|
||||||
|
nickname ,
|
||||||
|
namezhspell,
|
||||||
|
namezhshortspell,
|
||||||
|
givenname ,
|
||||||
|
middlename ,
|
||||||
|
familyname ,
|
||||||
|
|
||||||
|
gender,
|
||||||
|
|
||||||
|
authntype,
|
||||||
|
mobile,
|
||||||
|
email,
|
||||||
|
workemail,
|
||||||
|
workphonenumber,
|
||||||
|
|
||||||
|
employeenumber,
|
||||||
|
division,
|
||||||
|
costcenter,
|
||||||
|
organization,
|
||||||
|
departmentid,
|
||||||
|
department,
|
||||||
|
jobtitle,
|
||||||
|
joblevel,
|
||||||
|
|
||||||
|
|
||||||
|
createdby,
|
||||||
|
createddate,
|
||||||
|
modifiedby,
|
||||||
|
modifieddate,
|
||||||
|
|
||||||
|
status
|
||||||
|
from
|
||||||
|
mxk_userinfo
|
||||||
|
where
|
||||||
|
(1=1)
|
||||||
|
<if test="username != null and username != ''">
|
||||||
|
and username = #{username}
|
||||||
|
</if>
|
||||||
|
<if test="employeeNumber != null and employeeNumber != ''">
|
||||||
|
and employeenumber = #{employeeNumber}
|
||||||
|
</if>
|
||||||
|
<if test="userType != null and userType != ''">
|
||||||
|
and usertype = #{userType}
|
||||||
|
</if>
|
||||||
|
<if test="displayName != null and displayName != ''">
|
||||||
|
and displayname like '%${displayName}%'
|
||||||
|
</if>
|
||||||
|
<if test="departmentId != null and departmentId != ''">
|
||||||
|
and departmentid = #{departmentId}
|
||||||
|
</if>
|
||||||
|
order by sortorder
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="locked" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
<if test="isLocked != null">
|
||||||
|
islocked = #{isLocked},
|
||||||
|
</if>
|
||||||
|
modifieddate = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="lockout" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
<if test="isLocked != null">
|
||||||
|
islocked = #{isLocked},
|
||||||
|
badpwdcount = 0,
|
||||||
|
</if>
|
||||||
|
unlockdate = current_timestamp,
|
||||||
|
modifieddate = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="changePassword" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
<if test="password != null">
|
||||||
|
password = #{password},
|
||||||
|
decipherable = #{decipherable},
|
||||||
|
</if>
|
||||||
|
passwordsettype = 0,
|
||||||
|
passwordlastsettime = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="changeSharedSecret" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
<if test="sharedSecret != null">
|
||||||
|
sharedsecret = #{sharedSecret},
|
||||||
|
sharedcounter = #{sharedCounter},
|
||||||
|
</if>
|
||||||
|
modifieddate = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="changeAppLoginPassword" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
<if test="appLoginPassword != null">
|
||||||
|
apploginpassword = #{appLoginPassword},
|
||||||
|
</if>
|
||||||
|
modifieddate = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="updateProtectedApps" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
<if test="protectedApps != null">
|
||||||
|
protectedapps = #{protectedApps},
|
||||||
|
</if>
|
||||||
|
modifieddate = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="changePasswordQuestion" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
<if test="passwordAnswer != null">
|
||||||
|
passwordquestion = #{passwordQuestion},
|
||||||
|
passwordanswer = #{passwordAnswer},
|
||||||
|
</if>
|
||||||
|
modifieddate = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="changeAuthnType" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
<if test="authnType != null">
|
||||||
|
authntype = #{authnType},
|
||||||
|
</if>
|
||||||
|
modifieddate = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="changeEmail" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
<if test="email != null">
|
||||||
|
email = #{email},
|
||||||
|
</if>
|
||||||
|
<if test="emailVerified != null">
|
||||||
|
emailverified = #{emailVerified},
|
||||||
|
</if>
|
||||||
|
<if test="theme != null">
|
||||||
|
theme = #{theme},
|
||||||
|
</if>
|
||||||
|
modifieddate = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="changeMobile" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
<if test="mobile != null">
|
||||||
|
mobile = #{mobile},
|
||||||
|
</if>
|
||||||
|
<if test="mobileVerified != null">
|
||||||
|
mobileverified = #{mobileVerified},
|
||||||
|
</if>
|
||||||
|
modifieddate = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||||
|
update mxk_userinfo set status='2' where id in
|
||||||
|
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="updateProfile" parameterType="UserInfo" >
|
||||||
|
update mxk_userinfo set
|
||||||
|
displayname = #{displayName},
|
||||||
|
nickname = #{nickName},
|
||||||
|
namezhspell = #{nameZhSpell},
|
||||||
|
namezhshortspell= #{nameZhShortSpell},
|
||||||
|
givenname = #{givenName},
|
||||||
|
middlename = #{middleName},
|
||||||
|
familyname = #{familyName},
|
||||||
|
honorificprefix = #{honorificPrefix},
|
||||||
|
honorificsuffix = #{honorificSuffix},
|
||||||
|
formattedname = #{formattedName} ,
|
||||||
|
married = #{married},
|
||||||
|
gender = #{gender},
|
||||||
|
birthdate = #{birthDate},
|
||||||
|
<if test="picture != null">
|
||||||
|
picture = #{picture},
|
||||||
|
</if>
|
||||||
|
idtype = #{idType},
|
||||||
|
idcardno = #{idCardNo},
|
||||||
|
website = #{webSite},
|
||||||
|
|
||||||
|
locale = #{locale},
|
||||||
|
timezone = #{timeZone},
|
||||||
|
preferredlanguage= #{preferredLanguage},
|
||||||
|
|
||||||
|
windowsaccount = #{windowsAccount},
|
||||||
|
|
||||||
|
workcountry = #{workCountry},
|
||||||
|
workregion = #{workRegion},
|
||||||
|
worklocality = #{workLocality},
|
||||||
|
workstreetaddress= #{workStreetAddress},
|
||||||
|
workaddressformatted= #{workAddressFormatted},
|
||||||
|
workemail = #{workEmail},
|
||||||
|
workphonenumber = #{workPhoneNumber},
|
||||||
|
workpostalcode = #{workPostalCode},
|
||||||
|
workfax = #{workFax},
|
||||||
|
|
||||||
|
homecountry = #{homeCountry},
|
||||||
|
homeregion = #{homeRegion},
|
||||||
|
homelocality = #{homeLocality},
|
||||||
|
homestreetaddress= #{homeStreetAddress},
|
||||||
|
homeaddressformatted= #{homeAddressFormatted},
|
||||||
|
homeemail = #{homeEmail},
|
||||||
|
homephonenumber= #{homePhoneNumber},
|
||||||
|
homepostalcode = #{homePostalCode},
|
||||||
|
homefax = #{homeFax},
|
||||||
|
|
||||||
|
extraattribute = #{extraAttribute},
|
||||||
|
|
||||||
|
modifiedby = #{modifiedBy},
|
||||||
|
modifieddate = current_timestamp
|
||||||
|
where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -218,7 +218,7 @@
|
|||||||
concat_ws('-','UD','${id}',u.id) id,
|
concat_ws('-','UD','${id}',u.id) id,
|
||||||
'${id}' groupid,
|
'${id}' groupid,
|
||||||
u.id memberid,
|
u.id memberid,
|
||||||
'USER-DYNAMIC' type
|
'USER-DYNAMIC' as type
|
||||||
from mxk_userinfo u
|
from mxk_userinfo u
|
||||||
where not exists(
|
where not exists(
|
||||||
select 1 from mxk_group_member gm
|
select 1 from mxk_group_member gm
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
<?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="org.maxkey.persistence.mapper.SynchronizersMapper">
|
||||||
|
|
||||||
|
<sql id="where_statement">
|
||||||
|
<if test="id != null and id != ''">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and name like '%${name}%'
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="queryPageResults" parameterType="Synchronizers" resultType="Synchronizers">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from
|
||||||
|
mxk_synchronizers
|
||||||
|
where
|
||||||
|
(1=1)
|
||||||
|
<include refid="where_statement"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -34,20 +34,37 @@ spring.servlet.multipart.max-file-size=4194304
|
|||||||
#server.servlet.encoding.force=
|
#server.servlet.encoding.force=
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
#database configuration #
|
#database configuration
|
||||||
|
# supported database
|
||||||
|
# mysql
|
||||||
|
# highgo
|
||||||
|
# postgresql
|
||||||
############################################################################
|
############################################################################
|
||||||
|
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||||
|
#mysql
|
||||||
spring.datasource.username=root
|
spring.datasource.username=root
|
||||||
spring.datasource.password=maxkey
|
spring.datasource.password=maxkey
|
||||||
spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
|
spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
|
||||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
#highgo
|
||||||
|
#spring.datasource.username=highgo
|
||||||
|
#spring.datasource.password=High@123
|
||||||
|
#spring.datasource.url=jdbc:highgo://192.168.56.107:5866/highgo?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
#spring.datasource.driver-class-name=com.highgo.jdbc.Driver
|
||||||
|
#postgresql
|
||||||
|
#spring.datasource.username=root
|
||||||
|
#spring.datasource.password=maxkey!
|
||||||
|
#spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
#spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
|
||||||
#mybatis
|
#mybatis
|
||||||
mybatis.dialect=mysql
|
mybatis.dialect=mysql
|
||||||
mybatis.type-aliases-package=org.maxkey.entity,org.maxkey.entity.apps,
|
mybatis.type-aliases-package=org.maxkey.entity,org.maxkey.entity.apps,
|
||||||
mybatis.mapper-locations=classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
|
mybatis.mapper-locations=classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
|
||||||
mybatis.table-column-snowflake-datacenter-id=1
|
mybatis.table-column-snowflake-datacenter-id=1
|
||||||
mybatis.table-column-snowflake-machine-id=1
|
mybatis.table-column-snowflake-machine-id=1
|
||||||
mybatis.table-column-escape=true
|
mybatis.table-column-escape=false
|
||||||
|
mybatis.table-column-case=lowercase
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
#redis server configuration #
|
#redis server configuration #
|
||||||
|
|||||||
@ -38,21 +38,37 @@ spring.servlet.multipart.max-file-size=4194304
|
|||||||
#server.servlet.encoding.force=true
|
#server.servlet.encoding.force=true
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
#database configuration #
|
#database configuration
|
||||||
|
# supported database
|
||||||
|
# mysql
|
||||||
|
# highgo
|
||||||
|
# postgresql
|
||||||
############################################################################
|
############################################################################
|
||||||
#datasource
|
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||||
|
#mysql
|
||||||
spring.datasource.username=root
|
spring.datasource.username=root
|
||||||
spring.datasource.password=maxkey
|
spring.datasource.password=maxkey
|
||||||
spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
|
spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
|
||||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
#highgo
|
||||||
|
#spring.datasource.username=highgo
|
||||||
|
#spring.datasource.password=High@123
|
||||||
|
#spring.datasource.url=jdbc:highgo://192.168.56.107:5866/highgo?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
#spring.datasource.driver-class-name=com.highgo.jdbc.Driver
|
||||||
|
#postgresql
|
||||||
|
#spring.datasource.username=root
|
||||||
|
#spring.datasource.password=maxkey!
|
||||||
|
#spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
#spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
|
||||||
#mybatis
|
#mybatis
|
||||||
mybatis.dialect=mysql
|
mybatis.dialect=mysql
|
||||||
mybatis.type-aliases-package=org.maxkey.entity,org.maxkey.entity.apps,
|
mybatis.type-aliases-package=org.maxkey.entity,org.maxkey.entity.apps,
|
||||||
mybatis.mapper-locations=classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
|
mybatis.mapper-locations=classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
|
||||||
mybatis.table-column-snowflake-datacenter-id=1
|
mybatis.table-column-snowflake-datacenter-id=1
|
||||||
mybatis.table-column-snowflake-machine-id=1
|
mybatis.table-column-snowflake-machine-id=1
|
||||||
mybatis.table-column-escape=true
|
mybatis.table-column-escape=false
|
||||||
|
mybatis.table-column-case=lowercase
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
#redis server configuration #
|
#redis server configuration #
|
||||||
|
|||||||
@ -38,21 +38,37 @@ server.ssl.key-store-type=JKS
|
|||||||
#server.servlet.encoding.force=true
|
#server.servlet.encoding.force=true
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
#database configuration #
|
#database configuration
|
||||||
|
# supported database
|
||||||
|
# mysql
|
||||||
|
# highgo
|
||||||
|
# postgresql
|
||||||
############################################################################
|
############################################################################
|
||||||
#datasource
|
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||||
|
#mysql
|
||||||
spring.datasource.username=root
|
spring.datasource.username=root
|
||||||
spring.datasource.password=maxkey
|
spring.datasource.password=maxkey
|
||||||
spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
|
spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
|
||||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
#highgo
|
||||||
|
#spring.datasource.username=highgo
|
||||||
|
#spring.datasource.password=High@123
|
||||||
|
#spring.datasource.url=jdbc:highgo://192.168.56.107:5866/highgo?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
#spring.datasource.driver-class-name=com.highgo.jdbc.Driver
|
||||||
|
#postgresql
|
||||||
|
#spring.datasource.username=root
|
||||||
|
#spring.datasource.password=maxkey!
|
||||||
|
#spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
#spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
|
||||||
#mybatis
|
#mybatis
|
||||||
mybatis.dialect=mysql
|
mybatis.dialect=mysql
|
||||||
mybatis.type-aliases-package=org.maxkey.entity,org.maxkey.entity.apps,
|
mybatis.type-aliases-package=org.maxkey.entity,org.maxkey.entity.apps,
|
||||||
mybatis.mapper-locations=classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
|
mybatis.mapper-locations=classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
|
||||||
mybatis.table-column-snowflake-datacenter-id=1
|
mybatis.table-column-snowflake-datacenter-id=1
|
||||||
mybatis.table-column-snowflake-machine-id=1
|
mybatis.table-column-snowflake-machine-id=1
|
||||||
mybatis.table-column-escape=true
|
mybatis.table-column-escape=false
|
||||||
|
mybatis.table-column-case=lowercase
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
#redis server configuration #
|
#redis server configuration #
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user