should be item qty
This commit is contained in:
@@ -294,7 +294,7 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa
|
||||
for i, item := range c.Items {
|
||||
if item.Id == int(msg.Id) {
|
||||
if msg.Quantity <= 0 {
|
||||
c.TotalPrice -= item.Price * int64(msg.Quantity)
|
||||
c.TotalPrice -= item.Price * int64(item.Quantity)
|
||||
c.Items = append(c.Items[:i], c.Items[i+1:]...)
|
||||
} else {
|
||||
diff := int(msg.Quantity) - item.Quantity
|
||||
|
||||
Reference in New Issue
Block a user