3 changed files with 59 additions and 11 deletions
@ -0,0 +1,9 @@ |
|||
package com.ccsens.common.persist.dao; |
|||
|
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
@Repository |
|||
public interface UserDao { |
|||
Long getUserIdByPhone(@Param("phone") String phone); |
|||
} |
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.common.persist.dao.UserDao"> |
|||
|
|||
<select id="getUserIdByPhone" resultType="java.lang.Long"> |
|||
SELECT |
|||
u.id |
|||
FROM |
|||
tall.t_sys_user u LEFT JOIN tall.t_sys_auth a on u.id = a.user_id |
|||
WHERE |
|||
a.identify_type = 1 |
|||
and a.identifier = #{phone} |
|||
and a.rec_status = 0 |
|||
and u.rec_status = 0 |
|||
LIMIT 1 |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue