<?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.chinacreator.video.mapper.CPDao" >
    <resultMap id="BaseResultMap" type="com.chinacreator.video.bean.CPInfo" >
        <result column="cpid" property="cpid" jdbcType="VARCHAR" />
        <result column="cpname" property="cpname" jdbcType="VARCHAR" />
        <result column="status" property="status" jdbcType="VARCHAR" />
         <result column="syncaddr" property="syncaddr" jdbcType="VARCHAR" />
          <result column="netpwd" property="netpwd" jdbcType="VARCHAR" />
           <result column="mobtype" property="mobtype" jdbcType="VARCHAR" />
            <result column="sdspid" property="sdspid" jdbcType="VARCHAR" />
    </resultMap>
    
    <sql id="Base_Column_List" >
        a.cpid,a.cpname,a.status,syncaddr,netpwd,mobtype,sdspid
    </sql>

    <select id="findById" parameterType="string"  resultMap="BaseResultMap" >
       SELECT 
       <include refid="Base_Column_List" />
	    from tb_cp_info a, TB_CP_ACCOUNT_CONFIG b where a.cpid = b.cpid and a.cptype=0 and a.cpid=#{cpid}
    </select>
    
</mapper>