作者 Your Name

更新调试

... ... @@ -142,7 +142,7 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in
}
if v, ok := queryOptions["typesList"].([]string); ok && len(v) > 0 {
query.Where("types in(?)", pg.Array(v))
query.Where("types in(?)", pg.In(v))
}
if v, ok := queryOptions["status"].(string); ok && len(v) > 0 {
query.Where("status=?", v)
... ...
... ... @@ -116,7 +116,7 @@ func (repo *StaffAssessTaskRepository) Find(queryOptions map[string]interface{})
query.Offset(v)
}
if v, ok := queryOptions["executorId"].(int); ok && v > 0 {
query.Where(`executorId @>[?]`, v)
query.Where(`executor_id @>'[?]'`, v)
}
count, err := query.SelectAndCount()
if err != nil {
... ...
... ... @@ -73,7 +73,7 @@ func (repo *UserRepository) Remove(userId []int64) error {
func (repo *UserRepository) FindOne(queryOptions map[string]interface{}) (*domain.User, error) {
tx := repo.transactionContext.PgTx
userModel := models.User{}
query := tx.Model(&userModel).Where("delete_at isnull")
query := tx.Model(&userModel).Where("deleted_at isnull")
if v, ok := queryOptions["id"]; ok {
query.Where("id=?", v)
}
... ...
... ... @@ -23,6 +23,8 @@ func (c *StaffAssessController) SearchAssessTaskMe() {
return
}
//TODO 获取当前用户信息
paramReq.CompanyId = 1
paramReq.UserId = 1
data, err := srv.SearchAssessTaskMe(paramReq)
c.Response(data, err)
}
... ... @@ -55,6 +57,8 @@ func (c *StaffAssessController) AssessSelfMeList() {
return
}
//TODO 获取当前用户信息
paramReq.CompanyId = 1
paramReq.UserId = 1
data, err := srv.AssessSelfList(paramReq)
c.Response(data, err)
}
... ...