var system=require("../../system")
var settings=require("../../../config/settings");
const CtlBase = require("../ctl.base");
const uuidv4 = require('uuid/v4');
class UserbpocompanyCtl extends CtlBase{
   constructor(){
     super(CtlBase.getServiceName(UserbpocompanyCtl));
     //this.appS=system.getObject("service.appSve");
   }

   async save(q, obj, req) {
    console.log(obj, "=============================================");
    try {
      var page = await this.service.save(obj.uid, obj.names);
      return system.getResult2(page);
    } catch (e) {
      console.log(e);
      return system.getErrResult2("您的网络不稳, 请稍后重试");
    } 
  }

  async userCompanys(q, obj, req) {
    console.log(obj, "=============================================");
    try {
      var page = await this.service.byUserId(obj.uid);
      return system.getResult2(page);
    } catch (e) {
      console.log(e);
      return system.getErrResult2("您的网络不稳, 请稍后重试");
    } 
  }

}
module.exports=UserbpocompanyCtl;
