Pre Merge pull request !75 from zhaheng/master

This commit is contained in:
932319043@qq.com 2019-03-04 19:47:14 +08:00
commit 1fc3275111
7 changed files with 107 additions and 101 deletions

View File

@ -50,10 +50,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="configKey != null and configKey != ''"> <if test="configKey != null and configKey != ''">
AND config_key like concat('%', #{configKey}, '%') AND config_key like concat('%', #{configKey}, '%')
</if> </if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> <if test="params != null and params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d') and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if> </if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params != null and params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d') and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if> </if>
</where> </where>

View File

@ -47,8 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''"> <if test="status != null and status != ''">
AND status = #{status} AND status = #{status}
</if> </if>
<!-- 数据范围过滤 --> <if test="params != null and params.dataScope != null and params.dataScope != ''">
${params.dataScope} <!-- 数据范围过滤 -->
#{params.dataScope}
</if>
order by d.order_num order by d.order_num
</select> </select>

View File

@ -1,100 +1,100 @@
<?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.ruoyi.system.mapper.SysDictTypeMapper"> <mapper namespace="com.ruoyi.system.mapper.SysDictTypeMapper">
<resultMap type="SysDictType" id="SysDictTypeResult"> <resultMap type="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"/>
<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="selectDictTypeVo"> <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 sys_dict_type from sys_dict_type
</sql> </sql>
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult"> <select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/> <include refid="selectDictTypeVo"/>
<where> <where>
<if test="dictName != null and dictName != ''"> <if test="dictName != null and dictName != ''">
AND dict_name like concat('%', #{dictName}, '%') AND dict_name like concat('%', #{dictName}, '%')
</if> </if>
<if test="status != null and status != ''"> <if test="status != null and status != ''">
AND status = #{status} AND status = #{status}
</if> </if>
<if test="dictType != null and dictType != ''"> <if test="dictType != null and dictType != ''">
AND dict_type like concat('%', #{dictType}, '%') AND dict_type like concat('%', #{dictType}, '%')
</if> </if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> <if test="params != null and params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d') and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if> </if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params != null and params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d') and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if> </if>
</where> </where>
</select> </select>
<select id="selectDictTypeAll" resultMap="SysDictTypeResult"> <select id="selectDictTypeAll" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/> <include refid="selectDictTypeVo"/>
</select> </select>
<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult"> <select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/> <include refid="selectDictTypeVo"/>
where dict_id = #{dictId} where dict_id = #{dictId}
</select> </select>
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult"> <select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/> <include refid="selectDictTypeVo"/>
where dict_type = #{dictType} where dict_type = #{dictType}
</select> </select>
<delete id="deleteDictTypeById" parameterType="Long"> <delete id="deleteDictTypeById" parameterType="Long">
delete from sys_dict_type where dict_id = #{dictId} delete from sys_dict_type where dict_id = #{dictId}
</delete> </delete>
<delete id="deleteDictTypeByIds" parameterType="Long">
delete from sys_dict_type where dict_id in
<foreach collection="array" item="dictId" open="(" separator="," close=")">
#{dictId}
</foreach>
</delete>
<update id="updateDictType" parameterType="SysDictType"> <delete id="deleteDictTypeByIds" parameterType="Long">
update sys_dict_type delete from sys_dict_type where dict_id in
<set> <foreach collection="array" item="dictId" open="(" separator="," close=")">
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if> #{dictId}
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> </foreach>
<if test="status != null">status = #{status},</if> </delete>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <update id="updateDictType" parameterType="SysDictType">
update_time = sysdate() update sys_dict_type
</set> <set>
where dict_id = #{dictId} <if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
</update> <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
<if test="status != null">status = #{status},</if>
<insert id="insertDictType" parameterType="SysDictType"> <if test="remark != null">remark = #{remark},</if>
insert into sys_dict_type( <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="dictName != null and dictName != ''">dict_name,</if> update_time = sysdate()
<if test="dictType != null and dictType != ''">dict_type,</if> </set>
<if test="status != null">status,</if> where dict_id = #{dictId}
<if test="remark != null and remark != ''">remark,</if> </update>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time <insert id="insertDictType" parameterType="SysDictType">
)values( insert into sys_dict_type(
<if test="dictName != null and dictName != ''">#{dictName},</if> <if test="dictName != null and dictName != ''">dict_name,</if>
<if test="dictType != null and dictType != ''">#{dictType},</if> <if test="dictType != null and dictType != ''">dict_type,</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 != ''">create_by,</if>
sysdate() create_time
) )values(
</insert> <if test="dictName != null and dictName != ''">#{dictName},</if>
<if test="dictType != null and dictType != ''">#{dictType},</if>
<if test="status != null">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
</mapper> </mapper>

View File

@ -33,10 +33,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="loginName != null and loginName != ''"> <if test="loginName != null and loginName != ''">
AND login_name like concat('%', #{loginName}, '%') AND login_name like concat('%', #{loginName}, '%')
</if> </if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> <if test="params != null and params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(login_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d') and date_format(login_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if> </if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params != null and params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(login_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d') and date_format(login_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if> </if>
</where> </where>

View File

@ -43,10 +43,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="operName != null and operName != ''"> <if test="operName != null and operName != ''">
AND oper_name like concat('%', #{operName}, '%') AND oper_name like concat('%', #{operName}, '%')
</if> </if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> <if test="params != null and params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d') and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if> </if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params != null and params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d') and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if> </if>
</where> </where>

View File

@ -48,14 +48,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dataScope != null and dataScope != ''"> <if test="dataScope != null and dataScope != ''">
AND r.data_scope = #{dataScope} AND r.data_scope = #{dataScope}
</if> </if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> <if test="params != null and params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(r.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d') and date_format(r.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if> </if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params != null and params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d') and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if> </if>
<if test="params != null and params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
</if>
</select> </select>
<select id="selectRolesByUserId" parameterType="Long" resultMap="SysRoleResult"> <select id="selectRolesByUserId" parameterType="Long" resultMap="SysRoleResult">

View File

@ -68,17 +68,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="phonenumber != null and phonenumber != ''"> <if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%') AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if> </if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> <if test="params != null and params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d') AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if> </if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params != null and params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d') AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if> </if>
<if test="deptId != null and deptId != 0"> <if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET (#{deptId},ancestors) )) AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET (#{deptId},ancestors) ))
</if> </if>
<if test="params != null and params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} #{params.dataScope}
</if>
</select> </select>
<select id="selectUserByLoginName" parameterType="String" resultMap="SysUserResult"> <select id="selectUserByLoginName" parameterType="String" resultMap="SysUserResult">