作者 tangxvhui

修复一些问题

@@ -127,18 +127,18 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in @@ -127,18 +127,18 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in
127 if v, ok := queryOptions["offset"].(int); ok { 127 if v, ok := queryOptions["offset"].(int); ok {
128 query.Offset(v) 128 query.Offset(v)
129 } 129 }
130 - if v, ok := queryOptions["targetUserId"].(int); ok && v > 0 { 130 + if v, ok := queryOptions["targetUserId"]; ok {
131 query.Where(`target_user->>'userId'='?'`, v) 131 query.Where(`target_user->>'userId'='?'`, v)
132 } 132 }
133 133
134 - if v, ok := queryOptions["targetUserName"].(int); ok && v > 0 { 134 + if v, ok := queryOptions["targetUserName"].(string); ok {
135 query.Where(`target_user->>'userName' like ?`, fmt.Sprintf("%%%v%%", v)) 135 query.Where(`target_user->>'userName' like ?`, fmt.Sprintf("%%%v%%", v))
136 } 136 }
137 - if v, ok := queryOptions["executorId"].(int); ok && v > 0 { 137 + if v, ok := queryOptions["executorId"]; ok {
138 query.Where(`executor->>'userId'='?'`, v) 138 query.Where(`executor->>'userId'='?'`, v)
139 } 139 }
140 140
141 - if v, ok := queryOptions["cycleId"].(int64); ok && v > 0 { 141 + if v, ok := queryOptions["cycleId"]; ok {
142 query.Where(`cycle_id=?`, v) 142 query.Where(`cycle_id=?`, v)
143 } 143 }
144 if v, ok := queryOptions["staffAssessTaskId"]; ok { 144 if v, ok := queryOptions["staffAssessTaskId"]; ok {
@@ -151,7 +151,7 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in @@ -151,7 +151,7 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in
151 if v, ok := queryOptions["typesList"].([]string); ok { 151 if v, ok := queryOptions["typesList"].([]string); ok {
152 query.Where("types in(?)", pg.In(v)) 152 query.Where("types in(?)", pg.In(v))
153 } 153 }
154 - if v, ok := queryOptions["status"].(string); ok { 154 + if v, ok := queryOptions["status"]; ok {
155 query.Where("status=?", v) 155 query.Where("status=?", v)
156 } 156 }
157 if v, ok := queryOptions["endTime"]; ok { 157 if v, ok := queryOptions["endTime"]; ok {