This commit is contained in:
richboo111
2022-10-24 18:27:00 +08:00
parent 6008e53031
commit b30bdfb587

View File

@@ -121,6 +121,7 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
StoreList: lists,
}
if resp, err := a.BatchCreateStore(ShopBatchCreateStoreParam); err != nil {
globals.SugarLogger.Debug("BatchCreateStore wrong on :%v", ShopBatchCreateStoreParam, err)
return "", err
} else {
if len(resp.ResultList) == 0 {
@@ -128,12 +129,14 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
}
var storeIDs string
for k, v := range resp.ResultList {
globals.SugarLogger.Debug("jhsadfgjhafjgh")
if k != len(resp.ResultList) {
globals.SugarLogger.Debug("defafafaggh")
storeIDs = utils.Int64ToStr(v.Store.StoreId) + ","
}
storeIDs = utils.Int64ToStr(v.Store.StoreId)
}
//storeIDs = utils.Int64ToStr(resp.ResultList[0].Store.StoreId)
globals.SugarLogger.Debug("storeIDs==============", storeIDs, utils.Int64ToStr(resp.ResultList[0].Store.StoreId))
if utils.Str2Int(storeIDs) == 0 {
return "", errors.New(fmt.Sprintf("创建店铺失败,storeIDs = 0:%v,%v", err, resp.ResultList[0].Msg))
}