|
@@ -167,6 +167,10 @@ class UserService extends CrudService {
|
|
|
assert(name, '缺少姓名');
|
|
|
assert(mobile, '缺少手机号');
|
|
|
assert(appopenid, '缺少小程序openid');
|
|
|
+ const user = await this.findOne({ name, mobile });
|
|
|
+ if (!user) {
|
|
|
+ throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '用户信息不存在');
|
|
|
+ }
|
|
|
const res = await this.model.update({ name, mobile }, { $set: appopenid });
|
|
|
return res;
|
|
|
}
|