1
This commit is contained in:
@@ -94,12 +94,18 @@ func UpdateTxdStore(store TxdStore) (err error) {
|
|||||||
errList.AddErr(fmt.Errorf("营业状态:%v", err))
|
errList.AddErr(fmt.Errorf("营业状态:%v", err))
|
||||||
}
|
}
|
||||||
case FlagBusinessTime:
|
case FlagBusinessTime:
|
||||||
|
if len(store.StartTime) == 0 || len(store.EndTime) == 0 {
|
||||||
|
return errors.New("更新营业时间,时间必填")
|
||||||
|
}
|
||||||
if CheckBusinessTime(store.StartTime, store.EndTime) {
|
if CheckBusinessTime(store.StartTime, store.EndTime) {
|
||||||
if err = api.TaoVegetableApi.ShopUpdateInfo(store.TxdStoreID, store.StartTime, store.EndTime); err != nil {
|
if err = api.TaoVegetableApi.ShopUpdateInfo(store.TxdStoreID, store.StartTime, store.EndTime); err != nil {
|
||||||
errList.AddErr(fmt.Errorf("营业时间:%v", err))
|
errList.AddErr(fmt.Errorf("营业时间:%v", err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case FlagRange:
|
case FlagRange:
|
||||||
|
if len(store.Points) == 0 {
|
||||||
|
return errors.New("更新营业范围,坐标必填")
|
||||||
|
}
|
||||||
point := GetPoints(store.Points)
|
point := GetPoints(store.Points)
|
||||||
if err = api.TaoVegetableApi.ShopUpdateRange(store.TxdStoreID, point); err != nil {
|
if err = api.TaoVegetableApi.ShopUpdateRange(store.TxdStoreID, point); err != nil {
|
||||||
errList.AddErr(fmt.Errorf("营业范围:%v", err))
|
errList.AddErr(fmt.Errorf("营业范围:%v", err))
|
||||||
|
|||||||
Reference in New Issue
Block a user