var system=require("../../system")
var settings=require("../../../config/settings");
const CtlBase = require("../ctl.base");
const uuidv4 = require('uuid/v4');
class SystemregistCtl extends CtlBase{
   constructor(){
     super(CtlBase.getServiceName(SystemregistCtl));
     //this.appS=system.getObject("service.appSve");
   }
   async submitNeed(pobj,obj){
      var name = obj.name;
      var mobile = obj.mobile;
      if(!name){
         return {code:-1,msg:"name参数错误"};
      }
      if(!mobile){
         return {code:-2,msg:"mobile参数错误"};
      }
      var submitObj={
         name:name,mobile:mobile,notes:obj.textarea || ""
      };
      try {
         var data = await this.service.dao.create(submitObj);
         return {code:1,data:data};
      } catch (error) {
         return {code:-200,msg:"操作失败"};
      }
   }
}
module.exports=SystemregistCtl;
