feat:添加邀请vip人数
parent
ec4fad2773
commit
85a61afb06
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue