aa
This commit is contained in:
@@ -138,29 +138,29 @@ func (s *DefScheduler) CreateWaybillOnProviders4SavedOrder(ctx *jxcontext.Contex
|
|||||||
//京西后台则是点一下发3个,len courierVendorIDs 是0
|
//京西后台则是点一下发3个,len courierVendorIDs 是0
|
||||||
//如果是小程序上点哪个扣哪个平台的钱
|
//如果是小程序上点哪个扣哪个平台的钱
|
||||||
//如果是后台,则选最高的那个扣
|
//如果是后台,则选最高的那个扣
|
||||||
var deliveryDee int64
|
// var deliveryDee int64
|
||||||
deliveryFeeMap, _ := s.QueryOrderWaybillFeeInfoEx(ctx, order.VendorOrderID, order.VendorID)
|
// deliveryFeeMap, _ := s.QueryOrderWaybillFeeInfoEx(ctx, order.VendorOrderID, order.VendorID)
|
||||||
if len(courierVendorIDs) == 1 {
|
// if len(courierVendorIDs) == 1 {
|
||||||
courierVendorID := courierVendorIDs[0]
|
// courierVendorID := courierVendorIDs[0]
|
||||||
if _, ok := deliveryFeeMap[courierVendorID]; ok {
|
// if _, ok := deliveryFeeMap[courierVendorID]; ok {
|
||||||
deliveryDee = deliveryFeeMap[courierVendorID].DeliveryFee
|
// deliveryDee = deliveryFeeMap[courierVendorID].DeliveryFee
|
||||||
}
|
// }
|
||||||
} else if len(courierVendorIDs) == 0 {
|
// } else if len(courierVendorIDs) == 0 {
|
||||||
var maxFee int64
|
// var maxFee int64
|
||||||
for _, v := range deliveryFeeMap {
|
// for _, v := range deliveryFeeMap {
|
||||||
if v.DeliveryFee > maxFee {
|
// if v.DeliveryFee > maxFee {
|
||||||
v.DeliveryFee = maxFee
|
// v.DeliveryFee = maxFee
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
deliveryDee = maxFee
|
// deliveryDee = maxFee
|
||||||
}
|
// }
|
||||||
handler := partner.CurStoreAcctManager
|
// handler := partner.CurStoreAcctManager
|
||||||
//此订单没有因为发运单而扣除过门店账户
|
//此订单没有因为发运单而扣除过门店账户
|
||||||
if isExist, err := handler.CheckStoreAcctExpendExist(jxutils.GetSaleStoreIDFromOrder(order), partner.StoreAcctTypeExpendCreateWaybillEx, order.VendorOrderID); err == nil && !isExist {
|
// if isExist, err := handler.CheckStoreAcctExpendExist(order.VendorOrderID); err == nil && !isExist {
|
||||||
err = handler.InsertStoreAcctExpendAndUpdateStoreAcctBalance(ctx, jxutils.GetSaleStoreIDFromOrder(order), int(deliveryDee), partner.StoreAcctTypeExpendCreateWaybillEx, order.VendorOrderID)
|
// err = handler.InsertStoreAcctExpendAndUpdateStoreAcctBalance(ctx, jxutils.GetSaleStoreIDFromOrder(order), int(deliveryDee), partner.StoreAcctTypeExpendCreateWaybillEx, order.VendorOrderID)
|
||||||
} else if isExist {
|
// } else if isExist {
|
||||||
globals.SugarLogger.Debugf("CreateWaybillOnProviders4SavedOrder orderID:%s userName:%s ,storeAcctExpend isExist", order.VendorOrderID, ctx.GetUserName())
|
// globals.SugarLogger.Debugf("CreateWaybillOnProviders4SavedOrder orderID:%s userName:%s ,storeAcctExpend isExist", order.VendorOrderID, ctx.GetUserName())
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("CreateWaybillOnProviders4SavedOrder orderID:%s userName:%s successfully", order.VendorOrderID, ctx.GetUserName())
|
globals.SugarLogger.Debugf("CreateWaybillOnProviders4SavedOrder orderID:%s userName:%s successfully", order.VendorOrderID, ctx.GetUserName())
|
||||||
return bills, err
|
return bills, err
|
||||||
@@ -230,14 +230,34 @@ func (s *DefScheduler) CheckStoreBalance(ctx *jxcontext.Context, order *model.Go
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return errCode, fmt.Errorf("获取账户余额失败!")
|
return errCode, fmt.Errorf("获取账户余额失败!")
|
||||||
}
|
}
|
||||||
if storeAcct.AccountBalance < partner.MinCreateWaybillBalance {
|
|
||||||
return model.ErrCodeAccountBalanceNotEnough, fmt.Errorf("门店账户余额小于[%v]元,不能发配送!", jxutils.IntPrice2Standard(partner.MinCreateWaybillBalance))
|
|
||||||
}
|
|
||||||
//1、先判断是不是第一次发:查询库里是否有这个订单的运费支出记录,再查询是否有相同金额并且类型为回退的收入记录(取消运单退回)
|
//1、先判断是不是第一次发:查询库里是否有这个订单的运费支出记录,再查询是否有相同金额并且类型为回退的收入记录(取消运单退回)
|
||||||
//前者有,后者无, 表示已经发过了,暂未取消,若这这次的发单金额小于上次的金额则不进行判断也不多扣钱,若大于则扣除‘这次金额-上次金额’的钱,余额不足问题也根据这个判断
|
//前者有,后者无, 表示已经发过了,暂未取消,若这这次的发单金额小于上次的金额则不进行判断也不多扣钱,若大于则扣除‘这次金额-上次金额’的钱,余额不足问题也根据这个判断
|
||||||
//前者有,后者有,表示发过并且取消过了,是多次发,直接扣
|
//前者有,后者有,表示发过并且取消过了,是多次发,直接扣
|
||||||
//前者无,表示就是第一次发,直接扣
|
//前者无,表示就是第一次发,直接扣
|
||||||
//2、小程序里这次金额用发单平台的金额,后台里这次金额用所有平台最高费用
|
//2、小程序里这次金额用发单平台的金额,后台里这次金额用所有平台最高费用
|
||||||
|
isEqual, isZero, err := partner.CurStoreAcctManager.CheckStoreAcctExpendExist(order.VendorOrderID)
|
||||||
|
//表示前者有,后者无
|
||||||
|
if !isZero && !isEqual {
|
||||||
|
var newPrice int64
|
||||||
|
if len(courierVendorIDs) == 1 {
|
||||||
|
courierVendorID := courierVendorIDs[0]
|
||||||
|
if _, ok := deliveryFeeMap[courierVendorID]; ok {
|
||||||
|
newPrice = deliveryFeeMap[courierVendorID].DeliveryFee
|
||||||
|
}
|
||||||
|
} else if len(courierVendorIDs) == 0 {
|
||||||
|
var maxFee int64
|
||||||
|
for _, v := range deliveryFeeMap {
|
||||||
|
if v.DeliveryFee > maxFee {
|
||||||
|
v.DeliveryFee = maxFee
|
||||||
|
}
|
||||||
|
}
|
||||||
|
newPrice = maxFee
|
||||||
|
}
|
||||||
|
fmt.Println(newPrice)
|
||||||
|
} else {
|
||||||
|
if storeAcct.AccountBalance < partner.MinCreateWaybillBalance {
|
||||||
|
return model.ErrCodeAccountBalanceNotEnough, fmt.Errorf("门店账户余额小于[%v]元,不能发配送!", jxutils.IntPrice2Standard(partner.MinCreateWaybillBalance))
|
||||||
|
}
|
||||||
if len(courierVendorIDs) == 1 {
|
if len(courierVendorIDs) == 1 {
|
||||||
courierVendorID := courierVendorIDs[0]
|
courierVendorID := courierVendorIDs[0]
|
||||||
if _, ok := deliveryFeeMap[courierVendorID]; ok {
|
if _, ok := deliveryFeeMap[courierVendorID]; ok {
|
||||||
@@ -257,6 +277,7 @@ func (s *DefScheduler) CheckStoreBalance(ctx *jxcontext.Context, order *model.Go
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return errCode, err
|
return errCode, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4051,11 +4051,11 @@ func GetStoreAcctBalance(ctx *jxcontext.Context, storeID int) (storeAcct *model.
|
|||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
)
|
)
|
||||||
totalIncome, err := dao.GetStoreAcctIncomeTotal(db, storeID, 0, utils.ZeroTimeValue, utils.ZeroTimeValue)
|
totalIncome, err := dao.GetStoreAcctIncomeTotal(db, storeID, nil, "", utils.ZeroTimeValue, utils.ZeroTimeValue)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
totalExpend, err := dao.GetStoreAcctExpendTotal(db, storeID, 0, utils.ZeroTimeValue, utils.ZeroTimeValue)
|
totalExpend, err := dao.GetStoreAcctExpendTotal(db, storeID, nil, "", utils.ZeroTimeValue, utils.ZeroTimeValue)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,13 +150,26 @@ func (s *StoreAcctManager) InsertStoreAcctIncomeAndUpdateStoreAcctBalance(ctx *j
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StoreAcctManager) CheckStoreAcctExpendExist(storeID, acctType int, vendorOrderID string) (result bool, err error) {
|
func (s *StoreAcctManager) CheckStoreAcctExpendExist(vendorOrderID string) (isEqual, isZero bool, err error) {
|
||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
|
expends, incomes int
|
||||||
)
|
)
|
||||||
//暂时这样,后应该会再查有没有对冲的入账记录来判断
|
globals.SugarLogger.Debugf("CheckStoreAcctExpendExist orderID:[%v]", vendorOrderID)
|
||||||
if results, err := dao.GetStoreAcctExpend(db, storeID, acctType, vendorOrderID, utils.ZeroTimeValue, utils.ZeroTimeValue); err == nil && len(results) > 0 {
|
expends, err = dao.GetStoreAcctExpendTotal(db, 0, []int{partner.StoreAcctTypeExpendCreateWaybillEx, partner.StoreAcctTypeRealFeeExpend}, vendorOrderID, utils.ZeroTimeValue, utils.ZeroTimeValue)
|
||||||
return true, err
|
incomes, err = dao.GetStoreAcctIncomeTotal(db, 0, []int{partner.StoreAcctTypeRealFeeIncome, partner.StoreAcctTypeIncomeCancelTemp, partner.StoreAcctTypeIncomeCancelReal}, vendorOrderID, utils.ZeroTimeValue, utils.ZeroTimeValue)
|
||||||
|
if expends != incomes {
|
||||||
|
if expends > incomes {
|
||||||
|
return false, false, err
|
||||||
|
} else {
|
||||||
|
globals.SugarLogger.Debugf("CheckStoreAcctExpendExist 收入大于支出! orderID:[%v]", vendorOrderID)
|
||||||
}
|
}
|
||||||
return false, err
|
} else {
|
||||||
|
if expends == 0 && incomes == 0 {
|
||||||
|
return true, true, err
|
||||||
|
} else {
|
||||||
|
return true, false, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false, false, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1011,7 +1011,7 @@ func GetBrands(db *DaoDB, name string, brandID int) (brands []*model.Brand, err
|
|||||||
return brands, err
|
return brands, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetStoreAcctIncome(db *DaoDB, storeID, incomeType int, fromTime, toTime time.Time) (storeAcctIncomes []*model.StoreAcctIncome, err error) {
|
func GetStoreAcctIncome(db *DaoDB, storeID int, incomeTypes []int, vendorOrderID string, fromTime, toTime time.Time) (storeAcctIncomes []*model.StoreAcctIncome, err error) {
|
||||||
sql := `
|
sql := `
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM store_acct_income
|
FROM store_acct_income
|
||||||
@@ -1022,9 +1022,13 @@ func GetStoreAcctIncome(db *DaoDB, storeID, incomeType int, fromTime, toTime tim
|
|||||||
sql += " AND store_id = ?"
|
sql += " AND store_id = ?"
|
||||||
sqlParams = append(sqlParams, storeID)
|
sqlParams = append(sqlParams, storeID)
|
||||||
}
|
}
|
||||||
if incomeType != 0 {
|
if len(incomeTypes) > 0 {
|
||||||
sql += " AND type = ?"
|
sql += " AND type IN (" + GenQuestionMarks(len(incomeTypes)) + ")"
|
||||||
sqlParams = append(sqlParams, incomeType)
|
sqlParams = append(sqlParams, incomeTypes)
|
||||||
|
}
|
||||||
|
if vendorOrderID != "" {
|
||||||
|
sql += " AND vendor_order_id = ?"
|
||||||
|
sqlParams = append(sqlParams, vendorOrderID)
|
||||||
}
|
}
|
||||||
if utils.IsTimeZero(fromTime) {
|
if utils.IsTimeZero(fromTime) {
|
||||||
sql += " AND created_at >= ?"
|
sql += " AND created_at >= ?"
|
||||||
@@ -1038,7 +1042,7 @@ func GetStoreAcctIncome(db *DaoDB, storeID, incomeType int, fromTime, toTime tim
|
|||||||
return storeAcctIncomes, err
|
return storeAcctIncomes, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetStoreAcctIncomeTotal(db *DaoDB, storeID, incomeType int, fromTime, toTime time.Time) (incomeTotal int, err error) {
|
func GetStoreAcctIncomeTotal(db *DaoDB, storeID int, incomeTypes []int, vendorOrderID string, fromTime, toTime time.Time) (incomeTotal int, err error) {
|
||||||
var income *model.StoreAcctIncome
|
var income *model.StoreAcctIncome
|
||||||
sql := `
|
sql := `
|
||||||
SELECT SUM(income_price) income_price
|
SELECT SUM(income_price) income_price
|
||||||
@@ -1050,9 +1054,13 @@ func GetStoreAcctIncomeTotal(db *DaoDB, storeID, incomeType int, fromTime, toTim
|
|||||||
sql += " AND store_id = ?"
|
sql += " AND store_id = ?"
|
||||||
sqlParams = append(sqlParams, storeID)
|
sqlParams = append(sqlParams, storeID)
|
||||||
}
|
}
|
||||||
if incomeType != 0 {
|
if len(incomeTypes) > 0 {
|
||||||
sql += " AND type = ?"
|
sql += " AND type IN (" + GenQuestionMarks(len(incomeTypes)) + ")"
|
||||||
sqlParams = append(sqlParams, incomeType)
|
sqlParams = append(sqlParams, incomeTypes)
|
||||||
|
}
|
||||||
|
if vendorOrderID != "" {
|
||||||
|
sql += " AND vendor_order_id = ?"
|
||||||
|
sqlParams = append(sqlParams, vendorOrderID)
|
||||||
}
|
}
|
||||||
if utils.IsTimeZero(fromTime) {
|
if utils.IsTimeZero(fromTime) {
|
||||||
sql += " AND created_at >= ?"
|
sql += " AND created_at >= ?"
|
||||||
@@ -1066,7 +1074,7 @@ func GetStoreAcctIncomeTotal(db *DaoDB, storeID, incomeType int, fromTime, toTim
|
|||||||
return income.IncomePrice, err
|
return income.IncomePrice, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetStoreAcctExpend(db *DaoDB, storeID, expendType int, vendorOrderID string, fromTime, toTime time.Time) (storeAcctExpends []*model.StoreAcctExpend, err error) {
|
func GetStoreAcctExpend(db *DaoDB, storeID int, expendTypes []int, vendorOrderID string, fromTime, toTime time.Time) (storeAcctExpends []*model.StoreAcctExpend, err error) {
|
||||||
sql := `
|
sql := `
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM store_acct_expend
|
FROM store_acct_expend
|
||||||
@@ -1077,9 +1085,9 @@ func GetStoreAcctExpend(db *DaoDB, storeID, expendType int, vendorOrderID string
|
|||||||
sql += " AND store_id = ?"
|
sql += " AND store_id = ?"
|
||||||
sqlParams = append(sqlParams, storeID)
|
sqlParams = append(sqlParams, storeID)
|
||||||
}
|
}
|
||||||
if expendType != 0 {
|
if len(expendTypes) > 0 {
|
||||||
sql += " AND type = ?"
|
sql += " AND type IN (" + GenQuestionMarks(len(expendTypes)) + ")"
|
||||||
sqlParams = append(sqlParams, expendType)
|
sqlParams = append(sqlParams, expendTypes)
|
||||||
}
|
}
|
||||||
if vendorOrderID != "" {
|
if vendorOrderID != "" {
|
||||||
sql += " AND vendor_order_id = ?"
|
sql += " AND vendor_order_id = ?"
|
||||||
@@ -1097,7 +1105,7 @@ func GetStoreAcctExpend(db *DaoDB, storeID, expendType int, vendorOrderID string
|
|||||||
return storeAcctExpends, err
|
return storeAcctExpends, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetStoreAcctExpendTotal(db *DaoDB, storeID, expendType int, fromTime, toTime time.Time) (expendTotal int, err error) {
|
func GetStoreAcctExpendTotal(db *DaoDB, storeID int, expendTypes []int, vendorOrderID string, fromTime, toTime time.Time) (expendTotal int, err error) {
|
||||||
var expend *model.StoreAcctExpend
|
var expend *model.StoreAcctExpend
|
||||||
sql := `
|
sql := `
|
||||||
SELECT SUM(expend_price) expend_price
|
SELECT SUM(expend_price) expend_price
|
||||||
@@ -1109,9 +1117,13 @@ func GetStoreAcctExpendTotal(db *DaoDB, storeID, expendType int, fromTime, toTim
|
|||||||
sql += " AND store_id = ?"
|
sql += " AND store_id = ?"
|
||||||
sqlParams = append(sqlParams, storeID)
|
sqlParams = append(sqlParams, storeID)
|
||||||
}
|
}
|
||||||
if expendType != 0 {
|
if len(expendTypes) > 0 {
|
||||||
sql += " AND type = ?"
|
sql += " AND type IN (" + GenQuestionMarks(len(expendTypes)) + ")"
|
||||||
sqlParams = append(sqlParams, expendType)
|
sqlParams = append(sqlParams, expendTypes)
|
||||||
|
}
|
||||||
|
if vendorOrderID != "" {
|
||||||
|
sql += " AND vendor_order_id = ?"
|
||||||
|
sqlParams = append(sqlParams, vendorOrderID)
|
||||||
}
|
}
|
||||||
if utils.IsTimeZero(fromTime) {
|
if utils.IsTimeZero(fromTime) {
|
||||||
sql += " AND created_at >= ?"
|
sql += " AND created_at >= ?"
|
||||||
@@ -1124,34 +1136,3 @@ func GetStoreAcctExpendTotal(db *DaoDB, storeID, expendType int, fromTime, toTim
|
|||||||
err = GetRow(db, &expend, sql, sqlParams)
|
err = GetRow(db, &expend, sql, sqlParams)
|
||||||
return expend.ExpendPrice, err
|
return expend.ExpendPrice, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetStoreAcctExpendMore(db *DaoDB, storeID, expendType int, vendorOrderID string, fromTime, toTime time.Time) (storeAcctExpends []*model.StoreAcctExpend, err error) {
|
|
||||||
sql := `
|
|
||||||
SELECT *
|
|
||||||
FROM store_acct_expend
|
|
||||||
WHERE 1 = 1
|
|
||||||
`
|
|
||||||
sqlParams := []interface{}{}
|
|
||||||
if storeID != 0 {
|
|
||||||
sql += " AND store_id = ?"
|
|
||||||
sqlParams = append(sqlParams, storeID)
|
|
||||||
}
|
|
||||||
if expendType != 0 {
|
|
||||||
sql += " AND type = ?"
|
|
||||||
sqlParams = append(sqlParams, expendType)
|
|
||||||
}
|
|
||||||
if vendorOrderID != "" {
|
|
||||||
sql += " AND vendor_order_id = ?"
|
|
||||||
sqlParams = append(sqlParams, vendorOrderID)
|
|
||||||
}
|
|
||||||
if utils.IsTimeZero(fromTime) {
|
|
||||||
sql += " AND created_at >= ?"
|
|
||||||
sqlParams = append(sqlParams, fromTime)
|
|
||||||
}
|
|
||||||
if utils.IsTimeZero(toTime) {
|
|
||||||
sql += " AND created_at <= ?"
|
|
||||||
sqlParams = append(sqlParams, toTime)
|
|
||||||
}
|
|
||||||
err = GetRows(db, &storeAcctExpends, sql, sqlParams)
|
|
||||||
return storeAcctExpends, err
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -810,6 +810,7 @@ type StoreAcctIncome struct {
|
|||||||
StoreID int `orm:"column(store_id)" json:"storeID"` //门店ID
|
StoreID int `orm:"column(store_id)" json:"storeID"` //门店ID
|
||||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
||||||
UserID string `orm:"column(user_id)" json:"userID"` //用户ID (谁消费的)
|
UserID string `orm:"column(user_id)" json:"userID"` //用户ID (谁消费的)
|
||||||
|
ExpID int `orm:"column(exp_id)" json:"expID"` //用于关联多退少补的金额是对应哪一笔收入(支出)
|
||||||
Type int `json:"type"` //收入类型
|
Type int `json:"type"` //收入类型
|
||||||
IncomePrice int `json:"incomePrice"` //收入金额
|
IncomePrice int `json:"incomePrice"` //收入金额
|
||||||
}
|
}
|
||||||
@@ -828,6 +829,7 @@ type StoreAcctExpend struct {
|
|||||||
StoreID int `orm:"column(store_id)" json:"storeID"` //门店ID
|
StoreID int `orm:"column(store_id)" json:"storeID"` //门店ID
|
||||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
||||||
UserID string `orm:"column(user_id)" json:"userID"` //用户ID (谁消费的)
|
UserID string `orm:"column(user_id)" json:"userID"` //用户ID (谁消费的)
|
||||||
|
ExpID int `orm:"column(exp_id)" json:"expID"` //用于关联多退少补的金额是对应哪一笔收入(支出)
|
||||||
Type int `json:"type"` //支出类型
|
Type int `json:"type"` //支出类型
|
||||||
ExpendPrice int `json:"expendPrice"` //支出金额
|
ExpendPrice int `json:"expendPrice"` //支出金额
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ const (
|
|||||||
//账户收入类型
|
//账户收入类型
|
||||||
StoreAcctTypeIncomePay = 10 //主动充值
|
StoreAcctTypeIncomePay = 10 //主动充值
|
||||||
StoreAcctTypeRealFeeIncome = 15 //真实运费 < 临时运费, 临时运费-真实运费的值
|
StoreAcctTypeRealFeeIncome = 15 //真实运费 < 临时运费, 临时运费-真实运费的值
|
||||||
|
StoreAcctTypeIncomeCancelTemp = 18 //运单取消,回退的临时运费
|
||||||
|
StoreAcctTypeIncomeCancelReal = 19 //运单取消,回退的真实运费
|
||||||
|
|
||||||
//账户支出类型
|
//账户支出类型
|
||||||
StoreAcctTypeExpendCreateWaybillEx = 20 //手动发单扣除的临时运费
|
StoreAcctTypeExpendCreateWaybillEx = 20 //手动发单扣除的临时运费
|
||||||
@@ -37,5 +39,5 @@ type IStoreAcctManager interface {
|
|||||||
UpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price int, isIncome bool) (err error)
|
UpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price int, isIncome bool) (err error)
|
||||||
InsertStoreAcctExpendAndUpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string) (err error)
|
InsertStoreAcctExpendAndUpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string) (err error)
|
||||||
InsertStoreAcctIncomeAndUpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string) (err error)
|
InsertStoreAcctIncomeAndUpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string) (err error)
|
||||||
CheckStoreAcctExpendExist(storeID, acctType int, vendorOrderID string) (result bool, err error)
|
CheckStoreAcctExpendExist(vendorOrderID string) (isEqual, isZero bool, err error)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user