代码提交
This commit is contained in:
parent
9aff0c7208
commit
9deb286e61
|
|
@ -88,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
t1.del_flag = '1'
|
||||
AND t1.LEVEL IN ( 0, 1, 2, 3 )
|
||||
<if test="contentName != null and contentName != ''">
|
||||
and t1.content_name like concat('%', #{contentName}, '%')
|
||||
and INSTR(t1.content_name, #{contentName}) > 0
|
||||
</if>
|
||||
ORDER BY
|
||||
t1.`level`,t1.sort
|
||||
|
|
@ -118,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
dkfc.del_flag = '1' and dkfc.parent_id = #{parentId} and dkfc.level = 4
|
||||
<if test="contentName != null and contentName != ''">
|
||||
and dkfc.content_name like concat('%', #{contentName}, '%')
|
||||
and INSTR(dkfc.content_name, #{contentName}) > 0
|
||||
</if>
|
||||
order by dkfc.create_time desc
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND dkp.pro_id = #{proId}
|
||||
AND dkp.level IN (0,1,2,3,4)
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND dkp.content_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
AND INSTR(dkp.content_name, #{keyWord}) > 0
|
||||
</if>
|
||||
ORDER BY
|
||||
dkp.`level`, dkp.sort
|
||||
|
|
@ -179,7 +179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
dkpfc.del_flag = '1' and dkpfc.parent_id = #{parentId} and dkpfc.pro_id = #{proId} and dkpfc.level = 5
|
||||
<if test="contentName != null and contentName != ''">
|
||||
and dkpfc.content_name like concat('%', #{contentName}, '%')
|
||||
AND INSTR(dkpfc.content_name, #{contentName}) > 0
|
||||
</if>
|
||||
<if test="uploadTime != null and uploadTime != ''">
|
||||
and DATE(dkfs.create_time) = #{uploadTime}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
del_flag = '1'
|
||||
<if test="classifyMarkName != null and classifyMarkName != ''">
|
||||
AND classify_mark_name LIKE CONCAT('%',#{classifyMarkName},'%')
|
||||
AND INSTR(classify_mark_name, #{classifyMarkName}) > 0
|
||||
</if>
|
||||
ORDER BY
|
||||
create_time DESC
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
dkp.del_flag = '1'
|
||||
<if test="proName != null and proName != ''">
|
||||
AND dkp.single_pro_name LIKE CONCAT('%',#{proName},'%')
|
||||
AND INSTR(dkp.single_pro_name, #{proName}) > 0
|
||||
</if>
|
||||
<if test="proType != null and proType != ''">
|
||||
AND dkp.pro_type = #{proType}
|
||||
|
|
|
|||
|
|
@ -14,17 +14,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="exceptionInfo" column="exception_info" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectJobLogVo">
|
||||
select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time
|
||||
select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time
|
||||
from da_ky_sys_job_log
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectJobLogList" parameterType="SysJobLog" resultMap="SysJobLogResult">
|
||||
<include refid="selectJobLogVo"/>
|
||||
<where>
|
||||
<if test="jobName != null and jobName != ''">
|
||||
AND job_name like concat('%', #{jobName}, '%')
|
||||
AND INSTR(job_name, #{jobName}) > 0
|
||||
</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">
|
||||
AND job_group = #{jobGroup}
|
||||
|
|
@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND status = #{status}
|
||||
</if>
|
||||
<if test="invokeTarget != null and invokeTarget != ''">
|
||||
AND invoke_target like concat('%', #{invokeTarget}, '%')
|
||||
AND INSTR(invoke_target, #{invokeTarget}) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
|
||||
|
|
@ -44,31 +44,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectJobLogAll" resultMap="SysJobLogResult">
|
||||
<include refid="selectJobLogVo"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectJobLogById" parameterType="Long" resultMap="SysJobLogResult">
|
||||
<include refid="selectJobLogVo"/>
|
||||
where job_log_id = #{jobLogId}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteJobLogById" parameterType="Long">
|
||||
delete from da_ky_sys_job_log where job_log_id = #{jobLogId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteJobLogByIds" parameterType="Long">
|
||||
delete from da_ky_sys_job_log where job_log_id in
|
||||
<foreach collection="array" item="jobLogId" open="(" separator="," close=")">
|
||||
#{jobLogId}
|
||||
</foreach>
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<update id="cleanJobLog">
|
||||
truncate table da_ky_sys_job_log
|
||||
</update>
|
||||
|
||||
|
||||
<insert id="insertJobLog" parameterType="SysJobLog">
|
||||
insert into da_ky_sys_job_log(
|
||||
<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
|
||||
|
|
@ -91,4 +91,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -19,17 +19,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectJobVo">
|
||||
select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark
|
||||
select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark
|
||||
from da_ky_sys_job
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult">
|
||||
<include refid="selectJobVo"/>
|
||||
<where>
|
||||
<if test="jobName != null and jobName != ''">
|
||||
AND job_name like concat('%', #{jobName}, '%')
|
||||
AND INSTR(job_name, #{jobName}) > 0
|
||||
</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">
|
||||
AND job_group = #{jobGroup}
|
||||
|
|
@ -38,31 +38,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND status = #{status}
|
||||
</if>
|
||||
<if test="invokeTarget != null and invokeTarget != ''">
|
||||
AND invoke_target like concat('%', #{invokeTarget}, '%')
|
||||
AND INSTR(invoke_target, #{invokeTarget}) > 0
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectJobAll" resultMap="SysJobResult">
|
||||
<include refid="selectJobVo"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectJobById" parameterType="Long" resultMap="SysJobResult">
|
||||
<include refid="selectJobVo"/>
|
||||
where job_id = #{jobId}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteJobById" parameterType="Long">
|
||||
delete from da_ky_sys_job where job_id = #{jobId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteJobByIds" parameterType="Long">
|
||||
delete from da_ky_sys_job where job_id in
|
||||
<foreach collection="array" item="jobId" open="(" separator="," close=")">
|
||||
#{jobId}
|
||||
</foreach>
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<update id="updateJob" parameterType="SysJob">
|
||||
update da_ky_sys_job
|
||||
<set>
|
||||
|
|
@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
where job_id = #{jobId}
|
||||
</update>
|
||||
|
||||
|
||||
<insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId">
|
||||
insert into da_ky_sys_job(
|
||||
<if test="jobId != null and jobId != 0">job_id,</if>
|
||||
|
|
@ -108,4 +108,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update_user_id,update_user_name
|
||||
from da_ky_files_customize_classify where del_flag = '1'
|
||||
<if test="customizeClassifyName!=null">
|
||||
and customize_classify_name LIKE CONCAT('%', #{customizeClassifyName}, '%')
|
||||
AND INSTR(customize_classify_name, #{customizeClassifyName}) > 0
|
||||
</if>
|
||||
</select>
|
||||
<select id="getKyFilesCustomizeClassify" resultType="com.bonus.system.domain.KyFilesCustomizeClassify">
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join da_ky_sys_dict_data dksdd2 on dkfmc.file_related = dksdd2.dict_value and dksdd2.dict_type = 'file_related_type'
|
||||
where dkfmc.del_flag='1'
|
||||
<if test="classifyName!=null">
|
||||
and classify_name LIKE CONCAT('%', #{classifyName}, '%')
|
||||
AND INSTR(classify_name, #{classifyName}) > 0
|
||||
</if>
|
||||
</select>
|
||||
<select id="getKyFilesMultiClassifyByClassifyName"
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join da_ky_sys_dict_data dksdd on dkdc.pid =dksdd.dict_value
|
||||
where del_flag='1'
|
||||
<if test="dataTypeName!=null">
|
||||
and data_type_name LIKE CONCAT('%', #{dataTypeName}, '%')
|
||||
AND INSTR(data_type_name, #{dataTypeName}) > 0
|
||||
</if>
|
||||
order by dkdc.create_time desc
|
||||
</select>
|
||||
|
|
@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select id,data_type_name
|
||||
from da_ky_data_classify where del_flag='1' and pid =#{pid}
|
||||
<if test="dataTypeName!=null">
|
||||
and data_type_name LIKE CONCAT('%', #{dataTypeName}, '%')
|
||||
AND INSTR(data_type_name, #{dataTypeName}) > 0
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectKyDataClassifyByDataTypeName" resultType="com.bonus.system.domain.KyDataClassify">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.system.mapper.SysConfigMapper">
|
||||
|
||||
|
||||
<resultMap type="SysConfig" id="SysConfigResult">
|
||||
<id property="configId" column="config_id" />
|
||||
<result property="configName" column="config_name" />
|
||||
|
|
@ -15,12 +15,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectConfigVo">
|
||||
select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark
|
||||
select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark
|
||||
from da_ky_sys_config
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="sqlwhereSearch">
|
||||
<where>
|
||||
|
|
@ -32,23 +32,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
<include refid="sqlwhereSearch"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
<where>
|
||||
<if test="configName != null and configName != ''">
|
||||
AND config_name like concat('%', #{configName}, '%')
|
||||
AND INSTR(config_name, #{configName}) > 0
|
||||
</if>
|
||||
<if test="configType != null and configType != ''">
|
||||
AND config_type = #{configType}
|
||||
</if>
|
||||
<if test="configKey != null and configKey != ''">
|
||||
AND config_key like concat('%', #{configKey}, '%')
|
||||
AND INSTR(config_key, #{configKey}) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
|
||||
|
|
@ -58,17 +58,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
where config_id = #{configId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
where config_key = #{configKey} limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertConfig" parameterType="SysConfig">
|
||||
insert into da_ky_sys_config (
|
||||
<if test="configName != null and configName != '' ">config_name,</if>
|
||||
|
|
@ -88,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateConfig" parameterType="SysConfig">
|
||||
update da_ky_sys_config
|
||||
<set>
|
||||
|
|
@ -102,16 +102,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
where config_id = #{configId}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteConfigById" parameterType="Long">
|
||||
delete from da_ky_sys_config where config_id = #{configId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteConfigByIds" parameterType="Long">
|
||||
delete from da_ky_sys_config where config_id in
|
||||
<foreach item="configId" collection="array" open="(" separator="," close=")">
|
||||
#{configId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="deptName != null and deptName != ''">
|
||||
AND dept_name like concat('%', #{deptName}, '%')
|
||||
AND INSTR(dept_name, #{deptName}) > 0
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.system.mapper.SysDictDataMapper">
|
||||
|
||||
|
||||
<resultMap type="SysDictData" id="SysDictDataResult">
|
||||
<id property="dictCode" column="dict_code" />
|
||||
<result property="dictSort" column="dict_sort" />
|
||||
|
|
@ -19,9 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectDictDataVo">
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
|
||||
from da_ky_sys_dict_data
|
||||
</sql>
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND dict_type = #{dictType}
|
||||
</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">
|
||||
AND dict_label like concat('%', #{dictLabel}, '%')
|
||||
AND INSTR(dict_label, #{dictLabel}) > 0
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
|
|
@ -40,37 +40,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by dict_sort asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDictDataByType" parameterType="String" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where status = '0' and dict_type = #{dictType} order by dict_sort asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDictLabel" resultType="String">
|
||||
select dict_label from da_ky_sys_dict_data
|
||||
where dict_type = #{dictType} and dict_value = #{dictValue}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where dict_code = #{dictCode}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="countDictDataByType" resultType="Integer">
|
||||
select count(1) from da_ky_sys_dict_data where dict_type=#{dictType}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteDictDataById" parameterType="Long">
|
||||
delete from da_ky_sys_dict_data where dict_code = #{dictCode}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteDictDataByIds" parameterType="Long">
|
||||
delete from da_ky_sys_dict_data where dict_code in
|
||||
<foreach collection="array" item="dictCode" open="(" separator="," close=")">
|
||||
#{dictCode}
|
||||
</foreach>
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<update id="updateDictData" parameterType="SysDictData">
|
||||
update da_ky_sys_dict_data
|
||||
<set>
|
||||
|
|
@ -88,11 +88,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
where dict_code = #{dictCode}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateDictDataType" parameterType="String">
|
||||
update da_ky_sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
||||
</update>
|
||||
|
||||
|
||||
<insert id="insertDictData" parameterType="SysDictData">
|
||||
insert into da_ky_sys_dict_data(
|
||||
<if test="dictSort != null">dict_sort,</if>
|
||||
|
|
@ -120,5 +120,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectDictTypeVo">
|
||||
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
|
||||
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
|
||||
from da_ky_sys_dict_type
|
||||
</sql>
|
||||
|
||||
|
|
@ -24,13 +24,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectDictTypeVo"/>
|
||||
<where>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
AND dict_name like concat('%', #{dictName}, '%')
|
||||
AND INSTR(dict_name, #{dictName}) > 0
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type like concat('%', #{dictType}, '%')
|
||||
AND INSTR(dict_type, #{dictType}) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
|
||||
|
|
@ -40,35 +40,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_id = #{dictId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType} limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteDictTypeById" parameterType="Long">
|
||||
delete from da_ky_sys_dict_type where dict_id = #{dictId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteDictTypeByIds" parameterType="Long">
|
||||
delete from da_ky_sys_dict_type where dict_id in
|
||||
<foreach collection="array" item="dictId" open="(" separator="," close=")">
|
||||
#{dictId}
|
||||
</foreach>
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictType" parameterType="SysDictType">
|
||||
|
|
@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
where dict_id = #{dictId}
|
||||
</update>
|
||||
|
||||
|
||||
<insert id="insertDictType" parameterType="SysDictType">
|
||||
insert into da_ky_sys_dict_type(
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||
|
|
@ -101,5 +101,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
from da_ky_sys_encrypt_set
|
||||
where 1=1
|
||||
<if test="encryptName != null and encryptName != ''">
|
||||
and encrypt_name like concat ('%',#{encryptName},'%')
|
||||
AND INSTR(dkp.encrypt_name, #{encryptName}) > 0
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectSysEncryType" resultType="java.lang.Integer">
|
||||
|
|
|
|||
|
|
@ -125,16 +125,16 @@
|
|||
from da_ky_sys_logs
|
||||
where log_type=#{logType}
|
||||
<if test="operaUserName!=null and operaUserName!=''">
|
||||
and opera_user_name LIKE concat('%',#{operaUserName},'%')
|
||||
AND INSTR(opera_user_name, #{operaUserName}) > 0
|
||||
</if>
|
||||
<if test="model!=null and model!=''">
|
||||
and model LIKE concat('%',#{model},'%')
|
||||
AND INSTR(model, #{model}) > 0
|
||||
</if>
|
||||
<if test="operType!=null and operType !=''">
|
||||
and oper_type LIKE concat('%',#{operType},'%')
|
||||
AND INSTR(oper_type, #{operType}) > 0
|
||||
</if>
|
||||
<if test="params!=null and params !=''">
|
||||
and params LIKE concat('%',#{params},'%')
|
||||
AND INSTR(params, #{params}) > 0
|
||||
</if>
|
||||
|
||||
<if test="errType!=null and errType!=''">
|
||||
|
|
@ -147,10 +147,10 @@
|
|||
and oper_time BETWEEN concat(#{startTime}, ' 00:00:00') AND concat(#{endTime},' 23:59:59')
|
||||
</if>
|
||||
<if test="ip !=null and ip!=''">
|
||||
and ip LIKE concat('%',#{ip},'%')
|
||||
and INSTR(ip, #{ip}) > 0
|
||||
</if>
|
||||
<if test="result !=null and result !=''">
|
||||
and result LIKE concat('%',#{result},'%')
|
||||
and INSTR(result, #{result}) > 0
|
||||
</if>
|
||||
<if test="logSort!=null and logDesc !=null and logSort!='' and logDesc!='' ">
|
||||
order by
|
||||
|
|
|
|||
|
|
@ -20,18 +20,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
insert into da_ky_sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
|
||||
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
|
||||
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from da_ky_sys_logininfor
|
||||
<where>
|
||||
<if test="ipaddr != null and ipaddr != ''">
|
||||
AND ipaddr like concat('%', #{ipaddr}, '%')
|
||||
AND INSTR(ipaddr, #{ipaddr}) > 0
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND user_name like concat('%', #{userName}, '%')
|
||||
AND INSTR(user_name, #{userName}) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND login_time >= #{params.beginTime}
|
||||
|
|
@ -42,16 +42,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by info_id desc
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteLogininforByIds" parameterType="Long">
|
||||
delete from da_ky_sys_logininfor where info_id in
|
||||
<foreach collection="array" item="infoId" open="(" separator="," close=")">
|
||||
#{infoId}
|
||||
</foreach>
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<update id="cleanLogininfor">
|
||||
truncate table da_ky_sys_logininfor
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -29,15 +29,15 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectMenuVo">
|
||||
select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
|
||||
select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
|
||||
from da_ky_sys_menu
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
<where>
|
||||
<if test="menuName != null and menuName != ''">
|
||||
AND menu_name like concat('%', #{menuName}, '%')
|
||||
AND INSTR(menu_name, #{menuName}) > 0
|
||||
</if>
|
||||
<if test="visible != null and visible != ''">
|
||||
AND visible = #{visible}
|
||||
|
|
@ -48,13 +48,13 @@
|
|||
</where>
|
||||
order by parent_id, order_num
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, 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 da_ky_sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, 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 da_ky_sys_menu m
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
left join da_ky_sys_role ro on ur.role_id = ro.role_id
|
||||
where ur.user_id = #{params.userId}
|
||||
<if test="menuName != null and menuName != ''">
|
||||
AND m.menu_name like concat('%', #{menuName}, '%')
|
||||
AND INSTR(m.menu_name, #{menuName}) > 0
|
||||
</if>
|
||||
<if test="visible != null and visible != ''">
|
||||
AND m.visible = #{visible}
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
</if>
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, 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 da_ky_sys_menu m
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0 AND ro.status = 0
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMenuListByRoleId" resultType="Long">
|
||||
select m.menu_id
|
||||
from da_ky_sys_menu m
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
</if>
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMenuPerms" resultType="String">
|
||||
select distinct m.perms
|
||||
from da_ky_sys_menu m
|
||||
|
|
@ -111,28 +111,28 @@
|
|||
left join da_ky_sys_role r on r.role_id = ur.role_id
|
||||
where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
|
||||
select distinct m.perms
|
||||
from da_ky_sys_menu m
|
||||
left join da_ky_sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
where m.status = '0' and rm.role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
where menu_id = #{menuId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="hasChildByMenuId" resultType="Integer">
|
||||
select count(1) from da_ky_sys_menu where parent_id = #{menuId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
where menu_name=#{menuName} and parent_id = #{parentId} limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updateMenu" parameterType="SysMenu">
|
||||
update da_ky_sys_menu
|
||||
<set>
|
||||
|
|
@ -198,9 +198,9 @@
|
|||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<delete id="deleteMenuById" parameterType="Long">
|
||||
delete from da_ky_sys_menu where menu_id = #{menuId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.system.mapper.SysNoticeMapper">
|
||||
|
||||
|
||||
<resultMap type="SysNotice" id="SysNoticeResult">
|
||||
<result property="noticeId" column="notice_id" />
|
||||
<result property="noticeTitle" column="notice_title" />
|
||||
|
|
@ -16,32 +16,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectNoticeVo">
|
||||
select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
|
||||
select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
|
||||
from da_ky_sys_notice
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
|
||||
<include refid="selectNoticeVo"/>
|
||||
where notice_id = #{noticeId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
|
||||
<include refid="selectNoticeVo"/>
|
||||
<where>
|
||||
<if test="noticeTitle != null and noticeTitle != ''">
|
||||
AND notice_title like concat('%', #{noticeTitle}, '%')
|
||||
AND INSTR(notice_title, #{noticeTitle}) > 0
|
||||
</if>
|
||||
<if test="noticeType != null and noticeType != ''">
|
||||
AND notice_type = #{noticeType}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
AND create_by like concat('%', #{createBy}, '%')
|
||||
AND INSTR(create_by, #{createBy}) > 0
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertNotice" parameterType="SysNotice">
|
||||
insert into da_ky_sys_notice (
|
||||
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
||||
|
|
@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateNotice" parameterType="SysNotice">
|
||||
update da_ky_sys_notice
|
||||
<set>
|
||||
|
|
@ -74,16 +74,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
where notice_id = #{noticeId}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteNoticeById" parameterType="Long">
|
||||
delete from da_ky_sys_notice where notice_id = #{noticeId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteNoticeByIds" parameterType="Long">
|
||||
delete from da_ky_sys_notice where notice_id in
|
||||
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
|
||||
#{noticeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time
|
||||
from da_ky_sys_oper_log
|
||||
</sql>
|
||||
|
||||
|
||||
<insert id="insertOperlog" parameterType="SysOperLog">
|
||||
insert into da_ky_sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time)
|
||||
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate())
|
||||
|
|
@ -56,10 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectOperLogVo"/>
|
||||
<where>
|
||||
<if test="operIp != null and operIp != ''">
|
||||
AND oper_ip like concat('%', #{operIp}, '%')
|
||||
AND INSTR(oper_ip, #{operIp}) > 0
|
||||
</if>
|
||||
<if test="title != null and title != ''">
|
||||
AND title like concat('%', #{title}, '%')
|
||||
AND INSTR(title, #{title}) > 0
|
||||
</if>
|
||||
<if test="businessType != null">
|
||||
AND business_type = #{businessType}
|
||||
|
|
@ -68,13 +68,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND business_type in
|
||||
<foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
|
||||
#{businessType}
|
||||
</foreach>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="operName != null and operName != ''">
|
||||
AND oper_name like concat('%', #{operName}, '%')
|
||||
AND INSTR(oper_name, #{operName}) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND oper_time >= #{params.beginTime}
|
||||
|
|
@ -85,14 +85,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by oper_id desc
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteOperLogByIds" parameterType="Long">
|
||||
delete from da_ky_sys_oper_log where oper_id in
|
||||
<foreach collection="array" item="operId" open="(" separator="," close=")">
|
||||
#{operId}
|
||||
</foreach>
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult">
|
||||
<include refid="selectOperLogVo"/>
|
||||
where oper_id = #{operId}
|
||||
|
|
@ -122,4 +122,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
truncate table da_ky_sys_oper_log
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -16,36 +16,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectPostVo">
|
||||
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
|
||||
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
|
||||
from da_ky_sys_post
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
<where>
|
||||
<if test="postCode != null and postCode != ''">
|
||||
AND post_code like concat('%', #{postCode}, '%')
|
||||
AND INSTR(post_code, #{postCode}) > 0
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="postName != null and postName != ''">
|
||||
AND post_name like concat('%', #{postName}, '%')
|
||||
AND INSTR(post_name, #{postName}) > 0
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPostAll" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPostById" parameterType="Long" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
where post_id = #{postId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPostListByUserId" parameterType="Long" resultType="Long">
|
||||
select p.post_id
|
||||
from da_ky_sys_post p
|
||||
|
|
@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join da_ky_sys_user u on u.user_id = up.user_id
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
|
||||
select p.post_id, p.post_name, p.post_code
|
||||
from da_ky_sys_post p
|
||||
|
|
@ -61,17 +61,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join da_ky_sys_user u on u.user_id = up.user_id
|
||||
where u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
where post_name=#{postName} limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
where post_code=#{postCode} limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updatePost" parameterType="SysPost">
|
||||
update da_ky_sys_post
|
||||
<set>
|
||||
|
|
@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
where post_id = #{postId}
|
||||
</update>
|
||||
|
||||
|
||||
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
|
||||
insert into da_ky_sys_post(
|
||||
<if test="postId != null and postId != 0">post_id,</if>
|
||||
|
|
@ -107,16 +107,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<delete id="deletePostById" parameterType="Long">
|
||||
delete from da_ky_sys_post where post_id = #{postId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deletePostByIds" parameterType="Long">
|
||||
delete from da_ky_sys_post where post_id in
|
||||
<foreach collection="array" item="postId" open="(" separator="," close=")">
|
||||
#{postId}
|
||||
</foreach>
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -20,16 +20,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectRoleVo">
|
||||
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
|
||||
r.status, r.del_flag, r.create_time, r.remark
|
||||
r.status, r.del_flag, r.create_time, r.remark
|
||||
from da_ky_sys_role r
|
||||
left join da_ky_sys_user_role ur on ur.role_id = r.role_id
|
||||
left join da_ky_sys_user u on u.user_id = ur.user_id
|
||||
left join da_ky_sys_dept d on u.dept_id = d.dept_id
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.del_flag = '0'
|
||||
|
|
@ -37,13 +37,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND r.role_id = #{roleId}
|
||||
</if>
|
||||
<if test="roleName != null and roleName != ''">
|
||||
AND r.role_name like concat('%', #{roleName}, '%')
|
||||
AND INSTR(r.role_name, #{roleName}) > 0
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND r.status = #{status}
|
||||
</if>
|
||||
<if test="roleKey != null and roleKey != ''">
|
||||
AND r.role_key like concat('%', #{roleKey}, '%')
|
||||
AND INSTR(r.role_key, #{roleKey}) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(r.create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
|
||||
|
|
@ -55,16 +55,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
${params.dataScope}
|
||||
order by r.role_sort
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
WHERE r.del_flag = '0' and ur.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRoleAll" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
|
||||
select r.role_id
|
||||
from da_ky_sys_role r
|
||||
|
|
@ -72,27 +72,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join da_ky_sys_user u on u.user_id = ur.user_id
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
WHERE r.del_flag = '0' and u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.role_name=#{roleName} and r.del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||
insert into da_ky_sys_role(
|
||||
<if test="roleId != null and roleId != 0">role_id,</if>
|
||||
|
|
@ -120,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateRole" parameterType="SysRole">
|
||||
update da_ky_sys_role
|
||||
<set>
|
||||
|
|
@ -137,16 +137,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
where role_id = #{roleId}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteRoleById" parameterType="Long">
|
||||
update da_ky_sys_role set del_flag = '2' where role_id = #{roleId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteRoleByIds" parameterType="Long">
|
||||
update da_ky_sys_role set del_flag = '2' where role_id in
|
||||
<foreach collection="array" item="roleId" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -71,13 +71,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND u.user_id = #{userId}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
AND INSTR(u.user_name, #{userName}) > 0
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND u.status = #{status}
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
AND INSTR(u.phonenumber, #{phonenumber}) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(u.create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
|
||||
|
|
@ -100,10 +100,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join da_ky_sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and r.role_id = #{roleId}
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
AND INSTR(u.user_name, #{userName}) > 0
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
AND INSTR(u.phonenumber, #{phonenumber}) > 0
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
|
|
@ -118,10 +118,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
|
||||
and u.user_id not in (select u.user_id from da_ky_sys_user u inner join da_ky_sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
AND INSTR(u.user_name, #{userName}) > 0
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
AND INSTR(u.phonenumber, #{phonenumber}) > 0
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
|
|
|
|||
Loading…
Reference in New Issue