You've already forked FrameTour-BE
修正
This commit is contained in:
@@ -208,7 +208,6 @@ public class FaceServiceImpl implements FaceService {
|
||||
task.faceId = faceEntity.getId();
|
||||
task.faceSampleId = sampleRespVO.getId();
|
||||
task.memberId = userId;
|
||||
task.createTime = sampleRespVO.getCreateAt();
|
||||
VideoPieceGetter.addTask(task);
|
||||
}
|
||||
taskTaskService.autoCreateTaskByFaceId(faceEntity.getId());
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.ycwl.basic.model.pc.template.entity.TemplateEntity;
|
||||
import com.ycwl.basic.model.pc.template.req.TemplateReqQuery;
|
||||
import com.ycwl.basic.model.pc.template.resp.TemplateRespVO;
|
||||
import com.ycwl.basic.service.pc.TemplateService;
|
||||
import com.ycwl.basic.template.repository.TemplateRepository;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.SnowFlakeUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -24,6 +25,8 @@ public class TemplateServiceImpl implements TemplateService {
|
||||
|
||||
@Autowired
|
||||
private TemplateMapper templateMapper;
|
||||
@Autowired
|
||||
private TemplateRepository templateRepository;
|
||||
|
||||
@Override
|
||||
public ApiResponse<PageInfo<TemplateRespVO>> pageQuery(TemplateReqQuery templateReqQuery) {
|
||||
@@ -40,9 +43,7 @@ public class TemplateServiceImpl implements TemplateService {
|
||||
|
||||
@Override
|
||||
public ApiResponse<TemplateRespVO> getById(Long id) {
|
||||
TemplateRespVO data = templateMapper.getById(id);
|
||||
data.setChildren(templateMapper.getByPid(id));
|
||||
return ApiResponse.success(data);
|
||||
return ApiResponse.success(templateRepository.getTemplate(id));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,6 +71,7 @@ public class TemplateServiceImpl implements TemplateService {
|
||||
int i = templateMapper.deleteById(id);
|
||||
if (i > 0) {
|
||||
templateMapper.deleteByPid(id);
|
||||
templateRepository.clearTemplateCache(id);
|
||||
return ApiResponse.success(i);
|
||||
}else {
|
||||
return ApiResponse.fail("删除模版失败");
|
||||
@@ -88,6 +90,7 @@ public class TemplateServiceImpl implements TemplateService {
|
||||
item.setStatus(1);
|
||||
templateMapper.add(item);
|
||||
});
|
||||
templateRepository.clearTemplateCache(template.getId());
|
||||
}
|
||||
if (i > 0) {
|
||||
return ApiResponse.success(true);
|
||||
@@ -108,19 +111,13 @@ public class TemplateServiceImpl implements TemplateService {
|
||||
|
||||
@Override
|
||||
public TemplateConfigEntity getConfig(Long templateId) {
|
||||
TemplateConfigEntity config = templateMapper.getConfig(templateId);
|
||||
if (config == null) {
|
||||
config = new TemplateConfigEntity();
|
||||
config.setId(SnowFlakeUtil.getLongId());
|
||||
config.setTemplateId(templateId);
|
||||
templateMapper.addConfig(config);
|
||||
}
|
||||
return config;
|
||||
return templateRepository.getTemplateConfig(templateId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveConfig(Long configId, TemplateConfigEntity config) {
|
||||
config.setId(configId);
|
||||
templateRepository.clearTemplateCache(config.getTemplateId());
|
||||
templateMapper.updateConfigById(config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user