逻辑修改
This commit is contained in:
parent
80c8dc2b3c
commit
5af3a14f03
@ -35,7 +35,7 @@ public class FileController {
|
|||||||
public ApiResponse<?> upload(@RequestParam(value = "file") MultipartFile file) throws IOException {
|
public ApiResponse<?> upload(@RequestParam(value = "file") MultipartFile file) throws IOException {
|
||||||
String[] split = file.getOriginalFilename().split("\\.");
|
String[] split = file.getOriginalFilename().split("\\.");
|
||||||
String ext = split[split.length - 1];
|
String ext = split[split.length - 1];
|
||||||
String url = StorageFactory.use("assets").uploadFile(file, "web", UUID.randomUUID() + "." + ext);
|
String url = StorageFactory.use().uploadFile(file, "web", UUID.randomUUID() + "." + ext);
|
||||||
return ApiResponse.success(url);
|
return ApiResponse.success(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ public class FileController {
|
|||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
@IgnoreToken
|
@IgnoreToken
|
||||||
public ApiResponse<?> delete(@RequestParam(value = "fileName") String fileName) throws IOException {
|
public ApiResponse<?> delete(@RequestParam(value = "fileName") String fileName) throws IOException {
|
||||||
boolean flag = StorageFactory.use("assets").deleteFile("web", fileName);
|
boolean flag = StorageFactory.use().deleteFile("web", fileName);
|
||||||
return flag ? ApiResponse.success(BizCodeEnum.REQUEST_OK) : ApiResponse.fail(BizCodeEnum.FAIL.getMessage());
|
return flag ? ApiResponse.success(BizCodeEnum.REQUEST_OK) : ApiResponse.fail(BizCodeEnum.FAIL.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,18 +35,7 @@ AppFaceController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("人脸照片上传")
|
@ApiOperation("人脸照片上传")
|
||||||
@PostMapping("/faceUPload")
|
@PostMapping("/faceUPload")
|
||||||
public ApiResponse faceUPload(@RequestParam("file")MultipartFile file, @RequestParam("scenicId") Long scenicId) {
|
public ApiResponse faceUpload(@RequestParam("file")MultipartFile file, @RequestParam("scenicId") Long scenicId) {
|
||||||
|
|
||||||
return faceService.faceUpload(file,scenicId);
|
return faceService.faceUpload(file,scenicId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询人脸照片信息")
|
|
||||||
@GetMapping("/getFaceData")
|
|
||||||
public ApiResponse<FaceRespVO> getFaceData() {
|
|
||||||
JwtInfo worker = JwtTokenUtil.getWorker();
|
|
||||||
return faceService.getFaceByMemberId(worker.getUserId());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public interface TemplateMapper {
|
|||||||
int updateConfigById(TemplateConfigEntity templateConfigEntity);
|
int updateConfigById(TemplateConfigEntity templateConfigEntity);
|
||||||
int deleteConfigByTemplateId(Long templateId);
|
int deleteConfigByTemplateId(Long templateId);
|
||||||
int deleteConfigById(Long id);
|
int deleteConfigById(Long id);
|
||||||
List<TemplateEntity> listByScenicId(Long scenicId);
|
List<TemplateEntity> listEnabledByScenicId(Long scenicId);
|
||||||
|
|
||||||
List<ContentPageVO> listFor(@Param("scenicId") Long scenicId, @Param("faceId") Long faceId);
|
List<ContentPageVO> listFor(@Param("scenicId") Long scenicId, @Param("faceId") Long faceId);
|
||||||
}
|
}
|
||||||
|
@ -21,16 +21,19 @@ public class FaceSampleRespVO {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty("景区ID")
|
@ApiModelProperty("景区ID")
|
||||||
private Long scenicId;
|
private Long scenicId;
|
||||||
|
private String scenicName;
|
||||||
/**
|
/**
|
||||||
* 来源设备
|
* 来源设备
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("来源设备")
|
@ApiModelProperty("来源设备")
|
||||||
private Long deviceId;
|
private Long deviceId;
|
||||||
|
private String deviceName;
|
||||||
/**
|
/**
|
||||||
* 人脸照片
|
* 人脸照片
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("人脸照片")
|
@ApiModelProperty("人脸照片")
|
||||||
private String faceUrl;
|
private String faceUrl;
|
||||||
|
private Float score;
|
||||||
/**
|
/**
|
||||||
* 与样本匹配的ID,逗号隔开
|
* 与样本匹配的ID,逗号隔开
|
||||||
*/
|
*/
|
||||||
|
@ -52,37 +52,34 @@
|
|||||||
</if>
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<select id="list" resultType="com.ycwl.basic.model.pc.faceSample.resp.FaceSampleRespVO">
|
<select id="list" resultType="com.ycwl.basic.model.pc.faceSample.resp.FaceSampleRespVO">
|
||||||
select id, scenic_id, device_id, face_url, source_id, match_sample_ids, first_match_rate, match_result,`status`
|
select f.id, f.scenic_id, s.name scenicName, device_id, d.name deviceName, face_url, source_id, f.score, match_sample_ids, first_match_rate, match_result, f.`status`, f.create_at
|
||||||
from face_sample
|
from face_sample f
|
||||||
|
left join scenic s on s.id = f.scenic_id
|
||||||
|
left join device d on d.id = f.device_id
|
||||||
<where>
|
<where>
|
||||||
<if test="scenicId!= null and scenicId!= ''">
|
<if test="scenicId!= null and scenicId!= ''">
|
||||||
and scenic_id = #{scenicId}
|
and f.scenic_id = #{scenicId}
|
||||||
</if>
|
</if>
|
||||||
<if test="deviceId!= null and deviceId!= ''">
|
<if test="deviceId!= null and deviceId!= ''">
|
||||||
and device_id = #{deviceId}
|
and device_id = #{deviceId}
|
||||||
</if>
|
</if>
|
||||||
<if test="source_id!= null and source_id!= ''">
|
<if test="sourceId!= null and sourceId!= ''">
|
||||||
and source_id = #{source_id}
|
and source_id = #{sourceId}
|
||||||
</if>
|
</if>
|
||||||
<if test="matchSampleIds!= null and matchSampleIds!= ''">
|
<if test="matchSampleIds!= null and matchSampleIds!= ''">
|
||||||
and match_sample_ids like concat('%', #{matchSampleIds}, '%')
|
and match_sample_ids like concat('%', #{matchSampleIds}, '%')
|
||||||
</if>
|
</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">
|
<if test="startTime!=null">
|
||||||
and create_at >= #{startTime}
|
and f.create_at >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime!=null">
|
<if test="endTime!=null">
|
||||||
and create_at <= #{endTime}
|
and f.create_at <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="status!= null ">
|
<if test="status!= null ">
|
||||||
and `status` = #{status}
|
and f.`status` = #{status}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
ORDER BY f.create_at desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getById" resultType="com.ycwl.basic.model.pc.faceSample.resp.FaceSampleRespVO">
|
<select id="getById" resultType="com.ycwl.basic.model.pc.faceSample.resp.FaceSampleRespVO">
|
||||||
select id, scenic_id, device_id, face_url, match_sample_ids, first_match_rate, source_id, match_result,`status`, create_at
|
select id, scenic_id, device_id, face_url, match_sample_ids, first_match_rate, source_id, match_result,`status`, create_at
|
||||||
|
@ -59,6 +59,7 @@ from task
|
|||||||
<where>
|
<where>
|
||||||
<if test="workerId!= null">and worker_id = #{workerId} </if>
|
<if test="workerId!= null">and worker_id = #{workerId} </if>
|
||||||
<if test="memberId!= null">and member_id = #{memberId} </if>
|
<if test="memberId!= null">and member_id = #{memberId} </if>
|
||||||
|
<if test="faceId!= null">and face_id = #{faceId} </if>
|
||||||
<if test="templateId!= null">and template_id = #{templateId} </if>
|
<if test="templateId!= null">and template_id = #{templateId} </if>
|
||||||
<if test="scenicId!= null">and scenic_id = #{scenicId} </if>
|
<if test="scenicId!= null">and scenic_id = #{scenicId} </if>
|
||||||
<if test="status!= null">and `status` = #{status} </if>
|
<if test="status!= null">and `status` = #{status} </if>
|
||||||
|
@ -92,10 +92,10 @@
|
|||||||
<select id="getConfig" resultType="com.ycwl.basic.model.pc.template.entity.TemplateConfigEntity">
|
<select id="getConfig" resultType="com.ycwl.basic.model.pc.template.entity.TemplateConfigEntity">
|
||||||
select * from template_config where template_id = #{templateId}
|
select * from template_config where template_id = #{templateId}
|
||||||
</select>
|
</select>
|
||||||
<select id="listByScenicId" resultType="com.ycwl.basic.model.pc.template.entity.TemplateEntity">
|
<select id="listEnabledByScenicId" resultType="com.ycwl.basic.model.pc.template.entity.TemplateEntity">
|
||||||
select *
|
select *
|
||||||
from template
|
from template
|
||||||
where scenic_id = #{scenicId} and pid = 0
|
where scenic_id = #{scenicId} and pid = 0 and status = 1
|
||||||
</select>
|
</select>
|
||||||
<select id="listFor" resultType="com.ycwl.basic.model.mobile.scenic.content.ContentPageVO">
|
<select id="listFor" resultType="com.ycwl.basic.model.mobile.scenic.content.ContentPageVO">
|
||||||
select t.id templateId, t.scenic_id, s.name as scenic_name, t.`name`, pid, t.cover_url templateCoverUrl,
|
select t.id templateId, t.scenic_id, s.name as scenic_name, t.`name`, pid, t.cover_url templateCoverUrl,
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by v.create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getById" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
|
<select id="getById" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
|
||||||
select v.id, v.scenic_id, member_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
|
select v.id, v.scenic_id, member_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user