|
|
@@ -10,9 +10,11 @@ import com.cyksj.common.util.Jsons;
|
|
|
import com.cyksj.common.util.StringUtil;
|
|
|
import com.cyksj.mapper.UserCertRecordMapper;
|
|
|
import com.cyksj.mapper.UserMapper;
|
|
|
+import com.cyksj.mapper.UserStudentCertRecordMapper;
|
|
|
import com.cyksj.model.dto.UserWxIndentDto;
|
|
|
import com.cyksj.model.entity.User;
|
|
|
import com.cyksj.model.entity.UserCertRecord;
|
|
|
+import com.cyksj.model.entity.UserStudentCertRecord;
|
|
|
import com.cyksj.model.request.UserIndentCertReq;
|
|
|
import com.cyksj.model.response.WxCertAuthTokenResp;
|
|
|
import com.cyksj.redis.RedisService;
|
|
|
@@ -43,6 +45,8 @@ public class UserIdentCertServiceImpl implements UserIdentCertService {
|
|
|
|
|
|
private final UserCertRecordMapper userCertRecordMapper;
|
|
|
|
|
|
+ private final UserStudentCertRecordMapper userStudentCertRecordMapper;
|
|
|
+
|
|
|
private final UserMapper userMapper;
|
|
|
|
|
|
private final RedisService redisService;
|
|
|
@@ -81,6 +85,19 @@ public class UserIdentCertServiceImpl implements UserIdentCertService {
|
|
|
return record;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public UserStudentCertRecord getUserStudentCertRecord(long userId) {
|
|
|
+ List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
|
|
|
+ UserStudentCertRecord record = userStudentCertRecordMapper.selectOne(Wrappers.lambdaQuery(UserStudentCertRecord.class)
|
|
|
+ .in(UserStudentCertRecord::getUserId, userIdList)
|
|
|
+ .select(UserStudentCertRecord::getName, UserStudentCertRecord::getSchool, UserStudentCertRecord::getCreatedTime)
|
|
|
+ .last("limit 1"));
|
|
|
+ if (record == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return record;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public String bindWxUser(long userId) {
|
|
|
User user = userMapper.selectById(userId);
|