Files
zmkgC/internal/app/system/controller/qianqi_road.go
2025-07-07 20:11:59 +08:00

54 lines
1.7 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ==========================================================================
// GFast自动生成controller操作代码。
// 生成日期2023-08-04 16:24:38
// 生成路径: internal/app/system/controller/qianqi_road.go
// 生成人gfast
// desc:道路
// company:云南奇讯科技有限公司
// ==========================================================================
package controller
import (
"context"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/service"
)
type qianqiRoadController struct {
BaseController
}
var QianqiRoad = new(qianqiRoadController)
// List 列表
func (c *qianqiRoadController) List(ctx context.Context, req *system.QianqiRoadSearchReq) (res *system.QianqiRoadSearchRes, err error) {
res, err = service.QianqiRoad().List(ctx, req)
return
}
// Get 获取道路
func (c *qianqiRoadController) Get(ctx context.Context, req *system.QianqiRoadGetReq) (res *system.QianqiRoadGetRes, err error) {
res = new(system.QianqiRoadGetRes)
res.QianqiRoadInfoRes, err = service.QianqiRoad().GetById(ctx, req.Id)
return
}
// Add 添加道路
func (c *qianqiRoadController) Add(ctx context.Context, req *system.QianqiRoadAddReq) (res *system.QianqiRoadAddRes, err error) {
err = service.QianqiRoad().Add(ctx, req)
return
}
// Edit 修改道路
func (c *qianqiRoadController) Edit(ctx context.Context, req *system.QianqiRoadEditReq) (res *system.QianqiRoadEditRes, err error) {
err = service.QianqiRoad().Edit(ctx, req)
return
}
// Delete 删除道路
func (c *qianqiRoadController) Delete(ctx context.Context, req *system.QianqiRoadDeleteReq) (res *system.QianqiRoadDeleteRes, err error) {
err = service.QianqiRoad().Delete(ctx, req.Ids)
return
}