12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type CeLueArticleResultApi struct {
- Data []CeLueArticleResultApidate `json:"data"`
- Code int `json:"code"`
- Msg string `json:"msg"`
- Pagination *Pagination `json:"pagination"`
- }
- type CeLueArticleResultApidate struct {
- CelueHistoryId int `json:"id"`
- Mobile string `json:"phone_number"`
- ArticleId string `json:"parameter"`
- CreateDate string `json:"access_time"`
- CrmUser *CrmUser `json:"user"`
- CompanyName *CrmUser `json:"crm_company"`
- }
- type CrmUser struct {
- RealName string `json:"name"`
- }
- type CrmCompany struct {
- CompanyName string `json:"name"`
- }
- func GetCeLueArticleCountById(celueHistoryId int) (count int, err error) {
- o := orm.NewOrm()
- sql := `SELECT COUNT(1) AS count FROM cygx_celue_article_history_record WHERE celue_history_id = ? `
- err = o.Raw(sql, celueHistoryId).QueryRow(&count)
- return
- }
- type CygxCelueArticleHistoryRecord struct {
- Id int `orm:"column(id);pk"`
- ArticleId string `description:"文章ID"`
- CelueHistoryId int `description:"策略平台记录的ID"`
- CreateTime string `description:"本地创建时间"`
- CreateDateApi time.Time `description:"图表创建时间"`
- Mobile string `description:"手机号"`
- CompanyName string `description:"公司名称"`
- RealName string `description:"用户姓名"`
- }
- //新增
- func AddCeLueArticle(item *CygxCelueArticleHistoryRecord) (lastId int64, err error) {
- o := orm.NewOrm()
- lastId, err = o.Insert(item)
- return
- }
|