TechnicianInfo.xml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <!-- namespace必须指向DAO接口 -->
  5. <mapper namespace="com.jpsoft.employment.modules.base.dao.TechnicianInfoDAO">
  6. <resultMap id="TechnicianInfoMap" type="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
  7. <id property="id" column="id_" />
  8. <result property="userName" column="user_name" />
  9. <result property="password" column="password_" />
  10. <result property="openId" column="open_id" />
  11. <result property="phone" column="phone_" />
  12. <result property="idCard" column="id_card" />
  13. <result property="realName" column="real_name" />
  14. <result property="region" column="region_" />
  15. <result property="image" column="image_" />
  16. <result property="gender" column="gender_" />
  17. <result property="introduction" column="introduction_" />
  18. <result property="serviceInfo" column="service_info" />
  19. <result property="businessScope" column="business_scope" />
  20. <result property="idCardImage" column="id_card_image" />
  21. <result property="isVerified" column="is_verified" />
  22. <result property="promoCode" column="promo_code" />
  23. <result property="createTime" column="create_time" />
  24. <result property="updateTime" column="update_time" />
  25. <result property="delFlag" column="del_flag" />
  26. <result property="createBy" column="create_by" />
  27. <result property="updateBy" column="update_by" />
  28. <result property="status" column="status_" />
  29. <result property="level" column="level_" />
  30. <result property="deposit" column="deposit_" />
  31. <result property="qualification" column="qualification_" />
  32. <result property="receiveName" column="receive_name" />
  33. <result property="receiveBank" column="receive_bank" />
  34. <result property="receiveAccount" column="receive_account" />
  35. <result property="receiptName" column="receipt_name" />
  36. <result property="receiptPhone" column="receipt_phone" />
  37. <result property="receiptRegion" column="receipt_region" />
  38. <result property="receiptAddress" column="receipt_address" />
  39. </resultMap>
  40. <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
  41. <!--
  42. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  43. select sys_guid() from dual
  44. </selectKey>
  45. -->
  46. <![CDATA[
  47. insert into base_technician_info
  48. (id_,user_name,password_,open_id,phone_,id_card,real_name,region_,image_,gender_,introduction_,service_info,business_scope,id_card_image,is_verified,promo_code,create_time,update_time,del_flag,create_by,update_by,status_,level_,deposit_,qualification_,receive_name,receive_bank,receive_account,receipt_name,receipt_phone,receipt_region,receipt_address)
  49. values
  50. (
  51. #{id,jdbcType=VARCHAR}
  52. ,#{userName,jdbcType=VARCHAR}
  53. ,#{password,jdbcType=VARCHAR}
  54. ,#{openId,jdbcType=VARCHAR}
  55. ,#{phone,jdbcType=VARCHAR}
  56. ,#{idCard,jdbcType=VARCHAR}
  57. ,#{realName,jdbcType=VARCHAR}
  58. ,#{region,jdbcType=VARCHAR}
  59. ,#{image,jdbcType=VARCHAR}
  60. ,#{gender,jdbcType=VARCHAR}
  61. ,#{introduction,jdbcType=VARCHAR}
  62. ,#{serviceInfo,jdbcType=VARCHAR}
  63. ,#{businessScope,jdbcType=VARCHAR}
  64. ,#{idCardImage,jdbcType=VARCHAR}
  65. ,#{isVerified,jdbcType= NUMERIC }
  66. ,#{promoCode,jdbcType=VARCHAR}
  67. ,#{createTime,jdbcType= TIMESTAMP }
  68. ,#{updateTime,jdbcType= TIMESTAMP }
  69. ,#{delFlag,jdbcType= NUMERIC }
  70. ,#{createBy,jdbcType=VARCHAR}
  71. ,#{updateBy,jdbcType=VARCHAR}
  72. ,#{status,jdbcType=VARCHAR}
  73. ,#{level,jdbcType= NUMERIC }
  74. ,#{deposit,jdbcType= NUMERIC }
  75. ,#{qualification,jdbcType= VARCHAR }
  76. ,#{receiveName,jdbcType= VARCHAR }
  77. ,#{receiveBank,jdbcType= VARCHAR }
  78. ,#{receiveAccount,jdbcType= VARCHAR }
  79. ,#{receiptName,jdbcType= VARCHAR }
  80. ,#{receiptPhone,jdbcType= VARCHAR }
  81. ,#{receiptRegion,jdbcType= VARCHAR }
  82. ,#{receiptAddress,jdbcType= VARCHAR }
  83. )
  84. ]]>
  85. </insert>
  86. <delete id="delete" parameterType="string">
  87. delete from base_technician_info where id_=#{id,jdbcType=VARCHAR}
  88. </delete>
  89. <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
  90. update base_technician_info
  91. <set>
  92. <if test="userName!=null">
  93. user_name=#{userName,jdbcType=VARCHAR},
  94. </if>
  95. <if test="password!=null">
  96. password_=#{password,jdbcType=VARCHAR},
  97. </if>
  98. <if test="openId!=null">
  99. open_id=#{openId,jdbcType=VARCHAR},
  100. </if>
  101. <if test="phone!=null">
  102. phone_=#{phone,jdbcType=VARCHAR},
  103. </if>
  104. <if test="idCard!=null">
  105. id_card=#{idCard,jdbcType=VARCHAR},
  106. </if>
  107. <if test="realName!=null">
  108. real_name=#{realName,jdbcType=VARCHAR},
  109. </if>
  110. <if test="region!=null">
  111. region_=#{region,jdbcType=VARCHAR},
  112. </if>
  113. <if test="image!=null">
  114. image_=#{image,jdbcType=VARCHAR},
  115. </if>
  116. <if test="gender!=null">
  117. gender_=#{gender,jdbcType=VARCHAR},
  118. </if>
  119. <if test="introduction!=null">
  120. introduction_=#{introduction,jdbcType=VARCHAR},
  121. </if>
  122. <if test="serviceInfo!=null">
  123. service_info=#{serviceInfo,jdbcType=VARCHAR},
  124. </if>
  125. <if test="businessScope!=null">
  126. business_scope=#{businessScope,jdbcType=VARCHAR},
  127. </if>
  128. <if test="idCardImage!=null">
  129. id_card_image=#{idCardImage,jdbcType=VARCHAR},
  130. </if>
  131. <if test="isVerified!=null">
  132. is_verified=#{isVerified,jdbcType= NUMERIC },
  133. </if>
  134. <if test="promoCode!=null">
  135. promo_code=#{promoCode,jdbcType=VARCHAR},
  136. </if>
  137. <if test="createTime!=null">
  138. create_time=#{createTime,jdbcType= TIMESTAMP },
  139. </if>
  140. <if test="updateTime!=null">
  141. update_time=#{updateTime,jdbcType= TIMESTAMP },
  142. </if>
  143. <if test="delFlag!=null">
  144. del_flag=#{delFlag,jdbcType= NUMERIC },
  145. </if>
  146. <if test="createBy!=null">
  147. create_by=#{createBy,jdbcType=VARCHAR},
  148. </if>
  149. <if test="updateBy!=null">
  150. update_by=#{updateBy,jdbcType=VARCHAR},
  151. </if>
  152. <if test="level!=null">
  153. level_=#{level,jdbcType= NUMERIC },
  154. </if>
  155. <if test="deposit!=null">
  156. deposit_=#{deposit,jdbcType= NUMERIC },
  157. </if>
  158. <if test="qualification!=null">
  159. qualification_=#{qualification,jdbcType=VARCHAR},
  160. </if>
  161. <if test="receiveName!=null">
  162. receive_name=#{receiveName,jdbcType=VARCHAR},
  163. </if>
  164. <if test="receiveBank!=null">
  165. receive_bank=#{receiveBank,jdbcType=VARCHAR},
  166. </if>
  167. <if test="receiveAccount!=null">
  168. receive_account=#{receiveAccount,jdbcType=VARCHAR},
  169. </if>
  170. <if test="receiptName!=null">
  171. receipt_name=#{receiptName,jdbcType=VARCHAR},
  172. </if>
  173. <if test="receiptPhone!=null">
  174. receipt_phone=#{receiptPhone,jdbcType=VARCHAR},
  175. </if>
  176. <if test="receiptRegion!=null">
  177. receipt_region=#{receiptRegion,jdbcType=VARCHAR},
  178. </if>
  179. <if test="receiptAddress!=null">
  180. receipt_address=#{receiptAddress,jdbcType=VARCHAR},
  181. </if>
  182. </set>
  183. where id_=#{id}
  184. </update>
  185. <select id="get" parameterType="string" resultMap="TechnicianInfoMap">
  186. select * from base_technician_info where id_=#{0}
  187. </select>
  188. <select id="exist" parameterType="string" resultType="int">
  189. select count(*) from base_technician_info where id_=#{0}
  190. </select>
  191. <select id="list" resultMap="TechnicianInfoMap">
  192. select * from base_technician_info
  193. </select>
  194. <select id="search" parameterType="hashmap" resultMap="TechnicianInfoMap">
  195. <![CDATA[
  196. select * from base_technician_info
  197. ]]>
  198. <where>
  199. <if test="searchParams.status != null">
  200. and status_ = #{searchParams.status}
  201. </if>
  202. <if test="searchParams.id != null">
  203. and real_name like #{searchParams.id}
  204. </if>
  205. </where>
  206. <foreach item="sort" collection="sortList" open="order by" separator=",">
  207. ${sort.name} ${sort.order}
  208. </foreach>
  209. </select>
  210. <select id="searchMobile" parameterType="hashmap" resultMap="TechnicianInfoMap">
  211. <![CDATA[
  212. select * from base_technician_info
  213. ]]>
  214. <where>
  215. del_flag = false
  216. <if test="searchParams.id != null">
  217. and ID_ like #{searchParams.id}
  218. </if>
  219. <if test="searchParams.name != null">
  220. and ID_ like #{searchParams.name}
  221. </if>
  222. </where>
  223. <foreach item="sort" collection="sortList" open="order by" separator=",">
  224. ${sort.name} ${sort.order}
  225. </foreach>
  226. </select>
  227. <select id="findByPhone" parameterType="string" resultMap="TechnicianInfoMap">
  228. select * from base_technician_info
  229. where del_flag = 0
  230. and phone_ = #{0}
  231. limit 1
  232. </select>
  233. <select id="findByOpenid" parameterType="string" resultMap="TechnicianInfoMap">
  234. select * from base_technician_info
  235. where del_flag = 0
  236. and open_id = #{0}
  237. limit 1
  238. </select>
  239. </mapper>