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