辽宁功能提交
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
package com.njcn.supervision.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.supervision.api.fallback.TempLineRunTestFeignClientFallbackFactory;
|
||||
import com.njcn.supervision.api.fallback.UserLedgerFeignClientFallbackFactory;
|
||||
import com.njcn.supervision.pojo.param.user.UserReportParam;
|
||||
import com.njcn.supervision.pojo.po.user.UserReportPO;
|
||||
import com.njcn.supervision.pojo.vo.user.UserLedgerVO;
|
||||
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -22,6 +26,11 @@ public interface UserLedgerFeignClient {
|
||||
|
||||
|
||||
@PostMapping("/selectUserList")
|
||||
List<UserReportPO> selectUserList(@RequestBody UserReportParam userReportParam);
|
||||
HttpResult<List<UserLedgerVO>> selectUserList(@RequestBody UserReportParam userReportParam);
|
||||
|
||||
@GetMapping("/selectUserInfo")
|
||||
HttpResult<UserLedgerVO> selectUserInfo(@RequestParam("id") String id);
|
||||
|
||||
@PostMapping(value = "/bindUserStation")
|
||||
HttpResult<List<UserLedgerVO>> bindUserStation(@RequestParam("userId")String userId,@RequestParam("stationId")String stationId);
|
||||
}
|
||||
|
||||
@@ -2,10 +2,13 @@ package com.njcn.supervision.api.fallback;
|
||||
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.supervision.api.TempLineRunTestFeignClient;
|
||||
import com.njcn.supervision.api.UserLedgerFeignClient;
|
||||
import com.njcn.supervision.pojo.param.user.UserReportParam;
|
||||
import com.njcn.supervision.pojo.po.user.UserReportPO;
|
||||
import com.njcn.supervision.pojo.vo.user.UserLedgerVO;
|
||||
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
||||
import com.njcn.supervision.utils.SupervisionEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -29,10 +32,22 @@ public class UserLedgerFeignClientFallbackFactory implements FallbackFactory<Use
|
||||
return new UserLedgerFeignClient() {
|
||||
|
||||
@Override
|
||||
public List<UserReportPO> selectUserList(UserReportParam userReportParam) {
|
||||
public HttpResult<List<UserLedgerVO>> selectUserList(UserReportParam userReportParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "查询用户台账", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<UserLedgerVO> selectUserInfo(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "查询用户台账详情", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<UserLedgerVO>> bindUserStation(String userId, String stationId) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "用户电站信息绑定", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user