增加api默认值的处理
This commit is contained in:
parent
bc59aba0ec
commit
7cb9e6b02c
9
rpc.go
9
rpc.go
@ -132,6 +132,15 @@ func (r *request) AddServiceApi(serviceFlag string, apiConfig *Api) error {
|
||||
if len(apiConfig.SuccessHttpCodeList) == 0 {
|
||||
apiConfig.SuccessHttpCodeList = serviceInfo.SuccessHttpCodeList
|
||||
}
|
||||
if len(apiConfig.CodeField) == 0 {
|
||||
apiConfig.CodeField = serviceInfo.CodeField
|
||||
}
|
||||
if len(apiConfig.DataField) == 0 {
|
||||
apiConfig.DataField = serviceInfo.DataField
|
||||
}
|
||||
if len(apiConfig.MessageField) == 0 {
|
||||
apiConfig.MessageField = serviceInfo.MessageField
|
||||
}
|
||||
r.lock.Lock()
|
||||
defer r.lock.Unlock()
|
||||
if nil == serviceInfo.ApiTable {
|
||||
|
Loading…
Reference in New Issue
Block a user