package v1
|
|
import (
|
"apsClient/model/request"
|
"apsClient/pkg/contextx"
|
"apsClient/pkg/ecode"
|
"apsClient/service"
|
"github.com/gin-gonic/gin"
|
)
|
|
type ProcessModelApi struct{}
|
|
// List
|
// @Tags 工艺模型
|
// @Summary 获取工艺模型列表
|
// @Produce application/json
|
// @Param object query request.ProcessModelList true "查询参数"
|
// @Success 200 {object} contextx.Response{data=response.TaskCountdown} "成功"
|
// @Router /v1/processModel/list [get]
|
func (slf *ProcessModelApi) List(c *gin.Context) {
|
var params request.ProcessModelList
|
ctx, ok := contextx.NewContext(c, ¶ms)
|
if !ok {
|
return
|
}
|
list, total, err := service.GetProcessModelList(params.Page, params.PageSize)
|
if err != nil {
|
ctx.Fail(ecode.DBErr)
|
return
|
}
|
ctx.ResultList(list, total)
|
}
|