实现商品信息查询和商品价格查询逻辑

This commit is contained in:
longbinbin
2024-12-05 17:05:59 +08:00
parent 3114fc7046
commit 92dfc1ceff
22 changed files with 399 additions and 11 deletions

View File

@ -107,7 +107,7 @@
</select>
<select id="getById" resultMap="scenicAndConfig">
select s.id, `name`, introduction, 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
c.start_time, c.end_time, c.is_default, c.create_time,s.price
from scenic s
left join scenic_config c on s.id = c.id
where s.id = #{id}

View File

@ -27,6 +27,10 @@
<if test="deviceId!= null">and device_id = #{deviceId} </if>
<if test="memberId!= null">and member_id = #{memberId} </if>
<if test="url!= null">and url = #{url} </if>
<if test="isBuy!=null">
and is_buy = #{isBuy}
</if>
<if test="type!=null">and so.type = #{type} </if>
<if test="startTime!= null">and so.create_time &gt;= #{startTime} </if>
<if test="endTime!= null">and so.create_time &lt;= #{endTime} </if>
</where>
@ -35,6 +39,19 @@
select so.id, scenic_id, device_id, member_id, url, so.create_time, so.update_time,sc.`name` as scenicName
from source so
left join scenic sc on sc.id = so.scenic_id
where id = #{id}
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
from source so
left join scenic sc on sc.id = so.scenic_id
<where>
<if test="scenicId!= null">and scenic_id = #{scenicId} </if>
<if test="memberId!= null">and member_id = #{memberId} </if>
<if test="isBuy!=null">
and is_buy = #{isBuy}
</if>
</where>
group by so.type
</select>
</mapper>

View File

@ -21,8 +21,11 @@
delete from video where id = #{id}
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
select id, scenic_id, member_id, template_id, task_id, worker_id, video_url, create_time, update_time
from video
select v.id, 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
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 scenic_id = #{scenicId} </if>
<if test="memberId!= null">and member_id = #{memberId} </if>
@ -31,13 +34,18 @@
and task_id = #{taskId}
</if>
<if test="workerId!= null">and worker_id = #{workerId} </if>
<if test="startTime!= null">and create_time &gt;= #{startTime} </if>
<if test="endTime!= null">and create_time &lt;= #{endTime} </if>
<if test="isBuy!=null">
and is_buy = #{isBuy}
</if>
<if test="startTime!= null">and v.create_time &gt;= #{startTime} </if>
<if test="endTime!= null">and v.create_time &lt;= #{endTime} </if>
</where>
</select>
<select id="getById" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
select id, scenic_id, member_id, template_id, task_id, worker_id, video_url, create_time, update_time
from video
where id = #{id}
select v.id, scenic_id, member_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
t.name templateName,t.price templatePrice
from video v
left join template t on v.template_id = t.id
where v.id = #{id}
</select>
</mapper>