feat:添加邀请vip人数

develop
old易 2024-03-13 16:18:53 +08:00
parent ec4fad2773
commit 85a61afb06
3 changed files with 16 additions and 1 deletions

View File

@ -240,6 +240,11 @@ namespace New_College.Api.Controllers.Front
FansId = fancId,
SaleId = saleId,
});
var count = (await _fansDistributionServices.Query(e => e.SaleId == saleId)).Count();//判断邀请人数是否满足三个人
if (count >= 3)
{
await _services.UpdateIsVip(saleId);
}
return true;
}
}

View File

@ -13,6 +13,8 @@ namespace New_College.IServices
/// </summary>
public interface IV_CustomerInfoServices : IBaseServices<V_CustomerInfo>
{
Task<bool> UpdateIsVip(int saleId);
Task<CustomerInfoResult> Login(CustomerInfoQuery query);
Task<bool> SendLogin(PhoneQuery query);

View File

@ -40,6 +40,14 @@ namespace New_College.Services
}
/// <summary>
/// 根据要求更新vip状态
/// </summary>
/// <param name="saleId"></param>
public async Task<bool> UpdateIsVip(int saleId)
{
return await this._dal.Update(string.Format("update V_CustomerInfo set IsVIP=1 where Id={0}", saleId));
}
/// <summary>
/// 同步修改密码
/// </summary>
@ -90,7 +98,7 @@ namespace New_College.Services
info.UserPwd = MD5Helper.MD5Encrypt16(query.UserPwd + salt);
}
var result = await _dal.Update(info);
return new CustomerInfoResult()
{
Status = 1,