...
|
...
|
@@ -127,18 +127,18 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in |
|
|
if v, ok := queryOptions["offset"].(int); ok {
|
|
|
query.Offset(v)
|
|
|
}
|
|
|
if v, ok := queryOptions["targetUserId"].(int); ok && v > 0 {
|
|
|
if v, ok := queryOptions["targetUserId"]; ok {
|
|
|
query.Where(`target_user->>'userId'='?'`, v)
|
|
|
}
|
|
|
|
|
|
if v, ok := queryOptions["targetUserName"].(int); ok && v > 0 {
|
|
|
if v, ok := queryOptions["targetUserName"].(string); ok {
|
|
|
query.Where(`target_user->>'userName' like ?`, fmt.Sprintf("%%%v%%", v))
|
|
|
}
|
|
|
if v, ok := queryOptions["executorId"].(int); ok && v > 0 {
|
|
|
if v, ok := queryOptions["executorId"]; ok {
|
|
|
query.Where(`executor->>'userId'='?'`, v)
|
|
|
}
|
|
|
|
|
|
if v, ok := queryOptions["cycleId"].(int64); ok && v > 0 {
|
|
|
if v, ok := queryOptions["cycleId"]; ok {
|
|
|
query.Where(`cycle_id=?`, v)
|
|
|
}
|
|
|
if v, ok := queryOptions["staffAssessTaskId"]; ok {
|
...
|
...
|
@@ -151,7 +151,7 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in |
|
|
if v, ok := queryOptions["typesList"].([]string); ok {
|
|
|
query.Where("types in(?)", pg.In(v))
|
|
|
}
|
|
|
if v, ok := queryOptions["status"].(string); ok {
|
|
|
if v, ok := queryOptions["status"]; ok {
|
|
|
query.Where("status=?", v)
|
|
|
}
|
|
|
if v, ok := queryOptions["endTime"]; ok {
|
...
|
...
|
|