KwtLogisticsOrderAddressMapper.xml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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.sckw.transport.dao.KwtLogisticsOrderAddressDao">
  4. <resultMap id="BaseResultMap" type="com.sckw.transport.model.KwtLogisticsOrderAddress">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="order_id" jdbcType="BIGINT" property="orderId" />
  7. <result column="address_type" jdbcType="INTEGER" property="addressType" />
  8. <result column="name" jdbcType="VARCHAR" property="name" />
  9. <result column="type" jdbcType="BIGINT" property="type" />
  10. <result column="contacts" jdbcType="VARCHAR" property="contacts" />
  11. <result column="phone" jdbcType="VARCHAR" property="phone" />
  12. <result column="city_code" jdbcType="INTEGER" property="cityCode" />
  13. <result column="city_name" jdbcType="VARCHAR" property="cityName" />
  14. <result column="detail_address" jdbcType="VARCHAR" property="detailAddress" />
  15. <result column="lat" jdbcType="VARCHAR" property="lat" />
  16. <result column="lng" jdbcType="VARCHAR" property="lng" />
  17. <result column="fence" jdbcType="VARCHAR" property="fence" />
  18. <result column="entry_type" jdbcType="INTEGER" property="entryType" />
  19. <result column="remark" jdbcType="VARCHAR" property="remark" />
  20. <result column="status" jdbcType="INTEGER" property="status" />
  21. <result column="create_by" jdbcType="BIGINT" property="createBy" />
  22. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  23. <result column="update_by" jdbcType="BIGINT" property="updateBy" />
  24. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  25. <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
  26. </resultMap>
  27. <sql id="Base_Column_List">
  28. id, order_id, address_type, `name`, `type`, contacts, phone, city_code, city_name,
  29. detail_address, lat, lng, fence, entry_type, remark, `status`, create_by, create_time,
  30. update_by, update_time, del_flag
  31. </sql>
  32. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  33. select
  34. <include refid="Base_Column_List" />
  35. from kwt_logistics_order_address
  36. where id = #{id,jdbcType=BIGINT}
  37. </select>
  38. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  39. delete from kwt_logistics_order_address
  40. where id = #{id,jdbcType=BIGINT}
  41. </delete>
  42. <insert id="insert" parameterType="com.sckw.transport.model.KwtLogisticsOrderAddress">
  43. insert into kwt_logistics_order_address (id, order_id, address_type,
  44. `name`, `type`, contacts,
  45. phone, city_code, city_name,
  46. detail_address, lat, lng,
  47. fence, entry_type, remark,
  48. `status`, create_by, create_time,
  49. update_by, update_time, del_flag
  50. )
  51. values (#{id,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{addressType,jdbcType=INTEGER},
  52. #{name,jdbcType=VARCHAR}, #{type,jdbcType=BIGINT}, #{contacts,jdbcType=VARCHAR},
  53. #{phone,jdbcType=VARCHAR}, #{cityCode,jdbcType=INTEGER}, #{cityName,jdbcType=VARCHAR},
  54. #{detailAddress,jdbcType=VARCHAR}, #{lat,jdbcType=VARCHAR}, #{lng,jdbcType=VARCHAR},
  55. #{fence,jdbcType=VARCHAR}, #{entryType,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
  56. #{status,jdbcType=INTEGER}, #{createBy,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
  57. #{updateBy,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=INTEGER}
  58. )
  59. </insert>
  60. <insert id="insertSelective" parameterType="com.sckw.transport.model.KwtLogisticsOrderAddress">
  61. insert into kwt_logistics_order_address
  62. <trim prefix="(" suffix=")" suffixOverrides=",">
  63. <if test="id != null">
  64. id,
  65. </if>
  66. <if test="orderId != null">
  67. order_id,
  68. </if>
  69. <if test="addressType != null">
  70. address_type,
  71. </if>
  72. <if test="name != null">
  73. `name`,
  74. </if>
  75. <if test="type != null">
  76. `type`,
  77. </if>
  78. <if test="contacts != null">
  79. contacts,
  80. </if>
  81. <if test="phone != null">
  82. phone,
  83. </if>
  84. <if test="cityCode != null">
  85. city_code,
  86. </if>
  87. <if test="cityName != null">
  88. city_name,
  89. </if>
  90. <if test="detailAddress != null">
  91. detail_address,
  92. </if>
  93. <if test="lat != null">
  94. lat,
  95. </if>
  96. <if test="lng != null">
  97. lng,
  98. </if>
  99. <if test="fence != null">
  100. fence,
  101. </if>
  102. <if test="entryType != null">
  103. entry_type,
  104. </if>
  105. <if test="remark != null">
  106. remark,
  107. </if>
  108. <if test="status != null">
  109. `status`,
  110. </if>
  111. <if test="createBy != null">
  112. create_by,
  113. </if>
  114. <if test="createTime != null">
  115. create_time,
  116. </if>
  117. <if test="updateBy != null">
  118. update_by,
  119. </if>
  120. <if test="updateTime != null">
  121. update_time,
  122. </if>
  123. <if test="delFlag != null">
  124. del_flag,
  125. </if>
  126. </trim>
  127. <trim prefix="values (" suffix=")" suffixOverrides=",">
  128. <if test="id != null">
  129. #{id,jdbcType=BIGINT},
  130. </if>
  131. <if test="orderId != null">
  132. #{orderId,jdbcType=BIGINT},
  133. </if>
  134. <if test="addressType != null">
  135. #{addressType,jdbcType=INTEGER},
  136. </if>
  137. <if test="name != null">
  138. #{name,jdbcType=VARCHAR},
  139. </if>
  140. <if test="type != null">
  141. #{type,jdbcType=BIGINT},
  142. </if>
  143. <if test="contacts != null">
  144. #{contacts,jdbcType=VARCHAR},
  145. </if>
  146. <if test="phone != null">
  147. #{phone,jdbcType=VARCHAR},
  148. </if>
  149. <if test="cityCode != null">
  150. #{cityCode,jdbcType=INTEGER},
  151. </if>
  152. <if test="cityName != null">
  153. #{cityName,jdbcType=VARCHAR},
  154. </if>
  155. <if test="detailAddress != null">
  156. #{detailAddress,jdbcType=VARCHAR},
  157. </if>
  158. <if test="lat != null">
  159. #{lat,jdbcType=VARCHAR},
  160. </if>
  161. <if test="lng != null">
  162. #{lng,jdbcType=VARCHAR},
  163. </if>
  164. <if test="fence != null">
  165. #{fence,jdbcType=VARCHAR},
  166. </if>
  167. <if test="entryType != null">
  168. #{entryType,jdbcType=INTEGER},
  169. </if>
  170. <if test="remark != null">
  171. #{remark,jdbcType=VARCHAR},
  172. </if>
  173. <if test="status != null">
  174. #{status,jdbcType=INTEGER},
  175. </if>
  176. <if test="createBy != null">
  177. #{createBy,jdbcType=BIGINT},
  178. </if>
  179. <if test="createTime != null">
  180. #{createTime,jdbcType=TIMESTAMP},
  181. </if>
  182. <if test="updateBy != null">
  183. #{updateBy,jdbcType=BIGINT},
  184. </if>
  185. <if test="updateTime != null">
  186. #{updateTime,jdbcType=TIMESTAMP},
  187. </if>
  188. <if test="delFlag != null">
  189. #{delFlag,jdbcType=INTEGER},
  190. </if>
  191. </trim>
  192. </insert>
  193. <update id="updateByPrimaryKeySelective" parameterType="com.sckw.transport.model.KwtLogisticsOrderAddress">
  194. update kwt_logistics_order_address
  195. <set>
  196. <if test="orderId != null">
  197. order_id = #{orderId,jdbcType=BIGINT},
  198. </if>
  199. <if test="addressType != null">
  200. address_type = #{addressType,jdbcType=INTEGER},
  201. </if>
  202. <if test="name != null">
  203. `name` = #{name,jdbcType=VARCHAR},
  204. </if>
  205. <if test="type != null">
  206. `type` = #{type,jdbcType=BIGINT},
  207. </if>
  208. <if test="contacts != null">
  209. contacts = #{contacts,jdbcType=VARCHAR},
  210. </if>
  211. <if test="phone != null">
  212. phone = #{phone,jdbcType=VARCHAR},
  213. </if>
  214. <if test="cityCode != null">
  215. city_code = #{cityCode,jdbcType=INTEGER},
  216. </if>
  217. <if test="cityName != null">
  218. city_name = #{cityName,jdbcType=VARCHAR},
  219. </if>
  220. <if test="detailAddress != null">
  221. detail_address = #{detailAddress,jdbcType=VARCHAR},
  222. </if>
  223. <if test="lat != null">
  224. lat = #{lat,jdbcType=VARCHAR},
  225. </if>
  226. <if test="lng != null">
  227. lng = #{lng,jdbcType=VARCHAR},
  228. </if>
  229. <if test="fence != null">
  230. fence = #{fence,jdbcType=VARCHAR},
  231. </if>
  232. <if test="entryType != null">
  233. entry_type = #{entryType,jdbcType=INTEGER},
  234. </if>
  235. <if test="remark != null">
  236. remark = #{remark,jdbcType=VARCHAR},
  237. </if>
  238. <if test="status != null">
  239. `status` = #{status,jdbcType=INTEGER},
  240. </if>
  241. <if test="createBy != null">
  242. create_by = #{createBy,jdbcType=BIGINT},
  243. </if>
  244. <if test="createTime != null">
  245. create_time = #{createTime,jdbcType=TIMESTAMP},
  246. </if>
  247. <if test="updateBy != null">
  248. update_by = #{updateBy,jdbcType=BIGINT},
  249. </if>
  250. <if test="updateTime != null">
  251. update_time = #{updateTime,jdbcType=TIMESTAMP},
  252. </if>
  253. <if test="delFlag != null">
  254. del_flag = #{delFlag,jdbcType=INTEGER},
  255. </if>
  256. </set>
  257. where id = #{id,jdbcType=BIGINT}
  258. </update>
  259. <update id="updateByPrimaryKey" parameterType="com.sckw.transport.model.KwtLogisticsOrderAddress">
  260. update kwt_logistics_order_address
  261. set order_id = #{orderId,jdbcType=BIGINT},
  262. address_type = #{addressType,jdbcType=INTEGER},
  263. `name` = #{name,jdbcType=VARCHAR},
  264. `type` = #{type,jdbcType=BIGINT},
  265. contacts = #{contacts,jdbcType=VARCHAR},
  266. phone = #{phone,jdbcType=VARCHAR},
  267. city_code = #{cityCode,jdbcType=INTEGER},
  268. city_name = #{cityName,jdbcType=VARCHAR},
  269. detail_address = #{detailAddress,jdbcType=VARCHAR},
  270. lat = #{lat,jdbcType=VARCHAR},
  271. lng = #{lng,jdbcType=VARCHAR},
  272. fence = #{fence,jdbcType=VARCHAR},
  273. entry_type = #{entryType,jdbcType=INTEGER},
  274. remark = #{remark,jdbcType=VARCHAR},
  275. `status` = #{status,jdbcType=INTEGER},
  276. create_by = #{createBy,jdbcType=BIGINT},
  277. create_time = #{createTime,jdbcType=TIMESTAMP},
  278. update_by = #{updateBy,jdbcType=BIGINT},
  279. update_time = #{updateTime,jdbcType=TIMESTAMP},
  280. del_flag = #{delFlag,jdbcType=INTEGER}
  281. where id = #{id,jdbcType=BIGINT}
  282. </update>
  283. </mapper>