党员活动 文档中心获取地址
This commit is contained in:
@ -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.client.factory.DocumentCenterServiceFallbackFactory;
|
||||||
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
|
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
@ -45,7 +46,7 @@ public interface DocumentCenterService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(method = RequestMethod.POST, value = "v1.0/files/queryReturn")
|
@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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,8 +53,8 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
|
|||||||
list = this.list(query);
|
list = this.list(query);
|
||||||
List<String> imageIdList = list.stream().map(EventStyle::getImage).collect(Collectors.toList());
|
List<String> imageIdList = list.stream().map(EventStyle::getImage).collect(Collectors.toList());
|
||||||
BaseResponse<List<DocumentDataVO>> queryReturn = documentCenterService.queryReturn(imageIdList);
|
BaseResponse<List<DocumentDataVO>> queryReturn = documentCenterService.queryReturn(imageIdList);
|
||||||
PartyEventExceptionEnum.FRAME_EXCEPTION_NO_IMAGE_INFO_FAIL.customValid(!queryReturn.isSuccess());
|
|
||||||
log.info("文档中心返回:{}", queryReturn.toString());
|
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()));
|
Map<String, DocumentDataVO> collect = queryReturn.getData().stream().collect(Collectors.toMap(DocumentDataVO::getObjectId, Function.identity()));
|
||||||
|
|
||||||
list.forEach(l -> l.setFilePath(collect.get(l.getImage()).getFilePath()));
|
list.forEach(l -> l.setFilePath(collect.get(l.getImage()).getFilePath()));
|
||||||
|
Reference in New Issue
Block a user