fix
fix update function from save to updates
| | |
| | | // UpdateContract 更新Contract记录 |
| | | // Author [piexlmax](https://github.com/piexlmax) |
| | | func (conService *ContractService) UpdateContract(con test.Contract) (err error) { |
| | | err = global.GVA_DB.Save(&con).Error |
| | | err = global.GVA_DB.Updates(&con).Error |
| | | return err |
| | | } |
| | | |
| | |
| | | // 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 |
| | | } |
| | | |
| | |
| | | // UpdateMember 更新Member记录 |
| | | // Author [piexlmax](https://github.com/piexlmax) |
| | | func (mService *MemberService) UpdateMember(m test.Member) (err error) { |
| | | err = global.GVA_DB.Save(&m).Error |
| | | err = global.GVA_DB.Updates(&m).Error |
| | | return err |
| | | } |
| | | |
| | |
| | | // UpdateProduct 更新Product记录 |
| | | // Author [piexlmax](https://github.com/piexlmax) |
| | | func (pService *ProductService) UpdateProduct(p test.Product) (err error) { |
| | | err = global.GVA_DB.Save(&p).Error |
| | | err = global.GVA_DB.Updates(&p).Error |
| | | return err |
| | | } |
| | | |
| | |
| | | // 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 |
| | | } |
| | | |