From 02a2176f7c5733a4e4c4429c2028bbb86a967ce7 Mon Sep 17 00:00:00 2001 From: jiangshuai <291802688@qq.com> Date: 星期二, 06 二月 2024 10:13:38 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/SRM --- service/test/industry.go | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/service/test/industry.go b/service/test/industry.go index 2ab2570..1ac2a4c 100644 --- a/service/test/industry.go +++ b/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 +} -- Gitblit v1.8.0