feat 添加方法根据bidType返回对应客户端
This commit is contained in:
parent
56cba6c0d9
commit
552ef11ea8
12
client.go
12
client.go
@ -35,6 +35,18 @@ func NewClient(cfg Config) *Client {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) BidClientByBidType(bidType BiddingType) BidClient {
|
||||
switch bidType {
|
||||
case BiddingType_Normal:
|
||||
return c.normalBidClient
|
||||
case BiddingType_PreSale, BiddingType_Fast_PreSale:
|
||||
return c.preSaleBidClient
|
||||
case BiddingType_Consign:
|
||||
return c.consignBidClient
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
func (c *Client) ArticleService() ArticleServiceClient {
|
||||
return c.articleServiceClient
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user