You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
932 B

package user
import (
"yunyan/comm"
"yunyan/pb"
)
// @Summary 获取产品固件版本列表
// @Description 获取产品对应的所有固件版本
// @Tags User
// @Accept json
// @Produce json
// @Security BearerAuth
// @Param user body pb.UserGetProductVersionsReq true "获取产品固件版本列表"
// @Success 200 {object} comm.HttpResult{data=pb.UserGetProductVersionsResp} "成功返回"
// @Router /api/home/user_getproductversions [post]
func (this *apiComp) GetProductVersions(session comm.IUserSession, req *pb.UserGetProductVersionsReq) (resp *pb.UserGetProductVersionsResp, errdata *pb.ErrorData) {
var (
models []*pb.DBProductVersion
err error
)
if models, err = this.module.model.getProductVersions(req.Pid); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Message: err.Error(),
}
return
}
resp = &pb.UserGetProductVersionsResp{
Versions: models,
}
return
}