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