Merge remote-tracking branch 'origin/master'

This commit is contained in:
songmingsong
2024-12-06 10:14:01 +08:00
25 changed files with 436 additions and 16 deletions

View File

@ -90,10 +90,15 @@ wx:
#阿里云OSS
aliYunOss:
endpoint: "https://oss-cn-chengdu.aliyuncs.com"
accessKeyId: "LTAI5t5cydpGpHfYqf31mEJA"
accessKeySecret: "xdFzlwzmE8QPPstbcZY82tU3xj7G0R"
bucketName: "scwzzn-file"
objectName: "image/"
url: "https://scwzzn-file.oss-cn-chengdu.aliyuncs.com/"
region: "cn-hangzhou"
endpoint: "https://oss-cn-shanghai.aliyuncs.com"
accessKeyId: "LTAI5tCa641QdNHH9Ybg9u7V"
accessKeySecret: "RRVIgekoqx96Fgm2Gs7eQshMShcEpk"
bucketName: "frametour-assets"
objectName: "user-faces/"
url: "https://frametour-assets.oss-cn-shanghai.aliyuncs.com/"
region: "cn-shanghai"
#阿里云人脸检测
aliYunFace:
accessKeyId: "LTAI5tMwrmxVcUEKoH5QzLHx"
accessKeySecret: "ZCIP8aKx1jwX1wkeYIPQEDZ8fPtN1c"
region: "cn-shanghai"

View File

@ -23,12 +23,20 @@
delete from broker where id = #{id}
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.broker.entity.BrokerEntity">
select id, `name`, promo_code, status, create_at, update_at
select id, `name`, phone, promo_code, status,
(select count(1) from `order` where broker_id = broker.id) as broker_order_count,
(select sum(pay_price) from `order` where broker_id = broker.id) as broker_order_amount,
(select create_at from `order` where broker_id = broker.id and status = 1 order by create_at desc limit 1) as last_broker_date,
(select create_at from `order` where broker_id = broker.id and status = 1 order by create_at asc limit 1) as first_broker_date,
create_at, update_at
from broker
<where>
<if test="name!= null and name!= ''">
and `name` like concat('%', #{name}, '%')
</if>
<if test="phone!= null and phone!= ''">
and `phone` like concat('%', #{phone}, '%')
</if>
<if test="promoCode!= null and promoCode!= ''">
and promo_code like concat('%', #{promoCode}, '%')
</if>

View File

@ -53,4 +53,9 @@
left join scenic s on d.scenic_id = s.id
where d.id = #{id}
</select>
<select id="listByScenicId" resultType="com.ycwl.basic.model.pc.device.resp.DeviceRespVO">
select d.id, d.name, no, d.status, create_at, d.update_at
from device d
where d.scenic_id = #{scenicId}
</select>
</mapper>

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.pc.FaceMapper">
<insert id="add">
insert into face(id, member_id, face_url, match_sample_ids, first_match_rate, match_result)
values (#{id}, #{memberId}, #{faceUrl}, #{matchSampleIds}, #{firstMatchRate}, #{matchResult})
insert into face(id, score, member_id, face_url, match_sample_ids, first_match_rate, match_result)
values (#{id}, #{score}, #{memberId}, #{faceUrl}, #{matchSampleIds}, #{firstMatchRate}, #{matchResult})
</insert>
<update id="update">
update face
@ -11,6 +11,9 @@
<if test="memberId!= null ">
member_id = #{memberId},
</if>
<if test="score!= null ">
score = #{score},
</if>
<if test="faceUrl!= null and faceUrl!= ''">
face_url = #{faceUrl},
</if>

View File

@ -42,9 +42,12 @@
</if>
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.faceSample.resp.FaceSampleRespVO">
select id, device_id, face_url, match_sample_ids, first_match_rate, match_result,`status`
select id, scenic_id, device_id, face_url, match_sample_ids, first_match_rate, match_result,`status`
from face_sample
<where>
<if test="scenicId!= null and scenicId!= ''">
and device_id = #{deviceId}
</if>
<if test="deviceId!= null and deviceId!= ''">
and device_id = #{deviceId}
</if>
@ -69,7 +72,7 @@
</where>
</select>
<select id="getById" resultType="com.ycwl.basic.model.pc.faceSample.resp.FaceSampleRespVO">
select id, device_id, face_url, match_sample_ids, first_match_rate, match_result,`status`
select id, scenic_id, device_id, face_url, match_sample_ids, first_match_rate, match_result,`status`
from face_sample
where id = #{id}
</select>

View File

@ -0,0 +1,52 @@
<?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.pc.ScenicAccountMapper">
<insert id="add">
insert into scenic_account(id, scenic_id, is_super, name, account, password, create_time, update_time)
values (#{id}, #{scenicId}, #{isSuper}, #{name}, #{account}, #{password}, now(), now())
</insert>
<update id="update">
update scenic_account
<set>
<if test="name != null and name != ''">
name = #{name},
</if>
<if test="account != null and account != ''">
account = #{account},
</if>
<if test="password != null and password != ''">
password = #{password},
</if>
update_time = now()
</set>
where id = #{id}
</update>
<update id="updateStatus">
update scenic_account
set status = (CASE
WHEN status = 1 THEN
0
WHEN status = 0 THEN
1
ELSE null
END)
where id = #{id}
</update>
<delete id="deleteById">
delete from scenic_account where id = #{id}
</delete>
<delete id="deleteByScenicId">
delete from scenic_account where scenic_id = #{scenicId}
</delete>
<select id="getSuperAccountOfScenic"
resultType="com.ycwl.basic.model.pc.scenic.entity.ScenicAccountEntity">
select id, scenic_id, is_super, name, account, password, create_time, update_time
from scenic_account
where scenic_id = #{scenicId} and is_super = 1
</select>
<select id="getByAccount" resultType="com.ycwl.basic.model.pc.scenic.entity.ScenicAccountEntity">
select id, scenic_id, is_super, name, account, password, create_time, update_time
from scenic_account
where account = #{account}
</select>
</mapper>

View File

@ -16,6 +16,9 @@
<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>
@ -77,8 +80,10 @@
delete from scenic_config where scenic_id = #{scenicId}
</delete>
<select id="list" 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
select s.id, `name`, `phone`, introduction, 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
from scenic s
left join scenic_config c on s.id = c.id
<where>
@ -106,7 +111,7 @@
</where>
</select>
<select id="getById" resultMap="scenicAndConfig">
select s.id, `name`, introduction, longitude, latitude, radius, province, city, area, address, `status`, s.create_time, update_time,
select s.id, `name`, `phone`, 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,s.price
from scenic s
left join scenic_config c on s.id = c.id
@ -114,8 +119,10 @@
</select>
<resultMap id="scenicAndConfig" type="com.ycwl.basic.model.pc.scenic.resp.ScenicRespVO">
<id property="id" column="s.id"/>
<id property="id" column="id"/>
<result property="name" column="name"/>
<result property="account" column="account"/>
<result property="phone" column="phone"/>
<result property="introduction" column="introduction"/>
<result property="longitude" column="longitude"/>
<result property="latitude" column="latitude"/>