1.分布式光伏台账相关
This commit is contained in:
@@ -4,6 +4,7 @@ import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.user.api.fallback.DeptFeignClientFallbackFactory;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -45,4 +46,11 @@ public interface DeptFeignClient {
|
||||
*/
|
||||
@GetMapping("/getAreaIdByDeptId")
|
||||
HttpResult<String> getAreaIdByDeptId(@RequestParam("deptId") String deptId);
|
||||
|
||||
/**
|
||||
* 获取所有部门
|
||||
*/
|
||||
@GetMapping("/allDeptList")
|
||||
HttpResult<List<PvTerminalTreeVO>> allDeptList();
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||
import com.njcn.user.utils.UserEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -55,6 +56,12 @@ public class DeptFeignClientFallbackFactory implements FallbackFactory<DeptFeign
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据部门索引获取区域索引", cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<PvTerminalTreeVO>> allDeptList() {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询所有部门异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user