liuyu 4 年之前
父節點
當前提交
551a7dc744
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/service/roomuser.js

+ 2 - 2
app/service/roomuser.js

@@ -23,7 +23,7 @@ class RoomuserService extends CrudService {
     if (has_phone) {
       throw new BusinessError('此手机号已被注册,请更换手机号');
     }
-    const res = await this.ctx.service.user.create(data);
+    const res = await this.model.create(data);
     if (res) {
       const newdata = {
         name,
@@ -34,7 +34,7 @@ class RoomuserService extends CrudService {
         deptname: data.deptname,
         remark: data.remark,
       };
-      await this.umodel.create(newdata);
+      await this.ctx.service.user.create(newdata);
     }
     return res;
   }