feat: 上线财富排行榜
This commit is contained in:
@@ -34,13 +34,13 @@ namespace Yi.Framework.Bbs.Application.Services.Analyses
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("analyse/bbs-user/register")]
|
||||
public async Task<List<RegisterAnalyseDto>> GetRegisterAsync([FromQuery] PagedResultRequestDto input)
|
||||
public async Task<List<RegisterAnalyseDto>> GetRegisterAsync()
|
||||
|
||||
{
|
||||
using (DataFilter.DisablePermissionHandler())
|
||||
{
|
||||
var users = await _bbsUserManager._userRepository._DbQueryable
|
||||
.Where(u=>u.CreationTime>=DateTime.Now.AddMonths(-3))
|
||||
.Where(u => u.CreationTime >= DateTime.Now.AddMonths(-3))
|
||||
.LeftJoin<BbsUserExtraInfoEntity>((u, info) => u.Id == info.UserId)
|
||||
.Select((u, info) => new BbsUserGetListOutputDto()
|
||||
{
|
||||
@@ -52,7 +52,6 @@ namespace Yi.Framework.Bbs.Application.Services.Analyses
|
||||
Experience = info.Experience,
|
||||
CreationTime = u.CreationTime
|
||||
})
|
||||
|
||||
.ToListAsync();
|
||||
|
||||
var minCreateUser = users.MinBy(x => x.CreationTime);
|
||||
@@ -84,11 +83,15 @@ namespace Yi.Framework.Bbs.Application.Services.Analyses
|
||||
/// 财富排行榜
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("analyse/bbs-user/money-top")]
|
||||
public async Task<PagedResultDto<MoneyTopUserDto>> GetMoneyTopAsync([FromQuery] PagedResultRequestDto input)
|
||||
[HttpGet("analyse/bbs-user/money-top/{userId?}")]
|
||||
public async Task<PagedResultDto<MoneyTopUserDto>> GetMoneyTopAsync([FromQuery] PagedResultRequestDto input,
|
||||
[FromRoute] Guid? userId)
|
||||
{
|
||||
using (DataFilter.DisablePermissionHandler())
|
||||
{
|
||||
var pageIndex = input.SkipCount;
|
||||
|
||||
|
||||
RefAsync<int> total = 0;
|
||||
var output = await _bbsUserManager._userRepository._DbQueryable
|
||||
.LeftJoin<BbsUserExtraInfoEntity>((u, info) => u.Id == info.UserId)
|
||||
@@ -102,10 +105,10 @@ namespace Yi.Framework.Bbs.Application.Services.Analyses
|
||||
Icon = u.Icon,
|
||||
Level = info.Level,
|
||||
UserLimit = info.UserLimit,
|
||||
Order = SqlFunc.RowNumber(u.Id)
|
||||
Order = SqlFunc.RowNumber(SqlFunc.Desc(info.Money))
|
||||
}
|
||||
)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
.ToPageListAsync(pageIndex, input.MaxResultCount, total);
|
||||
|
||||
output.ForEach(x => { x.LevelName = _bbsUserManager._levelCacheDic[x.Level].Name; });
|
||||
return new PagedResultDto<MoneyTopUserDto>
|
||||
|
||||
@@ -12,14 +12,13 @@
|
||||
<div class="nick" :class="{ mt_1: props.time != 'undefined' }">
|
||||
<div class="text">{{ userInfo.nick }}</div>
|
||||
<div class="level">
|
||||
<el-tag round effect="light" type="success" v-if="userInfo.level"
|
||||
>{{ userInfo.level }}-{{userInfo.levelName}} 等级</el-tag
|
||||
>
|
||||
<el-tag round effect="light" type="success" v-if="userInfo.level">{{ userInfo.level
|
||||
}}-{{ userInfo.levelName }} 等级</el-tag>
|
||||
</div>
|
||||
<div class="status" v-if="userInfo.userLimit">
|
||||
|
||||
<UserLimitTag :userLimit="userInfo.userLimit"/>
|
||||
|
||||
<UserLimitTag :userLimit="userInfo.userLimit" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="remarks" v-if="props.time">{{ props.time }}</div>
|
||||
@@ -32,13 +31,7 @@
|
||||
<el-tag class="ml-2" type="warning">V8</el-tag>
|
||||
<el-tag class="ml-2" type="danger">核心</el-tag>
|
||||
</div>
|
||||
<el-button
|
||||
v-if="props.showWatching"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="Plus"
|
||||
>关注</el-button
|
||||
>
|
||||
<el-button v-if="props.showWatching" type="primary" size="small" icon="Plus">关注</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -71,7 +64,7 @@ const userInfo = reactive({
|
||||
id: "",
|
||||
level: "",
|
||||
userLimit: "",
|
||||
userName:""
|
||||
userName: ""
|
||||
});
|
||||
const iconUrl = ref("/acquiesce.png");
|
||||
const iconUrlHandler = (icon) => {
|
||||
@@ -109,11 +102,11 @@ const Init = () => {
|
||||
userInfo.nick = props.userInfo.nick;
|
||||
userInfo.role = props.userInfo.role;
|
||||
userInfo.id = props.userInfo.id;
|
||||
userInfo.money=props.userInfo.money;
|
||||
userInfo.money = props.userInfo.money;
|
||||
userInfo.level = props.userInfo.level;
|
||||
userInfo.userLimit = props.userInfo.userLimit;
|
||||
userInfo.userName= props.userInfo.userName;
|
||||
userInfo.levelName= props.userInfo.levelName;
|
||||
userInfo.userName = props.userInfo.userName;
|
||||
userInfo.levelName = props.userInfo.levelName;
|
||||
iconUrl.value = iconUrlHandler(userInfo.icon);
|
||||
}
|
||||
|
||||
@@ -154,6 +147,7 @@ const Init = () => {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.avatar-left,
|
||||
@@ -161,15 +155,18 @@ const Init = () => {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.content {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.nick {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-weight: bold;
|
||||
> div {
|
||||
|
||||
>div {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
@@ -179,6 +176,7 @@ const Init = () => {
|
||||
display: flex;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.el-avatar {
|
||||
margin-right: 1rem;
|
||||
--el-avatar-bg-color: none;
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5" :route="{ path: '/activity/bank' }">
|
||||
<el-icon>
|
||||
<Money />
|
||||
<CreditCard />
|
||||
</el-icon> <span>银行</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="6" :route="{ path: '/activity/x' }">
|
||||
<el-menu-item index="6" :route="{ path: '/activity/money' }">
|
||||
<el-icon>
|
||||
<Sunrise />
|
||||
<Money />
|
||||
</el-icon>
|
||||
<span>娱乐城(暂未开放)</span>
|
||||
<span>排行榜</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
|
||||
|
||||
@@ -103,10 +103,10 @@
|
||||
|
||||
<el-dialog v-model="accessLogDialogVisible" title="全站历史统计" width="1200px" center>
|
||||
<el-tabs v-model="accessLogTab">
|
||||
<el-tab-pane label="访问统计" name="AccessLogChart" style="display: flex;justify-content: center;">
|
||||
<el-tab-pane label="访问统计(近3月)" name="AccessLogChart" style="display: flex;justify-content: center;">
|
||||
<AccessLogChart :option="accessLogOptins" style="height: 600px;width: 1200px;" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="注册统计" name="RegisterChart" style="display: flex;justify-content: center;">
|
||||
<el-tab-pane label="注册统计(近3月)" name="RegisterChart" style="display: flex;justify-content: center;">
|
||||
<AccessLogChart :option="registerLogOptins" style="height: 600px;width: 1200px;" />
|
||||
</el-tab-pane>
|
||||
|
||||
@@ -241,10 +241,10 @@ const activeList = [
|
||||
{ name: "签到", path: "/activity/sign", icon: "Present" },
|
||||
{ name: "等级", path: "/activity/level", icon: "Ticket" },
|
||||
{ name: "大转盘", path: "/activity/lucky", icon: "Sunny" },
|
||||
{ name: "银行", path: "/activity/bank", icon: "Money" },
|
||||
{ name: "银行", path: "/activity/bank", icon: "CreditCard" },
|
||||
|
||||
{ name: "任务", path: "/activity/sign", icon: "Memo" },
|
||||
{ name: "娱乐城", path: "/activity/sign", icon: "Sunrise" },
|
||||
{ name: "排行榜", path: "/activity/money", icon: "Money" },
|
||||
{ name: "开始", path: "/start", icon: "Position" },
|
||||
{ name: "聊天室", path: "/chat", icon: "ChatRound" },
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user