TechnicianInfo.xml 9.2 KB

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