// ========================================================================== // GFast自动生成controller操作代码。 // 生成日期:2023-07-31 11:20:54 // 生成路径: internal/app/system/controller/qianqi_fangzhen.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 qianqiFangzhenController struct { BaseController } var QianqiFangzhen = new(qianqiFangzhenController) // List 列表 func (c *qianqiFangzhenController) List(ctx context.Context, req *system.QianqiFangzhenSearchReq) (res *system.QianqiFangzhenSearchRes, err error) { res, err = service.QianqiFangzhen().List(ctx, req) return } // Get 获取方阵 func (c *qianqiFangzhenController) Get(ctx context.Context, req *system.QianqiFangzhenGetReq) (res *system.QianqiFangzhenGetRes, err error) { res = new(system.QianqiFangzhenGetRes) res.QianqiFangzhenInfoRes, err = service.QianqiFangzhen().GetById(ctx, req.Id) return } // Add 添加方阵 func (c *qianqiFangzhenController) Add(ctx context.Context, req *system.QianqiFangzhenAddReq) (res *system.QianqiFangzhenAddRes, err error) { err = service.QianqiFangzhen().Add(ctx, req) return } // Edit 修改方阵 func (c *qianqiFangzhenController) Edit(ctx context.Context, req *system.QianqiFangzhenEditReq) (res *system.QianqiFangzhenEditRes, err error) { err = service.QianqiFangzhen().Edit(ctx, req) return } // Delete 删除方阵 func (c *qianqiFangzhenController) Delete(ctx context.Context, req *system.QianqiFangzhenDeleteReq) (res *system.QianqiFangzhenDeleteRes, err error) { err = service.QianqiFangzhen().Delete(ctx, req.Ids) return } func (c *qianqiFangzhenController) EditDetail(ctx context.Context, req *system.QianqiFangzhenEditDetailReq) (res *system.QianqiFangzhenEditDetailRes, err error) { err = service.QianqiFangzhen().EditDetail(ctx, req) return } // 传入方阵的主键ID 并将其 ViewName 更新到表中 func (c *qianqiFangzhenController) UpdateViewName(ctx context.Context, req *system.QianqiFangzhenUpdateViewNameReq) (res *system.QianqiFangzhenUpdateViewNameRes, err error) { err = service.QianqiFangzhen().UpdateViewName(ctx, req) return }