初始
This commit is contained in:
53
internal/app/system/controller/qianqi_road.go
Normal file
53
internal/app/system/controller/qianqi_road.go
Normal file
@ -0,0 +1,53 @@
|
||||
// ==========================================================================
|
||||
// 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
|
||||
}
|
Reference in New Issue
Block a user