|
|
|
@ -1,9 +1,10 @@
|
|
|
|
|
package shop
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/jinzhu/gorm"
|
|
|
|
|
"recook/internal/model/order"
|
|
|
|
|
"recook/internal/model/user"
|
|
|
|
|
|
|
|
|
|
"github.com/jinzhu/gorm"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func OrderProfit(od order.Information, tx *gorm.DB) error {
|
|
|
|
@ -15,9 +16,6 @@ func OrderProfit(od order.Information, tx *gorm.DB) error {
|
|
|
|
|
|
|
|
|
|
condition := od.SharerID == od.UserID
|
|
|
|
|
base := od.ActualTotalAmount.Sub(od.Cost).Sub(od.ExpressTotalFee)
|
|
|
|
|
if u1.Level == 0 {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch u1.Level {
|
|
|
|
|
case 0:
|
|
|
|
|