Browse Source

供应商编号重复问题

mainqaq 3 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
 	var total int
269
 	var total int
270
 	err = XTReadDB().Model(&models.SpSupplierName{}).Where("supplier_name = ? and status = 1", supplierCode).Count(&total).Error
270
 	err = XTReadDB().Model(&models.SpSupplierName{}).Where("supplier_name = ? and status = 1", supplierCode).Count(&total).Error
271
 	if total != 0 {
271
 	if total != 0 {
272
-		codebool = true
273
-	} else {
274
 		codebool = false
272
 		codebool = false
273
+	} else {
274
+		codebool = true
275
 	}
275
 	}
276
 	return codebool, err
276
 	return codebool, err
277
 }
277
 }