Merge remote-tracking branch 'origin/mark' into don
This commit is contained in:
@@ -2,6 +2,7 @@ package act
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
@@ -142,6 +143,9 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
||||
percentage = v.PricePercentage
|
||||
}
|
||||
actSkuMap.ActualActPrice = int64(jxutils.CaculateSkuVendorPrice(int(actSkuMap.VendorPrice), percentage, 0))
|
||||
if actSkuMap.ActualActPrice > 10 {
|
||||
actSkuMap.ActualActPrice = int64(math.Round(float64(actSkuMap.ActualActPrice)/10) * 10)
|
||||
}
|
||||
}
|
||||
if actSkuMap.ActualActPrice <= 0 {
|
||||
actSkuMap.ActualActPrice = 1
|
||||
|
||||
@@ -19,10 +19,14 @@ type SeqTask struct {
|
||||
}
|
||||
|
||||
func NewSeqTask(taskName string, ctx *jxcontext.Context, worker SeqWorkFunc, stepCount int, params ...interface{}) *SeqTask {
|
||||
return NewSeqTask2(taskName, ctx, false, worker, stepCount, params...)
|
||||
}
|
||||
|
||||
func NewSeqTask2(taskName string, ctx *jxcontext.Context, isContinueWhenError bool, worker SeqWorkFunc, stepCount int, params ...interface{}) *SeqTask {
|
||||
task := &SeqTask{
|
||||
worker: worker,
|
||||
}
|
||||
task.Init(1, 1, false, params, taskName, ctx, stepCount, stepCount)
|
||||
task.Init(1, 1, isContinueWhenError, params, taskName, ctx, stepCount, stepCount)
|
||||
return task
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
ExpectedDeliveredTime: getTimeFromInterface(orderMap["send_time"]),
|
||||
PickDeadline: utils.DefaultTimeValue,
|
||||
VendorStatus: utils.Int64ToStr(utils.MustInterface2Int64(orderMap["status"])),
|
||||
OrderSeq: int(utils.Str2Int64(utils.Interface2String(orderMap["order_index"]))),
|
||||
OrderSeq: int(utils.ForceInterface2Int64(orderMap["order_index"])),
|
||||
StatusTime: getTimeFromInterface(orderMap["create_time"]),
|
||||
OrderCreatedAt: getTimeFromInterface(orderMap["create_time"]),
|
||||
OriginalData: string(utils.MustMarshal(result)),
|
||||
|
||||
Reference in New Issue
Block a user