wangxingcheng 3 éve
szülő
commit
2c7bb34ed8

+ 442 - 0
opms_parent/app/dao/plat/internal/plat_schedule.go

@@ -0,0 +1,442 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"database/sql"
+	"time"
+
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/frame/gmvc"
+
+	"dashoo.cn/micro/app/model/plat"
+)
+
+// PlatScheduleDao is the manager for logic model data accessing
+// and custom defined data operations functions management.
+type PlatScheduleDao struct {
+	gmvc.M
+	DB      gdb.DB
+	Table   string
+	Columns platScheduleColumns
+}
+
+// PlatScheduleColumns defines and stores column names for table plat_schedule.
+type platScheduleColumns struct {
+	Id          string // 主键
+	SchTitle    string // 标题
+	SchContent  string // 内容
+	SchDate     string // 日期
+	UserId      string // 关联用户
+	UserName    string // 用户姓名
+	BizType     string // 关联业务类型
+	BizBillId   string // 关联业务单据
+	Remark      string // 备注
+	CreatedBy   string // 创建者
+	CreatedName string // 创建人
+	CreatedTime string // 创建时间
+	UpdatedBy   string // 更新者
+	UpdatedName string // 更新人
+	UpdatedTime string // 更新时间
+	DeletedTime string // 删除时间
+}
+
+var (
+	// PlatSchedule is globally public accessible object for table plat_schedule operations.
+	PlatSchedule = PlatScheduleDao{
+		M:     g.DB("default").Model("plat_schedule").Safe(),
+		DB:    g.DB("default"),
+		Table: "plat_schedule",
+		Columns: platScheduleColumns{
+			Id:          "id",
+			SchTitle:    "sch_title",
+			SchContent:  "sch_ content",
+			SchDate:     "sch_ date",
+			UserId:      "user_id",
+			UserName:    "user_name",
+			BizType:     "biz_type",
+			BizBillId:   "biz_bill_id",
+			Remark:      "remark",
+			CreatedBy:   "created_by",
+			CreatedName: "created_name",
+			CreatedTime: "created_time",
+			UpdatedBy:   "updated_by",
+			UpdatedName: "updated_name",
+			UpdatedTime: "updated_time",
+			DeletedTime: "deleted_time",
+		},
+	}
+)
+
+func NewPlatScheduleDao(tenant string) PlatScheduleDao {
+	var dao PlatScheduleDao
+	dao = PlatScheduleDao{
+		M:     g.DB(tenant).Model("plat_schedule").Safe(),
+		DB:    g.DB(tenant),
+		Table: "plat_schedule",
+		Columns: platScheduleColumns{
+			Id:          "id",
+			SchTitle:    "sch_title",
+			SchContent:  "sch_ content",
+			SchDate:     "sch_ date",
+			UserId:      "user_id",
+			UserName:    "user_name",
+			BizType:     "biz_type",
+			BizBillId:   "biz_bill_id",
+			Remark:      "remark",
+			CreatedBy:   "created_by",
+			CreatedName: "created_name",
+			CreatedTime: "created_time",
+			UpdatedBy:   "updated_by",
+			UpdatedName: "updated_name",
+			UpdatedTime: "updated_time",
+			DeletedTime: "deleted_time",
+		},
+	}
+	return dao
+}
+
+// Ctx is a chaining function, which creates and returns a new DB that is a shallow copy
+// of current DB object and with given context in it.
+// Note that this returned DB object can be used only once, so do not assign it to
+// a global or package variable for long using.
+func (d *PlatScheduleDao) Ctx(ctx context.Context) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Ctx(ctx)}
+}
+
+// As sets an alias name for current table.
+func (d *PlatScheduleDao) As(as string) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.As(as)}
+}
+
+// TX sets the transaction for current operation.
+func (d *PlatScheduleDao) TX(tx *gdb.TX) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.TX(tx)}
+}
+
+// Master marks the following operation on master node.
+func (d *PlatScheduleDao) Master() *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Master()}
+}
+
+// Slave marks the following operation on slave node.
+// Note that it makes sense only if there's any slave node configured.
+func (d *PlatScheduleDao) Slave() *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Slave()}
+}
+
+// Args sets custom arguments for model operation.
+func (d *PlatScheduleDao) Args(args ...interface{}) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Args(args...)}
+}
+
+// LeftJoin does "LEFT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").LeftJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").LeftJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *PlatScheduleDao) LeftJoin(table ...string) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.LeftJoin(table...)}
+}
+
+// RightJoin does "RIGHT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").RightJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").RightJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *PlatScheduleDao) RightJoin(table ...string) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.RightJoin(table...)}
+}
+
+// InnerJoin does "INNER JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").InnerJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").InnerJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *PlatScheduleDao) InnerJoin(table ...string) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.InnerJoin(table...)}
+}
+
+// Fields sets the operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *PlatScheduleDao) Fields(fieldNamesOrMapStruct ...interface{}) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Fields(fieldNamesOrMapStruct...)}
+}
+
+// FieldsEx sets the excluded operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *PlatScheduleDao) FieldsEx(fieldNamesOrMapStruct ...interface{}) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.FieldsEx(fieldNamesOrMapStruct...)}
+}
+
+// Option sets the extra operation option for the model.
+func (d *PlatScheduleDao) Option(option int) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Option(option)}
+}
+
+// OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
+// the data and where attributes for empty values.
+func (d *PlatScheduleDao) OmitEmpty() *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.OmitEmpty()}
+}
+
+// Filter marks filtering the fields which does not exist in the fields of the operated table.
+func (d *PlatScheduleDao) Filter() *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Filter()}
+}
+
+// Where sets the condition statement for the model. The parameter <where> can be type of
+// string/map/gmap/slice/struct/*struct, etc. Note that, if it's called more than one times,
+// multiple conditions will be joined into where statement using "AND".
+// Eg:
+// Where("uid=10000")
+// Where("uid", 10000)
+// Where("money>? AND name like ?", 99999, "vip_%")
+// Where("uid", 1).Where("name", "john")
+// Where("status IN (?)", g.Slice{1,2,3})
+// Where("age IN(?,?)", 18, 50)
+// Where(User{ Id : 1, UserName : "john"})
+func (d *PlatScheduleDao) Where(where interface{}, args ...interface{}) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Where(where, args...)}
+}
+
+// WherePri does the same logic as M.Where except that if the parameter <where>
+// is a single condition like int/string/float/slice, it treats the condition as the primary
+// key value. That is, if primary key is "id" and given <where> parameter as "123", the
+// WherePri function treats the condition as "id=123", but M.Where treats the condition
+// as string "123".
+func (d *PlatScheduleDao) WherePri(where interface{}, args ...interface{}) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.WherePri(where, args...)}
+}
+
+// And adds "AND" condition to the where statement.
+func (d *PlatScheduleDao) And(where interface{}, args ...interface{}) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.And(where, args...)}
+}
+
+// Or adds "OR" condition to the where statement.
+func (d *PlatScheduleDao) Or(where interface{}, args ...interface{}) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Or(where, args...)}
+}
+
+// Group sets the "GROUP BY" statement for the model.
+func (d *PlatScheduleDao) Group(groupBy string) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Group(groupBy)}
+}
+
+// Order sets the "ORDER BY" statement for the model.
+func (d *PlatScheduleDao) Order(orderBy ...string) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Order(orderBy...)}
+}
+
+// Limit sets the "LIMIT" statement for the model.
+// The parameter <limit> can be either one or two number, if passed two number is passed,
+// it then sets "LIMIT limit[0],limit[1]" statement for the model, or else it sets "LIMIT limit[0]"
+// statement.
+func (d *PlatScheduleDao) Limit(limit ...int) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Limit(limit...)}
+}
+
+// Offset sets the "OFFSET" statement for the model.
+// It only makes sense for some databases like SQLServer, PostgreSQL, etc.
+func (d *PlatScheduleDao) Offset(offset int) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Offset(offset)}
+}
+
+// Page sets the paging number for the model.
+// The parameter <page> is started from 1 for paging.
+// Note that, it differs that the Limit function start from 0 for "LIMIT" statement.
+func (d *PlatScheduleDao) Page(page, limit int) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Page(page, limit)}
+}
+
+// Batch sets the batch operation number for the model.
+func (d *PlatScheduleDao) Batch(batch int) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Batch(batch)}
+}
+
+// Cache sets the cache feature for the model. It caches the result of the sql, which means
+// if there's another same sql request, it just reads and returns the result from cache, it
+// but not committed and executed into the database.
+//
+// If the parameter <duration> < 0, which means it clear the cache with given <name>.
+// If the parameter <duration> = 0, which means it never expires.
+// If the parameter <duration> > 0, which means it expires after <duration>.
+//
+// The optional parameter <name> is used to bind a name to the cache, which means you can later
+// control the cache like changing the <duration> or clearing the cache with specified <name>.
+//
+// Note that, the cache feature is disabled if the model is operating on a transaction.
+func (d *PlatScheduleDao) Cache(duration time.Duration, name ...string) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Cache(duration, name...)}
+}
+
+// Data sets the operation data for the model.
+// The parameter <data> can be type of string/map/gmap/slice/struct/*struct, etc.
+// Eg:
+// Data("uid=10000")
+// Data("uid", 10000)
+// Data(g.Map{"uid": 10000, "name":"john"})
+// Data(g.Slice{g.Map{"uid": 10000, "name":"john"}, g.Map{"uid": 20000, "name":"smith"})
+func (d *PlatScheduleDao) Data(data ...interface{}) *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Data(data...)}
+}
+
+// All does "SELECT FROM ..." statement for the model.
+// It retrieves the records from table and returns the result as []*model.PlatSchedule.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *PlatScheduleDao) All(where ...interface{}) ([]*plat.PlatSchedule, error) {
+	all, err := d.M.All(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*plat.PlatSchedule
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// One retrieves one record from table and returns the result as *model.PlatSchedule.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *PlatScheduleDao) One(where ...interface{}) (*plat.PlatSchedule, error) {
+	one, err := d.M.One(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *plat.PlatSchedule
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindOne retrieves and returns a single Record by M.WherePri and M.One.
+// Also see M.WherePri and M.One.
+func (d *PlatScheduleDao) FindOne(where ...interface{}) (*plat.PlatSchedule, error) {
+	one, err := d.M.FindOne(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *plat.PlatSchedule
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindAll retrieves and returns Result by by M.WherePri and M.All.
+// Also see M.WherePri and M.All.
+func (d *PlatScheduleDao) FindAll(where ...interface{}) ([]*plat.PlatSchedule, error) {
+	all, err := d.M.FindAll(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*plat.PlatSchedule
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// Struct retrieves one record from table and converts it into given struct.
+// The parameter <pointer> should be type of *struct/**struct. If type **struct is given,
+// it can create the struct internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not nil.
+//
+// Eg:
+// user := new(User)
+// err  := dao.User.Where("id", 1).Struct(user)
+//
+// user := (*User)(nil)
+// err  := dao.User.Where("id", 1).Struct(&user)
+func (d *PlatScheduleDao) Struct(pointer interface{}, where ...interface{}) error {
+	return d.M.Struct(pointer, where...)
+}
+
+// Structs retrieves records from table and converts them into given struct slice.
+// The parameter <pointer> should be type of *[]struct/*[]*struct. It can create and fill the struct
+// slice internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not empty.
+//
+// Eg:
+// users := ([]User)(nil)
+// err   := dao.User.Structs(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Structs(&users)
+func (d *PlatScheduleDao) Structs(pointer interface{}, where ...interface{}) error {
+	return d.M.Structs(pointer, where...)
+}
+
+// Scan automatically calls Struct or Structs function according to the type of parameter <pointer>.
+// It calls function Struct if <pointer> is type of *struct/**struct.
+// It calls function Structs if <pointer> is type of *[]struct/*[]*struct.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved and given pointer is not empty or nil.
+//
+// Eg:
+// user  := new(User)
+// err   := dao.User.Where("id", 1).Scan(user)
+//
+// user  := (*User)(nil)
+// err   := dao.User.Where("id", 1).Scan(&user)
+//
+// users := ([]User)(nil)
+// err   := dao.User.Scan(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Scan(&users)
+func (d *PlatScheduleDao) Scan(pointer interface{}, where ...interface{}) error {
+	return d.M.Scan(pointer, where...)
+}
+
+// Chunk iterates the table with given size and callback function.
+func (d *PlatScheduleDao) Chunk(limit int, callback func(entities []*plat.PlatSchedule, err error) bool) {
+	d.M.Chunk(limit, func(result gdb.Result, err error) bool {
+		var entities []*plat.PlatSchedule
+		err = result.Structs(&entities)
+		if err == sql.ErrNoRows {
+			return false
+		}
+		return callback(entities, err)
+	})
+}
+
+// LockUpdate sets the lock for update for current operation.
+func (d *PlatScheduleDao) LockUpdate() *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.LockUpdate()}
+}
+
+// LockShared sets the lock in share mode for current operation.
+func (d *PlatScheduleDao) LockShared() *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.LockShared()}
+}
+
+// Unscoped enables/disables the soft deleting feature.
+func (d *PlatScheduleDao) Unscoped() *PlatScheduleDao {
+	return &PlatScheduleDao{M: d.M.Unscoped()}
+}

+ 439 - 0
opms_parent/app/dao/plat/internal/plat_schedule_remind.go

@@ -0,0 +1,439 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"database/sql"
+	"time"
+
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/frame/gmvc"
+
+	"dashoo.cn/micro/app/model/plat"
+)
+
+// PlatScheduleRemindDao is the manager for logic model data accessing
+// and custom defined data operations functions management.
+type PlatScheduleRemindDao struct {
+	gmvc.M
+	DB      gdb.DB
+	Table   string
+	Columns platScheduleRemindColumns
+}
+
+// PlatScheduleRemindColumns defines and stores column names for table plat_schedule_remind.
+type platScheduleRemindColumns struct {
+	Id          string // 主键
+	SchId       string // 日程ID
+	RidDate     string // 提醒时间
+	RidMode     string // 提醒方式
+	IsLoop      string // 是否循环
+	CycleType   string // 周期类型
+	CycleSetup  string // 周期设置
+	Remark      string // 备注
+	CreatedBy   string // 创建者
+	CreatedName string // 创建人
+	CreatedTime string // 创建时间
+	UpdatedBy   string // 更新者
+	UpdatedName string // 更新人
+	UpdatedTime string // 更新时间
+	DeletedTime string // 删除时间
+}
+
+var (
+	// PlatScheduleRemind is globally public accessible object for table plat_schedule_remind operations.
+	PlatScheduleRemind = PlatScheduleRemindDao{
+		M:     g.DB("default").Model("plat_schedule_remind").Safe(),
+		DB:    g.DB("default"),
+		Table: "plat_schedule_remind",
+		Columns: platScheduleRemindColumns{
+			Id:          "id",
+			SchId:       "sch_id",
+			RidDate:     "rid_date",
+			RidMode:     "rid_mode",
+			IsLoop:      "is_loop",
+			CycleType:   "cycle_type",
+			CycleSetup:  "cycle_setup",
+			Remark:      "remark",
+			CreatedBy:   "created_by",
+			CreatedName: "created_name",
+			CreatedTime: "created_time",
+			UpdatedBy:   "updated_by",
+			UpdatedName: "updated_name",
+			UpdatedTime: "updated_time",
+			DeletedTime: "deleted_time",
+		},
+	}
+)
+
+func NewPlatScheduleRemindDao(tenant string) PlatScheduleRemindDao {
+	var dao PlatScheduleRemindDao
+	dao = PlatScheduleRemindDao{
+		M:     g.DB(tenant).Model("plat_schedule_remind").Safe(),
+		DB:    g.DB(tenant),
+		Table: "plat_schedule_remind",
+		Columns: platScheduleRemindColumns{
+			Id:          "id",
+			SchId:       "sch_id",
+			RidDate:     "rid_date",
+			RidMode:     "rid_mode",
+			IsLoop:      "is_loop",
+			CycleType:   "cycle_type",
+			CycleSetup:  "cycle_setup",
+			Remark:      "remark",
+			CreatedBy:   "created_by",
+			CreatedName: "created_name",
+			CreatedTime: "created_time",
+			UpdatedBy:   "updated_by",
+			UpdatedName: "updated_name",
+			UpdatedTime: "updated_time",
+			DeletedTime: "deleted_time",
+		},
+	}
+	return dao
+}
+
+// Ctx is a chaining function, which creates and returns a new DB that is a shallow copy
+// of current DB object and with given context in it.
+// Note that this returned DB object can be used only once, so do not assign it to
+// a global or package variable for long using.
+func (d *PlatScheduleRemindDao) Ctx(ctx context.Context) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Ctx(ctx)}
+}
+
+// As sets an alias name for current table.
+func (d *PlatScheduleRemindDao) As(as string) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.As(as)}
+}
+
+// TX sets the transaction for current operation.
+func (d *PlatScheduleRemindDao) TX(tx *gdb.TX) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.TX(tx)}
+}
+
+// Master marks the following operation on master node.
+func (d *PlatScheduleRemindDao) Master() *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Master()}
+}
+
+// Slave marks the following operation on slave node.
+// Note that it makes sense only if there's any slave node configured.
+func (d *PlatScheduleRemindDao) Slave() *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Slave()}
+}
+
+// Args sets custom arguments for model operation.
+func (d *PlatScheduleRemindDao) Args(args ...interface{}) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Args(args...)}
+}
+
+// LeftJoin does "LEFT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").LeftJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").LeftJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *PlatScheduleRemindDao) LeftJoin(table ...string) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.LeftJoin(table...)}
+}
+
+// RightJoin does "RIGHT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").RightJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").RightJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *PlatScheduleRemindDao) RightJoin(table ...string) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.RightJoin(table...)}
+}
+
+// InnerJoin does "INNER JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").InnerJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").InnerJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *PlatScheduleRemindDao) InnerJoin(table ...string) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.InnerJoin(table...)}
+}
+
+// Fields sets the operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *PlatScheduleRemindDao) Fields(fieldNamesOrMapStruct ...interface{}) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Fields(fieldNamesOrMapStruct...)}
+}
+
+// FieldsEx sets the excluded operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *PlatScheduleRemindDao) FieldsEx(fieldNamesOrMapStruct ...interface{}) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.FieldsEx(fieldNamesOrMapStruct...)}
+}
+
+// Option sets the extra operation option for the model.
+func (d *PlatScheduleRemindDao) Option(option int) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Option(option)}
+}
+
+// OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
+// the data and where attributes for empty values.
+func (d *PlatScheduleRemindDao) OmitEmpty() *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.OmitEmpty()}
+}
+
+// Filter marks filtering the fields which does not exist in the fields of the operated table.
+func (d *PlatScheduleRemindDao) Filter() *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Filter()}
+}
+
+// Where sets the condition statement for the model. The parameter <where> can be type of
+// string/map/gmap/slice/struct/*struct, etc. Note that, if it's called more than one times,
+// multiple conditions will be joined into where statement using "AND".
+// Eg:
+// Where("uid=10000")
+// Where("uid", 10000)
+// Where("money>? AND name like ?", 99999, "vip_%")
+// Where("uid", 1).Where("name", "john")
+// Where("status IN (?)", g.Slice{1,2,3})
+// Where("age IN(?,?)", 18, 50)
+// Where(User{ Id : 1, UserName : "john"})
+func (d *PlatScheduleRemindDao) Where(where interface{}, args ...interface{}) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Where(where, args...)}
+}
+
+// WherePri does the same logic as M.Where except that if the parameter <where>
+// is a single condition like int/string/float/slice, it treats the condition as the primary
+// key value. That is, if primary key is "id" and given <where> parameter as "123", the
+// WherePri function treats the condition as "id=123", but M.Where treats the condition
+// as string "123".
+func (d *PlatScheduleRemindDao) WherePri(where interface{}, args ...interface{}) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.WherePri(where, args...)}
+}
+
+// And adds "AND" condition to the where statement.
+func (d *PlatScheduleRemindDao) And(where interface{}, args ...interface{}) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.And(where, args...)}
+}
+
+// Or adds "OR" condition to the where statement.
+func (d *PlatScheduleRemindDao) Or(where interface{}, args ...interface{}) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Or(where, args...)}
+}
+
+// Group sets the "GROUP BY" statement for the model.
+func (d *PlatScheduleRemindDao) Group(groupBy string) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Group(groupBy)}
+}
+
+// Order sets the "ORDER BY" statement for the model.
+func (d *PlatScheduleRemindDao) Order(orderBy ...string) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Order(orderBy...)}
+}
+
+// Limit sets the "LIMIT" statement for the model.
+// The parameter <limit> can be either one or two number, if passed two number is passed,
+// it then sets "LIMIT limit[0],limit[1]" statement for the model, or else it sets "LIMIT limit[0]"
+// statement.
+func (d *PlatScheduleRemindDao) Limit(limit ...int) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Limit(limit...)}
+}
+
+// Offset sets the "OFFSET" statement for the model.
+// It only makes sense for some databases like SQLServer, PostgreSQL, etc.
+func (d *PlatScheduleRemindDao) Offset(offset int) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Offset(offset)}
+}
+
+// Page sets the paging number for the model.
+// The parameter <page> is started from 1 for paging.
+// Note that, it differs that the Limit function start from 0 for "LIMIT" statement.
+func (d *PlatScheduleRemindDao) Page(page, limit int) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Page(page, limit)}
+}
+
+// Batch sets the batch operation number for the model.
+func (d *PlatScheduleRemindDao) Batch(batch int) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Batch(batch)}
+}
+
+// Cache sets the cache feature for the model. It caches the result of the sql, which means
+// if there's another same sql request, it just reads and returns the result from cache, it
+// but not committed and executed into the database.
+//
+// If the parameter <duration> < 0, which means it clear the cache with given <name>.
+// If the parameter <duration> = 0, which means it never expires.
+// If the parameter <duration> > 0, which means it expires after <duration>.
+//
+// The optional parameter <name> is used to bind a name to the cache, which means you can later
+// control the cache like changing the <duration> or clearing the cache with specified <name>.
+//
+// Note that, the cache feature is disabled if the model is operating on a transaction.
+func (d *PlatScheduleRemindDao) Cache(duration time.Duration, name ...string) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Cache(duration, name...)}
+}
+
+// Data sets the operation data for the model.
+// The parameter <data> can be type of string/map/gmap/slice/struct/*struct, etc.
+// Eg:
+// Data("uid=10000")
+// Data("uid", 10000)
+// Data(g.Map{"uid": 10000, "name":"john"})
+// Data(g.Slice{g.Map{"uid": 10000, "name":"john"}, g.Map{"uid": 20000, "name":"smith"})
+func (d *PlatScheduleRemindDao) Data(data ...interface{}) *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Data(data...)}
+}
+
+// All does "SELECT FROM ..." statement for the model.
+// It retrieves the records from table and returns the result as []*model.PlatScheduleRemind.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *PlatScheduleRemindDao) All(where ...interface{}) ([]*plat.PlatScheduleRemind, error) {
+	all, err := d.M.All(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*plat.PlatScheduleRemind
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// One retrieves one record from table and returns the result as *model.PlatScheduleRemind.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *PlatScheduleRemindDao) One(where ...interface{}) (*plat.PlatScheduleRemind, error) {
+	one, err := d.M.One(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *plat.PlatScheduleRemind
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindOne retrieves and returns a single Record by M.WherePri and M.One.
+// Also see M.WherePri and M.One.
+func (d *PlatScheduleRemindDao) FindOne(where ...interface{}) (*plat.PlatScheduleRemind, error) {
+	one, err := d.M.FindOne(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *plat.PlatScheduleRemind
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindAll retrieves and returns Result by by M.WherePri and M.All.
+// Also see M.WherePri and M.All.
+func (d *PlatScheduleRemindDao) FindAll(where ...interface{}) ([]*plat.PlatScheduleRemind, error) {
+	all, err := d.M.FindAll(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*plat.PlatScheduleRemind
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// Struct retrieves one record from table and converts it into given struct.
+// The parameter <pointer> should be type of *struct/**struct. If type **struct is given,
+// it can create the struct internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not nil.
+//
+// Eg:
+// user := new(User)
+// err  := dao.User.Where("id", 1).Struct(user)
+//
+// user := (*User)(nil)
+// err  := dao.User.Where("id", 1).Struct(&user)
+func (d *PlatScheduleRemindDao) Struct(pointer interface{}, where ...interface{}) error {
+	return d.M.Struct(pointer, where...)
+}
+
+// Structs retrieves records from table and converts them into given struct slice.
+// The parameter <pointer> should be type of *[]struct/*[]*struct. It can create and fill the struct
+// slice internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not empty.
+//
+// Eg:
+// users := ([]User)(nil)
+// err   := dao.User.Structs(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Structs(&users)
+func (d *PlatScheduleRemindDao) Structs(pointer interface{}, where ...interface{}) error {
+	return d.M.Structs(pointer, where...)
+}
+
+// Scan automatically calls Struct or Structs function according to the type of parameter <pointer>.
+// It calls function Struct if <pointer> is type of *struct/**struct.
+// It calls function Structs if <pointer> is type of *[]struct/*[]*struct.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved and given pointer is not empty or nil.
+//
+// Eg:
+// user  := new(User)
+// err   := dao.User.Where("id", 1).Scan(user)
+//
+// user  := (*User)(nil)
+// err   := dao.User.Where("id", 1).Scan(&user)
+//
+// users := ([]User)(nil)
+// err   := dao.User.Scan(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Scan(&users)
+func (d *PlatScheduleRemindDao) Scan(pointer interface{}, where ...interface{}) error {
+	return d.M.Scan(pointer, where...)
+}
+
+// Chunk iterates the table with given size and callback function.
+func (d *PlatScheduleRemindDao) Chunk(limit int, callback func(entities []*plat.PlatScheduleRemind, err error) bool) {
+	d.M.Chunk(limit, func(result gdb.Result, err error) bool {
+		var entities []*plat.PlatScheduleRemind
+		err = result.Structs(&entities)
+		if err == sql.ErrNoRows {
+			return false
+		}
+		return callback(entities, err)
+	})
+}
+
+// LockUpdate sets the lock for update for current operation.
+func (d *PlatScheduleRemindDao) LockUpdate() *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.LockUpdate()}
+}
+
+// LockShared sets the lock in share mode for current operation.
+func (d *PlatScheduleRemindDao) LockShared() *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.LockShared()}
+}
+
+// Unscoped enables/disables the soft deleting feature.
+func (d *PlatScheduleRemindDao) Unscoped() *PlatScheduleRemindDao {
+	return &PlatScheduleRemindDao{M: d.M.Unscoped()}
+}

+ 36 - 0
opms_parent/app/dao/plat/plat_schedule.go

@@ -0,0 +1,36 @@
+// ============================================================================
+// This is auto-generated by gf cli tool only once. Fill this file as you wish.
+// ============================================================================
+
+package plat
+
+import (
+	"dashoo.cn/micro/app/dao/plat/internal"
+)
+
+// platScheduleDao is the manager for logic model data accessing
+// and custom defined data operations functions management. You can define
+// methods on it to extend its functionality as you wish.
+type platScheduleDao struct {
+	internal.PlatScheduleDao
+}
+
+var (
+	// PlatSchedule is globally public accessible object for table plat_schedule operations.
+	PlatSchedule = platScheduleDao{
+		internal.PlatSchedule,
+	}
+)
+
+type PlatScheduleDao struct {
+	internal.PlatScheduleDao
+}
+
+func NewPlatScheduleDao(tenant string) *PlatScheduleDao {
+	dao := internal.NewPlatScheduleDao(tenant)
+	return &PlatScheduleDao{
+		dao,
+	}
+}
+
+// Fill with you ideas below.

+ 36 - 0
opms_parent/app/dao/plat/plat_schedule_remind.go

@@ -0,0 +1,36 @@
+// ============================================================================
+// This is auto-generated by gf cli tool only once. Fill this file as you wish.
+// ============================================================================
+
+package plat
+
+import (
+	"dashoo.cn/micro/app/dao/plat/internal"
+)
+
+// platScheduleRemindDao is the manager for logic model data accessing
+// and custom defined data operations functions management. You can define
+// methods on it to extend its functionality as you wish.
+type platScheduleRemindDao struct {
+	internal.PlatScheduleRemindDao
+}
+
+var (
+	// PlatScheduleRemind is globally public accessible object for table plat_schedule_remind operations.
+	PlatScheduleRemind = platScheduleRemindDao{
+		internal.PlatScheduleRemind,
+	}
+)
+
+type PlatScheduleRemindDao struct {
+	internal.PlatScheduleRemindDao
+}
+
+func NewPlatScheduleRemindDao(tenant string) *PlatScheduleRemindDao {
+	dao := internal.NewPlatScheduleRemindDao(tenant)
+	return &PlatScheduleRemindDao{
+		dao,
+	}
+}
+
+// Fill with you ideas below.

+ 51 - 0
opms_parent/app/handler/plat/schedule.go

@@ -0,0 +1,51 @@
+package plat
+
+import (
+	"context"
+
+	"dashoo.cn/common_definition/comm_def"
+	"dashoo.cn/opms_libary/myerrors"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/util/gvalid"
+
+	model "dashoo.cn/micro/app/model/plat"
+	server "dashoo.cn/micro/app/service/plat"
+)
+
+type ScheduleHeader struct{}
+
+//GetList 日程列表
+func (h *ScheduleHeader) GetList(ctx context.Context, req *model.ScheduleSearchReq, rsp *comm_def.CommonMsg) error {
+	s, err := server.NewScheduleService(ctx)
+	if err != nil {
+		return err
+	}
+	total, list, err := s.GetList(req)
+	_, err, rsp.Code, rsp.Msg = myerrors.CheckError(err)
+	if err != nil {
+		return err
+	}
+	rsp.Data = g.Map{"list": list, "total": total}
+	return nil
+
+}
+
+//Create 创建日程
+func (h *ScheduleHeader) Create(ctx context.Context, req *model.AddScheduleSeq, rsp *comm_def.CommonMsg) error {
+	if err := gvalid.CheckStruct(ctx, req, nil); err != nil {
+		return err
+	}
+	s, err := server.NewScheduleService(ctx)
+	if err != nil {
+		return err
+	}
+	id, err := s.Create(req)
+	_, err, rsp.Code, rsp.Msg = myerrors.CheckError(err)
+	if err != nil {
+
+		return err
+	}
+	rsp.Data = g.Map{"lastId": id}
+	return nil
+
+}

+ 69 - 0
opms_parent/app/service/plat/plat_schedule.go

@@ -0,0 +1,69 @@
+package plat
+
+import (
+	"context"
+	"strings"
+
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/util/gconv"
+
+	"dashoo.cn/micro/app/dao/plat"
+	model "dashoo.cn/micro/app/model/plat"
+	"dashoo.cn/micro/app/service"
+)
+
+type scheduleService struct {
+	*service.ContextService
+
+	Dao *plat.PlatScheduleDao
+}
+
+func NewScheduleService(ctx context.Context) (svc *scheduleService, err error) {
+	svc = new(scheduleService)
+	if svc.ContextService, err = svc.Init(ctx); err != nil {
+		return nil, err
+	}
+	svc.Dao = plat.NewPlatScheduleDao(svc.Tenant)
+	return svc, nil
+}
+
+//GetList 日程列表
+func (s *scheduleService) GetList(req *model.ScheduleSearchReq) (total int, scheduleList []*model.GetScheduleRes, err error) {
+	Model := s.Dao.M
+	Model = Model.Where("user_id = ", s.GetCxtUserId())
+	if req.SchDate != nil {
+		schDate := gconv.String(req.SchDate)
+		begin := strings.Split(schDate, " ")[0] + " 00:00:00"
+		end := strings.Split(schDate, " ")[0] + " 23:59:59"
+		Model = Model.Where("sch_date >= ? AND sch_date <= ? ", begin, end)
+	}
+	total, err = Model.Count()
+	if err != nil {
+		g.Log().Error(err)
+		return
+	}
+	err = Model.Page(req.GetPage()).Order("id desc").Scan(&scheduleList)
+	if err != nil {
+		g.Log().Error(err)
+		return
+	}
+	return
+}
+
+//Create 创建日程信息
+func (s *scheduleService) Create(req *model.AddScheduleSeq) (insertId int64, err error) {
+	schedule := new(model.PlatSchedule)
+	if err = gconv.Struct(req, schedule); err != nil {
+		return
+	}
+	service.SetCreatedInfo(schedule, s.GetCxtUserId(), s.GetCxtUserName())
+	schedule.UserId = s.GetCxtUserId()
+	schedule.UserName = s.GetCxtUserName()
+	insertId, err = s.Dao.InsertAndGetId(schedule)
+	if err != nil {
+		g.Log().Error(err)
+		return 0, err
+	}
+	return
+
+}

+ 2 - 0
opms_parent/main.go

@@ -48,6 +48,8 @@ func main() {
 	s.RegisterName("CtrContractAppend", new(contract.CtrContractAppend), "")
 	s.RegisterName("CtrContractInvoice", new(contract.CtrContractInvoice), "")
 
+	s.RegisterName("Schedule", new(plat.ScheduleHeader), "")
+
 	// 注册服务对象
 	//s.RegisterName("Auth", new(handler.Auth), "")