合并分支 'dev' 到 'test'
fix:修复分红预算单号生成错误 查看合并请求 !38
正在显示
1 个修改的文件
包含
6 行增加
和
1 行删除
@@ -95,6 +95,11 @@ func (dao *DividendsEstimateDao) CountDividendsEstimate(queryOptions map[string] | @@ -95,6 +95,11 @@ func (dao *DividendsEstimateDao) CountDividendsEstimate(queryOptions map[string] | ||
95 | tx := dao.transactionContext.PgTx | 95 | tx := dao.transactionContext.PgTx |
96 | var dividendsEstimateModels []*models.DividendsEstimate | 96 | var dividendsEstimateModels []*models.DividendsEstimate |
97 | query := tx.Model(÷ndsEstimateModels) | 97 | query := tx.Model(÷ndsEstimateModels) |
98 | + currentTime := time.Now() | ||
99 | + todayZeroTime := utils.GetZeroTime(currentTime) | ||
100 | + nextDayZeroTime := utils.GetNextDayZeroTime(currentTime) | ||
101 | + query.Where("dividends_estimate.created_at >= ?", todayZeroTime) | ||
102 | + query.Where("dividends_estimate.created_at < ?", nextDayZeroTime) | ||
98 | if companyId, ok := queryOptions["companyId"]; ok && companyId.(int64) != 0 { | 103 | if companyId, ok := queryOptions["companyId"]; ok && companyId.(int64) != 0 { |
99 | query = query.Where(`dividends_estimate.company @> '{"companyId":"?"}'`, companyId) | 104 | query = query.Where(`dividends_estimate.company @> '{"companyId":"?"}'`, companyId) |
100 | } | 105 | } |
@@ -108,7 +113,7 @@ func (dao *DividendsEstimateDao) CountDividendsEstimate(queryOptions map[string] | @@ -108,7 +113,7 @@ func (dao *DividendsEstimateDao) CountDividendsEstimate(queryOptions map[string] | ||
108 | } | 113 | } |
109 | } | 114 | } |
110 | 115 | ||
111 | -// CountDividendsEstimate 统计当前分红预算单总数 | 116 | +// CountDividendsEstimateDividendsAmount 统计当前分红预算单总数 |
112 | func (dao *DividendsEstimateDao) CountDividendsEstimateDividendsAmount(queryOptions map[string]interface{}) (float64, error) { | 117 | func (dao *DividendsEstimateDao) CountDividendsEstimateDividendsAmount(queryOptions map[string]interface{}) (float64, error) { |
113 | tx := dao.transactionContext.PgTx | 118 | tx := dao.transactionContext.PgTx |
114 | var dividendsEstimateModels []*models.DividendsEstimate | 119 | var dividendsEstimateModels []*models.DividendsEstimate |
-
请 注册 或 登录 后发表评论