12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package service
- import (
- "ulink-admin/modules/car/dao"
- "ulink-admin/modules/car/models/model"
- "ulink-admin/modules/car/models/req"
- )
- type RunService struct {
- RunDao *dao.RunDao `inject:""`
- }
- func (this RunService) List(query *req.RunQuery, list interface{}) {
- this.RunDao.List(query, list)
- }
- func (this RunService) Page(query *req.RunQuery) (*[]model.Run, int64) {
- return this.RunDao.Page(query)
- }
- func (this RunService) Insert(run *model.Run) {
- this.RunDao.Insert(run)
- }
- func (this RunService) Get(id int64) *model.Run {
- model := &model.Run{}
- this.RunDao.GetById(id, model)
- return model
- }
- func (this RunService) Delete(list []int64) {
- this.RunDao.Delete(&model.Run{}, list)
- }
- func (this RunService) Edit(run *model.Run, cols []string) {
- this.RunDao.Update(run, cols...)
- }
|