lrf402788946 %!s(int64=4) %!d(string=hai) anos
pai
achega
8f2b0dc2fd

+ 12 - 0
app/controller/.achieve_expert.js

@@ -5,6 +5,12 @@ module.exports = {
       "expert_name",
       "phone",
       "password",
+      "company",
+      "group_zw",
+      "major",
+      "now_major",
+      "zw",
+      "zc",
     ],
   },
   destroy: {
@@ -18,6 +24,12 @@ module.exports = {
       "expert_name",
       "phone",
       "password",
+      "company",
+      "group_zw",
+      "major",
+      "now_major",
+      "zw",
+      "zc",
       "status",
       "verify",
     ],

+ 6 - 0
app/model/achieve_expert.js

@@ -10,6 +10,12 @@ const achieve_expert = {
   expert_user_id: { type: ObjectId }, // 专家的用户id
   expert_name: { type: String }, // 专家姓名
   phone: { type: String }, // 电话
+  company: { type: String }, // 工作单位
+  group_zw: { type: String }, // 评价专家组职务
+  major: { type: String }, // 所学专业
+  now_major: { type: String }, // 现从事专业
+  zw: { type: String }, // 职务
+  zc: { type: String }, // 职称
   password: { type: Secret, select: false },
   status: { type: String, default: '0' }, // 0=>使用中;-1=>禁用中
   remark: { type: String, maxLength: 200 },

+ 5 - 0
app/service/achieve_expert.js

@@ -69,6 +69,11 @@ class Achieve_expertService extends CrudService {
     const token = jwt.sign(data, secrets);
     return token;
   }
+
+  async getExperts(ids) {
+    const res = await this.model.find({ _id: ids });
+    return res;
+  }
 }
 
 module.exports = Achieve_expertService;