34 changed files with 335 additions and 58 deletions
@ -0,0 +1,31 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Auther sun |
||||
|
* 获取用户访问过的所有网格列表-接口返参 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AllGridsByUserIdResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 网格Id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 网格名称 |
||||
|
*/ |
||||
|
private String gridName; |
||||
|
|
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.epmet.modules.feign; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.result.AllGridsByUserIdResultDTO; |
||||
|
import com.epmet.modules.feign.fallback.GovOrgFeignClientFallBack; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description gov-org服务 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class) |
||||
|
public interface GovOrgFeignClient { |
||||
|
|
||||
|
/** |
||||
|
* @param gridIdList |
||||
|
* @return |
||||
|
* @Description 根据网格Id集合获取网格列表信息 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@PostMapping("/gov/org/customergrid/getgridlistbygridids") |
||||
|
Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> gridIdList); |
||||
|
|
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.epmet.modules.feign.fallback; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
|
import com.epmet.commons.tools.utils.ModuleUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.result.AllGridsByUserIdResultDTO; |
||||
|
import com.epmet.modules.feign.GovOrgFeignClient; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description gov-org服务 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Component |
||||
|
public class GovOrgFeignClientFallBack implements GovOrgFeignClient { |
||||
|
|
||||
|
@Override |
||||
|
public Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> gridIdList) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridListByGridIds", gridIdList); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue