订单亏损规则,查询审核信息带门店等级
This commit is contained in:
@@ -1443,7 +1443,7 @@ func OrderProfitWarning(order *model.GoodsOrder) {
|
|||||||
if storeDetail != nil && err == nil {
|
if storeDetail != nil && err == nil {
|
||||||
payPercentage := storeDetail.PayPercentage
|
payPercentage := storeDetail.PayPercentage
|
||||||
if payPercentage >= 50 {
|
if payPercentage >= 50 {
|
||||||
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney-order.EarningPrice)) / 100
|
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney-order.ShopPrice)) / 100
|
||||||
} else {
|
} else {
|
||||||
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney*int64(payPercentage)/200)) / 100
|
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney*int64(payPercentage)/200)) / 100
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1558,6 +1558,7 @@ type tStoreSkuAudit struct {
|
|||||||
MidUnitPrice int `json:"midUnitPrice"`
|
MidUnitPrice int `json:"midUnitPrice"`
|
||||||
CityName string `json:"cityName"`
|
CityName string `json:"cityName"`
|
||||||
PayPercentage int `json:"payPercentage"`
|
PayPercentage int `json:"payPercentage"`
|
||||||
|
StoreLevel string `json:"StoreLevel"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetStoreSkuAudit(db *DaoDB, storeIDs, nameIDs, skuIDs, statuss, types []int, name, remark, keyword, marketManPhone, cityName string, applyTimeStart, applyTimeEnd, auditTimeStart, auditTimeEnd time.Time, pageSize, offset int) (pagedInfo *model.PagedInfo, err error) {
|
func GetStoreSkuAudit(db *DaoDB, storeIDs, nameIDs, skuIDs, statuss, types []int, name, remark, keyword, marketManPhone, cityName string, applyTimeStart, applyTimeEnd, auditTimeStart, auditTimeEnd time.Time, pageSize, offset int) (pagedInfo *model.PagedInfo, err error) {
|
||||||
@@ -1565,7 +1566,7 @@ func GetStoreSkuAudit(db *DaoDB, storeIDs, nameIDs, skuIDs, statuss, types []int
|
|||||||
sql := `
|
sql := `
|
||||||
SELECT SQL_CALC_FOUND_ROWS DISTINCT a.*,
|
SELECT SQL_CALC_FOUND_ROWS DISTINCT a.*,
|
||||||
c.name sku_name, c.prefix, c.unit, c.spec_quality, c.spec_unit, c.img,
|
c.name sku_name, c.prefix, c.unit, c.spec_quality, c.spec_unit, c.img,
|
||||||
d.name store_name, b.name, e.mid_unit_price, f.name city_name, d.pay_percentage
|
d.name store_name, b.name, e.mid_unit_price, f.name city_name, d.pay_percentage, d.store_level
|
||||||
FROM store_sku_audit a
|
FROM store_sku_audit a
|
||||||
LEFT JOIN user b ON a.user_id = b.user_id
|
LEFT JOIN user b ON a.user_id = b.user_id
|
||||||
LEFT JOIN sku_name c ON c.id = a.name_id AND c.deleted_at = ?
|
LEFT JOIN sku_name c ON c.id = a.name_id AND c.deleted_at = ?
|
||||||
|
|||||||
Reference in New Issue
Block a user