1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.ims.eval.dao.EvaluationDeptMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.ims.eval.entity.EvaluationDept">
- <id column="id" property="id"/>
- <result column="company_id" property="companyId"/>
- <result column="company_name" property="companyName"/>
- <result column="short_company_name" property="shortCompanyName"/>
- <result column="dept_id" property="deptId"/>
- <result column="dept_name" property="deptName"/>
- <result column="short_dept_name" property="shortDeptName"/>
- <result column="evaluation_category" property="evaluationCategory"/>
- <result column="annual" property="annual"/>
- <result column="monthly" property="monthly"/>
- <result column="enable" property="enable"/>
- <result column="des" property="des"/>
- <result column="create_time" property="createTime"/>
- <result column="create_by" property="createBy"/>
- <result column="update_time" property="updateTime"/>
- <result column="update_by" property="updateBy"/>
- </resultMap>
- <!-- 通用查询结果列 -->
- <sql id="selectEvaluationDeptVo">
- select id,
- company_id,
- company_name,
- short_company_name,
- dept_id,
- dept_name,
- short_dept_name,
- evaluation_category,
- annual,
- monthly,
- enable,
- des,
- create_time,
- create_by,
- update_time,
- update_by
- from evaluation_dept
- </sql>
- <select id="selectListAll" resultType="com.ims.eval.entity.EvaluationDept">
- <include refid="selectEvaluationDeptVo"/>
- <where>
- enable = true
- <if test="deptName != null and deptName != ''">
- AND dept_name like CONCAT('%',#{deptName},'%')
- </if>
- <if test="annual != null and annual != ''">
- AND annual = #{annual}
- </if>
- <if test="monthly != null and monthly != ''">
- AND monthly = #{monthly}
- </if>
- </where>
- order by create_time desc
- </select>
- <select id="selectListPage" resultType="com.ims.eval.entity.EvaluationDept">
- <include refid="selectEvaluationDeptVo"/>
- <where>
- enable = true
- <if test="deptName != null and deptName != ''">
- AND dept_name like CONCAT('%',#{deptName},'%')
- </if>
- <if test="annual != null and annual != ''">
- AND annual = #{annual}
- </if>
- <if test="monthly != null and monthly != ''">
- AND monthly = #{monthly}
- </if>
- </where>
- order by create_time desc
- </select>
- </mapper>
|