From b17d05f9455f749f9dac5625f711c44479d2342b Mon Sep 17 00:00:00 2001 From: louwenzhi Date: Thu, 23 Dec 2021 14:49:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2=E9=9B=B6?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E5=B9=B6=E4=B8=94=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../implments/CustDemandVerHead.dao.impl.go | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dao/ap/implments/CustDemandVerHead.dao.impl.go b/dao/ap/implments/CustDemandVerHead.dao.impl.go index 6abee39..0c73f1e 100644 --- a/dao/ap/implments/CustDemandVerHead.dao.impl.go +++ b/dao/ap/implments/CustDemandVerHead.dao.impl.go @@ -437,23 +437,23 @@ func (impl *CustDemandVerHeadDAOImplement) SelectData(paging *grmi.Paging, group joinstr := " INNER JOIN AP_UserCustlst ON AP_CustDemandVerHead.PlantNr = AP_UserCustlst.PlantNr AND AP_CustDemandVerHead.CustomerId = AP_UserCustlst.CustomerId INNER JOIN AP_CustDemandHead ON AP_CustDemandVerHead.PlantNr = AP_CustDemandHead.PlantNr AND AP_CustDemandVerHead.CustomerId = AP_CustDemandHead.CustomerId AND AP_CustDemandVerHead.VersionId = AP_CustDemandHead.VersionId " if customerId != "" { - where += fmt.Sprintf(" AND AP_CustDemandVerHead.CustomerId = %s", customerId) + where += fmt.Sprintf(" AND AP_CustDemandVerHead.CustomerId = '%s'", customerId) } if versionId != "" { - where += fmt.Sprintf(" AND AP_CustDemandVerHead.VersionId = %s", versionId) + where += fmt.Sprintf(" AND AP_CustDemandVerHead.VersionId = '%s'", versionId) } if status != "" { - where += fmt.Sprintf(" AND AP_CustDemandVerHead.Status = %s", status) + where += fmt.Sprintf(" AND AP_CustDemandVerHead.Status = '%s'", status) } if artId != "" { joinstr += " INNER JOIN AP_CustDemandVerDetail ON AP_CustDemandVerHead.PlantNr = AP_CustDemandVerDetail.PlantNr And AP_CustDemandVerHead.CustomerId = AP_CustDemandVerDetail.CustomerId And AP_CustDemandVerHead.VersionId = AP_CustDemandVerDetail.VersionId " - where += fmt.Sprintf(" and AP_CustDemandVerDetail.ArtId like concat('%%', %s, '%%')", artId) + where += fmt.Sprintf(" and AP_CustDemandVerDetail.ArtId like concat('%%', '%s', '%%')", artId) } if grouptype != "" { joinstr += " INNER JOIN Customer ON AP_CustDemandVerHead.PlantNr = Customer.PlantNr And AP_CustDemandVerHead.CustomerId = Customer.CustomerId " - where += fmt.Sprintf(" AND Customer.CustomerType = %s", grouptype) + where += fmt.Sprintf(" AND Customer.CustomerType = '%s'", grouptype) } orderBy := " order by " + " AP_CustDemandVerHead.VersionId " where = " where " + where @@ -471,23 +471,23 @@ func (impl *CustDemandVerHeadDAOImplement) SelectData(paging *grmi.Paging, group joinstr := " INNER JOIN AP_UserCustlst ON AP_CustDemandVerHead.PlantNr = AP_UserCustlst.PlantNr AND AP_CustDemandVerHead.CustomerId = AP_UserCustlst.CustomerId " if customerId != "" { - where += fmt.Sprintf(" AND AP_CustDemandVerHead.CustomerId = %s", customerId) + where += fmt.Sprintf(" AND AP_CustDemandVerHead.CustomerId = '%s'", customerId) } if versionId != "" { - where += fmt.Sprintf(" AND AP_CustDemandVerHead.VersionId = %s", versionId) + where += fmt.Sprintf(" AND AP_CustDemandVerHead.VersionId = '%s'", versionId) } if status != "" { - where += fmt.Sprintf(" AND AP_CustDemandVerHead.Status = %s", status) + where += fmt.Sprintf(" AND AP_CustDemandVerHead.Status = '%s'", status) } if artId != "" { joinstr += " INNER JOIN AP_CustDemandVerDetail ON AP_CustDemandVerHead.PlantNr = AP_CustDemandVerDetail.PlantNr And AP_CustDemandVerHead.CustomerId = AP_CustDemandVerDetail.CustomerId And AP_CustDemandVerHead.VersionId = AP_CustDemandVerDetail.VersionId " - where += fmt.Sprintf(" and AP_CustDemandVerDetail.ArtId like concat('%%', %s, '%%')", artId) + where += fmt.Sprintf(" and AP_CustDemandVerDetail.ArtId like concat('%%', '%s', '%%')", artId) } if grouptype != "" { joinstr += " INNER JOIN Customer ON AP_CustDemandVerHead.PlantNr = Customer.PlantNr And AP_CustDemandVerHead.CustomerId = Customer.CustomerId " - where += fmt.Sprintf(" AND Customer.CustomerType = %s", grouptype) + where += fmt.Sprintf(" AND Customer.CustomerType = '%s'", grouptype) } orderBy := " order by " + " AP_CustDemandVerHead.VersionId " where = " where " + where