<?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.stylefeng.guns.modular.system.dao.AdvertisementMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.Advertisement">
|
<id column="id" property="id"/>
|
<result column="name" property="name"/>
|
<result column="imgUrl" property="imgUrl"/>
|
<result column="type" property="type"/>
|
<result column="isJump" property="isJump"/>
|
<result column="jumpType" property="jumpType"/>
|
<result column="jumpUrl" property="jumpUrl"/>
|
<result column="content" property="content"/>
|
<result column="state" property="state"/>
|
<result column="provinceId" property="provinceId"/>
|
|
<result column="flag" property="flag"/>
|
<result column="insertTime" property="insertTime"/>
|
<result column="insertUser" property="insertUser"/>
|
<result column="updateTime" property="updateTime"/>
|
<result column="updateUser" property="updateUser"/>
|
</resultMap>
|
|
|
<select id="queryAdvertisement" resultType="com.stylefeng.guns.modular.system.warpper.AdvertisementWarpper">
|
select
|
id as id,
|
name as name,
|
imgUrl as imgUrl,
|
type as type,
|
isJump as isJump,
|
jumpType as jumpType,
|
jumpUrl as jumpUrl,
|
content as content,
|
state as state,
|
provinceId as provinceId
|
from t_advertisement where flag != 3 and state = 1 and provinceId in (select id from t_region where code = #{code})
|
<if test="null != type">
|
and `type` = #{type}
|
</if>
|
</select>
|
</mapper>
|