37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
|
|
"36wisdom/biz/model/dto"
|
|
"36wisdom/biz/service"
|
|
)
|
|
|
|
type lifeTask struct{}
|
|
|
|
var LifeTask = &lifeTask{}
|
|
|
|
type adminLifeTask struct{}
|
|
|
|
var AdminLifeTask = &adminLifeTask{}
|
|
|
|
func (c *adminLifeTask) List(ctx context.Context, req *dto.AdminLifeTaskListReq) (*dto.AdminLifeTaskListRes, error) {
|
|
return service.AdminLifeTask.List(ctx, req)
|
|
}
|
|
|
|
func (c *adminLifeTask) Create(ctx context.Context, req *dto.AdminLifeTaskCreateReq) (*dto.AdminLifeTaskCreateRes, error) {
|
|
return service.AdminLifeTask.Create(ctx, req)
|
|
}
|
|
|
|
func (c *adminLifeTask) Update(ctx context.Context, req *dto.AdminLifeTaskUpdateReq) (*dto.AdminLifeTaskUpdateRes, error) {
|
|
return service.AdminLifeTask.Update(ctx, req)
|
|
}
|
|
|
|
func (c *adminLifeTask) Disable(ctx context.Context, req *dto.AdminLifeTaskDisableReq) (*dto.AdminLifeTaskDisableRes, error) {
|
|
return service.AdminLifeTask.Disable(ctx, req)
|
|
}
|
|
|
|
func (c *adminLifeTask) Enable(ctx context.Context, req *dto.AdminLifeTaskEnableReq) (*dto.AdminLifeTaskEnableRes, error) {
|
|
return service.AdminLifeTask.Enable(ctx, req)
|
|
}
|