You've already forked FrameTour-BE
Merge branch 'refs/heads/order_v2'
# Conflicts: # src/main/java/com/ycwl/basic/controller/mobile/manage/AppScenicAccountController.java
This commit is contained in:
@@ -3,4 +3,21 @@ server:
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: zt
|
||||
name: zt
|
||||
|
||||
# Feign配置(简化版,基于Nacos服务发现)
|
||||
feign:
|
||||
client:
|
||||
config:
|
||||
default:
|
||||
connectTimeout: 5000
|
||||
readTimeout: 10000
|
||||
loggerLevel: full
|
||||
decode404: true
|
||||
okhttp:
|
||||
enabled: true
|
||||
|
||||
# 开发环境日志配置
|
||||
logging:
|
||||
level:
|
||||
com.ycwl.basic.integration.scenic.client: DEBUG
|
@@ -3,4 +3,9 @@ server:
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: zt
|
||||
name: zt
|
||||
|
||||
# 生产环境日志级别
|
||||
logging:
|
||||
level:
|
||||
com.ycwl.basic.integration.scenic.client: WARN
|
@@ -1,267 +0,0 @@
|
||||
<?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.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, logo_url, source_video_price, source_image_price)
|
||||
values (#{id}, #{name}, #{introduction}, #{phone}, #{coverUrl},#{longitude}, #{latitude}, #{radius}, #{province}, #{city}, #{area}, #{address}, #{price}, #{kfCodeUrl}, #{kfPhone}, #{logoUrl}, #{sourceVideoPrice}, #{sourceImagePrice})
|
||||
</insert>
|
||||
<insert id="addConfig">
|
||||
insert into scenic_config(id, scenic_id, create_time)
|
||||
values (#{id}, #{scenicId}, now())
|
||||
</insert>
|
||||
<update id="update">
|
||||
update
|
||||
scenic
|
||||
<set>
|
||||
<if test="name!=null and name!=''">
|
||||
`name`=#{name},
|
||||
</if>
|
||||
<if test="phone!=null and phone!=''">
|
||||
`phone`=#{phone},
|
||||
</if>
|
||||
<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>
|
||||
<if test="latitude!=null">
|
||||
latitude=#{latitude},
|
||||
</if>
|
||||
<if test="radius!=null">
|
||||
radius=#{radius},
|
||||
</if>
|
||||
<if test="status!=null">
|
||||
status=#{status},
|
||||
</if>
|
||||
<if test="province!=null and province!=''">
|
||||
province=#{province},
|
||||
</if>
|
||||
<if test="city!=null and city!=''">
|
||||
city=#{city},
|
||||
</if>
|
||||
<if test="area!=null and area!=''">
|
||||
area=#{area},
|
||||
</if>
|
||||
<if test="address!=null and address!=''">
|
||||
address=#{address},
|
||||
</if>
|
||||
<if test="kfCodeUrl!=null">
|
||||
kf_code_url=#{kfCodeUrl},
|
||||
</if>
|
||||
<if test="kfPhone!=null">
|
||||
kf_phone=#{kfPhone},
|
||||
</if>
|
||||
<if test="logoUrl!=null">
|
||||
logo_url=#{logoUrl},
|
||||
</if>
|
||||
<if test="price!=null">
|
||||
price=#{price},
|
||||
</if>
|
||||
<if test="sourceVideoPrice!=null">
|
||||
source_video_price=#{sourceVideoPrice},
|
||||
</if>
|
||||
<if test="sourceImagePrice!=null">
|
||||
source_image_price=#{sourceImagePrice},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateStatus">
|
||||
update
|
||||
scenic
|
||||
set status = (CASE
|
||||
status
|
||||
WHEN 1 THEN
|
||||
0
|
||||
WHEN 0 THEN
|
||||
1
|
||||
END)
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateConfigById">
|
||||
update scenic_config
|
||||
<set>
|
||||
<if test="startTime!=null">
|
||||
start_time=#{startTime},
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
end_time=#{endTime},
|
||||
</if>
|
||||
<if test="isDefault!=null">
|
||||
is_default=#{isDefault},
|
||||
</if>
|
||||
all_free=#{allFree},
|
||||
book_routine=#{bookRoutine},
|
||||
tour_time=#{tourTime},
|
||||
sample_store_day=#{sampleStoreDay},
|
||||
face_store_day=#{faceStoreDay},
|
||||
video_store_day=#{videoStoreDay},
|
||||
template_new_video_type=#{templateNewVideoType},
|
||||
anti_screen_record_type=#{antiScreenRecordType},
|
||||
disable_source_video=#{disableSourceVideo},
|
||||
disable_source_image=#{disableSourceImage},
|
||||
video_source_store_day=#{videoSourceStoreDay},
|
||||
image_source_store_day=#{imageSourceStoreDay},
|
||||
user_source_expire_day=#{userSourceExpireDay},
|
||||
face_score_threshold=#{faceScoreThreshold},
|
||||
force_finish_time=#{forceFinishTime},
|
||||
face_detect_helper_threshold=#{faceDetectHelperThreshold},
|
||||
store_type=#{storeType},
|
||||
store_config_json=#{storeConfigJson},
|
||||
tmp_store_type=#{tmpStoreType},
|
||||
tmp_store_config_json=#{tmpStoreConfigJson},
|
||||
local_store_type=#{localStoreType},
|
||||
local_store_config_json=#{localStoreConfigJson},
|
||||
broker_direct_rate=#{brokerDirectRate},
|
||||
watermark_type=#{watermarkType},
|
||||
watermark_scenic_text=#{watermarkScenicText},
|
||||
watermark_dt_format=#{watermarkDtFormat},
|
||||
face_type=#{faceType},
|
||||
face_config_json=#{faceConfigJson},
|
||||
pay_type=#{payType},
|
||||
pay_config_json=#{payConfigJson},
|
||||
image_source_pack_hint=#{imageSourcePackHint},
|
||||
video_source_pack_hint=#{videoSourcePackHint},
|
||||
extra_notification_time=#{extraNotificationTime},
|
||||
photo_free_num= #{photoFreeNum},
|
||||
video_free_num= #{videoFreeNum},
|
||||
voucher_enable= #{voucherEnable}
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="deleteById">
|
||||
delete from scenic where id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteConfigByScenicId">
|
||||
delete from scenic_config where scenic_id = #{scenicId}
|
||||
</delete>
|
||||
<select id="list" resultMap="scenic">
|
||||
select s.id, `name`, `phone`, introduction,logo_url,cover_url, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time, kf_code_url, kf_phone,
|
||||
s.price, s.source_video_price, s.source_image_price,
|
||||
(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
|
||||
<where>
|
||||
<if test="name!=null and name!=''">
|
||||
and locate(#{name},`name`) > 0
|
||||
</if>
|
||||
<if test="province!=null and province!=''">
|
||||
and locate(#{province},`province`) > 0
|
||||
</if>
|
||||
<if test="city!=null and city!=''">
|
||||
and locate(#{city},`city`) > 0
|
||||
</if>
|
||||
<if test="area!=null and area!=''">
|
||||
and locate(#{area},`area`) > 0
|
||||
</if>
|
||||
<if test="status!=null">
|
||||
and `status` = #{status}
|
||||
</if>
|
||||
<if test="startTime!=null">
|
||||
and s.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
and s.create_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getById" resultMap="scenic">
|
||||
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, s.source_video_price, s.source_image_price, kf_code_url, kf_phone
|
||||
from scenic s
|
||||
where s.id = #{id}
|
||||
</select>
|
||||
<select id="appList" resultType="com.ycwl.basic.model.mobile.scenic.ScenicAppVO">
|
||||
select s.id, `name`, `phone`, introduction, cover_url, longitude, latitude, radius, province, city, area, address,
|
||||
(SELECT COUNT(1) FROM device WHERE scenic_id = s.id AND status = 1) as deviceNum
|
||||
from scenic s
|
||||
where
|
||||
`status` = 1
|
||||
<if test="name!=null and name!=''">
|
||||
and locate(#{name},`name`) > 0
|
||||
</if>
|
||||
<if test="province!=null and province!=''">
|
||||
and locate(#{province},`province`) > 0
|
||||
</if>
|
||||
<if test="city!=null and city!=''">
|
||||
and locate(#{city},`city`) > 0
|
||||
</if>
|
||||
<if test="area!=null and area!=''">
|
||||
and locate(#{area},`area`) > 0
|
||||
</if>
|
||||
<if test="startTime!=null">
|
||||
and s.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
and s.create_time <= #{endTime}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAppById" resultType="com.ycwl.basic.model.pc.scenic.resp.ScenicRespVO">
|
||||
select s.id, `name`, `phone`, introduction, logo_url,cover_url, longitude, latitude, radius, province, city, area, address, kf_code_url, kf_phone, status
|
||||
from scenic s
|
||||
where s.id = #{id}
|
||||
</select>
|
||||
<select id="scenicListByLnLa" resultType="com.ycwl.basic.model.mobile.scenic.ScenicAppVO">
|
||||
select s.id,
|
||||
`name`,
|
||||
`phone`,
|
||||
introduction,
|
||||
cover_url,
|
||||
longitude,
|
||||
latitude,
|
||||
radius,
|
||||
province,
|
||||
city,
|
||||
area,
|
||||
address,
|
||||
(SELECT COUNT(1) FROM device WHERE scenic_id = s.id AND status = 1) as deviceNum,
|
||||
ifnull(
|
||||
cast(
|
||||
ST_Distance_Sphere(
|
||||
Point(longitude, latitude), Point(#{longitude}, #{latitude})
|
||||
) AS
|
||||
DECIMAL(10, 2)
|
||||
), 0
|
||||
) AS distance
|
||||
from scenic s
|
||||
where `status` = 1
|
||||
and `latitude` is not null
|
||||
and `longitude` is not null
|
||||
ORDER BY distance ASC
|
||||
</select>
|
||||
<select id="getConfig" resultType="com.ycwl.basic.model.pc.scenic.entity.ScenicConfigEntity">
|
||||
select *
|
||||
from scenic_config
|
||||
where scenic_id = #{scenicId}
|
||||
</select>
|
||||
<select id="get" resultType="com.ycwl.basic.model.pc.scenic.entity.ScenicEntity">
|
||||
select *
|
||||
from scenic
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<resultMap id="scenic" type="com.ycwl.basic.model.pc.scenic.resp.ScenicRespVO">
|
||||
<id property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<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"/>
|
||||
<result property="radius" column="radius"/>
|
||||
<result property="province" column="province"/>
|
||||
<result property="city" column="city"/>
|
||||
<result property="area" column="area"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
</mapper>
|
Reference in New Issue
Block a user