BUGFIX:aida;
This commit is contained in:
@@ -3377,7 +3377,7 @@ public class PythonService {
|
||||
Request request = new Request.Builder()
|
||||
// .url(accessPythonIp + ":" + accessPythonPort + "/api/generate_product_image")
|
||||
// .url(accessPythonIp + ":9996/api/generate_product_image")
|
||||
.url(accessPythonIp + ":9994/api/generate_relight_image")
|
||||
.url(accessPythonIp + ":9996/api/generate_relight_image")
|
||||
.method("POST", body)
|
||||
.addHeader("Authorization", "Basic YWlkbGFiOjEyMw==")
|
||||
.addHeader("Content-Type", "application/json")
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import sun.security.krb5.internal.crypto.Des;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
@@ -96,6 +97,12 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
||||
@Resource
|
||||
private AccountMapper accountMapper;
|
||||
|
||||
@Resource
|
||||
private WorkspaceMapper workspaceMapper;
|
||||
|
||||
@Resource
|
||||
private SysFileMapper sysFileMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean publish(MultipartFile file, String data) {
|
||||
@@ -617,6 +624,50 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
||||
}
|
||||
}
|
||||
|
||||
Long collectionId = portfolio.getCollectionId();
|
||||
QueryWrapper<Design> getWorkspaceQw = new QueryWrapper<>();
|
||||
getWorkspaceQw.lambda().eq(Design::getCollectionId, collectionId);
|
||||
List<Design> designs = designMapper.selectList(getWorkspaceQw);
|
||||
if (!CollectionUtils.isEmpty(designs)) {
|
||||
Design design1 = designs.get(0);
|
||||
Long accountId = authPrincipalVo.getId();
|
||||
QueryWrapper<Workspace> currentWorkspaceQw = new QueryWrapper<>();
|
||||
currentWorkspaceQw.lambda().eq(Workspace::getAccountId, accountId);
|
||||
currentWorkspaceQw.lambda().eq(Workspace::getIsLastIndex, 1);
|
||||
List<Workspace> workspaces = workspaceMapper.selectList(currentWorkspaceQw);
|
||||
if (!CollectionUtils.isEmpty(workspaces)) {
|
||||
Workspace workspace1 = workspaces.get(0);
|
||||
workspace1.setIsLastIndex(0);
|
||||
|
||||
Workspace workspaceNew = new Workspace();
|
||||
workspaceNew.setWorkSpaceName("workspace of " + portfolio.getPortfolioName());
|
||||
workspaceNew.setAccountId(accountId);
|
||||
workspaceNew.setIsDeleted(0);
|
||||
workspaceNew.setIsLastIndex(1);
|
||||
if (design1.getModelType().equals("System")) {
|
||||
SysFile sysFile = sysFileMapper.selectById(design1.getTemplateId());
|
||||
if (sysFile.getLevel2Type().equals("Female")) {
|
||||
workspaceNew.setSex("Female");
|
||||
workspaceNew.setMannequinFemaleId(design1.getTemplateId());
|
||||
QueryWrapper<SysFile> getAnotherOneQw = new QueryWrapper<>();
|
||||
getAnotherOneQw.lambda().eq(SysFile::getLevel1Type, "Models")
|
||||
}else {
|
||||
workspaceNew.setSex("Male");
|
||||
workspaceNew.setMannequinMaleId(design1.getTemplateId());
|
||||
}
|
||||
if (design1.getSingleOverall().equals("overall")) {
|
||||
workspaceNew.setPosition("Overall");
|
||||
}else {
|
||||
workspaceNew.setPosition(design1.getSwitchCategory());
|
||||
}
|
||||
}
|
||||
workspaceNew.setSex();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return userLikeGroupService.choose(userLikeGroupNew.getId());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user