作者 tangxvhui

调整模糊搜索

... ... @@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"strconv"
"strings"
"time"
"github.com/linmadan/egglib-go/core/application"
... ... @@ -627,6 +628,7 @@ func (srv TaskService) ListTask(param *command.ListTaskCommand) (map[string]inte
"limit": 20,
"companyId": param.CompanyId,
}
param.SearchWord = strings.TrimSpace(param.SearchWord)
if len(param.SearchWord) > 0 {
condition["aliasOrLeader"] = "%" + param.SearchWord + "%"
}
... ... @@ -1005,6 +1007,7 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
listData, err := srv.listTask3ForHrbp(param)
return listData, err
}
param.SearchWord = strings.TrimSpace(param.SearchWord)
if len(param.SearchWord) > 0 {
param.SearchWord = "%" + param.SearchWord + "%"
}
... ... @@ -1158,6 +1161,10 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s
offset = (param.PageNumber - 1) * param.PageSize
}
}
param.SearchWord = strings.TrimSpace(param.SearchWord)
if len(param.SearchWord) > 0 {
param.SearchWord = "%" + param.SearchWord + "%"
}
condition := dao.ListTaskCondition{
Limit: limit,
Offset: offset,
... ...