党员活动 文档中心获取地址
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
package com.chinaunicom.mall.ebtp.extend.feign.client;
|
package com.chinaunicom.mall.ebtp.extend.feign.client;
|
||||||
|
|
||||||
|
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;
|
||||||
@ -44,7 +45,8 @@ public interface DocumentCenterService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(method = RequestMethod.POST, value = "v1.0/files/queryReturn")
|
@RequestMapping(method = RequestMethod.POST, value = "v1.0/files/queryReturn")
|
||||||
List<DocumentDataVO> queryReturn(@RequestParam("objectIdList") List<String> list);
|
BaseResponse<List<DocumentDataVO>> queryReturn(@RequestParam("objectIdList") List<String> list);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.chinaunicom.mall.ebtp.extend.feign.client.fallback;
|
package com.chinaunicom.mall.ebtp.extend.feign.client.fallback;
|
||||||
|
|
||||||
|
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||||
import com.chinaunicom.mall.ebtp.extend.feign.client.DocumentCenterService;
|
import com.chinaunicom.mall.ebtp.extend.feign.client.DocumentCenterService;
|
||||||
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
|
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@ -32,7 +33,7 @@ public class DocumentCenterServiceFallbackImpl implements DocumentCenterService
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DocumentDataVO> queryReturn(List<String> list) {
|
public BaseResponse<List<DocumentDataVO>> queryReturn(List<String> list) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ public enum PartyEventExceptionEnum implements BusinessExceptionAssert {
|
|||||||
* 没有党支部信息
|
* 没有党支部信息
|
||||||
*/
|
*/
|
||||||
FRAME_EXCEPTION_NO_BRANCH_INFO_FAIL(2200001, "没有党支部信息!"),
|
FRAME_EXCEPTION_NO_BRANCH_INFO_FAIL(2200001, "没有党支部信息!"),
|
||||||
|
FRAME_EXCEPTION_NO_IMAGE_INFO_FAIL(2200002, "文档中心异常!"),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,12 +6,14 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||||
import com.chinaunicom.mall.ebtp.extend.feign.client.DocumentCenterService;
|
import com.chinaunicom.mall.ebtp.extend.feign.client.DocumentCenterService;
|
||||||
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
|
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
|
||||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventStyleMapper;
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventStyleMapper;
|
||||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventQueryInVO;
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventQueryInVO;
|
||||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventStyle;
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventStyle;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.enums.PartyEventExceptionEnum;
|
||||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventStyleService;
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventStyleService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -50,9 +52,10 @@ 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());
|
||||||
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());
|
||||||
Map<String, DocumentDataVO> collect = queryReturn.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()));
|
||||||
return list;
|
return list;
|
||||||
|
Reference in New Issue
Block a user