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