This commit is contained in:
parent
7268758aec
commit
b977fbca79
@ -101,7 +101,7 @@ type ListWatcherInfoRequest struct {
|
|||||||
func (c *Controller) List(req ListWatcherInfoRequest) (resp web.ListResponse[model.WatchInfo], err error) {
|
func (c *Controller) List(req ListWatcherInfoRequest) (resp web.ListResponse[model.WatchInfo], err error) {
|
||||||
tx := c.db
|
tx := c.db
|
||||||
if req.Keyword != "" {
|
if req.Keyword != "" {
|
||||||
tx = tx.Where("name LIKE ? or remark LIKE ?", fmt.Sprintf("%%%s%%", req.Keyword), fmt.Sprintf("%%%s%%", req.Keyword))
|
tx = tx.Where("name ilike ? or remark ilike ? or pid ilike ?", fmt.Sprintf("%%%s%%", req.Keyword), fmt.Sprintf("%%%s%%", req.Keyword), fmt.Sprintf("%%%s%%", req.Keyword))
|
||||||
}
|
}
|
||||||
if !req.Website.IsZero() {
|
if !req.Website.IsZero() {
|
||||||
tx = tx.Where("website = ?", req.Website)
|
tx = tx.Where("website = ?", req.Website)
|
||||||
|
Loading…
Reference in New Issue
Block a user