...
|
...
|
@@ -155,6 +155,10 @@ func (repository *TaskRepository) Find(queryOptions map[string]interface{}) (int |
|
|
if taskContentMatch, ok := queryOptions["taskContentMatch"]; ok && (taskContentMatch != "") {
|
|
|
query = query.Where("task.task_name LIKE ?", fmt.Sprintf("%%%s%%", taskContentMatch.(string)))
|
|
|
}
|
|
|
if taskNameMatch, ok := queryOptions["taskNameMatch"]; ok && (taskNameMatch != "") {
|
|
|
query = query.Where("task.task_name LIKE ?", fmt.Sprintf("%%%s%%", taskNameMatch.(string)))
|
|
|
query = query.Where("task.task_type IN (?)", pg.In([]int{1, 2}))
|
|
|
}
|
|
|
if isRewardTake, ok := queryOptions["isRewardTake"]; ok && (isRewardTake != false) {
|
|
|
query = query.Where(`task.is_reward_take = ?`, isRewardTake)
|
|
|
}
|
...
|
...
|
|