退款列表、部分接口修改

This commit is contained in:
2024-12-19 10:35:25 +08:00
parent 19e9d547fa
commit eaf16c48c4
16 changed files with 211 additions and 70 deletions

View File

@ -131,7 +131,7 @@
</delete>
<select id="list" resultMap="PCBaseResultMap">
select distinct o.id, o.scenic_id, s.name as scenic_name, 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,oi.id oiId, o.goods_type, oi.goods_id
refund_reason, refund_status, o.`status`, refund_at, pay_at, cancel_at,oi.id oiId, o.goods_type, oi.goods_id, o.create_at
from `order` AS o
left join member m on o.member_id = m.id
left join scenic s on o.scenic_id = s.id
@ -324,4 +324,75 @@
left join scenic sc on (o.goods_type='1' and vd.scenic_id=sc.id) or (o.goods_type='2' and sr.scenic_id=sc.id)
where o.id = #{id}
</select>
<select id="refundList" resultType="com.ycwl.basic.model.pc.order.resp.OrderRespVO">
select distinct o.id, o.scenic_id, s.name as scenic_name, 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,oi.id oiId, o.goods_type, oi.goods_id, o.create_at
from `order` AS o
left join member m on o.member_id = m.id
left join scenic s on o.scenic_id = s.id
left join order_item oi on o.id = oi.order_id
left join source sr on o.goods_type='2' and oi.goods_id = sr.id
left join video vd on o.goods_type='1' and oi.goods_id = vd.id
<where>
o.refund_status != 0
<if test="id!= null ">
and o.id = #{id}
</if>
<if test="scenicId != null">
and o.scenic_id = #{scenicId}
</if>
<if test="memberNickname!= null and memberNickname!=''">
and m.nickname like concat('%',#{memberNickname},'%')
</if>
<if test="memberRealName!= null and memberRealName!=''">
and m.real_name like concat('%',#{memberRealName},'%')
</if>
<if test="price!= null ">
and o.price = #{price}
</if>
<if test="payPrice!= null ">
and pay_price = #{payPrice}
</if>
<if test="remark!= null and remark!= ''">
and remark like concat('%',#{remark},'%')
</if>
<if test="brokerId!= null ">
and o.broker_id = #{brokerId}
</if>
<if test="promoCode!= null and promoCode!= ''">
and o.promo_code like concat('%',#{promoCode},'%')
</if>
<if test="refundReason!= null and refundReason!= ''">
and refund_reason like concat('%',#{refundReason},'%')
</if>
<if test="status!= null ">
and o.`status` = #{status}
</if>
<if test="startCreateTime!= null ">
and o.create_at >= #{startCreateTime}
</if>
<if test="endCreateTime!= null ">
and o.create_at &lt;= #{endCreateTime}
</if>
<if test="startPayTime!= null ">
and pay_at &gt;= #{startPayTime}
</if>
<if test="endPayTime!= null ">
and pay_at &lt;= #{endPayTime}
</if>
<if test="startRefundTime!= null ">
and refund_at &gt;= #{startRefundTime}
</if>
<if test="endRefundTime!= null ">
and refund_at &lt;= #{endRefundTime}
</if>
<if test="startCancelTime!= null ">
and cancel_at &gt;= #{startCancelTime}
</if>
<if test="endCancelTime!= null ">
and cancel_at &lt;= #{endCancelTime}
</if>
</where>
order by o.create_at desc
</select>
</mapper>

View File

@ -54,7 +54,7 @@
delete from task where id = #{id}
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.task.resp.TaskRespVO">
select id, worker_id, member_id, template_id, scenic_id, task_params, video_url, `status`, result, create_time, update_time, start_time, end_time
select id, worker_id, face_id, member_id, template_id, scenic_id, task_params, video_url, `status`, result, create_time, update_time, start_time, end_time
from task
<where>
<if test="workerId!= null">and worker_id = #{workerId} </if>
@ -67,7 +67,7 @@ from task
</where>
</select>
<select id="getById" resultType="com.ycwl.basic.model.pc.task.resp.TaskRespVO">
select id, worker_id, member_id, template_id, scenic_id, task_params, video_url, `status`, result, create_time, update_time
select id, worker_id, face_id, member_id, template_id, scenic_id, task_params, video_url, `status`, result, create_time, update_time
from task
where id = #{id}
</select>

View File

@ -63,7 +63,7 @@
delete from template_config where id = #{id}
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.template.resp.TemplateRespVO">
select t.id, t.scenic_id, s.name as scenic_name, t.`name`, t.cover_url, t.status, t.create_time, t.update_time
select t.id, t.scenic_id, s.name as scenic_name, t.`name`, t.cover_url, t.status, t.create_time, t.update_time, t.price, t.sort
from template t left join scenic s on s.id = t.scenic_id
<where>
pid = 0
@ -79,7 +79,7 @@
</where>
</select>
<select id="getById" resultType="com.ycwl.basic.model.pc.template.resp.TemplateRespVO">
select t.id, t.scenic_id, s.name as scenic_name, t.`name`, pid, is_placeholder, source_url, luts, overlays, audios, frame_rate, speed, t.cover_url, t.status, t.create_time, t.update_time
select t.id, t.scenic_id, s.name as scenic_name, t.`name`, pid, is_placeholder, source_url, luts, overlays, audios, frame_rate, speed, t.cover_url, t.status, t.create_time, t.update_time, t.price, t.sort
from template t left join scenic s on s.id = t.scenic_id
where t.id = #{id}
</select>
@ -96,4 +96,14 @@
from template
where scenic_id = #{scenicId} and pid = 0
</select>
<select id="listFor" resultType="com.ycwl.basic.model.mobile.scenic.content.ContentPageVO">
select t.id templateId, t.scenic_id, s.name as scenic_name, t.`name`, pid, t.cover_url templateCoverUrl,
1 as sourceType,
(select IF(count(1) > 0,1,0) from video left join task on video.task_id = task.id where video.template_id=t.id and task.face_id = #{faceId}) contentType,
(select count(1) from video left join task on video.task_id = task.id where video.template_id=t.id and task.face_id = #{faceId} and video.is_buy = 1) isBuy,
t.create_time, t.price
from template t left join scenic s on s.id = t.scenic_id
where t.scenic_id = #{scenicId} and pid = 0 and t.status = 1
order by sort
</select>
</mapper>