调解系统后端服务

WeChatUserMapper.xml 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.miniprogress.WeChatUserMapper">
  6. <resultMap type="com.ruoyi.wisdomarbitrate.domain.vo.miniprogress.WeChatUserVO" id="BaseResult">
  7. <id property="id" column="id" />
  8. <result property="name" column="name" />
  9. <result property="identityNo" column="identity_no" />
  10. <result property="certificationTime" column="certification_time" />
  11. <result property="certificationStatus" column="certification_status" />
  12. <result property="openId" column="open_id" />
  13. <result property="phone" column="phone" />
  14. <result property="email" column="email" />
  15. </resultMap>
  16. <insert id="insertUser">
  17. insert into ms_ms_identi_authenti(
  18. <if test="name != null and name != ''">name,</if>
  19. <if test="identityNo != null and identityNo != ''">identity_no,</if>
  20. certification_time,
  21. <if test="certificationStatus != null ">certification_status,</if>
  22. <if test="openId != null ">open_id,</if>
  23. <if test="createBy != null and createBy != ''">create_by,</if>
  24. <if test="phone != null and phone != ''">phone,</if>
  25. <if test="email != null and email != ''">email,</if>
  26. create_time
  27. )values(
  28. <if test="name != null and name != ''">#{name},</if>
  29. <if test="identityNo != null and identityNo != ''">#{identityNo},</if>
  30. sysdate(),
  31. <if test="certificationStatus != null ">#{certificationStatus},</if>
  32. <if test="openId != null ">#{openId},</if>
  33. <if test="createBy != null and createBy != ''">#{createBy},</if>
  34. <if test="phone != null and phone != ''">#{phone},</if>
  35. <if test="email != null and email != ''">#{email},</if>
  36. sysdate()
  37. )
  38. </insert>
  39. <update id="updateUser">
  40. update ms_ms_identi_authenti
  41. <set>
  42. <if test="phone != null and phone != ''">phone = #{phone},</if>
  43. <if test="email != null and email != ''">email = #{email},</if>
  44. <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  45. update_time = sysdate()
  46. </set>
  47. where id = #{id}
  48. </update>
  49. <select id="selectIdentityAuthentication" resultMap="BaseResult">
  50. SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name,open_id,phone,email
  51. from ms_ms_identi_authenti i
  52. </select>
  53. <select id="selectUserByOppenId" resultMap="BaseResult">
  54. SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name,open_id,phone,email
  55. from ms_ms_identi_authenti i where open_id=#{oppenId}
  56. </select>
  57. </mapper>