|
@@ -93,7 +93,10 @@ func handleZhiosOrderTotalSecond(msg []byte) error { |
|
|
sess.Rollback() |
|
|
sess.Rollback() |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ordData.IsTotal == 0 && ordData.State == 4 { |
|
|
|
|
|
sess.Rollback() |
|
|
|
|
|
return nil |
|
|
|
|
|
} |
|
|
now := time.Unix(int64(ordData.CreateAt), 0).Format("200601") |
|
|
now := time.Unix(int64(ordData.CreateAt), 0).Format("200601") |
|
|
nowDay := time.Unix(int64(ordData.CreateAt), 0).Format("20060102") |
|
|
nowDay := time.Unix(int64(ordData.CreateAt), 0).Format("20060102") |
|
|
isTotal := ordData.IsTotal |
|
|
isTotal := ordData.IsTotal |
|
@@ -306,8 +309,13 @@ func handleZhiosOrderTotalSecond(msg []byte) error { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
oldTotal := ordData.IsTotal |
|
|
ordData.IsTotal = isTotal |
|
|
ordData.IsTotal = isTotal |
|
|
sess.Where("ord_id=?", ordData.OrdId).Update(ordData) |
|
|
|
|
|
|
|
|
update, err := sess.Where("ord_id=?", ordData.OrdId).Update(ordData) |
|
|
|
|
|
if (update == 0 && isTotal != oldTotal) || err != nil { |
|
|
|
|
|
sess.Rollback() |
|
|
|
|
|
return err |
|
|
|
|
|
} |
|
|
sess.Commit() |
|
|
sess.Commit() |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |