|
@@ -85,6 +85,8 @@ func AggregateMonthlyLearnTime(colls *mongo.Collection, uid string, learnType st
|
|
|
|
|
|
{
|
|
{
|
|
{Key: "$match", Value: bson.D{
|
|
{Key: "$match", Value: bson.D{
|
|
|
|
+ {Key: "uid", Value: uid},
|
|
|
|
+ {Key: "type", Value: learnType},
|
|
{Key: "createTime", Value: bson.D{
|
|
{Key: "createTime", Value: bson.D{
|
|
{Key: "$gte", Value: time.Date(year, time.January, 1, 0, 0, 0, 0, chinaTimeZone)},
|
|
{Key: "$gte", Value: time.Date(year, time.January, 1, 0, 0, 0, 0, chinaTimeZone)},
|
|
{Key: "$lt", Value: time.Date(year+1, time.January, 1, 0, 0, 0, 0, chinaTimeZone)},
|
|
{Key: "$lt", Value: time.Date(year+1, time.January, 1, 0, 0, 0, 0, chinaTimeZone)},
|