方案一:
UserMapper.java:
public User selectUser(String name,String password);
UserMapper.xml:
<select id="selectUser" resultMap="BaseResultMap">
select * from user_user_t where user_name = #{0} and password=#{1}
</select>
方案二:
UserMapper.java:
public User selectUser(Map paramMap);
UserMapper.xml:
<select id="selectUser" resultMap="BaseResultMap">
select * from user_user_t where user_name = #{userName,jdbcType=VARCHAR} and password=#{password,jdbcType=VARCHAR}
</select>
方案三:
UserMapper.java:
public User selectUser(User user);
UserMapper.xml:
<select id="selectUser" parameterType="com.fable.workflow.bean.User" resultMap="BaseResultMap">
select * from user_user_t where user_name = #{userName,jdbcType=VARCHAR} and password=#{password,jdbcType=VARCHAR}
</select>
方案四:
UserMapper.java:
public User selectUser(@Param("userName") String userName, @Param("password")String password);
UserMapper.xml:
<select id="selectUser" resultMap="BaseResultMap">
select * from user_user_t where user_name = #{userName,jdbcType=VARCHAR} and password=#{password,jdbcType=VARCHAR}
</select>