feat:新增vip获取相对应权限接口
parent
8886d7acf1
commit
cf386707bc
|
|
@ -19,12 +19,15 @@ namespace New_College.Api.Controllers.Back
|
||||||
private readonly IV_VipCardInfoServices iV_VipCardInfoServices;
|
private readonly IV_VipCardInfoServices iV_VipCardInfoServices;
|
||||||
private readonly IV_VipCardTypeServices iV_VipCardTypeServices;
|
private readonly IV_VipCardTypeServices iV_VipCardTypeServices;
|
||||||
private readonly IV_OrderInfoServices iV_OrderInfoServices;
|
private readonly IV_OrderInfoServices iV_OrderInfoServices;
|
||||||
public VipCardController(IV_VipCardInfoServices IV_VipCardInfoServices, IV_VipCardTypeServices IV_VipCardTypeServices, IV_OrderInfoServices IV_OrderInfoServices)
|
private readonly IV_CustomerInfoServices _CustomerInfoServices;
|
||||||
|
|
||||||
|
public VipCardController(IV_VipCardInfoServices IV_VipCardInfoServices, IV_VipCardTypeServices IV_VipCardTypeServices, IV_OrderInfoServices IV_OrderInfoServices, IV_CustomerInfoServices customerInfoServices)
|
||||||
{
|
{
|
||||||
iV_VipCardInfoServices = IV_VipCardInfoServices;
|
iV_VipCardInfoServices = IV_VipCardInfoServices;
|
||||||
iV_VipCardTypeServices = IV_VipCardTypeServices;
|
iV_VipCardTypeServices = IV_VipCardTypeServices;
|
||||||
iV_OrderInfoServices= IV_OrderInfoServices;
|
iV_OrderInfoServices = IV_OrderInfoServices;
|
||||||
}
|
_CustomerInfoServices = customerInfoServices;
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生成卡信息
|
/// 生成卡信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -98,5 +101,50 @@ namespace New_College.Api.Controllers.Back
|
||||||
{
|
{
|
||||||
return await iV_VipCardTypeServices.GetVipCardType();
|
return await iV_VipCardTypeServices.GetVipCardType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据用户是否为Vip获取相应权限
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="query"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<VipPowerRolesViewsDTO> CheckRoles([FromQuery] IdQuery query)
|
||||||
|
{
|
||||||
|
var response = new VipPowerRolesViewsDTO();
|
||||||
|
var custom = await _CustomerInfoServices.Query(c => c.Id == query.CustomerId);
|
||||||
|
if (custom.Any())
|
||||||
|
{
|
||||||
|
response.IsVip = custom.FirstOrDefault().IsVIP;
|
||||||
|
response.pcRole = new PCRole()
|
||||||
|
{
|
||||||
|
ScoreCount = 10,
|
||||||
|
SearchCount = 99999
|
||||||
|
};
|
||||||
|
response.minProRole = new MinProRole()
|
||||||
|
{
|
||||||
|
ScoreCount = 10,
|
||||||
|
SearchCount = 99999
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
response.IsVip = false;
|
||||||
|
response.pcRole = new PCRole()
|
||||||
|
{
|
||||||
|
ScoreCount = 1,
|
||||||
|
SearchCount = 10
|
||||||
|
};
|
||||||
|
response.minProRole = new MinProRole()
|
||||||
|
{
|
||||||
|
ScoreCount = 1,
|
||||||
|
SearchCount = 10
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6775,6 +6775,36 @@
|
||||||
到期时间
|
到期时间
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.VipPowerRolesViewsDTO.pcRole">
|
||||||
|
<summary>
|
||||||
|
pc端权限
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.VipPowerRolesViewsDTO.minProRole">
|
||||||
|
<summary>
|
||||||
|
小程序权限
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.PCRole.ScoreCount">
|
||||||
|
<summary>
|
||||||
|
成绩更改次数
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.PCRole.SearchCount">
|
||||||
|
<summary>
|
||||||
|
模块查看次数
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.MinProRole.ScoreCount">
|
||||||
|
<summary>
|
||||||
|
成绩更改次数
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.MinProRole.SearchCount">
|
||||||
|
<summary>
|
||||||
|
模块查看次数
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:New_College.Model.ViewModels.UniversityEnrollmentPlanLazyResult">
|
<member name="T:New_College.Model.ViewModels.UniversityEnrollmentPlanLazyResult">
|
||||||
<summary>
|
<summary>
|
||||||
志愿填报推荐一级懒人专用
|
志愿填报推荐一级懒人专用
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,13 @@
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:New_College.Api.Controllers.Back.VipCardController.CheckRoles(New_College.Model.ViewModels.IdQuery)">
|
||||||
|
<summary>
|
||||||
|
根据用户是否为Vip获取相应权限
|
||||||
|
</summary>
|
||||||
|
<param name="query"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="F:New_College.Api.Controllers.D_PlanMajorDescController._d_PlanMajorDescServices">
|
<member name="F:New_College.Api.Controllers.D_PlanMajorDescController._d_PlanMajorDescServices">
|
||||||
<summary>
|
<summary>
|
||||||
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
|
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
|
||||||
|
|
@ -211,6 +218,12 @@
|
||||||
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
|
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:New_College.Api.Controllers.Front.CustomerController.AccountCancel(New_College.Model.Request.LoginQuery)">
|
||||||
|
<summary>
|
||||||
|
账号注销
|
||||||
|
</summary>
|
||||||
|
<returns>传入OpenId</returns>
|
||||||
|
</member>
|
||||||
<member name="M:New_College.Api.Controllers.Front.CustomerController.GetWxOpenId(New_College.Model.WeixinLogin)">
|
<member name="M:New_College.Api.Controllers.Front.CustomerController.GetWxOpenId(New_College.Model.WeixinLogin)">
|
||||||
<summary>
|
<summary>
|
||||||
获取微信openid
|
获取微信openid
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace New_College.Model.ViewModels
|
||||||
|
{
|
||||||
|
public class VipPowerRolesViewsDTO
|
||||||
|
{
|
||||||
|
public bool IsVip { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// pc端权限
|
||||||
|
/// </summary>
|
||||||
|
public PCRole pcRole { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 小程序权限
|
||||||
|
/// </summary>
|
||||||
|
public MinProRole minProRole { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PCRole
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 成绩更改次数
|
||||||
|
/// </summary>
|
||||||
|
public int ScoreCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模块查看次数
|
||||||
|
/// </summary>
|
||||||
|
public int SearchCount { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class MinProRole
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 成绩更改次数
|
||||||
|
/// </summary>
|
||||||
|
public int ScoreCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模块查看次数
|
||||||
|
/// </summary>
|
||||||
|
public int SearchCount { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue