客户端代码编写

This commit is contained in:
zhangzhiqiang
2022-12-05 17:37:15 +08:00
parent b7d76da855
commit 3617b23e72
20 changed files with 132 additions and 241 deletions

View File

@@ -42,6 +42,7 @@ import org.nl.modules.system.service.RoleService;
import org.nl.modules.system.service.UserService;
import org.nl.modules.system.service.dto.UserDto;
import org.nl.modules.wql.core.bean.WQLObject;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
@@ -153,6 +154,17 @@ public class AuthorizationController {
return ResponseEntity.ok(jsonObject);
}
@ApiOperation("获取指定用户信息")
@GetMapping(value = "/userInfo")
public ResponseEntity<Object> getUserInfo(Long loginId) {
if (loginId != null){
WQLObject userTab = WQLObject.getWQLObject("sys_user");
JSONObject user = userTab.query("user_id = '" + loginId + "'").uniqueResult(0);
return ResponseEntity.ok(user);
}
return ResponseEntity.noContent().build();
}
@ApiOperation("获取验证码")
@GetMapping(value = "/code")
public ResponseEntity<Object> getCode() {