团购卷卷码表
原订单列表逻辑 店铺营业时间 团购卷订单 团购卷卷码表 资源管理 字典管理 通用门店 个人中心 支付
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.SysDictDetailMapper">
|
||||
|
||||
<select id="selectHot" resultType="com.chaozhanggui.system.cashierservice.entity.SysDict">
|
||||
select *
|
||||
from sys_dict
|
||||
where type = 'hot'
|
||||
</select>
|
||||
|
||||
<select id="selectByType" resultType="com.chaozhanggui.system.cashierservice.entity.SysDict">
|
||||
select *
|
||||
from sys_dict
|
||||
where type = 'common'
|
||||
<if test="type != null and type !=''">
|
||||
or type = #{type}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectByDictId" resultType="com.chaozhanggui.system.cashierservice.entity.SysDictDetail">
|
||||
select * from sys_dict_detail
|
||||
where dict_id = #{dictId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,117 +1,48 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.SysDictMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysDict">
|
||||
<id column="dict_id" jdbcType="BIGINT" property="dictId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
dict_id, name, description, create_by, update_by, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sys_dict
|
||||
where dict_id = #{dictId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from sys_dict
|
||||
where dict_id = #{dictId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDict">
|
||||
insert into sys_dict (dict_id, name, description,
|
||||
create_by, update_by, create_time,
|
||||
update_time)
|
||||
values (#{dictId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
||||
#{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDict">
|
||||
insert into sys_dict
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="dictId != null">
|
||||
dict_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by,
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dictId != null">
|
||||
#{dictId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
#{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDict">
|
||||
update sys_dict
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where dict_id = #{dictId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysDict">
|
||||
update sys_dict
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where dict_id = #{dictId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysDict">
|
||||
<id column="dict_id" jdbcType="BIGINT" property="dictId"/>
|
||||
<result column="dict_name" jdbcType="VARCHAR" property="dictName"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="value" jdbcType="VARCHAR" property="value"/>
|
||||
<result column="is_child" jdbcType="INTEGER" property="isChild"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
dict_id
|
||||
, dict_name , name, value, is_child
|
||||
</sql>
|
||||
<sql id="Child_Column_List">
|
||||
dict_id
|
||||
, dict_name , name, value
|
||||
</sql>
|
||||
|
||||
<select id="selectHot" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_dict
|
||||
where type = 'hot'
|
||||
and status =1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<select id="selectByType" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_dict
|
||||
where type = 'common'
|
||||
<if test="type != null and type !=''">
|
||||
or type = #{type}
|
||||
</if>
|
||||
and status =1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<select id="selectByDictId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Child_Column_List"/>
|
||||
from sys_dict
|
||||
where dict_id = #{dictId} and status =1
|
||||
order by sort
|
||||
</select>
|
||||
</mapper>
|
||||
127
src/main/resources/mapper/TbGroupOrderCouponMapper.xml
Normal file
127
src/main/resources/mapper/TbGroupOrderCouponMapper.xml
Normal file
@@ -0,0 +1,127 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.TbGroupOrderCouponMapper">
|
||||
|
||||
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbGroupOrderCoupon" id="TbGroupOrderCouponMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="orderId" column="order_id" jdbcType="INTEGER"/>
|
||||
<result property="couponNo" column="coupon_no" jdbcType="VARCHAR"/>
|
||||
<result property="isRefund" column="is_refund" jdbcType="INTEGER"/>
|
||||
<result property="refundAmount" column="refund_amount" jdbcType="NUMERIC"/>
|
||||
<result property="refundReason" column="refund_reason" jdbcType="VARCHAR"/>
|
||||
<result property="refundDesc" column="refund_desc" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, order_id, coupon_no, is_refund, refund_amount, refund_reason, refund_desc </sql>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbGroupOrderCouponMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_group_order_coupon
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryByOrderId" resultMap="TbGroupOrderCouponMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_group_order_coupon
|
||||
where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<select id="queryNoRefundByOrderId" resultMap="TbGroupOrderCouponMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_group_order_coupon
|
||||
where order_id = #{orderId}
|
||||
AND isRefund = 0
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAll" resultMap="TbGroupOrderCouponMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_group_order_coupon
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
and order_id = #{orderId}
|
||||
</if>
|
||||
<if test="couponNo != null and couponNo != ''">
|
||||
and coupon_no = #{couponNo}
|
||||
</if>
|
||||
<if test="isRefund != null">
|
||||
and is_refund = #{isRefund}
|
||||
</if>
|
||||
<if test="refundAmount != null">
|
||||
and refund_amount = #{refundAmount}
|
||||
</if>
|
||||
<if test="refundReason != null and refundReason != ''">
|
||||
and refund_reason = #{refundReason}
|
||||
</if>
|
||||
<if test="refundDesc != null and refundDesc != ''">
|
||||
and refund_desc = #{refundDesc}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_group_order_coupon(order_id, coupon_no, is_refund, refund_amount, refund_reason, refund_desc)
|
||||
values (#{orderId}, #{couponNo}, #{isRefund}, #{refundAmount}, #{refundReason}, #{refundDesc})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_group_order_coupon(order_id, coupon_no, is_refund, refund_amount, refund_reason, refund_desc)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.orderId}, #{entity.couponNo}, #{entity.isRefund}, #{entity.refundAmount}, #{entity.refundReason},
|
||||
#{entity.refundDesc})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update tb_group_order_coupon
|
||||
<set>
|
||||
<if test="orderId != null">
|
||||
order_id = #{orderId},
|
||||
</if>
|
||||
<if test="couponNo != null and couponNo != ''">
|
||||
coupon_no = #{couponNo},
|
||||
</if>
|
||||
<if test="isRefund != null">
|
||||
is_refund = #{isRefund},
|
||||
</if>
|
||||
<if test="refundAmount != null">
|
||||
refund_amount = #{refundAmount},
|
||||
</if>
|
||||
<if test="refundReason != null and refundReason != ''">
|
||||
refund_reason = #{refundReason},
|
||||
</if>
|
||||
<if test="refundDesc != null and refundDesc != ''">
|
||||
refund_desc = #{refundDesc},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from tb_group_order_coupon
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -5,18 +5,20 @@
|
||||
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbGroupOrderInfo" id="TbGroupOrderInfoMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
|
||||
<result property="merchantId" column="merchant_id" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="userId" column="user_id" jdbcType="INTEGER"/>
|
||||
<result property="proId" column="pro_id" jdbcType="INTEGER"/>
|
||||
<result property="proName" column="pro_name" jdbcType="VARCHAR"/>
|
||||
<result property="proImg" column="pro_img" jdbcType="VARCHAR"/>
|
||||
<result property="couponNo" column="coupon_no" jdbcType="VARCHAR"/>
|
||||
<result property="couponUrl" column="coupon_url" jdbcType="VARCHAR"/>
|
||||
<result property="proName" column="pro_name" jdbcType="VARCHAR"/>
|
||||
<result property="expDate" column="exp_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="orderType" column="order_type" jdbcType="VARCHAR"/>
|
||||
<result property="payType" column="pay_type" jdbcType="VARCHAR"/>
|
||||
<result property="orderAmount" column="order_amount" jdbcType="NUMERIC"/>
|
||||
<result property="saveAmount" column="save_amount" jdbcType="NUMERIC"/>
|
||||
<result property="payAmount" column="pay_amount" jdbcType="NUMERIC"/>
|
||||
<result property="refundAmount" column="refund_amount" jdbcType="NUMERIC"/>
|
||||
<result property="refundNumber" column="refund_number" jdbcType="INTEGER"/>
|
||||
<result property="number" column="number" jdbcType="INTEGER"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
@@ -24,18 +26,20 @@
|
||||
<result property="payTime" column="pay_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="refundAble" column="refund_able" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="verifier" column="verifier" jdbcType="VARCHAR"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="payOrderNo" column="pay_order_no" jdbcType="VARCHAR"/>
|
||||
<result property="tradeDay" column="trade_day" jdbcType="TIMESTAMP"/>
|
||||
<result property="source" column="source" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, order_no, shop_id, user_id, pro_id, pro_name,pro_img, coupon_no, coupon_url, exp_date, order_type, order_amount, save_amount, pay_amount, number, status, remark, phone, pay_time, refund_able, create_time, update_time, pay_order_no, trade_day, source </sql>
|
||||
, order_no, merchant_id, shop_id, user_id, pro_id, pro_img, pro_name, exp_date, order_type, pay_type, order_amount, save_amount, pay_amount, refund_amount, refund_number, number, status, remark, phone, pay_time, refund_able, create_time, verifier, update_time, pay_order_no, trade_day, source </sql>
|
||||
<sql id="List_Column">
|
||||
id
|
||||
, order_no, pro_name,pro_img,coupon_url,order_amount, pay_amount, number, status </sql>
|
||||
, order_no, pro_name,pro_img,order_amount, pay_amount, number, status </sql>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbGroupOrderInfoMap">
|
||||
@@ -46,6 +50,14 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByPayOrderNo" resultMap="TbGroupOrderInfoMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_group_order_info
|
||||
where pay_order_no = #{payOrderNO}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAll" resultType="com.chaozhanggui.system.cashierservice.entity.vo.GroupOrderListVo">
|
||||
select
|
||||
@@ -66,28 +78,31 @@
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_group_order_info(order_no, shop_id, user_id, pro_id, pro_name, pro_img, coupon_no, coupon_url,
|
||||
exp_date, order_type, order_amount, save_amount, pay_amount, number, status,
|
||||
insert into tb_group_order_info(order_no, merchant_id, shop_id, user_id, pro_id, pro_name, pro_img,
|
||||
exp_date, order_type, pay_type, order_amount, save_amount, pay_amount, number,
|
||||
refund_number, status,
|
||||
remark, phone, pay_time, refund_able, create_time, update_time, pay_order_no,
|
||||
trade_day, source)
|
||||
values (#{orderNo}, #{shopId}, #{userId}, #{proId}, #{proName}, #{proImg}, #{couponNo}, #{couponUrl},
|
||||
#{expDate}, #{orderType}, #{orderAmount}, #{saveAmount}, #{payAmount}, #{number}, #{status}, #{remark},
|
||||
values (#{orderNo}, #{merchantId}, #{shopId}, #{userId}, #{proId}, #{proName}, #{proImg},
|
||||
#{expDate}, #{orderType}, #{payType}, #{orderAmount}, #{saveAmount}, #{payAmount}, #{number},
|
||||
#{refundNumber}, #{status}, #{remark},
|
||||
#{phone}, #{payTime}, #{refundAble}, #{createTime}, #{updateTime}, #{payOrderNo}, #{tradeDay},
|
||||
#{source})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_group_order_info(order_no, shop_id, user_id, pro_id, pro_name, pro_img, coupon_no, coupon_url,
|
||||
exp_date, order_type, order_amount, save_amount, pay_amount, number, status, remark, phone, pay_time,
|
||||
insert into tb_group_order_info(order_no,merchant_id, shop_id, user_id, pro_id, pro_name, pro_img,
|
||||
exp_date, order_type, pay_type, order_amount, save_amount, pay_amount, number, status, remark, phone, pay_time,
|
||||
refund_able, create_time, update_time, pay_order_no, trade_day, source)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.orderNo}, #{entity.shopId}, #{entity.userId}, #{entity.proId}, #{entity.proName},#{entity.proImg}
|
||||
#{entity.couponNo}, #{entity.couponUrl}, #{entity.expDate}, #{entity.orderType},
|
||||
#{entity.orderAmount}, #{entity.saveAmount}, #{entity.payAmount}, #{entity.number}, #{entity.status},
|
||||
(#{entity.orderNo},#{entity.merchantId} #{entity.shopId}, #{entity.userId}, #{entity.proId},
|
||||
#{entity.proName},#{entity.proImg},
|
||||
#{entity.expDate}, #{entity.orderType},
|
||||
#{entity.payType}, #{entity.orderAmount}, #{entity.saveAmount}, #{entity.payAmount}, #{entity.number},
|
||||
#{entity.status},
|
||||
#{entity.remark}, #{entity.phone}, #{entity.payTime}, #{entity.refundAble}, #{entity.createTime},
|
||||
#{entity.updateTime}, #{entity.payOrderNo}, #{entity.tradeDay}, #{entity.source})
|
||||
</foreach>
|
||||
@@ -100,6 +115,9 @@
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
order_no = #{orderNo},
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
merchant_id = #{merchantId},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId},
|
||||
</if>
|
||||
@@ -115,18 +133,15 @@
|
||||
<if test="proImg != null and proImg != ''">
|
||||
pro_img = #{proImg},
|
||||
</if>
|
||||
<if test="couponNo != null and couponNo != ''">
|
||||
coupon_no = #{couponNo},
|
||||
</if>
|
||||
<if test="couponUrl != null and couponUrl != ''">
|
||||
coupon_url = #{couponUrl},
|
||||
</if>
|
||||
<if test="expDate != null">
|
||||
exp_date = #{expDate},
|
||||
</if>
|
||||
<if test="orderType != null and orderType != ''">
|
||||
order_type = #{orderType},
|
||||
</if>
|
||||
<if test="payType != null and payType != ''">
|
||||
pay_type = #{payType},
|
||||
</if>
|
||||
<if test="orderAmount != null">
|
||||
order_amount = #{orderAmount},
|
||||
</if>
|
||||
@@ -172,13 +187,5 @@
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from tb_group_order_info
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@@ -551,7 +551,6 @@
|
||||
|
||||
|
||||
order by a.id desc
|
||||
Limit #{page}, #{size}
|
||||
</select>
|
||||
|
||||
<select id="selectByPayOrderNo" resultMap="BaseResultMap">
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="shareImg" column="share_img" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="value" column="value" jdbcType="VARCHAR"/>
|
||||
<result property="fontColor" column="font_color" jdbcType="VARCHAR"/>
|
||||
<result property="backColor" column="back_color" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||
@@ -25,7 +26,7 @@
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbPlatformDictMap">
|
||||
select
|
||||
id, name, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
|
||||
id, name,value, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
|
||||
from tb_platform_dict
|
||||
where id = #{id}
|
||||
</select>
|
||||
@@ -33,17 +34,18 @@
|
||||
|
||||
<select id="queryByIdList" resultMap="TbPlatformDictMap">
|
||||
select
|
||||
id, name, type, font_color, back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
|
||||
id, name,value, type, font_color, back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
|
||||
from tb_platform_dict
|
||||
where id IN
|
||||
<foreach collection="idList" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<select id="queryAllByType" resultType="com.chaozhanggui.system.cashierservice.entity.TbPlatformDict">
|
||||
select
|
||||
id, name, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
|
||||
id, name,value, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
|
||||
from tb_platform_dict
|
||||
<where>
|
||||
<if test="type != null and type != ''">
|
||||
@@ -56,6 +58,25 @@
|
||||
and is_show_mall = 1
|
||||
</if>
|
||||
</where>
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<select id="queryGroupByValue" resultType="com.chaozhanggui.system.cashierservice.entity.TbPlatformDict">
|
||||
select
|
||||
id, name,value, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url,
|
||||
created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
|
||||
from tb_platform_dict
|
||||
<where>
|
||||
value = #{value}
|
||||
and type = 'group'
|
||||
<if test="environment == 'app'">
|
||||
and is_show_app = 1
|
||||
</if>
|
||||
<if test="environment == 'wx'">
|
||||
and is_show_mall = 1
|
||||
</if>
|
||||
</where>
|
||||
order by sort
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
||||
@@ -222,4 +222,16 @@
|
||||
</if>
|
||||
order by g.sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectByShopId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tb_product_group
|
||||
where shop_id=#{shopId} and is_show=1
|
||||
<if test="groupId != null">
|
||||
and id = #{groupId}
|
||||
</if>
|
||||
order by g.sort asc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -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>
|
||||
@@ -396,7 +396,7 @@
|
||||
pro.cover_img AS image,
|
||||
sku.origin_price AS originPrice,
|
||||
sku.sale_price AS salePrice,
|
||||
MAX( sku.real_sales_number ) AS realSalesNumber
|
||||
pro.real_sales_number AS realSalesNumber
|
||||
FROM
|
||||
tb_product pro
|
||||
LEFT JOIN tb_product_sku sku ON pro.id = sku.product_id
|
||||
@@ -415,7 +415,7 @@
|
||||
pro.cover_img AS image,
|
||||
sku.origin_price AS originPrice,
|
||||
sku.sale_price AS salePrice,
|
||||
MAX( sku.real_sales_number ) AS realSalesNumber
|
||||
pro.real_sales_number AS realSalesNumber
|
||||
FROM
|
||||
tb_product pro
|
||||
LEFT JOIN tb_product_sku sku ON pro.id = sku.product_id
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
<result column="type" jdbcType="VARCHAR" property="type"/>
|
||||
<result column="industry" jdbcType="VARCHAR" property="industry"/>
|
||||
<result column="industry_name" jdbcType="VARCHAR" property="industryName"/>
|
||||
<result column="business_start_day" jdbcType="VARCHAR" property="businessStartDay"/>
|
||||
<result column="business_end_day" jdbcType="VARCHAR" property="businessEndDay"/>
|
||||
<result column="business_time" jdbcType="VARCHAR" property="businessTime"/>
|
||||
<result column="post_time" jdbcType="VARCHAR" property="postTime"/>
|
||||
<result column="post_amount_line" jdbcType="DECIMAL" property="postAmountLine"/>
|
||||
@@ -56,7 +58,7 @@
|
||||
, account, shop_code, sub_title, merchant_id, shop_name, chain_name, back_img,
|
||||
front_img, contact_name, phone, logo, is_deposit, is_supply, cover_img, share_img,
|
||||
detail, lat, lng, mch_id, register_type, is_wx_ma_independent, address, city, type,
|
||||
industry, industry_name, business_time, post_time, post_amount_line, on_sale, settle_type,
|
||||
industry, industry_name, business_start_day,business_end_day,business_time, post_time, post_amount_line, on_sale, settle_type,
|
||||
settle_time, enter_at, expire_at, status, average, order_wait_pay_minute, support_device_number,
|
||||
distribute_level, created_at, updated_at, proxy_id, shop_qrcode, tag,is_open_yhq
|
||||
</sql>
|
||||
@@ -72,6 +74,13 @@
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<select id="selNumByChain" resultType="java.lang.Integer">
|
||||
select
|
||||
count(1)
|
||||
from tb_shop_info
|
||||
where chain_name = #{chainName}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selShopInfoByGps" resultType="com.chaozhanggui.system.cashierservice.entity.vo.SubShopVo">
|
||||
SELECT
|
||||
@@ -80,11 +89,14 @@
|
||||
tb_shop_info as info
|
||||
<where>
|
||||
info.status=1
|
||||
AND info.cities =#{cities}
|
||||
AND (info.cities =#{cities} or info.districts =#{cities})
|
||||
<if test="rightTopLng != null and rightTopLng != '' and leftBottomLng != null and leftBottomLng != ''">
|
||||
AND info.lng BETWEEN #{leftBottomLng} AND #{rightTopLng}
|
||||
AND info.lat BETWEEN #{leftBottomLat} AND #{rightTopLat}
|
||||
</if>
|
||||
<if test="shopName != null and shopName != ''">
|
||||
AND shop_name = #{shopName}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY (ABS(info.lat - #{lat}) + ABS(info.lng - #{lng})) ASC
|
||||
</select>
|
||||
|
||||
@@ -35,6 +35,15 @@
|
||||
from tb_shop_table
|
||||
where qrcode = #{qrcode}
|
||||
</select>
|
||||
|
||||
<select id="queryShopIdByTableCode" resultType="string">
|
||||
select
|
||||
shop_id
|
||||
from tb_shop_table
|
||||
where qrcode = #{qrcode}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectShopTableById" resultType="com.chaozhanggui.system.cashierservice.entity.TbShopTable">
|
||||
select
|
||||
a.id, a.name, a.shop_id, a.max_capacity, a.sort, a.area_id, a.is_predate, a.predate_amount, a.status,
|
||||
|
||||
Reference in New Issue
Block a user