|
|
@@ -5,6 +5,7 @@ import cn.hutool.core.date.LocalDateTimeUtil;
|
|
|
import cn.hutool.core.map.MapUtil;
|
|
|
import cn.hutool.core.util.NumberUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
@@ -251,11 +252,13 @@ public class StudentStatusServiceImpl extends ServiceImpl<StudentStatusMapper, S
|
|
|
if (NumberUtil.isGreater(NumberUtil.toBigDecimal(memberCount), BigDecimal.ZERO)) {
|
|
|
throw new RRException("当前微信用户已有学籍认证记录");
|
|
|
}
|
|
|
- Integer count = baseMapper.selectCount(new LambdaQueryWrapper<StudentStatusEntity>()
|
|
|
- .eq(StudentStatusEntity::getIdentityNumber, dto.getIdentityNumber())
|
|
|
- .eq(StudentStatusEntity::getIsDelete, IsDeleteEnum.NORMAL.value()));
|
|
|
- if (NumberUtil.isGreater(NumberUtil.toBigDecimal(count), BigDecimal.ZERO)) {
|
|
|
- throw new RRException("当前微信用户已有学籍认证记录");
|
|
|
+ if (StrUtil.isNotEmpty(dto.getIdentityNumber())) {
|
|
|
+ Integer count = baseMapper.selectCount(new LambdaQueryWrapper<StudentStatusEntity>()
|
|
|
+ .eq(StudentStatusEntity::getIdentityNumber, dto.getIdentityNumber())
|
|
|
+ .eq(StudentStatusEntity::getIsDelete, IsDeleteEnum.NORMAL.value()));
|
|
|
+ if (NumberUtil.isGreater(NumberUtil.toBigDecimal(count), BigDecimal.ZERO)) {
|
|
|
+ throw new RRException("当前微信用户已有学籍认证记录");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|