AuthenticationMapper.xml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.demo.wjj.mapper.AuthenticationMapper">
  4. <!--插入车商认证信息-->
  5. <insert id="insert" parameterType="com.demo.wjj.po.Authentication">
  6. INSERT INTO tb_authentication(id,real_name,id_card_no,id_card_imgpo,id_card_imgsi,add_time,is_check,check_time,user_id,head_portrait,bank_card_no,phone)
  7. VALUES (#{id},#{realName},#{idCardNumber},#{idCardImaPo},#{idCardImaSi},#{addTime},#{isCheck},#{checkTime},#{userId},#{headPortrait},#{bankCardNumber},#{phone})
  8. </insert>
  9. <select id="selectById" resultType="com.demo.wjj.po.Authentication">
  10. select a.id id,
  11. a.real_name realName,
  12. a.id_card_no idCardNumber,
  13. a.id_card_imgpo idCardImaPo,
  14. a.id_card_imgsi idCardImaSi,
  15. a.add_time addTime,
  16. a.is_check isCheck,
  17. a.check_time checkTime,
  18. a.user_id userId,
  19. a.head_portrait headPortrait,
  20. a.bank_card_no bankCardNumber,
  21. a.phone phone
  22. from tb_authentication a
  23. where a.user_id = #{id}
  24. </select>
  25. <select id="selectByUserId" resultType="com.demo.wjj.po.Authentication">
  26. select a.id id,
  27. a.real_name realName,
  28. a.id_card_no idCardNumber,
  29. a.id_card_imgpo idCardImaPo,
  30. a.id_card_imgsi idCardImaSi,
  31. a.add_time addTime,
  32. a.is_check isCheck,
  33. a.check_time checkTime,
  34. a.user_id userId,
  35. a.head_portrait headPortrait,
  36. a.bank_card_no bankCardNumber,
  37. a.phone phone
  38. from tb_authentication a
  39. where a.user_id = #{userId}
  40. </select>
  41. <delete id="delete">
  42. DELETE from tb_authentication
  43. where user_id = #{userId}
  44. </delete>
  45. </mapper>