This commit is contained in:
suyl
2021-06-03 15:29:18 +08:00
parent d57530a6b1
commit 48be414a4f
2 changed files with 8 additions and 6 deletions

View File

@@ -2,8 +2,10 @@ package cms
import (
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"git.rosy.net.cn/baseapi/platformapi/alipayapi"
"git.rosy.net.cn/baseapi/platformapi/qywxapi"
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/alipay"
"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.LastLoginType != "" && user.LastLoginType == alipay.AuthType {
mobile := ""
mobile := &alipayapi.KeyMobile{}
data, _ := base64.StdEncoding.DecodeString(user.GetMobile())
key, _ := base64.StdEncoding.DecodeString(alipay.AuthKey)
iv := []byte{}
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 {
mobile = string(result)
json.Unmarshal(result, &mobile)
}
user.Mobile = &mobile
user.UserID2 = mobile
user.Name = mobile
user.Mobile = &mobile.Mobile
user.UserID2 = mobile.Mobile
user.Name = mobile.Mobile
}
}
dao.WrapAddIDCULDEntity(user, creatorName)

View File

@@ -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) {
globals.SugarLogger.Debugf("PartRefundOrder jdshop, orderID :%v", order.VendorOrderID)
globals.SugarLogger.Debugf("PartRefundOrder jdshop, order :%v", utils.Format4Output(order, true))
var (
skuMap = make(map[int]*model.OrderSku)
salePrice int64