1
This commit is contained in:
1 parent
fb3526b728
commit
da22bddea8
4 files changed
+11
-3
No files matched your search
+7
@@ -5,6 +5,7 @@ import cn.hutool.json.JSONUtil;
|
||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.member.client.service.ThirdFaceVerifyService;
|
||||
import cn.iocoder.yudao.module.member.client.vo.thirdfaceverify.ThirdFindFaceVerifyReqVo;
|
||||
import cn.iocoder.yudao.module.member.client.vo.thirdfaceverify.ThirdFindFaceVerifyResVo;
|
||||
@@ -58,6 +59,11 @@ public class ThirdCallbackController {
|
||||
@Operation(summary = "人脸认证回调")
|
||||
@PermitAll
|
||||
public void faceVerify(FaceVerifyCallbackReqVo query) throws Exception {
|
||||
Long tenantId = TenantContextHolder.getTenantId();
|
||||
if (ObjectUtil.isEmpty(tenantId) && TenantContextHolder.isIgnore()) {
|
||||
TenantContextHolder.setIgnore(false);
|
||||
TenantContextHolder.setTenantId(1L);
|
||||
}
|
||||
// 加锁
|
||||
recentRedisDAO.comAuthLock(query.getCertifyId(), UPDATE_TIMEOUT_MILLIS, () -> {
|
||||
log.info("人脸认证回调,params={}", JSONUtil.toJsonStr(query));
|
||||
@@ -101,6 +107,7 @@ public class ThirdCallbackController {
|
||||
updateObj.setAuthTime(LocalDateTime.now());
|
||||
updateObj.setFailReason("验证失败");
|
||||
authMapper.updateById(updateObj);
|
||||
TenantContextHolder.clear();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -680,7 +680,7 @@ public class RecentServiceImpl implements RecentService {
|
||||
* 为RecentPageResVo设置Location信息
|
||||
*/
|
||||
private void convertRecentPageResVoSetupLocation(RecentPageResVo detail, LocationDO selfLocation) {
|
||||
if (ObjectUtil.isEmpty(detail)) return;
|
||||
if (ObjectUtil.isEmpty(detail) || ObjectUtil.isEmpty(selfLocation)) return;
|
||||
MemberExtBO member = detail.getMember();
|
||||
if (ObjectUtil.isAllNotEmpty(member.getMemberLng(), member.getMemberLat())) {
|
||||
double distance = NumberUtils.getDistance(member.getMemberLat(), member.getMemberLng(), selfLocation.getLat(), selfLocation.getLon());
|
||||
|
||||
+1
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.member.service.user;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.config.MemberConfigDO;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberRecentTagDO;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
|
||||
|
||||
+2
-2
@@ -151,13 +151,13 @@
|
||||
having distance is not null
|
||||
</if>
|
||||
<choose>
|
||||
<when test="dto.sceneBizType != null and dto.sceneBizType != ''.toString() ">
|
||||
<when test="dto.sceneBizType != null and dto.sceneBizType != ''.toString() and dto.currentLat != null and dto.currentLng != null ">
|
||||
<!-- 广场-广场 -->
|
||||
<if test="dto.sceneBizType == '3'.toString() ">
|
||||
order by u.app_refresh_date desc , u.id desc
|
||||
</if>
|
||||
<!-- 广场-最近 -->
|
||||
<if test="dto.sceneBizType == '4'.toString() ">
|
||||
<if test="dto.sceneBizType == '4'.toString() ">
|
||||
order by distance asc , u.app_refresh_date desc
|
||||
</if>
|
||||
<!-- 广场-新人 -->
|
||||
|
||||
Reference in new issue
Block a user