1
This commit is contained in:
@@ -4744,10 +4744,11 @@ func RefreshStoreBind(ctx *jxcontext.Context) (err error) {
|
||||
|
||||
func UpdateVendorStoreBussinessStatus(ctx *jxcontext.Context, storeID int, vendorID []int, status int) (err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
db = dao.GetDB()
|
||||
errList errlist.ErrList
|
||||
)
|
||||
|
||||
errList := make([]string, 0, 0)
|
||||
//errList := make([]string, 0, 0)
|
||||
for _, v := range vendorID {
|
||||
storeDetail, err := dao.GetStoreDetail(db, storeID, v, "")
|
||||
if err != nil {
|
||||
@@ -4762,14 +4763,19 @@ func UpdateVendorStoreBussinessStatus(ctx *jxcontext.Context, storeID int, vendo
|
||||
dao.UpdateEntity(db, storeMaps[0], "IsOnline", "Status")
|
||||
}
|
||||
} else {
|
||||
errList = append(errList, fmt.Sprintf("平台[%d],门店id[%d],错误:%s", v, storeID, err.Error()))
|
||||
errList.AddErr(fmt.Errorf("平台[%d],门店id[%d],错误:%s", v, storeID, err))
|
||||
//errList = append(errList, fmt.Sprintf("平台[%d],门店id[%d],错误:%s", v, storeID, err.Error()))
|
||||
}
|
||||
}
|
||||
|
||||
if len(errList) == model.NO {
|
||||
return nil
|
||||
if errList.GetErrListAsOne() != nil {
|
||||
return errList.GetErrListAsOne()
|
||||
}
|
||||
return fmt.Errorf(strings.Join(errList, ","))
|
||||
return nil
|
||||
//if len(errList) == model.NO {
|
||||
// return nil
|
||||
//}
|
||||
//return fmt.Errorf(strings.Join(errList, ","))
|
||||
}
|
||||
|
||||
type JdPage struct {
|
||||
|
||||
Reference in New Issue
Block a user