MsgCcMapper.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.zhyc.xps.common.mapper.MsgCcMapper">
  4. <!--新增Create-->
  5. <insert id="create" parameterType="com.zhyc.xps.common.entity.MsgCc">
  6. INSERT INTO msg_cc
  7. <trim prefix="(" suffix=")" suffixOverrides=",">
  8. <if test="ocId != null">
  9. oc_id,
  10. </if>
  11. <if test="msgId != null">
  12. msg_id,
  13. </if>
  14. <if test="msgCcId != null">
  15. msg_cc_id,
  16. </if>
  17. <if test="createdBy != null">
  18. created_by,
  19. </if>
  20. <if test="createdAt != null">
  21. created_at,
  22. </if>
  23. </trim>
  24. <trim prefix="values (" suffix=")" suffixOverrides=",">
  25. <if test="ocId != null">
  26. #{ocId ,jdbcType=BIGINT},
  27. </if>
  28. <if test="msgId != null">
  29. #{msgId ,jdbcType=BIGINT},
  30. </if>
  31. <if test="msgCcId != null">
  32. #{msgCcId ,jdbcType=BIGINT},
  33. </if>
  34. <if test="createdBy != null">
  35. #{createdBy ,jdbcType=BIGINT},
  36. </if>
  37. <if test="createdAt != null">
  38. #{createdAt ,jdbcType=TIMESTAMP},
  39. </if>
  40. </trim>
  41. </insert>
  42. <!--更新Update-->
  43. <update id="update" parameterType="java.util.Map">
  44. UPDATE msg_cc
  45. <trim suffixOverrides=",">
  46. <set>
  47. <if test="status != null">
  48. status = #{status ,jdbcType=BIGINT},
  49. </if>
  50. <if test="updatedBy != null ">
  51. updated_by = #{updatedBy ,jdbcType=BIGINT},
  52. </if>
  53. <if test="updatedAt != null">
  54. updated_at = #{updatedAt ,jdbcType=TIMESTAMP},
  55. </if>
  56. </set>
  57. </trim>
  58. WHERE 1 = 1
  59. <if test="ocId != null">
  60. AND oc_id = #{ocId ,jdbcType=BIGINT}
  61. </if>
  62. <if test="msgId != null">
  63. AND msg_id = #{msgId ,jdbcType=BIGINT}
  64. </if>
  65. <if test="msgCcId != null">
  66. AND msg_cc_id = #{msgCcId ,jdbcType=BIGINT}
  67. </if>
  68. </update>
  69. <!--删除Delete-->
  70. <update id="delete" parameterType="java.util.Map">
  71. UPDATE msg_cc
  72. <trim suffixOverrides=",">
  73. <set>
  74. <if test="deletedFlag != null">
  75. deleted_flag = #{deletedFlag,jdbcType=BIGINT},
  76. </if>
  77. <if test="deletedTime != null">
  78. deleted_time = #{deletedTime,jdbcType=VARCHAR},
  79. </if>
  80. <if test="deletedBy != null">
  81. deleted_by = #{deletedBy,jdbcType=BIGINT},
  82. </if>
  83. </set>
  84. </trim>
  85. WHERE 1 =1
  86. <if test="ocId != null">
  87. AND oc_id = #{ocId ,jdbcType=BIGINT}
  88. </if>
  89. <if test="msgId != null">
  90. AND msg_id = #{ocId ,jdbcType=BIGINT}
  91. </if>
  92. </update>
  93. </mapper>