|
|
@ -3,6 +3,7 @@ package com.elink.esua.epdc.service.impl; |
|
|
|
import com.elink.esua.epdc.common.token.dto.TokenDto; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.dto.CompleteDeptDTO; |
|
|
|
import com.elink.esua.epdc.dto.UploadDTO; |
|
|
|
import com.elink.esua.epdc.dto.enums.TopicStateEnum; |
|
|
|
import com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO; |
|
|
@ -12,11 +13,12 @@ import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO; |
|
|
|
import com.elink.esua.epdc.feign.AdminFeignClient; |
|
|
|
import com.elink.esua.epdc.feign.OssFeignClient; |
|
|
|
import com.elink.esua.epdc.feign.TopicFeignClient; |
|
|
|
import com.elink.esua.epdc.service.TopicService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
@ -35,6 +37,9 @@ public class TopicServiceImpl implements TopicService { |
|
|
|
@Autowired |
|
|
|
private TopicFeignClient topicFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private OssFeignClient ossFeignClient; |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result saveTopic(TokenDto userDetail, TopicSubmitFormDTO formDto) { |
|
|
|
if (null == userDetail) { |
|
|
@ -108,4 +113,14 @@ public class TopicServiceImpl implements TopicService { |
|
|
|
formDto.setUserId(userDetail.getUserId()); |
|
|
|
return topicFeignClient.changeToIssue(formDto); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<String> uploadImage(MultipartFile file) { |
|
|
|
Result<UploadDTO> result = ossFeignClient.upload(file); |
|
|
|
if (!result.success()) { |
|
|
|
return new Result<String>().error(result.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
return new Result<String>().ok(result.getData().getUrl()); |
|
|
|
} |
|
|
|
} |
|
|
|