Merge remote-tracking branch 'origin/mark' into don
This commit is contained in:
@@ -399,8 +399,21 @@ func (c *OrderManager) updateOrderOtherInfo(order *model.GoodsOrder, db *dao.Dao
|
||||
payPercentage = storeDetail.PayPercentage
|
||||
}
|
||||
} else {
|
||||
store := &model.Store{}
|
||||
store.ID = order.StoreID
|
||||
if err = dao.GetEntity(dao.GetDB(), store); err != nil {
|
||||
if !dao.IsNoRowsError(err) {
|
||||
globals.SugarLogger.Warnf("updateOrderOtherInfo GetEntity orderID:%s, VendorStoreID:%s, error:%v", order.VendorOrderID, order.VendorStoreID, err)
|
||||
return err
|
||||
}
|
||||
if time.Now().Sub(order.OrderCreatedAt) < 1*time.Hour {
|
||||
globals.SugarLogger.Infof("updateOrderOtherInfo b, [运营]订单在京西与平台都找不到京西门店信息,订单:%s,平台门店ID:%s,平台:%s", order.VendorOrderID, order.VendorStoreID, model.VendorChineseNames[order.VendorID])
|
||||
}
|
||||
err = nil
|
||||
} else {
|
||||
payPercentage = store.PayPercentage
|
||||
}
|
||||
order.JxStoreID = order.StoreID
|
||||
payPercentage = 100
|
||||
}
|
||||
if err = c.updateOrderSkuOtherInfo(order, db, payPercentage); err == nil {
|
||||
jxutils.RefreshOrderSkuRelated(order)
|
||||
|
||||
@@ -89,7 +89,7 @@ var (
|
||||
VendorIDELM: "饿了么",
|
||||
VendorIDEBAI: "饿百新零售",
|
||||
VendorIDWSC: "微盟微商城",
|
||||
VendorIDJX: "京西自营",
|
||||
VendorIDJX: "京西商城",
|
||||
|
||||
VendorIDDada: "达达众包",
|
||||
VendorIDMTPS: "美团配送",
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
const (
|
||||
useGetRowsWhenGetRow = true
|
||||
transactionWarningSeconds = 5 * 60 // 5分钟
|
||||
transactionWarningSeconds = 2 * 60 // 5分钟
|
||||
)
|
||||
|
||||
type DaoDB struct {
|
||||
|
||||
@@ -80,7 +80,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `%s<BR>`
|
||||
orderFmt += `%8s%10s%10s<BR>`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
||||
}
|
||||
orderFmt += `<BR>
|
||||
<BOLD>共%d种%d件商品</BOLD>
|
||||
@@ -154,7 +154,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `<B>%s<BR></B>`
|
||||
orderFmt += `<B>%s %s %s<BR><BR></B>`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
||||
}
|
||||
orderFmt += `<BR>
|
||||
<B><BOLD>共%d种%d件商品</BOLD></B>
|
||||
|
||||
@@ -81,7 +81,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `%s*`
|
||||
orderFmt += `%8s%10s%10s*`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
||||
}
|
||||
orderFmt += `
|
||||
*
|
||||
@@ -156,7 +156,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `<big>%s*`
|
||||
orderFmt += `<big>%s %s %s*`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
||||
}
|
||||
orderFmt += `
|
||||
<big>共%d种%d件商品*
|
||||
@@ -232,7 +232,7 @@ func (c *PrinterHandler) getOrderContent2(order *model.GoodsOrder, storeTel stri
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `|5%s`
|
||||
orderFmt += `|5%8s%10s%10s`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
||||
}
|
||||
orderFmt += `
|
||||
|5
|
||||
|
||||
@@ -78,7 +78,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `%s\n`
|
||||
orderFmt += `%8s%10s%10s\n`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
||||
}
|
||||
orderFmt += `\n
|
||||
<FB>共%d种%d件商品</FB>
|
||||
@@ -146,7 +146,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `<FS2>%s\n</FS2>`
|
||||
orderFmt += `<FS2>%s %s %s\n\n</FS2>`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
||||
}
|
||||
orderFmt += `\n
|
||||
<FS2><FB>共%d种%d件商品</FB></FS2>
|
||||
|
||||
@@ -79,7 +79,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `%s<RN>`
|
||||
orderFmt += `%8s%10s%10s<RN>`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
||||
}
|
||||
orderFmt += `<RN>
|
||||
<B1>共%d种%d件商品</B1>
|
||||
@@ -147,7 +147,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `<S2>%s<RN></S2>`
|
||||
orderFmt += `<S2>%s %s %s<RN><RN></S2>`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
||||
}
|
||||
orderFmt += `<RN>
|
||||
<S2><B1>共%d种%d件商品</B1></S2>
|
||||
|
||||
Reference in New Issue
Block a user