购物车 多规格商品返回规格信息

团购卷列表
团购卷退款
员工登录管理
This commit is contained in:
2024-05-24 15:56:41 +08:00
parent c5e337bef3
commit 3e6cb81b46
26 changed files with 1247 additions and 36 deletions

View 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="queryByCoupon" resultMap="TbGroupOrderCouponMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_coupon
where coupon_no = #{couponNo}
and is_refund = 0;
</select>
<select id="queryNoRefundByOrderId" resultMap="TbGroupOrderCouponMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_coupon
where order_id = #{orderId}
and is_refund = 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>

View File

@@ -0,0 +1,288 @@
<?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="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="proImg" column="pro_img" 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"/>
<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="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, 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>
<!--查询单个-->
<select id="queryById" resultMap="TbGroupOrderInfoMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_info
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAll" resultMap="TbGroupOrderInfoMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_info
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="orderNo != null and orderNo != ''">
and order_no = #{orderNo}
</if>
<if test="merchantId != null">
and merchant_id = #{merchantId}
</if>
<if test="shopId != null">
and shop_id = #{shopId}
</if>
<if test="userId != null">
and user_id = #{userId}
</if>
<if test="proId != null">
and pro_id = #{proId}
</if>
<if test="proImg != null and proImg != ''">
and pro_img = #{proImg}
</if>
<if test="proName != null and proName != ''">
and pro_name = #{proName}
</if>
<if test="expDate != null">
and exp_date = #{expDate}
</if>
<if test="orderType != null and orderType != ''">
and order_type = #{orderType}
</if>
<if test="payType != null and payType != ''">
and pay_type = #{payType}
</if>
<if test="orderAmount != null">
and order_amount = #{orderAmount}
</if>
<if test="saveAmount != null">
and save_amount = #{saveAmount}
</if>
<if test="payAmount != null">
and pay_amount = #{payAmount}
</if>
<if test="refundAmount != null">
and refund_amount = #{refundAmount}
</if>
<if test="refundNumber != null">
and refund_number = #{refundNumber}
</if>
<if test="number != null">
and number = #{number}
</if>
<if test="status != null and status != ''">
and status = #{status}
</if>
<if test="remark != null and remark != ''">
and remark = #{remark}
</if>
<if test="phone != null and phone != ''">
and phone = #{phone}
</if>
<if test="payTime != null">
and pay_time = #{payTime}
</if>
<if test="refundAble != null">
and refund_able = #{refundAble}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="verifier != null and verifier != ''">
and verifier = #{verifier}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="payOrderNo != null and payOrderNo != ''">
and pay_order_no = #{payOrderNo}
</if>
<if test="tradeDay != null">
and trade_day = #{tradeDay}
</if>
<if test="source != null">
and source = #{source}
</if>
</where>
</select>
<select id="queryList" resultMap="TbGroupOrderInfoMap">
select
<include refid="Base_Column_List"/>
from tb_group_order_info
<where>
shop_id = #{shopId}
<if test="orderNo != null and orderNo != ''">
and order_no = #{orderNo}
</if>
<if test="proName != null and proName != ''">
and pro_name LIKE CONCAT('%', #{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, 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)
values (#{orderNo}, #{merchantId}, #{shopId}, #{userId}, #{proId}, #{proImg}, #{proName}, #{expDate},
#{orderType}, #{payType}, #{orderAmount}, #{saveAmount}, #{payAmount}, #{refundAmount}, #{refundNumber},
#{number}, #{status}, #{remark}, #{phone}, #{payTime}, #{refundAble}, #{createTime}, #{verifier},
#{updateTime}, #{payOrderNo}, #{tradeDay}, #{source})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into tb_group_order_info(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)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.orderNo}, #{entity.merchantId}, #{entity.shopId}, #{entity.userId}, #{entity.proId},
#{entity.proImg}, #{entity.proName}, #{entity.expDate}, #{entity.orderType}, #{entity.payType},
#{entity.orderAmount}, #{entity.saveAmount}, #{entity.payAmount}, #{entity.refundAmount},
#{entity.refundNumber}, #{entity.number}, #{entity.status}, #{entity.remark}, #{entity.phone},
#{entity.payTime}, #{entity.refundAble}, #{entity.createTime}, #{entity.verifier}, #{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="merchantId != null">
merchant_id = #{merchantId},
</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="proImg != null and proImg != ''">
pro_img = #{proImg},
</if>
<if test="proName != null and proName != ''">
pro_name = #{proName},
</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>
<if test="saveAmount != null">
save_amount = #{saveAmount},
</if>
<if test="payAmount != null">
pay_amount = #{payAmount},
</if>
<if test="refundAmount != null">
refund_amount = #{refundAmount},
</if>
<if test="refundNumber != null">
refund_number = #{refundNumber},
</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="verifier != null and verifier != ''">
verifier = #{verifier},
</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>

View File

@@ -14,10 +14,13 @@
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="is_manage" jdbcType="INTEGER" property="isManage" />
<result column="is_pc" jdbcType="INTEGER" property="isPc" />
</resultMap>
<sql id="Base_Column_List">
id, code, name, account, password, max_discount_amount, status, employee, shop_id,
created_at, updated_at, type
id
, code, name, account, password, max_discount_amount, status, employee, shop_id,
created_at, updated_at, type,is_manage,is_pc
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -33,12 +36,13 @@
insert into tb_pluss_shop_staff (id, code, name,
account, password, max_discount_amount,
status, employee, shop_id,
created_at, updated_at, type
created_at, updated_at, type,is_manage,is_pc
)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{maxDiscountAmount,jdbcType=DECIMAL},
#{status,jdbcType=BIT}, #{employee,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR},
#{isManage,jdbcType=INTEGER},#{isPc,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
@@ -80,6 +84,12 @@
<if test="type != null">
type,
</if>
<if test="isManage != null">
is_manage,
</if>
<if test="isPc != null">
is_pc,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -118,6 +128,12 @@
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="isManage != null">
#{isManage,jdbcType=INTEGER},
</if>
<if test="isPc != null">
#{isPc,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
@@ -156,23 +172,31 @@
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="isManage != null">
is_manage = #{isManage,jdbcType=INTEGER},
</if>
<if test="isPc != null">
is_pc = #{isPc,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
update tb_pluss_shop_staff
set code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
account = #{account,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
max_discount_amount = #{maxDiscountAmount,jdbcType=DECIMAL},
status = #{status,jdbcType=BIT},
employee = #{employee,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
type = #{type,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
update tb_pluss_shop_staff
set code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
account = #{account,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
max_discount_amount = #{maxDiscountAmount,jdbcType=DECIMAL},
status = #{status,jdbcType=BIT},
employee = #{employee,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
type = #{type,jdbcType=VARCHAR},
is_manage = #{isManage,jdbcType=INTEGER},
is_pc = #{isPc,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByAccount" resultMap="BaseResultMap">