1
This commit is contained in:
@@ -1686,7 +1686,8 @@ func StatisticsIncome(db *DaoDB, startTime, endTime time.Time, storeId int, bran
|
||||
SUM(ROUND(IF(t1.earning_type = 1, t1.total_shop_money-t1.earning_price-IFNULL(t2.desired_fee,0), t1.total_shop_money *(t1.order_pay_percentage/2)/100) * (t3.jx_brand_fee_factor/10),3)) jx_income,
|
||||
SUM(ROUND(IF(t1.earning_type = 1, t1.total_shop_money-t1.earning_price-IFNULL(t2.desired_fee,0), t1.total_shop_money *(t1.order_pay_percentage/2)/100) * (t3.market_add_fee_factor/10),3)) market_income,
|
||||
count(t1.vendor_order_id) order_count,
|
||||
sum(t1.vendor_price) order_sku_price
|
||||
sum(t1.vendor_price) order_sku_price,
|
||||
sum(t1.package_price) server_fee
|
||||
FROM goods_order t1
|
||||
LEFT JOIN waybill t2 ON t1.vendor_waybill_id = t2.vendor_waybill_id AND t1.waybill_vendor_id = t2.waybill_vendor_id AND t1.vendor_order_id = t2.vendor_order_id
|
||||
LEFT JOIN store t3 ON t1.jx_store_id = t3.id
|
||||
|
||||
@@ -154,4 +154,5 @@ type StatisticsIncomeInfo struct {
|
||||
MarketIncome float64 `json:"market_income"`
|
||||
OrderCount float64 `json:"order_count"` // 有效订单数
|
||||
OrderSkuPrice float64 `json:"order_sku_price"` // 营业额(售卖价)
|
||||
ServerFee float64 `json:"server_fee"` // 报价门店服务费
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ type Store struct {
|
||||
IsPrintRefundOrder int `orm:"column(is_print_refund_order)" json:"isPrintRefundOrder"` //是否打印退款订单1是/-1否
|
||||
LossOrderDelivery int `orm:"column(loss_order_delivery)" json:"lossOrderDelivery"` //亏损订单是否自动发货,1/-1(默认不发货)
|
||||
IDCardHandBack string `orm:"size(255);column(id_card_hand_back)" json:"idCardHandBack"` //手持身份证背面
|
||||
PackageSetting int `orm:"size(8);column(package_setting);default(0)" json:"packageSetting"` //门店包装袋扣费设置
|
||||
PackageSetting int `orm:"size(8);column(package_setting);default(0)" json:"packageSetting"` //门店包装袋扣费设置(扣点门店服务费)
|
||||
PackageSwitch int `orm:"size(8);column(package_switch);default(0)" json:"packageSwitch"` //物料购物单门店购买袋子开关[0打开/1关闭]
|
||||
PushBill int `orm:"size(8);column(push_bill);default(0)" json:"pushBill"` //是否推送门店账单[0推送/1不推送]
|
||||
FreightMarkup int `orm:"size(8);column(freight_markup);default(0)" json:"freightMarkup"` //门店为三方运单时,设置的运营加价
|
||||
|
||||
@@ -538,6 +538,9 @@ func (c *OrderController) StaleIndexInfo() {
|
||||
}
|
||||
|
||||
if permission.IsRoled(ctx) {
|
||||
if (params.OperatorNumber != "" && params.OperatorNumber != mobile) || (params.BrandOperator != "" && params.BrandOperator != mobile) {
|
||||
return nil, model.ErrCodeTokenIsInvalid, fmt.Errorf("非超级管理员账户,只能查看自己")
|
||||
}
|
||||
if storeList, err = cms.GetStoreList4User(ctx, mobile, userID); err == nil && len(storeList) > 0 {
|
||||
for _, v := range storeList {
|
||||
dataList = append(dataList, v.Store.ID)
|
||||
|
||||
Reference in New Issue
Block a user