<select id="list" resultType="com.bootdo.indexpic.domain.IndexPicDO">
select `cid`,`title`,`content`,`pic`,`status`,`type`,`created`,`gtm_create` from a_index_pic
<where><if test="cid != null and cid != ''"> and cid = #{cid}</if><if test="title != null and title != ''"> and title = #{title}</if><if test="content != null and content != ''"> and content = #{content}</if><if test="pic != null and pic != ''"> and pic = #{pic}</if><if test="status != null and status != ''"> and status = #{status}</if><if test="type != null and type != ''"> and type = #{type}</if><if test="created != null and created != ''"> and created = #{created}</if><if test="gtmCreate != null and gtmCreate != ''"> and gtm_create = #{gtmCreate}</if></where><choose><when test="sort != null and sort.trim() != ''">
order by ${sort} ${order}</when><otherwise>
order by cid desc
</otherwise></choose><if test="offset != null and limit != null">
limit #{offset}, #{limit}</if></select>