正在显示
4 个修改的文件
包含
7 行增加
和
3 行删除
@@ -142,7 +142,7 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in | @@ -142,7 +142,7 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in | ||
142 | } | 142 | } |
143 | 143 | ||
144 | if v, ok := queryOptions["typesList"].([]string); ok && len(v) > 0 { | 144 | if v, ok := queryOptions["typesList"].([]string); ok && len(v) > 0 { |
145 | - query.Where("types in(?)", pg.Array(v)) | 145 | + query.Where("types in(?)", pg.In(v)) |
146 | } | 146 | } |
147 | if v, ok := queryOptions["status"].(string); ok && len(v) > 0 { | 147 | if v, ok := queryOptions["status"].(string); ok && len(v) > 0 { |
148 | query.Where("status=?", v) | 148 | query.Where("status=?", v) |
@@ -116,7 +116,7 @@ func (repo *StaffAssessTaskRepository) Find(queryOptions map[string]interface{}) | @@ -116,7 +116,7 @@ func (repo *StaffAssessTaskRepository) Find(queryOptions map[string]interface{}) | ||
116 | query.Offset(v) | 116 | query.Offset(v) |
117 | } | 117 | } |
118 | if v, ok := queryOptions["executorId"].(int); ok && v > 0 { | 118 | if v, ok := queryOptions["executorId"].(int); ok && v > 0 { |
119 | - query.Where(`executorId @>[?]`, v) | 119 | + query.Where(`executor_id @>'[?]'`, v) |
120 | } | 120 | } |
121 | count, err := query.SelectAndCount() | 121 | count, err := query.SelectAndCount() |
122 | if err != nil { | 122 | if err != nil { |
@@ -73,7 +73,7 @@ func (repo *UserRepository) Remove(userId []int64) error { | @@ -73,7 +73,7 @@ func (repo *UserRepository) Remove(userId []int64) error { | ||
73 | func (repo *UserRepository) FindOne(queryOptions map[string]interface{}) (*domain.User, error) { | 73 | func (repo *UserRepository) FindOne(queryOptions map[string]interface{}) (*domain.User, error) { |
74 | tx := repo.transactionContext.PgTx | 74 | tx := repo.transactionContext.PgTx |
75 | userModel := models.User{} | 75 | userModel := models.User{} |
76 | - query := tx.Model(&userModel).Where("delete_at isnull") | 76 | + query := tx.Model(&userModel).Where("deleted_at isnull") |
77 | if v, ok := queryOptions["id"]; ok { | 77 | if v, ok := queryOptions["id"]; ok { |
78 | query.Where("id=?", v) | 78 | query.Where("id=?", v) |
79 | } | 79 | } |
@@ -23,6 +23,8 @@ func (c *StaffAssessController) SearchAssessTaskMe() { | @@ -23,6 +23,8 @@ func (c *StaffAssessController) SearchAssessTaskMe() { | ||
23 | return | 23 | return |
24 | } | 24 | } |
25 | //TODO 获取当前用户信息 | 25 | //TODO 获取当前用户信息 |
26 | + paramReq.CompanyId = 1 | ||
27 | + paramReq.UserId = 1 | ||
26 | data, err := srv.SearchAssessTaskMe(paramReq) | 28 | data, err := srv.SearchAssessTaskMe(paramReq) |
27 | c.Response(data, err) | 29 | c.Response(data, err) |
28 | } | 30 | } |
@@ -55,6 +57,8 @@ func (c *StaffAssessController) AssessSelfMeList() { | @@ -55,6 +57,8 @@ func (c *StaffAssessController) AssessSelfMeList() { | ||
55 | return | 57 | return |
56 | } | 58 | } |
57 | //TODO 获取当前用户信息 | 59 | //TODO 获取当前用户信息 |
60 | + paramReq.CompanyId = 1 | ||
61 | + paramReq.UserId = 1 | ||
58 | data, err := srv.AssessSelfList(paramReq) | 62 | data, err := srv.AssessSelfList(paramReq) |
59 | c.Response(data, err) | 63 | c.Response(data, err) |
60 | } | 64 | } |
-
请 注册 或 登录 后发表评论