sqlmap-index.xml
607 Bytes
<?xml version="1.0" encoding="UTF-8"?>
<sqlMap namespace="index">
<select id="getBannerByType">
SELECT * FROM tbl_index where type = :type order by sort desc, id desc
</select>
<update id="updateBanner">
UPDATE tbl_index SET type =:type, url=:url,res= :res, text=:text, sort=:sort, res_size=:res_size WHERE id = :id
</update>
<insert id="insertBanner">
INSERT INTO tbl_index (type,url,res,text,sort, res_size, create_time) VALUES (:type, :url,:res, :text, :sort, :res_size, UNIX_TIMESTAMP())
</insert>
<delete id="delIndex">
DELETE FROM tbl_index WHERE id = :id
</delete>
</sqlMap>