TeamInformationMapper.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.TeamInformationMapper">
  6. <resultMap type="com.zkqy.amichi.domain.TeamInformation" id="TeamInformationResult">
  7. <result property="id" column="id" />
  8. <result property="teamName" column="team_name" />
  9. <result property="remark" column="remark" />
  10. <result property="createById" column="create_by_id" />
  11. <result property="createBy" column="create_by" />
  12. <result property="createTime" column="create_time" />
  13. <result property="updateById" column="update_by_id" />
  14. <result property="updateBy" column="update_by" />
  15. <result property="updateTime" column="update_time" />
  16. <result property="delFlag" column="del_flag" />
  17. <result property="dataApprovalStatus" column="data_approval_status" />
  18. <result property="processKey" column="process_key" />
  19. <result property="taskProcessKey" column="task_process_key" />
  20. <result property="taskNodeKey" column="task_node_key" />
  21. <result property="teamCode" column="team_code" />
  22. <result property="teamType" column="team_type" />
  23. </resultMap>
  24. <sql id="selectTeamInformationVo">
  25. select id, team_name, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key,
  26. team_code,team_type
  27. from {DBNAME}.team_information
  28. </sql>
  29. <select id="selectTeamInformationList" parameterType="com.zkqy.amichi.domain.TeamInformation" resultMap="TeamInformationResult">
  30. <include refid="selectTeamInformationVo"/>
  31. <where>
  32. <if test="teamName != null and teamName != ''"> and team_name = #{teamName}</if>
  33. <if test="createById != null "> and create_by_id = #{createById}</if>
  34. <if test="updateById != null "> and update_by_id = #{updateById}</if>
  35. <if test="dataApprovalStatus != null and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
  36. <if test="processKey != null and processKey != ''"> and process_key = #{processKey}</if>
  37. <if test="taskProcessKey != null and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
  38. <if test="taskNodeKey != null and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
  39. <if test="teamCode != null "> and team_code = #{teamCode}</if>
  40. <if test="teamType != null "> and team_type = #{teamType}</if>
  41. and del_flag=0
  42. </where>
  43. </select>
  44. <select id="selectTeamInformationById" parameterType="Long" resultMap="TeamInformationResult">
  45. <include refid="selectTeamInformationVo"/>
  46. where id = #{id} and del_flag=0
  47. </select>
  48. <insert id="insertTeamInformation" parameterType="com.zkqy.amichi.domain.TeamInformation" useGeneratedKeys="true" keyProperty="id">
  49. insert into {DBNAME}.team_information
  50. <trim prefix="(" suffix=")" suffixOverrides=",">
  51. <if test="teamName != null">team_name,</if>
  52. <if test="remark != null">remark,</if>
  53. <if test="createById != null">create_by_id,</if>
  54. <if test="createBy != null">create_by,</if>
  55. <if test="createTime != null">create_time,</if>
  56. <if test="updateById != null">update_by_id,</if>
  57. <if test="updateBy != null">update_by,</if>
  58. <if test="updateTime != null">update_time,</if>
  59. <if test="delFlag != null">del_flag,</if>
  60. <if test="dataApprovalStatus != null">data_approval_status,</if>
  61. <if test="processKey != null">process_key,</if>
  62. <if test="taskProcessKey != null">task_process_key,</if>
  63. <if test="taskNodeKey != null">task_node_key,</if>
  64. <if test="teamCode != null">team_code,</if>
  65. <if test="teamType != null ">team_type</if>
  66. </trim>
  67. <trim prefix="values (" suffix=")" suffixOverrides=",">
  68. <if test="teamName != null">#{teamName},</if>
  69. <if test="remark != null">#{remark},</if>
  70. <if test="createById != null">#{createById},</if>
  71. <if test="createBy != null">#{createBy},</if>
  72. <if test="createTime != null">#{createTime},</if>
  73. <if test="updateById != null">#{updateById},</if>
  74. <if test="updateBy != null">#{updateBy},</if>
  75. <if test="updateTime != null">#{updateTime},</if>
  76. <if test="delFlag != null">#{delFlag},</if>
  77. <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
  78. <if test="processKey != null">#{processKey},</if>
  79. <if test="taskProcessKey != null">#{taskProcessKey},</if>
  80. <if test="taskNodeKey != null">#{taskNodeKey},</if>
  81. <if test="teamCode != null">#{teamCode},</if>
  82. <if test="teamType != null ">#{teamType}</if>
  83. </trim>
  84. </insert>
  85. <update id="updateTeamInformation" parameterType="com.zkqy.amichi.domain.TeamInformation">
  86. update {DBNAME}.team_information
  87. <trim prefix="SET" suffixOverrides=",">
  88. <if test="teamName != null">team_Name = #{teamName},</if>
  89. <if test="remark != null">remark = #{remark},</if>
  90. <if test="createById != null">create_by_id = #{createById},</if>
  91. <if test="createBy != null">create_by = #{createBy},</if>
  92. <if test="createTime != null">create_time = #{createTime},</if>
  93. <if test="updateById != null">update_by_id = #{updateById},</if>
  94. <if test="updateBy != null">update_by = #{updateBy},</if>
  95. <if test="updateTime != null">update_time = #{updateTime},</if>
  96. <if test="delFlag != null">del_flag = #{delFlag},</if>
  97. <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
  98. <if test="processKey != null">process_key = #{processKey},</if>
  99. <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
  100. <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
  101. <if test="teamCode != null">team_code = #{teamCode},</if>
  102. <if test="teamType != null ">team_type=#{teamType}</if>
  103. </trim>
  104. where id = #{id}
  105. </update>
  106. <delete id="deleteTeamInformationById" parameterType="Long">
  107. delete from {DBNAME}.team_information where id = #{id}
  108. </delete>
  109. <delete id="deleteTeamInformationByIds" parameterType="String">
  110. delete from {DBNAME}.team_information where id in
  111. <foreach item="id" collection="array" open="(" separator="," close=")">
  112. #{id}
  113. </foreach>
  114. </delete>
  115. </mapper>