<?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.platform.yijia.dao.IntegralShopPicMapper">
  <!--积分规则返回结果-->
  <resultMap id="BaseResultMap" type="com.platform.yijia.pojo.IntegralShopPic">
      <id     column="id"                     jdbcType="INTEGER" property="id" />
      <result column="img_name"               jdbcType="VARCHAR" property="imgName" />
      <result column="img_url"                jdbcType="VARCHAR" property="imgUrl" />
      <result column="img_status"             jdbcType="VARCHAR" property="imgStatus" />
      <result column="station_id"             jdbcType="INTEGER" property="stationId" />
      <result column="station_name"           jdbcType="VARCHAR" property="stationName" />
  </resultMap>

  <!--查询油站积分商城图片信息-->
  <select id="getIntegralShopPicList" resultMap="BaseResultMap" parameterType="com.platform.yijia.pojo.IntegralShopPic">
    SELECT
        id,
        img_name,
        img_url,
        img_status,
        station_id,
        station_name
    FROM
        integral_shop_pic
    <where>
         img_status = "1"
      <if test="stationId !=null and stationId !=''">
         AND station_id = #{stationId}
      </if>
    </where>
  </select>


</mapper>
