1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package service
- import (
- "ulink-admin/modules/system/dao"
- "ulink-admin/modules/system/models/model"
- "ulink-admin/modules/system/models/req"
- )
- type TestService struct {
- TestDao *dao.TestDao `inject:""`
- }
- // List 查询所有测试管理业务方法
- func (this TestService) List(query *req.TestQuery, list interface{}) {
- this.TestDao.List(query, list)
- }
- // Page 查询测试管理分页列表
- func (this TestService) Page(query *req.TestQuery, list interface{}) int64 {
- return this.TestDao.Page(query, list)
- }
- // Insert 添加测试管理
- func (this TestService) Insert(test *model.Test) {
- this.TestDao.Insert(test)
- }
- // Get 查询
- func (this TestService) Get(id int64) *model.Test {
- return this.TestDao.GetById(id, &model.Test{}).(*model.Test)
- }
- // Delete 批量删除
- func (this TestService) Delete(list []int64) {
- this.TestDao.Delete(&model.Test{}, list)
- }
- // Edit 修改
- func (this TestService) Edit(test *model.Test, cols []string) {
- this.TestDao.Update(test, cols...)
- }
|