12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package service
- import (
- "ulink-admin/modules/doc/dao"
- "ulink-admin/modules/doc/models/model"
- "ulink-admin/modules/doc/models/req"
- )
- type DocFileService struct {
- docFileDao dao.DocFileDao
- }
- // List 查询所有文档管理业务方法
- func (this DocFileService) List(query *req.DocFileQuery, list interface{}) {
- this.docFileDao.List(query, list)
- }
- // Page 查询文档管理分页列表
- func (this DocFileService) Page(query *req.DocFileQuery) (*[]model.DocFile, int64) {
- return this.docFileDao.Page(query)
- }
- // Insert 添加文档管理
- func (this DocFileService) Insert(docFile *model.DocFile) {
- this.docFileDao.Insert(docFile)
- }
- // Get 查询
- func (this DocFileService) Get(id int64) *model.DocFile {
- model := &model.DocFile{}
- this.docFileDao.GetById(id, model)
- return model
- }
- // Delete 批量删除
- func (this DocFileService) Delete(list []int64) {
- this.docFileDao.Delete(&model.DocFile{}, list)
- }
- // Edit 修改
- func (this DocFileService) Edit(docFile *model.DocFile, cols []string) {
- this.docFileDao.Update(docFile, cols...)
- }
|