订单详情添加人脸ID

This commit is contained in:
2024-12-18 15:07:40 +08:00
parent d5cef538d1
commit 19e9d547fa
11 changed files with 143 additions and 2 deletions

View File

@ -55,6 +55,7 @@
<result column="oiId" property="id"/>
<result column="orderId" property="orderId"/>
<result column="goods_id" property="goodsId"/>
<result column="face_id" property="faceId"/>
<result column="scenicName" property="scenicName"/>
<result column="goodsName" property="goodsName"/>
<result column="videoUrl" property="videoUrl"/>
@ -66,6 +67,10 @@
select oi.id oiId,oi.order_id orderId,oi.goods_id,
sc.name scenicName,t.cover_url coverUrl,
if(oi.goods_type='1',t.name,(select count(1) from order_item oi2 where oi2.order_id=oi.order_id)) as goodsName,
if(oi.goods_type='1',
(select task.face_id from task where task.id = vd.task_id),
(select id face_id from face where FIND_IN_SET(sr.face_sample_id, face.match_sample_ids) > 0 limit 1)
) as face_id,
if(oi.goods_type='1',vd.video_url,sr.video_url) videoUrl,
if(oi.goods_type='2',sr.url,null) imgUrl,
if(oi.goods_type='2',sr.type,null) sourceType,
@ -308,7 +313,7 @@
</select>
<select id="appDetail" resultMap="AppBaseResultMap">
select distinct o.id, o.member_id,m.nickname ,m.real_name , o.openid, o.price, pay_price, remark, o.broker_id, o.promo_code,
refund_reason, refund_status, o.`status`, refund_at, pay_at, cancel_at,o.goods_type
refund_reason, refund_status, o.`status`, refund_at, pay_at, cancel_at,o.goods_type, o.create_at, o.scenic_id
,t.cover_url coverUrl
from `order` AS o
left join member m on o.member_id = m.id

View File

@ -0,0 +1,27 @@
<?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.ycwl.basic.mapper.PaymentMapper">
<insert id="addGetId" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
INSERT INTO payment(member_id,order_id,pay_price,create_time)
VALUES (#{memberId},#{orderId},#{payPrice},now())
</insert>
<update id="setPaid">
UPDATE payment SET pay_time = now() WHERE id = #{id}
</update>
<update id="setOutTradeNo">
UPDATE payment SET out_order_no = #{outOrderNo} WHERE id = #{id}
</update>
<update id="update">
UPDATE payment
<set>
<if test="memberId != null">member_id = #{memberId},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="outOrderNo != null">out_order_no = #{outOrderNo},</if>
<if test="payPrice != null">pay_price = #{payPrice},</if>
</set>
WHERE id = #{id}
</update>
<select id="findByOutTradeNo" resultType="com.ycwl.basic.model.pc.payment.entity.PaymentEntity">
SELECT * FROM payment WHERE out_order_no = #{outOrderNo}
</select>
</mapper>

View File

@ -0,0 +1,28 @@
<?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.ycwl.basic.mapper.RefundMapper">
<insert id="addGetId" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
INSERT INTO refund(member_id,order_id,out_refund_no,refund_price,reason,create_time)
VALUES (#{memberId},#{orderId},#{outRefundNo},#{refundPrice},#{reason},now())
</insert>
<update id="update">
UPDATE refund
<set>
<if test="memberId != null">member_id = #{memberId},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="outRefundNo != null">out_refund_no = #{outRefundNo},</if>
<if test="refundPrice != null">refund_price = #{refundPrice},</if>
<if test="reason != null">reason = #{reason},</if>
</set>
WHERE id = #{id}
</update>
<update id="setRefundNo">
UPDATE refund SET out_refund_no = #{outRefundNo} WHERE id = #{id}
</update>
<update id="setRefunded">
UPDATE refund SET refund_time = now() WHERE id = #{id}
</update>
<select id="findByOutRefundNo" resultType="com.ycwl.basic.model.pc.refund.entity.RefundEntity">
SELECT * FROM refund WHERE out_refund_no = #{outRefundNo}
</select>
</mapper>