| | |
| | | <select id="getBanners" resultType="com.stylefeng.guns.modular.system.warpper.res.BannerRes"> |
| | | select id, img_url as imgUrl, content from t_banner where `position` = #{position} order by `sort` desc |
| | | </select> |
| | | <select id="list" resultType="com.stylefeng.guns.modular.system.dto.BannerVo"> |
| | | SELECT tb.id,tb.position,tb.sort,tb.img_url as imgUrl,su.`name` as createBy,tb.insert_time as insertTime |
| | | from t_banner tb |
| | | LEFT JOIN sys_user su on tb.insert_user_id = su.id |
| | | <where> |
| | | <if test="null != position"> |
| | | and tb.position = #{position} |
| | | </if> |
| | | <if test="null != sort"> |
| | | and tb.sort = #{sort} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |