...
|
...
|
@@ -95,6 +95,11 @@ func (dao *DividendsEstimateDao) CountDividendsEstimate(queryOptions map[string] |
|
|
tx := dao.transactionContext.PgTx
|
|
|
var dividendsEstimateModels []*models.DividendsEstimate
|
|
|
query := tx.Model(÷ndsEstimateModels)
|
|
|
currentTime := time.Now()
|
|
|
todayZeroTime := utils.GetZeroTime(currentTime)
|
|
|
nextDayZeroTime := utils.GetNextDayZeroTime(currentTime)
|
|
|
query.Where("dividends_estimate.created_at >= ?", todayZeroTime)
|
|
|
query.Where("dividends_estimate.created_at < ?", nextDayZeroTime)
|
|
|
if companyId, ok := queryOptions["companyId"]; ok && companyId.(int64) != 0 {
|
|
|
query = query.Where(`dividends_estimate.company @> '{"companyId":"?"}'`, companyId)
|
|
|
}
|
...
|
...
|
@@ -108,7 +113,7 @@ func (dao *DividendsEstimateDao) CountDividendsEstimate(queryOptions map[string] |
|
|
}
|
|
|
}
|
|
|
|
|
|
// CountDividendsEstimate 统计当前分红预算单总数
|
|
|
// CountDividendsEstimateDividendsAmount 统计当前分红预算单总数
|
|
|
func (dao *DividendsEstimateDao) CountDividendsEstimateDividendsAmount(queryOptions map[string]interface{}) (float64, error) {
|
|
|
tx := dao.transactionContext.PgTx
|
|
|
var dividendsEstimateModels []*models.DividendsEstimate
|
...
|
...
|
|