lrf402788946 %!s(int64=4) %!d(string=hai) anos
pai
achega
d6184c4edf
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/service/user.js

+ 1 - 1
app/service/user.js

@@ -86,7 +86,7 @@ class UserService extends CrudService {
       user.unionid = unionid;
       await user.save();
     } else {
-      const stud = await this.stuModel.findOne({ id_number });
+      const stud = await this.stuModel.findOne({ id_number: { $regex: `^${id_number}$`, $options: 'i' } });
       if (!stud) {
         throw new BusinessError(ErrorCode.USER_NOT_EXIST);
       }