1
This commit is contained in:
@@ -36,6 +36,8 @@ type StoresOrderSaleInfo struct {
|
||||
PlatformSettlement int64 `json:"platformSettlement"` // 真实订单的平台结算(无扣点)
|
||||
ActualFee int64 `json:"actualFee"` // 真三方运单配送费
|
||||
ServerFee int64 `json:"serverFee"` // 附加服务费
|
||||
FineFee int64 `json:"fineFee"` // 罚款金额
|
||||
PromotionFee int64 `json:"promotionFee"` // 推广金额
|
||||
}
|
||||
|
||||
type OrderSkuWithActualPayPrice struct {
|
||||
|
||||
@@ -1732,3 +1732,19 @@ func StatisticsIncome(db *DaoDB, startTime, endTime time.Time, storeId int, bran
|
||||
|
||||
return incomeInfo, nil
|
||||
}
|
||||
|
||||
// StatisticsFineFee 统计门店罚款支出
|
||||
func StatisticsFineFee(db *DaoDB, startTime, endTime time.Time, storeId []int) ([]*model.StoreFine, error) {
|
||||
parma := []interface{}{storeId, startTime, endTime}
|
||||
sql := ` SELECT * FROM store_fine WHERE store_id IN (` + GenQuestionMarks(len(storeId)) + `)` + ` AND finish_time >= ? AND finish_time <= ?`
|
||||
|
||||
fine := make([]*model.StoreFine, 0, 0)
|
||||
if err := GetRows(db, &fine, sql, parma...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(fine) == model.NO {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return fine, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user