gg
This commit is contained in:
@@ -1134,11 +1134,6 @@ func DeleteUserInfo(ctx *jxcontext.Context, userID string) (err error) {
|
|||||||
`
|
`
|
||||||
_, err = dao.ExecuteSQL(db, sql5)
|
_, err = dao.ExecuteSQL(db, sql5)
|
||||||
|
|
||||||
// sql6 := `
|
|
||||||
// DELETE FROM user WHERE user_id=?;
|
|
||||||
// `
|
|
||||||
// _, err = dao.ExecuteSQL(db, sql6)
|
|
||||||
|
|
||||||
//删除token
|
//删除token
|
||||||
tokens, err := api.Cacher.Keys("TOKEN.V2." + userID + "*")
|
tokens, err := api.Cacher.Keys("TOKEN.V2." + userID + "*")
|
||||||
for _, v := range tokens {
|
for _, v := range tokens {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ type IPurchasePlatformOrderHandler interface {
|
|||||||
|
|
||||||
AcceptOrRefuseFailedGetOrder(ctx *jxcontext.Context, order *model.GoodsOrder, isAcceptIt bool) (err error)
|
AcceptOrRefuseFailedGetOrder(ctx *jxcontext.Context, order *model.GoodsOrder, isAcceptIt bool) (err error)
|
||||||
CallCourier(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) // 取货失败后再次招唤平台配送
|
CallCourier(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) // 取货失败后再次招唤平台配送
|
||||||
ConfirmReceiveGoods(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) // 投递失败后确认收到退货123
|
ConfirmReceiveGoods(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) // 投递失败后确认收到退货
|
||||||
|
|
||||||
// 是否可能转商家自送
|
// 是否可能转商家自送
|
||||||
CanSwitch2SelfDeliver(order *model.GoodsOrder) (isCan bool, err error)
|
CanSwitch2SelfDeliver(order *model.GoodsOrder) (isCan bool, err error)
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
package jdshop
|
|
||||||
|
|
||||||
import (
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/jdshopapi"
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
|
||||||
"git.rosy.net.cn/jx-callback/business/partner"
|
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/putils"
|
|
||||||
"reflect"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestPurchaseHandler_GetJdsOrders(t *testing.T) {
|
|
||||||
type fields struct {
|
|
||||||
BasePurchasePlatform partner.BasePurchasePlatform
|
|
||||||
DefSingleStorePlatform putils.DefSingleStorePlatform
|
|
||||||
}
|
|
||||||
type args struct {
|
|
||||||
ctx *jxcontext.Context
|
|
||||||
orderCreatedStart string
|
|
||||||
orderCreatedEnd string
|
|
||||||
current int
|
|
||||||
pageSize int
|
|
||||||
}
|
|
||||||
tests := []struct {
|
|
||||||
name string
|
|
||||||
fields fields
|
|
||||||
args args
|
|
||||||
wantOrderResult *jdshopapi.AllOrdersResult
|
|
||||||
wantErr bool
|
|
||||||
}{
|
|
||||||
// TODO: Add test cases.
|
|
||||||
}
|
|
||||||
for _, tt := range tests {
|
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
|
||||||
p := &PurchaseHandler{
|
|
||||||
BasePurchasePlatform: tt.fields.BasePurchasePlatform,
|
|
||||||
DefSingleStorePlatform: tt.fields.DefSingleStorePlatform,
|
|
||||||
}
|
|
||||||
gotOrderResult, err := p.GetJdsOrders(tt.args.ctx, tt.args.orderCreatedStart, tt.args.orderCreatedEnd, tt.args.current, tt.args.pageSize)
|
|
||||||
if (err != nil) != tt.wantErr {
|
|
||||||
t.Errorf("GetJdsOrders() error = %v, wantErr %v", err, tt.wantErr)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if !reflect.DeepEqual(gotOrderResult, tt.wantOrderResult) {
|
|
||||||
t.Errorf("GetJdsOrders() gotOrderResult = %v, want %v", gotOrderResult, tt.wantOrderResult)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -778,7 +778,8 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
|
|||||||
result2, _ := api.JdEclpAPI.QueryStock(storeSkuBind.EclpID)
|
result2, _ := api.JdEclpAPI.QueryStock(storeSkuBind.EclpID)
|
||||||
if len(result2) > 0 {
|
if len(result2) > 0 {
|
||||||
if result2[0].UsableNum < v.Count {
|
if result2[0].UsableNum < v.Count {
|
||||||
// return nil, nil, fmt.Errorf("此商品库存不足无法购买,请联系管理员!skuID:[%v]", v.SkuID)
|
return
|
||||||
|
// return nil, nil, fmt.Errorf("此商品库存不足无法购买,请联系管理员!skuID:[%v]", v.SkuID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user