合并分支 'dev' 到 'test'
fix:统计增加销售日期限制 查看合并请求 !57
正在显示
1 个修改的文件
包含
11 行增加
和
5 行删除
@@ -146,7 +146,13 @@ func getJoinWays(transactionContext *transaction.TransactionContext) (joinWays [ | @@ -146,7 +146,13 @@ func getJoinWays(transactionContext *transaction.TransactionContext) (joinWays [ | ||
146 | return | 146 | return |
147 | } | 147 | } |
148 | 148 | ||
149 | -// 获取公司统计 | 149 | +/** |
150 | + * @Author SteveChan | ||
151 | + * @Description //TODO 获取公司统计,增加销售日期限制 | ||
152 | + * @Date 02:45 2021/2/3 | ||
153 | + * @Param | ||
154 | + * @return | ||
155 | + **/ | ||
150 | func getStatistics(userId int64, transactionContext *transaction.TransactionContext) (interface{}, error) { | 156 | func getStatistics(userId int64, transactionContext *transaction.TransactionContext) (interface{}, error) { |
151 | var ( | 157 | var ( |
152 | UsersRepository, _ = factory.CreateUsersRepository(transactionContext) | 158 | UsersRepository, _ = factory.CreateUsersRepository(transactionContext) |
@@ -174,19 +180,19 @@ func getStatistics(userId int64, transactionContext *transaction.TransactionCont | @@ -174,19 +180,19 @@ func getStatistics(userId int64, transactionContext *transaction.TransactionCont | ||
174 | if count, e := PartnerInfoDao.PartnerStatic(map[string]interface{}{"inPartnerIds": partnerIds, "inPartnerCategory": domain.App}); e == nil { | 180 | if count, e := PartnerInfoDao.PartnerStatic(map[string]interface{}{"inPartnerIds": partnerIds, "inPartnerCategory": domain.App}); e == nil { |
175 | Statistics["appCount"] = count | 181 | Statistics["appCount"] = count |
176 | } | 182 | } |
177 | - if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Career}); e == nil { | 183 | + if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Career, EndTime: utils.GetDayEnd().Unix() * 1000}); e == nil { |
178 | Statistics["careerOrdersMoney"] = bonus.TotalOrderAmount | 184 | Statistics["careerOrdersMoney"] = bonus.TotalOrderAmount |
179 | Statistics["careerDividend"] = bonus.Bonus | 185 | Statistics["careerDividend"] = bonus.Bonus |
180 | } | 186 | } |
181 | - if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Business}); e == nil { | 187 | + if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Business, EndTime: utils.GetDayEnd().Unix() * 1000}); e == nil { |
182 | Statistics["businessOrdersMoney"] = bonus.TotalOrderAmount | 188 | Statistics["businessOrdersMoney"] = bonus.TotalOrderAmount |
183 | Statistics["businessDividend"] = bonus.Bonus | 189 | Statistics["businessDividend"] = bonus.Bonus |
184 | } | 190 | } |
185 | - if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Develop}); e == nil { | 191 | + if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.Develop, EndTime: utils.GetDayEnd().Unix() * 1000}); e == nil { |
186 | Statistics["developOrdersMoney"] = bonus.TotalOrderAmount | 192 | Statistics["developOrdersMoney"] = bonus.TotalOrderAmount |
187 | Statistics["developDividend"] = bonus.Bonus | 193 | Statistics["developDividend"] = bonus.Bonus |
188 | } | 194 | } |
189 | - if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.App}); e == nil { | 195 | + if bonus, e := OrderBaseDao.OrderBonusStatics(domain.OrderBonusQuery{InPartnerIds: partnerIds, OrderTypes: domain.UserOrderTypes(domain.Career), PartnerCategoryId: domain.App, EndTime: utils.GetDayEnd().Unix() * 1000}); e == nil { |
190 | Statistics["appOrdersMoney"] = bonus.TotalOrderAmount | 196 | Statistics["appOrdersMoney"] = bonus.TotalOrderAmount |
191 | Statistics["appDividend"] = bonus.Bonus | 197 | Statistics["appDividend"] = bonus.Bonus |
192 | } | 198 | } |
-
请 注册 或 登录 后发表评论