优化源码结构
parent
bcfdfe0e0a
commit
770c82d66c
@ -0,0 +1,14 @@
|
|||||||
|
CREATE VIEW power_user_dict AS
|
||||||
|
SELECT
|
||||||
|
`power_user`.`user_id` AS `user_id`,
|
||||||
|
`power_dept`.`dict_id` AS `dict_id`
|
||||||
|
FROM
|
||||||
|
((
|
||||||
|
`power_user`
|
||||||
|
JOIN `mysql`.`help_topic` `b` ON ((
|
||||||
|
`b`.`help_topic_id` < (( length( `power_user`.`dept_id` ) - length( REPLACE ( `power_user`.`dept_id`, _latin1 ',', _latin1 '' ))) + 1 ))))
|
||||||
|
LEFT JOIN `power_dept` ON ((
|
||||||
|
`power_dept`.`dept_id` = `power_user`.`dept_id`
|
||||||
|
)))
|
||||||
|
GROUP BY
|
||||||
|
`power_user`.`user_id`
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,69 +0,0 @@
|
|||||||
# \u62E6\u622A\u83DC\u5355\u914D\u7F6E\u6587\u4EF6 ljx 2019-4-27
|
|
||||||
#interceptRequest \u672A\u767B\u5F55\u4E4B\u524D\u653E\u884C\u3002\u9ED8\u8BA4\u4E3Anone
|
|
||||||
#ajaxRequest ajax\u8BF7\u6C42\u6CA1\u6709\u5BF9\u5E94\u6A21\u5757\uFF0C\u9700\u8981\u653E\u884C\u3002 \u9ED8\u8BA4\u4E3Anone
|
|
||||||
releaseRequest = /login,/logout,/services,/font,/refuse,/swagger-ui.html,/webjars,/swagger-resources,/v2
|
|
||||||
ajaxRequest = none
|
|
||||||
|
|
||||||
#session\u8FC7\u671F\u65F6\u95F4
|
|
||||||
TOKEN_EXPIRE_TIME = 1200000
|
|
||||||
|
|
||||||
##################################################\u670D\u52A1\u5668ip##########################################################
|
|
||||||
#\u901A\u7528\u670D\u52A1\u5668IP\u4E0E\u901A\u7528\u670D\u52A1\u5668\u7AEF\u53E3
|
|
||||||
SERVER_IP = 192.168.1.3
|
|
||||||
SERVER_PORT = 8081
|
|
||||||
|
|
||||||
#power\u6743\u9650\u7CFB\u7EDFip
|
|
||||||
POWER_IP = ${SERVER_IP}
|
|
||||||
#\u6743\u9650\u7CFB\u7EDF\u7AEF\u53E3
|
|
||||||
POWER_PORT = ${SERVER_PORT}
|
|
||||||
|
|
||||||
#\u75C5\u6848\u5F52\u6863\u7CFB\u7EDFip
|
|
||||||
EMRMEDICALRECORD_IP = ${SERVER_IP}
|
|
||||||
#\u75C5\u6848\u5F52\u6863\u7CFB\u7EDF\u7AEF\u53E3
|
|
||||||
EMRMEDICALRECORD_PORT = 8082
|
|
||||||
|
|
||||||
#\u75C5\u6848\u7BA1\u7406\u7CFB\u7EDFip
|
|
||||||
EMRRECORD_IP = ${SERVER_IP}
|
|
||||||
#\u75C5\u6848\u7BA1\u7406\u7CFB\u7EDF\u7AEF\u53E3
|
|
||||||
EMRRECORD_PORT = 8083
|
|
||||||
|
|
||||||
#\u75C5\u6848\u590D\u5370\u9884\u7EA6ip
|
|
||||||
EMRAPPLYCOPY_IP = ${SERVER_IP}
|
|
||||||
#\u75C5\u6848\u590D\u5370\u9884\u7EA6\u7AEF\u53E3
|
|
||||||
EMRAPPLYCOPY_PORT = ${SERVER_PORT}
|
|
||||||
|
|
||||||
#\u75C5\u6848\u7B7E\u6536ip
|
|
||||||
EMRFILES_IP = ${SERVER_IP}
|
|
||||||
#\u75C5\u6848\u7B7E\u6536\u7AEF\u53E3
|
|
||||||
EMRFILES_PORT = ${SERVER_PORT}
|
|
||||||
|
|
||||||
#emr_medical_record\u5F52\u6863\u7CFB\u7EDF\u7684\u7CFB\u7EDF\u6807\u8BC6
|
|
||||||
EMRMEDICALRECORD_SYSFLAG = emr_medical_record
|
|
||||||
#emr_medical_record\u5F52\u6863\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
|
|
||||||
EMRMEDICALRECORD_URLHEAD = http://${EMRMEDICALRECORD_IP}:${EMRMEDICALRECORD_PORT}/${EMRMEDICALRECORD_SYSFLAG}
|
|
||||||
|
|
||||||
#emr_record\u75C5\u6848\u7BA1\u7406\u7CFB\u7EDF\u7684\u7CFB\u7EDF\u6807\u8BC6
|
|
||||||
EMRRECORD_SYSFLAG = emr_record
|
|
||||||
#emr_record\u75C5\u6848\u7BA1\u7406\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
|
|
||||||
EMRRECORD_URLHEAD = http://${EMRRECORD_IP}:${EMRRECORD_PORT}/${EMRRECORD_SYSFLAG}
|
|
||||||
|
|
||||||
#emr_apply_copy\u75C5\u6848\u590D\u5370\u9884\u7EA6\u7684\u7CFB\u7EDF\u6807\u8BC6
|
|
||||||
EMRAPPLYCOPY_SYSFLAG = emr_apply_copy
|
|
||||||
#emr_apply_copy\u75C5\u6848\u590D\u5370\u9884\u7EA6\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
|
|
||||||
EMRAPPLYCOPY_URLHEAD = http://${EMRAPPLYCOPY_IP}:${EMRAPPLYCOPY_PORT}/${EMRAPPLYCOPY_SYSFLAG}
|
|
||||||
|
|
||||||
#emr_files\u75C5\u6848\u7B7E\u6536\u7684\u7CFB\u7EDF\u6807\u8BC6
|
|
||||||
EMRFILES__SYSFLAG = emr_files
|
|
||||||
#emr_files\u75C5\u6848\u7B7E\u6536\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
|
|
||||||
EMRFILES_URLHEAD = http://${EMRFILES_IP}:${EMRFILES_PORT}/${EMRFILES__SYSFLAG}
|
|
||||||
#####################################################\u5176\u4ED6##############################################
|
|
||||||
#webSocket\u670D\u52A1\u5668\u5730\u5740
|
|
||||||
WEBSOCKET_URLHEAD = ${POWER_IP}:8088
|
|
||||||
#\u901A\u77E5\u5B57\u7B26\u4E32\u95F4\u9694\u7B26
|
|
||||||
STR_SPLIT = *^:|,.
|
|
||||||
|
|
||||||
#\u65E5\u5FD7\u4FDD\u7559\u5929\u6570
|
|
||||||
log.days = 90
|
|
||||||
|
|
||||||
#\u5B9A\u4E49\u662F\u5426\u4E3A\u957F\u671F\u767B\u5F55\u7528\u6237\u6B21\u6570
|
|
||||||
login.times = 3
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
jdbc.driver=com.mysql.jdbc.Driver
|
|
||||||
jdbc.url=jdbc\:mysql\://localhost\:3306/qfpower?useUnicode\=true&characterEncoding\=utf-8
|
|
||||||
jdbc.username=root
|
|
||||||
jdbc.password=docus702
|
|
||||||
|
|
||||||
#hibernate config
|
|
||||||
hibernate.dialect = org.hibernate.dialect.MySQLDialect
|
|
||||||
hibernate.show_sql = true
|
|
||||||
hibernate.format_sql = true
|
|
||||||
hibernate.hbm2ddl.auto =update
|
|
||||||
#hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext
|
|
||||||
hibernate.current_session_context_class=thread
|
|
||||||
|
|
||||||
hibernate.jdbc.batch_size=50
|
|
||||||
hibernate.enable_lazy_load_no_trans=true
|
|
||||||
|
|
||||||
#\u05B4\uFFFD\uFFFD:\uFFFD\u04BC\uFFFD Run As ---->Maven build ---->Goals:mybatis-generator:generate
|
|
||||||
#\uFFFD\uFFFD\uFFFD\u013F\u00BC
|
|
||||||
targetProject=src/main/java
|
|
||||||
#modelPackage,sqlMapperPackage,daoMapperPackage \u0368\uFFFD\uFFFD\u04BB\uFFFD\uFFFD??
|
|
||||||
modelPackage=com.manage.entity
|
|
||||||
daoMapperPackage=com.manage.dao
|
|
||||||
#\uFFFD\uFFFD\uFFFD\u013F\u00BC
|
|
||||||
targetProject2=src/main/resources
|
|
||||||
sqlMapperPackage=mapper
|
|
||||||
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE configuration
|
|
||||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
|
||||||
<configuration>
|
|
||||||
<settings>
|
|
||||||
<!-- 列自动映射 -->
|
|
||||||
<setting name="mapUnderscoreToCamelCase" value="true"/>
|
|
||||||
<!--<setting name="logImpl" value="STDOUT_LOGGING"/>-->
|
|
||||||
</settings>
|
|
||||||
|
|
||||||
<typeAliases>
|
|
||||||
<package name="com.manage.entity"/>
|
|
||||||
</typeAliases>
|
|
||||||
|
|
||||||
<plugins>
|
|
||||||
<!-- com.github.pagehelper为PageHelper类所在包名 -->
|
|
||||||
<plugin interceptor="com.github.pagehelper.PageInterceptor">
|
|
||||||
<!--分页参数合理化-->
|
|
||||||
<property name="reasonable" value="true"/>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
|
|
||||||
</configuration>
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
##获取cpu温度cvs文件路径
|
|
||||||
TEMPERATURECVSFILEDIR = D:\\tools\\temperature_stat.htm
|
|
||||||
##cpu温度cvs文件显示温度数据的行数
|
|
||||||
TEMPERATUREROWNUM = 9
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,16 +0,0 @@
|
|||||||
jdbc.driver=com.mysql.jdbc.Driver
|
|
||||||
#jdbc.url=jdbc\:mysql\://localhost\:3306/power?useUnicode\=true&characterEncoding\=utf-8
|
|
||||||
jdbc.url=jdbc\:mysql\://120.27.212.36\:3306/power?useUnicode\=true&characterEncoding\=utf-8
|
|
||||||
jdbc.username=root
|
|
||||||
jdbc.password=docus702
|
|
||||||
|
|
||||||
#执行:右键 Run As ---->Maven build ---->Goals:mybatis-generator:generate
|
|
||||||
#输出目录
|
|
||||||
targetProject=src/main/java
|
|
||||||
#modelPackage,sqlMapperPackage,daoMapperPackage 通常一致
|
|
||||||
modelPackage=com.manage.entity
|
|
||||||
daoMapperPackage=com.manage.dao
|
|
||||||
#输出目录
|
|
||||||
targetProject2=src/main/resources
|
|
||||||
sqlMapperPackage=mapper
|
|
||||||
|
|
||||||
@ -1,163 +0,0 @@
|
|||||||
<?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.manage.dao.PowerMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.vo.Power_UserAndRoleTree">
|
|
||||||
<result column="level" jdbcType="INTEGER" property="level"/>
|
|
||||||
<result column="parent_id" jdbcType="INTEGER" property="parentId"/>
|
|
||||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
|
||||||
<result column="new_name" jdbcType="VARCHAR" property="newName"/>
|
|
||||||
<result column="sys_flag" jdbcType="VARCHAR" property="sysFlag"/>
|
|
||||||
<result column="dept_id" jdbcType="VARCHAR" property="deptId"/>
|
|
||||||
<result column="self_id" jdbcType="INTEGER" property="selfId"/>
|
|
||||||
<result column="tel" jdbcType="VARCHAR" property="tel"/>
|
|
||||||
</resultMap>
|
|
||||||
<select id="getUserTree" resultMap="BaseResultMap">
|
|
||||||
select 1 as level,0 as parent_id,power_sys_dict.hospital_name name,power_sys_dict.hospital_name new_name,null as
|
|
||||||
sys_flag,null as dept_id,dict_id self_id,null as tel,null as real_name from power_sys_dict where
|
|
||||||
<if test="userId != null">
|
|
||||||
dict_id in (select dict_id from power_user_dict
|
|
||||||
where power_user_dict.user_id = #{userId}) and
|
|
||||||
</if>
|
|
||||||
<if test="key != null and key != '' and userId == null">
|
|
||||||
dict_id in (select dict_id from power_user_dict
|
|
||||||
INNER JOIN power_user ON power_user.effective = 1 AND power_user_dict.user_id = power_user.user_id AND (
|
|
||||||
power_user.user_name LIKE '%${key}%' OR power_user.name LIKE '%${key}%'
|
|
||||||
)) AND
|
|
||||||
</if>
|
|
||||||
sys_name is null and dict_status = 1
|
|
||||||
union ALL
|
|
||||||
select 2 as level,power_sys_dict.parent_id,power_sys_dict.sys_name name,power_sys_dict.sys_name
|
|
||||||
new_name,sys_flag,null as dept_id,null as self_id,null as tel,null as real_name from power_sys_dict where sys_flag = 'power' and
|
|
||||||
parent_id in (select power_sys_dict.dict_id from power_sys_dict where
|
|
||||||
<if test="userId != null">
|
|
||||||
dict_id in (select dict_id from power_user_dict
|
|
||||||
where user_id = #{userId}) and
|
|
||||||
</if>
|
|
||||||
sys_name is null and dict_status = 1) and dict_status = 1
|
|
||||||
UNION ALL
|
|
||||||
select 3 as level,power_dept.dict_id parent_id,dept_name name,dept_name new_name,null
|
|
||||||
sys_flag,power_dept.dept_id,null as self_id,null as tel,null as real_name from power_dept
|
|
||||||
<if test="key != null and key != ''">
|
|
||||||
INNER JOIN power_user on FIND_IN_SET(power_dept.dept_id,power_user.dept_id) and power_user.effective = 1 and
|
|
||||||
(power_user.name LIKE '%${key}%' OR power_user.user_name LIKE '%${key}%')
|
|
||||||
<if test="userId != null">
|
|
||||||
AND power_user.user_id != #{userId}
|
|
||||||
</if>
|
|
||||||
</if>
|
|
||||||
where power_dept.dict_id in (select power_sys_dict.dict_id from power_sys_dict where
|
|
||||||
<if test="userId != null">
|
|
||||||
power_sys_dict.dict_id in (select dict_id from power_user_dict where power_user_dict.user_id = #{userId})
|
|
||||||
and
|
|
||||||
</if>
|
|
||||||
sys_name is null and dict_status = 1) and power_dept.effective = 1
|
|
||||||
union ALL
|
|
||||||
select 4 as level,power_sys_dict.parent_id parent_id,sys_name name,sys_name
|
|
||||||
new_name,sys_flag,power_sys_dict.dept_id,power_sys_dict.dict_id as self_id,null as tel,null as real_name from power_sys_dict where
|
|
||||||
power_sys_dict.dict_status = 1 and power_sys_dict.sys_flag != 'power' and power_sys_dict.dept_id in (select
|
|
||||||
power_dept.dept_id from power_dept
|
|
||||||
<if test="key != null and key != ''">
|
|
||||||
INNER JOIN power_user on FIND_IN_SET(power_dept.dept_id,power_user.dept_id) and power_user.effective = 1 and
|
|
||||||
(power_user.name LIKE '%${key}%' OR power_user.user_name LIKE '%${key}%')
|
|
||||||
<if test="userId != null">
|
|
||||||
AND power_user.user_id != #{userId}
|
|
||||||
</if>
|
|
||||||
</if>
|
|
||||||
where power_dept.effective = 1 and power_dept.dict_id in (select power_sys_dict.dict_id from power_sys_dict
|
|
||||||
where
|
|
||||||
<if test="userId != null">
|
|
||||||
dict_id in (select dict_id from power_user_dict where power_user_dict.user_id = #{userId}) and
|
|
||||||
</if>
|
|
||||||
sys_name is null and dict_status = 1 ))
|
|
||||||
union ALL
|
|
||||||
select 5 as level,power_user_dict.dict_id as parent_id,power_user.user_name name,power_user.user_name
|
|
||||||
new_name,null as sys_flag,power_user.dept_id,power_user.user_id self_id,power_user.user_tel,power_user.name as real_name from power_user
|
|
||||||
INNER JOIN (select power_dept.dept_id from power_dept where power_dept.effective = 1 and power_dept.dict_id in
|
|
||||||
(select power_sys_dict.dict_id from power_sys_dict where
|
|
||||||
<if test="userId != null">
|
|
||||||
dict_id in (select dict_id from power_user_dict where power_user_dict.user_id = #{userId}) and
|
|
||||||
</if>
|
|
||||||
dict_status = 1 and sys_name is null)) a
|
|
||||||
on a.dept_id in (power_user.dept_id)
|
|
||||||
LEFT JOIN power_user_dict on power_user.user_id = power_user_dict.user_id
|
|
||||||
where power_user.effective = 1 and power_user.role_id != 0 and power_user.role_id != -100
|
|
||||||
<if test="userId != null">
|
|
||||||
AND power_user.user_id != #{userId}
|
|
||||||
</if>
|
|
||||||
<if test="key != null and key != ''">
|
|
||||||
and (power_user.name LIKE '%${key}%' OR power_user.user_name LIKE '%${key}%')
|
|
||||||
</if>
|
|
||||||
group by self_id
|
|
||||||
</select>
|
|
||||||
<select id="getRoleTree" resultMap="BaseResultMap">
|
|
||||||
select 1 as level,0 as parent_id,power_sys_dict.hospital_name name,power_sys_dict.hospital_name new_name,null as
|
|
||||||
sys_flag,null as dept_id,dict_id self_id,null as tel from power_sys_dict where
|
|
||||||
<if test="userId != null">
|
|
||||||
dict_id in (select dict_id from power_user_dict
|
|
||||||
where power_user_dict.user_id = #{userId}) and
|
|
||||||
</if>
|
|
||||||
<if test="key != null and key != '' and userId == null">
|
|
||||||
dict_id in (select dict_id from power_user_dict
|
|
||||||
INNER JOIN power_user ON power_user.effective = 1 AND power_user_dict.user_id = power_user.user_id
|
|
||||||
INNER JOIN power_role ON power_user.role_id = power_role.role_id AND power_role.effective AND
|
|
||||||
power_role.role_name LIKE '%${key}%'
|
|
||||||
) AND
|
|
||||||
</if>
|
|
||||||
sys_name is null and dict_status = 1
|
|
||||||
union ALL
|
|
||||||
select 2 as level,power_sys_dict.parent_id,power_sys_dict.sys_name name,power_sys_dict.sys_name
|
|
||||||
new_name,sys_flag,null as dept_id,null as self_id,null as tel from power_sys_dict
|
|
||||||
where sys_flag = 'power' and parent_id in (select power_sys_dict.dict_id from power_sys_dict
|
|
||||||
where
|
|
||||||
<if test="userId != null">
|
|
||||||
dict_id in (select dict_id from power_user_dict where power_user_dict.user_id = #{userId}) and
|
|
||||||
</if>
|
|
||||||
sys_name is null and dict_status = 1 ) and dict_status = 1
|
|
||||||
UNION ALL
|
|
||||||
select 3 as level,power_dept.dict_id parent_id,dept_name name,dept_name new_name,null
|
|
||||||
sys_flag,power_dept.dept_id,null as self_id,null as tel from power_dept
|
|
||||||
<if test="key != null and key != ''">
|
|
||||||
INNER JOIN power_user on FIND_IN_SET(power_dept.dept_id,power_user.dept_id) and power_user.effective = 1
|
|
||||||
INNER JOIN power_role on power_user.role_id = power_role.role_id and power_role.effective = 1 and
|
|
||||||
power_role.role_name LIKE '%${key}%'
|
|
||||||
</if>
|
|
||||||
where power_dept.dict_id in (select power_sys_dict.dict_id from power_sys_dict where
|
|
||||||
<if test="userId != null">
|
|
||||||
dict_id in (select dict_id from power_user_dict where power_user_dict.user_id = #{userId}) and
|
|
||||||
</if>
|
|
||||||
sys_name is null and dict_status = 1 ) and power_dept.effective = 1
|
|
||||||
union ALL
|
|
||||||
select 4 as level,power_sys_dict.parent_id parent_id,sys_name name,sys_name
|
|
||||||
new_name,sys_flag,power_sys_dict.dept_id,power_sys_dict.dict_id as self_id,null as tel from power_sys_dict
|
|
||||||
<if test="key != null and key != ''">
|
|
||||||
INNER JOIN power_user on FIND_IN_SET(power_sys_dict.dept_id,power_user.dept_id) and power_user.effective = 1
|
|
||||||
INNER JOIN power_role on power_user.role_id = power_role.role_id and power_role.effective = 1 and
|
|
||||||
power_role.role_name LIKE '%${key}%'
|
|
||||||
</if>
|
|
||||||
where power_sys_dict.dict_status = 1 and power_sys_dict.sys_flag != 'power' and power_sys_dict.dept_id in
|
|
||||||
(select power_dept.dept_id from power_dept where power_dept.effective = 1 and power_dept.dict_id in (select
|
|
||||||
power_sys_dict.dict_id from power_sys_dict where
|
|
||||||
<if test="userId != null">
|
|
||||||
dict_id in (select dict_id from power_user_dict where power_user_dict.user_id = #{userId}) and
|
|
||||||
</if>
|
|
||||||
sys_name is null and dict_status = 1 ))
|
|
||||||
union ALL
|
|
||||||
select 5 as level,power_user_dict.dict_id as parent_id,power_role.role_name name,power_role.role_name
|
|
||||||
new_name,null as sys_flag,power_user.dept_id,power_user.role_id self_id,power_user.user_tel from power_user
|
|
||||||
INNER JOIN (select power_dept.dept_id from power_dept where power_dept.effective = 1 and power_dept.dict_id in
|
|
||||||
(select power_sys_dict.dict_id from power_sys_dict where
|
|
||||||
<if test="userId != null">
|
|
||||||
dict_id in (select dict_id from power_user_dict where power_user_dict.user_id = #{userId}) and
|
|
||||||
</if>
|
|
||||||
dict_status = 1 and sys_name is null)) a
|
|
||||||
on a.dept_id in (power_user.dept_id)
|
|
||||||
LEFT JOIN power_user_dict on power_user.user_id = power_user_dict.user_id
|
|
||||||
LEFT JOIN power_role on power_role.effective = 1 AND power_user.role_id = power_role.role_id
|
|
||||||
where power_user.effective = 1 and power_user.role_id != 0 and power_user.role_id != -100
|
|
||||||
<if test="roleId != null">
|
|
||||||
AND power_role.role_id != #{roleId}
|
|
||||||
</if>
|
|
||||||
<if test="key != null and key != ''">
|
|
||||||
AND power_role.role_name LIKE '%${key}%'
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@ -1,327 +0,0 @@
|
|||||||
<?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.manage.dao.Power_DeptMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.vo.Power_DeptVo">
|
|
||||||
<id column="dept_id" jdbcType="INTEGER" property="deptId" />
|
|
||||||
<result column="dept_name" jdbcType="VARCHAR" property="deptName" />
|
|
||||||
<result column="dict_id" jdbcType="INTEGER" property="dictId" />
|
|
||||||
<result column="effective" jdbcType="INTEGER" property="effective" />
|
|
||||||
<result column="create_date" jdbcType="CHAR" property="createDate" />
|
|
||||||
<result column="creater" jdbcType="VARCHAR" property="creater" />
|
|
||||||
<result column="update_date" jdbcType="CHAR" property="updateDate" />
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
<result column="dept_code" jdbcType="VARCHAR" property="deptCode" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
dept_id, dept_name, dict_id, effective, create_date, creater, update_date, updater,
|
|
||||||
remark,dept_code
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
power_dept.dept_id,
|
|
||||||
power_dept.dept_name,
|
|
||||||
power_dept.dict_id,
|
|
||||||
power_dept.effective,
|
|
||||||
power_dept.create_date,
|
|
||||||
power_dept.creater,
|
|
||||||
power_dept.update_date,
|
|
||||||
power_dept.updater,
|
|
||||||
power_dept.remark,
|
|
||||||
power_sys_dict.hospital_name,
|
|
||||||
power_dept.dept_code
|
|
||||||
from power_dept
|
|
||||||
LEFT JOIN power_sys_dict ON power_sys_dict.dict_id = power_dept.dict_id
|
|
||||||
where power_dept.dept_id = #{deptId,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
delete from power_dept
|
|
||||||
where dept_id = #{deptId,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.manage.entity.Power_Dept">
|
|
||||||
insert into power_dept (dept_id, dept_name, dict_id,
|
|
||||||
effective, create_date, creater,
|
|
||||||
update_date, updater, remark,dept_code
|
|
||||||
)
|
|
||||||
values (#{deptId,jdbcType=INTEGER}, #{deptName,jdbcType=VARCHAR}, #{dictId,jdbcType=INTEGER},
|
|
||||||
#{effective,jdbcType=INTEGER}, #{createDate,jdbcType=CHAR}, #{creater,jdbcType=VARCHAR},
|
|
||||||
#{updateDate,jdbcType=CHAR}, #{updater,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},#{deptCode,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.manage.entity.Power_Dept">
|
|
||||||
insert into power_dept
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="deptId != null">
|
|
||||||
dept_id,
|
|
||||||
</if>
|
|
||||||
<if test="deptName != null">
|
|
||||||
dept_name,
|
|
||||||
</if>
|
|
||||||
<if test="dictId != null">
|
|
||||||
dict_id,
|
|
||||||
</if>
|
|
||||||
<if test="effective != null">
|
|
||||||
effective,
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date,
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater,
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
<if test="deptCode != null">
|
|
||||||
dept_code,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="deptId != null">
|
|
||||||
#{deptId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="deptName != null">
|
|
||||||
#{deptName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="dictId != null">
|
|
||||||
#{dictId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="effective != null">
|
|
||||||
#{effective,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
#{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
#{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
#{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deptCode != null">
|
|
||||||
#{deptCode,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_Dept">
|
|
||||||
update power_dept
|
|
||||||
<set>
|
|
||||||
<if test="deptName != null">
|
|
||||||
dept_name = #{deptName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="dictId != null">
|
|
||||||
dict_id = #{dictId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="effective != null">
|
|
||||||
effective = #{effective,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deptCode != null">
|
|
||||||
dept_code = #{deptCode,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where dept_id = #{deptId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_Dept">
|
|
||||||
update power_dept
|
|
||||||
set dept_name = #{deptName,jdbcType=VARCHAR},
|
|
||||||
dict_id = #{dictId,jdbcType=INTEGER},
|
|
||||||
effective = #{effective,jdbcType=INTEGER},
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
dept_code = #{deptCode,jdbcType=VARCHAR}
|
|
||||||
where dept_id = #{deptId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
<!--2019-4-22 ly -->
|
|
||||||
<select id="findSomeByMore" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
power_dept.dept_id,
|
|
||||||
power_dept.dept_name,
|
|
||||||
power_dept.dict_id,
|
|
||||||
power_dept.effective,
|
|
||||||
power_dept.create_date,
|
|
||||||
power_dept.creater,
|
|
||||||
power_dept.update_date,
|
|
||||||
power_dept.updater,
|
|
||||||
power_dept.remark,
|
|
||||||
power_sys_dict.hospital_name
|
|
||||||
from power_dept
|
|
||||||
left join power_sys_dict on power_sys_dict.dict_id = power_dept.dict_id
|
|
||||||
where 1 = 1
|
|
||||||
<if test="deptName!=null and deptName!=''">
|
|
||||||
and dept_name LIKE '%${deptName}%'
|
|
||||||
</if>
|
|
||||||
<if test="dictId!=null">
|
|
||||||
and power_dept.dict_id=${dictId}
|
|
||||||
</if>
|
|
||||||
<if test="effective!=null">
|
|
||||||
and effective=${effective}
|
|
||||||
</if>
|
|
||||||
<if test="creater!=null and creater!=''">
|
|
||||||
and power_dept.creater LIKE '%${creater}%'
|
|
||||||
</if>
|
|
||||||
<if test="checks!=null and checks!=''">
|
|
||||||
and power_dept.dept_id IN (${checks})
|
|
||||||
</if>
|
|
||||||
ORDER BY create_date DESC,power_dept.dept_id DESC
|
|
||||||
<if test="offset != null and limit != null">
|
|
||||||
LIMIT #{offset},#{limit}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<!--验证同一医院科室名不能重复-->
|
|
||||||
<select id="checkDeptName" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
SELECT
|
|
||||||
dept_id
|
|
||||||
FROM
|
|
||||||
power_dept
|
|
||||||
WHERE
|
|
||||||
dept_name = #{deptName}
|
|
||||||
<if test="dictId != null">
|
|
||||||
AND dict_id = #{dictId}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<select id="getTotal" resultType="int">
|
|
||||||
SELECT count(1) FROM power_dept WHERE 1 = 1
|
|
||||||
<if test="deptName!=null and deptName!=''">
|
|
||||||
and dept_name LIKE '%${deptName}%'
|
|
||||||
</if>
|
|
||||||
<if test="dictId!=null">
|
|
||||||
and dict_id=${dictId}
|
|
||||||
</if>
|
|
||||||
<if test="effective!=null">
|
|
||||||
and effective=${effective}
|
|
||||||
</if>
|
|
||||||
<if test="creater!=null and creater!=''">
|
|
||||||
and creater LIKE '%${creater}%'
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<select id="getDeptList" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from power_dept
|
|
||||||
</select>
|
|
||||||
<select id="selectByPrimaryKeys" parameterType="HashMap" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from power_dept
|
|
||||||
where 1=1
|
|
||||||
<if test="list !=null and list!=''">
|
|
||||||
and dept_id in
|
|
||||||
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<select id="selectDeptByDeptName" parameterType="HashMap" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from power_dept
|
|
||||||
where 1=1
|
|
||||||
<if test="list !=null and list!=''">
|
|
||||||
and dept_name in
|
|
||||||
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<!--根据权限查询医院科室树-->
|
|
||||||
<select id="selectDeptByUserId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
||||||
SELECT
|
|
||||||
power_sys_dict.dict_id,
|
|
||||||
power_sys_dict.hospital_name,
|
|
||||||
power_dept.dept_id,
|
|
||||||
power_dept.dept_name
|
|
||||||
FROM
|
|
||||||
power_dept
|
|
||||||
INNER JOIN power_sys_dict ON power_sys_dict.dict_id = power_dept.dict_id
|
|
||||||
WHERE
|
|
||||||
power_sys_dict.dict_status = 1
|
|
||||||
AND power_dept.effective = 1
|
|
||||||
<if test="userId != null">
|
|
||||||
and power_sys_dict.dict_id = (select power_user_dict.dict_id from power_user_dict WHERE power_user_dict.user_id = ${userId})
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<!--根据医院id查科室集合-->
|
|
||||||
<select id="selectDeptByDictId" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
power_dept.dept_id,
|
|
||||||
power_dept.dept_name
|
|
||||||
<if test="sysFlag != null and sysFlag != ''">
|
|
||||||
,power_sys_dict.dept_id checks
|
|
||||||
</if>
|
|
||||||
FROM
|
|
||||||
power_dept
|
|
||||||
<if test="sysFlag != null and sysFlag != ''">
|
|
||||||
LEFT JOIN
|
|
||||||
power_sys_dict on power_dept.dept_id = power_sys_dict.dept_id and sys_flag = #{sysFlag}
|
|
||||||
</if>
|
|
||||||
WHERE
|
|
||||||
effective = 1
|
|
||||||
<if test="dictId != null">
|
|
||||||
AND
|
|
||||||
power_dept.dict_id = #{dictId}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--批量插入-->
|
|
||||||
<insert id="SimpleInsert" parameterType="java.util.List">
|
|
||||||
INSERT INTO power_dept(
|
|
||||||
dept_id,
|
|
||||||
dept_name,
|
|
||||||
dict_id,
|
|
||||||
effective,
|
|
||||||
create_date,
|
|
||||||
creater,
|
|
||||||
update_date,
|
|
||||||
updater,
|
|
||||||
remark,
|
|
||||||
dept_code
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
<foreach collection ="list" item="item" index= "index" separator =",">
|
|
||||||
(
|
|
||||||
#{item.deptId,jdbcType=INTEGER},
|
|
||||||
#{item.deptName,jdbcType=VARCHAR},
|
|
||||||
#{item.dictId,jdbcType=INTEGER},
|
|
||||||
#{item.effective,jdbcType=INTEGER},
|
|
||||||
#{item.createDate,jdbcType=CHAR},
|
|
||||||
#{item.creater,jdbcType=VARCHAR},
|
|
||||||
#{item.updateDate,jdbcType=CHAR},
|
|
||||||
#{item.updater,jdbcType=VARCHAR},
|
|
||||||
#{item.remark,jdbcType=VARCHAR},
|
|
||||||
#{item.deptCode,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</foreach >
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
|
||||||
@ -1,206 +0,0 @@
|
|||||||
<?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.manage.dao.Power_LogMapper" >
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.vo.Power_LogVo" >
|
|
||||||
<id column="log_id" property="logId" jdbcType="INTEGER" />
|
|
||||||
<result column="log_title" property="logTitle" jdbcType="VARCHAR" />
|
|
||||||
<result column="ip" property="ip" jdbcType="CHAR" />
|
|
||||||
<result column="log_content" property="logContent" jdbcType="VARCHAR" />
|
|
||||||
<result column="sys_flag" property="sysFlag" jdbcType="VARCHAR" />
|
|
||||||
<result column="sys_id" property="sysId" jdbcType="INTEGER" />
|
|
||||||
<result column="create_date" property="createDate" jdbcType="CHAR" />
|
|
||||||
<result column="creater" property="creater" jdbcType="VARCHAR" />
|
|
||||||
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List" >
|
|
||||||
log_id, log_title, ip, log_content, sys_flag, sys_id, create_date, creater, remark
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from power_log
|
|
||||||
where log_id = #{logId,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
||||||
delete from power_log
|
|
||||||
where log_id = #{logId,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.manage.entity.Power_Log" >
|
|
||||||
insert into power_log (log_id, log_title, ip,
|
|
||||||
log_content, sys_flag, sys_id,
|
|
||||||
create_date, creater, remark
|
|
||||||
)
|
|
||||||
values (#{logId,jdbcType=INTEGER}, #{logTitle,jdbcType=VARCHAR}, #{ip,jdbcType=CHAR},
|
|
||||||
#{logContent,jdbcType=VARCHAR}, #{sysFlag,jdbcType=VARCHAR}, #{sysId,jdbcType=INTEGER},
|
|
||||||
#{createDate,jdbcType=CHAR}, #{creater,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.manage.entity.Power_Log" >
|
|
||||||
insert into power_log
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="logId != null" >
|
|
||||||
log_id,
|
|
||||||
</if>
|
|
||||||
<if test="logTitle != null" >
|
|
||||||
log_title,
|
|
||||||
</if>
|
|
||||||
<if test="ip != null" >
|
|
||||||
ip,
|
|
||||||
</if>
|
|
||||||
<if test="logContent != null" >
|
|
||||||
log_content,
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag != null" >
|
|
||||||
sys_flag,
|
|
||||||
</if>
|
|
||||||
<if test="sysId != null" >
|
|
||||||
sys_id,
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null" >
|
|
||||||
create_date,
|
|
||||||
</if>
|
|
||||||
<if test="creater != null" >
|
|
||||||
creater,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null" >
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="logId != null" >
|
|
||||||
#{logId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="logTitle != null" >
|
|
||||||
#{logTitle,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="ip != null" >
|
|
||||||
#{ip,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="logContent != null" >
|
|
||||||
#{logContent,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag != null" >
|
|
||||||
#{sysFlag,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sysId != null" >
|
|
||||||
#{sysId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null" >
|
|
||||||
#{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null" >
|
|
||||||
#{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null" >
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_Log" >
|
|
||||||
update power_log
|
|
||||||
<set >
|
|
||||||
<if test="logTitle != null" >
|
|
||||||
log_title = #{logTitle,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="ip != null" >
|
|
||||||
ip = #{ip,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="logContent != null" >
|
|
||||||
log_content = #{logContent,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag != null" >
|
|
||||||
sys_flag = #{sysFlag,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sysId != null" >
|
|
||||||
sys_id = #{sysId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null" >
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null" >
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null" >
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where log_id = #{logId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_Log" >
|
|
||||||
update power_log
|
|
||||||
set log_title = #{logTitle,jdbcType=VARCHAR},
|
|
||||||
ip = #{ip,jdbcType=CHAR},
|
|
||||||
log_content = #{logContent,jdbcType=VARCHAR},
|
|
||||||
sys_flag = #{sysFlag,jdbcType=VARCHAR},
|
|
||||||
sys_id = #{sysId,jdbcType=INTEGER},
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR}
|
|
||||||
where log_id = #{logId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<select id="selectAll" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
*
|
|
||||||
FROM
|
|
||||||
power_log
|
|
||||||
<where>
|
|
||||||
<if test="record.logTitle != '' and record.logTitle != null">
|
|
||||||
log_title LIKE '%${record.logTitle}%'
|
|
||||||
</if>
|
|
||||||
<if test="record.logContent != '' and record.logContent != null">
|
|
||||||
AND log_content LIKE '%${record.logContent}%'
|
|
||||||
</if>
|
|
||||||
<if test="record.creater != '' and record.creater != null">
|
|
||||||
AND creater LIKE '%${record.creater}%'
|
|
||||||
</if>
|
|
||||||
<if test="startTime != '' and startTime != null">
|
|
||||||
AND create_date >= #{startTime}
|
|
||||||
</if>
|
|
||||||
<if test="endTime != '' and endTime != null">
|
|
||||||
AND create_date <= #{endTime}
|
|
||||||
</if>
|
|
||||||
AND sys_flag = 'power'
|
|
||||||
</where>
|
|
||||||
ORDER BY create_date DESC,log_id DESC
|
|
||||||
<if test="record.offset != null and record.limit != null">
|
|
||||||
LIMIT #{record.offset},#{record.limit}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getTotal" resultType="java.lang.Integer">
|
|
||||||
SELECT
|
|
||||||
count(1)
|
|
||||||
FROM
|
|
||||||
power_log
|
|
||||||
<where>
|
|
||||||
<if test="record.logTitle != '' and record.logTitle != null">
|
|
||||||
log_title LIKE '%${record.logTitle}%'
|
|
||||||
</if>
|
|
||||||
<if test="record.logContent != '' and record.logContent != null">
|
|
||||||
AND log_content LIKE '%${record.logContent}%'
|
|
||||||
</if>
|
|
||||||
<if test="record.creater != '' and record.creater != null">
|
|
||||||
AND creater LIKE '%${record.creater}%'
|
|
||||||
</if>
|
|
||||||
<if test="startTime != '' and startTime != null">
|
|
||||||
AND create_date >= #{startTime}
|
|
||||||
</if>
|
|
||||||
<if test="endTime != '' and endTime != null">
|
|
||||||
AND create_date <= #{endTime}
|
|
||||||
</if>
|
|
||||||
AND sys_flag = 'power'
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
<select id="selectObjectByKey" resultType="java.util.Map">
|
|
||||||
select * from ${tableName} where ${whereSql}
|
|
||||||
</select>
|
|
||||||
<delete id="delLogsByDate">
|
|
||||||
delete from power_log where create_date < #{date} AND sys_flag = 'power'
|
|
||||||
</delete>
|
|
||||||
<select id="selectAllByIds" resultMap="BaseResultMap">
|
|
||||||
select * from power_log where log_id in (${checks}) AND sys_flag = 'power'
|
|
||||||
</select>
|
|
||||||
<delete id="deleteLogByIds">
|
|
||||||
delete from power_log where log_id in (${str})
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
|
||||||
@ -1,117 +0,0 @@
|
|||||||
<?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.manage.dao.Power_Login_SetMapper" >
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.entity.Power_Login_Set" >
|
|
||||||
<id column="id" property="id" jdbcType="INTEGER" />
|
|
||||||
<result column="context" property="context" jdbcType="VARCHAR" />
|
|
||||||
<result column="logo_path" property="logoPath" jdbcType="VARCHAR" />
|
|
||||||
<result column="logo_width" property="logoWidth" jdbcType="INTEGER" />
|
|
||||||
<result column="logo_height" property="logoHeight" jdbcType="INTEGER" />
|
|
||||||
<result column="pic1_path" property="pic1Path" jdbcType="VARCHAR" />
|
|
||||||
<result column="foot_context" property="footContext" jdbcType="VARCHAR" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List" >
|
|
||||||
id, context, logo_path, logo_width, logo_height, pic1_path, foot_context
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from power_login_set
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
||||||
delete from power_login_set
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.manage.entity.Power_Login_Set" >
|
|
||||||
insert into power_login_set (id, context, logo_path,
|
|
||||||
logo_width, logo_height, pic1_path,
|
|
||||||
foot_context)
|
|
||||||
values (#{id,jdbcType=INTEGER}, #{context,jdbcType=VARCHAR}, #{logoPath,jdbcType=VARCHAR},
|
|
||||||
#{logoWidth,jdbcType=INTEGER}, #{logoHeight,jdbcType=INTEGER}, #{pic1Path,jdbcType=VARCHAR},
|
|
||||||
#{footContext,jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.manage.entity.Power_Login_Set" >
|
|
||||||
insert into power_login_set
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >
|
|
||||||
id,
|
|
||||||
</if>
|
|
||||||
<if test="context != null" >
|
|
||||||
context,
|
|
||||||
</if>
|
|
||||||
<if test="logoPath != null" >
|
|
||||||
logo_path,
|
|
||||||
</if>
|
|
||||||
<if test="logoWidth != null" >
|
|
||||||
logo_width,
|
|
||||||
</if>
|
|
||||||
<if test="logoHeight != null" >
|
|
||||||
logo_height,
|
|
||||||
</if>
|
|
||||||
<if test="pic1Path != null" >
|
|
||||||
pic1_path,
|
|
||||||
</if>
|
|
||||||
<if test="footContext != null" >
|
|
||||||
foot_context,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >
|
|
||||||
#{id,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="context != null" >
|
|
||||||
#{context,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="logoPath != null" >
|
|
||||||
#{logoPath,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="logoWidth != null" >
|
|
||||||
#{logoWidth,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="logoHeight != null" >
|
|
||||||
#{logoHeight,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="pic1Path != null" >
|
|
||||||
#{pic1Path,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="footContext != null" >
|
|
||||||
#{footContext,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_Login_Set" >
|
|
||||||
update power_login_set
|
|
||||||
<set >
|
|
||||||
<if test="context != null" >
|
|
||||||
context = #{context,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="logoPath != null" >
|
|
||||||
logo_path = #{logoPath,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="logoWidth != null" >
|
|
||||||
logo_width = #{logoWidth,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="logoHeight != null" >
|
|
||||||
logo_height = #{logoHeight,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="pic1Path != null" >
|
|
||||||
pic1_path = #{pic1Path,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="footContext != null" >
|
|
||||||
foot_context = #{footContext,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_Login_Set" >
|
|
||||||
update power_login_set
|
|
||||||
set context = #{context,jdbcType=VARCHAR},
|
|
||||||
logo_path = #{logoPath,jdbcType=VARCHAR},
|
|
||||||
logo_width = #{logoWidth,jdbcType=INTEGER},
|
|
||||||
logo_height = #{logoHeight,jdbcType=INTEGER},
|
|
||||||
pic1_path = #{pic1Path,jdbcType=VARCHAR},
|
|
||||||
foot_context = #{footContext,jdbcType=VARCHAR}
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
||||||
@ -1,519 +0,0 @@
|
|||||||
<?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.manage.dao.Power_MenuMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.entity.Power_Menu">
|
|
||||||
<id column="menu_id" jdbcType="INTEGER" property="menuId" />
|
|
||||||
<result column="menu_name" jdbcType="VARCHAR" property="menuName" />
|
|
||||||
<result column="menu_icon" jdbcType="VARCHAR" property="menuIcon" />
|
|
||||||
<result column="menu_url" jdbcType="VARCHAR" property="menuUrl" />
|
|
||||||
<result column="menu_desc" jdbcType="VARCHAR" property="menuDesc" />
|
|
||||||
<result column="method" jdbcType="VARCHAR" property="method" />
|
|
||||||
<result column="function_type" jdbcType="VARCHAR" property="functionType" />
|
|
||||||
<result column="method_type" jdbcType="VARCHAR" property="methodType" />
|
|
||||||
<result column="sys_id" jdbcType="INTEGER" property="sysId" />
|
|
||||||
<result column="sys_flag" jdbcType="VARCHAR" property="sysFlag" />
|
|
||||||
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
|
|
||||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
|
||||||
<result column="effective" jdbcType="INTEGER" property="effective" />
|
|
||||||
<result column="create_date" jdbcType="CHAR" property="createDate" />
|
|
||||||
<result column="creater" jdbcType="VARCHAR" property="creater" />
|
|
||||||
<result column="update_date" jdbcType="CHAR" property="updateDate" />
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
|
|
||||||
<resultMap id="ResultMap" type="com.manage.entity.Power_Menu">
|
|
||||||
<id column="menu_id" jdbcType="INTEGER" property="menuId" />
|
|
||||||
<result column="menu_name" jdbcType="VARCHAR" property="menuName" />
|
|
||||||
<result column="menu_icon" jdbcType="VARCHAR" property="menuIcon" />
|
|
||||||
<result column="menu_url" jdbcType="VARCHAR" property="menuUrl" />
|
|
||||||
<result column="menu_desc" jdbcType="VARCHAR" property="menuDesc" />
|
|
||||||
<result column="method" jdbcType="VARCHAR" property="method" />
|
|
||||||
<result column="method_type" jdbcType="VARCHAR" property="methodType" />
|
|
||||||
<result column="sys_id" jdbcType="INTEGER" property="sysId" />
|
|
||||||
<result column="sys_flag" jdbcType="VARCHAR" property="sysFlag" />
|
|
||||||
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
|
|
||||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
|
||||||
<result column="effective" jdbcType="INTEGER" property="effective" />
|
|
||||||
<result column="create_date" jdbcType="CHAR" property="createDate" />
|
|
||||||
<result column="creater" jdbcType="VARCHAR" property="creater" />
|
|
||||||
<result column="update_date" jdbcType="CHAR" property="updateDate" />
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
|
|
||||||
<result column="flag" jdbcType="INTEGER" property="flag" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
menu_id, menu_name, menu_icon, menu_url, menu_desc, method, function_type,method_type, sys_id, sys_flag,
|
|
||||||
parent_id, sort,effective,create_date, creater, update_date, updater, remark
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from power_menu
|
|
||||||
where menu_id = #{menuId,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
delete from power_menu
|
|
||||||
where menu_id = #{menuId,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.manage.entity.Power_Menu">
|
|
||||||
insert into power_menu (menu_id, menu_name, menu_icon,
|
|
||||||
menu_url, menu_desc, method, function_type,
|
|
||||||
method_type, sys_id, sys_flag,parent_id,
|
|
||||||
sort,effective,create_date, creater,
|
|
||||||
update_date, updater, remark
|
|
||||||
)
|
|
||||||
values (#{menuId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR}, #{menuIcon,jdbcType=VARCHAR},
|
|
||||||
#{menuUrl,jdbcType=VARCHAR}, #{menuDesc,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR},#{functionType,jdbcType=VARCHAR},
|
|
||||||
#{methodType,jdbcType=VARCHAR}, #{sysId,jdbcType=INTEGER},#{sysFlag,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
|
|
||||||
#{sort,jdbcType=INTEGER},#{effective,jdbcType=INTEGER}, #{createDate,jdbcType=CHAR}, #{creater,jdbcType=VARCHAR},
|
|
||||||
#{updateDate,jdbcType=CHAR}, #{updater,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.manage.entity.Power_Menu">
|
|
||||||
insert into power_menu
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="menuId != null">
|
|
||||||
menu_id,
|
|
||||||
</if>
|
|
||||||
<if test="menuName != null">
|
|
||||||
menu_name,
|
|
||||||
</if>
|
|
||||||
<if test="menuIcon != null">
|
|
||||||
menu_icon,
|
|
||||||
</if>
|
|
||||||
<if test="menuUrl != null">
|
|
||||||
menu_url,
|
|
||||||
</if>
|
|
||||||
<if test="menuDesc != null">
|
|
||||||
menu_desc,
|
|
||||||
</if>
|
|
||||||
<if test="method != null">
|
|
||||||
method,
|
|
||||||
</if>
|
|
||||||
<if test="functionType != null">
|
|
||||||
function_type,
|
|
||||||
</if>
|
|
||||||
<if test="methodType != null">
|
|
||||||
method_type,
|
|
||||||
</if>
|
|
||||||
<if test="sysId != null">
|
|
||||||
sys_id,
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag != null">
|
|
||||||
sys_flag,
|
|
||||||
</if>
|
|
||||||
<if test="parentId != null">
|
|
||||||
parent_id,
|
|
||||||
</if>
|
|
||||||
<if test="sort != null">
|
|
||||||
sort,
|
|
||||||
</if>
|
|
||||||
<if test="effective != null">
|
|
||||||
effective,
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date,
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater,
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="menuId != null">
|
|
||||||
#{menuId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="menuName != null">
|
|
||||||
#{menuName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuIcon != null">
|
|
||||||
#{menuIcon,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuUrl != null">
|
|
||||||
#{menuUrl,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuDesc != null">
|
|
||||||
#{menuDesc,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="method != null">
|
|
||||||
#{method,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="functionType != null">
|
|
||||||
#{functionType,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="methodType != null">
|
|
||||||
#{methodType,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sysId != null">
|
|
||||||
#{sysId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag != null">
|
|
||||||
#{sysFlag,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="parentId != null">
|
|
||||||
#{parentId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="sort != null">
|
|
||||||
#{sort,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="effective != null">
|
|
||||||
#{effective,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
#{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
#{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
#{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_Menu">
|
|
||||||
update power_menu
|
|
||||||
<set>
|
|
||||||
<if test="menuName != null">
|
|
||||||
menu_name = #{menuName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuIcon != null">
|
|
||||||
menu_icon = #{menuIcon,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuUrl != null">
|
|
||||||
menu_url = #{menuUrl,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuDesc != null">
|
|
||||||
menu_desc = #{menuDesc,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="method != null">
|
|
||||||
method = #{method,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="methodType != null">
|
|
||||||
method_type = #{methodType,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="functionType != null">
|
|
||||||
function_type = #{functionType,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sysId != null">
|
|
||||||
sys_id = #{sysId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag != null">
|
|
||||||
sys_flag = #{sysFlag,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="parentId != null">
|
|
||||||
parent_id = #{parentId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="sort != null">
|
|
||||||
sort = #{sort,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="effective != null">
|
|
||||||
effective = #{effective,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where menu_id = #{menuId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_Menu">
|
|
||||||
update power_menu
|
|
||||||
set menu_name = #{menuName,jdbcType=VARCHAR},
|
|
||||||
menu_icon = #{menuIcon,jdbcType=VARCHAR},
|
|
||||||
menu_url = #{menuUrl,jdbcType=VARCHAR},
|
|
||||||
menu_desc = #{menuDesc,jdbcType=VARCHAR},
|
|
||||||
method = #{method,jdbcType=VARCHAR},
|
|
||||||
function_type = #{functionType,jdbcType=VARCHAR},
|
|
||||||
method_type = #{methodType,jdbcType=VARCHAR},
|
|
||||||
sys_id = #{sysId,jdbcType=INTEGER},
|
|
||||||
sys_flag = #{sysFlag,jdbcType=VARCHAR},
|
|
||||||
parent_id = #{parentId,jdbcType=INTEGER},
|
|
||||||
sort = #{sort,jdbcType=INTEGER},
|
|
||||||
effective = #{effective,jdbcType=INTEGER},
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR}
|
|
||||||
where menu_id = #{menuId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="queryAllPowerMenu" resultMap="BaseResultMap">
|
|
||||||
select DISTINCT sys_id,menu_id,menu_name,menu_icon,method,menu_url,parent_id,sort,sys_flag
|
|
||||||
from power_menu
|
|
||||||
where effective=1 and parent_id != 0
|
|
||||||
<if test="roleId != null and roleId != 0">
|
|
||||||
AND menu_name != '菜单管理'
|
|
||||||
AND menu_name != '归属管理'
|
|
||||||
AND menu_name != '自定义模板'
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag != '' and sysFlag != null">
|
|
||||||
and sys_flag=#{sysFlag}
|
|
||||||
</if>
|
|
||||||
order by sort,sys_id,parent_id
|
|
||||||
</select>
|
|
||||||
<!--<select id="queryMenuViewByUserId" parameterType="java.lang.Integer"
|
|
||||||
resultType="com.manage.entity.Power_Detailed_Menu">
|
|
||||||
select null as dict_id,null as hospital_name,m.sys_id,null as sys_flag,null as sys_name,null as sysParent,cc.menu_id, m.menu_name,m.menu_icon,m.menu_url,m.method,m.parent_id,m.sort as menu_sort from(
|
|
||||||
select u.user_id,u2.role_id,u.menu_id,u.flag
|
|
||||||
from power_user_menu u
|
|
||||||
left join power_user u2
|
|
||||||
on u2.user_id=u.user_id
|
|
||||||
where u2.role_id!=0 and u2.role_id!=-100
|
|
||||||
union
|
|
||||||
select u2.user_id ,r.role_id,r.menu_id,0 as flag from power_role_menu r
|
|
||||||
left join power_user u2
|
|
||||||
on u2.role_id=r.role_id
|
|
||||||
where u2.role_id!=0 and u2.role_id!=-100
|
|
||||||
) cc
|
|
||||||
left join power_menu m
|
|
||||||
on m.menu_id=cc.menu_id
|
|
||||||
where m.effective=1 and cc.user_id=#{userId,jdbcType=INTEGER}
|
|
||||||
union
|
|
||||||
select d.dict_id,d.hospital_name,null as sys_id,d.sys_flag,d.sys_name,d.parent_id as sysParent,null as menu_id,null as menu_name,null as menu_icon,null as menu_url,null as method,null as parent_id,null as menu_sort
|
|
||||||
from power_sys_dict d
|
|
||||||
where d.dict_status=1
|
|
||||||
and d.dict_id=(select dict_id from power_dept where dept_id =(select substring_index(dept_id,',', 1) from power_user where effective=1 and user_id=#{userId,jdbcType=INTEGER}))
|
|
||||||
or (d.parent_id=(select dict_id from power_dept where dept_id =(select substring_index(dept_id,',', 1) from power_user where effective=1 and user_id=#{userId,jdbcType=INTEGER}))
|
|
||||||
and d.sys_flag='power')
|
|
||||||
</select>-->
|
|
||||||
<select id="queryPoswerMenuByUserId" parameterType="java.lang.Integer" resultType="com.manage.entity.Power_Menu_User">
|
|
||||||
SELECT
|
|
||||||
distinct
|
|
||||||
sys_id dict_id,
|
|
||||||
hospital_name,
|
|
||||||
sys_flag,
|
|
||||||
sys_name,
|
|
||||||
hospital_id AS sys_parent,
|
|
||||||
menu_id,
|
|
||||||
menu_name,
|
|
||||||
menu_icon,
|
|
||||||
menu_url,
|
|
||||||
method,
|
|
||||||
sort menu_sort,
|
|
||||||
method_parent parent_id
|
|
||||||
FROM
|
|
||||||
user_dept_menu
|
|
||||||
WHERE
|
|
||||||
user_id = #{userId,jdbcType=INTEGER}
|
|
||||||
AND menu_name != '菜单管理'
|
|
||||||
AND menu_name != '归属管理'
|
|
||||||
AND menu_name != '自定义模板'
|
|
||||||
AND method_parent != 0
|
|
||||||
<if test="sysFlag != '' and sysFlag != null">
|
|
||||||
and sys_flag=#{sysFlag}
|
|
||||||
</if>
|
|
||||||
order by sys_id,menu_id,sort
|
|
||||||
</select>
|
|
||||||
<!--/* select * from(
|
|
||||||
select d.dict_id,d.hospital_name,d.sys_flag,d.sys_name,d.parent_id as sys_parent ,null as menu_id,null as menu_name,null as menu_icon,null as menu_url,null as method,null as sys_id,null as parent_id,null as menu_sort
|
|
||||||
from power_sys_dict d
|
|
||||||
where d.dict_status=1
|
|
||||||
union
|
|
||||||
select d.dict_id,d.hospital_name,d.sys_flag,d.sys_name,d.parent_id as sys_parent,m.menu_id,m.menu_name,m.menu_icon,m.menu_url,m.method,m.sys_id,m.parent_id,m.sort as menu_sort
|
|
||||||
from power_sys_dict d
|
|
||||||
left join power_menu m
|
|
||||||
on m.sys_id=d.dict_id
|
|
||||||
where d.dict_status=1
|
|
||||||
) cc
|
|
||||||
where dict_id=(select dict_id from power_dept where dept_id =(select substring_index(dept_id,',', 1) from power_user where effective=1 and user_id=#{userId,jdbcType=INTEGER}))
|
|
||||||
or (sys_parent=(select dict_id from power_dept where dept_id =(select substring_index(dept_id,',', 1) from power_user where effective=1 and user_id=#{userId,jdbcType=INTEGER}))
|
|
||||||
and sys_flag='power')
|
|
||||||
*/ -->
|
|
||||||
<!--2019-04-29zengwh-->
|
|
||||||
<!--查询全部-->
|
|
||||||
<select id="selectAll" resultMap="BaseResultMap" parameterType="string">
|
|
||||||
SELECT
|
|
||||||
*,
|
|
||||||
menu_name newName
|
|
||||||
FROM power_menu
|
|
||||||
<where>
|
|
||||||
<if test="sysFlag != null and sysFlag != ''">
|
|
||||||
sys_flag = #{sysFlag}
|
|
||||||
</if>
|
|
||||||
<if test="isEffective == 1">
|
|
||||||
AND effective = 1
|
|
||||||
</if>
|
|
||||||
<if test="roleId != null and roleId != 0">
|
|
||||||
AND menu_name != '菜单管理'
|
|
||||||
AND menu_name != '归属管理'
|
|
||||||
AND menu_name != '自定义模板'
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY parent_id,sort
|
|
||||||
</select>
|
|
||||||
<!--2019-04-29zengwh-->
|
|
||||||
<!--根据菜单id查询功能方法集合-->
|
|
||||||
<select id="selectMethodByMenuIdPowerTree" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
||||||
SELECT
|
|
||||||
*
|
|
||||||
FROM
|
|
||||||
power_menu
|
|
||||||
WHERE
|
|
||||||
parent_id = ${parentId}
|
|
||||||
AND effective = 1
|
|
||||||
AND method IS NOT NULL
|
|
||||||
ORDER BY
|
|
||||||
sort
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--2019-06-28 ljx-->
|
|
||||||
<!--根据系统id和角色id查出角色菜单-->
|
|
||||||
<select id="selectRoleMenuByUserIdAndDictId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
||||||
SELECT
|
|
||||||
a.*
|
|
||||||
FROM
|
|
||||||
power_menu a,
|
|
||||||
power_role_menu b
|
|
||||||
WHERE
|
|
||||||
a.sys_id = ${dictId}
|
|
||||||
AND b.role_id in (SELECT role_id FROM power_user WHERE user_id = ${userId} and effective = 1)
|
|
||||||
AND a.menu_id = b.menu_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--2019-06-28 ljx-->
|
|
||||||
<!--根据系统id和角色id查出用户菜单-->
|
|
||||||
<select id="selectUserMenuByUserIdAndDictId" resultMap="ResultMap" parameterType="java.lang.Integer">
|
|
||||||
SELECT
|
|
||||||
a.*,b.flag
|
|
||||||
FROM
|
|
||||||
power_menu a,
|
|
||||||
power_user_menu b
|
|
||||||
WHERE
|
|
||||||
a.sys_id = ${dictId}
|
|
||||||
AND b.user_id = ${userId}
|
|
||||||
AND a.menu_id = b.menu_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--验证同一系统菜单名不能重复-->
|
|
||||||
<select id="checkMenuNameBySysId" resultMap="ResultMap" parameterType="java.lang.String">
|
|
||||||
SELECT
|
|
||||||
menu_id
|
|
||||||
FROM
|
|
||||||
power_menu
|
|
||||||
WHERE
|
|
||||||
sys_flag = #{sysFlag}
|
|
||||||
AND menu_name = #{menuName}
|
|
||||||
</select>
|
|
||||||
<!--验证同一菜单功能名或功能方法不能重复-->
|
|
||||||
<select id="checkMethodByParentId" resultMap="ResultMap" parameterType="java.lang.Integer">
|
|
||||||
SELECT
|
|
||||||
menu_id,sys_id,sys_flag
|
|
||||||
FROM
|
|
||||||
power_menu
|
|
||||||
WHERE
|
|
||||||
parent_id = ${parentId}
|
|
||||||
<if test="menuName != null and menuName != ''">
|
|
||||||
AND menu_name = #{menuName}
|
|
||||||
</if>
|
|
||||||
<if test="method != null and method != ''">
|
|
||||||
AND method = #{method}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<!--根据系统id和用户id查出对应该系统在用户菜单表和角色菜单表的综合表-->
|
|
||||||
<select id="selectUserAndRoleMenuListPower" parameterType="string" resultMap="BaseResultMap">
|
|
||||||
SELECT DISTINCT power_menu.menu_id, menu_name, menu_icon, menu_url, menu_desc, method, function_type,method_type, sys_id,
|
|
||||||
sys_flag,
|
|
||||||
parent_id, sort,effective,create_date, creater, update_date, updater, remark FROM power_menu
|
|
||||||
INNER JOIN (
|
|
||||||
SELECT
|
|
||||||
m.menu_id
|
|
||||||
FROM
|
|
||||||
power_menu m
|
|
||||||
WHERE
|
|
||||||
m.menu_id IN (
|
|
||||||
SELECT
|
|
||||||
r.menu_id
|
|
||||||
FROM
|
|
||||||
power_role_menu r
|
|
||||||
WHERE
|
|
||||||
r.role_id = (
|
|
||||||
SELECT
|
|
||||||
u.role_id
|
|
||||||
FROM
|
|
||||||
power_user u
|
|
||||||
WHERE
|
|
||||||
u.user_id = #{userId}
|
|
||||||
)
|
|
||||||
AND r.menu_id NOT IN (
|
|
||||||
SELECT
|
|
||||||
m.menu_id
|
|
||||||
FROM
|
|
||||||
power_menu m
|
|
||||||
WHERE
|
|
||||||
m.menu_id IN (
|
|
||||||
SELECT
|
|
||||||
pu.menu_id
|
|
||||||
FROM
|
|
||||||
power_user_menu pu
|
|
||||||
WHERE
|
|
||||||
pu.user_id = #{userId}
|
|
||||||
AND pu.flag = 0
|
|
||||||
)
|
|
||||||
<if test="sysFlag != null and sysFlag != ''">AND m.sys_flag = #{sysFlag}
|
|
||||||
</if>
|
|
||||||
)
|
|
||||||
)
|
|
||||||
<if test="sysFlag != null and sysFlag != ''">
|
|
||||||
AND m.sys_flag = #{sysFlag}
|
|
||||||
</if>
|
|
||||||
UNION ALL
|
|
||||||
SELECT
|
|
||||||
m.menu_id
|
|
||||||
FROM
|
|
||||||
power_menu
|
|
||||||
m
|
|
||||||
WHERE
|
|
||||||
m.menu_id IN (
|
|
||||||
SELECT
|
|
||||||
pu.menu_id menuId1
|
|
||||||
FROM
|
|
||||||
power_user_menu pu
|
|
||||||
WHERE
|
|
||||||
pu.user_id = #{userId}
|
|
||||||
AND pu.flag = 1
|
|
||||||
)
|
|
||||||
<if test="sysFlag != null and sysFlag != ''">
|
|
||||||
AND m.sys_flag = #{sysFlag}
|
|
||||||
</if>) a
|
|
||||||
on a.menu_id = power_menu.menu_id AND power_menu.effective=1 and power_menu.parent_id != 0
|
|
||||||
order by power_menu.sort
|
|
||||||
</select>
|
|
||||||
<update id="updateChildSysFlagAndSysId">
|
|
||||||
update power_menu set sys_id = #{sysId},sys_flag = #{sysFlag} where parent_id = #{menuId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,338 +0,0 @@
|
|||||||
<?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.manage.dao.Power_RoleMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.vo.Power_RoleVo" >
|
|
||||||
<id column="role_id" property="roleId" jdbcType="INTEGER" />
|
|
||||||
<result column="role_name" property="roleName" jdbcType="VARCHAR" />
|
|
||||||
<result column="show_record" property="showRecord" jdbcType="SMALLINT" />
|
|
||||||
<result column="downLoad_record" property="downloadRecord" jdbcType="SMALLINT" />
|
|
||||||
<result column="show_print" property="showPrint" jdbcType="SMALLINT" />
|
|
||||||
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
|
||||||
<result column="effective" property="effective" jdbcType="INTEGER" />
|
|
||||||
<result column="create_date" property="createDate" jdbcType="CHAR" />
|
|
||||||
<result column="creater" property="creater" jdbcType="VARCHAR" />
|
|
||||||
<result column="update_date" property="updateDate" jdbcType="CHAR" />
|
|
||||||
<result column="updater" property="updater" jdbcType="VARCHAR" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List" >
|
|
||||||
role_id, role_name, show_record, downLoad_record, show_print, remark, effective,
|
|
||||||
create_date, creater, update_date, updater
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from power_role
|
|
||||||
where role_id = #{roleId,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
||||||
delete from power_role
|
|
||||||
where role_id = #{roleId,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.manage.entity.Power_Role" >
|
|
||||||
insert into power_role (role_id, role_name, show_record,
|
|
||||||
downLoad_record, show_print, remark,
|
|
||||||
effective, create_date, creater,
|
|
||||||
update_date, updater)
|
|
||||||
values (#{roleId,jdbcType=INTEGER}, #{roleName,jdbcType=VARCHAR}, #{showRecord,jdbcType=SMALLINT},
|
|
||||||
#{downloadRecord,jdbcType=SMALLINT}, #{showPrint,jdbcType=SMALLINT}, #{remark,jdbcType=VARCHAR},
|
|
||||||
#{effective,jdbcType=INTEGER}, #{createDate,jdbcType=CHAR}, #{creater,jdbcType=VARCHAR},
|
|
||||||
#{updateDate,jdbcType=CHAR}, #{updater,jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.manage.entity.Power_Role" >
|
|
||||||
insert into power_role
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="roleId != null" >
|
|
||||||
role_id,
|
|
||||||
</if>
|
|
||||||
<if test="roleName != null" >
|
|
||||||
role_name,
|
|
||||||
</if>
|
|
||||||
<if test="showRecord != null" >
|
|
||||||
show_record,
|
|
||||||
</if>
|
|
||||||
<if test="downloadRecord != null" >
|
|
||||||
downLoad_record,
|
|
||||||
</if>
|
|
||||||
<if test="showPrint != null" >
|
|
||||||
show_print,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null" >
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
<if test="effective != null" >
|
|
||||||
effective,
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null" >
|
|
||||||
create_date,
|
|
||||||
</if>
|
|
||||||
<if test="creater != null" >
|
|
||||||
creater,
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null" >
|
|
||||||
update_date,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null" >
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="roleId != null" >
|
|
||||||
#{roleId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="roleName != null" >
|
|
||||||
#{roleName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="showRecord != null" >
|
|
||||||
#{showRecord,jdbcType=SMALLINT},
|
|
||||||
</if>
|
|
||||||
<if test="downloadRecord != null" >
|
|
||||||
#{downloadRecord,jdbcType=SMALLINT},
|
|
||||||
</if>
|
|
||||||
<if test="showPrint != null" >
|
|
||||||
#{showPrint,jdbcType=SMALLINT},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null" >
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="effective != null" >
|
|
||||||
#{effective,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null" >
|
|
||||||
#{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null" >
|
|
||||||
#{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null" >
|
|
||||||
#{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null" >
|
|
||||||
#{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_Role" >
|
|
||||||
update power_role
|
|
||||||
<set >
|
|
||||||
<if test="roleName != null" >
|
|
||||||
role_name = #{roleName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="showRecord != null" >
|
|
||||||
show_record = #{showRecord,jdbcType=SMALLINT},
|
|
||||||
</if>
|
|
||||||
<if test="downloadRecord != null" >
|
|
||||||
downLoad_record = #{downloadRecord,jdbcType=SMALLINT},
|
|
||||||
</if>
|
|
||||||
<if test="showPrint != null" >
|
|
||||||
show_print = #{showPrint,jdbcType=SMALLINT},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null" >
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="effective != null" >
|
|
||||||
effective = #{effective,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null" >
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null" >
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null" >
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null" >
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where role_id = #{roleId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_Role" >
|
|
||||||
update power_role
|
|
||||||
set role_name = #{roleName,jdbcType=VARCHAR},
|
|
||||||
show_record = #{showRecord,jdbcType=SMALLINT},
|
|
||||||
downLoad_record = #{downloadRecord,jdbcType=SMALLINT},
|
|
||||||
show_print = #{showPrint,jdbcType=SMALLINT},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
effective = #{effective,jdbcType=INTEGER},
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
updater = #{updater,jdbcType=VARCHAR}
|
|
||||||
where role_id = #{roleId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<select id="findSomeByMore" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
FROM power_role
|
|
||||||
WHERE 1 = 1
|
|
||||||
<if test="roleId != null and roleId != 0">
|
|
||||||
AND role_id != -100
|
|
||||||
AND creater IN (
|
|
||||||
SELECT
|
|
||||||
user_name
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
user_id IN (
|
|
||||||
SELECT
|
|
||||||
user_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
dict_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = ${userId}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
OR role_id = 0
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
AND role_id != 0
|
|
||||||
<if test="record.roleName!=null and record.roleName!=''">
|
|
||||||
and role_name LIKE '%${record.roleName}%'
|
|
||||||
</if>
|
|
||||||
<if test="record.effective!=null">
|
|
||||||
and effective=${record.effective}
|
|
||||||
</if>
|
|
||||||
<if test="record.creater!=null and record.creater!=''">
|
|
||||||
and creater LIKE '%${record.creater}%'
|
|
||||||
</if>
|
|
||||||
<if test="record.checks != null and record.checks != ''">
|
|
||||||
AND role_id IN (${record.checks})
|
|
||||||
</if>
|
|
||||||
ORDER BY create_date DESC,role_id DESC
|
|
||||||
<if test="record.offset != null and record.limit != null">
|
|
||||||
LIMIT #{record.offset},#{record.limit}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getTotal" resultType="int">
|
|
||||||
SELECT
|
|
||||||
count(1)
|
|
||||||
FROM power_role
|
|
||||||
WHERE 1 = 1
|
|
||||||
<if test="roleId != null and roleId != 0">
|
|
||||||
AND role_id != -100
|
|
||||||
AND creater IN (
|
|
||||||
SELECT
|
|
||||||
user_name
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
user_id IN (
|
|
||||||
SELECT
|
|
||||||
user_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
dict_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = ${userId}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
OR role_id = 0
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
AND role_id != 0
|
|
||||||
<if test="record.roleName!=null and record.roleName!=''">
|
|
||||||
and role_name LIKE '%${record.roleName}%'
|
|
||||||
</if>
|
|
||||||
<if test="record.effective!=null">
|
|
||||||
and effective=${record.effective}
|
|
||||||
</if>
|
|
||||||
<if test="record.creater!=null and record.creater!=''">
|
|
||||||
and creater LIKE '%${record.creater}%'
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectList" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
FROM power_role
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--验证角色名是否重复-->
|
|
||||||
<select id="checkRoleName" parameterType="java.lang.String" resultType="com.manage.entity.Power_Role">
|
|
||||||
SELECT
|
|
||||||
role_id
|
|
||||||
FROM
|
|
||||||
power_role
|
|
||||||
WHERE
|
|
||||||
role_name = #{roleName}
|
|
||||||
</select>
|
|
||||||
<!--按权限查询角色结合-->
|
|
||||||
<select id="selectListByPower" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
FROM power_role
|
|
||||||
WHERE
|
|
||||||
effective = 1
|
|
||||||
<if test="roleId != null and roleId != 0">
|
|
||||||
AND role_id != -100
|
|
||||||
AND creater IN (
|
|
||||||
SELECT
|
|
||||||
user_name
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
user_id IN (
|
|
||||||
SELECT
|
|
||||||
user_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
dict_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = ${userId}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
OR role_id = 0
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
AND role_id != 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--批量插入-->
|
|
||||||
<insert id="SimpleInsert" parameterType="java.util.List">
|
|
||||||
INSERT INTO power_role(
|
|
||||||
role_id,
|
|
||||||
role_name,
|
|
||||||
show_record,
|
|
||||||
downLoad_record,
|
|
||||||
effective,
|
|
||||||
create_date,
|
|
||||||
creater,
|
|
||||||
update_date,
|
|
||||||
updater,
|
|
||||||
remark
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
<foreach collection ="list" item="item" index= "index" separator =",">
|
|
||||||
(
|
|
||||||
#{item.roleId,jdbcType=INTEGER},
|
|
||||||
#{item.roleName,jdbcType=VARCHAR},
|
|
||||||
#{item.showRecord,jdbcType=SMALLINT},
|
|
||||||
#{item.downloadRecord,jdbcType=SMALLINT},
|
|
||||||
#{item.effective,jdbcType=INTEGER},
|
|
||||||
#{item.createDate,jdbcType=CHAR},
|
|
||||||
#{item.creater,jdbcType=VARCHAR},
|
|
||||||
#{item.updateDate,jdbcType=CHAR},
|
|
||||||
#{item.updater,jdbcType=VARCHAR},
|
|
||||||
#{item.remark,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</foreach >
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
|
||||||
@ -1,217 +0,0 @@
|
|||||||
<?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.manage.dao.Power_Role_MenuMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.entity.Power_Role_Menu">
|
|
||||||
<id column="role_menu_id" jdbcType="INTEGER" property="roleMenuId" />
|
|
||||||
<result column="role_id" jdbcType="INTEGER" property="roleId" />
|
|
||||||
<result column="menu_id" jdbcType="INTEGER" property="menuId" />
|
|
||||||
<result column="create_date" jdbcType="CHAR" property="createDate" />
|
|
||||||
<result column="creater" jdbcType="VARCHAR" property="creater" />
|
|
||||||
<result column="update_date" jdbcType="CHAR" property="updateDate" />
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
role_menu_id, role_id, menu_id, create_date, creater, update_date, updater, remark
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from power_role_menu
|
|
||||||
where role_menu_id = #{roleMenuId,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
delete from power_role_menu
|
|
||||||
where role_menu_id = #{roleMenuId,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.manage.entity.Power_Role_Menu">
|
|
||||||
insert into power_role_menu (role_menu_id, role_id, menu_id,
|
|
||||||
create_date, creater, update_date,
|
|
||||||
updater, remark)
|
|
||||||
values (#{roleMenuId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{menuId,jdbcType=INTEGER},
|
|
||||||
#{createDate,jdbcType=CHAR}, #{creater,jdbcType=VARCHAR}, #{updateDate,jdbcType=CHAR},
|
|
||||||
#{updater,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.manage.entity.Power_Role_Menu">
|
|
||||||
insert into power_role_menu
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="roleMenuId != null">
|
|
||||||
role_menu_id,
|
|
||||||
</if>
|
|
||||||
<if test="roleId != null">
|
|
||||||
role_id,
|
|
||||||
</if>
|
|
||||||
<if test="menuId != null">
|
|
||||||
menu_id,
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date,
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater,
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="roleMenuId != null">
|
|
||||||
#{roleMenuId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="roleId != null">
|
|
||||||
#{roleId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="menuId != null">
|
|
||||||
#{menuId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
#{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
#{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
#{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_Role_Menu">
|
|
||||||
update power_role_menu
|
|
||||||
<set>
|
|
||||||
<if test="roleId != null">
|
|
||||||
role_id = #{roleId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="menuId != null">
|
|
||||||
menu_id = #{menuId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where role_menu_id = #{roleMenuId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_Role_Menu">
|
|
||||||
update power_role_menu
|
|
||||||
set role_id = #{roleId,jdbcType=INTEGER},
|
|
||||||
menu_id = #{menuId,jdbcType=INTEGER},
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR}
|
|
||||||
where role_menu_id = #{roleMenuId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<!--根据系统id和角色id查出对应该系统在用户菜单表的记录-->
|
|
||||||
<select id="selectRoleMenuByRoleId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from
|
|
||||||
power_role_menu
|
|
||||||
where role_id = ${roleId}
|
|
||||||
</select>
|
|
||||||
<!--根据系统id和角色id查出对应该系统在用户菜单表的记录-->
|
|
||||||
<select id="selectRoleMenuPower" parameterType="string" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
b.role_menu_id,b.menu_Id
|
|
||||||
FROM
|
|
||||||
power_menu a,
|
|
||||||
power_role_menu b
|
|
||||||
WHERE
|
|
||||||
a.sys_flag = #{sysFlag}
|
|
||||||
AND b.role_id = ${roleId}
|
|
||||||
AND a.menu_id = b.menu_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--根据系统标识和角色id删除记录-->
|
|
||||||
<delete id="deleteRoleMenuByRoleAndSysFlag">
|
|
||||||
DELETE
|
|
||||||
FROM
|
|
||||||
power_role_menu
|
|
||||||
WHERE
|
|
||||||
role_id = #{roleId}
|
|
||||||
AND menu_id IN (
|
|
||||||
SELECT
|
|
||||||
c.menu_id
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
b.menu_Id
|
|
||||||
FROM
|
|
||||||
power_menu a,
|
|
||||||
power_role_menu b
|
|
||||||
WHERE
|
|
||||||
a.sys_flag = #{sysFlag}
|
|
||||||
AND b.role_id = #{roleId}
|
|
||||||
AND a.menu_id = b.menu_id
|
|
||||||
) c
|
|
||||||
)
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!--2019-06-28 ljx-->
|
|
||||||
<!--根据用户ID查询角色菜单表-->
|
|
||||||
<select id="getRoleMenuByUserId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
||||||
SELECT
|
|
||||||
*
|
|
||||||
FROM
|
|
||||||
power_role_menu
|
|
||||||
WHERE
|
|
||||||
role_id IN (
|
|
||||||
SELECT
|
|
||||||
role_id
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
user_id = ${userId}
|
|
||||||
);
|
|
||||||
</select>
|
|
||||||
<!--批量插入-->
|
|
||||||
<insert id="simpleInsertRoleMenu" parameterType="java.util.List">
|
|
||||||
INSERT INTO power_role_menu(
|
|
||||||
role_menu_id,
|
|
||||||
role_id,
|
|
||||||
menu_id,
|
|
||||||
create_date,
|
|
||||||
creater,
|
|
||||||
update_date,
|
|
||||||
updater,
|
|
||||||
remark)
|
|
||||||
VALUES
|
|
||||||
<foreach collection ="list" item="item" index= "index" separator =",">
|
|
||||||
(
|
|
||||||
#{item.roleMenuId,jdbcType=INTEGER},
|
|
||||||
#{item.roleId,jdbcType=INTEGER},
|
|
||||||
#{item.menuId,jdbcType=INTEGER},
|
|
||||||
#{item.createDate,jdbcType=CHAR},
|
|
||||||
#{item.creater,jdbcType=VARCHAR},
|
|
||||||
#{item.updateDate,jdbcType=CHAR},
|
|
||||||
#{item.updater,jdbcType=VARCHAR},
|
|
||||||
#{item.remark,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</foreach >
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@ -1,874 +0,0 @@
|
|||||||
<?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.manage.dao.Power_Sys_DictMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.entity.Power_Sys_Dict">
|
|
||||||
<id column="dict_id" jdbcType="INTEGER" property="dictId"/>
|
|
||||||
<result column="dept_id" jdbcType="INTEGER" property="deptId"/>
|
|
||||||
<result column="hospital_name" jdbcType="VARCHAR" property="hospitalName"/>
|
|
||||||
<result column="sys_flag" jdbcType="VARCHAR" property="sysFlag"/>
|
|
||||||
<result column="sys_name" jdbcType="VARCHAR" property="sysName"/>
|
|
||||||
<result column="dict_area" jdbcType="VARCHAR" property="dictArea"/>
|
|
||||||
<result column="hospital_tel" jdbcType="VARCHAR" property="hospitalTel"/>
|
|
||||||
<result column="parent_id" jdbcType="INTEGER" property="parentId"/>
|
|
||||||
<result column="sys_type" jdbcType="VARCHAR" property="sysType"/>
|
|
||||||
<result column="sort" jdbcType="INTEGER" property="sort"/>
|
|
||||||
<result column="dict_status" jdbcType="INTEGER" property="dictStatus"/>
|
|
||||||
<result column="dict_edit" jdbcType="INTEGER" property="dictEdit"/>
|
|
||||||
<result column="create_date" jdbcType="CHAR" property="createDate"/>
|
|
||||||
<result column="creater" jdbcType="VARCHAR" property="creater"/>
|
|
||||||
<result column="update_date" jdbcType="CHAR" property="updateDate"/>
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater"/>
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
|
||||||
</resultMap>
|
|
||||||
<resultMap id="BaseResultMapVo" type="com.manage.vo.Power_Sys_DictVo">
|
|
||||||
<result column="sys_name" jdbcType="VARCHAR" property="sysName"/>
|
|
||||||
<result column="dict_status" jdbcType="INTEGER" property="dictStatus"/>
|
|
||||||
<result column="dept_name" jdbcType="VARCHAR" property="deptName"/>
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
dict_id, dept_id, hospital_name, sys_flag, sys_name, dict_area, hospital_tel, parent_id,
|
|
||||||
sys_type, sort, dict_status, dict_edit, create_date, creater, update_date, updater,
|
|
||||||
remark
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMapVo">
|
|
||||||
SELECT
|
|
||||||
power_sys_dict.dict_id,
|
|
||||||
power_sys_dict.dept_id,
|
|
||||||
power_sys_dict.sys_flag,
|
|
||||||
power_sys_dict.sys_name,
|
|
||||||
power_sys_dict.parent_id,
|
|
||||||
power_sys_dict.sys_type,
|
|
||||||
power_sys_dict.sort,
|
|
||||||
power_sys_dict.dict_status,
|
|
||||||
power_sys_dict.dict_edit,
|
|
||||||
power_sys_dict.create_date,
|
|
||||||
power_sys_dict.creater,
|
|
||||||
power_sys_dict.update_date,
|
|
||||||
power_sys_dict.updater,
|
|
||||||
power_sys_dict.remark,
|
|
||||||
if(power_sys_dict1.hospital_name != '',power_sys_dict1.hospital_name,power_sys_dict.hospital_name) hospital_name,
|
|
||||||
if(power_sys_dict1.hospital_tel != '',power_sys_dict1.hospital_tel,power_sys_dict.hospital_tel) hospital_tel,
|
|
||||||
if(power_sys_dict1.dict_area != '',power_sys_dict1.dict_area,power_sys_dict.dict_area) dict_area,
|
|
||||||
if(power_sys_dict.parent_id != 0,power_sys_dict.parent_id,power_sys_dict.dict_id) hospitalId
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
LEFT JOIN power_sys_dict power_sys_dict1 ON power_sys_dict.parent_id = power_sys_dict1.dict_id
|
|
||||||
WHERE power_sys_dict.dict_id = #{dictId,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
delete from power_sys_dict
|
|
||||||
where dict_id = #{dictId,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.manage.entity.Power_Sys_Dict">
|
|
||||||
insert into power_sys_dict (dict_id, dept_id, hospital_name,
|
|
||||||
sys_flag, sys_name, dict_area,
|
|
||||||
hospital_tel, parent_id, sys_type,
|
|
||||||
sort, dict_status, dict_edit,
|
|
||||||
create_date, creater, update_date,
|
|
||||||
updater, remark)
|
|
||||||
values (#{dictId,jdbcType=INTEGER}, #{deptId,jdbcType=INTEGER}, #{hospitalName,jdbcType=VARCHAR},
|
|
||||||
#{sysFlag,jdbcType=VARCHAR}, #{sysName,jdbcType=VARCHAR}, #{dictArea,jdbcType=VARCHAR},
|
|
||||||
#{hospitalTel,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{sysType,jdbcType=VARCHAR},
|
|
||||||
#{sort,jdbcType=INTEGER}, #{dictStatus,jdbcType=INTEGER}, #{dictEdit,jdbcType=INTEGER},
|
|
||||||
#{createDate,jdbcType=CHAR}, #{creater,jdbcType=VARCHAR}, #{updateDate,jdbcType=CHAR},
|
|
||||||
#{updater,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.manage.entity.Power_Sys_Dict" useGeneratedKeys="true"
|
|
||||||
keyProperty="dictId">
|
|
||||||
insert into power_sys_dict
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="dictId != null">
|
|
||||||
dict_id,
|
|
||||||
</if>
|
|
||||||
<if test="deptId != null">
|
|
||||||
dept_id,
|
|
||||||
</if>
|
|
||||||
<if test="hospitalName != null">
|
|
||||||
hospital_name,
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag != null">
|
|
||||||
sys_flag,
|
|
||||||
</if>
|
|
||||||
<if test="sysName != null">
|
|
||||||
sys_name,
|
|
||||||
</if>
|
|
||||||
<if test="dictArea != null">
|
|
||||||
dict_area,
|
|
||||||
</if>
|
|
||||||
<if test="hospitalTel != null">
|
|
||||||
hospital_tel,
|
|
||||||
</if>
|
|
||||||
<if test="parentId != null">
|
|
||||||
parent_id,
|
|
||||||
</if>
|
|
||||||
<if test="sysType != null">
|
|
||||||
sys_type,
|
|
||||||
</if>
|
|
||||||
<if test="sort != null">
|
|
||||||
sort,
|
|
||||||
</if>
|
|
||||||
<if test="dictStatus != null">
|
|
||||||
dict_status,
|
|
||||||
</if>
|
|
||||||
<if test="dictEdit != null">
|
|
||||||
dict_edit,
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date,
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater,
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="dictId != null">
|
|
||||||
#{dictId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="deptId != null">
|
|
||||||
#{deptId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="hospitalName != null">
|
|
||||||
#{hospitalName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag != null">
|
|
||||||
#{sysFlag,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sysName != null">
|
|
||||||
#{sysName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="dictArea != null">
|
|
||||||
#{dictArea,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="hospitalTel != null">
|
|
||||||
#{hospitalTel,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="parentId != null">
|
|
||||||
#{parentId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="sysType != null">
|
|
||||||
#{sysType,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sort != null">
|
|
||||||
#{sort,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="dictStatus != null">
|
|
||||||
#{dictStatus,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="dictEdit != null">
|
|
||||||
#{dictEdit,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
#{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
#{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
#{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_Sys_Dict">
|
|
||||||
update power_sys_dict
|
|
||||||
<set>
|
|
||||||
<if test="deptId != null">
|
|
||||||
dept_id = #{deptId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="hospitalName != null">
|
|
||||||
hospital_name = #{hospitalName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag != null">
|
|
||||||
sys_flag = #{sysFlag,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sysName != null">
|
|
||||||
sys_name = #{sysName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="dictArea != null">
|
|
||||||
dict_area = #{dictArea,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="hospitalTel != null">
|
|
||||||
hospital_tel = #{hospitalTel,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="parentId != null">
|
|
||||||
parent_id = #{parentId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="sysType != null">
|
|
||||||
sys_type = #{sysType,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="sort != null">
|
|
||||||
sort = #{sort,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="dictStatus != null">
|
|
||||||
dict_status = #{dictStatus,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="dictEdit != null">
|
|
||||||
dict_edit = #{dictEdit,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where dict_id = #{dictId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_Sys_Dict">
|
|
||||||
update power_sys_dict
|
|
||||||
set dept_id = #{deptId,jdbcType=INTEGER},
|
|
||||||
hospital_name = #{hospitalName,jdbcType=VARCHAR},
|
|
||||||
sys_flag = #{sysFlag,jdbcType=VARCHAR},
|
|
||||||
sys_name = #{sysName,jdbcType=VARCHAR},
|
|
||||||
dict_area = #{dictArea,jdbcType=VARCHAR},
|
|
||||||
hospital_tel = #{hospitalTel,jdbcType=VARCHAR},
|
|
||||||
parent_id = #{parentId,jdbcType=INTEGER},
|
|
||||||
sys_type = #{sysType,jdbcType=VARCHAR},
|
|
||||||
sort = #{sort,jdbcType=INTEGER},
|
|
||||||
dict_status = #{dictStatus,jdbcType=INTEGER},
|
|
||||||
dict_edit = #{dictEdit,jdbcType=INTEGER},
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR}
|
|
||||||
where dict_id = #{dictId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<!--2019-4-22 ly -->
|
|
||||||
<select id="findSomeByMore" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from power_sys_dict where 1 = 1
|
|
||||||
<if test="deptId!=null and deptId!=''">
|
|
||||||
and dept_id=#{deptId}
|
|
||||||
</if>
|
|
||||||
<if test="dictId!=null and dictId!=''">
|
|
||||||
and dict_id=#{dictId}
|
|
||||||
</if>
|
|
||||||
<if test="hospitalName!=null and hospitalName!=''">
|
|
||||||
and hospital_name=#{hospitalName}
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag!=null and sysFlag!=''">
|
|
||||||
and sys_flag=#{sysFlag}
|
|
||||||
</if>
|
|
||||||
<if test="sysName!=null and sysName!=''">
|
|
||||||
and sys_name=#{sysName}
|
|
||||||
</if>
|
|
||||||
<if test="parentId!=null and parentId!=''">
|
|
||||||
and parent_id=#{parentId}
|
|
||||||
</if>
|
|
||||||
<if test="dictStatus!=null and dictStatus!=''">
|
|
||||||
and dict_status=#{dictStatus}
|
|
||||||
</if>
|
|
||||||
LIMIT #{offset},#{limit}
|
|
||||||
</select>
|
|
||||||
<select id="getTotal" resultType="int">
|
|
||||||
SELECT count(1) FROM power_sys_dict WHERE 1 = 1
|
|
||||||
<if test="deptId!=null and deptId!=''">
|
|
||||||
and dept_id=#{deptId}
|
|
||||||
</if>
|
|
||||||
<if test="dictId!=null and dictId!=''">
|
|
||||||
and dict_id=#{dictId}
|
|
||||||
</if>
|
|
||||||
<if test="hospitalName!=null and hospitalName!=''">
|
|
||||||
and hospital_name=#{hospitalName}
|
|
||||||
</if>
|
|
||||||
<if test="sysFlag!=null and sysFlag!=''">
|
|
||||||
and sys_flag=#{sysFlag}
|
|
||||||
</if>
|
|
||||||
<if test="sysName!=null and sysName!=''">
|
|
||||||
and sys_name=#{sysName}
|
|
||||||
</if>
|
|
||||||
<if test="parentId!=null and parentId!=''">
|
|
||||||
and parent_id=#{parentId}
|
|
||||||
</if>
|
|
||||||
<if test="dictStatus!=null and dictStatus!=''">
|
|
||||||
and dict_status=#{dictStatus}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<select id="selectList" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from power_sys_dict ORDER BY parent_id asc
|
|
||||||
</select>
|
|
||||||
<select id="selectHosList" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
dict.*
|
|
||||||
FROM
|
|
||||||
power_sys_dict dict
|
|
||||||
<if test="userId != null">
|
|
||||||
LEFT JOIN power_user_dict ON dict.dict_id = power_user_dict.dict_id
|
|
||||||
</if>
|
|
||||||
WHERE
|
|
||||||
dict.hospital_name != ''
|
|
||||||
AND
|
|
||||||
dict.hospital_name IS NOT NULL
|
|
||||||
AND
|
|
||||||
dict_status = 1
|
|
||||||
<if test="userId != null">
|
|
||||||
AND power_user_dict.user_id = ${userId}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<select id="selectSysType" resultMap="BaseResultMapVo">
|
|
||||||
SELECT
|
|
||||||
DISTINCT sys_type
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
dict_status = 1 AND sys_name IS NOT NULL
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--查询全部-->
|
|
||||||
<select id="selectAll" resultMap="BaseResultMapVo">
|
|
||||||
SELECT
|
|
||||||
dict.dict_id dictId,
|
|
||||||
dict.parent_id parentId,
|
|
||||||
dict.dept_id dictDeptId,
|
|
||||||
dept.dept_id deptId,
|
|
||||||
dict.hospital_name hospitalName,
|
|
||||||
dict.sys_name,
|
|
||||||
dict.sys_flag sysFlag,
|
|
||||||
dict.sys_type sysType,
|
|
||||||
dept.dept_name,
|
|
||||||
dict.hospital_tel,
|
|
||||||
dict.dict_area
|
|
||||||
FROM
|
|
||||||
power_sys_dict dict
|
|
||||||
LEFT JOIN power_dept dept ON dict.dept_id = dept.dict_id
|
|
||||||
AND dict.dict_status = 1 AND dept.effective = 1
|
|
||||||
</select>
|
|
||||||
<!--查询全部-->
|
|
||||||
<select id="selectAllByAdmin" resultMap="BaseResultMapVo">
|
|
||||||
SELECT
|
|
||||||
dict.dict_id dictId,
|
|
||||||
dict.parent_id parentId,
|
|
||||||
dict.dept_id dictDeptId,
|
|
||||||
dept.dept_id deptIds,
|
|
||||||
dict.hospital_name hospitalName,
|
|
||||||
dict.sys_name,
|
|
||||||
dict.sys_flag sysFlag,
|
|
||||||
dict.sys_type sysType,
|
|
||||||
dept.dept_name,
|
|
||||||
dict.hospital_tel,
|
|
||||||
dict.dict_area,
|
|
||||||
dept.creater username
|
|
||||||
FROM
|
|
||||||
power_sys_dict dict
|
|
||||||
LEFT JOIN power_dept dept ON dict.dict_id = dept.dict_id
|
|
||||||
AND dict.dict_status = 1 AND dept.effective = 1
|
|
||||||
union all
|
|
||||||
select
|
|
||||||
null as dictId,
|
|
||||||
power_user.role_id,
|
|
||||||
power_user.user_id dictDeptId,
|
|
||||||
power_user.dept_id deptIds,
|
|
||||||
null as hospitalName,
|
|
||||||
power_user.user_id as sysName,
|
|
||||||
null as sysFlag,
|
|
||||||
power_role.role_name sysType,
|
|
||||||
null as deptName,
|
|
||||||
power_user.user_tel hospital_tel,
|
|
||||||
power_user.user_name as dict_area,
|
|
||||||
power_user.name as username
|
|
||||||
from power_user
|
|
||||||
LEFT JOIN (SELECT
|
|
||||||
dict.dict_id dictId,
|
|
||||||
dict.parent_id parentId,
|
|
||||||
dict.dept_id dictDeptId,
|
|
||||||
dept.dept_id deptIds,
|
|
||||||
dict.hospital_name hospitalName,
|
|
||||||
dict.sys_name sysName,
|
|
||||||
dict.sys_flag sysFlag,
|
|
||||||
dict.sys_type sysType,
|
|
||||||
dept.dept_name deptName,
|
|
||||||
dict.hospital_tel,
|
|
||||||
dict.dict_area,
|
|
||||||
dept.creater username
|
|
||||||
FROM
|
|
||||||
power_sys_dict dict
|
|
||||||
LEFT JOIN power_dept dept ON dict.dict_id = dept.dict_id
|
|
||||||
AND dict.dict_status = 1 AND dept.effective = 1) dict
|
|
||||||
on FIND_IN_SET(dict.deptIds,power_user.dept_id)
|
|
||||||
inner join power_role on power_role.role_id = power_user.role_id and power_role.effective = 1 and power_role.role_id != 0 and power_role.role_id != -100
|
|
||||||
where dict.deptIds is not null and power_user.effective = 1
|
|
||||||
|
|
||||||
</select>
|
|
||||||
<!--查询全部系统-->
|
|
||||||
<select id="selectAllSys" resultMap="BaseResultMapVo">
|
|
||||||
SELECT
|
|
||||||
power_sys_dict.dict_id,power_sys_dict.sys_flag,power_sys_dict.sys_name,power_sys_dict1.hospital_name
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
LEFT JOIN
|
|
||||||
power_sys_dict power_sys_dict1
|
|
||||||
ON power_sys_dict.parent_id = power_sys_dict1.dict_id
|
|
||||||
WHERE
|
|
||||||
power_sys_dict.dict_status = 1 AND power_sys_dict.sys_name is not null
|
|
||||||
GROUP BY power_sys_dict.sys_flag
|
|
||||||
</select>
|
|
||||||
<!--根据用户id查询全部-->
|
|
||||||
<select id="selectAllByUserId" resultMap="BaseResultMapVo" parameterType="java.lang.Integer">
|
|
||||||
SELECT DISTINCT
|
|
||||||
dict.dict_id dictId,
|
|
||||||
dict.parent_id parentId,
|
|
||||||
dict.dept_id dictDeptId,
|
|
||||||
dept.dept_id deptId,
|
|
||||||
dict.hospital_name hospitalName,
|
|
||||||
dict.sys_name sysName,
|
|
||||||
dict.sys_flag sysFlag,
|
|
||||||
dict.sys_type sysType,
|
|
||||||
dept.dept_name deptName,
|
|
||||||
dict.hospital_tel,
|
|
||||||
dict.dict_area
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
dict_id,
|
|
||||||
parent_id,
|
|
||||||
dept_id,
|
|
||||||
hospital_name,
|
|
||||||
sys_name,
|
|
||||||
sys_flag,
|
|
||||||
hospital_tel,
|
|
||||||
dict_area,
|
|
||||||
sys_type
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
FIND_IN_SET(
|
|
||||||
dept_id,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
dept_id
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
user_id = ${userId}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
UNION ALL
|
|
||||||
SELECT
|
|
||||||
dict_id,
|
|
||||||
parent_id,
|
|
||||||
dept_id,
|
|
||||||
hospital_name,
|
|
||||||
sys_name,
|
|
||||||
sys_flag,
|
|
||||||
hospital_tel,
|
|
||||||
dict_area,
|
|
||||||
sys_type
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
dict_id IN (
|
|
||||||
SELECT
|
|
||||||
parent_id
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
FIND_IN_SET(
|
|
||||||
dept_id,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
dept_id
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
user_id = ${userId}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
UNION ALL
|
|
||||||
SELECT
|
|
||||||
power_sys_dict1.dict_id,
|
|
||||||
power_sys_dict1.parent_id,
|
|
||||||
power_sys_dict1.dept_id,
|
|
||||||
NULL AS hospital_name,
|
|
||||||
power_sys_dict1.sys_name,
|
|
||||||
power_sys_dict1.sys_flag,
|
|
||||||
NULL AS hospital_tel,
|
|
||||||
NULL AS dict_area,
|
|
||||||
power_sys_dict1.sys_type
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
LEFT JOIN power_sys_dict power_sys_dict1 ON power_sys_dict.dict_id = power_sys_dict1.parent_id
|
|
||||||
AND power_sys_dict1.sys_type = '权限系统'
|
|
||||||
WHERE
|
|
||||||
power_sys_dict.dict_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
dict_id IN (
|
|
||||||
SELECT
|
|
||||||
parent_id
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
FIND_IN_SET(
|
|
||||||
dept_id,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
dept_id
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
user_id = ${userId}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
) dict
|
|
||||||
LEFT JOIN power_dept dept ON dict.dept_id = dept.dept_id
|
|
||||||
</select>
|
|
||||||
<!--查询角色id为-100的为该医院所有系统-->
|
|
||||||
<select id="selectAllByHosRoleId" resultMap="BaseResultMapVo" parameterType="java.lang.Integer">
|
|
||||||
SELECT DISTINCT
|
|
||||||
dict.dict_id dictId,
|
|
||||||
dict.parent_id parentId,
|
|
||||||
dict.dept_id dictDeptId,
|
|
||||||
dept.dept_id deptIds,
|
|
||||||
dict.hospital_name hospitalName,
|
|
||||||
dict.sys_name sysName,
|
|
||||||
dict.sys_flag sysFlag,
|
|
||||||
dict.sys_type sysType,
|
|
||||||
dept.dept_name deptName,
|
|
||||||
dict.hospital_tel,
|
|
||||||
dict.dict_area,
|
|
||||||
dept.creater username
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
dict_id,
|
|
||||||
parent_id,
|
|
||||||
dept_id,
|
|
||||||
hospital_name,
|
|
||||||
sys_name,
|
|
||||||
sys_flag,
|
|
||||||
hospital_tel,
|
|
||||||
dict_area,
|
|
||||||
sys_type
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
dict_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = #{userId}
|
|
||||||
)
|
|
||||||
OR parent_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = #{userId}
|
|
||||||
)
|
|
||||||
UNION ALL
|
|
||||||
SELECT
|
|
||||||
power_sys_dict.dict_id,
|
|
||||||
power_dept.dict_id parent_id,
|
|
||||||
power_dept.dept_id,
|
|
||||||
power_sys_dict.hospital_name,
|
|
||||||
power_sys_dict.sys_name,
|
|
||||||
power_sys_dict.sys_flag,
|
|
||||||
power_sys_dict.hospital_tel,
|
|
||||||
power_sys_dict.dict_area,
|
|
||||||
power_sys_dict.sys_type
|
|
||||||
FROM
|
|
||||||
power_dept
|
|
||||||
LEFT JOIN power_sys_dict ON power_dept.dept_id = power_sys_dict.dept_id
|
|
||||||
WHERE
|
|
||||||
power_dept.dict_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = #{userId}
|
|
||||||
)
|
|
||||||
) dict
|
|
||||||
LEFT JOIN power_dept dept ON dict.dept_id = dept.dept_id
|
|
||||||
union all
|
|
||||||
select
|
|
||||||
null as dictId,
|
|
||||||
power_user.role_id,
|
|
||||||
power_user.user_id dictDeptId,
|
|
||||||
power_user.dept_id deptIds,
|
|
||||||
null as hospitalName,
|
|
||||||
power_user.user_id as sysName,
|
|
||||||
null as sysFlag,
|
|
||||||
power_role.role_name sysType,
|
|
||||||
null as deptName,
|
|
||||||
power_user.user_tel hospital_tel,
|
|
||||||
power_user.user_name as dict_area,
|
|
||||||
power_user.name as username
|
|
||||||
from power_user
|
|
||||||
left join (SELECT DISTINCT
|
|
||||||
dict.dict_id dictId,
|
|
||||||
dict.parent_id parentId,
|
|
||||||
dict.dept_id dictDeptId,
|
|
||||||
dept.dept_id deptIds,
|
|
||||||
dict.hospital_name hospitalName,
|
|
||||||
dict.sys_name sysName,
|
|
||||||
dict.sys_flag sysFlag,
|
|
||||||
dict.sys_type sysType,
|
|
||||||
dept.dept_name deptName,
|
|
||||||
dict.hospital_tel,
|
|
||||||
dict.dict_area
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
dict_id,
|
|
||||||
parent_id,
|
|
||||||
dept_id,
|
|
||||||
hospital_name,
|
|
||||||
sys_name,
|
|
||||||
sys_flag,
|
|
||||||
hospital_tel,
|
|
||||||
dict_area,
|
|
||||||
sys_type
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
dict_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = #{userId}
|
|
||||||
)
|
|
||||||
OR parent_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = #{userId}
|
|
||||||
)
|
|
||||||
UNION ALL
|
|
||||||
SELECT
|
|
||||||
power_sys_dict.dict_id,
|
|
||||||
power_dept.dict_id parent_id,
|
|
||||||
power_dept.dept_id,
|
|
||||||
power_sys_dict.hospital_name,
|
|
||||||
power_sys_dict.sys_name,
|
|
||||||
power_sys_dict.sys_flag,
|
|
||||||
power_sys_dict.hospital_tel,
|
|
||||||
power_sys_dict.dict_area,
|
|
||||||
power_sys_dict.sys_type
|
|
||||||
FROM
|
|
||||||
power_dept
|
|
||||||
LEFT JOIN power_sys_dict ON power_dept.dept_id = power_sys_dict.dept_id
|
|
||||||
WHERE
|
|
||||||
power_dept.dict_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = #{userId}
|
|
||||||
)
|
|
||||||
) dict
|
|
||||||
LEFT JOIN power_dept dept ON dict.dept_id = dept.dept_id
|
|
||||||
) dict on FIND_IN_SET(dict.deptIds,power_user.dept_id)
|
|
||||||
inner join power_role on power_role.role_id = power_user.role_id and power_role.effective = 1 and
|
|
||||||
power_role.role_id != 0 and power_role.role_id != -100
|
|
||||||
where dict.deptIds is not null and power_user.effective = 1
|
|
||||||
<if test="userId != null">
|
|
||||||
AND power_user.user_id != #{userId}
|
|
||||||
</if>
|
|
||||||
<if test="roleId != null">
|
|
||||||
AND power_user.role_id != #{roleId}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<!--验证医院名称是否重复-->
|
|
||||||
<select id="checkHospitalName" resultType="com.manage.vo.Power_Sys_DictVo">
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
hospital_name = #{hospitalName}
|
|
||||||
</select>
|
|
||||||
<!--根据父节点查询医院-->
|
|
||||||
<select id="getHospitalByParentId" resultType="com.manage.vo.Power_Sys_DictVo">
|
|
||||||
SELECT
|
|
||||||
dict_id,
|
|
||||||
hospital_name,
|
|
||||||
hospital_tel,
|
|
||||||
dict_area
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
parent_id = ${parentId}
|
|
||||||
<if test="sysType != null and sysType != ''">
|
|
||||||
AND sys_type = #{sysType}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<!--根据科室id验证系统标识或系统名称是否重复(添加)-->
|
|
||||||
<select id="checkSysFlagOrSysNameByDeptIds" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
dict_id,
|
|
||||||
dept_id,
|
|
||||||
sys_flag,
|
|
||||||
sys_name,
|
|
||||||
parent_id
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
<if test="sysFlag != '' or sysName != ''">
|
|
||||||
(sys_flag = #{sysFlag} OR sys_name = #{sysName})
|
|
||||||
</if>
|
|
||||||
<if test="deptIds != null and deptIds != ''">
|
|
||||||
AND dept_id IN (${deptIds})
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<!--根据科室id验证系统标识或系统名称是否重复(修改)-->
|
|
||||||
<select id="checkSysFlagOrSysNameByDeptId" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
dict_id,
|
|
||||||
dept_id,
|
|
||||||
sys_flag,
|
|
||||||
sys_name,
|
|
||||||
parent_id
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
<if test="sysFlag != '' or sysName != ''">
|
|
||||||
(sys_flag = #{sysFlag} OR sys_name = #{sysName})
|
|
||||||
</if>
|
|
||||||
<if test="deptIds != null and deptIds != ''">
|
|
||||||
AND dept_id IN (${deptIds})
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<!--通过系统标识和系统名称查询集合-->
|
|
||||||
<select id="selectAllBySysFlagAndSysName" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
power_sys_dict.dict_id
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
sys_flag = #{sysFlag}
|
|
||||||
AND
|
|
||||||
sys_name = #{sysName}
|
|
||||||
</select>
|
|
||||||
<!--通过用户id查询系统标识集合-->
|
|
||||||
<select id="selectSysFlagsByUserId" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
sys_flag,sort
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
sys_flag = 'power'
|
|
||||||
AND
|
|
||||||
dict_status = 1
|
|
||||||
GROUP BY
|
|
||||||
sys_flag
|
|
||||||
UNION ALL
|
|
||||||
SELECT
|
|
||||||
sys_flag,sort
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
sys_flag != ''
|
|
||||||
AND sys_flag != 'power'
|
|
||||||
<if test="userId != null and roleId != -100">AND instr((SELECT dept_id FROM power_user WHERE user_id =
|
|
||||||
#{userId}),dept_id)
|
|
||||||
</if>
|
|
||||||
<if test="
|
|
||||||
userId != null and roleId == -100">
|
|
||||||
AND parent_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = #{userId}
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
AND
|
|
||||||
dict_status = 1
|
|
||||||
GROUP BY
|
|
||||||
sys_flag
|
|
||||||
</select>
|
|
||||||
<insert id="simpleInsertDict" parameterType="java.util.List">
|
|
||||||
INSERT INTO power_sys_dict(
|
|
||||||
dict_id,
|
|
||||||
dept_id,
|
|
||||||
hospital_name,
|
|
||||||
sys_flag,
|
|
||||||
sys_name,
|
|
||||||
dict_area,
|
|
||||||
hospital_tel,
|
|
||||||
parent_id,
|
|
||||||
sys_type,
|
|
||||||
sort,
|
|
||||||
dict_status,
|
|
||||||
dict_edit,
|
|
||||||
create_date,
|
|
||||||
creater,
|
|
||||||
update_date,
|
|
||||||
updater,
|
|
||||||
remark)
|
|
||||||
VALUES
|
|
||||||
<foreach collection="list" item="item" index="index" separator=",">
|
|
||||||
(
|
|
||||||
#{item.dictId,jdbcType=INTEGER},
|
|
||||||
#{item.deptId,jdbcType=INTEGER},
|
|
||||||
#{item.hospitalName,jdbcType=VARCHAR},
|
|
||||||
#{item.sysFlag,jdbcType=VARCHAR},
|
|
||||||
#{item.sysName,jdbcType=VARCHAR},
|
|
||||||
#{item.dictArea,jdbcType=VARCHAR},
|
|
||||||
#{item.hospitalTel,jdbcType=VARCHAR},
|
|
||||||
#{item.parentId,jdbcType=INTEGER},
|
|
||||||
#{item.sysType,jdbcType=VARCHAR},
|
|
||||||
#{item.sort,jdbcType=INTEGER},
|
|
||||||
#{item.dictStatus,jdbcType=INTEGER},
|
|
||||||
#{item.dictEdit,jdbcType=INTEGER},
|
|
||||||
#{item.createDate,jdbcType=CHAR},
|
|
||||||
#{item.creater,jdbcType=VARCHAR},
|
|
||||||
#{item.updateDate,jdbcType=CHAR},
|
|
||||||
#{item.updater,jdbcType=VARCHAR},
|
|
||||||
#{item.remark,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<select id="selectDeptIdByParentIdAndSysFlag" resultMap="BaseResultMap">
|
|
||||||
SELECT dept_id FROM power_sys_dict WHERE parent_id = #{parentId} AND sys_flag = #{sysFlag}
|
|
||||||
<if test="deptIds != null and deptIds != ''">
|
|
||||||
AND dept_id in (${deptIds})
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<select id="selectLastDict" resultType="java.lang.Integer">
|
|
||||||
SELECT max(dict_id) FROM power_sys_dict
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@ -1,699 +0,0 @@
|
|||||||
<?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.manage.dao.Power_UserMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.vo.Power_UserVo">
|
|
||||||
<id column="user_id" jdbcType="INTEGER" property="userId" />
|
|
||||||
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
||||||
<result column="user_pwd" jdbcType="VARCHAR" property="userPwd" />
|
|
||||||
<result column="user_sex" jdbcType="INTEGER" property="userSex" />
|
|
||||||
<result column="user_age" jdbcType="INTEGER" property="userAge" />
|
|
||||||
<result column="user_tel" jdbcType="VARCHAR" property="userTel" />
|
|
||||||
<result column="user_email" jdbcType="VARCHAR" property="userEmail" />
|
|
||||||
<result column="user_position" jdbcType="VARCHAR" property="userPosition" />
|
|
||||||
<result column="role_id" jdbcType="INTEGER" property="roleId" />
|
|
||||||
<result column="dept_id" jdbcType="VARCHAR" property="deptId" />
|
|
||||||
<result column="effective" jdbcType="INTEGER" property="effective" />
|
|
||||||
<result column="create_date" jdbcType="CHAR" property="createDate" />
|
|
||||||
<result column="creater" jdbcType="VARCHAR" property="creater" />
|
|
||||||
<result column="update_date" jdbcType="CHAR" property="updateDate" />
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
<result column="role_name" jdbcType="VARCHAR" property="roleName" />
|
|
||||||
<result column="dict_id" jdbcType="INTEGER" property="dictId" />
|
|
||||||
</resultMap>
|
|
||||||
<resultMap id="BaseResultMapVo" type="com.manage.vo.User">
|
|
||||||
<id column="user_id" jdbcType="INTEGER" property="userId" />
|
|
||||||
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
|
||||||
<result column="role_id" jdbcType="INTEGER" property="roleId" />
|
|
||||||
<result column="role_name" jdbcType="VARCHAR" property="roleName" />
|
|
||||||
<result column="dept_code" jdbcType="VARCHAR" property="deptCode" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
user_id, user_name,name, user_pwd, user_sex, user_age, user_tel, user_email, user_position,
|
|
||||||
role_id, dept_id, effective, create_date, creater, update_date, updater, remark
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from power_user
|
|
||||||
where user_id = #{userId,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
delete from power_user
|
|
||||||
where user_id = #{userId,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.manage.entity.Power_User">
|
|
||||||
insert into power_user (user_id, user_name,name, user_pwd,
|
|
||||||
user_sex, user_age, user_tel,
|
|
||||||
user_email, user_position, role_id,
|
|
||||||
dept_id, effective, create_date,
|
|
||||||
creater, update_date, updater,
|
|
||||||
remark)
|
|
||||||
values (#{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR},
|
|
||||||
#{userPwd,jdbcType=VARCHAR},
|
|
||||||
#{userSex,jdbcType=INTEGER}, #{userAge,jdbcType=INTEGER}, #{userTel,jdbcType=VARCHAR},
|
|
||||||
#{userEmail,jdbcType=VARCHAR}, #{userPosition,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER},
|
|
||||||
#{deptId,jdbcType=VARCHAR}, #{effective,jdbcType=INTEGER}, #{createDate,jdbcType=CHAR},
|
|
||||||
#{creater,jdbcType=VARCHAR}, #{updateDate,jdbcType=CHAR}, #{updater,jdbcType=VARCHAR},
|
|
||||||
#{remark,jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.manage.entity.Power_User">
|
|
||||||
insert into power_user
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id,
|
|
||||||
</if>
|
|
||||||
<if test="userName != null">
|
|
||||||
user_name,
|
|
||||||
</if>
|
|
||||||
<if test="name != null">
|
|
||||||
name,
|
|
||||||
</if>
|
|
||||||
<if test="userPwd != null">
|
|
||||||
user_pwd,
|
|
||||||
</if>
|
|
||||||
<if test="userSex != null">
|
|
||||||
user_sex,
|
|
||||||
</if>
|
|
||||||
<if test="userAge != null">
|
|
||||||
user_age,
|
|
||||||
</if>
|
|
||||||
<if test="userTel != null">
|
|
||||||
user_tel,
|
|
||||||
</if>
|
|
||||||
<if test="userEmail != null">
|
|
||||||
user_email,
|
|
||||||
</if>
|
|
||||||
<if test="userPosition != null">
|
|
||||||
user_position,
|
|
||||||
</if>
|
|
||||||
<if test="roleId != null">
|
|
||||||
role_id,
|
|
||||||
</if>
|
|
||||||
<if test="deptId != null">
|
|
||||||
dept_id,
|
|
||||||
</if>
|
|
||||||
<if test="effective != null">
|
|
||||||
effective,
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date,
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater,
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="userId != null">
|
|
||||||
#{userId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="userName != null">
|
|
||||||
#{userName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="name != null">
|
|
||||||
#{name,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userPwd != null">
|
|
||||||
#{userPwd,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userSex != null">
|
|
||||||
#{userSex,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="userAge != null">
|
|
||||||
#{userAge,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="userTel != null">
|
|
||||||
#{userTel,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userEmail != null">
|
|
||||||
#{userEmail,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userPosition != null">
|
|
||||||
#{userPosition,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="roleId != null">
|
|
||||||
#{roleId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="deptId != null">
|
|
||||||
#{deptId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="effective != null">
|
|
||||||
#{effective,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
#{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
#{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
#{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_User">
|
|
||||||
update power_user
|
|
||||||
<set>
|
|
||||||
<if test="userName != null and userName != ''">
|
|
||||||
user_name = #{userName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
name = #{name,jdbcType=VARCHAR},
|
|
||||||
<if test="userPwd != null and userPwd != ''">
|
|
||||||
user_pwd = #{userPwd,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userSex != null">
|
|
||||||
user_sex = #{userSex,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
user_age = #{userAge,jdbcType=INTEGER},
|
|
||||||
user_tel = #{userTel,jdbcType=VARCHAR},
|
|
||||||
user_email = #{userEmail,jdbcType=VARCHAR},
|
|
||||||
user_position = #{userPosition,jdbcType=VARCHAR},
|
|
||||||
<if test="roleId != null">
|
|
||||||
role_id = #{roleId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="deptId != null and deptId != ''">
|
|
||||||
dept_id = #{deptId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="effective != null">
|
|
||||||
effective = #{effective,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null and createDate != ''">
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null and creater != ''">
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null and updateDate != ''">
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null and updater != ''">
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</set>
|
|
||||||
where user_id = #{userId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_User">
|
|
||||||
update power_user
|
|
||||||
set user_name = #{userName,jdbcType=VARCHAR},
|
|
||||||
name = #{name,jdbcType=VARCHAR},
|
|
||||||
user_pwd = #{userPwd,jdbcType=VARCHAR},
|
|
||||||
user_sex = #{userSex,jdbcType=INTEGER},
|
|
||||||
user_age = #{userAge,jdbcType=INTEGER},
|
|
||||||
user_tel = #{userTel,jdbcType=VARCHAR},
|
|
||||||
user_email = #{userEmail,jdbcType=VARCHAR},
|
|
||||||
user_position = #{userPosition,jdbcType=VARCHAR},
|
|
||||||
role_id = #{roleId,jdbcType=INTEGER},
|
|
||||||
dept_id = #{deptId,jdbcType=VARCHAR},
|
|
||||||
effective = #{effective,jdbcType=INTEGER},
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR}
|
|
||||||
where user_id = #{userId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!--2019-4-16 ljx -->
|
|
||||||
<select id="findPowerUserByUserNameAndUserPwd" parameterType="com.manage.entity.Power_User" resultType="com.manage.vo.Power_UserVo">
|
|
||||||
SELECT
|
|
||||||
user_id,
|
|
||||||
power_role.show_record,
|
|
||||||
power_role.downLoad_record,
|
|
||||||
power_role.show_print,
|
|
||||||
user_name,
|
|
||||||
NAME,
|
|
||||||
user_sex,
|
|
||||||
user_age,
|
|
||||||
user_tel,
|
|
||||||
power_user.role_id,
|
|
||||||
power_user.dept_id,
|
|
||||||
power_user.effective,
|
|
||||||
power_user.create_date,
|
|
||||||
power_user.creater,
|
|
||||||
power_user.update_date,
|
|
||||||
power_user.updater,
|
|
||||||
power_user.remark,
|
|
||||||
GROUP_CONCAT(power_dept.dept_name) powerDepts
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
LEFT JOIN power_role ON power_user.role_id = power_role.role_id
|
|
||||||
LEFT JOIN power_dept ON FIND_IN_SET(
|
|
||||||
power_dept.dept_id,
|
|
||||||
power_user.dept_id
|
|
||||||
)
|
|
||||||
where power_user.effective = #{effective,jdbcType=INTEGER} and user_name = #{userName,jdbcType=VARCHAR} and user_pwd = #{userPwd,jdbcType=VARCHAR}
|
|
||||||
GROUP BY user_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--2019-07-31 zengwenhe -->
|
|
||||||
<select id="checkUserName" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
SELECT
|
|
||||||
user_id,role_id
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
user_name = #{userName}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--2019-4-22 ljx -->
|
|
||||||
<select id="findSomeByMore" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
power_user.user_id,
|
|
||||||
power_user.user_name,
|
|
||||||
power_user.name,
|
|
||||||
power_user.user_sex,
|
|
||||||
power_user.user_age,
|
|
||||||
power_user.user_tel,
|
|
||||||
power_user.user_email,
|
|
||||||
power_user.user_position,
|
|
||||||
power_user.effective,
|
|
||||||
power_user.creater,
|
|
||||||
power_user.create_date,
|
|
||||||
power_user.updater,
|
|
||||||
power_user.update_date,
|
|
||||||
power_role.role_name,
|
|
||||||
GROUP_CONCAT(power_dept.dept_name) powerDepts
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
LEFT JOIN
|
|
||||||
power_role
|
|
||||||
ON power_user.role_id = power_role.role_id
|
|
||||||
LEFT JOIN
|
|
||||||
power_dept ON FIND_IN_SET(power_dept.dept_id,power_user.dept_id)
|
|
||||||
<where>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id IN (
|
|
||||||
SELECT
|
|
||||||
power_user_dict.user_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
LEFT JOIN
|
|
||||||
power_user_dict power_user_dict1 ON power_user_dict.dict_id = power_user_dict1.dict_id
|
|
||||||
WHERE
|
|
||||||
power_user_dict1.user_id = ${userId}
|
|
||||||
AND power_user.role_id != 0
|
|
||||||
<if test="roleId!=null and roleId!=-100 and roleId != 0">
|
|
||||||
AND power_user.role_id != -100
|
|
||||||
</if>
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
<if test="userName!=null and userName!=''">
|
|
||||||
and power_user.user_name LIKE '%${userName}%'
|
|
||||||
</if>
|
|
||||||
<if test="userEmail!=null and userEmail!=''">
|
|
||||||
and power_user.user_email LIKE '%${userEmail}%'
|
|
||||||
</if>
|
|
||||||
<if test="effective!=null">
|
|
||||||
and power_user.effective=${effective}
|
|
||||||
</if>
|
|
||||||
<if test="deptId!=null and deptId!=''">
|
|
||||||
and FIND_IN_SET(#{deptId},power_user.dept_id)
|
|
||||||
</if>
|
|
||||||
<if test="searchRoleId!=null">
|
|
||||||
and power_user.role_id = ${searchRoleId}
|
|
||||||
</if>
|
|
||||||
<if test="checks != null and checks != ''">
|
|
||||||
and power_user.user_id IN (${checks})
|
|
||||||
</if>
|
|
||||||
and power_user.user_name != 'admin'
|
|
||||||
</where>
|
|
||||||
GROUP BY power_user.user_id
|
|
||||||
ORDER BY create_date DESC,user_id DESC
|
|
||||||
<if test="offset != null and limit != null">
|
|
||||||
LIMIT #{offset},#{limit}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getTotal" resultType="int">
|
|
||||||
SELECT
|
|
||||||
count(1)
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
LEFT JOIN
|
|
||||||
power_role
|
|
||||||
ON power_user.role_id = power_role.role_id
|
|
||||||
<where>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id IN (
|
|
||||||
SELECT
|
|
||||||
power_user_dict.user_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
LEFT JOIN
|
|
||||||
power_user_dict power_user_dict1 ON power_user_dict.dict_id = power_user_dict1.dict_id
|
|
||||||
WHERE
|
|
||||||
power_user_dict1.user_id = ${userId}
|
|
||||||
AND power_user.role_id != 0
|
|
||||||
<if test="roleId!=null and roleId!=-100 and roleId != 0">
|
|
||||||
AND power_user.role_id != -100
|
|
||||||
</if>
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
<if test="userName!=null and userName!=''">
|
|
||||||
and power_user.user_name LIKE '%${userName}%'
|
|
||||||
</if>
|
|
||||||
<if test="userEmail!=null and userEmail!=''">
|
|
||||||
and power_user.user_email LIKE '%${userEmail}%'
|
|
||||||
</if>
|
|
||||||
<if test="effective!=null">
|
|
||||||
and power_user.effective=${effective}
|
|
||||||
</if>
|
|
||||||
<if test="deptId!=null and deptId!=''">
|
|
||||||
and FIND_IN_SET(#{deptId},power_user.dept_id)
|
|
||||||
</if>
|
|
||||||
<if test="searchRoleId!=null">
|
|
||||||
and power_user.role_id = ${searchRoleId}
|
|
||||||
</if>
|
|
||||||
and power_user.user_name != 'admin'
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
<!--2019-04-29zengwh-->
|
|
||||||
<!--根据科室id查询所有用户集合-->
|
|
||||||
<select id="selectAllByDeptId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
SELECT DISTINCT
|
|
||||||
a.*, b.role_name
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
user_id,
|
|
||||||
user_name,
|
|
||||||
user_tel,
|
|
||||||
dept_id,
|
|
||||||
role_id
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
effective = 1
|
|
||||||
AND FIND_IN_SET(${deptId}, dept_id)
|
|
||||||
AND role_id != 0
|
|
||||||
AND role_id != -100
|
|
||||||
<if test="userName != null and userName != ''">
|
|
||||||
AND user_name != #{userName}
|
|
||||||
</if>
|
|
||||||
) a
|
|
||||||
LEFT JOIN power_role b ON a.role_id = b.role_id
|
|
||||||
</select>
|
|
||||||
<!--2019-08-13zengwh-->
|
|
||||||
<!--权限系统的用户-->
|
|
||||||
<select id="selectAllBySysRole" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
a.*, b.role_name roleName
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT DISTINCT
|
|
||||||
USER .user_id userId,
|
|
||||||
USER .user_name userName,
|
|
||||||
USER .user_tel userTel,
|
|
||||||
USER .dept_id deptId,
|
|
||||||
USER .role_id
|
|
||||||
FROM
|
|
||||||
power_user USER
|
|
||||||
LEFT JOIN power_dept dept ON FIND_IN_SET(dept.dept_id, USER .dept_id)
|
|
||||||
AND dept.effective = 1
|
|
||||||
AND dept.dict_id = ${dictId}
|
|
||||||
WHERE
|
|
||||||
USER .role_id = - 100
|
|
||||||
) a
|
|
||||||
LEFT JOIN power_role b ON a.role_id = b.role_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--根据角色id和系统id查询所有用户集合-->
|
|
||||||
<select id="selectAllByRoleIdAndDictId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
a.*, b.role_name roleName
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT DISTINCT
|
|
||||||
user.user_id userId,
|
|
||||||
user.user_name userName,
|
|
||||||
user.user_tel userTel,
|
|
||||||
user.dept_id deptId,
|
|
||||||
user.role_id
|
|
||||||
FROM
|
|
||||||
power_user user,
|
|
||||||
power_dept dept
|
|
||||||
WHERE
|
|
||||||
FIND_IN_SET(dept.dept_id,user.dept_id)
|
|
||||||
AND dept.effective = 1
|
|
||||||
AND user.role_id = ${roleId}
|
|
||||||
AND dept.dict_id = ${dictId}
|
|
||||||
) a
|
|
||||||
LEFT JOIN power_role b ON a.role_id = b.role_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--2019-5-14 ljx -->
|
|
||||||
<select id="validPassword" resultType="java.lang.Integer">
|
|
||||||
select count(*)
|
|
||||||
from power_user u
|
|
||||||
where u.user_pwd = #{userPwd,jdbcType=VARCHAR}
|
|
||||||
AND u.user_id = #{userId,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--2019-5-14 ljx -->
|
|
||||||
<update id="updatePassword">
|
|
||||||
update power_user u
|
|
||||||
<set>
|
|
||||||
u.user_pwd = #{userPwd,jdbcType=VARCHAR},
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR}
|
|
||||||
</set>
|
|
||||||
where user_id = #{userId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!--2019-08-16 zengwenhe -->
|
|
||||||
<select id="selectAllBySysId" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
power_user.user_id,
|
|
||||||
power_user.user_name,
|
|
||||||
power_user.user_tel,
|
|
||||||
power_role.role_id,
|
|
||||||
power_role.role_name
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
LEFT JOIN power_user_dict ON power_user.user_id = power_user_dict.user_id
|
|
||||||
LEFT JOIN power_role ON power_user.role_id = power_role.role_id
|
|
||||||
AND power_role.effective = 1
|
|
||||||
WHERE
|
|
||||||
power_user.effective = 1
|
|
||||||
AND power_user_dict.dict_id = ${hospitalId}
|
|
||||||
AND power_user.role_id != 0
|
|
||||||
<if test="userName != null and userName != ''">
|
|
||||||
AND power_user.user_name != #{userName}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<!--根据通知类别id查询所属系统用户集合-->
|
|
||||||
<select id="selectUserListByNoticeTypeId" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
power_user.user_id,
|
|
||||||
power_user.user_name
|
|
||||||
FROM
|
|
||||||
power_notice
|
|
||||||
LEFT JOIN power_sys_dict ON power_notice.notice_type_flag = power_sys_dict.sys_flag
|
|
||||||
<if test="hospitalId != null">
|
|
||||||
AND power_sys_dict.parent_id = #{hospitalId}
|
|
||||||
</if>
|
|
||||||
LEFT JOIN power_user ON power_sys_dict.dept_id IN (power_user.dept_id) AND power_user.effective = 1
|
|
||||||
WHERE
|
|
||||||
power_notice.notice_id = ${noticeTypeId}
|
|
||||||
AND power_user.user_id IS NOT NULL
|
|
||||||
AND power_user.role_id != 0
|
|
||||||
AND power_user.effective = 1
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectHospitalIdByUserId" resultType="java.lang.Integer">
|
|
||||||
select dict_id from power_user_dict where user_id = ${userId}
|
|
||||||
</select>
|
|
||||||
<select id="selectUsersBySysFlagAndHospitalId" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
user_id
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
INNER JOIN (
|
|
||||||
SELECT
|
|
||||||
dept_id
|
|
||||||
FROM
|
|
||||||
power_sys_dict
|
|
||||||
WHERE
|
|
||||||
sys_flag = #{sysFlag}
|
|
||||||
<if test="hospitalId != null">
|
|
||||||
AND parent_id = ${hospitalId}
|
|
||||||
</if>
|
|
||||||
) dept ON FIND_IN_SET(
|
|
||||||
dept.dept_id,
|
|
||||||
power_user.dept_id
|
|
||||||
)
|
|
||||||
group by user_id
|
|
||||||
</select>
|
|
||||||
<select id="selectUserIdAndUserNameList" resultMap="BaseResultMapVo">
|
|
||||||
SELECT
|
|
||||||
power_user_dict.user_id,
|
|
||||||
power_user.user_name,
|
|
||||||
power_user.role_id,
|
|
||||||
power_user.dept_id,
|
|
||||||
power_user.dept_code,
|
|
||||||
power_role.role_name,
|
|
||||||
name
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
INNER JOIN power_user ON power_user_dict.user_id = power_user.user_id AND power_user.effective = 1 AND power_user.role_id != 0
|
|
||||||
LEFT JOIN power_role ON power_user.role_id = power_role.role_id AND power_role.effective = 1
|
|
||||||
<if test="userId != null and userId != ''">
|
|
||||||
WHERE
|
|
||||||
dict_id = (
|
|
||||||
SELECT
|
|
||||||
dict_id
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = #{userId}
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<!--查询各表无效数-->
|
|
||||||
<select id="selectEffectiveCount" resultType="java.lang.Integer">
|
|
||||||
SELECT (
|
|
||||||
(SELECT count(1) FROM power_dept WHERE effective = 0) +
|
|
||||||
(SELECT count(1) FROM power_menu WHERE effective = 0) +
|
|
||||||
(SELECT count(1) FROM power_role WHERE effective = 0) +
|
|
||||||
(SELECT count(1) FROM power_sys_dict WHERE dict_status = 0) +
|
|
||||||
(SELECT count(1) FROM power_user WHERE effective = 0) +
|
|
||||||
(SELECT count(1) FROM power_user WHERE effective = 0)
|
|
||||||
) count
|
|
||||||
</select>
|
|
||||||
<!--全查非admin-->
|
|
||||||
<select id="selectAllNotAdmin" resultMap="BaseResultMapVo">
|
|
||||||
SELECT user_id,user_name FROM power_user WHERE effective = 1 AND role_id != 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--批量插入-->
|
|
||||||
<insert id="SimpleInsert" parameterType="java.util.List">
|
|
||||||
INSERT INTO power_user(
|
|
||||||
user_id,
|
|
||||||
user_name,
|
|
||||||
name,
|
|
||||||
user_pwd,
|
|
||||||
user_sex,
|
|
||||||
user_age,
|
|
||||||
user_tel,
|
|
||||||
user_email,
|
|
||||||
user_position,
|
|
||||||
role_id,
|
|
||||||
dept_id,
|
|
||||||
effective,
|
|
||||||
create_date,
|
|
||||||
creater,
|
|
||||||
update_date,
|
|
||||||
updater,
|
|
||||||
remark
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
<foreach collection ="list" item="item" index= "index" separator =",">
|
|
||||||
(
|
|
||||||
#{item.userId,jdbcType=INTEGER},
|
|
||||||
#{item.userName,jdbcType=VARCHAR},
|
|
||||||
#{item.name,jdbcType=VARCHAR},
|
|
||||||
#{item.userPwd,jdbcType=VARCHAR},
|
|
||||||
#{item.userSex,jdbcType=INTEGER},
|
|
||||||
#{item.userAge,jdbcType=INTEGER},
|
|
||||||
#{item.userTel,jdbcType=VARCHAR},
|
|
||||||
#{item.userEmail,jdbcType=VARCHAR},
|
|
||||||
#{item.userPosition,jdbcType=VARCHAR},
|
|
||||||
#{item.roleId,jdbcType=INTEGER},
|
|
||||||
#{item.deptId,jdbcType=VARCHAR},
|
|
||||||
#{item.effective,jdbcType=INTEGER},
|
|
||||||
#{item.createDate,jdbcType=CHAR},
|
|
||||||
#{item.creater,jdbcType=VARCHAR},
|
|
||||||
#{item.updateDate,jdbcType=CHAR},
|
|
||||||
#{item.updater,jdbcType=VARCHAR},
|
|
||||||
#{item.remark,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</foreach >
|
|
||||||
</insert>
|
|
||||||
<!--根据用户名和备注获取用户信息-->
|
|
||||||
<select id="findPowerUserByUserNameAndRemark" resultMap="BaseResultMap">
|
|
||||||
select * from power_user where user_name = #{userName} and remark = #{remark}
|
|
||||||
</select>
|
|
||||||
<!--根据医院id查询用户集合-->
|
|
||||||
<select id="getUserTreeByHospitalId" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
power_user.user_id,
|
|
||||||
power_user.user_name,
|
|
||||||
power_user.name
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
inner JOIN
|
|
||||||
power_user
|
|
||||||
ON power_user_dict.user_id = power_user.user_id
|
|
||||||
WHERE
|
|
||||||
power_user.role_id != -100
|
|
||||||
AND
|
|
||||||
power_user_dict.dict_id = #{hospitalId}
|
|
||||||
</select>
|
|
||||||
<!--根据科室id查询用户集合-->
|
|
||||||
<select id="getUserTreeByDeptId" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
power_user.user_id,
|
|
||||||
power_user.user_name,
|
|
||||||
power_user.name
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
FIND_IN_SET(#{deptId},dept_id)
|
|
||||||
and role_id != -100
|
|
||||||
</select>
|
|
||||||
<!--查询有审批权限的用户id-->
|
|
||||||
<select id="selectUserIdsWithApprove" resultMap="BaseResultMap">
|
|
||||||
SELECT DISTINCT
|
|
||||||
power_user.user_id
|
|
||||||
FROM
|
|
||||||
power_role_menu
|
|
||||||
INNER JOIN power_menu ON power_role_menu.menu_id = power_menu.menu_id
|
|
||||||
AND power_menu.menu_url = #{menuUrl}
|
|
||||||
INNER JOIN power_role ON power_role_menu.role_id = power_role.role_id
|
|
||||||
AND power_role.effective = 1
|
|
||||||
LEFT JOIN power_user ON power_role_menu.role_id = power_user.role_id
|
|
||||||
AND power_user.effective = 1
|
|
||||||
AND user_id NOT IN (
|
|
||||||
SELECT
|
|
||||||
user_id
|
|
||||||
FROM
|
|
||||||
power_user_menu
|
|
||||||
INNER JOIN power_menu ON power_user_menu.menu_id = power_menu.menu_id
|
|
||||||
AND power_menu.menu_url = #{menuUrl}
|
|
||||||
AND power_user_menu.flag = 0
|
|
||||||
)
|
|
||||||
UNION ALL
|
|
||||||
SELECT
|
|
||||||
user_id
|
|
||||||
FROM
|
|
||||||
power_user_menu
|
|
||||||
INNER JOIN power_menu ON power_user_menu.menu_id = power_menu.menu_id
|
|
||||||
AND power_menu.menu_url = #{menuUrl}
|
|
||||||
AND power_user_menu.flag = 1
|
|
||||||
UNION ALL
|
|
||||||
SELECT
|
|
||||||
user_id
|
|
||||||
FROM
|
|
||||||
power_user
|
|
||||||
WHERE
|
|
||||||
role_id = 0
|
|
||||||
OR role_id = - 100
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
<?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.manage.dao.Power_User_DictMapper" >
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.vo.Power_User_Dict" >
|
|
||||||
<result column="user_id" property="userId" jdbcType="INTEGER" />
|
|
||||||
<result column="dict_id" property="dictId" jdbcType="INTEGER" />
|
|
||||||
</resultMap>
|
|
||||||
<select id="selectDictIdByUserId" resultType="com.manage.vo.Power_User_Dict">
|
|
||||||
SELECT
|
|
||||||
*
|
|
||||||
FROM
|
|
||||||
power_user_dict
|
|
||||||
WHERE
|
|
||||||
user_id = ${userId}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@ -1,256 +0,0 @@
|
|||||||
<?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.manage.dao.Power_User_MenuMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.entity.Power_User_Menu">
|
|
||||||
<id column="user_menu_id" jdbcType="INTEGER" property="userMenuId" />
|
|
||||||
<result column="user_id" jdbcType="INTEGER" property="userId" />
|
|
||||||
<result column="menu_id" jdbcType="INTEGER" property="menuId" />
|
|
||||||
<result column="flag" jdbcType="INTEGER" property="flag" />
|
|
||||||
<result column="create_date" jdbcType="CHAR" property="createDate" />
|
|
||||||
<result column="creater" jdbcType="VARCHAR" property="creater" />
|
|
||||||
<result column="update_date" jdbcType="CHAR" property="updateDate" />
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
user_menu_id, user_id, menu_id, flag, create_date, creater, update_date, updater,
|
|
||||||
remark
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from power_user_menu
|
|
||||||
where user_menu_id = #{userMenuId,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
delete from power_user_menu
|
|
||||||
where user_menu_id = #{userMenuId,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.manage.entity.Power_User_Menu">
|
|
||||||
insert into power_user_menu (user_menu_id, user_id, menu_id,
|
|
||||||
flag, create_date, creater,
|
|
||||||
update_date, updater, remark
|
|
||||||
)
|
|
||||||
values (#{userMenuId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{menuId,jdbcType=INTEGER},
|
|
||||||
#{flag,jdbcType=INTEGER}, #{createDate,jdbcType=CHAR}, #{creater,jdbcType=VARCHAR},
|
|
||||||
#{updateDate,jdbcType=CHAR}, #{updater,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.manage.entity.Power_User_Menu">
|
|
||||||
insert into power_user_menu
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="userMenuId != null">
|
|
||||||
user_menu_id,
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id,
|
|
||||||
</if>
|
|
||||||
<if test="menuId != null">
|
|
||||||
menu_id,
|
|
||||||
</if>
|
|
||||||
<if test="flag != null">
|
|
||||||
flag,
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date,
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater,
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="userMenuId != null">
|
|
||||||
#{userMenuId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
#{userId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="menuId != null">
|
|
||||||
#{menuId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="flag != null">
|
|
||||||
#{flag,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
#{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
#{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
#{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_User_Menu">
|
|
||||||
update power_user_menu
|
|
||||||
<set>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id = #{userId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="menuId != null">
|
|
||||||
menu_id = #{menuId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="flag != null">
|
|
||||||
flag = #{flag,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="createDate != null">
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateDate != null">
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where user_menu_id = #{userMenuId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_User_Menu">
|
|
||||||
update power_user_menu
|
|
||||||
set user_id = #{userId,jdbcType=INTEGER},
|
|
||||||
menu_id = #{menuId,jdbcType=INTEGER},
|
|
||||||
flag = #{flag,jdbcType=INTEGER},
|
|
||||||
create_date = #{createDate,jdbcType=CHAR},
|
|
||||||
creater = #{creater,jdbcType=VARCHAR},
|
|
||||||
update_date = #{updateDate,jdbcType=CHAR},
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR}
|
|
||||||
where user_menu_id = #{userMenuId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<!--根据系统id和用户id查出对应该系统在用户菜单表的记录-->
|
|
||||||
<select id="selectUserMenuPower" parameterType="string" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
b.user_menu_id,b.menu_Id,b.flag
|
|
||||||
FROM
|
|
||||||
power_menu a,
|
|
||||||
power_user_menu b
|
|
||||||
WHERE
|
|
||||||
a.sys_flag = #{sysFlag}
|
|
||||||
AND b.user_id = ${userId}
|
|
||||||
AND a.menu_id = b.menu_id
|
|
||||||
</select>
|
|
||||||
<!--根据系统标识和用户id删除记录-->
|
|
||||||
<delete id="deleteUserMenuByUserIdAndSysFlag">
|
|
||||||
DELETE FROM power_user_menu WHERE user_id = #{userId} AND menu_id in (
|
|
||||||
SELECT c.menu_id FROM (
|
|
||||||
SELECT
|
|
||||||
b.user_menu_id,b.menu_Id,b.flag
|
|
||||||
FROM
|
|
||||||
power_menu a,
|
|
||||||
power_user_menu b
|
|
||||||
WHERE
|
|
||||||
a.sys_flag = #{sysFlag}
|
|
||||||
AND b.user_id = #{userId}
|
|
||||||
AND a.menu_id = b.menu_id
|
|
||||||
) c
|
|
||||||
)
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!--根据系统id和用户id查出对应该系统在用户菜单表和角色菜单表的综合表-->
|
|
||||||
<select id="selectUserAndRoleMenuPower" parameterType="string" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
m.menu_id
|
|
||||||
FROM
|
|
||||||
power_menu m
|
|
||||||
WHERE
|
|
||||||
m.sys_flag = #{sysFlag}
|
|
||||||
AND m.menu_id IN (
|
|
||||||
SELECT
|
|
||||||
r.menu_id
|
|
||||||
FROM
|
|
||||||
power_role_menu r
|
|
||||||
WHERE
|
|
||||||
r.role_id = (
|
|
||||||
SELECT
|
|
||||||
u.role_id
|
|
||||||
FROM
|
|
||||||
power_user u
|
|
||||||
WHERE
|
|
||||||
u.user_id = ${userId}
|
|
||||||
)
|
|
||||||
AND r.menu_id NOT IN (
|
|
||||||
SELECT
|
|
||||||
m.menu_id
|
|
||||||
FROM
|
|
||||||
power_menu m
|
|
||||||
WHERE
|
|
||||||
m.sys_flag = #{sysFlag}
|
|
||||||
AND m.menu_id IN (
|
|
||||||
SELECT
|
|
||||||
pu.menu_id
|
|
||||||
FROM
|
|
||||||
power_user_menu pu
|
|
||||||
WHERE
|
|
||||||
pu.user_id = ${userId}
|
|
||||||
AND pu.flag = 0
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
UNION ALL
|
|
||||||
SELECT
|
|
||||||
m.menu_id
|
|
||||||
FROM
|
|
||||||
power_menu m
|
|
||||||
WHERE
|
|
||||||
m.sys_flag = #{sysFlag}
|
|
||||||
AND m.menu_id IN (
|
|
||||||
SELECT
|
|
||||||
pu.menu_id menuId1
|
|
||||||
FROM
|
|
||||||
power_user_menu pu
|
|
||||||
WHERE
|
|
||||||
pu.user_id = ${userId}
|
|
||||||
AND pu.flag = 1
|
|
||||||
)
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--批量插入-->
|
|
||||||
<insert id="simpleInsertUserMenu" parameterType="java.util.List">
|
|
||||||
INSERT INTO power_user_menu(
|
|
||||||
user_menu_id,
|
|
||||||
user_id,
|
|
||||||
menu_id,
|
|
||||||
flag,
|
|
||||||
create_date,
|
|
||||||
creater,
|
|
||||||
update_date,
|
|
||||||
updater,
|
|
||||||
remark)
|
|
||||||
VALUES
|
|
||||||
<foreach collection ="list" item="item" index= "index" separator =",">
|
|
||||||
(
|
|
||||||
#{item.userMenuId,jdbcType=INTEGER},
|
|
||||||
#{item.userId,jdbcType=INTEGER},
|
|
||||||
#{item.menuId,jdbcType=INTEGER},
|
|
||||||
#{item.flag,jdbcType=INTEGER},
|
|
||||||
#{item.createDate,jdbcType=CHAR},
|
|
||||||
#{item.creater,jdbcType=VARCHAR},
|
|
||||||
#{item.updateDate,jdbcType=CHAR},
|
|
||||||
#{item.updater,jdbcType=VARCHAR},
|
|
||||||
#{item.remark,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</foreach >
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
|
||||||
@ -1,213 +0,0 @@
|
|||||||
<?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.manage.dao.T_MenuMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.manage.entity.T_Menu">
|
|
||||||
<id column="menu_id" jdbcType="INTEGER" property="menuId" />
|
|
||||||
<result column="menu_name" jdbcType="VARCHAR" property="menuName" />
|
|
||||||
<result column="menu_icon" jdbcType="VARCHAR" property="menuIcon" />
|
|
||||||
<result column="menu_url" jdbcType="VARCHAR" property="menuUrl" />
|
|
||||||
<result column="menu_desc" jdbcType="VARCHAR" property="menuDesc" />
|
|
||||||
<result column="menu_method" jdbcType="VARCHAR" property="menuMethod" />
|
|
||||||
<result column="menu_sys" jdbcType="VARCHAR" property="menuSys" />
|
|
||||||
<result column="menu_parent_id" jdbcType="INTEGER" property="menuParentId" />
|
|
||||||
<result column="menu_status" jdbcType="VARCHAR" property="menuStatus" />
|
|
||||||
<result column="menu_sort" jdbcType="INTEGER" property="menuSort" />
|
|
||||||
<result column="menu_remark" jdbcType="VARCHAR" property="menuRemark" />
|
|
||||||
<result column="menu_creater" jdbcType="VARCHAR" property="menuCreater" />
|
|
||||||
<result column="menu_createTime" jdbcType="VARCHAR" property="menuCreatetime" />
|
|
||||||
<result column="menu_updater" jdbcType="VARCHAR" property="menuUpdater" />
|
|
||||||
<result column="menu_updateTime" jdbcType="VARCHAR" property="menuUpdatetime" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
menu_id, menu_name, menu_icon, menu_url, menu_desc, menu_method, menu_sys, menu_parent_id,
|
|
||||||
menu_status, menu_sort, menu_remark, menu_creater, menu_createTime, menu_updater,
|
|
||||||
menu_updateTime
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from t_menu
|
|
||||||
where menu_id = #{menuId,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
delete from t_menu
|
|
||||||
where menu_id = #{menuId,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.manage.entity.T_Menu">
|
|
||||||
insert into t_menu (menu_id, menu_name, menu_icon,
|
|
||||||
menu_url, menu_desc, menu_method,
|
|
||||||
menu_sys, menu_parent_id, menu_status,
|
|
||||||
menu_sort, menu_remark, menu_creater,
|
|
||||||
menu_createTime, menu_updater, menu_updateTime
|
|
||||||
)
|
|
||||||
values (#{menuId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR}, #{menuIcon,jdbcType=VARCHAR},
|
|
||||||
#{menuUrl,jdbcType=VARCHAR}, #{menuDesc,jdbcType=VARCHAR}, #{menuMethod,jdbcType=VARCHAR},
|
|
||||||
#{menuSys,jdbcType=VARCHAR}, #{menuParentId,jdbcType=INTEGER}, #{menuStatus,jdbcType=VARCHAR},
|
|
||||||
#{menuSort,jdbcType=INTEGER}, #{menuRemark,jdbcType=VARCHAR}, #{menuCreater,jdbcType=VARCHAR},
|
|
||||||
#{menuCreatetime,jdbcType=VARCHAR}, #{menuUpdater,jdbcType=VARCHAR}, #{menuUpdatetime,jdbcType=VARCHAR}
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.manage.entity.T_Menu">
|
|
||||||
insert into t_menu
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="menuId != null">
|
|
||||||
menu_id,
|
|
||||||
</if>
|
|
||||||
<if test="menuName != null">
|
|
||||||
menu_name,
|
|
||||||
</if>
|
|
||||||
<if test="menuIcon != null">
|
|
||||||
menu_icon,
|
|
||||||
</if>
|
|
||||||
<if test="menuUrl != null">
|
|
||||||
menu_url,
|
|
||||||
</if>
|
|
||||||
<if test="menuDesc != null">
|
|
||||||
menu_desc,
|
|
||||||
</if>
|
|
||||||
<if test="menuMethod != null">
|
|
||||||
menu_method,
|
|
||||||
</if>
|
|
||||||
<if test="menuSys != null">
|
|
||||||
menu_sys,
|
|
||||||
</if>
|
|
||||||
<if test="menuParentId != null">
|
|
||||||
menu_parent_id,
|
|
||||||
</if>
|
|
||||||
<if test="menuStatus != null">
|
|
||||||
menu_status,
|
|
||||||
</if>
|
|
||||||
<if test="menuSort != null">
|
|
||||||
menu_sort,
|
|
||||||
</if>
|
|
||||||
<if test="menuRemark != null">
|
|
||||||
menu_remark,
|
|
||||||
</if>
|
|
||||||
<if test="menuCreater != null">
|
|
||||||
menu_creater,
|
|
||||||
</if>
|
|
||||||
<if test="menuCreatetime != null">
|
|
||||||
menu_createTime,
|
|
||||||
</if>
|
|
||||||
<if test="menuUpdater != null">
|
|
||||||
menu_updater,
|
|
||||||
</if>
|
|
||||||
<if test="menuUpdatetime != null">
|
|
||||||
menu_updateTime,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="menuId != null">
|
|
||||||
#{menuId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="menuName != null">
|
|
||||||
#{menuName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuIcon != null">
|
|
||||||
#{menuIcon,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuUrl != null">
|
|
||||||
#{menuUrl,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuDesc != null">
|
|
||||||
#{menuDesc,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuMethod != null">
|
|
||||||
#{menuMethod,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuSys != null">
|
|
||||||
#{menuSys,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuParentId != null">
|
|
||||||
#{menuParentId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="menuStatus != null">
|
|
||||||
#{menuStatus,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuSort != null">
|
|
||||||
#{menuSort,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="menuRemark != null">
|
|
||||||
#{menuRemark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuCreater != null">
|
|
||||||
#{menuCreater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuCreatetime != null">
|
|
||||||
#{menuCreatetime,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuUpdater != null">
|
|
||||||
#{menuUpdater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuUpdatetime != null">
|
|
||||||
#{menuUpdatetime,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.T_Menu">
|
|
||||||
update t_menu
|
|
||||||
<set>
|
|
||||||
<if test="menuName != null">
|
|
||||||
menu_name = #{menuName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuIcon != null">
|
|
||||||
menu_icon = #{menuIcon,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuUrl != null">
|
|
||||||
menu_url = #{menuUrl,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuDesc != null">
|
|
||||||
menu_desc = #{menuDesc,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuMethod != null">
|
|
||||||
menu_method = #{menuMethod,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuSys != null">
|
|
||||||
menu_sys = #{menuSys,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuParentId != null">
|
|
||||||
menu_parent_id = #{menuParentId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="menuStatus != null">
|
|
||||||
menu_status = #{menuStatus,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuSort != null">
|
|
||||||
menu_sort = #{menuSort,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="menuRemark != null">
|
|
||||||
menu_remark = #{menuRemark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuCreater != null">
|
|
||||||
menu_creater = #{menuCreater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuCreatetime != null">
|
|
||||||
menu_createTime = #{menuCreatetime,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuUpdater != null">
|
|
||||||
menu_updater = #{menuUpdater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="menuUpdatetime != null">
|
|
||||||
menu_updateTime = #{menuUpdatetime,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where menu_id = #{menuId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.manage.entity.T_Menu">
|
|
||||||
update t_menu
|
|
||||||
set menu_name = #{menuName,jdbcType=VARCHAR},
|
|
||||||
menu_icon = #{menuIcon,jdbcType=VARCHAR},
|
|
||||||
menu_url = #{menuUrl,jdbcType=VARCHAR},
|
|
||||||
menu_desc = #{menuDesc,jdbcType=VARCHAR},
|
|
||||||
menu_method = #{menuMethod,jdbcType=VARCHAR},
|
|
||||||
menu_sys = #{menuSys,jdbcType=VARCHAR},
|
|
||||||
menu_parent_id = #{menuParentId,jdbcType=INTEGER},
|
|
||||||
menu_status = #{menuStatus,jdbcType=VARCHAR},
|
|
||||||
menu_sort = #{menuSort,jdbcType=INTEGER},
|
|
||||||
menu_remark = #{menuRemark,jdbcType=VARCHAR},
|
|
||||||
menu_creater = #{menuCreater,jdbcType=VARCHAR},
|
|
||||||
menu_createTime = #{menuCreatetime,jdbcType=VARCHAR},
|
|
||||||
menu_updater = #{menuUpdater,jdbcType=VARCHAR},
|
|
||||||
menu_updateTime = #{menuUpdatetime,jdbcType=VARCHAR}
|
|
||||||
where menu_id = #{menuId,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue