修改门店发单运费收取,非京西门店先收取门店,门店不够在收取品牌.京西门店直接收取门店
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
"io"
|
||||
"math"
|
||||
"mime/multipart"
|
||||
@@ -4736,7 +4735,7 @@ func RefreshPageStore() {
|
||||
|
||||
func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword, vendorStoreID, brandName string, vendorID, cityCode, districtCode int, tel string,
|
||||
minShopScore float32, minRecentOrderNum, minSkuCount int, lng1, lat1, lng2, lat2 float64, cat string) (pagedInfo *model.PagedInfo, err error) {
|
||||
db.Db = orm.NewOrmUsingDB("c4beta")
|
||||
// db.Db = orm.NewOrmUsingDB("c4beta")
|
||||
sqlJD := `
|
||||
SELECT name, 0 vendor_id, wmpoiid vendor_store_id, orgcode org_code, 1 vendor_status, address, phone tel1, pj shop_score, month_sales_tip recent_order_num,
|
||||
bak_info city_name, goods_number sku_count, lat, lng, district_name, brand_name, third_category category, shipping_time
|
||||
@@ -4907,7 +4906,7 @@ func QueryPageSkus(ctx *jxcontext.Context, vendorID int, vendorStoreIDs []string
|
||||
db = dao.GetDB()
|
||||
results []*QueryPageSkusResult
|
||||
)
|
||||
db.Db = orm.NewOrmUsingDB("c4beta")
|
||||
//db.Db = orm.NewOrmUsingDB("c4beta")
|
||||
sqlParams := []interface{}{}
|
||||
sqlJD := `
|
||||
SELECT 0 vendor_id, b.orgcode org_code, a.wmpoiid store_id, b.name store_name, a.Base sku_id, a.name sku_name, a.month_saled month_sales,
|
||||
@@ -5070,7 +5069,7 @@ func GetPageBrands(ctx *jxcontext.Context) (brands []*model.PageBrand, err error
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
db.Db = orm.NewOrmUsingDB("c4beta")
|
||||
//db.Db = orm.NewOrmUsingDB("c4beta")
|
||||
sql := `
|
||||
SELECT * FROM page_brand
|
||||
`
|
||||
|
||||
@@ -23,7 +23,7 @@ func init() {
|
||||
partner.InitStoreAcctManager(FixedStoreAcctManager)
|
||||
}
|
||||
|
||||
func (s *StoreAcctManager) InsertStoreAcctIncome(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
|
||||
func InsertStoreAcctIncome(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
|
||||
var (
|
||||
userID, userName string
|
||||
goodsVendorOrderID string
|
||||
@@ -59,7 +59,7 @@ func (s *StoreAcctManager) InsertStoreAcctIncome(ctx *jxcontext.Context, storeID
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *StoreAcctManager) InsertStoreAcctExpend(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
|
||||
func InsertStoreAcctExpend(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
|
||||
var (
|
||||
userID, userName string
|
||||
db = dao.GetDB()
|
||||
@@ -136,10 +136,10 @@ func (s *StoreAcctManager) UpdateStoreAcctBalance(ctx *jxcontext.Context, storeI
|
||||
return err
|
||||
}
|
||||
|
||||
// 门店到账
|
||||
// 门店到账(老版本,修改门店的交易记录)
|
||||
func (s *StoreAcctManager) InsertStoreAcctExpendAndUpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
|
||||
utils.CallFuncAsync(func() {
|
||||
if err = s.InsertStoreAcctExpend(ctx, storeID, price, acctType, vendorOrderID, expendID); err == nil {
|
||||
if err = InsertStoreAcctExpend(ctx, storeID, price, acctType, vendorOrderID, expendID); err == nil {
|
||||
s.UpdateStoreAcctBalance(ctx, storeID, price, false)
|
||||
}
|
||||
})
|
||||
@@ -148,7 +148,7 @@ func (s *StoreAcctManager) InsertStoreAcctExpendAndUpdateStoreAcctBalance(ctx *j
|
||||
|
||||
func (s *StoreAcctManager) InsertStoreAcctIncomeAndUpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
|
||||
utils.CallFuncAsync(func() {
|
||||
if err = s.InsertStoreAcctIncome(ctx, storeID, price, acctType, vendorOrderID, expendID); err == nil {
|
||||
if err = InsertStoreAcctIncome(ctx, storeID, price, acctType, vendorOrderID, expendID); err == nil {
|
||||
s.UpdateStoreAcctBalance(ctx, storeID, price, true)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user