QwApiSopLogTokenMapper.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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.qw.mapper.QwApiSopLogTokenMapper">
  6. <resultMap type="QwApiSopLogToken" id="QwApiSopLogTokenResult">
  7. <result property="id" column="id" />
  8. <result property="qwUserId" column="qw_user_id" />
  9. <result property="companyId" column="company_id" />
  10. <result property="sendTime" column="send_time" />
  11. <result property="sendCount" column="send_count" />
  12. <result property="sendCountToken" column="send_count_token" />
  13. </resultMap>
  14. <sql id="selectQwApiSopLogTokenVo">
  15. select id, qw_user_id, company_id, send_time, send_count, send_count_token from qw_api_sop_log_token
  16. </sql>
  17. <select id="selectQwApiSopLogTokenList" parameterType="QwApiSopLogToken" resultMap="QwApiSopLogTokenResult">
  18. <include refid="selectQwApiSopLogTokenVo"/>
  19. <where>
  20. <if test="qwUserId != null and qwUserId != ''"> and qw_user_id = #{qwUserId}</if>
  21. <if test="companyId != null "> and company_id = #{companyId}</if>
  22. <if test="sendTime != null "> and send_time = #{sendTime}</if>
  23. <if test="sendCount != null "> and send_count = #{sendCount}</if>
  24. <if test="sendCountToken != null "> and send_count_token = #{sendCountToken}</if>
  25. </where>
  26. </select>
  27. <select id="selectQwApiSopLogTokenById" parameterType="Long" resultMap="QwApiSopLogTokenResult">
  28. <include refid="selectQwApiSopLogTokenVo"/>
  29. where id = #{id}
  30. </select>
  31. <insert id="insertQwApiSopLogToken" parameterType="QwApiSopLogToken">
  32. insert into qw_api_sop_log_token
  33. <trim prefix="(" suffix=")" suffixOverrides=",">
  34. <if test="id != null">id,</if>
  35. <if test="qwUserId != null">qw_user_id,</if>
  36. <if test="companyId != null">company_id,</if>
  37. <if test="sendTime != null">send_time,</if>
  38. <if test="sendCount != null">send_count,</if>
  39. <if test="sendCountToken != null">send_count_token,</if>
  40. </trim>
  41. <trim prefix="values (" suffix=")" suffixOverrides=",">
  42. <if test="id != null">#{id},</if>
  43. <if test="qwUserId != null">#{qwUserId},</if>
  44. <if test="companyId != null">#{companyId},</if>
  45. <if test="sendTime != null">#{sendTime},</if>
  46. <if test="sendCount != null">#{sendCount},</if>
  47. <if test="sendCountToken != null">#{sendCountToken},</if>
  48. </trim>
  49. </insert>
  50. <update id="updateQwApiSopLogToken" parameterType="QwApiSopLogToken">
  51. update qw_api_sop_log_token
  52. <trim prefix="SET" suffixOverrides=",">
  53. <if test="qwUserId != null">qw_user_id = #{qwUserId},</if>
  54. <if test="companyId != null">company_id = #{companyId},</if>
  55. <if test="sendTime != null">send_time = #{sendTime},</if>
  56. <if test="sendCount != null">send_count = #{sendCount},</if>
  57. <if test="sendCountToken != null">send_count_token = #{sendCountToken},</if>
  58. </trim>
  59. where id = #{id}
  60. </update>
  61. <delete id="deleteQwApiSopLogTokenById" parameterType="Long">
  62. delete from qw_api_sop_log_token where id = #{id}
  63. </delete>
  64. <delete id="deleteQwApiSopLogTokenByIds" parameterType="String">
  65. delete from qw_api_sop_log_token where id in
  66. <foreach item="id" collection="array" open="(" separator="," close=")">
  67. #{id}
  68. </foreach>
  69. </delete>
  70. </mapper>