【草稿更新时间倒叙排列】【电机转速信息报错处理】
This commit is contained in:
parent
204d9ea182
commit
289c08dc0e
@ -16,7 +16,7 @@ func PageDraftingQuery(query *dto.PageDraftingReqDto) *dto.PageDto {
|
||||
if query.Name != "" {
|
||||
dq = dq.Where(d.Name.Like(fmt.Sprintf("%%%s%%", query.Name)))
|
||||
}
|
||||
records, total, err := dq.Debug().Omit(d.Proto).FindByPage(query.Offset(), query.Size)
|
||||
records, total, err := dq.Debug().Omit(d.Proto).Order(d.UpdateAt.Desc()).FindByPage(query.Offset(), query.Size)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
@ -29,7 +29,7 @@ func ListDraftingQuery(query *dto.ListDraftingReqDto) []*model.Drafting {
|
||||
if query.Type != 0 {
|
||||
dq = dq.Where(d.Type.Eq(query.Type))
|
||||
}
|
||||
records, err := dq.Debug().Omit(d.Proto).Find()
|
||||
records, err := dq.Debug().Omit(d.Proto).Order(d.UpdateAt.Desc()).Find()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
|
@ -54,6 +54,9 @@ func (s *electricalMachineryImpl) Stop() {
|
||||
}
|
||||
|
||||
func (s *electricalMachineryImpl) SendElectricMachineryMessage(info *message.ElectricMachinery) {
|
||||
if s.electricalMachineryUdpClient == nil {
|
||||
return
|
||||
}
|
||||
s.electricalMachineryUdpClient.Send(info.Encode())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user