Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Meng-Xin/take-out
/ functions
Functions
203 in github.com/Meng-Xin/take-out
⨍
Functions
203
◇
Types & classes
74
↓ 53 callers
Method
Error
(args ...interface{})
logger/log.go:14
↓ 44 callers
Function
NewError
(code int, msg string)
common/retcode/retcode.go:31
↓ 40 callers
Function
Fatal
Fatal 渲染服务错误响应
common/retcode/retcode.go:44
↓ 27 callers
Function
OK
OK 渲染成功响应
common/retcode/retcode.go:39
↓ 13 callers
Method
WithTx
WithTx 切换到事务模式
internal/repository/dao/dish_dao.go:115
↓ 12 callers
Function
GetMsg
(code int)
common/e/code.go:64
↓ 9 callers
Method
Update
(ctx context.Context, dto request.DishUpdateDTO)
internal/service/dish_service.go:26
↓ 6 callers
Method
Delete
(ctx context.Context, ids string)
internal/service/dish_service.go:27
↓ 6 callers
Method
Info
(args ...interface{})
logger/log.go:12
↓ 5 callers
Method
InitApiRouter
(parent *gin.RouterGroup)
internal/router/admin/dish.go:14
↓ 5 callers
Method
PageQuery
(ctx context.Context, dto *request.DishPageQueryDTO)
internal/service/dish_service.go:22
↓ 5 callers
Function
VerifyJWTAdmin
()
middle/jwt_middle.go:13
↓ 4 callers
Method
GetById
(ctx context.Context, id uint64)
internal/service/employee_service.go:25
↓ 4 callers
Method
Insert
Insert 插入菜品数据
internal/repository/dao/dish_dao.go:101
↓ 4 callers
Function
MD5V
MD5V 对目标字符串取Hash salt:加盐字段,iteration:hash迭代轮数。
common/utils/encrypt.go:9
↓ 4 callers
Method
Paginate
(page *int, pageSize *int)
common/result.go:33
↓ 4 callers
Method
SetStatus
(ctx context.Context, id uint64, status int)
internal/service/category_service.go:20
↓ 3 callers
Method
Debug
(args ...interface{})
logger/log.go:11
↓ 3 callers
Method
InsertBatch
(ctx context.Context, flavor []model.DishFlavor)
internal/repository/dao/dish_flavor.go:25
↓ 3 callers
Method
List
(ctx context.Context, categoryId uint64)
internal/service/dish_service.go:24
↓ 3 callers
Method
OnOrClose
(ctx context.Context, id uint64, status int)
internal/service/dish_service.go:25
↓ 3 callers
Method
Warn
(args ...interface{})
logger/log.go:13
↓ 2 callers
Method
DeleteByDishId
(ctx context.Context, dishId uint64)
internal/repository/dao/dish_flavor.go:35
↓ 2 callers
Method
DeleteById
(ctx context.Context, id uint64)
internal/service/category_service.go:18
↓ 2 callers
Method
GetByIdWithDish
(ctx context.Context, dishId uint64)
internal/service/setmeal_service.go:24
↓ 2 callers
Function
GetErrCode
GetErrCode 获取错误码
common/retcode/retcode.go:91
↓ 2 callers
Function
ParseToken
(token string, secret string)
common/utils/jwt.go:34
↓ 2 callers
Function
RenderErrMsg
RenderErrMsg
common/retcode/retcode.go:65
↓ 2 callers
Function
render
render
common/retcode/retcode.go:70
↓ 1 callers
Method
AddCategory
(ctx context.Context, dto request.CategoryDTO)
internal/service/category_service.go:15
↓ 1 callers
Method
AddDishWithFlavors
(ctx context.Context, dto request.DishDTO)
internal/service/dish_service.go:21
↓ 1 callers
Function
AliyunOss
(ctx context.Context, fileName string, file *multipart.FileHeader)
common/utils/oss.go:10
↓ 1 callers
Method
Begin
Begin 开始一个事务
global/tx/transactionManager.go:9
↓ 1 callers
Method
Commit
Commit 提交事务
global/tx/transactionManager.go:11
↓ 1 callers
Method
CreateEmployee
(ctx context.Context, employee request.EmployeeDTO)
internal/service/employee_service.go:21
↓ 1 callers
Method
DeleteByIds
(ctx context.Context, ids ...uint64)
internal/repository/dao/setmeal_dao.go:19
↓ 1 callers
Method
DeleteBySetMealIds
(ctx context.Context, ids ...uint64)
internal/repository/dao/setmeal_dish_dao.go:16
↓ 1 callers
Method
Dsn
()
config/config.go:64
↓ 1 callers
Method
EditPassword
(context.Context, request.EmployeeEditPassword)
internal/service/employee_service.go:20
↓ 1 callers
Method
Fatal
(args ...interface{})
logger/log.go:15
↓ 1 callers
Function
GenerateToken
GenerateToken 生成Token uid 用户id subject 签发对象 secret 加盐
common/utils/jwt.go:17
↓ 1 callers
Method
GetByIdWithFlavors
(ctx context.Context, id uint64)
internal/service/dish_service.go:23
↓ 1 callers
Method
GetBySetMealId
(ctx context.Context, SetMealId uint64)
internal/repository/dao/setmeal_dish_dao.go:25
↓ 1 callers
Method
GetByUserName
(ctx context.Context, userName string)
internal/repository/dao/employee_dao.go:82
↓ 1 callers
Method
GetCode
()
common/retcode/retcode.go:14
↓ 1 callers
Function
GlobalInit
()
initialize/enter.go:10
↓ 1 callers
Function
InitDatabase
(dsn string)
initialize/gorm.go:18
↓ 1 callers
Function
InitLoadConfig
()
config/config.go:11
↓ 1 callers
Method
List
(ctx context.Context, cate int)
internal/service/category_service.go:17
↓ 1 callers
Method
Login
(context.Context, request.EmployeeLogin)
internal/service/employee_service.go:18
↓ 1 callers
Method
Logout
(ctx context.Context)
internal/service/employee_service.go:19
↓ 1 callers
Function
NewCategoryController
(service service.ICategoryService)
internal/api/controller/category_controller.go:17
↓ 1 callers
Function
NewCategoryDao
(db *gorm.DB)
internal/repository/dao/category_dao.go:99
↓ 1 callers
Function
NewCategoryService
(repo *dao.CategoryDao)
internal/service/category_service.go:98
↓ 1 callers
Function
NewDishController
(service service.IDishService)
internal/api/controller/dish_controller.go:16
↓ 1 callers
Function
NewDishFlavorDao
NewDishFlavorDao 创建dao实例
internal/repository/dao/dish_flavor.go:51
↓ 1 callers
Function
NewDishRepo
(db *gorm.DB)
internal/repository/dao/dish_dao.go:110
↓ 1 callers
Function
NewDishService
(repo *dao.DishDao, dishFlavorRepo *dao.DishFlavorDao)
internal/service/dish_service.go:205
↓ 1 callers
Function
NewEmployeeController
(employeeService service.IEmployeeService)
internal/api/controller/employee_controller.go:17
↓ 1 callers
Function
NewEmployeeDao
(db *gorm.DB)
internal/repository/dao/employee_dao.go:92
↓ 1 callers
Function
NewEmployeeService
(repo *dao.EmployeeDao)
internal/service/employee_service.go:182
↓ 1 callers
Function
NewSetMealController
(service service.ISetMealService)
internal/api/controller/setmeal_controller.go:16
↓ 1 callers
Function
NewSetMealDao
(db *gorm.DB)
internal/repository/dao/setmeal_dao.go:89
↓ 1 callers
Function
NewSetMealDishDao
()
internal/repository/dao/setmeal_dish_dao.go:44
↓ 1 callers
Function
NewSetMealService
(repo *dao.SetMealDao, setMealDishRepo *dao.SetMealDishDao)
internal/service/setmeal_service.go:157
↓ 1 callers
Method
PageQuery
(ctx context.Context, dto request.CategoryPageQueryDTO)
internal/service/category_service.go:16
↓ 1 callers
Method
PageQuery
(ctx context.Context, dto request.SetMealPageQueryDTO)
internal/service/setmeal_service.go:22
↓ 1 callers
Method
PageQuery
(ctx context.Context, dto request.EmployeePageQueryDTO)
internal/service/employee_service.go:22
↓ 1 callers
Function
PageVerify
PageVerify 分页查询 过滤器
common/result.go:20
↓ 1 callers
Function
RenderReply
RenderReply
common/retcode/retcode.go:60
↓ 1 callers
Method
Rollback
Rollback 回滚事务
global/tx/transactionManager.go:13
↓ 1 callers
Method
SaveWithDish
(ctx context.Context, dto request.SetMealDTO)
internal/service/setmeal_service.go:21
↓ 1 callers
Function
SlowQueryLog
SlowQueryLog 慢查询日志
initialize/gorm.go:54
↓ 1 callers
Method
Update
(ctx context.Context, dto request.CategoryDTO)
internal/service/category_service.go:19
↓ 1 callers
Method
UpdateEmployee
(ctx context.Context, dto request.EmployeeDTO)
internal/service/employee_service.go:24
↓ 1 callers
Method
UpdateStatus
UpdateStatus 动态更新包括零值
internal/repository/dao/employee_dao.go:19
↓ 1 callers
Function
initRedis
()
initialize/redis.go:9
↓ 1 callers
Function
routerInit
()
initialize/router.go:10
Function
Abs
(input T)
common/utils/generice.go:24
Method
AddCategory
(ctx context.Context, dto request.CategoryDTO)
internal/service/category_service.go:80
Method
AddCategory
(ctx *gin.Context)
internal/api/controller/category_controller.go:21
Method
AddDish
AddDish 新增菜品数据
internal/api/controller/dish_controller.go:21
Method
AddDishWithFlavors
(ctx context.Context, dto request.DishDTO)
internal/service/dish_service.go:167
Method
AddEmployee
AddEmployee 新增员工
internal/api/controller/employee_controller.go:74
Method
AfterFind
(tx *gorm.DB)
internal/model/employee.go:48
Method
BeforeCreate
(tx *gorm.DB)
internal/model/dish.go:25
Method
BeforeCreate
(tx *gorm.DB)
internal/model/employee.go:24
Method
BeforeCreate
(tx *gorm.DB)
internal/model/category.go:21
Method
BeforeCreate
(tx *gorm.DB)
internal/model/setmeal.go:23
Method
BeforeUpdate
(tx *gorm.DB)
internal/model/dish.go:38
Method
BeforeUpdate
(tx *gorm.DB)
internal/model/employee.go:37
Method
BeforeUpdate
(tx *gorm.DB)
internal/model/category.go:34
Method
BeforeUpdate
(tx *gorm.DB)
internal/model/setmeal.go:36
Method
Begin
()
global/tx/gormTx.go:20
Method
Commit
()
global/tx/gormTx.go:25
Method
CreateEmployee
(ctx context.Context, employeeDTO request.EmployeeDTO)
internal/service/employee_service.go:92
Function
CustomError
CustomError 渲染自定义错误
common/retcode/retcode.go:54
Method
Debug
(args ...interface{})
logger/log.go:64
Method
Debug
(args ...interface{})
logger/slog.go:37
Method
Delete
(ctx context.Context, ids string)
internal/service/dish_service.go:35
next →
1–100 of 203, ranked by callers