refactor(audit): 更新审核参数结构并添加工作流角色支持
- 将多个模块中的审核参数从 AuditStaffIds 改为 AuditItems 结构 - 添加对审核角色 ID 的支持 - 新增 bean.AuditItem 结构体定义 - 更新客户端发现逻辑以支持本地开发环境 - 在工作流节点中添加角色 ID 字段 - 调整导入包顺序并优化代码结构
This commit is contained in:
@@ -57,13 +57,23 @@ func GetClient(s interface{}) (*RpcClient, error) {
|
||||
basePath := split[0]
|
||||
servicePath := split[1]
|
||||
xClient, ok := mClient.Load(key)
|
||||
log.Println(path, key)
|
||||
if !ok {
|
||||
mutex.Lock()
|
||||
xClient, ok = mClient.Load(key)
|
||||
if !ok {
|
||||
d, err := consulClient.NewConsulDiscovery(basePath, servicePath, config.RpcConfig.RegistryServer, nil)
|
||||
if err != nil {
|
||||
return nil, errors.New("系统异常")
|
||||
var d client.ServiceDiscovery
|
||||
var err error
|
||||
if basePath == "ik3cloud1" {
|
||||
d, err = client.NewPeer2PeerDiscovery("tcp@localhost:8081", "")
|
||||
if err != nil {
|
||||
return nil, errors.New("系统异常")
|
||||
}
|
||||
} else {
|
||||
d, err = consulClient.NewConsulDiscovery(basePath, servicePath, config.RpcConfig.RegistryServer, nil)
|
||||
if err != nil {
|
||||
return nil, errors.New("系统异常")
|
||||
}
|
||||
}
|
||||
option := client.DefaultOption
|
||||
option.Retries = 3
|
||||
|
||||
Reference in New Issue
Block a user