EvaluationDeptMapper.xml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.ims.eval.dao.EvaluationDeptMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.ims.eval.entity.EvaluationDept">
  6. <id column="id" property="id"/>
  7. <result column="company_id" property="companyId"/>
  8. <result column="company_name" property="companyName"/>
  9. <result column="short_company_name" property="shortCompanyName"/>
  10. <result column="dept_id" property="deptId"/>
  11. <result column="dept_name" property="deptName"/>
  12. <result column="short_dept_name" property="shortDeptName"/>
  13. <result column="evaluation_category" property="evaluationCategory"/>
  14. <result column="annual" property="annual"/>
  15. <result column="monthly" property="monthly"/>
  16. <result column="enable" property="enable"/>
  17. <result column="des" property="des"/>
  18. <result column="create_time" property="createTime"/>
  19. <result column="create_by" property="createBy"/>
  20. <result column="update_time" property="updateTime"/>
  21. <result column="update_by" property="updateBy"/>
  22. </resultMap>
  23. <!-- 通用查询结果列 -->
  24. <sql id="selectEvaluationDeptVo">
  25. select id,
  26. company_id,
  27. company_name,
  28. short_company_name,
  29. dept_id,
  30. dept_name,
  31. short_dept_name,
  32. evaluation_category,
  33. annual,
  34. monthly,
  35. enable,
  36. des,
  37. create_time,
  38. create_by,
  39. update_time,
  40. update_by
  41. from evaluation_dept
  42. </sql>
  43. <select id="selectListAll" resultType="com.ims.eval.entity.EvaluationDept">
  44. <include refid="selectEvaluationDeptVo"/>
  45. <where>
  46. enable = true
  47. <if test="deptName != null and deptName != ''">
  48. AND dept_name like CONCAT('%',#{deptName},'%')
  49. </if>
  50. <if test="annual != null and annual != ''">
  51. AND annual = #{annual}
  52. </if>
  53. <if test="monthly != null and monthly != ''">
  54. AND monthly = #{monthly}
  55. </if>
  56. </where>
  57. order by create_time desc
  58. </select>
  59. <select id="selectListPage" resultType="com.ims.eval.entity.EvaluationDept">
  60. <include refid="selectEvaluationDeptVo"/>
  61. <where>
  62. enable = true
  63. <if test="deptName != null and deptName != ''">
  64. AND dept_name like CONCAT('%',#{deptName},'%')
  65. </if>
  66. <if test="annual != null and annual != ''">
  67. AND annual = #{annual}
  68. </if>
  69. <if test="monthly != null and monthly != ''">
  70. AND monthly = #{monthly}
  71. </if>
  72. </where>
  73. order by create_time desc
  74. </select>
  75. </mapper>