|
|
|
@ -36,9 +36,11 @@ |
|
|
|
<result column="shop_images" property="shopImages" jdbcType="VARCHAR" /> |
|
|
|
<result column="shop_lename" property="shopLename" jdbcType="VARCHAR" /> |
|
|
|
<result column="shop_lecard" property="shopLecard" jdbcType="VARCHAR" /> |
|
|
|
<result column="shop_score" property="shopScore" jdbcType="VARCHAR" /> |
|
|
|
<result column="shop_score" property="shopScore" jdbcType="DECIMAL" /> |
|
|
|
<result column="isbrandflag" property="isbrandflag" jdbcType="INTEGER" /> |
|
|
|
<result column="subtitle" property="subtitle" jdbcType="VARCHAR" /> |
|
|
|
<result column="shoprank" property="shoprank" jdbcType="INTEGER" /> |
|
|
|
<result column="sale_count" property="saleCount" jdbcType="INTEGER" /> |
|
|
|
</resultMap> |
|
|
|
<resultMap id="ResultMapWithBLOBs" type="cc.hiver.mall.entity.Shop" extends="BaseResultMap" > |
|
|
|
<result column="remark" property="remark" jdbcType="LONGVARCHAR" /> |
|
|
|
@ -47,7 +49,7 @@ |
|
|
|
id, create_by, create_time, del_flag, update_by, update_time, shop_name, shop_owner_id, shop_manger_id, region, |
|
|
|
region_id, shop_area, shop_area_title, shop_type, shop_type_title, shop_address, year_fee, charge_time, start_time, |
|
|
|
end_time, status, remark, business_district_level, contact_phone, shop_icon, defaulted, ali_account, ali_name, |
|
|
|
rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop_score,isbrandflag,subtitle |
|
|
|
rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop_score,isbrandflag,subtitle,shoprank,sale_count |
|
|
|
</sql> |
|
|
|
<sql id="Blob_Column_List" > |
|
|
|
remark |
|
|
|
@ -68,11 +70,11 @@ rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop |
|
|
|
insert into t_shop (id, create_by, create_time, del_flag, update_by, update_time, shop_name, shop_owner_id, shop_manger_id, region, |
|
|
|
region_id, shop_area, shop_area_title, shop_type, shop_type_title, shop_address, year_fee, charge_time, start_time, |
|
|
|
end_time, status, remark, business_district_level, contact_phone, shop_icon, defaulted, ali_account, ali_name, |
|
|
|
rebate_amount, attr_id, printing_method, shop_images, shop_lename, shop_lecard, shop_score, isbrandflag, subtitle) |
|
|
|
rebate_amount, attr_id, printing_method, shop_images, shop_lename, shop_lecard, shop_score, isbrandflag, subtitle,shoprank, sale_count) |
|
|
|
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{shopName,jdbcType=VARCHAR}, #{shopOwnerId,jdbcType=VARCHAR}, #{shopMangerId,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR}, |
|
|
|
#{regionId,jdbcType=VARCHAR}, #{shopArea,jdbcType=VARCHAR}, #{shopAreaTitle,jdbcType=VARCHAR}, #{shopType,jdbcType=VARCHAR}, #{shopTypeTitle,jdbcType=VARCHAR}, #{shopAddress,jdbcType=VARCHAR}, #{yearFee,jdbcType=VARCHAR}, #{chargeTime,jdbcType=VARCHAR}, #{startTime,jdbcType=VARCHAR}, |
|
|
|
#{endTime,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{remark,jdbcType=LONGVARCHAR}, #{businessDistrictLevel,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR}, #{shopIcon,jdbcType=VARCHAR}, #{defaulted,jdbcType=INTEGER}, #{aliAccount,jdbcType=VARCHAR}, #{aliName,jdbcType=VARCHAR}, |
|
|
|
#{rebateAmount,jdbcType=VARCHAR}, #{attrId,jdbcType=VARCHAR}, #{printingMethod,jdbcType=VARCHAR}, #{shopImages,jdbcType=VARCHAR}, #{shopLename,jdbcType=VARCHAR}, #{shopLecard,jdbcType=VARCHAR}, #{shopScore,jdbcType=VARCHAR}, #{isbrandflag,jdbcType=INTEGER}, #{subtitle,jdbcType=VARCHAR}) |
|
|
|
#{rebateAmount,jdbcType=VARCHAR}, #{attrId,jdbcType=VARCHAR}, #{printingMethod,jdbcType=VARCHAR}, #{shopImages,jdbcType=VARCHAR}, #{shopLename,jdbcType=VARCHAR}, #{shopLecard,jdbcType=VARCHAR}, #{shopScore,jdbcType=DECIMAL}, #{isbrandflag,jdbcType=INTEGER}, #{subtitle,jdbcType=VARCHAR}, #{shoprank,jdbcType=INTEGER}, #{saleCount,jdbcType=INTEGER}) |
|
|
|
</insert> |
|
|
|
<insert id="insertSelective" parameterType="cc.hiver.mall.entity.Shop" > |
|
|
|
insert into t_shop |
|
|
|
@ -164,6 +166,12 @@ rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop |
|
|
|
<if test="subtitle != null" > |
|
|
|
subtitle, |
|
|
|
</if> |
|
|
|
<if test="shoprank != null" > |
|
|
|
shoprank, |
|
|
|
</if> |
|
|
|
<if test="saleCount != null" > |
|
|
|
sale_count, |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," > |
|
|
|
<if test="id != null" > |
|
|
|
@ -245,7 +253,7 @@ rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop |
|
|
|
#{shopLecard,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="shopScore != null" > |
|
|
|
#{shopScore,jdbcType=VARCHAR}, |
|
|
|
#{shopScore,jdbcType=DECIMAL}, |
|
|
|
</if> |
|
|
|
<if test="isbrandflag != null" > |
|
|
|
#{isbrandflag,jdbcType=INTEGER}, |
|
|
|
@ -253,6 +261,12 @@ rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop |
|
|
|
<if test="subtitle != null" > |
|
|
|
#{subtitle,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="shoprank != null" > |
|
|
|
#{shoprank,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="saleCount != null" > |
|
|
|
#{saleCount,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.entity.Shop" > |
|
|
|
@ -334,7 +348,7 @@ rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop |
|
|
|
shop_lecard = #{shopLecard,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="shopScore != null" > |
|
|
|
shop_score = #{shopScore,jdbcType=VARCHAR}, |
|
|
|
shop_score = #{shopScore,jdbcType=DECIMAL}, |
|
|
|
</if> |
|
|
|
<if test="isbrandflag != null" > |
|
|
|
isbrandflag = #{isbrandflag,jdbcType=INTEGER}, |
|
|
|
@ -342,6 +356,12 @@ rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop |
|
|
|
<if test="subtitle != null" > |
|
|
|
subtitle = #{subtitle,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="shoprank != null" > |
|
|
|
shoprank = #{shoprank,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="saleCount != null" > |
|
|
|
sale_count = #{saleCount,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
</set> |
|
|
|
where id = #{id,jdbcType=VARCHAR} |
|
|
|
</update> |
|
|
|
@ -372,9 +392,11 @@ rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop |
|
|
|
shop_images = #{shopImages,jdbcType=VARCHAR}, |
|
|
|
shop_lename = #{shopLename,jdbcType=VARCHAR}, |
|
|
|
shop_lecard = #{shopLecard,jdbcType=VARCHAR}, |
|
|
|
shop_score = #{shopScore,jdbcType=VARCHAR}, |
|
|
|
shop_score = #{shopScore,jdbcType=DECIMAL}, |
|
|
|
isbrandflag = #{isbrandflag,jdbcType=INTEGER}, |
|
|
|
subtitle = #{subtitle,jdbcType=VARCHAR} |
|
|
|
subtitle = #{subtitle,jdbcType=VARCHAR}, |
|
|
|
shoprank = #{shoprank,jdbcType=INTEGER}, |
|
|
|
sale_count = #{saleCount,jdbcType=INTEGER} |
|
|
|
where id = #{id,jdbcType=VARCHAR} |
|
|
|
</update> |
|
|
|
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.entity.Shop" > |
|
|
|
@ -412,9 +434,11 @@ rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop |
|
|
|
shop_images = #{shopImages,jdbcType=VARCHAR}, |
|
|
|
shop_lename = #{shopLename,jdbcType=VARCHAR}, |
|
|
|
shop_lecard = #{shopLecard,jdbcType=VARCHAR}, |
|
|
|
shop_score = #{shopScore,jdbcType=VARCHAR}, |
|
|
|
shop_score = #{shopScore,jdbcType=DECIMAL}, |
|
|
|
isbrandflag = #{isbrandflag,jdbcType=INTEGER}, |
|
|
|
subtitle = #{subtitle,jdbcType=VARCHAR} |
|
|
|
subtitle = #{subtitle,jdbcType=VARCHAR}, |
|
|
|
shoprank = #{shoprank,jdbcType=INTEGER}, |
|
|
|
sale_count = #{saleCount,jdbcType=INTEGER} |
|
|
|
where id = #{id,jdbcType=VARCHAR} |
|
|
|
</update> |
|
|
|
<select id="findByUserId" resultType="cc.hiver.mall.entity.Shop"> |
|
|
|
@ -424,4 +448,12 @@ rebate_amount, attr_id, printing_method,shop_images,shop_lename,shop_lecard,shop |
|
|
|
WHERE m.status = 1 AND (um.user_id = #{userId} OR m.shop_owner_id = #{userId} OR m.shop_manger_id = #{userId}) |
|
|
|
ORDER BY m.defaulted DESC |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getShopSaleCounts" resultType="cc.hiver.mall.entity.Shop"> |
|
|
|
SELECT shop_id as id, count(*) as saleCounts FROM `t_sale` where del_flag = 0 and status = 4 and shop_id in |
|
|
|
<foreach item="item" index="index" collection="shopIdList" open="(" close=")" separator=","> |
|
|
|
#{item} |
|
|
|
</foreach> |
|
|
|
GROUP BY shop_id |
|
|
|
</select> |
|
|
|
</mapper> |