TTaskMemberMapper.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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.goafanti.common.dao.TTaskMemberMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TTaskMember">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="tid" jdbcType="INTEGER" property="tid" />
  7. <result column="service_life" jdbcType="VARCHAR" property="serviceLife" />
  8. <result column="service_year" jdbcType="VARCHAR" property="serviceYear" />
  9. <result column="year_sum" jdbcType="INTEGER" property="yearSum" />
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  11. <result column="contract_term" jdbcType="VARCHAR" property="contractTerm" />
  12. </resultMap>
  13. <sql id="Base_Column_List">
  14. id, tid, service_life, service_year, year_sum, create_time, contract_term
  15. </sql>
  16. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  17. select
  18. <include refid="Base_Column_List" />
  19. from t_task_member
  20. where id = #{id,jdbcType=INTEGER}
  21. </select>
  22. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  23. delete from t_task_member
  24. where id = #{id,jdbcType=INTEGER}
  25. </delete>
  26. <insert id="insert" parameterType="com.goafanti.common.model.TTaskMember">
  27. insert into t_task_member (id, tid, service_life,
  28. service_year, year_sum, create_time,
  29. contract_term)
  30. values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{serviceLife,jdbcType=VARCHAR},
  31. #{serviceYear,jdbcType=VARCHAR}, #{yearSum,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  32. #{contractTerm,jdbcType=VARCHAR})
  33. </insert>
  34. <insert id="insertSelective" parameterType="com.goafanti.common.model.TTaskMember">
  35. insert into t_task_member
  36. <trim prefix="(" suffix=")" suffixOverrides=",">
  37. <if test="id != null">
  38. id,
  39. </if>
  40. <if test="tid != null">
  41. tid,
  42. </if>
  43. <if test="serviceLife != null">
  44. service_life,
  45. </if>
  46. <if test="serviceYear != null">
  47. service_year,
  48. </if>
  49. <if test="yearSum != null">
  50. year_sum,
  51. </if>
  52. <if test="createTime != null">
  53. create_time,
  54. </if>
  55. <if test="contractTerm != null">
  56. contract_term,
  57. </if>
  58. </trim>
  59. <trim prefix="values (" suffix=")" suffixOverrides=",">
  60. <if test="id != null">
  61. #{id,jdbcType=INTEGER},
  62. </if>
  63. <if test="tid != null">
  64. #{tid,jdbcType=INTEGER},
  65. </if>
  66. <if test="serviceLife != null">
  67. #{serviceLife,jdbcType=VARCHAR},
  68. </if>
  69. <if test="serviceYear != null">
  70. #{serviceYear,jdbcType=VARCHAR},
  71. </if>
  72. <if test="yearSum != null">
  73. #{yearSum,jdbcType=INTEGER},
  74. </if>
  75. <if test="createTime != null">
  76. #{createTime,jdbcType=TIMESTAMP},
  77. </if>
  78. <if test="contractTerm != null">
  79. #{contractTerm,jdbcType=VARCHAR},
  80. </if>
  81. </trim>
  82. </insert>
  83. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskMember">
  84. update t_task_member
  85. <set>
  86. <if test="tid != null">
  87. tid = #{tid,jdbcType=INTEGER},
  88. </if>
  89. <if test="serviceLife != null">
  90. service_life = #{serviceLife,jdbcType=VARCHAR},
  91. </if>
  92. <if test="serviceYear != null">
  93. service_year = #{serviceYear,jdbcType=VARCHAR},
  94. </if>
  95. <if test="yearSum != null">
  96. year_sum = #{yearSum,jdbcType=INTEGER},
  97. </if>
  98. <if test="createTime != null">
  99. create_time = #{createTime,jdbcType=TIMESTAMP},
  100. </if>
  101. <if test="contractTerm != null">
  102. contract_term = #{contractTerm,jdbcType=VARCHAR},
  103. </if>
  104. </set>
  105. where id = #{id,jdbcType=INTEGER}
  106. </update>
  107. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TTaskMember">
  108. update t_task_member
  109. set tid = #{tid,jdbcType=INTEGER},
  110. service_life = #{serviceLife,jdbcType=VARCHAR},
  111. service_year = #{serviceYear,jdbcType=VARCHAR},
  112. year_sum = #{yearSum,jdbcType=INTEGER},
  113. create_time = #{createTime,jdbcType=TIMESTAMP},
  114. contract_term = #{contractTerm,jdbcType=VARCHAR}
  115. where id = #{id,jdbcType=INTEGER}
  116. </update>
  117. <update id="updateByTid">
  118. update t_task_member
  119. <set>
  120. <if test="serviceLife != null">
  121. service_life = #{serviceLife,jdbcType=VARCHAR},
  122. </if>
  123. <if test="serviceYear != null">
  124. service_year = #{serviceYear,jdbcType=VARCHAR},
  125. </if>
  126. <if test="yearSum != null">
  127. year_sum = #{yearSum,jdbcType=INTEGER},
  128. </if>
  129. <if test="createTime != null">
  130. create_time = #{createTime,jdbcType=TIMESTAMP},
  131. </if>
  132. </set>
  133. where tid = #{tid,jdbcType=INTEGER}
  134. </update>
  135. </mapper>