Commit 9901faa4 authored by luzhuang's avatar luzhuang

fallback + user/gets

parent 1e6bd0e3
package org.rcisoft.common.util.fallback;
import lombok.extern.slf4j.Slf4j;
import org.rcisoft.common.util.feignClient.ContactFeignClient;
import org.rcisoft.common.util.feignDto.*;
import org.rcisoft.core.result.Ret;
import java.util.List;
@Slf4j
public class ContactFeignClientFallBack implements ContactFeignClient {
@Override
public Ret<List<GetAllRspDTO>> getUsersByUpdateTime(String corpId, String updateTime, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 /api/sm/user/getUsersByUpdateTime 失败-------------------");
return new Ret();
}
@Override
public Ret<UserGetRspDTO> accountGetMyInfo(String corpId, String id, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 /user/get 失败-------------------");
return new Ret();
}
@Override
public Ret<List<MTRoleGroupInfoRspDTO>> listRoleGroup(String corpId, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 micro_app/isHaveApps 失败-------------------");
return new Ret();
}
@Override
public Ret<List<RoleGetListRspDTO>> listRole(String name, String corpId, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 micro_app/isHaveApps 失败-------------------");
return new Ret();
}
@Override
public Ret<List<MTUserInfoRspDTO>> userGets(MTUserGetsReqDTO mtUserGetsReqDTO, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 /user/gets 失败-------------------");
return new Ret();
}
@Override
public Ret<List<MTAccountIdRspDTO>> accountGetUserHead(MTUserGetsAccountReqDTO mtUserGetsReqDTO, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 accountGetUserHead 失败-------------------");
return new Ret();
}
@Override
public Ret<List<GetAllRspDTO>> userAll(String corpId, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 userAll 失败-------------------");
return new Ret();
}
@Override
public Ret<List<MTRoleUserInfoRspDTO>> getRoleInfoList(String roleId, String corpId, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 getRoleInfoList 失败-------------------");
return new Ret();
}
@Override
public Ret<RoleInfoRspDTO> getRoleById(String id, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 getRoleById 失败-------------------");
return new Ret();
}
@Override
public Ret<MTDeptTreeUserInfoRspDTO> getDeptTree(Long corpId, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 getDeptTree 失败-------------------");
return new Ret();
}
@Override
public Ret<DeptGetRspDTO> getDeptById(String id, Long corpId, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 getDeptById 失败-------------------");
return new Ret();
}
@Override
public Ret<List<MTGetUserByDeptIdsRspDTO>> userGetUserByDeptIds(GetUserByDeptIdReqDTO getUserByDeptIdReqDTO, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 userGetUserByDeptIds 失败-------------------");
return new Ret();
}
@Override
public Ret<MTDeptSubDeptUserPagelistRspDTO> deptSubDeptUserPagelist(Long corpId, Long pid, Integer pageNum, Integer pageSize, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 deptSubDeptUserPagelist 失败-------------------");
return new Ret();
}
@Override
public Ret<List<MTGetUserRoleRspDTO>> userGetUserRole(GetUserRoleReqDTO req, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 userGetUserRole 失败-------------------");
return new Ret();
}
@Override
public Ret<MTUserGetPageListRspDTO> userSearchByName(Long corpId, String name, Integer pageNum, Integer pageSize, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 userSearchByName 失败-------------------");
return new Ret();
}
@Override
public Ret<DeptAllUserPageRspDTO<UserGetPageListByDeptCascadeRspDTO>> allUserListByDept(Long corpId, String deptId, Integer pageNum, Integer pageSize, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 allUserListByDept 失败-------------------");
return new Ret();
}
@Override
public Ret<DeptAllUserPageRspDTO<UserGetStudentTrackingRspDTO>> allUserListByDeptStuTrack(Long corpId, String deptId, Integer pageNum, Integer pageSize, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 allUserListByDeptStuTrack 失败-------------------");
return new Ret();
}
@Override
public Ret<List<GetAllRspDTO>> getUserByDeptIds(GetUserByDeptIdReqDTO getUserByDeptIdReqDTO, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 getUserByDeptIds 失败-------------------");
return new Ret();
}
@Override
public Ret<DeptGetRspDTO> deptGetById(Long corpId, String name, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 deptGetById 失败-------------------");
return new Ret();
}
@Override
public Ret<List<FindDepartByNameDTO>> deptListDeptInfoByName(String corpId, String name, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 deptListDeptInfoByName 失败-------------------");
return new Ret();
}
@Override
public Ret<List<CorpGetManager>> corpGetManager(Long corpId, Integer sysLevel, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 corpGetManager 失败-------------------");
return new Ret();
}
@Override
public Ret<List<String>> getSubUserIdsByDeptIds(GetSubUserIdsByDeptIdsReqDTO getSubUserIdsByDeptIdsReqDTO, String zxClientType, Long zxAccountId) {
log.error("---------------调接口 micro_app/isHaveApps 失败-------------------");
return new Ret();
}
}
package org.rcisoft.common.util.feignClient;
import org.rcisoft.common.util.fallback.ContactFeignClientFallBack;
import org.rcisoft.core.result.Ret;
import org.rcisoft.common.util.feignDto.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;
......@@ -12,7 +14,7 @@ import java.util.List;
* 通讯录客户端接口
*/
@Service
@FeignClient(value = "spcl-sm-user")
@FeignClient(value = "spcl-sm-user", fallback = ContactFeignClientFallBack.class)
public interface ContactFeignClient {
......@@ -57,7 +59,7 @@ public interface ContactFeignClient {
/**
* 根据用户id获取用户信息(多个)
*/
@RequestMapping(value = "/user/gets",method = RequestMethod.POST)
@RequestMapping(value = "/api/sm/user/gets",method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_VALUE)
Ret<List<MTUserInfoRspDTO>> userGets(@RequestBody MTUserGetsReqDTO mtUserGetsReqDTO,
@RequestParam("zxClientType") String zxClientType,
@RequestParam("zxAccountId") Long zxAccountId);
......@@ -241,7 +243,7 @@ public interface ContactFeignClient {
/**
* 根据部门ids 获取部门及子部门多有人员id(未去重)
*/
@RequestMapping(value = "/user/get_sub_userIds_by_dept_ids",method = RequestMethod.POST)
@RequestMapping(value = "/api/sm/user/get_sub_userIds_by_dept_ids",method = RequestMethod.POST)
Ret<List<String>> getSubUserIdsByDeptIds(@RequestBody GetSubUserIdsByDeptIdsReqDTO getSubUserIdsByDeptIdsReqDTO,
@RequestParam("zxClientType") String zxClientType,
@RequestParam("zxAccountId") Long zxAccountId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment