<?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.StoreWechatMapper">

    <resultMap id="BaseResultMap" type="com.ssm.manage.entity.StoreWechat">
        <result property="id" column="id"/>
        <result property="storeId" column="store_id"/>
        <result property="appid" column="appid"/>
        <result property="appEcret" column="app_ecret"/>
        <result property="iphone" column="iphone"/>
        <result property="token" column="token"/>
    </resultMap>

    <sql id="Base_Column_List">
        id
        , store_id, appid, app_ecret, iphone, token
    </sql>

    <select id="queryAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"></include>
        from store_wechat
        <where>
            <if test="id != null">
                and id = #{id}
            </if>
            <if test="storeId != null">
                and store_id = #{storeId}
            </if>
            <if test="appid != null and appid != ''">
                and appid = #{appid}
            </if>
            <if test="appEcret != null and appEcret != ''">
                and app_ecret = #{appEcret}
            </if>
            <if test="iphone != null and iphone != ''">
                and iphone = #{iphone}
            </if>
            <if test="token != null and token != ''">
                and token = #{token}
            </if>
        </where>
    </select>


</mapper>