UnionConfigMapper.xml
1.3 KB
<?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.yoho.unions.dal.IUnionConfigDAO" >
<resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.UnionConfig" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="uid" property="uid" jdbcType="INTEGER" />
<result column="client_type" property="clientType" jdbcType="VARCHAR" />
<result column="encrypt_key" property="encryptKey" jdbcType="VARCHAR" />
<result column="sign_key" property="signKey" jdbcType="VARCHAR" />
<result column="url" property="url" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
id, uid, client_type, encrypt_key, sign_key, url, create_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from union_config
where uid = #{uid,jdbcType=INTEGER}
</select>
<select id="selectByUidAndClientType" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from union_config
where uid = #{uid} and client_type = #{client_type} limit 1
</select>
</mapper>