1234567891011121314151617181920212223242526272829303132333435363738 |
- package time_line
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type CygxGushouTimeLineHistory struct {
- Id int `orm:"column(id);pk"`
- TimeLineId int
- UserId int
- CreateTime time.Time
- Mobile string `description:"手机号"`
- Email string `description:"邮箱"`
- CompanyId int `description:"公司id"`
- CompanyName string `description:"公司名称"`
- ModifyTime time.Time `description:"修改时间"`
- RealName string `description:"用户实际名称"`
- SellerName string `description:"所属销售"`
- }
- // 列表
- func GetCygxGushouTimeLineHistoryList(condition string, pars []interface{}) (items []*CygxGushouTimeLineHistory, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM cygx_gushou_time_line_history as art WHERE 1= 1 `
- if condition != "" {
- sql += condition
- }
- _, err = o.Raw(sql, pars).QueryRows(&items)
- return
- }
- // 添加
- func AddCygxGushouTimeLineHistory(item *CygxGushouTimeLineHistory) (err error) {
- o := orm.NewOrm()
- _, err = o.Insert(item)
- return
- }
|