1
This commit is contained in:
@@ -23,7 +23,7 @@ func init() {
|
||||
partner.InitStoreAcctManager(FixedStoreAcctManager)
|
||||
}
|
||||
|
||||
func 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
|
||||
@@ -190,7 +190,7 @@ func (s *StoreAcctManager) GetBrandBalance(brandID int) (balance int, err error)
|
||||
return dao.GetBrandBalance(dao.GetDB(), brandID)
|
||||
}
|
||||
|
||||
func (s *StoreAcctManager) InsertBrandBill(ctx *jxcontext.Context, brandID, price, billType, feeType int, vendorOrderID string) (err error) {
|
||||
func (s *StoreAcctManager) InsertBrandBill(ctx *jxcontext.Context, brandID, price, billType, feeType int, vendorOrderID string, wayVendorOrderId string) (err error) {
|
||||
utils.CallFuncAsync(func() {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
@@ -205,6 +205,7 @@ func (s *StoreAcctManager) InsertBrandBill(ctx *jxcontext.Context, brandID, pric
|
||||
BillType: billType,
|
||||
FeeType: feeType,
|
||||
VendorOrderID: vendorOrderID,
|
||||
OrderID: wayVendorOrderId,
|
||||
}
|
||||
dao.WrapAddIDCULEntity(brandBill, ctx.GetUserName())
|
||||
//扣除后,如果余额小于10元要发消息通知 ,每天通知一次
|
||||
|
||||
@@ -266,7 +266,7 @@ func CallbackBrandBill(res *SecretNumberMsgRes) (err error) {
|
||||
if brands, _ := dao.GetBrands(db, "", 0, res.PoolKey, false, ""); len(brands) > 0 {
|
||||
if brandID := brands[0].ID; brandID != 0 {
|
||||
price := utils.Float64TwoInt(utils.Str2Time(res.ReleaseTime).Sub(utils.Str2Time(res.StartTime)).Minutes()+1) * 6
|
||||
if err = partner.CurStoreAcctManager.InsertBrandBill(jxcontext.AdminCtx, brandID, price, model.BrandBillTypeExpend, model.BrandBillFeeTypeSecretNumber, ""); err == nil {
|
||||
if err = partner.CurStoreAcctManager.InsertBrandBill(jxcontext.AdminCtx, brandID, price, model.BrandBillTypeExpend, model.BrandBillFeeTypeSecretNumber, "",""); err == nil {
|
||||
//计算余额,小于10就解绑
|
||||
balance, _ := partner.CurStoreAcctManager.GetBrandBalance(brandID)
|
||||
if balance < model.BrandBalanceLimit {
|
||||
|
||||
Reference in New Issue
Block a user