Mapper实体类增加映射路径
This commit is contained in:
parent
fcc90c421d
commit
2aee9fa71a
@ -4,7 +4,7 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysPostMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysPostMapper">
|
||||||
|
|
||||||
<resultMap type="SysPost" id="SysPostResult">
|
<resultMap type="com.xhpc.system.domain.SysPost" id="SysPostResult">
|
||||||
<id property="postId" column="post_id"/>
|
<id property="postId" column="post_id"/>
|
||||||
<result property="postCode" column="post_code"/>
|
<result property="postCode" column="post_code"/>
|
||||||
<result property="postName" column="post_name"/>
|
<result property="postName" column="post_name"/>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
from sys_post
|
from sys_post
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
|
<select id="selectPostList" parameterType="com.xhpc.system.domain.SysPost" resultMap="SysPostResult">
|
||||||
<include refid="selectPostVo"/>
|
<include refid="selectPostVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="postCode != null and postCode != ''">
|
<if test="postCode != null and postCode != ''">
|
||||||
@ -61,7 +61,7 @@
|
|||||||
where u.user_id = #{userId}
|
where u.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
|
<select id="selectPostsByUserName" parameterType="java.lang.String" resultMap="SysPostResult">
|
||||||
select p.post_id, p.post_name, p.post_code
|
select p.post_id, p.post_name, p.post_code
|
||||||
from sys_post p
|
from sys_post p
|
||||||
left join sys_user_post up on up.post_id = p.post_id
|
left join sys_user_post up on up.post_id = p.post_id
|
||||||
@ -69,17 +69,17 @@
|
|||||||
where u.user_name = #{userName}
|
where u.user_name = #{userName}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
|
<select id="checkPostNameUnique" parameterType="java.lang.String" resultMap="SysPostResult">
|
||||||
<include refid="selectPostVo"/>
|
<include refid="selectPostVo"/>
|
||||||
where post_name=#{postName} limit 1
|
where post_name=#{postName} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
|
<select id="checkPostCodeUnique" parameterType="java.lang.String" resultMap="SysPostResult">
|
||||||
<include refid="selectPostVo"/>
|
<include refid="selectPostVo"/>
|
||||||
where post_code=#{postCode} limit 1
|
where post_code=#{postCode} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updatePost" parameterType="SysPost">
|
<update id="updatePost" parameterType="com.xhpc.system.domain.SysPost">
|
||||||
update sys_post
|
update sys_post
|
||||||
<set>
|
<set>
|
||||||
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
||||||
@ -93,7 +93,7 @@
|
|||||||
where post_id = #{postId}
|
where post_id = #{postId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
|
<insert id="insertPost" parameterType="com.xhpc.system.domain.SysPost" useGeneratedKeys="true" keyProperty="postId">
|
||||||
insert into sys_post(
|
insert into sys_post(
|
||||||
<if test="postId != null and postId != 0">post_id,</if>
|
<if test="postId != null and postId != 0">post_id,</if>
|
||||||
<if test="postCode != null and postCode != ''">post_code,</if>
|
<if test="postCode != null and postCode != ''">post_code,</if>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysConfigMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysConfigMapper">
|
||||||
|
|
||||||
<resultMap type="SysConfig" id="SysConfigResult">
|
<resultMap type="com.xhpc.system.domain.SysConfig" id="SysConfigResult">
|
||||||
<id property="configId" column="config_id"/>
|
<id property="configId" column="config_id"/>
|
||||||
<result property="configName" column="config_name"/>
|
<result property="configName" column="config_name"/>
|
||||||
<result property="configKey" column="config_key"/>
|
<result property="configKey" column="config_key"/>
|
||||||
@ -42,12 +42,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult">
|
<select id="selectConfig" parameterType="com.xhpc.system.domain.SysConfig" resultMap="SysConfigResult">
|
||||||
<include refid="selectConfigVo"/>
|
<include refid="selectConfigVo"/>
|
||||||
<include refid="sqlwhereSearch"/>
|
<include refid="sqlwhereSearch"/>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
|
<select id="selectConfigList" parameterType="com.xhpc.system.domain.SysConfig" resultMap="SysConfigResult">
|
||||||
<include refid="selectConfigVo"/>
|
<include refid="selectConfigVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="configName != null and configName != ''">
|
<if test="configName != null and configName != ''">
|
||||||
@ -68,12 +68,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
|
<select id="checkConfigKeyUnique" parameterType="java.lang.String" resultMap="SysConfigResult">
|
||||||
<include refid="selectConfigVo"/>
|
<include refid="selectConfigVo"/>
|
||||||
where config_key = #{configKey} limit 1
|
where config_key = #{configKey} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertConfig" parameterType="SysConfig">
|
<insert id="insertConfig" parameterType="com.xhpc.system.domain.SysConfig">
|
||||||
insert into sys_config (
|
insert into sys_config (
|
||||||
<if test="configName != null and configName != '' ">config_name,</if>
|
<if test="configName != null and configName != '' ">config_name,</if>
|
||||||
<if test="configKey != null and configKey != '' ">config_key,</if>
|
<if test="configKey != null and configKey != '' ">config_key,</if>
|
||||||
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateConfig" parameterType="SysConfig">
|
<update id="updateConfig" parameterType="com.xhpc.system.domain.SysConfig">
|
||||||
update sys_config
|
update sys_config
|
||||||
<set>
|
<set>
|
||||||
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysDeptMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysDeptMapper">
|
||||||
|
|
||||||
<resultMap type="SysDept" id="SysDeptResult">
|
<resultMap type="com.xhpc.system.api.domain.SysDept" id="SysDeptResult">
|
||||||
<id property="deptId" column="dept_id"/>
|
<id property="deptId" column="dept_id"/>
|
||||||
<result property="parentId" column="parent_id"/>
|
<result property="parentId" column="parent_id"/>
|
||||||
<result property="ancestors" column="ancestors"/>
|
<result property="ancestors" column="ancestors"/>
|
||||||
@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from sys_dept d
|
from sys_dept d
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
|
<select id="selectDeptList" parameterType="com.xhpc.system.api.domain.SysDept" resultMap="SysDeptResult">
|
||||||
<include refid="selectDeptVo"/>
|
<include refid="selectDeptVo"/>
|
||||||
where d.del_flag = '0'
|
where d.del_flag = '0'
|
||||||
<if test="parentId != null and parentId != 0">
|
<if test="parentId != null and parentId != 0">
|
||||||
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where dept_name=#{deptName} and parent_id = #{parentId} limit 1
|
where dept_name=#{deptName} and parent_id = #{parentId} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertDept" parameterType="SysDept">
|
<insert id="insertDept" parameterType="com.xhpc.system.api.domain.SysDept">
|
||||||
insert into sys_dept(
|
insert into sys_dept(
|
||||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||||
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateDept" parameterType="SysDept">
|
<update id="updateDept" parameterType="com.xhpc.system.api.domain.SysDept">
|
||||||
update sys_dept
|
update sys_dept
|
||||||
<set>
|
<set>
|
||||||
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
|
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
|
||||||
|
|||||||
@ -1,137 +1,143 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysDictDataMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysDictDataMapper">
|
||||||
|
|
||||||
<resultMap type="SysDictData" id="SysDictDataResult">
|
<resultMap type="com.xhpc.system.domain.SysDictData" id="SysDictDataResult">
|
||||||
<id property="dictCode" column="dict_code"/>
|
<id property="dictCode" column="dict_code"/>
|
||||||
<result property="dictSort" column="dict_sort"/>
|
<result property="dictSort" column="dict_sort"/>
|
||||||
<result property="dictLabel" column="dict_label"/>
|
<result property="dictLabel" column="dict_label"/>
|
||||||
<result property="dictValue" column="dict_value"/>
|
<result property="dictValue" column="dict_value"/>
|
||||||
<result property="dictType" column="dict_type"/>
|
<result property="dictType" column="dict_type"/>
|
||||||
<result property="cssClass" column="css_class"/>
|
<result property="cssClass" column="css_class"/>
|
||||||
<result property="listClass" column="list_class"/>
|
<result property="listClass" column="list_class"/>
|
||||||
<result property="isDefault" column="is_default"/>
|
<result property="isDefault" column="is_default"/>
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status"/>
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDictDataVo">
|
<sql id="selectDictDataVo">
|
||||||
select dict_code,
|
select dict_code,
|
||||||
dict_sort,
|
dict_sort,
|
||||||
dict_label,
|
dict_label,
|
||||||
dict_value,
|
dict_value,
|
||||||
dict_type,
|
dict_type,
|
||||||
css_class,
|
css_class,
|
||||||
list_class,
|
list_class,
|
||||||
is_default,
|
is_default,
|
||||||
status,
|
status,
|
||||||
create_by,
|
create_by,
|
||||||
create_time,
|
create_time,
|
||||||
remark
|
remark
|
||||||
from sys_dict_data
|
from sys_dict_data
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
|
<select id="selectDictDataList" parameterType="com.xhpc.system.domain.SysDictData" resultMap="SysDictDataResult">
|
||||||
<include refid="selectDictDataVo"/>
|
<include refid="selectDictDataVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="dictType != null and dictType != ''">
|
<if test="dictType != null and dictType != ''">
|
||||||
AND dict_type = #{dictType}
|
AND dict_type = #{dictType}
|
||||||
</if>
|
</if>
|
||||||
<if test="dictLabel != null and dictLabel != ''">
|
<if test="dictLabel != null and dictLabel != ''">
|
||||||
AND dict_label like concat('%', #{dictLabel}, '%')
|
AND dict_label like concat('%', #{dictLabel}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
AND status = #{status}
|
AND status = #{status}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by dict_sort asc
|
order by dict_sort asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
|
<select id="selectDictDataByType" parameterType="com.xhpc.system.domain.SysDictData" resultMap="SysDictDataResult">
|
||||||
<include refid="selectDictDataVo"/>
|
<include refid="selectDictDataVo"/>
|
||||||
where status = '0' and dict_type = #{dictType} order by dict_sort asc
|
where status = '0' and dict_type = #{dictType} order by dict_sort asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDictLabel" resultType="String">
|
<select id="selectDictLabel" resultType="java.lang.String">
|
||||||
select dict_label from sys_dict_data
|
select dict_label
|
||||||
where dict_type = #{dictType} and dict_value = #{dictValue}
|
from sys_dict_data
|
||||||
</select>
|
where dict_type = #{dictType}
|
||||||
|
and dict_value = #{dictValue}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
|
<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
|
||||||
<include refid="selectDictDataVo"/>
|
<include refid="selectDictDataVo"/>
|
||||||
where dict_code = #{dictCode}
|
where dict_code = #{dictCode}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countDictDataByType" resultType="Integer">
|
<select id="countDictDataByType" resultType="Integer">
|
||||||
select count(1)
|
select count(1)
|
||||||
from sys_dict_data
|
from sys_dict_data
|
||||||
where dict_type = #{dictType}
|
where dict_type = #{dictType}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteDictDataById" parameterType="Long">
|
<delete id="deleteDictDataById" parameterType="Long">
|
||||||
delete from sys_dict_data where dict_code = #{dictCode}
|
delete
|
||||||
</delete>
|
from sys_dict_data
|
||||||
|
where dict_code = #{dictCode}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteDictDataByIds" parameterType="Long">
|
<delete id="deleteDictDataByIds" parameterType="Long">
|
||||||
delete from sys_dict_data where dict_code in
|
delete from sys_dict_data where dict_code in
|
||||||
<foreach collection="array" item="dictCode" open="(" separator="," close=")">
|
<foreach collection="array" item="dictCode" open="(" separator="," close=")">
|
||||||
#{dictCode}
|
#{dictCode}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<update id="updateDictData" parameterType="SysDictData">
|
<update id="updateDictData" parameterType="com.xhpc.system.domain.SysDictData">
|
||||||
update sys_dict_data
|
update sys_dict_data
|
||||||
<set>
|
<set>
|
||||||
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||||||
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
|
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
|
||||||
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
|
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
|
||||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||||
<if test="cssClass != null">css_class = #{cssClass},</if>
|
<if test="cssClass != null">css_class = #{cssClass},</if>
|
||||||
<if test="listClass != null">list_class = #{listClass},</if>
|
<if test="listClass != null">list_class = #{listClass},</if>
|
||||||
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
where dict_code = #{dictCode}
|
where dict_code = #{dictCode}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateDictDataType" parameterType="String">
|
<update id="updateDictDataType" parameterType="java.lang.String">
|
||||||
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
update sys_dict_data
|
||||||
</update>
|
set dict_type = #{newDictType}
|
||||||
|
where dict_type = #{oldDictType}
|
||||||
|
</update>
|
||||||
|
|
||||||
<insert id="insertDictData" parameterType="SysDictData">
|
<insert id="insertDictData" parameterType="com.xhpc.system.domain.SysDictData">
|
||||||
insert into sys_dict_data(
|
insert into sys_dict_data(
|
||||||
<if test="dictSort != null">dict_sort,</if>
|
<if test="dictSort != null">dict_sort,</if>
|
||||||
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
||||||
<if test="dictValue != null and dictValue != ''">dict_value,</if>
|
<if test="dictValue != null and dictValue != ''">dict_value,</if>
|
||||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||||
<if test="cssClass != null and cssClass != ''">css_class,</if>
|
<if test="cssClass != null and cssClass != ''">css_class,</if>
|
||||||
<if test="listClass != null and listClass != ''">list_class,</if>
|
<if test="listClass != null and listClass != ''">list_class,</if>
|
||||||
<if test="isDefault != null and isDefault != ''">is_default,</if>
|
<if test="isDefault != null and isDefault != ''">is_default,</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="dictSort != null">#{dictSort},</if>
|
<if test="dictSort != null">#{dictSort},</if>
|
||||||
<if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
|
<if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
|
||||||
<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
|
<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
|
||||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||||
<if test="cssClass != null and cssClass != ''">#{cssClass},</if>
|
<if test="cssClass != null and cssClass != ''">#{cssClass},</if>
|
||||||
<if test="listClass != null and listClass != ''">#{listClass},</if>
|
<if test="listClass != null and listClass != ''">#{listClass},</if>
|
||||||
<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
|
<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysDictTypeMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysDictTypeMapper">
|
||||||
|
|
||||||
<resultMap type="SysDictType" id="SysDictTypeResult">
|
<resultMap type="com.xhpc.system.domain.SysDictType" id="SysDictTypeResult">
|
||||||
<id property="dictId" column="dict_id"/>
|
<id property="dictId" column="dict_id"/>
|
||||||
<result property="dictName" column="dict_name"/>
|
<result property="dictName" column="dict_name"/>
|
||||||
<result property="dictType" column="dict_type"/>
|
<result property="dictType" column="dict_type"/>
|
||||||
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from sys_dict_type
|
from sys_dict_type
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
<select id="selectDictTypeList" parameterType="com.xhpc.system.domain.SysDictType" resultMap="SysDictTypeResult">
|
||||||
<include refid="selectDictTypeVo"/>
|
<include refid="selectDictTypeVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="dictName != null and dictName != ''">
|
<if test="dictName != null and dictName != ''">
|
||||||
@ -50,12 +50,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where dict_id = #{dictId}
|
where dict_id = #{dictId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
|
<select id="selectDictTypeByType" parameterType="java.lang.String" resultMap="SysDictTypeResult">
|
||||||
<include refid="selectDictTypeVo"/>
|
<include refid="selectDictTypeVo"/>
|
||||||
where dict_type = #{dictType}
|
where dict_type = #{dictType}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
|
<select id="checkDictTypeUnique" parameterType="java.lang.String" resultMap="SysDictTypeResult">
|
||||||
<include refid="selectDictTypeVo"/>
|
<include refid="selectDictTypeVo"/>
|
||||||
where dict_type = #{dictType} limit 1
|
where dict_type = #{dictType} limit 1
|
||||||
</select>
|
</select>
|
||||||
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<update id="updateDictType" parameterType="SysDictType">
|
<update id="updateDictType" parameterType="com.xhpc.system.domain.SysDictType">
|
||||||
update sys_dict_type
|
update sys_dict_type
|
||||||
<set>
|
<set>
|
||||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||||
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where dict_id = #{dictId}
|
where dict_id = #{dictId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="insertDictType" parameterType="SysDictType">
|
<insert id="insertDictType" parameterType="com.xhpc.system.domain.SysDictType">
|
||||||
insert into sys_dict_type(
|
insert into sys_dict_type(
|
||||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysLogininforMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysLogininforMapper">
|
||||||
|
|
||||||
<resultMap type="SysLogininfor" id="SysLogininforResult">
|
<resultMap type="com.xhpc.system.domain.SysLogininfor" id="SysLogininforResult">
|
||||||
<id property="infoId" column="info_id"/>
|
<id property="infoId" column="info_id"/>
|
||||||
<result property="userName" column="user_name"/>
|
<result property="userName" column="user_name"/>
|
||||||
<result property="status" column="status"/>
|
<result property="status" column="status"/>
|
||||||
@ -13,12 +13,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="accessTime" column="access_time"/>
|
<result property="accessTime" column="access_time"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<insert id="insertLogininfor" parameterType="SysLogininfor">
|
<insert id="insertLogininfor" parameterType="com.xhpc.system.domain.SysLogininfor">
|
||||||
insert into sys_logininfor (user_name, status, ipaddr, msg, access_time)
|
insert into sys_logininfor (user_name, status, ipaddr, msg, access_time)
|
||||||
values (#{userName}, #{status}, #{ipaddr}, #{msg}, sysdate())
|
values (#{userName}, #{status}, #{ipaddr}, #{msg}, sysdate())
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
|
<select id="selectLogininforList" parameterType="com.xhpc.system.domain.SysLogininfor" resultMap="SysLogininforResult">
|
||||||
select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
|
select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
|
||||||
<where>
|
<where>
|
||||||
<if test="ipaddr != null and ipaddr != ''">
|
<if test="ipaddr != null and ipaddr != ''">
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysMenuMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysMenuMapper">
|
||||||
|
|
||||||
<resultMap type="SysMenu" id="SysMenuResult">
|
<resultMap type="com.xhpc.system.domain.SysMenu" id="SysMenuResult">
|
||||||
<id property="menuId" column="menu_id"/>
|
<id property="menuId" column="menu_id"/>
|
||||||
<result property="menuName" column="menu_name"/>
|
<result property="menuName" column="menu_name"/>
|
||||||
<result property="parentName" column="parent_name"/>
|
<result property="parentName" column="parent_name"/>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
from sys_menu
|
from sys_menu
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
|
<select id="selectMenuList" parameterType="com.xhpc.system.domain.SysMenu" resultMap="SysMenuResult">
|
||||||
<include refid="selectMenuVo"/>
|
<include refid="selectMenuVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="menuName != null and menuName != ''">
|
<if test="menuName != null and menuName != ''">
|
||||||
@ -66,7 +66,7 @@
|
|||||||
order by m.parent_id, m.order_num
|
order by m.parent_id, m.order_num
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
<select id="selectMenuListByUserId" parameterType="com.xhpc.system.domain.SysMenu" resultMap="SysMenuResult">
|
||||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||||
from sys_menu m
|
from sys_menu m
|
||||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||||
@ -107,14 +107,14 @@
|
|||||||
order by m.parent_id, m.order_num
|
order by m.parent_id, m.order_num
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuPerms" resultType="String">
|
<select id="selectMenuPerms" resultType="java.lang.String">
|
||||||
select distinct m.perms
|
select distinct m.perms
|
||||||
from sys_menu m
|
from sys_menu m
|
||||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
|
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="java.lang.String">
|
||||||
select distinct m.perms
|
select distinct m.perms
|
||||||
from sys_menu m
|
from sys_menu m
|
||||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||||
@ -134,12 +134,12 @@
|
|||||||
where parent_id = #{menuId}
|
where parent_id = #{menuId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
|
<select id="checkMenuNameUnique" parameterType="com.xhpc.system.domain.SysMenu" resultMap="SysMenuResult">
|
||||||
<include refid="selectMenuVo"/>
|
<include refid="selectMenuVo"/>
|
||||||
where menu_name=#{menuName} and parent_id = #{parentId} limit 1
|
where menu_name=#{menuName} and parent_id = #{parentId} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateMenu" parameterType="SysMenu">
|
<update id="updateMenu" parameterType="com.xhpc.system.domain.SysMenu">
|
||||||
update sys_menu
|
update sys_menu
|
||||||
<set>
|
<set>
|
||||||
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
|
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
|
||||||
@ -161,7 +161,7 @@
|
|||||||
where menu_id = #{menuId}
|
where menu_id = #{menuId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="insertMenu" parameterType="SysMenu">
|
<insert id="insertMenu" parameterType="com.xhpc.system.domain.SysMenu">
|
||||||
insert into sys_menu(
|
insert into sys_menu(
|
||||||
<if test="menuId != null and menuId != 0">menu_id,</if>
|
<if test="menuId != null and menuId != 0">menu_id,</if>
|
||||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysNoticeMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysNoticeMapper">
|
||||||
|
|
||||||
<resultMap type="SysNotice" id="SysNoticeResult">
|
<resultMap type="com.xhpc.system.domain.SysNotice" id="SysNoticeResult">
|
||||||
<result property="noticeId" column="notice_id"/>
|
<result property="noticeId" column="notice_id"/>
|
||||||
<result property="noticeTitle" column="notice_title"/>
|
<result property="noticeTitle" column="notice_title"/>
|
||||||
<result property="noticeType" column="notice_type"/>
|
<result property="noticeType" column="notice_type"/>
|
||||||
@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where notice_id = #{noticeId}
|
where notice_id = #{noticeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
|
<select id="selectNoticeList" parameterType="com.xhpc.system.domain.SysNotice" resultMap="SysNoticeResult">
|
||||||
<include refid="selectNoticeVo"/>
|
<include refid="selectNoticeVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="noticeTitle != null and noticeTitle != ''">
|
<if test="noticeTitle != null and noticeTitle != ''">
|
||||||
@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertNotice" parameterType="SysNotice">
|
<insert id="insertNotice" parameterType="com.xhpc.system.domain.SysNotice">
|
||||||
insert into sys_notice (
|
insert into sys_notice (
|
||||||
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
||||||
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
|
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
|
||||||
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateNotice" parameterType="SysNotice">
|
<update id="updateNotice" parameterType="com.xhpc.system.domain.SysNotice">
|
||||||
update sys_notice
|
update sys_notice
|
||||||
<set>
|
<set>
|
||||||
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
|
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysOperLogMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysOperLogMapper">
|
||||||
|
|
||||||
<resultMap type="SysOperLog" id="SysOperLogResult">
|
<resultMap type="com.xhpc.system.api.domain.SysOperLog" id="SysOperLogResult">
|
||||||
<id property="operId" column="oper_id"/>
|
<id property="operId" column="oper_id"/>
|
||||||
<result property="title" column="title"/>
|
<result property="title" column="title"/>
|
||||||
<result property="businessType" column="business_type"/>
|
<result property="businessType" column="business_type"/>
|
||||||
@ -27,12 +27,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from sys_oper_log
|
from sys_oper_log
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<insert id="insertOperlog" parameterType="SysOperLog">
|
<insert id="insertOperlog" parameterType="com.xhpc.system.api.domain.SysOperLog">
|
||||||
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, oper_time)
|
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, oper_time)
|
||||||
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate())
|
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate())
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
|
<select id="selectOperLogList" parameterType="com.xhpc.system.api.domain.SysOperLog" resultMap="SysOperLogResult">
|
||||||
<include refid="selectOperLogVo"/>
|
<include refid="selectOperLogVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="title != null and title != ''">
|
<if test="title != null and title != ''">
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysRoleDeptMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysRoleDeptMapper">
|
||||||
|
|
||||||
<resultMap type="SysRoleDept" id="SysRoleDeptResult">
|
<resultMap type="com.xhpc.system.domain.SysRoleDept" id="SysRoleDeptResult">
|
||||||
<result property="roleId" column="role_id"/>
|
<result property="roleId" column="role_id"/>
|
||||||
<result property="deptId" column="dept_id"/>
|
<result property="deptId" column="dept_id"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysRoleMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysRoleMapper">
|
||||||
|
|
||||||
<resultMap type="SysRole" id="SysRoleResult">
|
<resultMap type="com.xhpc.system.api.domain.SysRole" id="SysRoleResult">
|
||||||
<id property="roleId" column="role_id"/>
|
<id property="roleId" column="role_id"/>
|
||||||
<result property="roleName" column="role_name"/>
|
<result property="roleName" column="role_name"/>
|
||||||
<result property="roleKey" column="role_key"/>
|
<result property="roleKey" column="role_key"/>
|
||||||
@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
|
<select id="selectRoleList" parameterType="com.xhpc.system.api.domain.SysRole" resultMap="SysRoleResult">
|
||||||
<include refid="selectRoleVo"/>
|
<include refid="selectRoleVo"/>
|
||||||
where r.del_flag = '0'
|
where r.del_flag = '0'
|
||||||
<if test="roleName != null and roleName != ''">
|
<if test="roleName != null and roleName != ''">
|
||||||
@ -84,22 +84,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where r.role_id = #{roleId}
|
where r.role_id = #{roleId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
|
<select id="selectRolesByUserName" parameterType="java.lang.String" resultMap="SysRoleResult">
|
||||||
<include refid="selectRoleVo"/>
|
<include refid="selectRoleVo"/>
|
||||||
WHERE r.del_flag = '0' and u.user_name = #{userName}
|
WHERE r.del_flag = '0' and u.user_name = #{userName}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
|
<select id="checkRoleNameUnique" parameterType="java.lang.String" resultMap="SysRoleResult">
|
||||||
<include refid="selectRoleVo"/>
|
<include refid="selectRoleVo"/>
|
||||||
where r.role_name=#{roleName} limit 1
|
where r.role_name=#{roleName} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
|
<select id="checkRoleKeyUnique" parameterType="java.lang.String" resultMap="SysRoleResult">
|
||||||
<include refid="selectRoleVo"/>
|
<include refid="selectRoleVo"/>
|
||||||
where r.role_key=#{roleKey} limit 1
|
where r.role_key=#{roleKey} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
<insert id="insertRole" parameterType="com.xhpc.system.api.domain.SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||||
insert into sys_role(
|
insert into sys_role(
|
||||||
<if test="roleId != null and roleId != 0">role_id,</if>
|
<if test="roleId != null and roleId != 0">role_id,</if>
|
||||||
<if test="roleName != null and roleName != ''">role_name,</if>
|
<if test="roleName != null and roleName != ''">role_name,</if>
|
||||||
@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateRole" parameterType="SysRole">
|
<update id="updateRole" parameterType="com.xhpc.system.api.domain.SysRole">
|
||||||
update sys_role
|
update sys_role
|
||||||
<set>
|
<set>
|
||||||
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
|
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysRoleMenuMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysRoleMenuMapper">
|
||||||
|
|
||||||
<resultMap type="SysRoleMenu" id="SysRoleMenuResult">
|
<resultMap type="com.xhpc.system.domain.SysRoleMenu" id="SysRoleMenuResult">
|
||||||
<result property="roleId" column="role_id"/>
|
<result property="roleId" column="role_id"/>
|
||||||
<result property="menuId" column="menu_id"/>
|
<result property="menuId" column="menu_id"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="deptResult" type="SysDept">
|
<resultMap id="deptResult" type="com.xhpc.system.api.domain.SysDept">
|
||||||
<id property="deptId" column="dept_id"/>
|
<id property="deptId" column="dept_id"/>
|
||||||
<result property="parentId" column="parent_id"/>
|
<result property="parentId" column="parent_id"/>
|
||||||
<result property="deptName" column="dept_name"/>
|
<result property="deptName" column="dept_name"/>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<result property="status" column="dept_status"/>
|
<result property="status" column="dept_status"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="RoleResult" type="SysRole">
|
<resultMap id="RoleResult" type="com.xhpc.system.api.domain.SysRole">
|
||||||
<id property="roleId" column="role_id"/>
|
<id property="roleId" column="role_id"/>
|
||||||
<result property="roleName" column="role_name"/>
|
<result property="roleName" column="role_name"/>
|
||||||
<result property="roleKey" column="role_key"/>
|
<result property="roleKey" column="role_key"/>
|
||||||
@ -59,7 +59,7 @@
|
|||||||
left join sys_role r on r.role_id = ur.role_id
|
left join sys_role r on r.role_id = ur.role_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectUserList" parameterType="com.xhpc.system.api.domain.SysUser" resultMap="SysUserResult">
|
||||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,
|
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,
|
||||||
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from
|
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from
|
||||||
sys_user u
|
sys_user u
|
||||||
@ -88,7 +88,7 @@
|
|||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectAllocatedList" parameterType="com.xhpc.system.api.domain.SysUser" resultMap="SysUserResult">
|
||||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
@ -105,7 +105,7 @@
|
|||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectUnallocatedList" parameterType="com.xhpc.system.api.domain.SysUser" resultMap="SysUserResult">
|
||||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
@ -124,7 +124,7 @@
|
|||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
|
<select id="selectUserByUserName" parameterType="java.lang.String" resultMap="SysUserResult">
|
||||||
<include refid="selectUserVo"/>
|
<include refid="selectUserVo"/>
|
||||||
where u.user_name = #{userName}
|
where u.user_name = #{userName}
|
||||||
</select>
|
</select>
|
||||||
@ -134,19 +134,19 @@
|
|||||||
where u.user_id = #{userId}
|
where u.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkUserNameUnique" parameterType="String" resultType="int">
|
<select id="checkUserNameUnique" parameterType="java.lang.String" resultType="int">
|
||||||
select count(1) from sys_user where user_name = #{userName} limit 1
|
select count(1) from sys_user where user_name = #{userName} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
<select id="checkPhoneUnique" parameterType="java.lang.String" resultMap="SysUserResult">
|
||||||
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} limit 1
|
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
<select id="checkEmailUnique" parameterType="java.lang.String" resultMap="SysUserResult">
|
||||||
select user_id, email from sys_user where email = #{email} limit 1
|
select user_id, email from sys_user where email = #{email} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
<insert id="insertUser" parameterType="com.xhpc.system.api.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||||
insert into sys_user(
|
insert into sys_user(
|
||||||
<if test="userId != null and userId != 0">user_id,</if>
|
<if test="userId != null and userId != 0">user_id,</if>
|
||||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||||
@ -184,7 +184,7 @@
|
|||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateUser" parameterType="SysUser">
|
<update id="updateUser" parameterType="com.xhpc.system.api.domain.SysUser">
|
||||||
update sys_user
|
update sys_user
|
||||||
<set>
|
<set>
|
||||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||||
@ -208,15 +208,15 @@
|
|||||||
where user_id = #{userId}
|
where user_id = #{userId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateUserStatus" parameterType="SysUser">
|
<update id="updateUserStatus" parameterType="com.xhpc.system.api.domain.SysUser">
|
||||||
update sys_user set status = #{status} where user_id = #{userId}
|
update sys_user set status = #{status} where user_id = #{userId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateUserAvatar" parameterType="SysUser">
|
<update id="updateUserAvatar" parameterType="com.xhpc.system.api.domain.SysUser">
|
||||||
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="resetUserPwd" parameterType="SysUser">
|
<update id="resetUserPwd" parameterType="com.xhpc.system.api.domain.SysUser">
|
||||||
update sys_user set password = #{password} where user_name = #{userName}
|
update sys_user set password = #{password} where user_name = #{userName}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysUserPostMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysUserPostMapper">
|
||||||
|
|
||||||
<resultMap type="SysUserPost" id="SysUserPostResult">
|
<resultMap type="com.xhpc.system.domain.SysUserPost" id="SysUserPostResult">
|
||||||
<result property="userId" column="user_id"/>
|
<result property="userId" column="user_id"/>
|
||||||
<result property="postId" column="post_id"/>
|
<result property="postId" column="post_id"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.SysUserRoleMapper">
|
<mapper namespace="com.xhpc.system.mapper.SysUserRoleMapper">
|
||||||
|
|
||||||
<resultMap type="SysUserRole" id="SysUserRoleResult">
|
<resultMap type="com.xhpc.system.domain.SysUserRole" id="SysUserRoleResult">
|
||||||
<result property="userId" column="user_id"/>
|
<result property="userId" column="user_id"/>
|
||||||
<result property="roleId" column="role_id"/>
|
<result property="roleId" column="role_id"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<delete id="deleteUserRoleInfo" parameterType="SysUserRole">
|
<delete id="deleteUserRoleInfo" parameterType="com.xhpc.system.domain.SysUserRole">
|
||||||
delete
|
delete
|
||||||
from sys_user_role
|
from sys_user_role
|
||||||
where user_id = #{userId}
|
where user_id = #{userId}
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xhpc.system.mapper.XhpcUserPrivilegeMapper">
|
<mapper namespace="com.xhpc.system.mapper.XhpcUserPrivilegeMapper">
|
||||||
|
|
||||||
<resultMap type="XhpcUserPrivilege" id="XhpcUserPrivilegeResult">
|
<resultMap type="com.xhpc.system.domain.XhpcUserPrivilege" id="XhpcUserPrivilegeResult">
|
||||||
<result column="user_id" property="userId"/>
|
<result column="user_id" property="userId"/>
|
||||||
<result column="charging_station_id" property="chargingStationId"/>
|
<result column="charging_station_id" property="chargingStationId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insert" parameterType="XhpcUserPrivilege">
|
<insert id="insert" parameterType="com.xhpc.system.domain.XhpcUserPrivilege">
|
||||||
insert into xhpc_user_privilege(
|
insert into xhpc_user_privilege(
|
||||||
<if test="null != userId and '' != userId">
|
<if test="null != userId and '' != userId">
|
||||||
user_id,
|
user_id,
|
||||||
@ -36,7 +36,7 @@
|
|||||||
select charging_station_id chargingStationId from xhpc_user_privilege where user_id = #{userId}
|
select charging_station_id chargingStationId from xhpc_user_privilege where user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOperatorId" parameterType="String" resultType="java.util.Map">
|
<select id="getOperatorId" parameterType="java.lang.String" resultType="java.util.Map">
|
||||||
select xo.operator_id operatorId, xo.name, xo.contact_name contactName,
|
select xo.operator_id operatorId, xo.name, xo.contact_name contactName,
|
||||||
xo.contact_phone contactPhone, xo.phone, xo.attribute,
|
xo.contact_phone contactPhone, xo.phone, xo.attribute,
|
||||||
xdb.dict_value attributenName
|
xdb.dict_value attributenName
|
||||||
@ -52,7 +52,7 @@
|
|||||||
ORDER BY xo.create_time DESC
|
ORDER BY xo.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOperatorIdByUserId" parameterType="String" resultType="java.util.Map">
|
<select id="getOperatorIdByUserId" parameterType="java.lang.String" resultType="java.util.Map">
|
||||||
select xo.operator_id operatorId, xo.name, xo.contact_name contactName,
|
select xo.operator_id operatorId, xo.name, xo.contact_name contactName,
|
||||||
xo.contact_phone contactPhone, xo.phone, xo.attribute,
|
xo.contact_phone contactPhone, xo.phone, xo.attribute,
|
||||||
xdb.dict_value attributenName
|
xdb.dict_value attributenName
|
||||||
@ -70,7 +70,7 @@
|
|||||||
ORDER BY xo.create_time DESC
|
ORDER BY xo.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="groupProvinceByOperatorId" parameterType="String" resultType="java.util.Map">
|
<select id="groupProvinceByOperatorId" parameterType="java.lang.String" resultType="java.util.Map">
|
||||||
select `code` ,`name` from xhpc_area where `code` in (
|
select `code` ,`name` from xhpc_area where `code` in (
|
||||||
select `pxa`.pcode province
|
select `pxa`.pcode province
|
||||||
from xhpc_charging_station xcs
|
from xhpc_charging_station xcs
|
||||||
@ -88,7 +88,7 @@
|
|||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="groupCityByOperatorId" parameterType="String" resultType="java.util.Map">
|
<select id="groupCityByOperatorId" parameterType="java.lang.String" resultType="java.util.Map">
|
||||||
select `code` ,`name` from xhpc_area where `code` in (
|
select `code` ,`name` from xhpc_area where `code` in (
|
||||||
select `pxa`.code city
|
select `pxa`.code city
|
||||||
from xhpc_charging_station xcs
|
from xhpc_charging_station xcs
|
||||||
@ -109,7 +109,7 @@
|
|||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="groupAreaByOperatorId" parameterType="String" resultType="java.util.Map">
|
<select id="groupAreaByOperatorId" parameterType="java.lang.String" resultType="java.util.Map">
|
||||||
select `code` ,`name` from xhpc_area where `code` in (
|
select `code` ,`name` from xhpc_area where `code` in (
|
||||||
select `xa`.code
|
select `xa`.code
|
||||||
from xhpc_charging_station xcs
|
from xhpc_charging_station xcs
|
||||||
@ -130,7 +130,7 @@
|
|||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="dataPowerByOperatorId" parameterType="String" resultType="java.util.Map">
|
<select id="dataPowerByOperatorId" parameterType="java.lang.String" resultType="java.util.Map">
|
||||||
|
|
||||||
select xcs.charging_station_id chargingStationId,xcs.name
|
select xcs.charging_station_id chargingStationId,xcs.name
|
||||||
from xhpc_charging_station xcs
|
from xhpc_charging_station xcs
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user