You've already forked FrameTour-BE
补充全免费逻辑
This commit is contained in:
@ -111,8 +111,8 @@
|
||||
</select>
|
||||
|
||||
<insert id="add">
|
||||
insert into `order`(id, member_id, openid, price, pay_price, remark, broker_id, promo_code, scenic_id)
|
||||
VALUES (#{id}, #{memberId}, #{openId}, #{price}, #{payPrice}, #{remark}, #{brokerId}, #{promoCode}, #{scenicId})
|
||||
insert into `order`(id, member_id, openid, slash_price, price, pay_price, remark, broker_id, promo_code, scenic_id, status)
|
||||
VALUES (#{id}, #{memberId}, #{openId}, #{slashPrice}, #{price}, #{payPrice}, #{remark}, #{brokerId}, #{promoCode}, #{scenicId}, #{status})
|
||||
</insert>
|
||||
<insert id="addOrderItems">
|
||||
insert into order_item(order_id,goods_type, goods_id) VALUES
|
||||
@ -343,5 +343,6 @@
|
||||
and oi.goods_id = #{goodsId}
|
||||
and oi.goods_type = #{goodsType}
|
||||
and o.status = 1
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
@ -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.ScenicMapper">
|
||||
<insert id="add">
|
||||
insert into scenic(id, `name`, introduction, phone, cover_url, longitude, latitude, radius, province, city, area, address, price, kf_code_url, kf_phone)
|
||||
values (#{id}, #{name}, #{introduction}, #{phone}, #{coverUrl},#{longitude}, #{latitude}, #{radius}, #{province}, #{city}, #{area}, #{address}, #{price}, #{kfCodeUrl}, #{kfPhone})
|
||||
insert into scenic(id, `name`, introduction, phone, cover_url, longitude, latitude, radius, province, city, area, address, price, kf_code_url, kf_phone, logo_url)
|
||||
values (#{id}, #{name}, #{introduction}, #{phone}, #{coverUrl},#{longitude}, #{latitude}, #{radius}, #{province}, #{city}, #{area}, #{address}, #{price}, #{kfCodeUrl}, #{kfPhone}, #{logoUrl})
|
||||
</insert>
|
||||
<insert id="addConfig">
|
||||
insert into scenic_config(id, scenic_id, create_time)
|
||||
@ -46,12 +46,15 @@
|
||||
<if test="address!=null and address!=''">
|
||||
address=#{address},
|
||||
</if>
|
||||
<if test="kfCodeUrl!=null and kfCodeUrl!=''">
|
||||
<if test="kfCodeUrl!=null">
|
||||
kf_code_url=#{kfCodeUrl},
|
||||
</if>
|
||||
<if test="kfPhone!=null and kfPhone!=''">
|
||||
<if test="kfPhone!=null">
|
||||
kf_phone=#{kfPhone},
|
||||
</if>
|
||||
<if test="logoUrl!=null">
|
||||
logo_url=#{logoUrl},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -96,7 +99,7 @@
|
||||
delete from scenic_config where scenic_id = #{scenicId}
|
||||
</delete>
|
||||
<select id="list" resultMap="scenic">
|
||||
select s.id, `name`, `phone`, introduction,cover_url, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time,
|
||||
select s.id, `name`, `phone`, introduction,logo_url,cover_url, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_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,
|
||||
s.price
|
||||
from scenic s
|
||||
@ -125,7 +128,7 @@
|
||||
</where>
|
||||
</select>
|
||||
<select id="getById" resultMap="scenic">
|
||||
select s.id, `name`, `phone`, introduction,cover_url, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time,
|
||||
select s.id, `name`, `phone`, introduction, logo_url,cover_url, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time,
|
||||
s.price
|
||||
from scenic s
|
||||
where s.id = #{id}
|
||||
@ -155,7 +158,7 @@
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAppById" resultType="com.ycwl.basic.model.pc.scenic.resp.ScenicRespVO">
|
||||
select s.id, `name`, `phone`, introduction,cover_url, longitude, latitude, radius, province, city, area, address, kf_code_url, kf_phone
|
||||
select s.id, `name`, `phone`, introduction, logo_url,cover_url, longitude, latitude, radius, province, city, area, address, kf_code_url, kf_phone
|
||||
from scenic s
|
||||
where `status` = 1 and s.id = #{id}
|
||||
</select>
|
||||
@ -202,6 +205,7 @@
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="account" column="account"/>
|
||||
<result property="introduction" column="introduction"/>
|
||||
<result property="logoUrl" column="logo_url"/>
|
||||
<result property="coverUrl" column="cover_url"/>
|
||||
<result property="longitude" column="longitude"/>
|
||||
<result property="latitude" column="latitude"/>
|
||||
|
@ -43,11 +43,12 @@
|
||||
</delete>
|
||||
|
||||
<select id="list" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
||||
select so.id, scenic_id, device_id, url, so.create_time, so.update_time,sc.`name` as scenicName, so.video_url, so.`type`, so.face_sample_id
|
||||
select so.id, so.scenic_id, de.name as deviceName, device_id, url, so.create_time, so.update_time,sc.`name` as scenicName, so.video_url, so.`type`, so.face_sample_id
|
||||
from source so
|
||||
left join scenic sc on sc.id = so.scenic_id
|
||||
left join device de on de.id = so.device_id
|
||||
<where>
|
||||
<if test="scenicId!= null">and scenic_id = #{scenicId} </if>
|
||||
<if test="scenicId!= null">and so.scenic_id = #{scenicId} </if>
|
||||
<if test="deviceId!= null">and device_id = #{deviceId} </if>
|
||||
<if test="url!= null">and url = #{url} </if>
|
||||
<if test="isBuy!=null">
|
||||
|
@ -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.VideoMapper">
|
||||
<insert id="add">
|
||||
insert into video(id, scenic_id, member_id, template_id, task_id, worker_id, video_url)
|
||||
values (#{id}, #{scenicId}, #{memberId}, #{templateId}, #{taskId}, #{workerId}, #{videoUrl})
|
||||
insert into video(id, scenic_id, template_id, task_id, worker_id, video_url)
|
||||
values (#{id}, #{scenicId}, #{templateId}, #{taskId}, #{workerId}, #{videoUrl})
|
||||
</insert>
|
||||
<insert id="addRelation">
|
||||
replace member_video(member_id, scenic_id, face_id, template_id, task_id, video_id, is_buy, order_id)
|
||||
@ -20,12 +20,10 @@
|
||||
update video
|
||||
<set>
|
||||
<if test="scenicId!= null">scenic_id = #{scenicId}, </if>
|
||||
<if test="memberId!= null">member_id = #{memberId}, </if>
|
||||
<if test="templateId!= null">template_id = #{templateId}, </if>
|
||||
<if test="taskId!= null">task_id = #{taskId}, </if>
|
||||
<if test="workerId!= null">worker_id = #{workerId}, </if>
|
||||
<if test="videoUrl!= null">video_url = #{videoUrl}, </if>
|
||||
<if test="isBuy!= null">is_buy = #{isBuy}, </if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -46,22 +44,16 @@
|
||||
delete from video where id = #{id}
|
||||
</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,v.is_buy
|
||||
select v.id, v.scenic_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
|
||||
from video v
|
||||
left join scenic s on s.id = v.scenic_id
|
||||
left join template t on v.template_id = t.id
|
||||
<where>
|
||||
<if test="scenicId!= null">and v.scenic_id = #{scenicId} </if>
|
||||
<if test="memberId!= null">and member_id = #{memberId} </if>
|
||||
<if test="templateId!= null">and template_id = #{templateId} </if>
|
||||
<if test="taskId!=null">
|
||||
and task_id = #{taskId}
|
||||
</if>
|
||||
<if test="taskId!=null">and task_id = #{taskId}</if>
|
||||
<if test="workerId!= null">and worker_id = #{workerId} </if>
|
||||
<if test="isBuy!=null">
|
||||
and is_buy = #{isBuy}
|
||||
</if>
|
||||
<if test="startTime!= null">and v.create_time >= #{startTime} </if>
|
||||
<if test="endTime!= null">and v.create_time <= #{endTime} </if>
|
||||
<if test="faceId!= null">
|
||||
@ -73,7 +65,7 @@
|
||||
order by v.create_time desc
|
||||
</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,
|
||||
select v.id, v.scenic_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
|
||||
t.name templateName,t.price templatePrice, t.cover_url templateCoverUrl, t.slash_price slashPrice,
|
||||
s.name scenicName
|
||||
from video v
|
||||
|
Reference in New Issue
Block a user