65 lines
2.3 KiB
Plaintext
65 lines
2.3 KiB
Plaintext
|
|
package com.securityControl.system.api;
|
||
|
|
|
||
|
|
import com.securityControl.system.api.domain.decision.SysMenu;
|
||
|
|
import com.securityControl.system.api.domain.decision.SysUserVo;
|
||
|
|
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.PostMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
||
|
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||
|
|
import com.securityControl.common.core.constant.SecurityConstants;
|
||
|
|
import com.securityControl.common.core.constant.ServiceNameConstants;
|
||
|
|
import com.securityControl.common.core.domain.R;
|
||
|
|
import com.securityControl.system.api.factory.RemoteUserFallbackFactory;
|
||
|
|
import com.securityControl.system.api.model.LoginUser;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 用户服务
|
||
|
|
*
|
||
|
|
* @author czc
|
||
|
|
*/
|
||
|
|
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
|
||
|
|
public interface RemoteUserService {
|
||
|
|
/**
|
||
|
|
* 通过用户名查询用户信息
|
||
|
|
*
|
||
|
|
* @param username 用户名
|
||
|
|
* @param source 请求来源
|
||
|
|
* @return 结果
|
||
|
|
*/
|
||
|
|
@GetMapping("/userManage/info/{username}")
|
||
|
|
R<LoginUser> getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 通过用户id查询分配的按钮
|
||
|
|
*
|
||
|
|
* @param userId 用户名
|
||
|
|
* @param source 请求来源
|
||
|
|
* @return 结果
|
||
|
|
*/
|
||
|
|
@PostMapping("/sys/menu/getMenuPer")
|
||
|
|
R<List<String>> getMenulPer(@RequestBody String userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 根据用户id查询分配的菜单
|
||
|
|
*
|
||
|
|
* @param userId
|
||
|
|
* @param source
|
||
|
|
* @return
|
||
|
|
*/
|
||
|
|
@PostMapping("/sys/menu/getAllMenuList")
|
||
|
|
R<List<SysMenu>> getAllMenuList(@RequestBody String userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 通过用户名查询用户信息
|
||
|
|
*
|
||
|
|
* @param userId 用户名
|
||
|
|
* @return 结果
|
||
|
|
*/
|
||
|
|
@PostMapping("/userManage/getUserById/{userId}")
|
||
|
|
R<SysUserVo> getUserById(@PathVariable("userId") String userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||
|
|
}
|