feat: add list user in sys
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
package org.wfc.user.api;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.wfc.common.core.constant.SecurityConstants;
|
||||
import org.wfc.common.core.constant.ServiceNameConstants;
|
||||
import org.wfc.common.core.domain.LoginUser;
|
||||
import org.wfc.common.core.domain.R;
|
||||
import org.wfc.common.core.web.page.TableDataInfo;
|
||||
import org.wfc.user.api.domain.UUser;
|
||||
import org.wfc.user.api.factory.RemoteUUserFallbackFactory;
|
||||
|
||||
@@ -57,6 +64,14 @@ public interface RemoteUUserService
|
||||
@PutMapping("/user/recordlogin")
|
||||
public R<Boolean> recordUserLogin(@RequestBody UUser user, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 查询用户列表
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/user/page")
|
||||
public TableDataInfo page(@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize, @RequestBody UUser user);
|
||||
|
||||
/**
|
||||
* 添加话单信息通过OmadaApi
|
||||
*/
|
||||
|
||||
@@ -4,11 +4,15 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.wfc.common.core.constant.HttpStatus;
|
||||
import org.wfc.common.core.domain.LoginUser;
|
||||
import org.wfc.common.core.domain.R;
|
||||
import org.wfc.common.core.web.page.TableDataInfo;
|
||||
import org.wfc.user.api.RemoteUUserService;
|
||||
import org.wfc.user.api.domain.UUser;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* 用户服务降级处理
|
||||
*
|
||||
@@ -49,6 +53,14 @@ public class RemoteUUserFallbackFactory implements FallbackFactory<RemoteUUserSe
|
||||
return R.fail("记录用户登录信息失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo page(Integer pageNum, Integer pageSize, UUser user) {
|
||||
TableDataInfo rspData = new TableDataInfo(Collections.emptyList(), 0L);
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setMsg("查询成功");
|
||||
return rspData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Boolean> addCdrInfoByOmadaApi() {
|
||||
return R.fail("添加话单信息失败:" + throwable.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user