where 条件后面可以跟 ()吗,里头写传过来的值,比如(or.id='')
defhql="""selectCM.CustomerNameasCnamefromCustomerMasterCMinnerjoinContractMasterCMEo...
def hql = """
select CM.CustomerName as Cname
from CustomerMaster CM
inner join ContractMaster CME on CM.ID = CME.BusinessId
inner join ContractDetail CD on CME.ID = CD.ContractId
where ${customernameCondition} and CME.ContractType = '销售合同'
group by CM.CustomerName
"""
def salelist = []
println("-----------------------------------------"+hql)
def resulty = sql.rows(hql) 展开
select CM.CustomerName as Cname
from CustomerMaster CM
inner join ContractMaster CME on CM.ID = CME.BusinessId
inner join ContractDetail CD on CME.ID = CD.ContractId
where ${customernameCondition} and CME.ContractType = '销售合同'
group by CM.CustomerName
"""
def salelist = []
println("-----------------------------------------"+hql)
def resulty = sql.rows(hql) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询