作者 yangfu

查询修改

... ... @@ -139,10 +139,10 @@ func (dao *CooperationContractDao) SearchCooperationContractByUndertaker(queryOp
query.ColumnExpr("A.status AS contract_status")
query.ColumnExpr("B.cooperation_mode_name")
if cooperationContractName, ok := queryOptions["cooperationContractName"]; ok && cooperationContractName != "" {
query = query.Where("A.cooperation_contract_name ilike ?", fmt.Sprintf("%%%s%%", cooperationContractName))
query = query.Where("A.cooperation_contract_name like ?", fmt.Sprintf("%%%s%%", cooperationContractName))
}
if sponsorName, ok := queryOptions["sponsorName"]; ok && sponsorName != "" {
query = query.Where(`A.cooperation_contract_sponsor->>'userName')::text LIKE ?`, fmt.Sprintf("%%%s%%", sponsorName))
query = query.Where(`A.cooperation_contract_sponsor->>'userName'::text LIKE ?`, fmt.Sprintf("%%%s%%", sponsorName))
}
if companyId, ok := queryOptions["companyId"]; ok && companyId.(int64) != 0 {
query.Where("cooperation_contract_undertaker.company->>'companyId' = '?'", companyId)
... ...