From db9efd558ea42730492530dcf41c9c12da2a4da3 Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Tue, 30 Jan 2024 15:36:41 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/order.proto | 114 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 service/order.proto diff --git a/service/order.proto b/service/order.proto new file mode 100644 index 0000000..81b00ee --- /dev/null +++ b/service/order.proto @@ -0,0 +1,114 @@ +syntax = "proto3"; //版本声明,使用v3版本 + +package order; +option go_package = "gitlab.fusenpack.com/backend/order;service"; + +// 导入google/api/annotations.proto 注释依赖 +import "google/api/annotations.proto"; +import "service/basic.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/any.proto"; + +//定义服务 +service order { + // 更新详情 + rpc OrderSave(OrderSaveReq) returns (OrderSaveRes) {} + + // 获取详情 + rpc OrderInfo(OrderInfoReq) returns (OrderInfoRes) {} + + // 获取列表 + rpc OrderList(OrderListReq) returns (OrderListRes) {} + + // 详情处理 + rpc DetailHandler(DetailHandlerReq) returns (DetailHandlerRes) {} +} +/* 详情处理 */ +message DetailHandlerReq{ + OrderDetailDb order_db = 1;// 订单数据库数据 +} +message DetailHandlerRes{} +/* 详情处理 */ + +/* 更新详情 */ +message OrderSaveReq{ + OrderFilter filter = 1; // 筛选条件 + OrderDetailDb save = 2; // 更新数据 +} +message OrderSaveRes{} +/* 更新详情 */ + +/* 获取详情 */ +message OrderInfoReq{ + OrderFilter filter = 1;// 筛选条件 +} +message OrderInfoRes{ + OrderInfo info = 1; // 详情数据 +} +/* 获取详情 */ + +/* 获取列表 */ +message OrderListReq{ + OrderFilter filter = 1; // 筛选条件 + int64 handle_type = 2; // 处理类型:0=原数据,1=返回处理数据 + + int64 current_page =101; // 当前页码 + int64 per_page =102; // 每页数量 + string order_by = 103; // 排序条件: 如 id desc,ctime desc +} +message OrderListRes{ + repeated OrderInfo list = 1;// 列表数据 + basic.Meta meta = 2; // 列表参数 +} +/* 获取列表 */ + +/* 过滤条件 */ +message OrderFilter { + optional int64 id = 1;// 主键ID + optional int64 user_id = 2; // 用户ID + optional int64 delivery_method = 3; // 物流类型 + optional string order_sn = 4; // 订单编号 + optional string order_source = 5; // 订单来源 + optional int64 status = 6; // 订单状态 + optional int64 is_del = 7; // 是否删除:0=否,1=是 + optional int64 pay_status = 8; // 支付状态 + optional int64 sale_gerent_id = 9; // 销售负责人 + optional int64 design_gerent_id = 10; //设计负责人 + + optional bytes other_filter = 101; // 其他筛选条件 + repeated int64 ids = 102; // 主键IDS +} + +/* 详情数据 */ +message OrderInfo { + OrderDetailDb order_detail_db = 1; // 原数据 + bytes order_detail = 2; // 处理后数据 +} + +/* 数据库 */ +message OrderDetailDb { + optional int64 id = 1; // 主键ID + optional int64 user_id = 2; // 用户ID + optional int64 delivery_method = 3; // 物流类型 + optional string order_sn = 4; // 订单编号 + optional string order_source = 5; // 订单来源 + optional int64 status = 6; // 订单状态 + optional bytes metadata = 7; // 额外参数 + optional string ctime = 8; // 创建时间 + optional string utime = 9; // 更新时间 + optional int64 is_del = 10; // 是否删除:0 = 否,1 = 是 + optional int64 pay_status = 11; // 支付状态 + optional bytes status_link = 12; // 订单状态链路 + optional bytes order_product = 13; // 订单商品 + optional bytes order_address = 14; // 订单地址 + optional bytes order_amount = 15; // 订单金额 + optional bytes pay_status_link = 16; // 支付状态链路 + optional bytes shopping_cart_snapshot = 17; // 购物车快照 + optional bytes shopping_product_snapshot = 18; // 购物车商品快照 + optional int64 sale_gerent_id = 19; // 销售负责人 + optional int64 design_gerent_id = 20; // 设计负责人 + optional bytes scm = 21; // 供应链管理 +} + + + From 426db0780d16b7d54b9eee3e3c7b7d98c04d7142 Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Wed, 31 Jan 2024 10:15:16 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/order.proto | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/service/order.proto b/service/order.proto index 81b00ee..1bb5334 100644 --- a/service/order.proto +++ b/service/order.proto @@ -26,8 +26,11 @@ service order { /* 详情处理 */ message DetailHandlerReq{ OrderDetailDb order_db = 1;// 订单数据库数据 + int64 handle_type = 2; // 处理类型:0=原数据,1=返回处理数据 +} +message DetailHandlerRes{ + bytes order_detail = 1; // 处理后数据 } -message DetailHandlerRes{} /* 详情处理 */ /* 更新详情 */ @@ -52,9 +55,12 @@ message OrderListReq{ OrderFilter filter = 1; // 筛选条件 int64 handle_type = 2; // 处理类型:0=原数据,1=返回处理数据 - int64 current_page =101; // 当前页码 - int64 per_page =102; // 每页数量 + + bool select_whole = 100; // 查询类型:false=分页 true=全部数据 + int64 current_page = 101; // 当前页码 + int64 per_page = 102; // 每页数量 string order_by = 103; // 排序条件: 如 id desc,ctime desc + string select_fields = 104; // 查询字段 } message OrderListRes{ repeated OrderInfo list = 1;// 列表数据 @@ -73,7 +79,9 @@ message OrderFilter { optional int64 is_del = 7; // 是否删除:0=否,1=是 optional int64 pay_status = 8; // 支付状态 optional int64 sale_gerent_id = 9; // 销售负责人 - optional int64 design_gerent_id = 10; //设计负责人 + optional int64 design_gerent_id = 10; // 设计负责人 + optional string ctime = 11; // 创建时间 + optional string utime = 12; // 更新时间 optional bytes other_filter = 101; // 其他筛选条件 repeated int64 ids = 102; // 主键IDS @@ -87,7 +95,7 @@ message OrderInfo { /* 数据库 */ message OrderDetailDb { - optional int64 id = 1; // 主键ID + int64 id = 1; // 主键ID optional int64 user_id = 2; // 用户ID optional int64 delivery_method = 3; // 物流类型 optional string order_sn = 4; // 订单编号 From 3f139015e36482552914b2f5588c6dcfb326116e Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Wed, 31 Jan 2024 12:30:04 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/order.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/service/order.proto b/service/order.proto index 1bb5334..aab94d6 100644 --- a/service/order.proto +++ b/service/order.proto @@ -54,6 +54,7 @@ message OrderInfoRes{ message OrderListReq{ OrderFilter filter = 1; // 筛选条件 int64 handle_type = 2; // 处理类型:0=原数据,1=返回处理数据 + repeated int64 related = 3; // 关联数据:1=用户信息,2=支付记录 bool select_whole = 100; // 查询类型:false=分页 true=全部数据 From ffba8e706d0927e6d16289d9a9f969eef1263fb4 Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Wed, 31 Jan 2024 15:12:25 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/basic.proto | 19 +++++++++++++++---- service/order.proto | 1 + 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/service/basic.proto b/service/basic.proto index 371a114..ffa43f3 100644 --- a/service/basic.proto +++ b/service/basic.proto @@ -32,8 +32,19 @@ message ResourceInfo{ } message Meta { - int64 total_count =1; - int64 page_count=2; - int64 current_page=3; - int64 per_page=4; + int64 total_count =1; // 总数 + int64 page_count=2; // 总页数 + int64 current_page=3; // 当前页码 + int64 per_page=4; // 每页数量 +} + + +// 用户信息 +message FsUser { + string email = 1; // 邮箱 + string first_name = 2; // 名 + string last_name = 3; // 姓 + string username = 4; // 用户名称 + string company = 5; // 公司 + string mobile = 6; // 电话号码 } \ No newline at end of file diff --git a/service/order.proto b/service/order.proto index aab94d6..ed29477 100644 --- a/service/order.proto +++ b/service/order.proto @@ -92,6 +92,7 @@ message OrderFilter { message OrderInfo { OrderDetailDb order_detail_db = 1; // 原数据 bytes order_detail = 2; // 处理后数据 + basic.FsUser user_info = 3; // 用户数据 } /* 数据库 */ From 577e7801acff2dcb2783395843ab2fc3f1536adc Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Wed, 31 Jan 2024 15:52:52 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/basic.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/service/basic.proto b/service/basic.proto index ffa43f3..b1d754c 100644 --- a/service/basic.proto +++ b/service/basic.proto @@ -41,6 +41,7 @@ message Meta { // 用户信息 message FsUser { + int64 user_id = 7;//用户ID string email = 1; // 邮箱 string first_name = 2; // 名 string last_name = 3; // 姓 From 087090b34eddbbb42cbdfd348eedeb91db21078f Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Wed, 31 Jan 2024 17:15:26 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/order.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/order.proto b/service/order.proto index ed29477..5377d27 100644 --- a/service/order.proto +++ b/service/order.proto @@ -54,7 +54,8 @@ message OrderInfoRes{ message OrderListReq{ OrderFilter filter = 1; // 筛选条件 int64 handle_type = 2; // 处理类型:0=原数据,1=返回处理数据 - repeated int64 related = 3; // 关联数据:1=用户信息,2=支付记录 + int64 channle_type = 3; // 处理类型:0=后台,1=前台 + repeated int64 related = 4; // 关联数据:1=用户信息,2=支付记录 bool select_whole = 100; // 查询类型:false=分页 true=全部数据 From 947aa9402a3edefb13fa5baf2d0a173227e8390e Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Thu, 1 Feb 2024 10:08:38 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/order.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/service/order.proto b/service/order.proto index 5377d27..6d7111a 100644 --- a/service/order.proto +++ b/service/order.proto @@ -27,6 +27,7 @@ service order { message DetailHandlerReq{ OrderDetailDb order_db = 1;// 订单数据库数据 int64 handle_type = 2; // 处理类型:0=原数据,1=返回处理数据 + int64 channle_type = 3; // 处理类型:0=后台,1=前台 } message DetailHandlerRes{ bytes order_detail = 1; // 处理后数据 From 35b6dd1d4f122e583716aa2717efa069b3a91d98 Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Thu, 1 Feb 2024 15:36:00 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/order.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/order.proto b/service/order.proto index 6d7111a..89d1381 100644 --- a/service/order.proto +++ b/service/order.proto @@ -120,6 +120,9 @@ message OrderDetailDb { optional int64 sale_gerent_id = 19; // 销售负责人 optional int64 design_gerent_id = 20; // 设计负责人 optional bytes scm = 21; // 供应链管理 + optional int64 order_type = 22; // 订单类型:1=平台,2=线下 + optional string pay_deposit_ctime = 23; // 支付时间--定金 + optional string pay_final_ctime = 24; // 支付时间--尾款 } From 7a4583d7940fa11a10266412298e9892a59689ab Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Fri, 2 Feb 2024 12:31:18 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/order.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/order.proto b/service/order.proto index 89d1381..316e421 100644 --- a/service/order.proto +++ b/service/order.proto @@ -25,7 +25,7 @@ service order { } /* 详情处理 */ message DetailHandlerReq{ - OrderDetailDb order_db = 1;// 订单数据库数据 + bytes order_db = 1;// 订单数据库数据 int64 handle_type = 2; // 处理类型:0=原数据,1=返回处理数据 int64 channle_type = 3; // 处理类型:0=后台,1=前台 } From cca2483e3c47ec74daa0a4f761d6d745a4c10435 Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Fri, 2 Feb 2024 14:17:55 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/order.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/order.proto b/service/order.proto index 316e421..4f92d2e 100644 --- a/service/order.proto +++ b/service/order.proto @@ -45,6 +45,9 @@ message OrderSaveRes{} /* 获取详情 */ message OrderInfoReq{ OrderFilter filter = 1;// 筛选条件 + int64 handle_type = 2; // 处理类型:0=原数据,1=返回处理数据 + int64 channle_type = 3; // 处理类型:0=后台,1=前台 + repeated int64 related = 4; // 关联数据:1=用户信息,2=支付记录 } message OrderInfoRes{ OrderInfo info = 1; // 详情数据 From 243541433f50b06933a05bc6cc5d638bf34bd72f Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Fri, 2 Feb 2024 17:46:11 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/order.proto | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/service/order.proto b/service/order.proto index 4f92d2e..dde3845 100644 --- a/service/order.proto +++ b/service/order.proto @@ -39,7 +39,9 @@ message OrderSaveReq{ OrderFilter filter = 1; // 筛选条件 OrderDetailDb save = 2; // 更新数据 } -message OrderSaveRes{} +message OrderSaveRes{ + OrderInfo info = 1; // 详情数据 +} /* 更新详情 */ /* 获取详情 */ @@ -124,8 +126,8 @@ message OrderDetailDb { optional int64 design_gerent_id = 20; // 设计负责人 optional bytes scm = 21; // 供应链管理 optional int64 order_type = 22; // 订单类型:1=平台,2=线下 - optional string pay_deposit_ctime = 23; // 支付时间--定金 - optional string pay_final_ctime = 24; // 支付时间--尾款 + optional string pay_deposit_ctime = 23; // 支付时间--定金 + optional string pay_final_ctime = 24; // 支付时间--尾款 } From fdfa105ef573e832933f9ec380ea66f39ad8cfce Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Wed, 28 Feb 2024 15:24:54 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E6=9D=83=E9=99=90=E7=BB=84=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/ldap.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/service/ldap.proto b/service/ldap.proto index a10640a..1c57cb7 100644 --- a/service/ldap.proto +++ b/service/ldap.proto @@ -89,6 +89,7 @@ message GetLdapGroupDetailReq { } message GetLdapGroupDetailRsp { LdapGroup info = 1; + repeated int64 apis =2; } message SaveLdapGroupReq { From b4ca304f8d33e093aeb960dae4bed64a1c45d59f Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Mon, 4 Mar 2024 15:54:19 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/ldap.proto | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/service/ldap.proto b/service/ldap.proto index 1c57cb7..df83e73 100644 --- a/service/ldap.proto +++ b/service/ldap.proto @@ -30,6 +30,8 @@ service ldap { rpc DeleteLdapUser(DeleteLdapUserReq) returns(basic.Response){} //获取用户信息 rpc GetLdapUserInfo(GetLdapUserInfoReq) returns(GetLdapUserInfoRsp){} + //获取用户信息--批量 + rpc GetLdapUsersByUserIds(GetLdapUsersByUserIdsReq) returns(GetLdapUsersRsp){} //ldap部门添加成员 rpc AddLdapOrganizationMember(AddLdapOrganizationMemberReq) returns(basic.Response){} //ldap部门移除成员 @@ -234,6 +236,17 @@ message DeleteLdapUserReq{ message GetLdapUserInfoReq{ string user_dn = 1;//用户dn } + +//获取用户信息--批量 +message GetLdapUsersByUserIdsReq{ + repeated int64 user_ids = 1;//用户ID +} +//获取用户信息--批量 +message GetLdapUsersByUserIdsRsp{ + repeated GetLdapUsersItem list = 1; + string paging_cookie = 2; +} + message GetLdapUserInfoRsp{ int64 user_id = 1; //用户id string user_dn = 2; //用户dn From bfe6f6c2dc70a719a38b653211ae089002f8ac37 Mon Sep 17 00:00:00 2001 From: "huangsimin@fusen.cn" Date: Mon, 4 Mar 2024 17:43:48 +0800 Subject: [PATCH 14/17] =?UTF-8?q?=E6=9B=B4=E6=96=B0panic=E7=9A=84=E5=80=BC?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=87=BA=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- goutils/proto_build/tpls/logic_grpc_struct.tpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/goutils/proto_build/tpls/logic_grpc_struct.tpl b/goutils/proto_build/tpls/logic_grpc_struct.tpl index 408c23f..41591ae 100644 --- a/goutils/proto_build/tpls/logic_grpc_struct.tpl +++ b/goutils/proto_build/tpls/logic_grpc_struct.tpl @@ -7,6 +7,7 @@ import ( "fmt" "fusen-basic/env" + "fusen-basic/utils/log" "{{.ProjectName}}/gen/go/service" "{{.ProjectName}}/server/config" @@ -53,6 +54,7 @@ func (lgrpc *{{.StructName}}Grpc) {{.MethodName}}({{range $index, $param := .Par if _recoverErr := recover(); _recoverErr != nil { _resp = nil _err = fmt.Errorf("%v", _recoverErr) + log.Printf("recovered from panic: %v\n%s", _err, string(debug.Stack())) } }() return New{{.StructName}}(ctx).{{.MethodName}}Logic({{range $index, $param := .ParamsName}}{{if $index}}, {{end}}{{$param}}{{end}}) @@ -64,6 +66,7 @@ func (lgrpc *{{.StructName}}Grpc) {{.MethodName}}(stream {{range $index, $param defer func() { if _recoverErr := recover(); _recoverErr != nil { _err = fmt.Errorf("%v", _recoverErr) + log.Printf("recovered from panic: %v\n%s", _err, string(debug.Stack())) } }() return New{{.StructName}}(stream.Context()).{{.MethodName}}Logic(stream) From 2f19ba354ed599ef94aeb96ea8eba38b1820036d Mon Sep 17 00:00:00 2001 From: "huangsimin@fusen.cn" Date: Mon, 4 Mar 2024 17:44:50 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20debug=20=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- goutils/proto_build/tpls/logic_grpc_struct.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/goutils/proto_build/tpls/logic_grpc_struct.tpl b/goutils/proto_build/tpls/logic_grpc_struct.tpl index 41591ae..251c803 100644 --- a/goutils/proto_build/tpls/logic_grpc_struct.tpl +++ b/goutils/proto_build/tpls/logic_grpc_struct.tpl @@ -5,6 +5,7 @@ import ( "context" "sync" "fmt" + "runtime/debug" "fusen-basic/env" "fusen-basic/utils/log" From bbaacafa6de6f636dedab59de48a8b677b72a75f Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Mon, 4 Mar 2024 17:49:22 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/basic.proto | 16 ++++++++++++++++ service/order.proto | 9 ++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/service/basic.proto b/service/basic.proto index b1d754c..cf62f0a 100644 --- a/service/basic.proto +++ b/service/basic.proto @@ -48,4 +48,20 @@ message FsUser { string username = 4; // 用户名称 string company = 5; // 公司 string mobile = 6; // 电话号码 +} + +message LdapUser { + int64 user_id = 1; //用户id + string user_dn = 2; //用户dn + string user_name = 3; //用户名 + string email = 4; //邮箱 + string mobile = 5; //手机号 + string avatar = 6; //头像地址 + int64 employee_type = 7; //雇佣类型 1正式 2实习 3外包 + int64 gender = 8; //性别 1男 2女 3未知 + string birthday = 9; //生日 + repeated string belong_organizations = 10 ;//属于哪些部门 + repeated string manage_organizations = 11 ;//管理哪些部门 + int64 status = 12 ; //状态 1正常0离职 + int64 group_id = 13; //权限分组id } \ No newline at end of file diff --git a/service/order.proto b/service/order.proto index dde3845..c253a34 100644 --- a/service/order.proto +++ b/service/order.proto @@ -61,7 +61,7 @@ message OrderListReq{ OrderFilter filter = 1; // 筛选条件 int64 handle_type = 2; // 处理类型:0=原数据,1=返回处理数据 int64 channle_type = 3; // 处理类型:0=后台,1=前台 - repeated int64 related = 4; // 关联数据:1=用户信息,2=支付记录 + repeated int64 related = 4; // 关联数据:1=用户信息,2=支付记录,3=销售信息,4=设计信息,5=供应链信息 bool select_whole = 100; // 查询类型:false=分页 true=全部数据 @@ -100,6 +100,13 @@ message OrderInfo { OrderDetailDb order_detail_db = 1; // 原数据 bytes order_detail = 2; // 处理后数据 basic.FsUser user_info = 3; // 用户数据 + basic.LdapUser sale_info = 4; // 销售负责人 + basic.LdapUser design_info = 5; // 设计负责人 + OrderScm scm_info = 6; +} +message OrderScm { + repeated basic.LdapUser scm_info = 1; // 供应链信息 + repeated int64 scm_ids = 2; // 供应链信息 } /* 数据库 */ From 68dcd3bf8fb345d3893734c58ce433228edbc93e Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Tue, 5 Mar 2024 10:29:27 +0800 Subject: [PATCH 17/17] =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/ldap.proto | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/service/ldap.proto b/service/ldap.proto index df83e73..9bb71ac 100644 --- a/service/ldap.proto +++ b/service/ldap.proto @@ -337,4 +337,11 @@ message LdapParseTokenRsp{ int64 UserId = 2; string UserEmail = 3; int64 group_id = 4; + int64 gender = 5;//性别 + string birthday = 6;//生日 + repeated string belong_to_organizations = 7;//属于部门DN集合 + repeated string belong_to_organization_names = 8;//属于部门名字集合 + repeated string manage_organizations = 9;//管理的部门dn集合 + repeated string manage_organization_names = 10;//管理的部门名字集合 + int64 status = 11; //状态 1正常0离职 } \ No newline at end of file