You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
720 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package BasePositionService
import (
"context"
BasePosition "dsSupport/MyModel/AccessSystem/AccessSystemProto/BasePositionProto"
"dsSupport/Utils/GRpcUtil"
"dsSupport/Utils/LogUtil"
"errors"
"time"
)
func TreeBasePosition() (*BasePosition.Reply, error) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
conn := GRpcUtil.GetConnection()
if conn == nil {
return nil, errors.New("RPC服务未启动")
}
c := BasePosition.NewBasePositionManageClient(conn)
var queryArg BasePosition.QueryArg
Reply, err := c.TreeBasePosition(ctx, &queryArg)
if err != nil {
LogUtil.Error("获取职务所有的树形结构信息错误: ", err.Error())
}
return Reply, err
}