You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
115 lines
5.7 KiB
115 lines
5.7 KiB
<?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="cc.hiver.mall.dao.mapper.ShopTakeawayMapper" >
|
|
<resultMap id="BaseResultMap" type="cc.hiver.mall.entity.ShopTakeaway" >
|
|
<result column="id" property="id" jdbcType="VARCHAR" />
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
<result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
<result column="shop_id" property="shopId" jdbcType="VARCHAR" />
|
|
<result column="shop_name" property="shopName" jdbcType="VARCHAR" />
|
|
<result column="region_id" property="regionId" jdbcType="VARCHAR" />
|
|
<result column="commission_rate_more" property="commissionRateMore" jdbcType="VARCHAR" />
|
|
<result column="commission_rate_one" property="commissionRateOne" jdbcType="VARCHAR" />
|
|
<result column="business_hour_begin" property="businessHourBegin" jdbcType="VARCHAR" />
|
|
<result column="business_hour_end" property="businessHourEnd" jdbcType="VARCHAR" />
|
|
<result column="status" property="status" jdbcType="INTEGER" />
|
|
<result column="type" property="type" jdbcType="VARCHAR" />
|
|
<result column="is_delivery" property="isDelivery" jdbcType="INTEGER" />
|
|
<result column="cooking_time" property="cookingTime" jdbcType="INTEGER" />
|
|
<result column="shoprank" property="shoprank" jdbcType="INTEGER" />
|
|
<result column="is_price_lock" property="isPriceLock" jdbcType="INTEGER" />
|
|
<result column="join_time" property="joinTime" jdbcType="VARCHAR" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List" >
|
|
id,create_by, create_time, update_time, update_by,
|
|
del_flag,shop_id,shop_name,region_id,commission_rate_more,commission_rate_one,business_hour_begin,business_hour_end,status,type,is_delivery,cooking_time,shoprank,is_price_lock,join_time
|
|
</sql>
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from t_shop_takeaway
|
|
where shop_id = #{shopId,jdbcType=VARCHAR}
|
|
</select>
|
|
|
|
<select id="selectList" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from t_shop_takeaway
|
|
where region_id = #{regionId,jdbcType=VARCHAR}
|
|
</select>
|
|
|
|
<select id="selectListByshopId" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from t_shop_takeaway where shop_id in
|
|
<foreach item="item" index="index" collection="shopIdList" open="(" close=")" separator=",">
|
|
#{item}
|
|
</foreach>
|
|
</select>
|
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
|
delete from t_shop_takeaway
|
|
where shop_id = #{shopId,jdbcType=VARCHAR}
|
|
</delete>
|
|
<insert id="insert" parameterType="cc.hiver.mall.entity.ShopTakeaway" >
|
|
insert into t_shop_takeaway (id,create_by, create_time, update_time, update_by,
|
|
del_flag,shop_id, shop_name,region_id,commission_rate_more, commission_rate_one, business_hour_begin, business_hour_end, status, type, is_delivery, cooking_time, shoprank, is_price_lock, join_time)
|
|
values (#{id,jdbcType=VARCHAR},#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},
|
|
#{updateTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR},#{delFlag,jdbcType=INTEGER}
|
|
,#{shopId,jdbcType=VARCHAR},#{shopName,jdbcType=VARCHAR},#{regionId,jdbcType=VARCHAR}, #{commissionRateMore,jdbcType=DECIMAL}, #{commissionRateOne,jdbcType=DECIMAL}, #{businessHourBegin,jdbcType=VARCHAR}, #{businessHourEnd,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{isDelivery,jdbcType=INTEGER}, #{cookingTime,jdbcType=INTEGER}, #{shoprank,jdbcType=INTEGER}, #{isPriceLock,jdbcType=INTEGER}, #{joinTime,jdbcType=VARCHAR})
|
|
</insert>
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.entity.ShopTakeaway" >
|
|
update t_shop_takeaway
|
|
<set >
|
|
<if test="shopId != null" >
|
|
shop_id = #{shopId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="shopName != null" >
|
|
shop_name = #{shopName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="regionId != null" >
|
|
region_id = #{regionId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="commissionRateMore != null" >
|
|
commission_rate_more = #{commissionRateMore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="commissionRateOne != null" >
|
|
commission_rate_one = #{commissionRateOne,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="businessHourBegin != null" >
|
|
business_hour_begin = #{businessHourBegin,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="businessHourEnd != null" >
|
|
business_hour_end = #{businessHourEnd,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="status != null" >
|
|
status = #{status,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="type != null" >
|
|
type = #{type,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="isDelivery != null" >
|
|
is_delivery = #{isDelivery,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="cookingTime != null" >
|
|
cooking_time = #{cookingTime,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="shoprank != null" >
|
|
shoprank = #{shoprank,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="isPriceLock != null" >
|
|
is_price_lock = #{isPriceLock,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="joinTime != null" >
|
|
join_time = #{joinTime,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where shop_id = #{shopId,jdbcType=VARCHAR}
|
|
</update>
|
|
|
|
</mapper>
|
|
|