- 整理partner.ReadStore
This commit is contained in:
@@ -244,8 +244,6 @@ type Store struct {
|
||||
Status int `json:"status"`
|
||||
ChangePriceType int8 `json:"changePriceType"` // 修改价格类型,即是否需要审核
|
||||
|
||||
DeliveryType int8 `orm:"-" json:"deliveryType"` // 仅用于传值
|
||||
|
||||
PrinterDisabled int8 `orm:"default(0)" json:"printerDisabled"` // 是否禁用网络打印机
|
||||
PrinterVendorID int `orm:"column(printer_vendor_id);" json:"printerVendorID"`
|
||||
PrinterSN string `orm:"size(32);column(printer_sn);index" json:"printerSN"`
|
||||
@@ -300,6 +298,23 @@ func (s *Store) IsPrinterDisabled() bool {
|
||||
return s.PrinterDisabled != 0
|
||||
}
|
||||
|
||||
func (s *Store) GetOpTimeList() (opTimeList []int16) {
|
||||
opTimeList = []int16{s.OpenTime1, s.CloseTime1}
|
||||
if s.OpenTime2 != 0 {
|
||||
opTimeList = append(opTimeList, s.OpenTime2, s.CloseTime2)
|
||||
}
|
||||
return opTimeList
|
||||
}
|
||||
|
||||
func (s *Store) SetOpTime(opTimeList []int16) {
|
||||
if len(opTimeList) >= 2 {
|
||||
s.OpenTime1, s.CloseTime1 = opTimeList[0], opTimeList[1]
|
||||
if len(opTimeList) >= 4 {
|
||||
s.OpenTime2, s.CloseTime2 = opTimeList[2], opTimeList[3]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type StoreSub struct {
|
||||
ModelIDCULD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user