<?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.restful.dao.SmsContentDao">

    <select id="getContent" resultType="java.lang.String" parameterType="string">

    select
    CONTENT
    from(select CONTENT from TB_SMSCONTENT_INFO where cpid in (#{cpid},'0') and spid in (#{spid},'0') and status=1 and channel in (#{channel},'0')   order by cpid desc,spid desc,channel desc
    )
    where rownum=1
    </select>
</mapper>