| | |
| | | case constvar.ServiceContractKeywordPrincipal: |
| | | db = db.Joins("left join user on user.id = service_contract.member_id").Where("user.username like ?", fmt.Sprintf("%%%s%%", slf.Keyword)) |
| | | case constvar.ServiceContractKeywordProductName: |
| | | db = db.Joins("Products", clause.LeftJoin).Where("Products.name like ?", fmt.Sprintf("%%%s%%", slf.Keyword)) |
| | | db = db.Joins("left join service_contract_product scp on scp.service_contract_id = service_contract.id left join products on scp.product_id = products.id").Where("products.name like ?", fmt.Sprintf("%%%s%%", slf.Keyword)) |
| | | case constvar.ServiceContractKeywordServiceBeginDate: |
| | | db = db.Where("start_time = ?", slf.Keyword) |
| | | case constvar.ServiceContractKeywordServiceEndDate: |