TechnicianInfo.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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. <result property="promoter" column="promoter_" />
  40. <result property="issue" column="issue_" />
  41. </resultMap>
  42. <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
  43. <!--
  44. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  45. select sys_guid() from dual
  46. </selectKey>
  47. -->
  48. <![CDATA[
  49. insert into base_technician_info
  50. (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,promoter_,issue_)
  51. values
  52. (
  53. #{id,jdbcType=VARCHAR}
  54. ,#{userName,jdbcType=VARCHAR}
  55. ,#{password,jdbcType=VARCHAR}
  56. ,#{openId,jdbcType=VARCHAR}
  57. ,#{phone,jdbcType=VARCHAR}
  58. ,#{idCard,jdbcType=VARCHAR}
  59. ,#{realName,jdbcType=VARCHAR}
  60. ,#{region,jdbcType=VARCHAR}
  61. ,#{image,jdbcType=VARCHAR}
  62. ,#{gender,jdbcType=VARCHAR}
  63. ,#{introduction,jdbcType=VARCHAR}
  64. ,#{serviceInfo,jdbcType=VARCHAR}
  65. ,#{businessScope,jdbcType=VARCHAR}
  66. ,#{idCardImage,jdbcType=VARCHAR}
  67. ,#{isVerified,jdbcType= NUMERIC }
  68. ,#{promoCode,jdbcType=VARCHAR}
  69. ,#{createTime,jdbcType= TIMESTAMP }
  70. ,#{updateTime,jdbcType= TIMESTAMP }
  71. ,#{delFlag,jdbcType= NUMERIC }
  72. ,#{createBy,jdbcType=VARCHAR}
  73. ,#{updateBy,jdbcType=VARCHAR}
  74. ,#{status,jdbcType=VARCHAR}
  75. ,#{level,jdbcType= NUMERIC }
  76. ,#{deposit,jdbcType= NUMERIC }
  77. ,#{qualification,jdbcType= VARCHAR }
  78. ,#{receiveName,jdbcType= VARCHAR }
  79. ,#{receiveBank,jdbcType= VARCHAR }
  80. ,#{receiveAccount,jdbcType= VARCHAR }
  81. ,#{receiptName,jdbcType= VARCHAR }
  82. ,#{receiptPhone,jdbcType= VARCHAR }
  83. ,#{receiptRegion,jdbcType= VARCHAR }
  84. ,#{receiptAddress,jdbcType= VARCHAR }
  85. ,#{promoter,jdbcType= VARCHAR }
  86. ,#{issue,jdbcType= NUMERIC }
  87. )
  88. ]]>
  89. </insert>
  90. <delete id="delete" parameterType="string">
  91. delete from base_technician_info where id_=#{id,jdbcType=VARCHAR}
  92. </delete>
  93. <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
  94. update base_technician_info
  95. <set>
  96. <if test="userName!=null">
  97. user_name=#{userName,jdbcType=VARCHAR},
  98. </if>
  99. <if test="password!=null">
  100. password_=#{password,jdbcType=VARCHAR},
  101. </if>
  102. <if test="openId!=null">
  103. open_id=#{openId,jdbcType=VARCHAR},
  104. </if>
  105. <if test="phone!=null">
  106. phone_=#{phone,jdbcType=VARCHAR},
  107. </if>
  108. <if test="idCard!=null">
  109. id_card=#{idCard,jdbcType=VARCHAR},
  110. </if>
  111. <if test="realName!=null">
  112. real_name=#{realName,jdbcType=VARCHAR},
  113. </if>
  114. <if test="region!=null">
  115. region_=#{region,jdbcType=VARCHAR},
  116. </if>
  117. <if test="image!=null">
  118. image_=#{image,jdbcType=VARCHAR},
  119. </if>
  120. <if test="gender!=null">
  121. gender_=#{gender,jdbcType=VARCHAR},
  122. </if>
  123. <if test="introduction!=null">
  124. introduction_=#{introduction,jdbcType=VARCHAR},
  125. </if>
  126. <if test="serviceInfo!=null">
  127. service_info=#{serviceInfo,jdbcType=VARCHAR},
  128. </if>
  129. <if test="businessScope!=null">
  130. business_scope=#{businessScope,jdbcType=VARCHAR},
  131. </if>
  132. <if test="idCardImage!=null">
  133. id_card_image=#{idCardImage,jdbcType=VARCHAR},
  134. </if>
  135. <if test="isVerified!=null">
  136. is_verified=#{isVerified,jdbcType= NUMERIC },
  137. </if>
  138. <if test="promoCode!=null">
  139. promo_code=#{promoCode,jdbcType=VARCHAR},
  140. </if>
  141. <if test="createTime!=null">
  142. create_time=#{createTime,jdbcType= TIMESTAMP },
  143. </if>
  144. <if test="updateTime!=null">
  145. update_time=#{updateTime,jdbcType= TIMESTAMP },
  146. </if>
  147. <if test="delFlag!=null">
  148. del_flag=#{delFlag,jdbcType= NUMERIC },
  149. </if>
  150. <if test="createBy!=null">
  151. create_by=#{createBy,jdbcType=VARCHAR},
  152. </if>
  153. <if test="updateBy!=null">
  154. update_by=#{updateBy,jdbcType=VARCHAR},
  155. </if>
  156. <if test="level!=null">
  157. level_=#{level,jdbcType= NUMERIC },
  158. </if>
  159. <if test="deposit!=null">
  160. deposit_=#{deposit,jdbcType= NUMERIC },
  161. </if>
  162. <if test="qualification!=null">
  163. qualification_=#{qualification,jdbcType=VARCHAR},
  164. </if>
  165. <if test="receiveName!=null">
  166. receive_name=#{receiveName,jdbcType=VARCHAR},
  167. </if>
  168. <if test="receiveBank!=null">
  169. receive_bank=#{receiveBank,jdbcType=VARCHAR},
  170. </if>
  171. <if test="receiveAccount!=null">
  172. receive_account=#{receiveAccount,jdbcType=VARCHAR},
  173. </if>
  174. <if test="receiptName!=null">
  175. receipt_name=#{receiptName,jdbcType=VARCHAR},
  176. </if>
  177. <if test="receiptPhone!=null">
  178. receipt_phone=#{receiptPhone,jdbcType=VARCHAR},
  179. </if>
  180. <if test="receiptRegion!=null">
  181. receipt_region=#{receiptRegion,jdbcType=VARCHAR},
  182. </if>
  183. <if test="receiptAddress!=null">
  184. receipt_address=#{receiptAddress,jdbcType=VARCHAR},
  185. </if>
  186. <if test="promoter!=null">
  187. promoter_=#{promoter,jdbcType=VARCHAR},
  188. </if>
  189. <if test="issue!=null">
  190. issue_=#{issue,jdbcType=NUMERIC},
  191. </if>
  192. </set>
  193. where id_=#{id}
  194. </update>
  195. <select id="get" parameterType="string" resultMap="TechnicianInfoMap">
  196. select * from base_technician_info where id_=#{0}
  197. </select>
  198. <select id="exist" parameterType="string" resultType="int">
  199. select count(*) from base_technician_info where id_=#{0}
  200. </select>
  201. <select id="list" resultMap="TechnicianInfoMap">
  202. select * from base_technician_info
  203. </select>
  204. <select id="search" parameterType="hashmap" resultMap="TechnicianInfoMap">
  205. <![CDATA[
  206. select * from base_technician_info
  207. ]]>
  208. <where>
  209. <if test="searchParams.status != null">
  210. and status_ = #{searchParams.status}
  211. </if>
  212. <if test="searchParams.id != null">
  213. and real_name like #{searchParams.id}
  214. </if>
  215. <if test="searchParams.promoter != null">
  216. and promoter_ = #{searchParams.promoter}
  217. </if>
  218. <if test="searchParams.issue != null">
  219. and issue_ = #{searchParams.issue}
  220. </if>
  221. </where>
  222. <foreach item="sort" collection="sortList" open="order by" separator=",">
  223. ${sort.name} ${sort.order}
  224. </foreach>
  225. </select>
  226. <select id="searchMobile" parameterType="hashmap" resultMap="TechnicianInfoMap">
  227. <![CDATA[
  228. select * from base_technician_info
  229. ]]>
  230. <where>
  231. del_flag = false
  232. <if test="searchParams.id != null">
  233. and ID_ like #{searchParams.id}
  234. </if>
  235. <if test="searchParams.name != null">
  236. and ID_ like #{searchParams.name}
  237. </if>
  238. </where>
  239. <foreach item="sort" collection="sortList" open="order by" separator=",">
  240. ${sort.name} ${sort.order}
  241. </foreach>
  242. </select>
  243. <select id="findByPhone" parameterType="string" resultMap="TechnicianInfoMap">
  244. select * from base_technician_info
  245. where del_flag = 0
  246. and phone_ = #{0}
  247. limit 1
  248. </select>
  249. <select id="findByOpenid" parameterType="string" resultMap="TechnicianInfoMap">
  250. select * from base_technician_info
  251. where del_flag = 0
  252. and open_id = #{0}
  253. limit 1
  254. </select>
  255. </mapper>