初始
This commit is contained in:
60
internal/app/system/controller/bus_company.go
Normal file
60
internal/app/system/controller/bus_company.go
Normal file
@ -0,0 +1,60 @@
|
||||
// ==========================================================================
|
||||
// GFast自动生成controller操作代码。
|
||||
// 生成日期:2023-07-28 14:08:14
|
||||
// 生成路径: internal/app/system/controller/bus_company.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 busCompanyController struct {
|
||||
BaseController
|
||||
}
|
||||
|
||||
var BusCompany = new(busCompanyController)
|
||||
|
||||
// List 列表
|
||||
func (c *busCompanyController) List(ctx context.Context, req *system.BusCompanySearchReq) (res *system.BusCompanySearchRes, err error) {
|
||||
res, err = service.BusCompany().List(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// Get 获取公司
|
||||
func (c *busCompanyController) Get(ctx context.Context, req *system.BusCompanyGetReq) (res *system.BusCompanyGetRes, err error) {
|
||||
res = new(system.BusCompanyGetRes)
|
||||
res.BusCompanyInfoRes, err = service.BusCompany().GetByCompanyId(ctx, req.CompanyId)
|
||||
return
|
||||
}
|
||||
|
||||
// Add 添加公司
|
||||
func (c *busCompanyController) Add(ctx context.Context, req *system.BusCompanyAddReq) (res *system.BusCompanyAddRes, err error) {
|
||||
err = service.BusCompany().Add(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// Edit 修改公司
|
||||
func (c *busCompanyController) Edit(ctx context.Context, req *system.BusCompanyEditReq) (res *system.BusCompanyEditRes, err error) {
|
||||
err = service.BusCompany().Edit(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete 删除公司
|
||||
func (c *busCompanyController) Delete(ctx context.Context, req *system.BusCompanyDeleteReq) (res *system.BusCompanyDeleteRes, err error) {
|
||||
err = service.BusCompany().Delete(ctx, req.CompanyIds)
|
||||
return
|
||||
}
|
||||
|
||||
//app
|
||||
|
||||
func (c *busCompanyController) AppList(ctx context.Context, req *system.BusCompanyAppSearchReq) (res *system.BusCompanyAppSearchRes, err error) {
|
||||
res, err = service.BusCompany().AppList(ctx, req)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user