You've already forked FrameTour-BE
修改bug,添加数据统计相关类
This commit is contained in:
@ -21,9 +21,9 @@
|
||||
<result column="cancel_at" property="cancelAt"/>
|
||||
<result column="create_at" property="createAt"/>
|
||||
<result column="update_at" property="updateAt"/>
|
||||
<collection property="orderItemList" ofType="com.ycwl.basic.model.pc.order.resp.OrderItemVO">
|
||||
<collection property="orderItemList" select="getOrderItemList" column="id" ofType="com.ycwl.basic.model.pc.order.resp.OrderItemVO">
|
||||
<result column="oiId" property="id"/>
|
||||
<result column="id" property="orderId"/>
|
||||
<result column="orderId" property="orderId"/>
|
||||
<result column="goods_id" property="goodsId"/>
|
||||
<result column="scenicName" property="scenicName"/>
|
||||
<result column="goodsName" property="goodsName"/>
|
||||
@ -58,7 +58,7 @@
|
||||
<result column="sourceType" property="sourceType"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
<select id="getOrderItemList" parameterType="java.lang.Integer" resultType="com.ycwl.basic.model.pc.order.resp.OrderItemVO">
|
||||
<select id="getOrderItemList" parameterType="java.lang.Long" resultType="com.ycwl.basic.model.pc.order.resp.OrderItemVO">
|
||||
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,
|
||||
@ -120,8 +120,8 @@
|
||||
delete from `order` where id = #{id}
|
||||
</delete>
|
||||
<select id="list" resultMap="PCBaseResultMap">
|
||||
select 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,oi.id oiId, o.goods_type, oi.goods_id
|
||||
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
|
||||
from `order` AS o
|
||||
left join member m on o.member_id = m.id
|
||||
left join order_item oi on o.id = oi.order_id
|
||||
@ -204,10 +204,6 @@
|
||||
select count(1) num
|
||||
from `order` o
|
||||
left join member m on o.member_id = m.id
|
||||
left join order_item oi on o.id = oi.order_id
|
||||
left join template t on o.goods_type='3' and oi.goods_id = t.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>
|
||||
<if test="id!= null ">
|
||||
and o.id = #{id}
|
||||
|
@ -2,8 +2,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.pc.ScenicMapper">
|
||||
<insert id="add">
|
||||
insert into scenic(id, `name`, introduction, longitude, latitude, radius, province, city, area, address)
|
||||
values (#{id}, #{name}, #{introduction}, #{longitude}, #{latitude}, #{radius}, #{province}, #{city}, #{area}, #{address})
|
||||
insert into scenic(id, `name`, introduction,cover_url, longitude, latitude, radius, province, city, area, address)
|
||||
values (#{id}, #{name}, #{introduction}, #{coverUrl},#{longitude}, #{latitude}, #{radius}, #{province}, #{city}, #{area}, #{address})
|
||||
</insert>
|
||||
<insert id="addConfig">
|
||||
insert into scenic_config(id, scenic_id, start_time, end_time, is_default)
|
||||
@ -22,6 +22,9 @@
|
||||
<if test="introduction!=null and introduction!=''">
|
||||
introduction=#{introduction},
|
||||
</if>
|
||||
<if test="coverUrl!=null and coverUrl!=''">
|
||||
cover_url=#{coverUrl},
|
||||
</if>
|
||||
<if test="longitude!=null">
|
||||
longitude=#{longitude},
|
||||
</if>
|
||||
@ -80,7 +83,7 @@
|
||||
delete from scenic_config where scenic_id = #{scenicId}
|
||||
</delete>
|
||||
<select id="list" resultMap="scenicAndConfig">
|
||||
select s.id, `name`, `phone`, introduction, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time,
|
||||
select s.id, `name`, `phone`, introduction,cover_url, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time,
|
||||
c.start_time, c.end_time,
|
||||
(select scenic_account.account from scenic_account where scenic_account.scenic_id = s.id and scenic_account.is_super = 1 limit 1) as account,
|
||||
c.is_default, c.create_time createTime2,s.price
|
||||
@ -111,14 +114,14 @@
|
||||
</where>
|
||||
</select>
|
||||
<select id="getById" resultMap="scenicAndConfig">
|
||||
select s.id, `name`, `phone`, introduction, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time,
|
||||
select s.id, `name`, `phone`, introduction,cover_url, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time,
|
||||
c.start_time, c.end_time, c.is_default, c.create_time createTime2,s.price
|
||||
from scenic s
|
||||
left join scenic_config c on s.id = c.id
|
||||
where s.id = #{id}
|
||||
</select>
|
||||
<select id="appList" resultType="com.ycwl.basic.model.mobile.scenic.ScenicAppVO">
|
||||
select s.id, `name`, `phone`, introduction, longitude, latitude, radius, province, city, area, address
|
||||
select s.id, `name`, `phone`, introduction,cover_url, longitude, latitude, radius, province, city, area, address
|
||||
from scenic s
|
||||
where
|
||||
`status` = 1
|
||||
@ -142,7 +145,7 @@
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAppById" resultType="com.ycwl.basic.model.pc.scenic.resp.ScenicRespVO">
|
||||
select s.id, `name`, `phone`, introduction, longitude, latitude, radius, province, city, area, address
|
||||
select s.id, `name`, `phone`, introduction,cover_url, longitude, latitude, radius, province, city, area, address
|
||||
from scenic s
|
||||
where `status` = 1 and s.id = #{id}
|
||||
</select>
|
||||
@ -151,6 +154,7 @@
|
||||
`name`,
|
||||
`phone`,
|
||||
introduction,
|
||||
cover_url,
|
||||
longitude,
|
||||
latitude,
|
||||
radius,
|
||||
@ -178,6 +182,7 @@
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="account" column="account"/>
|
||||
<result property="introduction" column="introduction"/>
|
||||
<result property="coverUrl" column="cover_url"/>
|
||||
<result property="longitude" column="longitude"/>
|
||||
<result property="latitude" column="latitude"/>
|
||||
<result property="radius" column="radius"/>
|
||||
|
@ -11,6 +11,7 @@
|
||||
<if test="deviceId!= null">device_id = #{deviceId}, </if>
|
||||
<if test="memberId!= null">member_id = #{memberId}, </if>
|
||||
<if test="url!= null">url = #{url}, </if>
|
||||
<if test="isBuy!=null">is_buy = #{isBuy}, </if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -43,7 +44,7 @@
|
||||
where so.id = #{id}
|
||||
</select>
|
||||
<select id="listGroupByType" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
||||
select so.id, scenic_id,sc.name scenicName, sc.longitude ,sc.latitude,so.type
|
||||
select so.id, scenic_id,sc.name scenicName, sc.longitude ,sc.latitude,so.type,so.is_buy
|
||||
from source so
|
||||
left join scenic sc on sc.id = so.scenic_id
|
||||
<where>
|
||||
|
4
src/main/resources/mapper/pc/StatisticsMapper.xml
Normal file
4
src/main/resources/mapper/pc/StatisticsMapper.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?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.StatisticsMapper">
|
||||
</mapper>
|
@ -45,7 +45,7 @@
|
||||
delete from template where scenic_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`, 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
|
||||
from template t left join scenic s on s.id = t.scenic_id
|
||||
<where>
|
||||
<if test="pid!=null" >
|
||||
@ -62,12 +62,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, 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
|
||||
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, 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
|
||||
from template t left join scenic s on s.id = t.scenic_id
|
||||
where pid = #{id}
|
||||
</select>
|
||||
|
@ -23,7 +23,7 @@
|
||||
</delete>
|
||||
<select id="list" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
|
||||
select v.id, v.scenic_id, member_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
|
||||
s.name scenicName, s.latitude, s.longitude, t.name templateName, t.price templatePrice,t.cover_url templateCoverUrl
|
||||
s.name scenicName, s.latitude, s.longitude, t.name templateName, t.price templatePrice,t.cover_url templateCoverUrl,v.is_buy
|
||||
from video v
|
||||
left join scenic s on s.id = v.scenic_id
|
||||
left join template t on v.template_id = t.id
|
||||
@ -44,7 +44,7 @@
|
||||
</select>
|
||||
<select id="getById" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
|
||||
select v.id, v.scenic_id, member_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
|
||||
t.name templateName,t.price templatePrice
|
||||
t.name templateName,t.price templatePrice,v.is_buy isBuy
|
||||
from video v
|
||||
left join template t on v.template_id = t.id
|
||||
where v.id = #{id}
|
||||
|
Reference in New Issue
Block a user