<?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.StoreParamentMapper">
  <resultMap id="BaseResultMap" type="com.ssm.manage.entity.StoreParament">
    <!--
      WARNING - @mbg.generated
    -->
    <result column="parament_name" jdbcType="VARCHAR" property="paramentName" />
    <result column="parament_value" jdbcType="VARCHAR" property="paramentValue" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="store_id" jdbcType="BIGINT" property="storeId" />
    <result column="store_name" jdbcType="VARCHAR" property="storeName" />
  </resultMap>

  <insert id="addStorePara" parameterType="java.util.List">
    insert into store_parament (parament_name,parament_value,remark,store_id,store_name) values
    <foreach collection="paraList" index="index" item="storePara" separator=",">
      (#{storePara.paramentName},#{storePara.paramentValue},#{storePara.remark},#{storePara.storeId},#{storePara.storeName})
    </foreach>
  </insert>

  <select id="sselectSStoreParament" resultMap="BaseResultMap">
    select * from store_parament
    where store_id = #{storeId}
  </select>

  <select id="selectSperpsw" resultMap="BaseResultMap">
    select * from store_parament
    where store_id = #{storeId} and parament_name='superPasswd'
  </select>
</mapper>