Browse Source

给查询供应商名字添加了限制

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

+ 1 - 1
service/supply_service.go View File

@@ -282,7 +282,7 @@ func GetSuppliyCode(orgId int64) (spcode []*models.SpSupplierName, err error) {
282 282
 //查询供应商的名字是否有重复
283 283
 func FindSupplierName(supplierName string, orgId int64) (sbool bool, err error) {
284 284
 	var total int
285
-	err = XTReadDB().Model(&models.SpSupplierName{}).Where("supplier_name = ? and status = 1", supplierName).Count(&total).Error
285
+	err = XTReadDB().Model(&models.SpSupplierName{}).Where("supplier_name = ? and user_org_id = ? and status = 1", supplierName, orgId).Count(&total).Error
286 286
 	if total != 0 {
287 287
 		sbool = true
288 288
 	} else {