Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rk2b-fenghaolun committed Mar 8, 2024
2 parents 5249eb5 + dc0381a commit 95a2111
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import java.io.File;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;

@Service("fitTransformComponentTaskServiceImpl")
Expand Down Expand Up @@ -66,12 +67,20 @@ public BaseResultEntity runTask(DataComponentReq req, ComponentTaskReq taskReq)
fitTransformEntityMap.remove(modelDerivationDto.getOriginalResourceId());
}
log.info("newids:{}", ids);
log.info("fitTransform-2:{}", JSONObject.toJSONString(fitTransformEntityMap));
}
Map<String, ModelDerivationDto> oldResourceIdMap = newest.stream().collect(Collectors.toMap(ModelDerivationDto::getOriginalResourceId, Function.identity()));
try {
GrpcComponentDto labelDatasetDto = fitTransformEntityMap.get(taskReq.getFreemarkerMap().get(DataConstant.PYTHON_LABEL_DATASET));
if (labelDatasetDto == null) {
labelDatasetDto = fitTransformEntityMap.get(oldResourceIdMap.get(taskReq.getFreemarkerMap().get(DataConstant.PYTHON_LABEL_DATASET)).getNewResourceId());
}
taskReq.getFreemarkerMap().put("new_"+DataConstant.PYTHON_LABEL_DATASET,labelDatasetDto.getNewDataSetId());
taskReq.getFreemarkerMap().put("new_"+DataConstant.PYTHON_LABEL_DATASET+"_path",labelDatasetDto.getOutputFilePath());
GrpcComponentDto guestDatasetDto = fitTransformEntityMap.get(taskReq.getFreemarkerMap().get(DataConstant.PYTHON_GUEST_DATASET));
if (guestDatasetDto == null) {
guestDatasetDto = fitTransformEntityMap.get(oldResourceIdMap.get(taskReq.getFreemarkerMap().get(DataConstant.PYTHON_GUEST_DATASET)).getNewResourceId());
}
taskReq.getFreemarkerMap().put("new_"+DataConstant.PYTHON_GUEST_DATASET,guestDatasetDto.getNewDataSetId());
taskReq.getFreemarkerMap().put("new_"+DataConstant.PYTHON_GUEST_DATASET+"_path",guestDatasetDto.getOutputFilePath());
TaskParam<TaskComponentParam> taskParam = new TaskParam<>(new TaskComponentParam());
Expand Down Expand Up @@ -119,10 +128,9 @@ public BaseResultEntity runTask(DataComponentReq req, ComponentTaskReq taskReq)
}
}
}
HashSet dids = new HashSet(){{
add(labelDatasetDto.getNewDataSetId());
add(guestDatasetDto.getNewDataSetId());
}};
HashSet dids = new HashSet();
dids.add(labelDatasetDto.getNewDataSetId());
dids.add(guestDatasetDto.getNewDataSetId());
while (true){
// 休眠一秒等待数据集同步
BaseResultEntity dataSets = fusionResourceService.getDataSets(dids);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,12 @@ public BaseResultEntity saveOrUpdateUser(SaveOrUpdateUserParam saveOrUpdateUserP
Long userId=saveOrUpdateUserParam.getUserId();
SysUser sysUser;
if(userId==null){
if(saveOrUpdateUserParam.getUserAccount()==null|| "".equals(saveOrUpdateUserParam.getUserAccount().trim())) {
saveOrUpdateUserParam.setUserAccount(saveOrUpdateUserParam.getUserAccount().trim());
saveOrUpdateUserParam.setUserName(saveOrUpdateUserParam.getUserName().trim());
if(saveOrUpdateUserParam.getUserAccount()==null|| saveOrUpdateUserParam.getUserAccount().isEmpty()) {
return BaseResultEntity.failure(BaseResultEnum.LACK_OF_PARAM,"userAccount");
}
if(saveOrUpdateUserParam.getUserName()==null|| "".equals(saveOrUpdateUserParam.getUserName().trim())) {
if(saveOrUpdateUserParam.getUserName()==null|| saveOrUpdateUserParam.getUserName().isEmpty()) {
return BaseResultEntity.failure(BaseResultEnum.LACK_OF_PARAM,"userName");
}
if(saveOrUpdateUserParam.getIsForbid()==null) {
Expand Down

0 comments on commit 95a2111

Please sign in to comment.