团购卷卷码表
原订单列表逻辑 店铺营业时间 团购卷订单 团购卷卷码表 资源管理 字典管理 通用门店 个人中心 支付
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, category_id, spec_id, source_path, brand_id, merchant_id, shop_id, name, short_title,
|
||||
type, pack_fee, low_price, low_member_price, unit_id, unit_snap, cover_img, share_img,
|
||||
type, pack_fee, low_price, low_member_price, unit_id, unit_snap, cover_img, share_img, images,
|
||||
video_cover_img, sort, limit_number, product_score, status, fail_msg, is_recommend,
|
||||
is_hot, is_new, is_on_sale, is_show, type_enum, is_distribute, is_del, is_stock,
|
||||
is_pause_sale, is_free_freight, freight_id, strategy_type, strategy_id, is_vip, is_delete,
|
||||
@@ -882,6 +882,11 @@
|
||||
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="upGroupRealSalesNumber">
|
||||
update tb_product
|
||||
set real_sales_number = real_sales_number + #{number,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="selectByIdIn" resultMap="BaseResultMap">
|
||||
select *
|
||||
@@ -949,8 +954,8 @@
|
||||
pro.cover_img AS proImg,
|
||||
pro.real_sales_number AS number
|
||||
FROM
|
||||
tb_product pro
|
||||
LEFT JOIN tb_shop_info AS info ON info.id = pro.shop_id
|
||||
tb_product pro
|
||||
LEFT JOIN tb_shop_info AS info ON info.id = pro.shop_id
|
||||
<where>
|
||||
info.`status`='1'
|
||||
AND pro.is_combo = '1'
|
||||
@@ -968,14 +973,44 @@
|
||||
ORDER BY (ABS(info.lat - #{lat}) + ABS(info.lng - #{lng})) ASC
|
||||
</when>
|
||||
<when test="orderBy == '2'">
|
||||
ORDER BYpro.real_sales_number desc
|
||||
ORDER BY pro.real_sales_number desc
|
||||
</when>
|
||||
<when test="orderBy == '3'">
|
||||
ORDER BY pro.low_price ASC
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY pro.id DESC
|
||||
ORDER BY pro.real_sales_number DESC
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="selHotGroups" resultType="com.chaozhanggui.system.cashierservice.entity.vo.ShopGroupInfoVo">
|
||||
SELECT
|
||||
info.id AS shopId,
|
||||
info.shop_name AS shopName,
|
||||
info.logo AS shopImg,
|
||||
info.tag AS shopTag,
|
||||
info.lat AS lat,
|
||||
info.lng AS lng,
|
||||
pro.id AS proId,
|
||||
pro.`name` AS proName,
|
||||
pro.cover_img AS proImg,
|
||||
sum(`order`.number) AS number
|
||||
FROM
|
||||
tb_group_order_info AS `order`
|
||||
LEFT JOIN tb_product AS pro ON `order`.pro_id = pro.id
|
||||
LEFT JOIN tb_shop_info AS info ON info.id = `order`.shop_id
|
||||
<where>
|
||||
info.`status`='1'
|
||||
AND info.cities = #{cities}
|
||||
<if test="type != null and type != ''">
|
||||
AND pro.group_category_id LIKE concat('%',#{type,jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND `order`.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
group by `order`.pro_id
|
||||
ORDER BY number desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user