aa
This commit is contained in:
@@ -2,8 +2,10 @@ package cms
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/alipayapi"
|
||||||
"git.rosy.net.cn/baseapi/platformapi/qywxapi"
|
"git.rosy.net.cn/baseapi/platformapi/qywxapi"
|
||||||
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/alipay"
|
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/alipay"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
|
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
|
||||||
@@ -401,17 +403,17 @@ func CreateUser(user *model.User, creatorName string) (err error) {
|
|||||||
}
|
}
|
||||||
if user.GetMobile() != "" && user.GetName() != "" && user.GetID2() != "" {
|
if user.GetMobile() != "" && user.GetName() != "" && user.GetID2() != "" {
|
||||||
if user.LastLoginType != "" && user.LastLoginType == alipay.AuthType {
|
if user.LastLoginType != "" && user.LastLoginType == alipay.AuthType {
|
||||||
mobile := ""
|
mobile := &alipayapi.KeyMobile{}
|
||||||
data, _ := base64.StdEncoding.DecodeString(user.GetMobile())
|
data, _ := base64.StdEncoding.DecodeString(user.GetMobile())
|
||||||
key, _ := base64.StdEncoding.DecodeString(alipay.AuthKey)
|
key, _ := base64.StdEncoding.DecodeString(alipay.AuthKey)
|
||||||
iv := []byte{}
|
iv := []byte{}
|
||||||
iv = append(iv, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
iv = append(iv, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
if result, err := utils.AESCBCDecpryt(data, key, iv); err == nil && result != nil {
|
if result, err := utils.AESCBCDecpryt(data, key, iv); err == nil && result != nil {
|
||||||
mobile = string(result)
|
json.Unmarshal(result, &mobile)
|
||||||
}
|
}
|
||||||
user.Mobile = &mobile
|
user.Mobile = &mobile.Mobile
|
||||||
user.UserID2 = mobile
|
user.UserID2 = mobile.Mobile
|
||||||
user.Name = mobile
|
user.Name = mobile.Mobile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dao.WrapAddIDCULDEntity(user, creatorName)
|
dao.WrapAddIDCULDEntity(user, creatorName)
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ func (c *PurchaseHandler) RefundOrder(ctx *jxcontext.Context, order *model.Goods
|
|||||||
|
|
||||||
// 发起部分退款
|
// 发起部分退款
|
||||||
func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.GoodsOrder, refundSkuList []*model.OrderSku, reason string) (err error) {
|
func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.GoodsOrder, refundSkuList []*model.OrderSku, reason string) (err error) {
|
||||||
globals.SugarLogger.Debugf("PartRefundOrder jdshop, orderID :%v", order.VendorOrderID)
|
globals.SugarLogger.Debugf("PartRefundOrder jdshop, order :%v", utils.Format4Output(order, true))
|
||||||
var (
|
var (
|
||||||
skuMap = make(map[int]*model.OrderSku)
|
skuMap = make(map[int]*model.OrderSku)
|
||||||
salePrice int64
|
salePrice int64
|
||||||
|
|||||||
Reference in New Issue
Block a user