AskaRetailsMapper.xml 8.9 KB

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