TeamPersonnelChangeInformationMapper.xml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.zkqy.amichi.mapper.TeamPersonnelChangeInformationMapper">
  6. <resultMap type="com.zkqy.amichi.domain.TeamPersonnelChangeInformation" id="TeamPersonnelChangeInformationResult">
  7. <result property="id" column="id" />
  8. <result property="teamPersonnelName" column="team_personnel_name" />
  9. <result property="teamId" column="team_id" />
  10. <result property="remark" column="remark" />
  11. <result property="createById" column="create_by_id" />
  12. <result property="createBy" column="create_by" />
  13. <result property="createTime" column="create_time" />
  14. <result property="updateById" column="update_by_id" />
  15. <result property="updateBy" column="update_by" />
  16. <result property="updateTime" column="update_time" />
  17. <result property="delFlag" column="del_flag" />
  18. <result property="dataApprovalStatus" column="data_approval_status" />
  19. <result property="processKey" column="process_key" />
  20. <result property="taskProcessKey" column="task_process_key" />
  21. <result property="taskNodeKey" column="task_node_key" />
  22. </resultMap>
  23. <sql id="selectTeamPersonnelChangeInformationVo">
  24. select id, team_personnel_name, team_id, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status,
  25. process_key, task_process_key, task_node_key from {DBNAME}.team_personnel_change_information
  26. </sql>
  27. <select id="selectTeamPersonnelChangeInformationList" parameterType="com.zkqy.amichi.domain.TeamPersonnelChangeInformation" resultMap="TeamPersonnelChangeInformationResult">
  28. <include refid="selectTeamPersonnelChangeInformationVo"/>
  29. <where>
  30. <if test="teamPersonnelName != null and teamPersonnelName != ''"> and team_personnel_name = #{teamPersonnelName}</if>
  31. <if test="teamId != null and teamId != ''"> and team_id = #{teamId}</if>
  32. <if test="createById != null "> and create_by_id = #{createById}</if>
  33. <if test="updateById != null "> and update_by_id = #{updateById}</if>
  34. <if test="dataApprovalStatus != null and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
  35. <if test="processKey != null and processKey != ''"> and process_key = #{processKey}</if>
  36. <if test="taskProcessKey != null and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
  37. <if test="taskNodeKey != null and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
  38. and del_flag=0
  39. </where>
  40. </select>
  41. <select id="selectTeamPersonnelChangeInformationById" parameterType="Long" resultMap="TeamPersonnelChangeInformationResult">
  42. <include refid="selectTeamPersonnelChangeInformationVo"/>
  43. where id = #{id} and del_flag=0
  44. </select>
  45. <insert id="insertTeamPersonnelChangeInformation" parameterType="com.zkqy.amichi.domain.TeamPersonnelChangeInformation" useGeneratedKeys="true" keyProperty="id">
  46. insert into {DBNAME}.team_personnel_change_information
  47. <trim prefix="(" suffix=")" suffixOverrides=",">
  48. <if test="teamPersonnelName != null">team_personnel_name,</if>
  49. <if test="teamId != null">team_id,</if>
  50. <if test="remark != null">remark,</if>
  51. <if test="createById != null">create_by_id,</if>
  52. <if test="createBy != null">create_by,</if>
  53. <if test="createTime != null">create_time,</if>
  54. <if test="updateById != null">update_by_id,</if>
  55. <if test="updateBy != null">update_by,</if>
  56. <if test="updateTime != null">update_time,</if>
  57. <if test="delFlag != null">del_flag,</if>
  58. <if test="dataApprovalStatus != null">data_approval_status,</if>
  59. <if test="processKey != null">process_key,</if>
  60. <if test="taskProcessKey != null">task_process_key,</if>
  61. <if test="taskNodeKey != null">task_node_key,</if>
  62. </trim>
  63. <trim prefix="values (" suffix=")" suffixOverrides=",">
  64. <if test="teamPersonnelName != null">#{teamPersonnelName},</if>
  65. <if test="teamId != null">#{teamId},</if>
  66. <if test="remark != null">#{remark},</if>
  67. <if test="createById != null">#{createById},</if>
  68. <if test="createBy != null">#{createBy},</if>
  69. <if test="createTime != null">#{createTime},</if>
  70. <if test="updateById != null">#{updateById},</if>
  71. <if test="updateBy != null">#{updateBy},</if>
  72. <if test="updateTime != null">#{updateTime},</if>
  73. <if test="delFlag != null">#{delFlag},</if>
  74. <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
  75. <if test="processKey != null">#{processKey},</if>
  76. <if test="taskProcessKey != null">#{taskProcessKey},</if>
  77. <if test="taskNodeKey != null">#{taskNodeKey},</if>
  78. </trim>
  79. </insert>
  80. <update id="updateTeamPersonnelChangeInformation" parameterType="com.zkqy.amichi.domain.TeamPersonnelChangeInformation">
  81. update {DBNAME}.team_personnel_change_information
  82. <trim prefix="SET" suffixOverrides=",">
  83. <if test="teamPersonnelName != null">team_personnel_name = #{teamPersonnelName},</if>
  84. <if test="teamId != null">team_id = #{teamId},</if>
  85. <if test="remark != null">remark = #{remark},</if>
  86. <if test="createById != null">create_by_id = #{createById},</if>
  87. <if test="createBy != null">create_by = #{createBy},</if>
  88. <if test="createTime != null">create_time = #{createTime},</if>
  89. <if test="updateById != null">update_by_id = #{updateById},</if>
  90. <if test="updateBy != null">update_by = #{updateBy},</if>
  91. <if test="updateTime != null">update_time = #{updateTime},</if>
  92. <if test="delFlag != null">del_flag = #{delFlag},</if>
  93. <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
  94. <if test="processKey != null">process_key = #{processKey},</if>
  95. <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
  96. <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
  97. </trim>
  98. where id = #{id}
  99. </update>
  100. <delete id="deleteTeamPersonnelChangeInformationById" parameterType="Long">
  101. delete from {DBNAME}.team_personnel_change_information where id = #{id}
  102. </delete>
  103. <delete id="deleteTeamPersonnelChangeInformationByIds" parameterType="String">
  104. delete from {DBNAME}.team_personnel_change_information where id in
  105. <foreach item="id" collection="array" open="(" separator="," close=")">
  106. #{id}
  107. </foreach>
  108. </delete>
  109. </mapper>