This commit is contained in:
2024-12-20 17:34:25 +08:00
parent bf5fdeb95c
commit 43ae10916c
29 changed files with 325 additions and 58 deletions

View File

@ -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)
values (#{id}, #{name}, #{introduction}, #{phone}, #{coverUrl},#{longitude}, #{latitude}, #{radius}, #{province}, #{city}, #{area}, #{address})
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>
<insert id="addConfig">
insert into scenic_config(id, scenic_id, create_time)
@ -46,6 +46,12 @@
<if test="address!=null and address!=''">
address=#{address},
</if>
<if test="kfCodeUrl!=null and kfCodeUrl!=''">
kf_code_url=#{kfCodeUrl},
</if>
<if test="kfPhone!=null and kfPhone!=''">
kf_phone=#{kfPhone},
</if>
</set>
where id = #{id}
</update>
@ -146,7 +152,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
select s.id, `name`, `phone`, introduction,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>