You've already forked FrameTour-BE
bug
This commit is contained in:
@@ -2,7 +2,7 @@ package com.ycwl.basic.service.impl.pc;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ycwl.basic.device.repository.DeviceRepository;
|
||||
import com.ycwl.basic.repository.DeviceRepository;
|
||||
import com.ycwl.basic.mapper.DeviceMapper;
|
||||
import com.ycwl.basic.model.pc.device.entity.DeviceConfigEntity;
|
||||
import com.ycwl.basic.model.pc.device.req.DeviceAddOrUpdateReq;
|
||||
@@ -89,5 +89,6 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
public void saveConfig(Long configId, DeviceConfigEntity config) {
|
||||
config.setId(configId);
|
||||
deviceMapper.updateConfig(config);
|
||||
deviceRepository.clearDeviceCache(config.getDeviceId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.ycwl.basic.model.pc.face.resp.FaceRespVO;
|
||||
import com.ycwl.basic.model.pc.source.entity.MemberSourceEntity;
|
||||
import com.ycwl.basic.model.pc.source.entity.SourceEntity;
|
||||
import com.ycwl.basic.model.task.resp.SearchFaceRespVo;
|
||||
import com.ycwl.basic.repository.FaceRepository;
|
||||
import com.ycwl.basic.service.pc.FaceService;
|
||||
import com.ycwl.basic.service.task.TaskFaceService;
|
||||
import com.ycwl.basic.service.task.TaskService;
|
||||
@@ -66,6 +67,8 @@ public class FaceServiceImpl implements FaceService {
|
||||
private FaceSampleMapper faceSampleMapper;
|
||||
@Autowired
|
||||
private OrderBiz orderBiz;
|
||||
@Autowired
|
||||
private FaceRepository faceRepository;
|
||||
|
||||
@Override
|
||||
public ApiResponse<PageInfo<FaceRespVO>> pageQuery(FaceReqQuery faceReqQuery) {
|
||||
@@ -113,15 +116,6 @@ public class FaceServiceImpl implements FaceService {
|
||||
return ApiResponse.success(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResponse<Integer> update(FaceEntity face) {
|
||||
int i = faceMapper.update(face);
|
||||
if (i == 0) {
|
||||
return ApiResponse.fail("修改失败");
|
||||
}
|
||||
return ApiResponse.success(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
public ApiResponse faceUpload(MultipartFile file, Long scenicId) {
|
||||
@@ -191,6 +185,7 @@ public class FaceServiceImpl implements FaceService {
|
||||
} else {
|
||||
//2、更新人脸
|
||||
faceMapper.update(faceEntity);
|
||||
faceRepository.clearFaceCache(faceEntity.getId());
|
||||
}
|
||||
if (sampleListIds == null) {
|
||||
return ApiResponse.fail("请先游玩后再来获取视频吧");
|
||||
@@ -215,11 +210,6 @@ public class FaceServiceImpl implements FaceService {
|
||||
return memberSourceEntity;
|
||||
}).collect(Collectors.toList());
|
||||
sourceMapper.addRelations(memberSourceEntityList);
|
||||
VideoPieceGetter.Task task = new VideoPieceGetter.Task();
|
||||
task.faceId = faceEntity.getId();
|
||||
task.faceSampleIds = sampleListIds;
|
||||
task.memberId = userId;
|
||||
VideoPieceGetter.addTask(task);
|
||||
taskTaskService.autoCreateTaskByFaceId(faceEntity.getId());
|
||||
StatisticsRecordAddReq statisticsRecordAddReq = new StatisticsRecordAddReq();
|
||||
statisticsRecordAddReq.setMemberId(userId);
|
||||
@@ -230,6 +220,11 @@ public class FaceServiceImpl implements FaceService {
|
||||
FaceRecognizeResp resp = new FaceRecognizeResp();
|
||||
resp.setUrl(faceUrl);
|
||||
resp.setFaceId(faceEntity.getId());
|
||||
VideoPieceGetter.Task task = new VideoPieceGetter.Task();
|
||||
task.faceId = faceEntity.getId();
|
||||
task.faceSampleIds = sampleListIds;
|
||||
task.memberId = userId;
|
||||
VideoPieceGetter.addTask(task);
|
||||
return ApiResponse.success(resp);
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ public class TemplateServiceImpl implements TemplateService {
|
||||
@Override
|
||||
public ApiResponse<Boolean> updateStatus(Long id) {
|
||||
int i = templateMapper.updateStatus(id);
|
||||
templateRepository.clearTemplateCache(id);
|
||||
if (i > 0) {
|
||||
return ApiResponse.success(true);
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user