党员活动 文档中心获取地址

This commit is contained in:
517612449@qq.com
2022-07-06 17:06:34 +08:00
parent 2f58710bce
commit cc69c73b78
2 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.extend.feign.client.factory.DocumentCenterServiceFallbackFactory;
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@ -45,7 +46,7 @@ public interface DocumentCenterService {
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "v1.0/files/queryReturn")
BaseResponse<List<DocumentDataVO>> queryReturn(@RequestParam("objectIdList") List<String> list);
BaseResponse<List<DocumentDataVO>> queryReturn(@RequestBody List<String> list);

View File

@ -53,8 +53,8 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
list = this.list(query);
List<String> imageIdList = list.stream().map(EventStyle::getImage).collect(Collectors.toList());
BaseResponse<List<DocumentDataVO>> queryReturn = documentCenterService.queryReturn(imageIdList);
PartyEventExceptionEnum.FRAME_EXCEPTION_NO_IMAGE_INFO_FAIL.customValid(!queryReturn.isSuccess());
log.info("文档中心返回:{}", queryReturn.toString());
PartyEventExceptionEnum.FRAME_EXCEPTION_NO_IMAGE_INFO_FAIL.customValid(!queryReturn.isSuccess());
Map<String, DocumentDataVO> collect = queryReturn.getData().stream().collect(Collectors.toMap(DocumentDataVO::getObjectId, Function.identity()));
list.forEach(l -> l.setFilePath(collect.get(l.getImage()).getFilePath()));