package ppos

//paramsCompany 公共参数：应用id、账号类型、账号id、公司
type paramsCompany struct {
	paramsAccount
}

func (that *paramsCompany) init() {
	that.paramsBase.init()
	that.paramsSlice = append(that.paramsSlice, []string{
		"company_id", //公司id
		"personnel_id",
	}...)
}

func (that *paramsCompany) CreateMpApi(params ...interface{}) error {
	that.init()
	if _err := that.paramsAccount.CreateMpApi(params...); _err != nil {
		return _err
	}
	//设置隔离字段
	that.postionMp.Set("company_id", that.paramsMp.Get("company_id"))
	return nil
}
