fix:bug
This commit is contained in:
@@ -10,6 +10,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
@FeignClient(name = "system",contextId = "systemMessageClient")
|
||||
public interface IMessageFeignClient {
|
||||
|
||||
@PostMapping("/systemMsg//sendMessage")
|
||||
@PostMapping("/systemMsg/sendMessage")
|
||||
SdmResponse sendMessage(@RequestBody SendMsgReq req);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.sdm.common.entity.req.system.UserQueryReq;
|
||||
import com.sdm.common.entity.resp.system.CIDUserResp;
|
||||
import com.sdm.common.feign.inter.system.ISysUserFeignClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -25,17 +26,18 @@ public class UserNameCacheService {
|
||||
@Cacheable(value = "userNames", key = "#userIds.toString()")
|
||||
public Map<Long, String> batchGetUserNames(Set<Long> userIds) {
|
||||
log.info("【缓存未命中】批量查询用户名,用户数量: {}", userIds.size());
|
||||
|
||||
Map<Long, String> userMap = new HashMap<>();
|
||||
// 批量调用用户服务
|
||||
SdmResponse<List<CIDUserResp>> response = sysUserFeignClient.listUserByIds(
|
||||
UserQueryReq.builder().userIds(new ArrayList<>(userIds)).build()
|
||||
);
|
||||
|
||||
Map<Long, String> userMap = response.getData().stream()
|
||||
.collect(Collectors.toMap(
|
||||
CIDUserResp::getUserId,
|
||||
CIDUserResp::getNickname
|
||||
));
|
||||
if (CollectionUtils.isNotEmpty(response.getData())) {
|
||||
userMap = response.getData().stream()
|
||||
.collect(Collectors.toMap(
|
||||
CIDUserResp::getUserId,
|
||||
CIDUserResp::getNickname
|
||||
));
|
||||
}
|
||||
|
||||
return userMap;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,9 @@ public class KeyResultReq extends BaseReq {
|
||||
@Schema(description = "文件")
|
||||
private MultipartFile file;
|
||||
|
||||
@Schema(description = "是否仅曲线上传文件")
|
||||
private boolean onlyFile;
|
||||
|
||||
/**
|
||||
* -------------------------------------------------上传交付物使用参数------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -158,7 +158,7 @@ public class DemandServiceImpl extends BaseService implements IDemandService {
|
||||
SdmResponse response = dataClientFeignClient.createDir(createDirReq);
|
||||
log.info("创建需求时,调用创建文件夹的返回值为:{}", response);
|
||||
|
||||
return SdmResponse.success(demandId);
|
||||
return SdmResponse.success(req.getUuid());
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
||||
@@ -743,7 +743,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public SdmResponse addSimulationKeyResult(KeyResultReq req) {
|
||||
if (KeyResultTypeEnum.CURVE.getKeyResultType().equals(req.getKeyResultType())) {
|
||||
if (KeyResultTypeEnum.CURVE.getKeyResultType().equals(req.getKeyResultType()) && req.isOnlyFile()) {
|
||||
CurveParamDto curveParamDto = getCurveParamsFromUpload(req.getFile(), 2);
|
||||
return SdmResponse.success(curveParamDto);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,8 @@
|
||||
#{it.tag3,typeHandler=com.sdm.project.handler.ListStringTypeHandler},#{it.tag4,typeHandler=com.sdm.project.handler.ListStringTypeHandler},
|
||||
#{it.tag5,typeHandler=com.sdm.project.handler.ListStringTypeHandler},#{it.tag6,typeHandler=com.sdm.project.handler.ListStringTypeHandler},
|
||||
#{it.tag7,typeHandler=com.sdm.project.handler.ListStringTypeHandler},#{it.tag8,typeHandler=com.sdm.project.handler.ListStringTypeHandler},
|
||||
#{it.tag9,typeHandler=com.sdm.project.handler.ListStringTypeHandler},#{it.tag10,typeHandler=com.sdm.project.handler.ListStringTypeHandler}),#{it.imageFileId}
|
||||
#{it.tag9,typeHandler=com.sdm.project.handler.ListStringTypeHandler},#{it.tag10,typeHandler=com.sdm.project.handler.ListStringTypeHandler},
|
||||
#{it.imageFileId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user