退款列表、部分接口修改

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

@ -14,7 +14,7 @@ spring:
datasource: # 数据源的相关配置
type: com.zaxxer.hikari.HikariDataSource # 数据源类型HikariCP
driver-class-name: com.mysql.cj.jdbc.Driver # mysql驱动
url: jdbc:mysql://106.14.162.214:3306/zt?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
url: jdbc:mysql://127.0.0.1:3306/zt?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: zt
password: ZhEnTuAi2024zHeNtUaI
hikari:

View File

@ -1,22 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!-- appender是configuration的子节点是负责写日志的组件。 -->
<!-- ConsoleAppender把日志输出到控制台 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- 默认情况下,每个日志事件都会立即刷新到基础输出流。 这种默认方法更安全因为如果应用程序在没有正确关闭appender的情况下退出则日志事件不会丢失。
但是为了显着增加日志记录吞吐量您可能希望将immediateFlush属性设置为false -->
<!--<immediateFlush>true</immediateFlush>-->
<encoder>
<!-- %37():如果字符没有37个字符长度,则左侧用空格补齐 -->
<!-- %-37():如果字符没有37个字符长度,则右侧用空格补齐 -->
<!-- %15.15():如果记录的线程字符长度小于15(第一个)则用空格在左侧补齐,如果字符长度大于15(第二个),则从开头开始截断多余的字符 -->
<!-- %-40.40():如果记录的logger字符长度小于40(第一个)则用空格在右侧补齐,如果字符长度大于40(第二个),则从开头开始截断多余的字符 -->
<!-- %msg日志打印详情 -->
<!-- %n:换行符 -->
<!-- %highlight():转换说明符以粗体红色显示其级别为ERROR的事件红色为WARNBLUE为INFO以及其他级别的默认颜色。 -->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight(%-5level) --- [%15.15(%thread)] %cyan(%-40.40(%logger{40})) : %msg%n</pattern>
<!-- 控制台也要使用UTF-8不要使用GBK否则会中文乱码 -->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} (%-5level) (%-40.40(%logger{40})) : %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
@ -116,13 +103,7 @@
</encoder>
</appender>
<!--给定记录器的每个启用的日志记录请求都将转发到该记录器中的所有appender以及层次结构中较高的appender不用在意level值
换句话说appender是从记录器层次结构中附加地继承的。
例如如果将控制台appender添加到根记录器则所有启用的日志记录请求将至少在控制台上打印。
如果另外将文件追加器添加到记录器例如L则对L和L'子项启用的记录请求将打印在文件和控制台上。
通过将记录器的additivity标志设置为false可以覆盖此默认行为以便不再添加appender累积-->
<!-- configuration中最多允许一个root别的logger如果没有设置级别则从父级别root继承 -->
<root level="INFO">
<root level="WARN">
<appender-ref ref="STDOUT" />
</root>

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>