Explorar o código

Merge branch 'master' of https://git.i2edu.net/i2/i2-bill-erp

2637309949 %!s(int64=4) %!d(string=hai) anos
pai
achega
daf7aea8c7

+ 2 - 2
etc/transform.yaml

@@ -1,9 +1,9 @@
 Name: transform.rpc
-ListenOn: 0.0.0.0:8080
+ListenOn: 172.16.11.5:8080
 Etcd:
   Hosts:
   - 47.103.219.158:30019
-  Key: transform.rpc
+  Key: icole.rpc
 DataSource: root:gSRGZqb121TlYIbJy0@tcp(47.103.202.94:3306)/i2erp_erp1?charset=utf8&loc=Local&parseTime=true
 Table:
 Cache:

+ 31 - 3
internal/logic/get_erp_active_logic.go

@@ -23,8 +23,36 @@ func NewGetErpActiveLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetE
 	}
 }
 
-func (l *GetErpActiveLogic) GetErpActive(in *transform.Empty) (*transform.ResponseByte, error) {
+func (l *GetErpActiveLogic) GetErpActive(in *transform.GetErpActiveReq) (*transform.GetErpActiveRes, error) {
 	// todo: add your logic here and delete this line
-
-	return &transform.ResponseByte{}, nil
+	type Active struct {
+		MaName   string `json:"ma_name"`
+		ActiveId int64  `json:"active_id"`
+	}
+	acts := new([]*Active)
+	actives := new([]*transform.Active)
+	sql := `
+		select
+    		act.id active_id,act.ma_name
+		from
+    		mkt_activity act
+		left join
+    		mkt_activities_school act_sch
+		on
+    		act.id = act_sch.ma_id
+		where
+    		act.del_flag = 0
+    		and act_sch.school_id = ?  `
+	err := l.svcCtx.DB.SQL(sql, in.SchId).Find(acts)
+	if err != nil {
+		logx.Error(err.Error())
+		return nil, err
+	}
+	for _, act := range *acts {
+		active := new(transform.Active)
+		active.MaName = act.MaName
+		active.ActiveId = act.ActiveId
+		*actives = append(*actives, active)
+	}
+	return &transform.GetErpActiveRes{Active: *actives}, nil
 }

+ 26 - 1
internal/logic/get_erp_mkt_net_work_detail_tree_logic.go

@@ -2,6 +2,8 @@ package logic
 
 import (
 	"context"
+	"git.i2edu.net/i2/i2-bill-erp/model"
+	"git.i2edu.net/i2/i2-bill-erp/utils"
 
 	"git.i2edu.net/i2/i2-bill-erp/internal/svc"
 	"git.i2edu.net/i2/i2-bill-erp/transform"
@@ -25,6 +27,29 @@ func NewGetErpMktNetWorkDetailTreeLogic(ctx context.Context, svcCtx *svc.Service
 
 func (l *GetErpMktNetWorkDetailTreeLogic) GetErpMktNetWorkDetailTree(in *transform.Empty) (*transform.TreeNodes, error) {
 	// todo: add your logic here and delete this line
+	var nodes = new([]*transform.TreeNode)
+	var networks = new([]model.MktNetworkDetail)
+	sql := `select
+			*
+		from
+			mkt_network_detail
+		where
+			mkt_network_detail.del_flag = 0
+            and id>=1000
+			and (id in (1001,1002,1003,1004,1005)or !ISNULL(mkt_network_detail.parent))
+		`
+	err := l.svcCtx.SqlConn.QueryRows(networks, sql)
+	for _, newwork := range *networks {
+		node := new(transform.TreeNode)
+		node.Id = newwork.Id
+		node.Parent = newwork.Parent.Int64
+		node.Text = newwork.Name.String
+		*nodes = append(*nodes, node)
+	}
+	if err != nil {
+		return nil, err
+	}
+	res, err := utils.BuildTree(nodes)
+	return &transform.TreeNodes{Nodes: res}, err
 
-	return &transform.TreeNodes{}, nil
 }

+ 21 - 1
internal/logic/get_erp_optionset_logic.go

@@ -2,6 +2,9 @@ package logic
 
 import (
 	"context"
+	"errors"
+	"git.i2edu.net/i2/go-zero/core/stores/sqlx"
+	"git.i2edu.net/i2/i2-bill-erp/model"
 
 	"git.i2edu.net/i2/i2-bill-erp/internal/svc"
 	"git.i2edu.net/i2/i2-bill-erp/transform"
@@ -25,6 +28,23 @@ func NewGetErpOptionsetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *G
 
 func (l *GetErpOptionsetLogic) GetErpOptionset(in *transform.OptionCode) (*transform.Options, error) {
 	// todo: add your logic here and delete this line
+	code := in.Code
+	if code == "" {
+		return nil, errors.New("请输入code参数")
+	}
+	var optionSet = new(model.SysOptionset)
+	sql := `select
+			*
+		from
+			sys_optionset
+		where
+			sys_optionset.del_flag = 0
+			and code = ?`
+
+	err := l.svcCtx.SqlConn.QueryRow(optionSet, sql, code)
+	if err != nil && err != sqlx.ErrNotFound {
+		return nil, err
+	}
+	return &transform.Options{Code: optionSet.Code, Name: optionSet.Name, Value: optionSet.Value}, nil
 
-	return &transform.Options{}, nil
 }

+ 63 - 0
internal/logic/get_erp_organ_sch_per_by_user_id_logic.go

@@ -0,0 +1,63 @@
+package logic
+
+import (
+	"context"
+	"git.i2edu.net/i2/i2-bill-erp/internal/svc"
+	"git.i2edu.net/i2/i2-bill-erp/transform"
+
+	"git.i2edu.net/i2/go-zero/core/logx"
+)
+
+type GetErpOrganSchPerByUserIdLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewGetErpOrganSchPerByUserIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetErpOrganSchPerByUserIdLogic {
+	return &GetErpOrganSchPerByUserIdLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 获取erp 用户权限
+func (l *GetErpOrganSchPerByUserIdLogic) GetErpOrganSchPerByUserId(in *transform.GetErpOrganSchPerByUserIdReq) (*transform.GetErpOrganSchPerByUserIdRes, error) {
+	// todo: add your logic here and delete this line
+	type Sch struct {
+		Name    string `json:"name"`
+		OrganId int64  `json:"organ_id"`
+		Id      int64  `json:"id"`
+	}
+	sch := new([]*Sch)
+	schools := new([]*transform.OrganSchool)
+	sql := `
+		SELECT
+    		sch.name,sch.organ_id,sch.id
+		FROM
+    		base_organ_school sch
+		INNER JOIN
+    		base_user_organ_school user_sch
+		ON
+    		sch.id= user_sch.os_id
+		WHERE
+    		sch.del_flag = 0
+    		and user_sch.del_flag = 0
+		    and onoff =98
+    		and user_sch.user_id = ?
+	`
+	err := l.svcCtx.DB.SQL(sql, in.UserId).Find(sch)
+	if err != nil {
+		logx.Error(err.Error())
+		return nil, err
+	}
+	for _, s := range *sch {
+		school := new(transform.OrganSchool)
+		school.Id = s.Id
+		school.Name = s.Name
+		school.OrganId = s.OrganId
+		*schools = append(*schools, school)
+	}
+	return &transform.GetErpOrganSchPerByUserIdRes{School: *schools}, nil
+}

+ 52 - 0
internal/logic/get_erp_role_logic.go

@@ -0,0 +1,52 @@
+package logic
+
+import (
+	"context"
+	"errors"
+
+	"git.i2edu.net/i2/i2-bill-erp/internal/svc"
+	"git.i2edu.net/i2/i2-bill-erp/transform"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type GetErpRoleLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewGetErpRoleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetErpRoleLogic {
+	return &GetErpRoleLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 获取 erp 用户角色
+func (l *GetErpRoleLogic) GetErpRole(in *transform.GetErpRoleReq) (*transform.GetErpRoleRes, error) {
+	// todo: add your logic here and delete this line
+	if in.Mobile == "" {
+		return nil, errors.New("mobile is empty")
+	}
+	sql := `select  
+			sys_user.id user_id,GROUP_CONCAT(sys_role.code)  role
+          from 
+			sys_user  
+		  LEFT JOIN 
+			sys_user_role on sys_user.id=sys_user_role.user_id  
+		  LEFT JOIN  sys_role on sys_user_role.role_id= sys_role.id   
+		  where 
+			 sys_user.mobile = ? GROUP BY sys_user.mobile`
+	result, err := l.svcCtx.DB.SQL(sql, in.Mobile).Query().List()
+	if err != nil {
+		return nil, err
+	}
+	if len(result) == 0 {
+		return nil, nil
+	}
+	user_id, _ := result[0]["user_id"].(string)
+	role, _ := result[0]["role"].(string)
+	return &transform.GetErpRoleRes{UserId: user_id, Role: role}, nil
+}

+ 27 - 3
internal/logic/get_erp_school_logic.go

@@ -23,8 +23,32 @@ func NewGetErpSchoolLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetE
 	}
 }
 
-func (l *GetErpSchoolLogic) GetErpSchool(in *transform.Empty) (*transform.ResponseByte, error) {
+func (l *GetErpSchoolLogic) GetErpSchool(in *transform.Empty) (*transform.GetErpSchoolRes, error) {
 	// todo: add your logic here and delete this line
-
-	return &transform.ResponseByte{}, nil
+	type Sch struct {
+		Name    string `json:"name"`
+		OrganId int64  `json:"organ_id"`
+		Id      int64  `json:"id"`
+	}
+	sch := new([]*Sch)
+	schools := new([]*transform.OrganSchool)
+	sql := `
+		SELECT
+    		sch.name,sch.organ_id,sch.id
+		FROM
+    		base_organ_school sch
+	`
+	err := l.svcCtx.DB.SQL(sql).Find(sch)
+	if err != nil {
+		logx.Error(err.Error())
+		return nil, err
+	}
+	for _, s := range *sch {
+		school := new(transform.OrganSchool)
+		school.Id = s.Id
+		school.Name = s.Name
+		school.OrganId = s.OrganId
+		*schools = append(*schools, school)
+	}
+	return &transform.GetErpSchoolRes{School: *schools}, nil
 }

+ 19 - 2
internal/server/transform_server.go

@@ -31,11 +31,13 @@ func (s *TransformServer) ParseToken(ctx context.Context, in *transform.TokenReq
 	return l.ParseToken(in)
 }
 
+// 获取erp 省、城市树
 func (s *TransformServer) GetErpCityTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
 	l := logic.NewGetErpCityTreeLogic(ctx, s.svcCtx)
 	return l.GetErpCityTree(in)
 }
 
+// 获取erp  字典
 func (s *TransformServer) LoadOptionset(ctx context.Context, in *transform.OptionsetReq) (*transform.OptionsetRes, error) {
 	l := logic.NewLoadOptionsetLogic(ctx, s.svcCtx)
 	return l.LoadOptionset(in)
@@ -61,17 +63,32 @@ func (s *TransformServer) GetErpOptionset(ctx context.Context, in *transform.Opt
 	return l.GetErpOptionset(in)
 }
 
+// 获取erp 渠道细分树
 func (s *TransformServer) GetErpMktNetWorkDetailTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
 	l := logic.NewGetErpMktNetWorkDetailTreeLogic(ctx, s.svcCtx)
 	return l.GetErpMktNetWorkDetailTree(in)
 }
 
-func (s *TransformServer) GetErpSchool(ctx context.Context, in *transform.Empty) (*transform.ResponseByte, error) {
+// 获取erp 用户校区权限
+func (s *TransformServer) GetErpOrganSchPerByUserId(ctx context.Context, in *transform.GetErpOrganSchPerByUserIdReq) (*transform.GetErpOrganSchPerByUserIdRes, error) {
+	l := logic.NewGetErpOrganSchPerByUserIdLogic(ctx, s.svcCtx)
+	return l.GetErpOrganSchPerByUserId(in)
+}
+
+// 获取 erp 用户角色
+func (s *TransformServer) GetErpRole(ctx context.Context, in *transform.GetErpRoleReq) (*transform.GetErpRoleRes, error) {
+	l := logic.NewGetErpRoleLogic(ctx, s.svcCtx)
+	return l.GetErpRole(in)
+}
+
+// 获取 erp 全部校区
+func (s *TransformServer) GetErpSchool(ctx context.Context, in *transform.Empty) (*transform.GetErpSchoolRes, error) {
 	l := logic.NewGetErpSchoolLogic(ctx, s.svcCtx)
 	return l.GetErpSchool(in)
 }
 
-func (s *TransformServer) GetErpActive(ctx context.Context, in *transform.Empty) (*transform.ResponseByte, error) {
+// 获取 erp 活动
+func (s *TransformServer) GetErpActive(ctx context.Context, in *transform.GetErpActiveReq) (*transform.GetErpActiveRes, error) {
 	l := logic.NewGetErpActiveLogic(ctx, s.svcCtx)
 	return l.GetErpActive(in)
 }

+ 88 - 0
model/mkt_network_detail_model.go

@@ -0,0 +1,88 @@
+package model
+
+import (
+	"database/sql"
+	"fmt"
+	"strings"
+
+	"git.i2edu.net/i2/go-zero/core/stores/sqlc"
+	"git.i2edu.net/i2/go-zero/core/stores/sqlx"
+	"git.i2edu.net/i2/go-zero/core/stringx"
+	"git.i2edu.net/i2/go-zero/tools/goctl/model/sql/builderx"
+)
+
+var (
+	mktNetworkDetailFieldNames          = builderx.RawFieldNames(&MktNetworkDetail{})
+	mktNetworkDetailRows                = strings.Join(mktNetworkDetailFieldNames, ",")
+	mktNetworkDetailRowsExpectAutoSet   = strings.Join(stringx.Remove(mktNetworkDetailFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
+	mktNetworkDetailRowsWithPlaceHolder = strings.Join(stringx.Remove(mktNetworkDetailFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
+)
+
+type (
+	MktNetworkDetailModel interface {
+		Insert(data MktNetworkDetail) (sql.Result, error)
+		FindOne(id int64) (*MktNetworkDetail, error)
+		Update(data MktNetworkDetail) error
+		Delete(id int64) error
+	}
+
+	defaultMktNetworkDetailModel struct {
+		conn  sqlx.SqlConn
+		table string
+	}
+
+	MktNetworkDetail struct {
+		LastUpdateTime sql.NullTime    `db:"last_update_time" json:"last_update_time"`
+		CreateBy       sql.NullString  `db:"create_by" json:"create_by"`
+		LastUpdateBy   sql.NullString  `db:"last_update_by" json:"last_update_by"`
+		Parent         sql.NullInt64   `db:"parent" json:"parent"`
+		Inheritance    sql.NullString  `db:"inheritance" json:"inheritance"`
+		Remake         sql.NullString  `db:"remake" json:"remake"`
+		CreateTime     sql.NullTime    `db:"create_time" json:"create_time"`
+		DelFlag        sql.NullFloat64 `db:"del_flag" json:"del_flag"`
+		Qudao          sql.NullInt64   `db:"qudao" json:"qudao"`
+		Id             int64           `db:"id" json:"id"`
+		Name           sql.NullString  `db:"name" json:"name"`
+		ChannelType    sql.NullInt64   `db:"channel_type" json:"channel_type"`
+		QueryType      sql.NullInt64   `db:"query_type" json:"query_type"`
+	}
+)
+
+func NewMktNetworkDetailModel(conn sqlx.SqlConn) MktNetworkDetailModel {
+	return &defaultMktNetworkDetailModel{
+		conn:  conn,
+		table: "`mkt_network_detail`",
+	}
+}
+
+func (m *defaultMktNetworkDetailModel) Insert(data MktNetworkDetail) (sql.Result, error) {
+	query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", m.table, mktNetworkDetailRowsExpectAutoSet)
+	ret, err := m.conn.Exec(query, data.LastUpdateTime, data.CreateBy, data.LastUpdateBy, data.Parent, data.Inheritance, data.Remake, data.DelFlag, data.Qudao, data.Name, data.ChannelType, data.QueryType)
+	return ret, err
+}
+
+func (m *defaultMktNetworkDetailModel) FindOne(id int64) (*MktNetworkDetail, error) {
+	query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", mktNetworkDetailRows, m.table)
+	var resp MktNetworkDetail
+	err := m.conn.QueryRow(&resp, query, id)
+	switch err {
+	case nil:
+		return &resp, nil
+	case sqlc.ErrNotFound:
+		return nil, ErrNotFound
+	default:
+		return nil, err
+	}
+}
+
+func (m *defaultMktNetworkDetailModel) Update(data MktNetworkDetail) error {
+	query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, mktNetworkDetailRowsWithPlaceHolder)
+	_, err := m.conn.Exec(query, data.LastUpdateTime, data.CreateBy, data.LastUpdateBy, data.Parent, data.Inheritance, data.Remake, data.DelFlag, data.Qudao, data.Name, data.ChannelType, data.QueryType, data.Id)
+	return err
+}
+
+func (m *defaultMktNetworkDetailModel) Delete(id int64) error {
+	query := fmt.Sprintf("delete from %s where `id` = ?", m.table)
+	_, err := m.conn.Exec(query, id)
+	return err
+}

+ 85 - 0
model/sys_optionset_model.go

@@ -0,0 +1,85 @@
+package model
+
+import (
+	"database/sql"
+	"fmt"
+	"strings"
+	"time"
+
+	"git.i2edu.net/i2/go-zero/core/stores/sqlc"
+	"git.i2edu.net/i2/go-zero/core/stores/sqlx"
+	"git.i2edu.net/i2/go-zero/core/stringx"
+	"git.i2edu.net/i2/go-zero/tools/goctl/model/sql/builderx"
+)
+
+var (
+	sysOptionsetFieldNames          = builderx.RawFieldNames(&SysOptionset{})
+	sysOptionsetRows                = strings.Join(sysOptionsetFieldNames, ",")
+	sysOptionsetRowsExpectAutoSet   = strings.Join(stringx.Remove(sysOptionsetFieldNames, "`create_time`", "`update_time`"), ",")
+	sysOptionsetRowsWithPlaceHolder = strings.Join(stringx.Remove(sysOptionsetFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
+)
+
+type (
+	SysOptionsetModel interface {
+		Insert(data SysOptionset) (sql.Result, error)
+		FindOne(id string) (*SysOptionset, error)
+		Update(data SysOptionset) error
+		Delete(id string) error
+	}
+
+	defaultSysOptionsetModel struct {
+		conn  sqlx.SqlConn
+		table string
+	}
+
+	SysOptionset struct {
+		DelFlag        int64     `db:"del_flag" json:"del_flag"`
+		Name           string    `db:"name" json:"name"`
+		Code           string    `db:"code" json:"code"`
+		CreateTime     time.Time `db:"create_time" json:"create_time"`
+		LastUpdateBy   string    `db:"last_update_by" json:"last_update_by"`
+		LastUpdateTime int64     `db:"last_update_time" json:"last_update_time"`
+		Id             string    `db:"id" json:"id"`
+		Value          string    `db:"value" json:"value"`
+		CreateBy       string    `db:"create_by" json:"create_by"`
+	}
+)
+
+func NewSysOptionsetModel(conn sqlx.SqlConn) SysOptionsetModel {
+	return &defaultSysOptionsetModel{
+		conn:  conn,
+		table: "`sys_optionset`",
+	}
+}
+
+func (m *defaultSysOptionsetModel) Insert(data SysOptionset) (sql.Result, error) {
+	query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?, ?, ?, ?)", m.table, sysOptionsetRowsExpectAutoSet)
+	ret, err := m.conn.Exec(query, data.DelFlag, data.Name, data.Code, data.LastUpdateBy, data.LastUpdateTime, data.Id, data.Value, data.CreateBy)
+	return ret, err
+}
+
+func (m *defaultSysOptionsetModel) FindOne(id string) (*SysOptionset, error) {
+	query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", sysOptionsetRows, m.table)
+	var resp SysOptionset
+	err := m.conn.QueryRow(&resp, query, id)
+	switch err {
+	case nil:
+		return &resp, nil
+	case sqlc.ErrNotFound:
+		return nil, ErrNotFound
+	default:
+		return nil, err
+	}
+}
+
+func (m *defaultSysOptionsetModel) Update(data SysOptionset) error {
+	query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, sysOptionsetRowsWithPlaceHolder)
+	_, err := m.conn.Exec(query, data.DelFlag, data.Name, data.Code, data.LastUpdateBy, data.LastUpdateTime, data.Value, data.CreateBy, data.Id)
+	return err
+}
+
+func (m *defaultSysOptionsetModel) Delete(id string) error {
+	query := fmt.Sprintf("delete from %s where `id` = ?", m.table)
+	_, err := m.conn.Exec(query, id)
+	return err
+}

+ 13 - 0
sqlconfig/mkt_activity_all.tpl

@@ -0,0 +1,13 @@
+select
+    *
+from
+    mkt_activity act
+left join
+    mkt_activities_school act_sch
+on
+    act.id = act_sch.ma_id
+where
+    act.del_flag = 0
+    {{if ne .school_id ""}}
+    act_sch.school_id = '{{.school_id}}'
+    {{end}}

+ 61 - 2
transform.proto

@@ -109,16 +109,75 @@ message CityIdsRes {
   map<string, int64> mapList=1;
 }
 
+message BytesReq{
+  bytes req = 1;
+}
+
+message BytesResp{
+  bytes resp = 1;
+}
+
+message GetErpRoleRes{
+  string user_id = 1;
+  string  role = 2;
+}
+
+message GetErpRoleReq{
+   string mobile = 1;
+   string user_id = 2;
+}
+
+message GetErpOrganSchPerByUserIdReq{
+  string user_id = 1;
+}
+
+message GetErpOrganSchPerByUserIdRes{
+  repeated  OrganSchool school = 1;
+}
+
+message OrganSchool {
+  int64  id =1;
+  string name = 2;
+  int64 organ_id = 3;
+}
+
+message GetErpSchoolRes{
+  repeated  OrganSchool school = 1;
+}
+
+message GetErpActiveReq{
+    uint64 sch_id = 1;
+}
+
+message GetErpActiveRes{
+  repeated Active active = 1;
+}
+
+message Active{
+    int64  active_id = 1;
+    string ma_name = 2;
+}
+
+
 service Transform {
   rpc GetUser(UserRequest) returns(UserResponse);
   rpc ParseToken(TokenRequest) returns(TokenResponse);
+  //获取erp 省、城市树
   rpc GetErpCityTree(Empty) returns(TreeNodes);
+  //获取erp  字典
   rpc LoadOptionset(OptionsetReq) returns(OptionsetRes);
   rpc GetSchoolIds(SchoolIdsReq) returns(SchoolIdsRes);
   rpc GetCityIds(CityIdsReq) returns(CityIdsRes);
   rpc PostExcelLog(ExcelLogReq) returns(ExcelLogRes);
   rpc GetErpOptionset(OptionCode) returns(Options);
+  //获取erp 渠道细分树
   rpc GetErpMktNetWorkDetailTree(Empty) returns(TreeNodes);
-  rpc GetErpSchool(Empty) returns(ResponseByte);
-  rpc GetErpActive(Empty) returns(ResponseByte);
+  //获取erp 用户校区权限
+  rpc GetErpOrganSchPerByUserId(GetErpOrganSchPerByUserIdReq) returns(GetErpOrganSchPerByUserIdRes);
+  //获取 erp 用户角色
+  rpc GetErpRole(GetErpRoleReq)  returns(GetErpRoleRes);
+  //获取 erp 全部校区
+  rpc GetErpSchool(Empty)  returns(GetErpSchoolRes);
+  //获取 erp 活动
+  rpc GetErpActive(GetErpActiveReq) returns(GetErpActiveRes);
 }

+ 653 - 71
transform/transform.pb.go

@@ -1012,6 +1012,475 @@ func (m *CityIdsRes) GetMapList() map[string]int64 {
 	return nil
 }
 
+type BytesReq struct {
+	Req                  []byte   `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *BytesReq) Reset()         { *m = BytesReq{} }
+func (m *BytesReq) String() string { return proto.CompactTextString(m) }
+func (*BytesReq) ProtoMessage()    {}
+func (*BytesReq) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{20}
+}
+
+func (m *BytesReq) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_BytesReq.Unmarshal(m, b)
+}
+func (m *BytesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_BytesReq.Marshal(b, m, deterministic)
+}
+func (m *BytesReq) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_BytesReq.Merge(m, src)
+}
+func (m *BytesReq) XXX_Size() int {
+	return xxx_messageInfo_BytesReq.Size(m)
+}
+func (m *BytesReq) XXX_DiscardUnknown() {
+	xxx_messageInfo_BytesReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_BytesReq proto.InternalMessageInfo
+
+func (m *BytesReq) GetReq() []byte {
+	if m != nil {
+		return m.Req
+	}
+	return nil
+}
+
+type BytesResp struct {
+	Resp                 []byte   `protobuf:"bytes,1,opt,name=resp,proto3" json:"resp,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *BytesResp) Reset()         { *m = BytesResp{} }
+func (m *BytesResp) String() string { return proto.CompactTextString(m) }
+func (*BytesResp) ProtoMessage()    {}
+func (*BytesResp) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{21}
+}
+
+func (m *BytesResp) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_BytesResp.Unmarshal(m, b)
+}
+func (m *BytesResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_BytesResp.Marshal(b, m, deterministic)
+}
+func (m *BytesResp) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_BytesResp.Merge(m, src)
+}
+func (m *BytesResp) XXX_Size() int {
+	return xxx_messageInfo_BytesResp.Size(m)
+}
+func (m *BytesResp) XXX_DiscardUnknown() {
+	xxx_messageInfo_BytesResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_BytesResp proto.InternalMessageInfo
+
+func (m *BytesResp) GetResp() []byte {
+	if m != nil {
+		return m.Resp
+	}
+	return nil
+}
+
+type GetErpRoleRes struct {
+	UserId               string   `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+	Role                 string   `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *GetErpRoleRes) Reset()         { *m = GetErpRoleRes{} }
+func (m *GetErpRoleRes) String() string { return proto.CompactTextString(m) }
+func (*GetErpRoleRes) ProtoMessage()    {}
+func (*GetErpRoleRes) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{22}
+}
+
+func (m *GetErpRoleRes) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_GetErpRoleRes.Unmarshal(m, b)
+}
+func (m *GetErpRoleRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_GetErpRoleRes.Marshal(b, m, deterministic)
+}
+func (m *GetErpRoleRes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GetErpRoleRes.Merge(m, src)
+}
+func (m *GetErpRoleRes) XXX_Size() int {
+	return xxx_messageInfo_GetErpRoleRes.Size(m)
+}
+func (m *GetErpRoleRes) XXX_DiscardUnknown() {
+	xxx_messageInfo_GetErpRoleRes.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetErpRoleRes proto.InternalMessageInfo
+
+func (m *GetErpRoleRes) GetUserId() string {
+	if m != nil {
+		return m.UserId
+	}
+	return ""
+}
+
+func (m *GetErpRoleRes) GetRole() string {
+	if m != nil {
+		return m.Role
+	}
+	return ""
+}
+
+type GetErpRoleReq struct {
+	Mobile               string   `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"`
+	UserId               string   `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *GetErpRoleReq) Reset()         { *m = GetErpRoleReq{} }
+func (m *GetErpRoleReq) String() string { return proto.CompactTextString(m) }
+func (*GetErpRoleReq) ProtoMessage()    {}
+func (*GetErpRoleReq) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{23}
+}
+
+func (m *GetErpRoleReq) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_GetErpRoleReq.Unmarshal(m, b)
+}
+func (m *GetErpRoleReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_GetErpRoleReq.Marshal(b, m, deterministic)
+}
+func (m *GetErpRoleReq) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GetErpRoleReq.Merge(m, src)
+}
+func (m *GetErpRoleReq) XXX_Size() int {
+	return xxx_messageInfo_GetErpRoleReq.Size(m)
+}
+func (m *GetErpRoleReq) XXX_DiscardUnknown() {
+	xxx_messageInfo_GetErpRoleReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetErpRoleReq proto.InternalMessageInfo
+
+func (m *GetErpRoleReq) GetMobile() string {
+	if m != nil {
+		return m.Mobile
+	}
+	return ""
+}
+
+func (m *GetErpRoleReq) GetUserId() string {
+	if m != nil {
+		return m.UserId
+	}
+	return ""
+}
+
+type GetErpOrganSchPerByUserIdReq struct {
+	UserId               string   `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *GetErpOrganSchPerByUserIdReq) Reset()         { *m = GetErpOrganSchPerByUserIdReq{} }
+func (m *GetErpOrganSchPerByUserIdReq) String() string { return proto.CompactTextString(m) }
+func (*GetErpOrganSchPerByUserIdReq) ProtoMessage()    {}
+func (*GetErpOrganSchPerByUserIdReq) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{24}
+}
+
+func (m *GetErpOrganSchPerByUserIdReq) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_GetErpOrganSchPerByUserIdReq.Unmarshal(m, b)
+}
+func (m *GetErpOrganSchPerByUserIdReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_GetErpOrganSchPerByUserIdReq.Marshal(b, m, deterministic)
+}
+func (m *GetErpOrganSchPerByUserIdReq) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GetErpOrganSchPerByUserIdReq.Merge(m, src)
+}
+func (m *GetErpOrganSchPerByUserIdReq) XXX_Size() int {
+	return xxx_messageInfo_GetErpOrganSchPerByUserIdReq.Size(m)
+}
+func (m *GetErpOrganSchPerByUserIdReq) XXX_DiscardUnknown() {
+	xxx_messageInfo_GetErpOrganSchPerByUserIdReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetErpOrganSchPerByUserIdReq proto.InternalMessageInfo
+
+func (m *GetErpOrganSchPerByUserIdReq) GetUserId() string {
+	if m != nil {
+		return m.UserId
+	}
+	return ""
+}
+
+type GetErpOrganSchPerByUserIdRes struct {
+	School               []*OrganSchool `protobuf:"bytes,1,rep,name=school,proto3" json:"school,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
+}
+
+func (m *GetErpOrganSchPerByUserIdRes) Reset()         { *m = GetErpOrganSchPerByUserIdRes{} }
+func (m *GetErpOrganSchPerByUserIdRes) String() string { return proto.CompactTextString(m) }
+func (*GetErpOrganSchPerByUserIdRes) ProtoMessage()    {}
+func (*GetErpOrganSchPerByUserIdRes) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{25}
+}
+
+func (m *GetErpOrganSchPerByUserIdRes) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_GetErpOrganSchPerByUserIdRes.Unmarshal(m, b)
+}
+func (m *GetErpOrganSchPerByUserIdRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_GetErpOrganSchPerByUserIdRes.Marshal(b, m, deterministic)
+}
+func (m *GetErpOrganSchPerByUserIdRes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GetErpOrganSchPerByUserIdRes.Merge(m, src)
+}
+func (m *GetErpOrganSchPerByUserIdRes) XXX_Size() int {
+	return xxx_messageInfo_GetErpOrganSchPerByUserIdRes.Size(m)
+}
+func (m *GetErpOrganSchPerByUserIdRes) XXX_DiscardUnknown() {
+	xxx_messageInfo_GetErpOrganSchPerByUserIdRes.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetErpOrganSchPerByUserIdRes proto.InternalMessageInfo
+
+func (m *GetErpOrganSchPerByUserIdRes) GetSchool() []*OrganSchool {
+	if m != nil {
+		return m.School
+	}
+	return nil
+}
+
+type OrganSchool struct {
+	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+	OrganId              int64    `protobuf:"varint,3,opt,name=organ_id,json=organId,proto3" json:"organ_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OrganSchool) Reset()         { *m = OrganSchool{} }
+func (m *OrganSchool) String() string { return proto.CompactTextString(m) }
+func (*OrganSchool) ProtoMessage()    {}
+func (*OrganSchool) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{26}
+}
+
+func (m *OrganSchool) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OrganSchool.Unmarshal(m, b)
+}
+func (m *OrganSchool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OrganSchool.Marshal(b, m, deterministic)
+}
+func (m *OrganSchool) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OrganSchool.Merge(m, src)
+}
+func (m *OrganSchool) XXX_Size() int {
+	return xxx_messageInfo_OrganSchool.Size(m)
+}
+func (m *OrganSchool) XXX_DiscardUnknown() {
+	xxx_messageInfo_OrganSchool.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OrganSchool proto.InternalMessageInfo
+
+func (m *OrganSchool) GetId() int64 {
+	if m != nil {
+		return m.Id
+	}
+	return 0
+}
+
+func (m *OrganSchool) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+func (m *OrganSchool) GetOrganId() int64 {
+	if m != nil {
+		return m.OrganId
+	}
+	return 0
+}
+
+type GetErpSchoolRes struct {
+	School               []*OrganSchool `protobuf:"bytes,1,rep,name=school,proto3" json:"school,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
+}
+
+func (m *GetErpSchoolRes) Reset()         { *m = GetErpSchoolRes{} }
+func (m *GetErpSchoolRes) String() string { return proto.CompactTextString(m) }
+func (*GetErpSchoolRes) ProtoMessage()    {}
+func (*GetErpSchoolRes) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{27}
+}
+
+func (m *GetErpSchoolRes) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_GetErpSchoolRes.Unmarshal(m, b)
+}
+func (m *GetErpSchoolRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_GetErpSchoolRes.Marshal(b, m, deterministic)
+}
+func (m *GetErpSchoolRes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GetErpSchoolRes.Merge(m, src)
+}
+func (m *GetErpSchoolRes) XXX_Size() int {
+	return xxx_messageInfo_GetErpSchoolRes.Size(m)
+}
+func (m *GetErpSchoolRes) XXX_DiscardUnknown() {
+	xxx_messageInfo_GetErpSchoolRes.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetErpSchoolRes proto.InternalMessageInfo
+
+func (m *GetErpSchoolRes) GetSchool() []*OrganSchool {
+	if m != nil {
+		return m.School
+	}
+	return nil
+}
+
+type GetErpActiveReq struct {
+	SchId                uint64   `protobuf:"varint,1,opt,name=sch_id,json=schId,proto3" json:"sch_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *GetErpActiveReq) Reset()         { *m = GetErpActiveReq{} }
+func (m *GetErpActiveReq) String() string { return proto.CompactTextString(m) }
+func (*GetErpActiveReq) ProtoMessage()    {}
+func (*GetErpActiveReq) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{28}
+}
+
+func (m *GetErpActiveReq) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_GetErpActiveReq.Unmarshal(m, b)
+}
+func (m *GetErpActiveReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_GetErpActiveReq.Marshal(b, m, deterministic)
+}
+func (m *GetErpActiveReq) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GetErpActiveReq.Merge(m, src)
+}
+func (m *GetErpActiveReq) XXX_Size() int {
+	return xxx_messageInfo_GetErpActiveReq.Size(m)
+}
+func (m *GetErpActiveReq) XXX_DiscardUnknown() {
+	xxx_messageInfo_GetErpActiveReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetErpActiveReq proto.InternalMessageInfo
+
+func (m *GetErpActiveReq) GetSchId() uint64 {
+	if m != nil {
+		return m.SchId
+	}
+	return 0
+}
+
+type GetErpActiveRes struct {
+	Active               []*Active `protobuf:"bytes,1,rep,name=active,proto3" json:"active,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
+	XXX_unrecognized     []byte    `json:"-"`
+	XXX_sizecache        int32     `json:"-"`
+}
+
+func (m *GetErpActiveRes) Reset()         { *m = GetErpActiveRes{} }
+func (m *GetErpActiveRes) String() string { return proto.CompactTextString(m) }
+func (*GetErpActiveRes) ProtoMessage()    {}
+func (*GetErpActiveRes) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{29}
+}
+
+func (m *GetErpActiveRes) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_GetErpActiveRes.Unmarshal(m, b)
+}
+func (m *GetErpActiveRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_GetErpActiveRes.Marshal(b, m, deterministic)
+}
+func (m *GetErpActiveRes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_GetErpActiveRes.Merge(m, src)
+}
+func (m *GetErpActiveRes) XXX_Size() int {
+	return xxx_messageInfo_GetErpActiveRes.Size(m)
+}
+func (m *GetErpActiveRes) XXX_DiscardUnknown() {
+	xxx_messageInfo_GetErpActiveRes.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetErpActiveRes proto.InternalMessageInfo
+
+func (m *GetErpActiveRes) GetActive() []*Active {
+	if m != nil {
+		return m.Active
+	}
+	return nil
+}
+
+type Active struct {
+	ActiveId             int64    `protobuf:"varint,1,opt,name=active_id,json=activeId,proto3" json:"active_id,omitempty"`
+	MaName               string   `protobuf:"bytes,2,opt,name=ma_name,json=maName,proto3" json:"ma_name,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Active) Reset()         { *m = Active{} }
+func (m *Active) String() string { return proto.CompactTextString(m) }
+func (*Active) ProtoMessage()    {}
+func (*Active) Descriptor() ([]byte, []int) {
+	return fileDescriptor_cb4a498eeb2ba07d, []int{30}
+}
+
+func (m *Active) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Active.Unmarshal(m, b)
+}
+func (m *Active) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Active.Marshal(b, m, deterministic)
+}
+func (m *Active) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Active.Merge(m, src)
+}
+func (m *Active) XXX_Size() int {
+	return xxx_messageInfo_Active.Size(m)
+}
+func (m *Active) XXX_DiscardUnknown() {
+	xxx_messageInfo_Active.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Active proto.InternalMessageInfo
+
+func (m *Active) GetActiveId() int64 {
+	if m != nil {
+		return m.ActiveId
+	}
+	return 0
+}
+
+func (m *Active) GetMaName() string {
+	if m != nil {
+		return m.MaName
+	}
+	return ""
+}
+
 func init() {
 	proto.RegisterType((*UserRequest)(nil), "transform.UserRequest")
 	proto.RegisterType((*UserResponse)(nil), "transform.UserResponse")
@@ -1036,70 +1505,97 @@ func init() {
 	proto.RegisterType((*CityIdsReq)(nil), "transform.CityIdsReq")
 	proto.RegisterType((*CityIdsRes)(nil), "transform.CityIdsRes")
 	proto.RegisterMapType((map[string]int64)(nil), "transform.CityIdsRes.MapListEntry")
+	proto.RegisterType((*BytesReq)(nil), "transform.BytesReq")
+	proto.RegisterType((*BytesResp)(nil), "transform.BytesResp")
+	proto.RegisterType((*GetErpRoleRes)(nil), "transform.GetErpRoleRes")
+	proto.RegisterType((*GetErpRoleReq)(nil), "transform.GetErpRoleReq")
+	proto.RegisterType((*GetErpOrganSchPerByUserIdReq)(nil), "transform.GetErpOrganSchPerByUserIdReq")
+	proto.RegisterType((*GetErpOrganSchPerByUserIdRes)(nil), "transform.GetErpOrganSchPerByUserIdRes")
+	proto.RegisterType((*OrganSchool)(nil), "transform.OrganSchool")
+	proto.RegisterType((*GetErpSchoolRes)(nil), "transform.GetErpSchoolRes")
+	proto.RegisterType((*GetErpActiveReq)(nil), "transform.GetErpActiveReq")
+	proto.RegisterType((*GetErpActiveRes)(nil), "transform.GetErpActiveRes")
+	proto.RegisterType((*Active)(nil), "transform.Active")
 }
 
 func init() { proto.RegisterFile("transform.proto", fileDescriptor_cb4a498eeb2ba07d) }
 
 var fileDescriptor_cb4a498eeb2ba07d = []byte{
-	// 926 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xdb, 0x46,
-	0x10, 0x06, 0x4d, 0xd3, 0xb2, 0x46, 0xb2, 0x1d, 0x6c, 0x1d, 0x87, 0x20, 0xd0, 0x42, 0x20, 0xdc,
-	0xc2, 0xb9, 0xf8, 0xe0, 0x00, 0x45, 0x6a, 0x14, 0x6d, 0x13, 0x5b, 0x15, 0x0c, 0xf8, 0x0f, 0xb4,
-	0x82, 0x9e, 0x59, 0x71, 0xa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xd8, 0x13, 0xc7, 0x56, 0xcf, 0xda, 0x68, 0xb7, 0x65, 0x72, 0x49,
-	0xf6, 0x0a, 0xb6, 0xce, 0x79, 0x9a, 0x2d, 0xa6, 0xc7, 0x4a, 0x74, 0x77, 0x44, 0x45, 0xff, 0xb1,
-	0x21, 0xd9, 0x4f, 0xd0, 0x1f, 0xa1, 0x5a, 0x7e, 0x6d, 0x9e, 0xb5, 0xd7, 0xcb, 0xea, 0x09, 0x2b,
-	0x25, 0x77, 0x0c, 0x30, 0x42, 0x65, 0x1f, 0x8b, 0x3d, 0x6d, 0x7b, 0xc0, 0xbb, 0xa8, 0x95, 0xa6,
-	0x72, 0xed, 0x5f, 0x73, 0xa9, 0x9a, 0x7e, 0x59, 0x11, 0xdf, 0x99, 0x10, 0x51, 0x3b, 0x4f, 0xf5,
-	0xb3, 0x63, 0xa4, 0x5b, 0x4a, 0xf0, 0xf4, 0xd1, 0x4d, 0x69, 0xe8, 0x45, 0xec, 0xb1, 0x00, 0xec,
-	0x14, 0x22, 0xe3, 0x7d, 0x71, 0xab, 0x2e, 0x51, 0xfd, 0xc2, 0xc5, 0xed, 0x29, 0xaa, 0x34, 0x2f,
-	0x3e, 0xe9, 0x11, 0xbe, 0xd3, 0x0a, 0x0e, 0x45, 0x65, 0x54, 0x69, 0xf1, 0x73, 0xa5, 0x5b, 0x19,
-	0x8e, 0x0b, 0xd7, 0x57, 0x13, 0x95, 0xdf, 0xe3, 0x27, 0xb8, 0xfe, 0xba, 0xa1, 0xff, 0xe5, 0x5e,
-	0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x18, 0x78, 0xd5, 0x5a, 0xde, 0x09, 0x00, 0x00,
+	// 1170 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x5b, 0x6f, 0xdb, 0x36,
+	0x14, 0x86, 0xa2, 0x58, 0xb6, 0x8f, 0x9d, 0x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9b, 0x18, 0xc1, 0x13, 0x15, 0xf1, 0xc1, 0x60, 0x34, 0xbc, 0x88, 0x3f, 0x61, 0x66,
+	0x66, 0x5a, 0xf0, 0x90, 0x04, 0x41, 0x6b, 0xdb, 0x5d, 0x3e, 0xe5, 0xa2, 0xc1, 0x84, 0xed, 0x68,
+	0x20, 0xbc, 0xad, 0xac, 0x4d, 0xfb, 0x4d, 0xea, 0x0e, 0x3b, 0x3f, 0x78, 0x58, 0x26, 0xde, 0x7b,
+	0xea, 0x6f, 0xe8, 0xe5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x1d, 0xca, 0x08, 0x20, 0x0d,
+	0x00, 0x00,
 }
 
 // Reference imports to suppress errors if they are not otherwise used.
@@ -1116,15 +1612,24 @@ const _ = grpc.SupportPackageIsVersion4
 type TransformClient interface {
 	GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error)
 	ParseToken(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*TokenResponse, error)
+	//获取erp 省、城市树
 	GetErpCityTree(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TreeNodes, error)
+	//获取erp  字典
 	LoadOptionset(ctx context.Context, in *OptionsetReq, opts ...grpc.CallOption) (*OptionsetRes, error)
 	GetSchoolIds(ctx context.Context, in *SchoolIdsReq, opts ...grpc.CallOption) (*SchoolIdsRes, error)
 	GetCityIds(ctx context.Context, in *CityIdsReq, opts ...grpc.CallOption) (*CityIdsRes, error)
 	PostExcelLog(ctx context.Context, in *ExcelLogReq, opts ...grpc.CallOption) (*ExcelLogRes, error)
 	GetErpOptionset(ctx context.Context, in *OptionCode, opts ...grpc.CallOption) (*Options, error)
+	//获取erp 渠道细分树
 	GetErpMktNetWorkDetailTree(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TreeNodes, error)
-	GetErpSchool(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ResponseByte, error)
-	GetErpActive(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ResponseByte, error)
+	//获取erp 用户校区权限
+	GetErpOrganSchPerByUserId(ctx context.Context, in *GetErpOrganSchPerByUserIdReq, opts ...grpc.CallOption) (*GetErpOrganSchPerByUserIdRes, error)
+	//获取 erp 用户角色
+	GetErpRole(ctx context.Context, in *GetErpRoleReq, opts ...grpc.CallOption) (*GetErpRoleRes, error)
+	//获取 erp 全部校区
+	GetErpSchool(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetErpSchoolRes, error)
+	//获取 erp 活动
+	GetErpActive(ctx context.Context, in *GetErpActiveReq, opts ...grpc.CallOption) (*GetErpActiveRes, error)
 }
 
 type transformClient struct {
@@ -1216,8 +1721,26 @@ func (c *transformClient) GetErpMktNetWorkDetailTree(ctx context.Context, in *Em
 	return out, nil
 }
 
-func (c *transformClient) GetErpSchool(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ResponseByte, error) {
-	out := new(ResponseByte)
+func (c *transformClient) GetErpOrganSchPerByUserId(ctx context.Context, in *GetErpOrganSchPerByUserIdReq, opts ...grpc.CallOption) (*GetErpOrganSchPerByUserIdRes, error) {
+	out := new(GetErpOrganSchPerByUserIdRes)
+	err := c.cc.Invoke(ctx, "/transform.Transform/GetErpOrganSchPerByUserId", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *transformClient) GetErpRole(ctx context.Context, in *GetErpRoleReq, opts ...grpc.CallOption) (*GetErpRoleRes, error) {
+	out := new(GetErpRoleRes)
+	err := c.cc.Invoke(ctx, "/transform.Transform/GetErpRole", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *transformClient) GetErpSchool(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetErpSchoolRes, error) {
+	out := new(GetErpSchoolRes)
 	err := c.cc.Invoke(ctx, "/transform.Transform/GetErpSchool", in, out, opts...)
 	if err != nil {
 		return nil, err
@@ -1225,8 +1748,8 @@ func (c *transformClient) GetErpSchool(ctx context.Context, in *Empty, opts ...g
 	return out, nil
 }
 
-func (c *transformClient) GetErpActive(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ResponseByte, error) {
-	out := new(ResponseByte)
+func (c *transformClient) GetErpActive(ctx context.Context, in *GetErpActiveReq, opts ...grpc.CallOption) (*GetErpActiveRes, error) {
+	out := new(GetErpActiveRes)
 	err := c.cc.Invoke(ctx, "/transform.Transform/GetErpActive", in, out, opts...)
 	if err != nil {
 		return nil, err
@@ -1238,15 +1761,24 @@ func (c *transformClient) GetErpActive(ctx context.Context, in *Empty, opts ...g
 type TransformServer interface {
 	GetUser(context.Context, *UserRequest) (*UserResponse, error)
 	ParseToken(context.Context, *TokenRequest) (*TokenResponse, error)
+	//获取erp 省、城市树
 	GetErpCityTree(context.Context, *Empty) (*TreeNodes, error)
+	//获取erp  字典
 	LoadOptionset(context.Context, *OptionsetReq) (*OptionsetRes, error)
 	GetSchoolIds(context.Context, *SchoolIdsReq) (*SchoolIdsRes, error)
 	GetCityIds(context.Context, *CityIdsReq) (*CityIdsRes, error)
 	PostExcelLog(context.Context, *ExcelLogReq) (*ExcelLogRes, error)
 	GetErpOptionset(context.Context, *OptionCode) (*Options, error)
+	//获取erp 渠道细分树
 	GetErpMktNetWorkDetailTree(context.Context, *Empty) (*TreeNodes, error)
-	GetErpSchool(context.Context, *Empty) (*ResponseByte, error)
-	GetErpActive(context.Context, *Empty) (*ResponseByte, error)
+	//获取erp 用户校区权限
+	GetErpOrganSchPerByUserId(context.Context, *GetErpOrganSchPerByUserIdReq) (*GetErpOrganSchPerByUserIdRes, error)
+	//获取 erp 用户角色
+	GetErpRole(context.Context, *GetErpRoleReq) (*GetErpRoleRes, error)
+	//获取 erp 全部校区
+	GetErpSchool(context.Context, *Empty) (*GetErpSchoolRes, error)
+	//获取 erp 活动
+	GetErpActive(context.Context, *GetErpActiveReq) (*GetErpActiveRes, error)
 }
 
 // UnimplementedTransformServer can be embedded to have forward compatible implementations.
@@ -1280,10 +1812,16 @@ func (*UnimplementedTransformServer) GetErpOptionset(ctx context.Context, req *O
 func (*UnimplementedTransformServer) GetErpMktNetWorkDetailTree(ctx context.Context, req *Empty) (*TreeNodes, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetErpMktNetWorkDetailTree not implemented")
 }
-func (*UnimplementedTransformServer) GetErpSchool(ctx context.Context, req *Empty) (*ResponseByte, error) {
+func (*UnimplementedTransformServer) GetErpOrganSchPerByUserId(ctx context.Context, req *GetErpOrganSchPerByUserIdReq) (*GetErpOrganSchPerByUserIdRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetErpOrganSchPerByUserId not implemented")
+}
+func (*UnimplementedTransformServer) GetErpRole(ctx context.Context, req *GetErpRoleReq) (*GetErpRoleRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetErpRole not implemented")
+}
+func (*UnimplementedTransformServer) GetErpSchool(ctx context.Context, req *Empty) (*GetErpSchoolRes, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetErpSchool not implemented")
 }
-func (*UnimplementedTransformServer) GetErpActive(ctx context.Context, req *Empty) (*ResponseByte, error) {
+func (*UnimplementedTransformServer) GetErpActive(ctx context.Context, req *GetErpActiveReq) (*GetErpActiveRes, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetErpActive not implemented")
 }
 
@@ -1453,6 +1991,42 @@ func _Transform_GetErpMktNetWorkDetailTree_Handler(srv interface{}, ctx context.
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Transform_GetErpOrganSchPerByUserId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetErpOrganSchPerByUserIdReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(TransformServer).GetErpOrganSchPerByUserId(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/transform.Transform/GetErpOrganSchPerByUserId",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(TransformServer).GetErpOrganSchPerByUserId(ctx, req.(*GetErpOrganSchPerByUserIdReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Transform_GetErpRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetErpRoleReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(TransformServer).GetErpRole(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/transform.Transform/GetErpRole",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(TransformServer).GetErpRole(ctx, req.(*GetErpRoleReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 func _Transform_GetErpSchool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(Empty)
 	if err := dec(in); err != nil {
@@ -1472,7 +2046,7 @@ func _Transform_GetErpSchool_Handler(srv interface{}, ctx context.Context, dec f
 }
 
 func _Transform_GetErpActive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(Empty)
+	in := new(GetErpActiveReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
@@ -1484,7 +2058,7 @@ func _Transform_GetErpActive_Handler(srv interface{}, ctx context.Context, dec f
 		FullMethod: "/transform.Transform/GetErpActive",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(TransformServer).GetErpActive(ctx, req.(*Empty))
+		return srv.(TransformServer).GetErpActive(ctx, req.(*GetErpActiveReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
@@ -1529,6 +2103,14 @@ var _Transform_serviceDesc = grpc.ServiceDesc{
 			MethodName: "GetErpMktNetWorkDetailTree",
 			Handler:    _Transform_GetErpMktNetWorkDetailTree_Handler,
 		},
+		{
+			MethodName: "GetErpOrganSchPerByUserId",
+			Handler:    _Transform_GetErpOrganSchPerByUserId_Handler,
+		},
+		{
+			MethodName: "GetErpRole",
+			Handler:    _Transform_GetErpRole_Handler,
+		},
 		{
 			MethodName: "GetErpSchool",
 			Handler:    _Transform_GetErpSchool_Handler,

+ 61 - 24
transformclient/transform.go

@@ -14,39 +14,59 @@ import (
 )
 
 type (
-	SchoolIdsReq  = transform.SchoolIdsReq
-	CityIdsReq    = transform.CityIdsReq
-	CityIdsRes    = transform.CityIdsRes
-	TokenRequest  = transform.TokenRequest
-	Empty         = transform.Empty
-	Tag           = transform.Tag
-	OptionsetRes  = transform.OptionsetRes
-	ListOfInt     = transform.ListOfInt
-	SchoolIdsRes  = transform.SchoolIdsRes
-	UserResponse  = transform.UserResponse
-	TreeNode      = transform.TreeNode
-	OptionsetReq  = transform.OptionsetReq
-	Options       = transform.Options
-	TokenResponse = transform.TokenResponse
-	OptionCode    = transform.OptionCode
-	ResponseByte  = transform.ResponseByte
-	ExcelLogRes   = transform.ExcelLogRes
-	UserRequest   = transform.UserRequest
-	TreeNodes     = transform.TreeNodes
-	ExcelLogReq   = transform.ExcelLogReq
+	TokenRequest                 = transform.TokenRequest
+	Tag                          = transform.Tag
+	ExcelLogRes                  = transform.ExcelLogRes
+	SchoolIdsReq                 = transform.SchoolIdsReq
+	ListOfInt                    = transform.ListOfInt
+	CityIdsRes                   = transform.CityIdsRes
+	TreeNode                     = transform.TreeNode
+	OptionCode                   = transform.OptionCode
+	OrganSchool                  = transform.OrganSchool
+	GetErpSchoolRes              = transform.GetErpSchoolRes
+	GetErpActiveRes              = transform.GetErpActiveRes
+	TokenResponse                = transform.TokenResponse
+	OptionsetRes                 = transform.OptionsetRes
+	BytesReq                     = transform.BytesReq
+	GetErpRoleReq                = transform.GetErpRoleReq
+	UserResponse                 = transform.UserResponse
+	SchoolIdsRes                 = transform.SchoolIdsRes
+	CityIdsReq                   = transform.CityIdsReq
+	BytesResp                    = transform.BytesResp
+	UserRequest                  = transform.UserRequest
+	GetErpOrganSchPerByUserIdRes = transform.GetErpOrganSchPerByUserIdRes
+	Active                       = transform.Active
+	ExcelLogReq                  = transform.ExcelLogReq
+	GetErpOrganSchPerByUserIdReq = transform.GetErpOrganSchPerByUserIdReq
+	GetErpActiveReq              = transform.GetErpActiveReq
+	Empty                        = transform.Empty
+	Options                      = transform.Options
+	ResponseByte                 = transform.ResponseByte
+	GetErpRoleRes                = transform.GetErpRoleRes
+	TreeNodes                    = transform.TreeNodes
+	OptionsetReq                 = transform.OptionsetReq
 
 	Transform interface {
 		GetUser(ctx context.Context, in *UserRequest) (*UserResponse, error)
 		ParseToken(ctx context.Context, in *TokenRequest) (*TokenResponse, error)
+		// 获取erp 省、城市树
 		GetErpCityTree(ctx context.Context, in *Empty) (*TreeNodes, error)
+		// 获取erp  字典
 		LoadOptionset(ctx context.Context, in *OptionsetReq) (*OptionsetRes, error)
 		GetSchoolIds(ctx context.Context, in *SchoolIdsReq) (*SchoolIdsRes, error)
 		GetCityIds(ctx context.Context, in *CityIdsReq) (*CityIdsRes, error)
 		PostExcelLog(ctx context.Context, in *ExcelLogReq) (*ExcelLogRes, error)
 		GetErpOptionset(ctx context.Context, in *OptionCode) (*Options, error)
+		// 获取erp 渠道细分树
 		GetErpMktNetWorkDetailTree(ctx context.Context, in *Empty) (*TreeNodes, error)
-		GetErpSchool(ctx context.Context, in *Empty) (*ResponseByte, error)
-		GetErpActive(ctx context.Context, in *Empty) (*ResponseByte, error)
+		// 获取erp 用户校区权限
+		GetErpOrganSchPerByUserId(ctx context.Context, in *GetErpOrganSchPerByUserIdReq) (*GetErpOrganSchPerByUserIdRes, error)
+		// 获取 erp 用户角色
+		GetErpRole(ctx context.Context, in *GetErpRoleReq) (*GetErpRoleRes, error)
+		// 获取 erp 全部校区
+		GetErpSchool(ctx context.Context, in *Empty) (*GetErpSchoolRes, error)
+		// 获取 erp 活动
+		GetErpActive(ctx context.Context, in *GetErpActiveReq) (*GetErpActiveRes, error)
 	}
 
 	defaultTransform struct {
@@ -70,11 +90,13 @@ func (m *defaultTransform) ParseToken(ctx context.Context, in *TokenRequest) (*T
 	return client.ParseToken(ctx, in)
 }
 
+// 获取erp 省、城市树
 func (m *defaultTransform) GetErpCityTree(ctx context.Context, in *Empty) (*TreeNodes, error) {
 	client := transform.NewTransformClient(m.cli.Conn())
 	return client.GetErpCityTree(ctx, in)
 }
 
+// 获取erp  字典
 func (m *defaultTransform) LoadOptionset(ctx context.Context, in *OptionsetReq) (*OptionsetRes, error) {
 	client := transform.NewTransformClient(m.cli.Conn())
 	return client.LoadOptionset(ctx, in)
@@ -100,17 +122,32 @@ func (m *defaultTransform) GetErpOptionset(ctx context.Context, in *OptionCode)
 	return client.GetErpOptionset(ctx, in)
 }
 
+// 获取erp 渠道细分树
 func (m *defaultTransform) GetErpMktNetWorkDetailTree(ctx context.Context, in *Empty) (*TreeNodes, error) {
 	client := transform.NewTransformClient(m.cli.Conn())
 	return client.GetErpMktNetWorkDetailTree(ctx, in)
 }
 
-func (m *defaultTransform) GetErpSchool(ctx context.Context, in *Empty) (*ResponseByte, error) {
+// 获取erp 用户校区权限
+func (m *defaultTransform) GetErpOrganSchPerByUserId(ctx context.Context, in *GetErpOrganSchPerByUserIdReq) (*GetErpOrganSchPerByUserIdRes, error) {
+	client := transform.NewTransformClient(m.cli.Conn())
+	return client.GetErpOrganSchPerByUserId(ctx, in)
+}
+
+// 获取 erp 用户角色
+func (m *defaultTransform) GetErpRole(ctx context.Context, in *GetErpRoleReq) (*GetErpRoleRes, error) {
+	client := transform.NewTransformClient(m.cli.Conn())
+	return client.GetErpRole(ctx, in)
+}
+
+// 获取 erp 全部校区
+func (m *defaultTransform) GetErpSchool(ctx context.Context, in *Empty) (*GetErpSchoolRes, error) {
 	client := transform.NewTransformClient(m.cli.Conn())
 	return client.GetErpSchool(ctx, in)
 }
 
-func (m *defaultTransform) GetErpActive(ctx context.Context, in *Empty) (*ResponseByte, error) {
+// 获取 erp 活动
+func (m *defaultTransform) GetErpActive(ctx context.Context, in *GetErpActiveReq) (*GetErpActiveRes, error) {
 	client := transform.NewTransformClient(m.cli.Conn())
 	return client.GetErpActive(ctx, in)
 }