Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
ab37d7c5
提交
ab37d7c5
authored
1月 04, 2024
作者:
han
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
手机号登录
上级
cc458067
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
33 行增加
和
0 行删除
+33
-0
AuthController.java
...ain/java/com/mmc/iuav/user/controller/AuthController.java
+11
-0
UserServiceDao.java
...r/src/main/java/com/mmc/iuav/user/dao/UserServiceDao.java
+5
-0
UserAccountService.java
...in/java/com/mmc/iuav/user/service/UserAccountService.java
+5
-0
UserAccountServiceImpl.java
...om/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
+5
-0
UserServiceDao.xml
...service-user/src/main/resources/mapper/UserServiceDao.xml
+6
-0
not-check.yml
...service/cms-service-user/src/main/resources/not-check.yml
+1
-0
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/AuthController.java
浏览文件 @
ab37d7c5
...
@@ -7,6 +7,7 @@ import com.mmc.iuav.user.model.qo.LoginUserQO;
...
@@ -7,6 +7,7 @@ import com.mmc.iuav.user.model.qo.LoginUserQO;
import
com.mmc.iuav.user.model.vo.AppUserSucVO
;
import
com.mmc.iuav.user.model.vo.AppUserSucVO
;
import
com.mmc.iuav.user.model.vo.WxLoginVO
;
import
com.mmc.iuav.user.model.vo.WxLoginVO
;
import
com.mmc.iuav.user.service.AuthService
;
import
com.mmc.iuav.user.service.AuthService
;
import
com.mmc.iuav.user.service.UserAccountService
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
...
@@ -23,6 +24,8 @@ public class AuthController {
...
@@ -23,6 +24,8 @@ public class AuthController {
@Autowired
@Autowired
private
AuthService
authService
;
private
AuthService
authService
;
@Autowired
private
UserAccountService
userAccountService
;
@ApiOperation
(
value
=
"小程序登录/注册"
)
@ApiOperation
(
value
=
"小程序登录/注册"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
AppUserSucVO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
AppUserSucVO
.
class
)})
...
@@ -45,4 +48,12 @@ public class AuthController {
...
@@ -45,4 +48,12 @@ public class AuthController {
public
ResultBody
testAppletLogin
(
@RequestParam
String
unionId
)
{
public
ResultBody
testAppletLogin
(
@RequestParam
String
unionId
)
{
return
authService
.
testAppletLogin
(
unionId
);
return
authService
.
testAppletLogin
(
unionId
);
}
}
@ApiOperation
(
value
=
"测试-手机号登录"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
AppUserSucVO
.
class
)})
@PostMapping
(
"testPhoneLogin"
)
public
ResultBody
testPhoneLogin
(
@RequestParam
String
phone
)
{
String
unionId
=
userAccountService
.
selectUnionIdByPhone
(
phone
);
return
authService
.
testAppletLogin
(
unionId
);
}
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/UserServiceDao.java
浏览文件 @
ab37d7c5
...
@@ -234,4 +234,9 @@ public interface UserServiceDao {
...
@@ -234,4 +234,9 @@ public interface UserServiceDao {
* @return {@link String}
* @return {@link String}
*/
*/
String
getUserPhoneByUserId
(
Integer
userId
);
String
getUserPhoneByUserId
(
Integer
userId
);
/**
* 根据手机号查询unionId
*/
String
selectUnionIdByPhone
(
String
phone
);
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/UserAccountService.java
浏览文件 @
ab37d7c5
...
@@ -182,4 +182,9 @@ public interface UserAccountService {
...
@@ -182,4 +182,9 @@ public interface UserAccountService {
UserAccountMessageVo
userMessages
(
Integer
userAccountId
);
UserAccountMessageVo
userMessages
(
Integer
userAccountId
);
UserBaseInfoDTO
feignGetUserBaseInfo
(
Integer
userAccountId
);
UserBaseInfoDTO
feignGetUserBaseInfo
(
Integer
userAccountId
);
/**
* 根据手机号查询unionId
*/
String
selectUnionIdByPhone
(
String
phone
);
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
浏览文件 @
ab37d7c5
...
@@ -567,5 +567,10 @@ public class UserAccountServiceImpl implements UserAccountService {
...
@@ -567,5 +567,10 @@ public class UserAccountServiceImpl implements UserAccountService {
return
userServiceDao
.
getUserBaseInfo
(
userAccountId
);
return
userServiceDao
.
getUserBaseInfo
(
userAccountId
);
}
}
@Override
public
String
selectUnionIdByPhone
(
String
phone
)
{
return
userServiceDao
.
selectUnionIdByPhone
(
phone
);
}
}
}
csm-service/cms-service-user/src/main/resources/mapper/UserServiceDao.xml
浏览文件 @
ab37d7c5
...
@@ -666,5 +666,11 @@
...
@@ -666,5 +666,11 @@
<select
id=
"getUserPhoneByUserId"
resultType=
"java.lang.String"
>
<select
id=
"getUserPhoneByUserId"
resultType=
"java.lang.String"
>
select phone_num from user_account where id = #{userId}
select phone_num from user_account where id = #{userId}
</select>
</select>
<select
id=
"selectUnionIdByPhone"
resultType=
"java.lang.String"
>
select union_id
from user_account
where phone_num = #{phone}
limit 1
</select>
</mapper>
</mapper>
csm-service/cms-service-user/src/main/resources/not-check.yml
浏览文件 @
ab37d7c5
...
@@ -8,6 +8,7 @@ data-filter:
...
@@ -8,6 +8,7 @@ data-filter:
-
/userapp/webjars/**
-
/userapp/webjars/**
-
/userapp/auth/backEndLogin
-
/userapp/auth/backEndLogin
-
/userapp/auth/testAppletLogin
-
/userapp/auth/testAppletLogin
-
/userapp/auth/testPhoneLogin
-
/userapp/auth/appletLogin
-
/userapp/auth/appletLogin
-
/userapp/auth/backEndLogin
-
/userapp/auth/backEndLogin
-
/userapp/cooperation/listTag
-
/userapp/cooperation/listTag
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论