1234567891011121314151617181920212223242526272829303132333435363738 |
- package controllers_join
- import (
- "encoding/json"
- "kkscrap-go/locals"
- models_join "kkscrap-go/models/join"
- "net/http"
- "github.com/dabory/abango-rest"
- "github.com/labstack/echo"
- )
- type CompanySearchPageReq struct {
- QueryVars locals.QueryVars
- CompanySearchVars locals.CompanySearchVars
- PageVars locals.PageVars
- }
- func CompanySearchPage(c echo.Context) error {
- v := c.Get("receiver").(CompanySearchPageReq)
- y := c.Get("abango").(abango.Controller)
- vRet := &struct {
- models_join.CompanySearchPageRet
- }{}
- vRet.QueryVars = v.QueryVars
- vRet.CompanySearchVars = v.CompanySearchVars
- vRet.PageVars = v.PageVars
- if err := vRet.GetCompanySearchPage(y.Db); err != nil {
- return c.String(607, err.Error())
- }
- ret, _ := json.Marshal(vRet)
- return c.JSONBlob(http.StatusOK, ret)
- }
|