liujiandao
2023-11-16 d20acf38c36c11ee4428c3e74a17f5870dc61b51
service/test/industry.go
@@ -1,10 +1,10 @@
package test
import (
   "github.com/flipped-aurora/gin-vue-admin/server/global"
   "github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
   "github.com/flipped-aurora/gin-vue-admin/server/model/test"
   testReq "github.com/flipped-aurora/gin-vue-admin/server/model/test/request"
   "srm/global"
   "srm/model/common/request"
   "srm/model/test"
   testReq "srm/model/test/request"
)
type IndustryService struct {
@@ -34,7 +34,7 @@
// UpdateIndustry 更新Industry记录
// Author [piexlmax](https://github.com/piexlmax)
func (iService *IndustryService) UpdateIndustry(i test.Industry) (err error) {
   err = global.GVA_DB.Save(&i).Error
   err = global.GVA_DB.Updates(&i).Error
   return err
}
@@ -65,3 +65,8 @@
   err = db.Limit(limit).Offset(offset).Find(&is).Error
   return is, total, err
}
func (iService *IndustryService) DeleteAll() (err error) {
   err = global.GVA_DB.Where("1=1").Delete(&[]test.Industry{}).Error
   return err
}