|
|
@ -63,7 +63,7 @@ func TerminalUpdateGet(req *request.TerminalUpdateGet, boxID string) (err error, |
|
|
|
return errors.New("未找到盒子"), nil |
|
|
|
} |
|
|
|
//查询最新固件
|
|
|
|
global.MG_DB.Where("status = ? and source=?", 1, terminal.Source).Order("id desc").First(&firmware) |
|
|
|
global.MG_DB.Where("status = ? and source=? and type=?", 1, terminal.Source, req.Data.Type).Order("id desc").First(&firmware) |
|
|
|
if terminal.Ver == firmware.Ver { |
|
|
|
return errors.New("已是最新版本"), nil |
|
|
|
} |
|
|
|