This commit is contained in:
邹宗楠
2025-08-08 09:30:05 +08:00
parent 2429c36868
commit 4bd7834037

View File

@@ -2,7 +2,6 @@ package dao
import (
"fmt"
"git.rosy.net.cn/jx-callback/globals"
"regexp"
"strconv"
"time"
@@ -411,11 +410,6 @@ func GetStoreOrderSkuList(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAt
return skuList, err
}
type TotalShopMoney struct {
TotalShopMoney int64 `json:"totalShopMoney"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
}
// GetStoreServerFee 统计门店服务费
func GetStoreServerFee(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAtEnd time.Time, statusList []int, isFinish bool) ([]*ServerFeeInfo, error) {
sql := ` SELECT sum(t2.package_price) server_fee,t2.vendor_id,t2.jx_store_id FROM goods_order t2 WHERE 1=1 `
@@ -439,20 +433,17 @@ func GetStoreServerFee(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAtEnd
sql += ` GROUP BY t2.vendor_id,t2.jx_store_id`
feeList := make([]*ServerFeeInfo, 0, 0)
globals.SugarLogger.Debugf("----sql := %s", sql)
globals.SugarLogger.Debugf("----sqlParams := %s", utils.Format4Output(sqlParams, false))
if err := GetRows(db, &feeList, sql, sqlParams...); err != nil {
return nil, err
}
globals.SugarLogger.Debugf("----feeList := %s", utils.Format4Output(feeList, false))
return feeList, nil
}
type ServerFeeInfo struct {
ServerFee int64 `json:"server_fee"`
VendorID int `json:"vendor_id"`
JxStoreID int `json:"jx_store_id"`
ServerFee int64 `orm:"column(server_fee)" json:"serverFee"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
JxStoreID int `orm:"column(jx_store_id)" json:"jxStoreID"`
}
// GetPlatformSettlement 统计平台的结算信息
@@ -476,8 +467,13 @@ func GetPlatformSettlement(db *DaoDB, storeIDs []int, finishedAtBegin, finishedA
return total, err
}
type TotalShopMoney struct {
TotalShopMoney int64 `orm:"column(total_shop_money)" json:"totalShopMoney"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
}
type DeliveryFee struct {
ActualFee int64 `json:"actualFee"`
ActualFee int64 `orm:"column(actual_fee)" json:"actualFee"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
}