验证码

个人中心-菜单页
首页接口
预约到店(店铺列表)
通用商品列表
登录 退出登录
商品详情(缺少评价部分)
订单页 列表 详情
This commit is contained in:
2024-04-29 10:22:32 +08:00
parent d86506da76
commit d391f136bf
44 changed files with 1301 additions and 418 deletions

View File

@@ -0,0 +1,184 @@
<?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.TbGroupOrderInfoMapper">
<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="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="expDate" column="exp_date" jdbcType="TIMESTAMP"/>
<result property="orderType" column="order_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="number" column="number" jdbcType="INTEGER"/>
<result property="status" column="status" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="phone" column="phone" jdbcType="VARCHAR"/>
<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="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>
<sql id="List_Column">
id
, order_no, pro_name,pro_img,coupon_url,order_amount, pay_amount, number, status </sql>
<!--查询单个-->
<select id="queryById" resultMap="TbGroupOrderInfoMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_info
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAll" resultType="com.chaozhanggui.system.cashierservice.entity.vo.GroupOrderListVo">
select
<include refid="List_Column"/>
from tb_group_order_info
<where>
<if test="userId != null">
and user_id = #{userId}
</if>
<if test="proName != null and proName != ''">
and pro_name = #{proName}
</if>
<if test="status != null and status != ''">
and status = #{status}
</if>
</where>
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,
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},
#{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,
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.remark}, #{entity.phone}, #{entity.payTime}, #{entity.refundAble}, #{entity.createTime},
#{entity.updateTime}, #{entity.payOrderNo}, #{entity.tradeDay}, #{entity.source})
</foreach>
</insert>
<!--通过主键修改数据-->
<update id="update">
update tb_group_order_info
<set>
<if test="orderNo != null and orderNo != ''">
order_no = #{orderNo},
</if>
<if test="shopId != null">
shop_id = #{shopId},
</if>
<if test="userId != null">
user_id = #{userId},
</if>
<if test="proId != null">
pro_id = #{proId},
</if>
<if test="proName != null and proName != ''">
pro_name = #{proName},
</if>
<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="orderAmount != null">
order_amount = #{orderAmount},
</if>
<if test="saveAmount != null">
save_amount = #{saveAmount},
</if>
<if test="payAmount != null">
pay_amount = #{payAmount},
</if>
<if test="number != null">
number = #{number},
</if>
<if test="status != null and status != ''">
status = #{status},
</if>
<if test="remark != null and remark != ''">
remark = #{remark},
</if>
<if test="phone != null and phone != ''">
phone = #{phone},
</if>
<if test="payTime != null">
pay_time = #{payTime},
</if>
<if test="refundAble != null">
refund_able = #{refundAble},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="payOrderNo != null and payOrderNo != ''">
pay_order_no = #{payOrderNo},
</if>
<if test="tradeDay != null">
trade_day = #{tradeDay},
</if>
<if test="source != null">
source = #{source},
</if>
</set>
where id = #{id}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete
from tb_group_order_info
where id = #{id}
</delete>
</mapper>