【新增】后台用户列表,积分调整为可用积分,增加累计积分列及可点击列表展示。

This commit is contained in:
大灰灰
2022-08-09 00:56:47 +08:00
parent a581e19421
commit e34dff3f64
5 changed files with 37 additions and 9 deletions

View File

@@ -20,7 +20,6 @@ using CoreCms.Net.Model.Entities.Expression;
using CoreCms.Net.Model.FromBody;
using CoreCms.Net.Model.ViewModels.Basics;
using CoreCms.Net.Model.ViewModels.UI;
using CoreCms.Net.Model.ViewModels.DTO;
using CoreCms.Net.Utility.Extensions;
using CoreCms.Net.Utility.Helper;
using SqlSugar;
@@ -52,6 +51,7 @@ namespace CoreCms.Net.Repository
//本月第一天时间
DateTime dtFirst = dt.AddDays(1 - (dt.Day));
dtFirst = new DateTime(dtFirst.Year, dtFirst.Month, dtFirst.Day, 0, 0, 0);
//获得某年某月的天数
int year = dt.Date.Year;
int month = dt.Date.Month;
@@ -133,7 +133,8 @@ namespace CoreCms.Net.Repository
isDelete = p.isDelete,
type = (int)sWeChatInfo.type,
parentNickName = sParentUser.nickName,
childNum = SqlFunc.Subqueryable<CoreCmsUser>().Where(o => o.parentId == p.id).Count()
childNum = SqlFunc.Subqueryable<CoreCmsUser>().Where(o => o.parentId == p.id).Count(),
accumulativePoint = SqlFunc.Subqueryable<CoreCmsUserPointLog>().Where(o => o.userId == p.id && o.num > 0).Sum(c => c.num),
})
.MergeTable().With(SqlWith.Null)
.OrderBy(orderByExpression, orderByType)
@@ -179,7 +180,7 @@ namespace CoreCms.Net.Repository
{
var dt = DateTime.Now;
var where = PredicateBuilder.True<CoreCmsOrder>();
var currDay = DateTime.Now.ToString("yyyy-MM-dd");
string currDay;
if (i == 0)
{
where = where.And(p => p.createTime < DateTime.Now);