TechnicianInfo.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. </resultMap>
  31. <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
  32. <!--
  33. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  34. select sys_guid() from dual
  35. </selectKey>
  36. -->
  37. <![CDATA[
  38. insert into base_technician_info
  39. (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_)
  40. values
  41. (
  42. #{id,jdbcType=VARCHAR}
  43. ,#{userName,jdbcType=VARCHAR}
  44. ,#{password,jdbcType=VARCHAR}
  45. ,#{openId,jdbcType=VARCHAR}
  46. ,#{phone,jdbcType=VARCHAR}
  47. ,#{idCard,jdbcType=VARCHAR}
  48. ,#{realName,jdbcType=VARCHAR}
  49. ,#{region,jdbcType=VARCHAR}
  50. ,#{image,jdbcType=VARCHAR}
  51. ,#{gender,jdbcType=VARCHAR}
  52. ,#{introduction,jdbcType=VARCHAR}
  53. ,#{serviceInfo,jdbcType=VARCHAR}
  54. ,#{businessScope,jdbcType=VARCHAR}
  55. ,#{idCardImage,jdbcType=VARCHAR}
  56. ,#{isVerified,jdbcType= NUMERIC }
  57. ,#{promoCode,jdbcType=VARCHAR}
  58. ,#{createTime,jdbcType= TIMESTAMP }
  59. ,#{updateTime,jdbcType= TIMESTAMP }
  60. ,#{delFlag,jdbcType= NUMERIC }
  61. ,#{createBy,jdbcType=VARCHAR}
  62. ,#{updateBy,jdbcType=VARCHAR}
  63. ,#{status,jdbcType=VARCHAR}
  64. ,#{level,jdbcType= NUMERIC }
  65. )
  66. ]]>
  67. </insert>
  68. <delete id="delete" parameterType="string">
  69. delete from base_technician_info where id_=#{id,jdbcType=VARCHAR}
  70. </delete>
  71. <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
  72. update base_technician_info
  73. <set>
  74. <if test="userName!=null">
  75. user_name=#{userName,jdbcType=VARCHAR},
  76. </if>
  77. <if test="password!=null">
  78. password_=#{password,jdbcType=VARCHAR},
  79. </if>
  80. <if test="openId!=null">
  81. open_id=#{openId,jdbcType=VARCHAR},
  82. </if>
  83. <if test="phone!=null">
  84. phone_=#{phone,jdbcType=VARCHAR},
  85. </if>
  86. <if test="idCard!=null">
  87. id_card=#{idCard,jdbcType=VARCHAR},
  88. </if>
  89. <if test="realName!=null">
  90. real_name=#{realName,jdbcType=VARCHAR},
  91. </if>
  92. <if test="region!=null">
  93. region_=#{region,jdbcType=VARCHAR},
  94. </if>
  95. <if test="image!=null">
  96. image_=#{image,jdbcType=VARCHAR},
  97. </if>
  98. <if test="gender!=null">
  99. gender_=#{gender,jdbcType=VARCHAR},
  100. </if>
  101. <if test="introduction!=null">
  102. introduction_=#{introduction,jdbcType=VARCHAR},
  103. </if>
  104. <if test="serviceInfo!=null">
  105. service_info=#{serviceInfo,jdbcType=VARCHAR},
  106. </if>
  107. <if test="businessScope!=null">
  108. business_scope=#{businessScope,jdbcType=VARCHAR},
  109. </if>
  110. <if test="idCardImage!=null">
  111. id_card_image=#{idCardImage,jdbcType=VARCHAR},
  112. </if>
  113. <if test="isVerified!=null">
  114. is_verified=#{isVerified,jdbcType= NUMERIC },
  115. </if>
  116. <if test="promoCode!=null">
  117. promo_code=#{promoCode,jdbcType=VARCHAR},
  118. </if>
  119. <if test="createTime!=null">
  120. create_time=#{createTime,jdbcType= TIMESTAMP },
  121. </if>
  122. <if test="updateTime!=null">
  123. update_time=#{updateTime,jdbcType= TIMESTAMP },
  124. </if>
  125. <if test="delFlag!=null">
  126. del_flag=#{delFlag,jdbcType= NUMERIC },
  127. </if>
  128. <if test="createBy!=null">
  129. create_by=#{createBy,jdbcType=VARCHAR},
  130. </if>
  131. <if test="updateBy!=null">
  132. update_by=#{updateBy,jdbcType=VARCHAR},
  133. </if>
  134. <if test="status!=null">
  135. status_=#{status,jdbcType=VARCHAR},
  136. </if>
  137. <if test="level!=null">
  138. level_=#{level,jdbcType= NUMERIC },
  139. </if>
  140. </set>
  141. where id_=#{id}
  142. </update>
  143. <select id="get" parameterType="string" resultMap="TechnicianInfoMap">
  144. select * from base_technician_info where id_=#{0}
  145. </select>
  146. <select id="exist" parameterType="string" resultType="int">
  147. select count(*) from base_technician_info where id_=#{0}
  148. </select>
  149. <select id="list" resultMap="TechnicianInfoMap">
  150. select * from base_technician_info
  151. </select>
  152. <select id="search" parameterType="hashmap" resultMap="TechnicianInfoMap">
  153. <![CDATA[
  154. select * from base_technician_info
  155. ]]>
  156. <where>
  157. <if test="searchParams.id != null">
  158. and ID_ like #{searchParams.id}
  159. </if>
  160. </where>
  161. <foreach item="sort" collection="sortList" open="order by" separator=",">
  162. ${sort.name} ${sort.order}
  163. </foreach>
  164. </select>
  165. <select id="searchMobile" parameterType="hashmap" resultMap="TechnicianInfoMap">
  166. <![CDATA[
  167. select * from base_technician_info
  168. ]]>
  169. <where>
  170. del_flag = fasle
  171. <if test="searchParams.id != null">
  172. and ID_ like #{searchParams.id}
  173. </if>
  174. </where>
  175. <foreach item="sort" collection="sortList" open="order by" separator=",">
  176. ${sort.name} ${sort.order}
  177. </foreach>
  178. </select>
  179. <select id="findByPhone" parameterType="string" resultMap="TechnicianInfoMap">
  180. select * from base_technician_info
  181. where del_flag = 0
  182. and phone_ = #{0}
  183. limit 1
  184. </select>
  185. </mapper>