123456789101112131415161718192021 |
- package handler
- import (
- "net/http"
- "github.com/zeromicro/go-zero/rest/httpx"
- "app.yhyue.com/moapp/jyInfo/api/internal/logic"
- "app.yhyue.com/moapp/jyInfo/api/internal/svc"
- )
- func getProvinceHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
- l := logic.NewGetProvinceLogic(r.Context(), svcCtx)
- resp, err := l.GetProvince()
- if err != nil {
- httpx.Error(w, err)
- } else {
- httpx.OkJson(w, resp)
- }
- }
- }
|