BUGFIX:workspace;
This commit is contained in:
@@ -35,7 +35,7 @@ public interface WorkspaceService extends IService<Workspace> {
|
||||
|
||||
List<BizJson> getEnumValues(String enumName);
|
||||
|
||||
Workspace getByIdNew(Long id);
|
||||
WorkspaceVO getByIdNew(Long id);
|
||||
|
||||
List<ModelsVO> getMannequins(String sex);
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
}
|
||||
|
||||
@Override
|
||||
public Workspace getByIdNew(Long id) {
|
||||
public WorkspaceVO getByIdNew(Long id) {
|
||||
Long accountId = UserContext.getUserHolder().getId();
|
||||
QueryWrapper<Workspace> qwOld = new QueryWrapper<>();
|
||||
qwOld.lambda().eq(Workspace::getAccountId, accountId);
|
||||
@@ -260,7 +260,26 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
Workspace newIsLastIndex = workspaceMapper.selectById(id);
|
||||
newIsLastIndex.setIsLastIndex(1);
|
||||
workspaceMapper.updateById(newIsLastIndex);
|
||||
return newIsLastIndex;
|
||||
WorkspaceVO vo = CopyUtil.copyObject(newIsLastIndex, WorkspaceVO.class);
|
||||
if (vo.getMannequinFemaleId() != null) {
|
||||
if (vo.getMannequinFemaleType().equals(ModelType.SYSTEM.getValue())) {
|
||||
vo.setFemalePresignedUrl(minioUtil.getPresignedUrl(sysFileMapper.selectById(vo.getMannequinFemaleId()).getUrl(), 24 * 60));
|
||||
} else if (vo.getMannequinFemaleType().equals(ModelType.LIBRARY.getValue())) {
|
||||
vo.setFemalePresignedUrl(minioUtil.getPresignedUrl(libraryMapper.selectById(vo.getMannequinFemaleId()).getUrl(), 24 * 60));
|
||||
}
|
||||
}
|
||||
if (vo.getMannequinMaleId() != null) {
|
||||
if (vo.getMannequinMaleType().equals(ModelType.SYSTEM.getValue())) {
|
||||
vo.setMalePresignedUrl(minioUtil.getPresignedUrl(sysFileMapper.selectById(vo.getMannequinMaleId()).getUrl(), 24 * 60));
|
||||
} else if (vo.getMannequinMaleType().equals(ModelType.LIBRARY.getValue())) {
|
||||
vo.setMalePresignedUrl(minioUtil.getPresignedUrl(libraryMapper.selectById(vo.getMannequinMaleId()).getUrl(), 24 * 60));
|
||||
}
|
||||
}
|
||||
Sex sex = Sex.getSex(vo.getSex());
|
||||
Position position = Position.getPosition(vo.getPosition());
|
||||
vo.setSexEnum(new BizJson(sex.getValue(), sex.name(), BusinessException.getMessageFromResource(sex.name())));
|
||||
vo.setPositionEnum(new BizJson(position.getValue(), position.name(), BusinessException.getMessageFromResource(position.name())));
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user