Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
b28a8c77
Commit
b28a8c77
authored
Sep 07, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 开放填写邀请码接口
parent
84ea34bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxUserController.java
...pi/src/main/java/com/wwdz/ch/wx/web/WxUserController.java
+21
-1
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxUserController.java
View file @
b28a8c77
...
...
@@ -3,9 +3,11 @@ package com.wwdz.ch.wx.web;
import
com.alibaba.fastjson.JSON
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.InviteRecordRequestDto
;
import
com.wwdz.ch.wx.constant.CacheCodeConstants
;
import
com.wwdz.ch.wx.constant.LoginTypeEnum
;
import
com.wwdz.ch.wx.entity.request.UserRequestDto
;
import
com.wwdz.ch.wx.service.InviteRecordService
;
import
com.wwdz.ch.wx.service.UserService
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -31,6 +33,8 @@ public class WxUserController {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
WxUserController
.
class
);
@Autowired
private
UserService
userService
;
@Autowired
private
InviteRecordService
inviteRecordService
;
@ApiOperation
(
value
=
"快捷登录"
)
...
...
@@ -98,7 +102,7 @@ public class WxUserController {
@ApiOperation
(
value
=
"手机验证码登录"
)
@PostMapping
(
"/loginByMobile"
)
public
Result
loginByMobile
(
@RequestBody
UserRequestDto
dto
,
HttpServletRequest
request
)
{
logger
.
info
(
"【请求开始】手机号登录,请求参数
,kl_data
:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"【请求开始】手机号登录,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
StringUtils
.
isBlank
(
dto
.
getMobile
()))
{
return
Result
.
failed
(
"手机号不能为空"
);
}
...
...
@@ -108,6 +112,22 @@ public class WxUserController {
return
userService
.
loginByMobile
(
dto
,
request
);
}
@ApiOperation
(
value
=
"填写邀请码"
)
@PostMapping
(
"/fillCode"
)
public
Result
fillCode
(
@RequestBody
InviteRecordRequestDto
dto
)
{
logger
.
info
(
"【请求开始】填写邀请码,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
Objects
.
isNull
(
dto
.
getInvitee
())
||
dto
.
getInvitee
().
equals
(
0L
))
{
return
Result
.
failed
(
"受邀人id不能为空"
);
}
if
(
StringUtils
.
isBlank
(
dto
.
getInviteePhone
()))
{
return
Result
.
failed
(
"受邀人手机号不能为空"
);
}
if
(
StringUtils
.
isBlank
(
dto
.
getInvitationCode
()))
{
return
Result
.
failed
(
"请填写邀请码"
);
}
return
inviteRecordService
.
create
(
dto
);
}
@ApiOperation
(
value
=
"修改个性签名"
)
@PostMapping
(
"/updateProfile"
)
public
Result
updateProfile
(
@RequestBody
UserRequestDto
dto
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment