diff --git a/New_College.Api/Controllers/Back/VipCardController.cs b/New_College.Api/Controllers/Back/VipCardController.cs
index ad19718..c67c4fc 100644
--- a/New_College.Api/Controllers/Back/VipCardController.cs
+++ b/New_College.Api/Controllers/Back/VipCardController.cs
@@ -19,12 +19,15 @@ namespace New_College.Api.Controllers.Back
private readonly IV_VipCardInfoServices iV_VipCardInfoServices;
private readonly IV_VipCardTypeServices iV_VipCardTypeServices;
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_VipCardTypeServices = IV_VipCardTypeServices;
- iV_OrderInfoServices= IV_OrderInfoServices;
- }
+ iV_OrderInfoServices = IV_OrderInfoServices;
+ _CustomerInfoServices = customerInfoServices;
+ }
///
/// 生成卡信息
///
@@ -98,5 +101,50 @@ namespace New_College.Api.Controllers.Back
{
return await iV_VipCardTypeServices.GetVipCardType();
}
+
+
+
+ ///
+ /// 根据用户是否为Vip获取相应权限
+ ///
+ ///
+ ///
+ [HttpGet]
+ public async Task 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;
+ }
+
}
}
diff --git a/New_College.Api/New_College.Model.xml b/New_College.Api/New_College.Model.xml
index afc3edf..84d09fe 100644
--- a/New_College.Api/New_College.Model.xml
+++ b/New_College.Api/New_College.Model.xml
@@ -6775,6 +6775,36 @@
到期时间
+
+
+ pc端权限
+
+
+
+
+ 小程序权限
+
+
+
+
+ 成绩更改次数
+
+
+
+
+ 模块查看次数
+
+
+
+
+ 成绩更改次数
+
+
+
+
+ 模块查看次数
+
+
志愿填报推荐一级懒人专用
diff --git a/New_College.Api/New_College.xml b/New_College.Api/New_College.xml
index 3e0920b..d9ed6bc 100644
--- a/New_College.Api/New_College.xml
+++ b/New_College.Api/New_College.xml
@@ -108,6 +108,13 @@
+
+
+ 根据用户是否为Vip获取相应权限
+
+
+
+
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
@@ -211,6 +218,12 @@
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
+
+
+ 账号注销
+
+ 传入OpenId
+
获取微信openid
diff --git a/New_College.Model/ViewModels/Result/VipPowerRolesViews.cs b/New_College.Model/ViewModels/Result/VipPowerRolesViews.cs
new file mode 100644
index 0000000..53146bf
--- /dev/null
+++ b/New_College.Model/ViewModels/Result/VipPowerRolesViews.cs
@@ -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; }
+ ///
+ /// pc端权限
+ ///
+ public PCRole pcRole { get; set; }
+
+ ///
+ /// 小程序权限
+ ///
+ public MinProRole minProRole { get; set; }
+
+ }
+
+ public class PCRole
+ {
+ ///
+ /// 成绩更改次数
+ ///
+ public int ScoreCount { get; set; }
+
+ ///
+ /// 模块查看次数
+ ///
+ public int SearchCount { get; set; }
+
+ }
+
+ public class MinProRole
+ {
+ ///
+ /// 成绩更改次数
+ ///
+ public int ScoreCount { get; set; }
+
+ ///
+ /// 模块查看次数
+ ///
+ public int SearchCount { get; set; }
+
+ }
+
+}