mirror of
https://shylinux.com/x/community
synced 2025-05-07 06:26:54 +08:00
37 lines
1.0 KiB
Go
37 lines
1.0 KiB
Go
package yuehaoxitong
|
|
|
|
import (
|
|
"shylinux.com/x/ice"
|
|
|
|
"shylinux.com/x/community/src/yuehaoxitong/model"
|
|
)
|
|
|
|
type volume struct {
|
|
Table
|
|
reception reception
|
|
portal string `data:"true"`
|
|
}
|
|
|
|
func (s volume) List(m *ice.Message, arg ...string) {
|
|
if len(arg) == 0 {
|
|
if m.Option(model.RECEPTION_UID) != "" {
|
|
s.Fields(m, model.UID, model.BEGIN_TIME, model.END_TIME, model.AMOUNT, model.COUNT)
|
|
s.Select(m, m.OptionSimple(model.QUEUE_UID, model.RECEPTION_UID)...)
|
|
}
|
|
} else if len(arg) == 1 {
|
|
s.Tables(m, s.reception).FieldsWithCreatedAT(m, s,
|
|
model.RECEPTION_NAME, model.AMOUNT, model.COUNT,
|
|
model.EXPIRE, model.FINISH,
|
|
model.BEGIN_TIME, model.END_TIME,
|
|
)
|
|
s.Select(m, s.Key(s, model.QUEUE_UID), arg[0])
|
|
} else if len(arg) == 2 {
|
|
s.Fields(m, model.CREATED_AT, model.UID, model.USER_UID, s.AS(model.STATUS, model.SCHEDULE_STATUS))
|
|
m.Cmdy(schedule{}, s.Select, "volume_uid = ? and status != ?", arg[1], ScheduleCancel)
|
|
s.SelectJoinUser(m)
|
|
s.RewriteAppend(m)
|
|
}
|
|
}
|
|
|
|
func init() { ice.TeamCtxCmd(volume{}) }
|