package yuehaoxitong import ( "shylinux.com/x/ice" kit "shylinux.com/x/toolkits" "shylinux.com/x/community/src/yuehaoxitong/model" ) type take struct { Schedule take string `name:"take" help:"取号" role:"void"` } func (s take) List(m *ice.Message, arg ...string) { if len(arg) == 1 { s.SelectByStatus(m, kit.Simple(arg[0], SchedulePlan, m.OptionSimple(model.USER_UID))...).PushAction(s.Take) kit.If(m.Length() == 0, func() { m.Echo(m.Trans("not found plan", "没有未取的号")) }) } else if len(arg) == 2 { m.Cmdy(s.Schedule, arg) } } func init() { ice.TeamCtxCmd(take{}) }