Browse Source

极光推送

master
huangjiajun 4 days ago
parent
commit
40da9039eb
3 changed files with 3 additions and 2 deletions
  1. +1
    -1
      src/implement/jpush_notice_implement.go
  2. +1
    -1
      src/implement/jpush_record_implement.go
  3. +1
    -0
      src/model/jpush_record.go

+ 1
- 1
src/implement/jpush_notice_implement.go View File

@@ -47,7 +47,7 @@ func (j JpushNoticeDb) FindJpushNoticeAndTotal(page, limit, types string) (*[]mo
if types != "" { if types != "" {
sess.In("type", strings.Split(types, ",")) sess.In("type", strings.Split(types, ","))
} }
count, err := sess.Limit(zhios_order_relate_utils.StrToInt(limit), start).FindAndCount(&m)
count, err := sess.Limit(zhios_order_relate_utils.StrToInt(limit), start).Desc("id").FindAndCount(&m)
if err != nil { if err != nil {
return nil, count, zhios_order_relate_logx.Error(err) return nil, count, zhios_order_relate_logx.Error(err)
} }


+ 1
- 1
src/implement/jpush_record_implement.go View File

@@ -46,7 +46,7 @@ func (j JpushRecordDb) FindJpushRecordAndTotal(page, limit, title string) (*[]mo
if title != "" { if title != "" {
sess.And("title like ?", "%"+title+"%") sess.And("title like ?", "%"+title+"%")
} }
count, err := sess.Limit(zhios_order_relate_utils.StrToInt(limit), start).FindAndCount(&m)
count, err := sess.Limit(zhios_order_relate_utils.StrToInt(limit), start).Desc("id").FindAndCount(&m)
if err != nil { if err != nil {
return nil, count, zhios_order_relate_logx.Error(err) return nil, count, zhios_order_relate_logx.Error(err)
} }


+ 1
- 0
src/model/jpush_record.go View File

@@ -14,6 +14,7 @@ type JpushRecord struct {
Content string `json:"content" xorm:"VARCHAR(255)"` Content string `json:"content" xorm:"VARCHAR(255)"`
Skip string `json:"skip" xorm:"TEXT"` Skip string `json:"skip" xorm:"TEXT"`
SendType int `json:"send_type" xorm:"default 0 INT(1)"` SendType int `json:"send_type" xorm:"default 0 INT(1)"`
State int `json:"state" xorm:"default 0 INT(1)"`
SendStartTime time.Time `json:"send_start_time" xorm:"DATETIME"` SendStartTime time.Time `json:"send_start_time" xorm:"DATETIME"`
SendEndTime time.Time `json:"send_end_time" xorm:"DATETIME"` SendEndTime time.Time `json:"send_end_time" xorm:"DATETIME"`
CreateAt time.Time `json:"create_at" xorm:"DATETIME"` CreateAt time.Time `json:"create_at" xorm:"DATETIME"`


Loading…
Cancel
Save