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.
dsMin/dsBaseRpc/Test/PageSysDictMultipleDictCode...

34 lines
849 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 Test
import (
"context"
"dsBaseRpc/RpcService/SysDict/SysDictProto"
"dsBaseRpc/Utils/CommonUtil"
"dsBaseRpc/Utils/GRpcUtil"
"fmt"
"testing"
"time"
)
/*
功能:暂无描述
作者:黄海
时间2020-05-22 16:15:37
*/
func TestPageSysDictMultipleDictCode(t *testing.T) {
//1、准备动作连接服务器
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
conn := GRpcUtil.GetConnection()
defer conn.Close()
//2、使用微服务
c := SysDictProto.NewSysDictManageClient(conn)
var codes = []string{"10", "20"}
r, err := c.PageSysDictMultipleDictCode(ctx, &SysDictProto.MultipleQueryArg{MultipleDictCode: codes})
if err != nil {
fmt.Printf("could not greet: %v\n", err)
}
fmt.Println(r.Message, r.Success, r.Count)
fmt.Println(CommonUtil.ConvertJsonStringToMapArray(r.List))
}