提交 ca96ec2a 作者: han

Merge branch 'develop'

流水线 #7869 已通过 于阶段
in 2 分 22 秒
......@@ -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.WxLoginVO;
import com.mmc.iuav.user.service.AuthService;
import com.mmc.iuav.user.service.UserAccountService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
......@@ -23,6 +24,8 @@ public class AuthController {
@Autowired
private AuthService authService;
@Autowired
private UserAccountService userAccountService;
@ApiOperation(value = "小程序登录/注册")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = AppUserSucVO.class)})
......@@ -45,4 +48,12 @@ public class AuthController {
public ResultBody testAppletLogin(@RequestParam String 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);
}
}
......@@ -234,4 +234,9 @@ public interface UserServiceDao {
* @return {@link String}
*/
String getUserPhoneByUserId(Integer userId);
/**
* 根据手机号查询unionId
*/
String selectUnionIdByPhone(String phone);
}
......@@ -182,4 +182,9 @@ public interface UserAccountService {
UserAccountMessageVo userMessages(Integer userAccountId);
UserBaseInfoDTO feignGetUserBaseInfo(Integer userAccountId);
/**
* 根据手机号查询unionId
*/
String selectUnionIdByPhone(String phone);
}
......@@ -567,5 +567,10 @@ public class UserAccountServiceImpl implements UserAccountService {
return userServiceDao.getUserBaseInfo(userAccountId);
}
@Override
public String selectUnionIdByPhone(String phone) {
return userServiceDao.selectUnionIdByPhone(phone);
}
}
......@@ -666,5 +666,11 @@
<select id="getUserPhoneByUserId" resultType="java.lang.String">
select phone_num from user_account where id = #{userId}
</select>
<select id="selectUnionIdByPhone" resultType="java.lang.String">
select union_id
from user_account
where phone_num = #{phone}
limit 1
</select>
</mapper>
......@@ -8,6 +8,7 @@ data-filter:
- /userapp/webjars/**
- /userapp/auth/backEndLogin
- /userapp/auth/testAppletLogin
- /userapp/auth/testPhoneLogin
- /userapp/auth/appletLogin
- /userapp/auth/backEndLogin
- /userapp/cooperation/listTag
......
......@@ -18,4 +18,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: f3e51d8abf96c89dc77a0806accb7a1745d9ac8b
newTag: f9213492e7c19e1bde4f870c02c154e46b67d46e
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论