mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
[优化] 将部分在services中抛出异常使用error返回
This commit is contained in:
@@ -30,8 +30,8 @@ func (p *DeviceCmdLogApi) GetDeviceCmdLogList(rc *restfulx.ReqCtx) {
|
||||
data.State = restfulx.QueryParam(rc, "state")
|
||||
data.Type = restfulx.QueryParam(rc, "type")
|
||||
|
||||
list, total := p.DeviceCmdLogApp.FindListPage(pageNum, pageSize, data)
|
||||
|
||||
list, total, err := p.DeviceCmdLogApp.FindListPage(pageNum, pageSize, data)
|
||||
biz.ErrIsNil(err, "查询告警列表数据失败")
|
||||
rc.ResData = model.ResultPage{
|
||||
Total: total,
|
||||
PageNum: int64(pageNum),
|
||||
@@ -74,5 +74,5 @@ func (p *DeviceCmdLogApi) InsertDeviceCmdLog(rc *restfulx.ReqCtx) {
|
||||
func (p *DeviceCmdLogApi) DeleteDeviceCmdLog(rc *restfulx.ReqCtx) {
|
||||
id := restfulx.PathParam(rc, "id")
|
||||
ids := strings.Split(id, ",")
|
||||
p.DeviceCmdLogApp.Delete(ids)
|
||||
biz.ErrIsNil(p.DeviceCmdLogApp.Delete(ids), "删除指令失败")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user