AskaChannelsMapper.xml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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.mofangchuxing.aska.dao.mapper.AskaChannelsMapper">
  6. <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.AskaChannels">
  7. <id property="id" column="id" jdbcType="INTEGER"/>
  8. <result property="name" column="name" jdbcType="CHAR"/>
  9. <result property="prefix" column="prefix" jdbcType="CHAR"/>
  10. <result property="ownerId" column="ownerId" jdbcType="INTEGER"/>
  11. <result property="phone" column="phone" jdbcType="CHAR"/>
  12. <result property="note" column="note" jdbcType="VARCHAR"/>
  13. <result property="account" column="account" jdbcType="VARCHAR"/>
  14. <result property="accountname" column="accountName" jdbcType="VARCHAR"/>
  15. <result property="apiv3" column="apiv3" jdbcType="VARCHAR"/>
  16. <result property="certpath" column="certPath" jdbcType="VARCHAR"/>
  17. <result property="tripartite" column="tripartite" jdbcType="CHAR"/>
  18. <result property="tripvalue" column="tripvalue" jdbcType="INTEGER"/>
  19. <result property="realtimesplit" column="realtimeSplit" jdbcType="INTEGER"/>
  20. <result property="status" column="status" jdbcType="CHAR"/>
  21. </resultMap>
  22. <sql id="Base_Column_List">
  23. id,name,prefix,
  24. ownerId,phone,note,
  25. account,accountName,apiv3,
  26. certPath,tripartite,tripvalue,
  27. realtimeSplit,status
  28. </sql>
  29. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  30. select
  31. <include refid="Base_Column_List" />
  32. from aska_channels
  33. where id = #{id,jdbcType=INTEGER}
  34. </select>
  35. <select id="getAllChannels" resultMap="BaseResultMap">
  36. select
  37. <include refid="Base_Column_List" />
  38. from aska_channels
  39. where 1=1 <if test="channelName != null">
  40. and name = #{channelName,jdbcType=CHAR},
  41. </if>
  42. </select>
  43. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  44. delete from aska_channels
  45. where id = #{id,jdbcType=INTEGER}
  46. </delete>
  47. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels" useGeneratedKeys="true">
  48. insert into aska_channels
  49. ( id,name,prefix
  50. ,ownerId,phone,note
  51. ,account,accountName,apiv3
  52. ,certPath,tripartite,tripvalue
  53. ,realtimeSplit,status)
  54. values (#{id,jdbcType=INTEGER},#{name,jdbcType=CHAR},#{prefix,jdbcType=CHAR}
  55. ,#{ownerid,jdbcType=INTEGER},#{phone,jdbcType=CHAR},#{note,jdbcType=VARCHAR}
  56. ,#{account,jdbcType=VARCHAR},#{accountname,jdbcType=VARCHAR},#{apiv3,jdbcType=VARCHAR}
  57. ,#{certpath,jdbcType=VARCHAR},#{tripartite,jdbcType=CHAR},#{tripvalue,jdbcType=INTEGER}
  58. ,#{realtimesplit,jdbcType=INTEGER},#{status,jdbcType=CHAR})
  59. </insert>
  60. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels" useGeneratedKeys="true">
  61. insert into aska_channels
  62. <trim prefix="(" suffix=")" suffixOverrides=",">
  63. <if test="id != null">id,</if>
  64. <if test="name != null">name,</if>
  65. <if test="prefix != null">prefix,</if>
  66. <if test="ownerid != null">ownerId,</if>
  67. <if test="phone != null">phone,</if>
  68. <if test="note != null">note,</if>
  69. <if test="account != null">account,</if>
  70. <if test="accountname != null">accountName,</if>
  71. <if test="apiv3 != null">apiv3,</if>
  72. <if test="certpath != null">certPath,</if>
  73. <if test="tripartite != null">tripartite,</if>
  74. <if test="tripvalue != null">tripvalue,</if>
  75. <if test="realtimesplit != null">realtimeSplit,</if>
  76. <if test="status != null">status,</if>
  77. </trim>
  78. <trim prefix="values (" suffix=")" suffixOverrides=",">
  79. <if test="id != null">#{id,jdbcType=INTEGER},</if>
  80. <if test="name != null">#{name,jdbcType=CHAR},</if>
  81. <if test="prefix != null">#{prefix,jdbcType=CHAR},</if>
  82. <if test="ownerid != null">#{ownerid,jdbcType=INTEGER},</if>
  83. <if test="phone != null">#{phone,jdbcType=CHAR},</if>
  84. <if test="note != null">#{note,jdbcType=VARCHAR},</if>
  85. <if test="account != null">#{account,jdbcType=VARCHAR},</if>
  86. <if test="accountname != null">#{accountname,jdbcType=VARCHAR},</if>
  87. <if test="apiv3 != null">#{apiv3,jdbcType=VARCHAR},</if>
  88. <if test="certpath != null">#{certpath,jdbcType=VARCHAR},</if>
  89. <if test="tripartite != null">#{tripartite,jdbcType=CHAR},</if>
  90. <if test="tripvalue != null">#{tripvalue,jdbcType=INTEGER},</if>
  91. <if test="realtimesplit != null">#{realtimesplit,jdbcType=INTEGER},</if>
  92. <if test="status != null">#{status,jdbcType=CHAR},</if>
  93. </trim>
  94. </insert>
  95. <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels">
  96. update aska_channels
  97. <set>
  98. <if test="name != null">
  99. name = #{name,jdbcType=CHAR},
  100. </if>
  101. <if test="prefix != null">
  102. prefix = #{prefix,jdbcType=CHAR},
  103. </if>
  104. <if test="ownerid != null">
  105. ownerId = #{ownerid,jdbcType=INTEGER},
  106. </if>
  107. <if test="phone != null">
  108. phone = #{phone,jdbcType=CHAR},
  109. </if>
  110. <if test="note != null">
  111. note = #{note,jdbcType=VARCHAR},
  112. </if>
  113. <if test="account != null">
  114. account = #{account,jdbcType=VARCHAR},
  115. </if>
  116. <if test="accountname != null">
  117. accountName = #{accountname,jdbcType=VARCHAR},
  118. </if>
  119. <if test="apiv3 != null">
  120. apiv3 = #{apiv3,jdbcType=VARCHAR},
  121. </if>
  122. <if test="certpath != null">
  123. certPath = #{certpath,jdbcType=VARCHAR},
  124. </if>
  125. <if test="tripartite != null">
  126. tripartite = #{tripartite,jdbcType=CHAR},
  127. </if>
  128. <if test="tripvalue != null">
  129. tripvalue = #{tripvalue,jdbcType=INTEGER},
  130. </if>
  131. <if test="realtimesplit != null">
  132. realtimeSplit = #{realtimesplit,jdbcType=INTEGER},
  133. </if>
  134. <if test="status != null">
  135. status = #{status,jdbcType=CHAR},
  136. </if>
  137. </set>
  138. where id = #{id,jdbcType=INTEGER}
  139. </update>
  140. <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels">
  141. update aska_channels
  142. set
  143. name = #{name,jdbcType=CHAR},
  144. prefix = #{prefix,jdbcType=CHAR},
  145. ownerId = #{ownerid,jdbcType=INTEGER},
  146. phone = #{phone,jdbcType=CHAR},
  147. note = #{note,jdbcType=VARCHAR},
  148. account = #{account,jdbcType=VARCHAR},
  149. accountName = #{accountname,jdbcType=VARCHAR},
  150. apiv3 = #{apiv3,jdbcType=VARCHAR},
  151. certPath = #{certpath,jdbcType=VARCHAR},
  152. tripartite = #{tripartite,jdbcType=CHAR},
  153. tripvalue = #{tripvalue,jdbcType=INTEGER},
  154. realtimeSplit = #{realtimesplit,jdbcType=INTEGER},
  155. status = #{status,jdbcType=CHAR}
  156. where id = #{id,jdbcType=INTEGER}
  157. </update>
  158. </mapper>