generated from kedaya_haitao/template
update 上个最低价供应商能买,这个供应商不能买,那么即使现在的供应商价格更低,也不使用
All checks were successful
Build image / build (push) Successful in 51s
All checks were successful
Build image / build (push) Successful in 51s
This commit is contained in:
parent
5845828066
commit
c809922fd5
@ -70,6 +70,10 @@ func (c *Controller) rate(ctx context.Context, idString string) error {
|
||||
for _, provider := range article.Providers {
|
||||
final := provider.Cost.FinalPrice
|
||||
if final > 0 && (final < cost || cost == 0) && !provider.Exclude {
|
||||
if available && !provider.Available {
|
||||
// 上个最低价供应商能买,这个供应商不能买,那么即使现在的供应商价格更低,也不使用
|
||||
continue
|
||||
}
|
||||
cost = final
|
||||
}
|
||||
available = available || provider.Available
|
||||
|
Loading…
x
Reference in New Issue
Block a user