QwSopLogsDetalisMapper.xml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.fs.sop.mapper.QwSopLogsDetalisMapper">
  6. <resultMap type="QwSopLogsDetalis" id="QwSopLogsDetalisResult">
  7. <result property="id" column="id" />
  8. <result property="type" column="type" />
  9. <result property="externalUserId" column="external_user_id" />
  10. <result property="qwUserId" column="qw_user_id" />
  11. <result property="corpId" column="corp_id" />
  12. <result property="sendList" column="send_list" />
  13. <result property="nextExternalUserId" column="next_external_user_id" />
  14. </resultMap>
  15. <sql id="selectQwSopLogsDetalisVo">
  16. select id, type, external_user_id, qw_user_id, corp_id, send_list, next_external_user_id from qw_sop_logs_detalis
  17. </sql>
  18. <select id="selectQwSopLogsDetalisList" parameterType="QwSopLogsDetalis" resultMap="QwSopLogsDetalisResult">
  19. <include refid="selectQwSopLogsDetalisVo"/>
  20. <where>
  21. <if test="type != null and type != ''"> and type = #{type}</if>
  22. <if test="externalUserId != null and externalUserId != ''"> and external_user_id = #{externalUserId}</if>
  23. <if test="qwUserId != null and qwUserId != ''"> and qw_user_id = #{qwUserId}</if>
  24. <if test="corpId != null and corpId != ''"> and corp_id = #{corpId}</if>
  25. <if test="sendList != null and sendList != ''"> and send_list = #{sendList}</if>
  26. <if test="nextExternalUserId != null and nextExternalUserId != ''"> and next_external_user_id = #{nextExternalUserId}</if>
  27. </where>
  28. </select>
  29. <select id="selectQwSopLogsDetalisById" parameterType="Long" resultMap="QwSopLogsDetalisResult">
  30. <include refid="selectQwSopLogsDetalisVo"/>
  31. where id = #{id}
  32. </select>
  33. <insert id="insertQwSopLogsDetalis" parameterType="QwSopLogsDetalis">
  34. insert into qw_sop_logs_detalis
  35. <trim prefix="(" suffix=")" suffixOverrides=",">
  36. <if test="id != null">id,</if>
  37. <if test="type != null">type,</if>
  38. <if test="externalUserId != null">external_user_id,</if>
  39. <if test="qwUserId != null">qw_user_id,</if>
  40. <if test="corpId != null">corp_id,</if>
  41. <if test="sendList != null">send_list,</if>
  42. <if test="nextExternalUserId != null">next_external_user_id,</if>
  43. </trim>
  44. <trim prefix="values (" suffix=")" suffixOverrides=",">
  45. <if test="id != null">#{id},</if>
  46. <if test="type != null">#{type},</if>
  47. <if test="externalUserId != null">#{externalUserId},</if>
  48. <if test="qwUserId != null">#{qwUserId},</if>
  49. <if test="corpId != null">#{corpId},</if>
  50. <if test="sendList != null">#{sendList},</if>
  51. <if test="nextExternalUserId != null">#{nextExternalUserId},</if>
  52. </trim>
  53. </insert>
  54. <update id="updateQwSopLogsDetalis" parameterType="QwSopLogsDetalis">
  55. update qw_sop_logs_detalis
  56. <trim prefix="SET" suffixOverrides=",">
  57. <if test="type != null">type = #{type},</if>
  58. <if test="externalUserId != null">external_user_id = #{externalUserId},</if>
  59. <if test="qwUserId != null">qw_user_id = #{qwUserId},</if>
  60. <if test="corpId != null">corp_id = #{corpId},</if>
  61. <if test="sendList != null">send_list = #{sendList},</if>
  62. <if test="nextExternalUserId != null">next_external_user_id = #{nextExternalUserId},</if>
  63. </trim>
  64. where id = #{id}
  65. </update>
  66. <delete id="deleteQwSopLogsDetalisById" parameterType="Long">
  67. delete from qw_sop_logs_detalis where id = #{id}
  68. </delete>
  69. <delete id="deleteQwSopLogsDetalisByIds" parameterType="String">
  70. delete from qw_sop_logs_detalis where id in
  71. <foreach item="id" collection="array" open="(" separator="," close=")">
  72. #{id}
  73. </foreach>
  74. </delete>
  75. </mapper>