Browse Source

SCRUM-3985:修改参数类型

hongxuan 1 year ago
parent
commit
c45ce5727f

+ 1 - 1
internal/logic/get_erp_user_logic.go

@@ -33,7 +33,7 @@ func (l *GetErpUserLogic) GetErpUser(in *transform.ErpUserReq) (*transform.ErpUs
 	if findOne == nil {
 	if findOne == nil {
 		return res, nil
 		return res, nil
 	}
 	}
-	if findOne.OsId != "" {
+	if findOne.OsId != 0 {
 		res.OsId = findOne.OsId
 		res.OsId = findOne.OsId
 		res.OsName = findOne.OsName
 		res.OsName = findOne.OsName
 	}
 	}

+ 8 - 2
model/sys_user_model.go

@@ -39,7 +39,7 @@ type (
 		table string
 		table string
 	}
 	}
 	SysUserSchool struct {
 	SysUserSchool struct {
-		OsId   string `db:"os_id"`
+		OsId   int64  `db:"os_id"`
 		OsName string `db:"os_name"`
 		OsName string `db:"os_name"`
 	}
 	}
 	SysUser struct {
 	SysUser struct {
@@ -140,7 +140,13 @@ func (m *defaultSysUserModel) FindOrgById(id string) (school *SysUserSchool, err
 	erpUserOrgIdKey := fmt.Sprintf("%s%v", cacheSysUserOrgIdPrefix, id)
 	erpUserOrgIdKey := fmt.Sprintf("%s%v", cacheSysUserOrgIdPrefix, id)
 	var resp SysUserSchool
 	var resp SysUserSchool
 	err = m.QueryRow(&resp, erpUserOrgIdKey, func(conn sqlx.SqlConn, v interface{}) error {
 	err = m.QueryRow(&resp, erpUserOrgIdKey, func(conn sqlx.SqlConn, v interface{}) error {
-		query := fmt.Sprintf("select sys_user_school.os_id,base_organ_scholl.name os_name from sys_user_school join base_organ_school  on  sys_user_school.os_id = base_organ_school.id where sys_user_school.`user_id` = ? limit 1")
+		query := fmt.Sprintf("select sys_user_school.os_id," +
+			"base_organ_scholl.name os_name " +
+			"from sys_user_school join base_organ_school  on  sys_user_school.os_id = base_organ_school.id " +
+			"where sys_user_school.`user_id` = ?" +
+			"and sys_user.status = 0 " +
+			"and sys_user.del_flag = 0 " +
+			" limit 1")
 		return conn.QueryRow(v, query, id)
 		return conn.QueryRow(v, query, id)
 	})
 	})
 	switch err {
 	switch err {

+ 1 - 1
transform.proto

@@ -238,7 +238,7 @@ message ErpUserReq{
   string ErpId =1;
   string ErpId =1;
 }
 }
 message ErpUserRes {
 message ErpUserRes {
-  string OsId = 1;
+  int64 OsId = 1;
   string OsName = 2;
   string OsName = 2;
 }
 }
 service Transform {
 service Transform {

+ 26 - 26
transform/transform.pb.go

@@ -2206,7 +2206,7 @@ func (m *ErpUserReq) GetErpId() string {
 }
 }
 
 
 type ErpUserRes struct {
 type ErpUserRes struct {
-	OsId                 string   `protobuf:"bytes,1,opt,name=OsId,proto3" json:"OsId,omitempty"`
+	OsId                 int64    `protobuf:"varint,1,opt,name=OsId,proto3" json:"OsId,omitempty"`
 	OsName               string   `protobuf:"bytes,2,opt,name=OsName,proto3" json:"OsName,omitempty"`
 	OsName               string   `protobuf:"bytes,2,opt,name=OsName,proto3" json:"OsName,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
@@ -2238,11 +2238,11 @@ func (m *ErpUserRes) XXX_DiscardUnknown() {
 
 
 var xxx_messageInfo_ErpUserRes proto.InternalMessageInfo
 var xxx_messageInfo_ErpUserRes proto.InternalMessageInfo
 
 
-func (m *ErpUserRes) GetOsId() string {
+func (m *ErpUserRes) GetOsId() int64 {
 	if m != nil {
 	if m != nil {
 		return m.OsId
 		return m.OsId
 	}
 	}
-	return ""
+	return 0
 }
 }
 
 
 func (m *ErpUserRes) GetOsName() string {
 func (m *ErpUserRes) GetOsName() string {
@@ -2307,7 +2307,7 @@ func init() {
 func init() { proto.RegisterFile("transform.proto", fileDescriptor_cb4a498eeb2ba07d) }
 func init() { proto.RegisterFile("transform.proto", fileDescriptor_cb4a498eeb2ba07d) }
 
 
 var fileDescriptor_cb4a498eeb2ba07d = []byte{
 var fileDescriptor_cb4a498eeb2ba07d = []byte{
-	// 1778 bytes of a gzipped FileDescriptorProto
+	// 1779 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4b, 0x73, 0x23, 0x49,
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4b, 0x73, 0x23, 0x49,
 	0x11, 0x0e, 0x49, 0xd6, 0x2b, 0x25, 0xdb, 0xe3, 0x1a, 0x3f, 0x7a, 0x1b, 0xb3, 0x78, 0x8b, 0x01,
 	0x11, 0x0e, 0x49, 0xd6, 0x2b, 0x25, 0xdb, 0xe3, 0x1a, 0x3f, 0x7a, 0x1b, 0xb3, 0x78, 0x8b, 0x01,
 	0x3c, 0x1c, 0x7c, 0x98, 0x25, 0x96, 0x09, 0xb3, 0xb1, 0xac, 0x5f, 0xab, 0x50, 0x84, 0x65, 0x1b,
 	0x3c, 0x1c, 0x7c, 0x98, 0x25, 0x96, 0x09, 0xb3, 0xb1, 0xac, 0x5f, 0xab, 0x50, 0x84, 0x65, 0x1b,
@@ -2398,28 +2398,28 @@ var fileDescriptor_cb4a498eeb2ba07d = []byte{
 	0x2f, 0xf6, 0x01, 0x06, 0x72, 0xea, 0xb3, 0xa8, 0x28, 0x7b, 0xa9, 0xb4, 0x56, 0xc5, 0x52, 0x6e,
 	0x2f, 0xf6, 0x01, 0x06, 0x72, 0xea, 0xb3, 0xa8, 0x28, 0x7b, 0xa9, 0xb4, 0x56, 0xc5, 0x52, 0x6e,
 	0xdb, 0xb9, 0x52, 0x5e, 0xc8, 0x95, 0x0f, 0x00, 0x60, 0x88, 0x10, 0x2e, 0x92, 0xd8, 0x0c, 0xeb,
 	0xdb, 0xb9, 0x52, 0x5e, 0xc8, 0x95, 0x0f, 0x00, 0x60, 0x88, 0x10, 0x2e, 0x92, 0xd8, 0x0c, 0xeb,
 	0x98, 0x75, 0x17, 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0xcc,
+	0x43, 0xb7, 0xb3, 0x14, 0x21, 0x6c, 0x5a, 0x2e, 0x59, 0x0e, 0x9c, 0xf1, 0xd8, 0x3c, 0xa1, 0xb9,
+	0x8d, 0xf9, 0xa3, 0x73, 0x0b, 0xd9, 0x82, 0x5c, 0xc3, 0x56, 0x87, 0xc9, 0xf9, 0xf6, 0x45, 0xf6,
+	0x1f, 0xe9, 0x6c, 0x0f, 0xee, 0x63, 0xab, 0x82, 0x9c, 0x83, 0xab, 0x5d, 0x59, 0x9c, 0x74, 0xdf,
+	0x2b, 0xf3, 0x7e, 0x0f, 0xbb, 0xc5, 0x5a, 0xc8, 0x67, 0x4f, 0x4c, 0xdb, 0xec, 0xc1, 0x7d, 0x52,
+	0x44, 0x90, 0x09, 0x7c, 0xb2, 0x12, 0xb6, 0x91, 0x9f, 0x59, 0xfb, 0x1f, 0x43, 0x85, 0xee, 0x3b,
+	0x0a, 0x62, 0x56, 0x43, 0x0e, 0x50, 0x89, 0xb3, 0xb4, 0xcd, 0xe0, 0x56, 0x77, 0xd5, 0x0a, 0x66,
+	0x48, 0xdb, 0x46, 0x72, 0x05, 0x81, 0x74, 0x97, 0xf6, 0xe6, 0xa0, 0xef, 0x9b, 0x74, 0xb7, 0x81,
+	0x58, 0xcb, 0xb2, 0x19, 0xba, 0x73, 0x57, 0xaf, 0xa1, 0x15, 0x64, 0xde, 0xcf, 0xf7, 0xba, 0xd4,
+	0xe3, 0x34, 0x0a, 0xaa, 0x10, 0xee, 0xcc, 0xdf, 0x92, 0xa9, 0x85, 0x6e, 0x21, 0x5b, 0x7c, 0x57,
+	0x53, 0x7f, 0x5a, 0x3f, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x15, 0x2d, 0xd0, 0x11, 0x7c,
+	0x15, 0x00, 0x00,
 }
 }
 
 
 // Reference imports to suppress errors if they are not otherwise used.
 // Reference imports to suppress errors if they are not otherwise used.

+ 33 - 33
transformclient/transform.go

@@ -14,50 +14,50 @@ import (
 )
 )
 
 
 type (
 type (
-	TokenRequest                 = transform.TokenRequest
-	Active                       = transform.Active
+	ErpMktNetWorkDetail          = transform.ErpMktNetWorkDetail
 	Tag                          = transform.Tag
 	Tag                          = transform.Tag
-	ExcelLogRes                  = transform.ExcelLogRes
-	GetErpRoleReq                = transform.GetErpRoleReq
-	DataPermissionReq            = transform.DataPermissionReq
-	MktRes                       = transform.MktRes
-	UserRequest                  = transform.UserRequest
-	Empty                        = transform.Empty
+	Options                      = transform.Options
 	ResponseByte                 = transform.ResponseByte
 	ResponseByte                 = transform.ResponseByte
 	ExcelLogReq                  = transform.ExcelLogReq
 	ExcelLogReq                  = transform.ExcelLogReq
-	SchoolIdsRes                 = transform.SchoolIdsRes
-	CityMkRes                    = transform.CityMkRes
-	GetErpActiveReq              = transform.GetErpActiveReq
-	TreeNodes                    = transform.TreeNodes
-	ErpMktNetWorkDetail          = transform.ErpMktNetWorkDetail
-	ErpMktNetWorkDetailRes       = transform.ErpMktNetWorkDetailRes
-	ErpMktNetWorkDetailReq       = transform.ErpMktNetWorkDetailReq
-	CityMkReq                    = transform.CityMkReq
-	CityIdsRes                   = transform.CityIdsRes
-	DataPermissionRes            = transform.DataPermissionRes
-	TreeNode                     = transform.TreeNode
+	UserRequest                  = transform.UserRequest
+	Empty                        = transform.Empty
+	BytesReq                     = transform.BytesReq
 	GetErpRoleRes                = transform.GetErpRoleRes
 	GetErpRoleRes                = transform.GetErpRoleRes
-	GetErpSchoolRes              = transform.GetErpSchoolRes
+	GetErpOrganSchPerByUserIdRes = transform.GetErpOrganSchPerByUserIdRes
+	OrganSchool                  = transform.OrganSchool
+	MktRes                       = transform.MktRes
+	TokenRequest                 = transform.TokenRequest
 	GetErpActiveRes              = transform.GetErpActiveRes
 	GetErpActiveRes              = transform.GetErpActiveRes
-	ErpUserReq                   = transform.ErpUserReq
-	UserResponse                 = transform.UserResponse
-	OptionCode                   = transform.OptionCode
-	BytesReq                     = transform.BytesReq
+	TreeNodes                    = transform.TreeNodes
+	OptionsetReq                 = transform.OptionsetReq
+	CityIdsReq                   = transform.CityIdsReq
 	BytesResp                    = transform.BytesResp
 	BytesResp                    = transform.BytesResp
-	GetErpOrganSchPerByUserIdReq = transform.GetErpOrganSchPerByUserIdReq
-	OrganSchool                  = transform.OrganSchool
+	Active                       = transform.Active
+	StudentRes                   = transform.StudentRes
+	ErpMktNetWorkDetailReq       = transform.ErpMktNetWorkDetailReq
+	CityMkRes                    = transform.CityMkRes
+	GetErpSchoolRes              = transform.GetErpSchoolRes
+	GetErpActiveReq              = transform.GetErpActiveReq
+	MktReq                       = transform.MktReq
 	StudentReq                   = transform.StudentReq
 	StudentReq                   = transform.StudentReq
 	ErpUserRes                   = transform.ErpUserRes
 	ErpUserRes                   = transform.ErpUserRes
+	SchoolIdsReq                 = transform.SchoolIdsReq
+	ExcelLogRes                  = transform.ExcelLogRes
+	CityIdsRes                   = transform.CityIdsRes
+	GetErpRoleReq                = transform.GetErpRoleReq
+	DataPermissionReq            = transform.DataPermissionReq
+	ErpMktNetWorkDetailRes       = transform.ErpMktNetWorkDetailRes
 	TokenResponse                = transform.TokenResponse
 	TokenResponse                = transform.TokenResponse
 	ListOfInt                    = transform.ListOfInt
 	ListOfInt                    = transform.ListOfInt
-	StudentRes                   = transform.StudentRes
-	OptionsetReq                 = transform.OptionsetReq
+	CityMkReq                    = transform.CityMkReq
+	GetErpOrganSchPerByUserIdReq = transform.GetErpOrganSchPerByUserIdReq
+	UserResponse                 = transform.UserResponse
 	OptionsetRes                 = transform.OptionsetRes
 	OptionsetRes                 = transform.OptionsetRes
-	Options                      = transform.Options
-	SchoolIdsReq                 = transform.SchoolIdsReq
-	CityIdsReq                   = transform.CityIdsReq
-	GetErpOrganSchPerByUserIdRes = transform.GetErpOrganSchPerByUserIdRes
-	MktReq                       = transform.MktReq
+	OptionCode                   = transform.OptionCode
+	SchoolIdsRes                 = transform.SchoolIdsRes
+	DataPermissionRes            = transform.DataPermissionRes
+	ErpUserReq                   = transform.ErpUserReq
+	TreeNode                     = transform.TreeNode
 
 
 	Transform interface {
 	Transform interface {
 		GetUser(ctx context.Context, in *UserRequest) (*UserResponse, error)
 		GetUser(ctx context.Context, in *UserRequest) (*UserResponse, error)