作者 陈志颖

fix:兑换素币清单展示已离职人员

@@ -63,7 +63,7 @@ func (dao *CashPoolDao) ExchangeCashListRanking(queryOptions map[string]interfac @@ -63,7 +63,7 @@ func (dao *CashPoolDao) ExchangeCashListRanking(queryOptions map[string]interfac
63 queryPeople = queryPeople.ColumnExpr("sum(exchange_cash_person_list.exchanged_cash) AS cash") 63 queryPeople = queryPeople.ColumnExpr("sum(exchange_cash_person_list.exchanged_cash) AS cash")
64 queryPeople = queryPeople.ColumnExpr("sum(exchange_cash_person_list.exchanged_su_money) AS su_money") 64 queryPeople = queryPeople.ColumnExpr("sum(exchange_cash_person_list.exchanged_su_money) AS su_money")
65 queryPeople = queryPeople.ColumnExpr("ROW_NUMBER() OVER (ORDER BY sum(exchange_cash_person_list.exchanged_su_money) DESC) AS ranking") 65 queryPeople = queryPeople.ColumnExpr("ROW_NUMBER() OVER (ORDER BY sum(exchange_cash_person_list.exchanged_su_money) DESC) AS ranking")
66 - queryPeople = queryPeople.Where("e.status = ?", 1) 66 + //queryPeople = queryPeople.Where("e.status = ?", 1)
67 if companyId, ok := queryOptions["companyId"]; ok && (companyId.(int64) != 0) { 67 if companyId, ok := queryOptions["companyId"]; ok && (companyId.(int64) != 0) {
68 queryPeople = queryPeople.Where("e.company_id = ?", companyId) 68 queryPeople = queryPeople.Where("e.company_id = ?", companyId)
69 } 69 }
@@ -123,7 +123,7 @@ func (dao *CashPoolDao) ExchangeCashListRanking(queryOptions map[string]interfac @@ -123,7 +123,7 @@ func (dao *CashPoolDao) ExchangeCashListRanking(queryOptions map[string]interfac
123 queryListSuMoney := tx.Model(exchangeCashPersonListModels) 123 queryListSuMoney := tx.Model(exchangeCashPersonListModels)
124 queryListSuMoney = queryListSuMoney.Join("JOIN employees AS e ON e.uid = exchange_cash_person_list.uid") 124 queryListSuMoney = queryListSuMoney.Join("JOIN employees AS e ON e.uid = exchange_cash_person_list.uid")
125 queryListSuMoney = queryListSuMoney.ColumnExpr("sum(exchange_cash_person_list.exchanged_su_money) AS activity_exchanged_su_money") 125 queryListSuMoney = queryListSuMoney.ColumnExpr("sum(exchange_cash_person_list.exchanged_su_money) AS activity_exchanged_su_money")
126 - queryListSuMoney = queryListSuMoney.Where("e.status = ?", 1) 126 + //queryListSuMoney = queryListSuMoney.Where("e.status = ?", 1)
127 if companyId, ok := queryOptions["companyId"]; ok && (companyId.(int64) != 0) { 127 if companyId, ok := queryOptions["companyId"]; ok && (companyId.(int64) != 0) {
128 queryListSuMoney = queryListSuMoney.Where("e.company_id = ?", companyId) 128 queryListSuMoney = queryListSuMoney.Where("e.company_id = ?", companyId)
129 } 129 }
@@ -139,7 +139,7 @@ func (dao *CashPoolDao) ExchangeCashListRanking(queryOptions map[string]interfac @@ -139,7 +139,7 @@ func (dao *CashPoolDao) ExchangeCashListRanking(queryOptions map[string]interfac
139 queryListCash := tx.Model(exchangeCashPersonListModels) 139 queryListCash := tx.Model(exchangeCashPersonListModels)
140 queryListCash = queryListCash.Join("JOIN employees AS e ON e.uid = exchange_cash_person_list.uid") 140 queryListCash = queryListCash.Join("JOIN employees AS e ON e.uid = exchange_cash_person_list.uid")
141 queryListCash = queryListCash.ColumnExpr("sum(exchange_cash_person_list.exchanged_cash) AS activity_exchanged_cash") 141 queryListCash = queryListCash.ColumnExpr("sum(exchange_cash_person_list.exchanged_cash) AS activity_exchanged_cash")
142 - queryListCash = queryListCash.Where("e.status = ?", 1) 142 + //queryListCash = queryListCash.Where("e.status = ?", 1)
143 if companyId, ok := queryOptions["companyId"]; ok && (companyId.(int64) != 0) { 143 if companyId, ok := queryOptions["companyId"]; ok && (companyId.(int64) != 0) {
144 queryListCash = queryListCash.Where("e.company_id = ?", companyId) 144 queryListCash = queryListCash.Where("e.company_id = ?", companyId)
145 } 145 }