@@ -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) | ||||
} | } | ||||
@@ -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) | ||||
} | } | ||||
@@ -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"` | ||||