|
@@ -122,7 +122,7 @@ func (dao *EmployeeDao) CalculateSuMoneyTransactionRecord(uid int64, transaction |
|
@@ -122,7 +122,7 @@ func (dao *EmployeeDao) CalculateSuMoneyTransactionRecord(uid int64, transaction |
122
|
if err := tx.Model(suMoneyTransactionRecordModel).
|
122
|
if err := tx.Model(suMoneyTransactionRecordModel).
|
123
|
ColumnExpr("sum(su_money_transaction_record.su_money) AS income_su_money").
|
123
|
ColumnExpr("sum(su_money_transaction_record.su_money) AS income_su_money").
|
124
|
Where(`su_money_transaction_record.employee @> '{"uid":?}'`, uid).
|
124
|
Where(`su_money_transaction_record.employee @> '{"uid":?}'`, uid).
|
125
|
- Where(`su_money_transaction_record.record_type = ?`, 2).
|
125
|
+ Where(`su_money_transaction_record.record_type IN (?)`, pg.In([]int{2, 3})).
|
126
|
Where(`su_money_transaction_record.create_time > ?`, transactionStartTime).
|
126
|
Where(`su_money_transaction_record.create_time > ?`, transactionStartTime).
|
127
|
Where(`su_money_transaction_record.create_time < ?`, transactionEndTime).
|
127
|
Where(`su_money_transaction_record.create_time < ?`, transactionEndTime).
|
128
|
Select(&incomeSuMoney); err != nil {
|
128
|
Select(&incomeSuMoney); err != nil {
|
|
@@ -131,7 +131,7 @@ func (dao *EmployeeDao) CalculateSuMoneyTransactionRecord(uid int64, transaction |
|
@@ -131,7 +131,7 @@ func (dao *EmployeeDao) CalculateSuMoneyTransactionRecord(uid int64, transaction |
131
|
if err := tx.Model(suMoneyTransactionRecordModel).
|
131
|
if err := tx.Model(suMoneyTransactionRecordModel).
|
132
|
ColumnExpr("sum(su_money_transaction_record.su_money) AS expend_su_money").
|
132
|
ColumnExpr("sum(su_money_transaction_record.su_money) AS expend_su_money").
|
133
|
Where(`su_money_transaction_record.employee @> '{"uid":?}'`, uid).
|
133
|
Where(`su_money_transaction_record.employee @> '{"uid":?}'`, uid).
|
134
|
- Where(`su_money_transaction_record.record_type = ?`, 1).
|
134
|
+ Where(`su_money_transaction_record.record_type IN (?)`, pg.In([]int{1, 4})).
|
135
|
Where(`su_money_transaction_record.create_time > ?`, transactionStartTime).
|
135
|
Where(`su_money_transaction_record.create_time > ?`, transactionStartTime).
|
136
|
Where(`su_money_transaction_record.create_time < ?`, transactionEndTime).
|
136
|
Where(`su_money_transaction_record.create_time < ?`, transactionEndTime).
|
137
|
Select(&expendSuMoney); err != nil {
|
137
|
Select(&expendSuMoney); err != nil {
|