update
This commit is contained in:
@@ -336,19 +336,20 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c.Deliveries = append(c.Deliveries, &CartDelivery{
|
if len(items) > 0 {
|
||||||
Id: c.lastDeliveryId,
|
|
||||||
Provider: msg.Provider,
|
c.Deliveries = append(c.Deliveries, &CartDelivery{
|
||||||
Price: 49,
|
Id: c.lastDeliveryId,
|
||||||
Items: items,
|
Provider: msg.Provider,
|
||||||
})
|
Price: 49,
|
||||||
c.Processing = true
|
Items: items,
|
||||||
go func() {
|
})
|
||||||
time.Sleep(5 * time.Second)
|
c.Processing = true
|
||||||
c.mu.Lock()
|
go func() {
|
||||||
c.Processing = false
|
time.Sleep(5 * time.Second)
|
||||||
c.mu.Unlock()
|
c.Processing = false
|
||||||
}()
|
}()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case RemoveDeliveryType:
|
case RemoveDeliveryType:
|
||||||
msg, ok := message.Content.(*messages.RemoveDelivery)
|
msg, ok := message.Content.(*messages.RemoveDelivery)
|
||||||
|
|||||||
Reference in New Issue
Block a user