You've already forked FrameTour-BE
2
This commit is contained in:
@ -29,7 +29,8 @@
|
||||
</update>
|
||||
<update id="updateConfig">
|
||||
update device_config
|
||||
set store_type = #{storeType},
|
||||
set viid_type = #{viidType},
|
||||
store_type = #{storeType},
|
||||
store_config_json = #{storeConfigJson},
|
||||
store_expire_day = #{storeExpireDay},
|
||||
online_check = #{onlineCheck},
|
||||
|
@ -63,14 +63,16 @@
|
||||
</resultMap>
|
||||
<select id="getOrderItemList" parameterType="java.lang.Long" resultType="com.ycwl.basic.model.pc.order.resp.OrderItemVO">
|
||||
WITH member_video_data AS (
|
||||
SELECT mv.member_id, mv.video_id, t.cover_url, t.name, mv.face_id, v.video_url
|
||||
SELECT mv.member_id, mv.video_id, t.cover_url, t.name, mv.face_id, f.face_url, v.video_url
|
||||
FROM member_video mv
|
||||
LEFT JOIN face f ON mv.face_id = f.id
|
||||
LEFT JOIN template t ON mv.template_id = t.id
|
||||
LEFT JOIN video v ON mv.video_id = v.id
|
||||
),
|
||||
member_source_data AS (
|
||||
SELECT ms.member_id, ms.source_id, ms.face_id, s.video_url, s.url
|
||||
SELECT ms.member_id, ms.source_id, ms.face_id, f.face_url, s.video_url, s.url
|
||||
FROM member_source ms
|
||||
LEFT JOIN face f ON ms.face_id = f.id
|
||||
LEFT JOIN source s ON ms.source_id = s.id
|
||||
)
|
||||
SELECT
|
||||
@ -94,6 +96,11 @@
|
||||
WHEN '1' THEN oi.goods_id
|
||||
WHEN '2' THEN oi.goods_id
|
||||
END AS face_id,
|
||||
CASE oi.goods_type
|
||||
WHEN '0' THEN mvd.face_url
|
||||
WHEN '1' THEN msd.face_url
|
||||
WHEN '2' THEN msd.face_url
|
||||
END AS face_url,
|
||||
CASE oi.goods_type
|
||||
WHEN '0' THEN mvd.video_url
|
||||
WHEN '1' THEN msd.video_url
|
||||
|
@ -55,6 +55,9 @@
|
||||
<if test="logoUrl!=null">
|
||||
logo_url=#{logoUrl},
|
||||
</if>
|
||||
<if test="price!=null">
|
||||
price=#{price},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -10,7 +10,7 @@
|
||||
select ifnull(sum(pay_price),0) as payPrice
|
||||
from `order`
|
||||
where
|
||||
status = 1 and scenic_id = #{scenicId}
|
||||
(status = 1 or status = 2) and scenic_id = #{scenicId}
|
||||
<if test="startTime!= null">
|
||||
and create_at >= #{startTime}
|
||||
</if>
|
||||
@ -36,7 +36,7 @@
|
||||
</select>
|
||||
<select id="countScanCodeOfMember" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
IFNULL(SUM(count), 0) AS count
|
||||
IFNULL(count(count), 0) AS count
|
||||
FROM (
|
||||
select count(1) as count
|
||||
from statistics
|
||||
@ -52,7 +52,7 @@
|
||||
</select>
|
||||
<select id="countClickPayOfMember" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
IFNULL(SUM(count), 0) AS count
|
||||
IFNULL(count(count), 0) AS count
|
||||
FROM (
|
||||
select count(1) as count
|
||||
from statistics
|
||||
@ -68,7 +68,7 @@
|
||||
</select>
|
||||
<select id="countPayOfMember" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
IFNULL(SUM(count), 0) AS count
|
||||
IFNULL(count(count), 0) AS count
|
||||
FROM (
|
||||
select count(1) as count
|
||||
from statistics
|
||||
@ -116,7 +116,7 @@
|
||||
</select>
|
||||
<select id="countPushOfMember" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
IFNULL(SUM(count), 0) AS count
|
||||
IFNULL(count(count), 0) AS count
|
||||
FROM (
|
||||
select count(1) as count
|
||||
from statistics
|
||||
@ -142,15 +142,17 @@
|
||||
</if>
|
||||
</select>
|
||||
<select id="countUploadFaceOfMember" resultType="java.lang.Integer">
|
||||
select count(1) as count
|
||||
from face
|
||||
where scenic_id = #{scenicId}
|
||||
<if test="startTime!= null">
|
||||
and create_at >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!= null">
|
||||
and create_at <= #{endTime}
|
||||
select ifnull(count(1),0) as count
|
||||
from(
|
||||
select count(1) as count
|
||||
from face
|
||||
where scenic_id = #{scenicId}
|
||||
<if test="startTime!= null">and create_at >= #{startTime}
|
||||
</if><if test="
|
||||
endTime!= null">and create_at <= #{endTime}
|
||||
</if>
|
||||
group by member_id
|
||||
) a
|
||||
</select>
|
||||
<select id="countCompleteVideoOfMember" resultType="java.lang.Integer">
|
||||
select ifnull(count(1),0) as count
|
||||
@ -170,11 +172,11 @@
|
||||
</select>
|
||||
<select id="countTotalVisitorOfMember" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
IFNULL(SUM(count), 0) AS count
|
||||
IFNULL(count(count), 0) AS count
|
||||
FROM (
|
||||
select count(1) as count
|
||||
from statistics
|
||||
where type=0 and scenic_id = #{scenicId}
|
||||
where type in (0,10) and scenic_id = #{scenicId}
|
||||
<if test="startTime!= null">
|
||||
and create_time >= #{startTime}
|
||||
</if>
|
||||
@ -186,7 +188,7 @@
|
||||
</select>
|
||||
<select id="countCompleteOfVideo" resultType="java.lang.Integer">
|
||||
select count(1) as count
|
||||
from video
|
||||
from task
|
||||
where scenic_id = #{scenicId}
|
||||
<if test="startTime!= null">
|
||||
and create_time >= #{startTime}
|
||||
|
@ -68,7 +68,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, t.price, t.slash_price, t.sort
|
||||
select t.*, s.name as scenic_name
|
||||
from template t left join scenic s on s.id = t.scenic_id
|
||||
<where>
|
||||
pid = 0
|
||||
@ -84,12 +84,12 @@
|
||||
</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, t.price, t.sort
|
||||
select t.*, s.name as scenic_name
|
||||
from template t left join scenic s on s.id = t.scenic_id
|
||||
where t.id = #{id}
|
||||
</select>
|
||||
<select id="getByPid" 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.*, s.name as scenic_name
|
||||
from template t left join scenic s on s.id = t.scenic_id
|
||||
where pid = #{id}
|
||||
</select>
|
||||
|
Reference in New Issue
Block a user