|
@ -50,6 +50,7 @@ import com.epmet.feign.EpmetCommonServiceOpenFeignClient; |
|
|
import com.epmet.service.IcSocietyOrgService; |
|
|
import com.epmet.service.IcSocietyOrgService; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.io.IOUtils; |
|
|
import org.apache.commons.io.IOUtils; |
|
|
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.http.HttpHeaders; |
|
|
import org.springframework.http.HttpHeaders; |
|
|
import org.springframework.util.CollectionUtils; |
|
|
import org.springframework.util.CollectionUtils; |
|
@ -79,6 +80,7 @@ import java.util.stream.Collectors; |
|
|
@RestController |
|
|
@RestController |
|
|
@RequestMapping("societyorg") |
|
|
@RequestMapping("societyorg") |
|
|
public class IcSocietyOrgController implements ResultDataResolver { |
|
|
public class IcSocietyOrgController implements ResultDataResolver { |
|
|
|
|
|
private static final String DEFAULT_NO_IMG = "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20220826/38eb186191ab48fe8d3920b642b56e64.png"; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private IcSocietyOrgService societyOrgService; |
|
|
private IcSocietyOrgService societyOrgService; |
|
@ -115,6 +117,9 @@ public class IcSocietyOrgController implements ResultDataResolver { |
|
|
@RequestMapping("detail/{id}") |
|
|
@RequestMapping("detail/{id}") |
|
|
public Result detail(@LoginUser TokenDto tokenDto, @PathVariable(value = "id") String id) { |
|
|
public Result detail(@LoginUser TokenDto tokenDto, @PathVariable(value = "id") String id) { |
|
|
IcSocietyOrgDTO icSocietyOrgDTO = societyOrgService.get(id); |
|
|
IcSocietyOrgDTO icSocietyOrgDTO = societyOrgService.get(id); |
|
|
|
|
|
if (StringUtils.isNotBlank(icSocietyOrgDTO.getImgUrl())){ |
|
|
|
|
|
icSocietyOrgDTO.setImgUrl(DEFAULT_NO_IMG); |
|
|
|
|
|
} |
|
|
return new Result().ok(icSocietyOrgDTO); |
|
|
return new Result().ok(icSocietyOrgDTO); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|