正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -157,10 +157,10 @@ func (dao *DividendsEstimateDao) CountDividendsEstimateDividendsAmount(queryOpti | @@ -157,10 +157,10 @@ func (dao *DividendsEstimateDao) CountDividendsEstimateDividendsAmount(queryOpti | ||
157 | query := tx.Model(÷ndsEstimateModels) | 157 | query := tx.Model(÷ndsEstimateModels) |
158 | query.ColumnExpr("sum(dividends_amount) amount") | 158 | query.ColumnExpr("sum(dividends_amount) amount") |
159 | if companyId, ok := queryOptions["companyId"]; ok && companyId.(int64) != 0 { | 159 | if companyId, ok := queryOptions["companyId"]; ok && companyId.(int64) != 0 { |
160 | - query = query.Where(`dividends_estimate.company @> '{"companyId":"?"}'`, companyId) | 160 | + query = query.Where(`dividends_estimate.company->>'companyId'='?'`, companyId) |
161 | } | 161 | } |
162 | if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 { | 162 | if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 { |
163 | - query = query.Where(`dividends_estimate.org @> '{"orgId":"?"}'`, orgId) | 163 | + query = query.Where(`dividends_estimate.org->>'orgId'='?'`, orgId) |
164 | } | 164 | } |
165 | if userBaseId, ok := queryOptions["userBaseId"]; ok && userBaseId.(int64) != 0 { | 165 | if userBaseId, ok := queryOptions["userBaseId"]; ok && userBaseId.(int64) != 0 { |
166 | query = query.Where(`dividends_user->>'userBaseId'='?'`, userBaseId) | 166 | query = query.Where(`dividends_user->>'userBaseId'='?'`, userBaseId) |
-
请 注册 或 登录 后发表评论