get_erp_optionset_handler.go 539 B

1234567891011121314151617181920212223
  1. package sys_optionset
  2. import (
  3. "net/http"
  4. "git.i2edu.net/i2/go-zero/rest/httpx"
  5. "git.i2edu.net/i2/i2-bill-api/internal/logic/sys_optionset"
  6. "git.i2edu.net/i2/i2-bill-api/internal/svc"
  7. )
  8. func GetErpOptionsetHandler(ctx *svc.ServiceContext) http.HandlerFunc {
  9. return func(w http.ResponseWriter, r *http.Request) {
  10. l := sys_optionset.NewGetErpOptionsetLogic(r.Context(), ctx)
  11. r.ParseForm()
  12. resp, err := l.GetErpOptionset(r.Form.Get("code"))
  13. if err != nil {
  14. httpx.Error(w, err)
  15. } else {
  16. httpx.OkJson(w, resp)
  17. }
  18. }
  19. }