<?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.ssm.manage.mapper.PromotionListMapper">
  <resultMap id="BaseResultMap" type="com.ssm.manage.entity.PromotionList">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="store_id" jdbcType="BIGINT" property="storeId" />
    <result column="store_name" jdbcType="VARCHAR" property="storeName" />
    <result column="promotion_num" jdbcType="VARCHAR" property="promotionNum" />
    <result column="promotion_name" jdbcType="VARCHAR" property="promotionName" />
    <result column="sale_money" jdbcType="DECIMAL" property="saleMoney" />
    <result column="total_money" jdbcType="DECIMAL" property="totalMoney" />
    <result column="begin_date" jdbcType="TIMESTAMP" property="beginDate" />
    <result column="end_date" jdbcType="TIMESTAMP" property="endDate" />
    <result column="suitable_object" jdbcType="INTEGER" property="suitableObject" />
    <result column="limit_buy" jdbcType="INTEGER" property="limitBuy" />
    <result column="limit_count" jdbcType="INTEGER" property="limitCount" />
    <result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
    <result column="created_id" jdbcType="BIGINT" property="createdId" />
    <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
    <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
    <result column="updated_id" jdbcType="BIGINT" property="updatedId" />
    <result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
    <result column="audit_date" jdbcType="TIMESTAMP" property="auditDate" />
    <result column="audit_id" jdbcType="BIGINT" property="auditId" />
    <result column="audit_by" jdbcType="VARCHAR" property="auditBy" />
    <result column="state" jdbcType="INTEGER" property="state" />
    <result column="sales_commission" jdbcType="DECIMAL" property="salesCommission" />
    <result column="card_sales_commission" jdbcType="DECIMAL" property="cardSalesCommission" />
    <result column="push_state" jdbcType="INTEGER" property="pushState" />
    <result column="push_count" jdbcType="INTEGER" property="pushCount" />
    <result column="card_buy" jdbcType="INTEGER" property="cardBuy" />
    <result column="card_limit" jdbcType="INTEGER" property="cardLimit" />
    <result column="type" jdbcType="INTEGER" property="type" />
    <result column="project_count" jdbcType="INTEGER" property="projectCount" />
    <result column="project_total" jdbcType="INTEGER" property="projectTotal" />
    <result column="money_type" jdbcType="INTEGER" property="moneyType" />
  </resultMap>
    <select id="selectPromotionType" resultMap="BaseResultMap" parameterType="com.ssm.manage.query.PromotionListRequest">
      select * from promotion_list where store_id = #{storeId} and push_count>=1
    </select>
</mapper>