京东商城订单
This commit is contained in:
@@ -81,8 +81,8 @@ func result2Orders(msg *jdshopapi.CallBackResult) (order *model.GoodsOrder, err
|
|||||||
OrderCreatedAt: utils.Str2Time(msg.OrderStartTime),
|
OrderCreatedAt: utils.Str2Time(msg.OrderStartTime),
|
||||||
ConsigneeAddress: Decrypt(msg.ConsigneeInfo.FullAddress),
|
ConsigneeAddress: Decrypt(msg.ConsigneeInfo.FullAddress),
|
||||||
ConsigneeName: Decrypt(msg.ConsigneeInfo.Fullname),
|
ConsigneeName: Decrypt(msg.ConsigneeInfo.Fullname),
|
||||||
ConsigneeMobile: Decrypt(msg.ConsigneeInfo.Telephone),
|
ConsigneeMobile: Decrypt(msg.ConsigneeInfo.Mobile),
|
||||||
ConsigneeMobile2: Decrypt(msg.ConsigneeInfo.Mobile),
|
ConsigneeMobile2: Decrypt(msg.ConsigneeInfo.Telephone),
|
||||||
ActualPayPrice: jxutils.StandardPrice2Int(utils.Str2Float64(msg.OrderPayment)),
|
ActualPayPrice: jxutils.StandardPrice2Int(utils.Str2Float64(msg.OrderPayment)),
|
||||||
Status: model.OrderStatusNew,
|
Status: model.OrderStatusNew,
|
||||||
TotalShopMoney: utils.Float64TwoInt64(math.Round(float64(jxutils.StandardPrice2Int(utils.Str2Float64(msg.OrderPayment))) * jdshopapi.JdsPayPercentage)),
|
TotalShopMoney: utils.Float64TwoInt64(math.Round(float64(jxutils.StandardPrice2Int(utils.Str2Float64(msg.OrderPayment))) * jdshopapi.JdsPayPercentage)),
|
||||||
@@ -170,6 +170,9 @@ func setJdsOrderSeq(order *model.GoodsOrder) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Decrypt(p string) (result string) {
|
func Decrypt(p string) (result string) {
|
||||||
|
if p == "" {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
data, _ := base64.StdEncoding.DecodeString(strings.ReplaceAll(p, " ", "+"))
|
data, _ := base64.StdEncoding.DecodeString(strings.ReplaceAll(p, " ", "+"))
|
||||||
key := GetKey(hex.EncodeToString(data)[4:36])
|
key := GetKey(hex.EncodeToString(data)[4:36])
|
||||||
data2, _ := base64.StdEncoding.DecodeString(key)
|
data2, _ := base64.StdEncoding.DecodeString(key)
|
||||||
|
|||||||
Reference in New Issue
Block a user