| | |
| | | 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 SupplierTypeService struct { |
| | |
| | | // UpdateSupplierType 更新SupplierType记录 |
| | | // Author [piexlmax](https://github.com/piexlmax) |
| | | func (stService *SupplierTypeService) UpdateSupplierType(st test.SupplierType) (err error) { |
| | | err = global.GVA_DB.Save(&st).Error |
| | | err = global.GVA_DB.Updates(&st).Error |
| | | return err |
| | | } |
| | | |
| | |
| | | err = db.Limit(limit).Offset(offset).Find(&sts).Error |
| | | return sts, total, err |
| | | } |
| | | |
| | | func (stService *SupplierTypeService) DeleteAll() (err error) { |
| | | err = global.GVA_DB.Where("1=1").Delete(&[]test.SupplierType{}).Error |
| | | return err |
| | | } |