feat:完成首页搜索功能
This commit is contained in:
@ -40,8 +40,8 @@ func (m *SysPatent) Instance(where ...*model.ModelWhere) ([]*SysPatentInfo, erro
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Patent 专利信息
|
||||
func (m *SysPatent) Patent(page, pageSize int, count *int64, where ...*model.ModelWhere) ([]*SysPatentInfo, error) {
|
||||
// Patents 专利信息
|
||||
func (m *SysPatent) Patents(page, pageSize int, count *int64, where ...*model.ModelWhere) ([]*SysPatentInfo, error) {
|
||||
db := orm.GetDB().Table(m.TableName()+" AS p").
|
||||
Select("p.id", "p.title", "LEFT(p.description, 80) AS description", "p.apply_at").
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS c ON p.ipc_code = c.ipc AND c.is_deleted = %d",
|
||||
|
Reference in New Issue
Block a user