IMAdvertMapper.xml
968 字节
<?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.sibu.orderHelper.integral.dao.IMAdvertDao">
<select id="listImAdvert" resultMap="listIMAdvert">
SELECT
g.im_advert_id, g.type_id, g.im_product_id, g.name, g.image_url,g.link_url
FROM
im_advert g
WHERE
g.is_show = 1 and g.delete_flag = 1
ORDER BY
sort_index asc,IFNULL(update_dt,create_dt) DESC
LIMIT 0,5
</select>
<resultMap type="IMAdvertBean" id="listIMAdvert">
<result column="im_advert_id" property="imAdvertId" />
<result column="type_id" property="typeId" />
<result column="im_product_id" property="imProductId" />
<result column="name" property="name" />
<result column="image_url" property="imageUrl" />
<result column="link_url" property="linkUrl" />
</resultMap>
</mapper>