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.
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 GovAreaService
import (
"context"
"dsSupport/MyModel/AccessSystem/AccessSystemProto/GovAreaProto"
"dsSupport/Utils/GRpcUtil"
"dsSupport/Utils/LogUtil"
"errors"
"time"
)
/**
功能:根据行政区划码获取下级行政区划
作者:吴缤
时间: 2020-04-20
*/
func PageGovArea ( page int32 , limit int32 , areaCode string ) ( * GovAreaProto . Reply , error ) {
//1、准备动作: 连接服务器
ctx , cancel := context . WithTimeout ( context . Background ( ) , 10 * time . Second )
defer cancel ( )
conn := GRpcUtil . GetConnection ( )
if conn == nil {
return nil , errors . New ( "RPC服务未启动! " )
}
c := GovAreaProto . NewGovAreaManageClient ( conn )
Reply , err := c . PageGovArea ( ctx , & GovAreaProto . QueryArg { Page : page , Limit : limit , AreaCode : areaCode } )
if err != nil {
LogUtil . Error ( "根据行政区划码获取下级行政区划错误: " , err . Error ( ) )
}
return Reply , err
}