safeway/bwie-moudels/bwie-user/src/main/resources/mapper/UserMapper.xml

20 lines
611 B
XML

<?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.bwie.user.mapper.UserMapper">
<select id="findByPhone" resultType="com.bwie.common.domain.User">
select * from t_user where phone=#{phone}
</select>
<select id="list" resultType="com.bwie.common.domain.User">
select * from t_user
<where>
<if test="userId!=null and userId!=''">
and user_id=#{userId}
</if>
</where>
</select>
</mapper>