Browse Source

供应商编号重复问题

mainqaq 2 years ago
parent
commit
b14e578b6c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      service/supply_service.go

+ 2 - 2
service/supply_service.go View File

@@ -269,9 +269,9 @@ func FindSupplierCode(supplierCode string) (codebool bool, err error) {
269 269
 	var total int
270 270
 	err = XTReadDB().Model(&models.SpSupplierName{}).Where("supplier_name = ? and status = 1", supplierCode).Count(&total).Error
271 271
 	if total != 0 {
272
-		codebool = true
273
-	} else {
274 272
 		codebool = false
273
+	} else {
274
+		codebool = true
275 275
 	}
276 276
 	return codebool, err
277 277
 }