<?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.cku.dao.FrequentlyUsedUsersMapper">
	<resultMap id="BaseResultMap" type="com.cku.model.FrequentlyUsersModel">
		<id column="id" jdbcType="VARCHAR" property="id" />
		<result column="id_num" jdbcType="VARCHAR" property="id_num" />
		<result column="user_name" jdbcType="VARCHAR" property="user_name" />
		<result column="mobile_phone" jdbcType="VARCHAR" property="mobile_phone" />
		<result column="login_user_num" jdbcType="VARCHAR" property="login_user_num" />
	</resultMap>
	<!-- SQLSERVER 根据登录者会员号获取登录会员的常用牵犬师 zhuoHeng-->
	<select id="getFrequentlyUsedUsers" resultMap="BaseResultMap" parameterType="java.lang.Long">
		select  id,id_num,user_name,mobile_phone,login_user_num
		from cku_frequently_used_user 
		where login_user_num = #{idNum}
	</select>
	<!--SQLSERVER 保存常用牵犬师 zhuoHeng -->
	<insert id="saveFrequentlyUsedUser" parameterType="com.cku.model.FrequentlyUsersModel">
		insert into cku_frequently_used_user (id_num,user_name,mobile_phone,login_user_num)
		values (#{idNum},#{user_name},#{mobile_phone},#{login_user_num})
	</insert>
	<!--SQLSERVER 根据会员号查询常用牵犬师详细 zhuoHeng -->
	<select id="getFrequentlyUsedUserInfo" resultMap="BaseResultMap" parameterType="java.lang.Long">
		select  id,id_num,user_name,mobile_phone,login_user_num
		from cku_frequently_used_user 
		where id_num = #{idNum} and login_user_num = #{loginUserNum}
	</select>
	
</mapper>