BaseMapper.xml 949 B

12345678910111213141516171819202122
  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.caimei365.user.mapper.BaseMapper">
  4. <select id="getUserIdByEmail" resultType="java.lang.Integer">
  5. select userID from user
  6. where email = #{mobile} and userIdentity in (1,2,3,4)
  7. limit 1
  8. </select>
  9. <select id="getUserIdByMobile" resultType="java.lang.Integer">
  10. select userID from user u
  11. left join cm_mall_operation_user cu on cu.userID = u.userID
  12. where (u.bindMobile = #{mobile}
  13. or (cu.mobile = #{mobile} and cu.delFlag != 1)
  14. ) and u.userIdentity in (1,2,3,4)
  15. limit 1
  16. </select>
  17. <select id="getOperationIdByMobile" resultType="java.lang.Integer">
  18. select id from cm_mall_operation_user
  19. where mobile = #{mobile} and delFlag = '0'
  20. limit 1
  21. </select>
  22. </mapper>