feat 添加方法根据bidType返回对应客户端

This commit is contained in:
timerzz 2024-09-04 15:51:21 +08:00
parent 56cba6c0d9
commit 552ef11ea8

View File

@ -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 { func (c *Client) ArticleService() ArticleServiceClient {
return c.articleServiceClient return c.articleServiceClient
} }