1.审计管理修改

2.数据中心bug修改
This commit is contained in:
wr
2023-05-30 10:05:51 +08:00
parent 119eb9a4fd
commit 34cc8bd8d1
11 changed files with 211 additions and 23 deletions

View File

@@ -1,13 +1,18 @@
package com.njcn.user.api;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.user.api.fallback.UserFeignClientFallbackFactory;
import com.njcn.user.pojo.dto.UserDTO;
import com.njcn.user.pojo.po.User;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author hongawen
@@ -42,4 +47,12 @@ public interface UserFeignClient {
*/
@PutMapping("/updateUserLoginErrorTimes/{loginName}")
HttpResult<String> updateUserLoginErrorTimes(@PathVariable("loginName") String loginName);
/**
* 根据用户id集合查询用户信息
* @param ids
* @return
*/
@PostMapping("/userByIdList")
HttpResult<List<User>> getUserByIdList(@RequestBody List<String> ids);
}

View File

@@ -5,11 +5,14 @@ import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.user.api.UserFeignClient;
import com.njcn.user.pojo.dto.UserDTO;
import com.njcn.user.pojo.po.User;
import com.njcn.user.utils.UserEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
@@ -52,6 +55,12 @@ public class UserFeignClientFallbackFactory implements FallbackFactory<UserFeign
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<User>> getUserByIdList(List<String> ids) {
log.error("{}异常,降级处理,异常为:{}","根据用户id集合查询用户信息",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}