任务中心 处理一次性任务
大转盘抽奖 第三次需要实名后使用
This commit is contained in:
@@ -3,6 +3,8 @@ package com.sqx.modules.app.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.sqx.modules.app.entity.UserInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
* @description 针对表【user_info】的数据库操作Service
|
||||
@@ -12,6 +14,16 @@ public interface UserInfoService extends IService<UserInfo> {
|
||||
|
||||
UserInfo getByUserId(long userId);
|
||||
|
||||
/**
|
||||
* 查询用户是否实名
|
||||
*/
|
||||
boolean isAuth(long userId);
|
||||
|
||||
/**
|
||||
* 通过查询用户实名信息 绑定的用户ID列表
|
||||
*/
|
||||
List<UserInfo> getUsersByNameAndCertNo(String certName,String certNo);
|
||||
|
||||
Integer countCertCount(String name, String idNum);
|
||||
|
||||
Integer countCertCount(String name, String idNum, String accountNo, String mobile);
|
||||
|
||||
@@ -7,14 +7,16 @@ import com.sqx.modules.app.mapper.UserInfoMapper;
|
||||
import com.sqx.modules.app.service.UserInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
* @description 针对表【user_info】的数据库操作Service实现
|
||||
* @createDate 2025-01-02 14:15:08
|
||||
*/
|
||||
* @author Administrator
|
||||
* @description 针对表【user_info】的数据库操作Service实现
|
||||
* @createDate 2025-01-02 14:15:08
|
||||
*/
|
||||
@Service
|
||||
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo>
|
||||
implements UserInfoService{
|
||||
implements UserInfoService {
|
||||
|
||||
@Override
|
||||
public UserInfo getByUserId(long userId) {
|
||||
@@ -28,6 +30,29 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo>
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAuth(long userId) {
|
||||
UserInfo userInfo = getOne(new LambdaQueryWrapper<UserInfo>()
|
||||
.eq(UserInfo::getUserId, userId)
|
||||
.isNotNull(UserInfo::getCertName)
|
||||
.isNotNull(UserInfo::getCertNo)
|
||||
);
|
||||
if (userInfo != null) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserInfo> getUsersByNameAndCertNo(String certName, String certNo) {
|
||||
List<UserInfo> userIds = baseMapper.selectList(new LambdaQueryWrapper<UserInfo>()
|
||||
.eq(UserInfo::getCertName,certName)
|
||||
.eq(UserInfo::getCertNo,certNo)
|
||||
.select(UserInfo::getUserId)
|
||||
);
|
||||
return userIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countCertCount(String name, String idNum) {
|
||||
return count(new LambdaQueryWrapper<UserInfo>()
|
||||
|
||||
Reference in New Issue
Block a user