Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2ef8ed9c
authored
Jun 10, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增user接口
1 parent
ffcc2489
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
0 deletions
project-order/src/main/java/com/alibaba/cloud/integration/order/controller/UserController.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/UserService.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/UserServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/controller/UserController.java
0 → 100644
View file @
2ef8ed9
package
com
.
alibaba
.
cloud
.
integration
.
order
.
controller
;
import
com.alibaba.cloud.integration.common.Result
;
import
org.springframework.web.bind.annotation.*
;
@RestController
@RequestMapping
(
"/pea-order"
)
public
class
UserController
{
@PostMapping
(
"/user/login"
)
public
Result
<?>
userLogin
(
@RequestBody
String
account
,
@RequestBody
String
password
)
{
return
null
;
}
@GetMapping
(
"/user/userInfo"
)
public
Result
<?>
getUserInfo
(
@RequestBody
String
userToken
,
@RequestBody
boolean
needTeamInfo
)
{
return
null
;
}
}
project-order/src/main/java/com/alibaba/cloud/integration/order/service/UserService.java
0 → 100644
View file @
2ef8ed9
package
com
.
alibaba
.
cloud
.
integration
.
order
.
service
;
import
com.alibaba.cloud.integration.common.Result
;
public
interface
UserService
{
Result
<?>
userLogin
(
String
account
,
String
password
);
Result
<?>
getUserInfo
(
String
token
,
boolean
needTeamInfo
);
}
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/UserServiceImpl.java
0 → 100644
View file @
2ef8ed9
package
com
.
alibaba
.
cloud
.
integration
.
order
.
service
.
impl
;
import
com.alibaba.cloud.integration.common.Result
;
import
com.alibaba.cloud.integration.order.service.UserService
;
import
com.sun.xml.bind.v2.TODO
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
@Service
public
class
UserServiceImpl
implements
UserService
{
@Override
public
Result
<?>
userLogin
(
String
account
,
String
password
)
{
HashMap
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"token"
,
"88d89f379a634867b1c7274a8b86bba6"
);
//TODO
return
Result
.
success
(
map
);
}
@Override
public
Result
<?>
getUserInfo
(
String
token
,
boolean
needTeamInfo
)
{
HashMap
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"account"
,
"ID9192"
);
map
.
put
(
"nickname"
,
"测试用户"
);
map
.
put
(
"clusterId"
,
"csuzhou"
);
map
.
put
(
"branchId"
,
"bsuzhou"
);
map
.
put
(
"groupId"
,
"gsuzhou"
);
map
.
put
(
"levelType"
,
"branch"
);
map
.
put
(
"levelId"
,
"bsuzhou"
);
return
Result
.
success
(
map
);
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment