You've already forked FrameTour-BE
添加“face”相关CRUD代码
This commit is contained in:
@ -35,6 +35,12 @@
|
||||
<if test="status!= null">
|
||||
and `status` = #{status}
|
||||
</if>
|
||||
<if test="startTime!=null">
|
||||
and d.create_at >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
and d.create_at <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getById" resultType="com.ycwl.basic.model.pc.broker.entity.BrokerEntity">
|
||||
|
@ -39,6 +39,12 @@
|
||||
<if test="scenicId!= null and scenicId!= ''">
|
||||
and scenic_id = #{scenicId}
|
||||
</if>
|
||||
<if test="startTime!=null">
|
||||
and d.create_at >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
and d.create_at <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getById" resultType="com.ycwl.basic.model.pc.device.resp.DeviceRespVO">
|
||||
|
70
src/main/resources/mapper/pc/FaceMapper.xml
Normal file
70
src/main/resources/mapper/pc/FaceMapper.xml
Normal file
@ -0,0 +1,70 @@
|
||||
<?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.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>
|
||||
<update id="update">
|
||||
update face
|
||||
<set>
|
||||
<if test="memberId!= null ">
|
||||
member_id = #{memberId},
|
||||
</if>
|
||||
<if test="faceUrl!= null and faceUrl!= ''">
|
||||
face_url = #{faceUrl},
|
||||
</if>
|
||||
<if test="matchSampleIds!= null and matchSampleIds!= ''">
|
||||
match_sample_ids = #{matchSampleIds},
|
||||
</if>
|
||||
<if test="firstMatchRate!= null ">
|
||||
first_match_rate = #{firstMatchRate},
|
||||
</if>
|
||||
<if test="matchResult!= null and matchResult!= ''">
|
||||
match_result = #{matchResult},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="deleteById">
|
||||
delete from face where id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteByIds">
|
||||
<if test="list!= null and list.size() > 0">
|
||||
delete from face where id in (
|
||||
<foreach collection="list" item="id" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
</delete>
|
||||
<select id="list" resultType="com.ycwl.basic.model.pc.face.resp.FaceRespVO">
|
||||
select id, member_id, face_url, match_sample_ids, first_match_rate, match_result
|
||||
from face
|
||||
<where>
|
||||
<if test="memberId!= null and memberId!= ''">
|
||||
and member_id = #{memberId}
|
||||
</if>
|
||||
<if test="matchSampleIds!= null and matchSampleIds!= ''">
|
||||
and match_sample_ids like concat('%', #{matchSampleIds}, '%')
|
||||
</if>
|
||||
<if test="startMatchRate!= null ">
|
||||
and first_match_rate >= #{startMatchRate}
|
||||
</if>
|
||||
<if test="endMatchRate!= null ">
|
||||
and first_match_rate <= #{endMatchRate}
|
||||
</if>
|
||||
<if test="startTime!=null">
|
||||
and create_at >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
and create_at <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getById" resultType="com.ycwl.basic.model.pc.face.resp.FaceRespVO">
|
||||
select id, member_id, face_url, match_sample_ids, first_match_rate, match_result
|
||||
from face
|
||||
where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user