feat:bug fixed
parent
81e2ddc4ba
commit
245af4e1aa
|
|
@ -196,7 +196,11 @@ namespace New_College.Api.Controllers.Front
|
|||
var result = repUserPhoneNumber.errcode == 0 ? await _services.Update(customerinfo) : false;
|
||||
if (result)
|
||||
{
|
||||
newId = await updatesync(customerinfo.Phone);
|
||||
try
|
||||
{
|
||||
newId = await updatesync(customerinfo.Phone);
|
||||
}catch (Exception ex) {
|
||||
}
|
||||
}
|
||||
return new MessageModel<string>()
|
||||
{
|
||||
|
|
@ -217,10 +221,10 @@ namespace New_College.Api.Controllers.Front
|
|||
var customer = await _services.Query(c => c.Phone == phone);
|
||||
if (customer.Count() > 1)
|
||||
{
|
||||
var exists = customer.Exists(e => e.UUID.Contains("-"));
|
||||
var exists = customer.Exists(e => !string.IsNullOrWhiteSpace(e.UUID));
|
||||
if (exists)
|
||||
{
|
||||
var firstinfo = customer.FirstOrDefault(e => e.UUID.Contains("-"));
|
||||
var firstinfo = customer.FirstOrDefault(e => !string.IsNullOrWhiteSpace(e.UUID));
|
||||
newId = firstinfo.Id;
|
||||
var endinfo = customer.FirstOrDefault(e => e.Id != firstinfo.Id);
|
||||
firstinfo.IsVIP = endinfo.IsVIP ? true : firstinfo.IsVIP;
|
||||
|
|
@ -336,8 +340,10 @@ namespace New_College.Api.Controllers.Front
|
|||
var result = await _services.UpdateScore(query);
|
||||
if (result.Id > 0)
|
||||
{
|
||||
await _userSetting.UpdateSingleCustomerSetting(new UserBaseSettingUpdateDTO() { UType = 0, CustomerId = query.StudentId });//修改参数次数
|
||||
|
||||
if (query.Score != customersingle.Expectedscore)
|
||||
{
|
||||
await _userSetting.UpdateSingleCustomerSetting(new UserBaseSettingUpdateDTO() { UType = 0, CustomerId = query.StudentId });//修改参数次数
|
||||
}
|
||||
var token = JwtHelper.IssueJwt(new TokenModelJwt() { Uid = result.Id, Role = "学生" });
|
||||
result.Token = token;
|
||||
}
|
||||
|
|
@ -360,10 +366,10 @@ namespace New_College.Api.Controllers.Front
|
|||
var result = await _services.UpdateCustomer(query);
|
||||
if (result.Id > 0)
|
||||
{
|
||||
if (query.Expectedscore >= 0)
|
||||
{
|
||||
await _userSetting.UpdateSingleCustomerSetting(new UserBaseSettingUpdateDTO() { UType = 0, CustomerId = query.StudentId });//修改参数次数
|
||||
}
|
||||
//if (query.Expectedscore >= 0)
|
||||
//{
|
||||
// await _userSetting.UpdateSingleCustomerSetting(new UserBaseSettingUpdateDTO() { UType = 0, CustomerId = query.StudentId });//修改参数次数
|
||||
//}
|
||||
var token = JwtHelper.IssueJwt(new TokenModelJwt() { Uid = result.Id, Role = "学生" });
|
||||
result.Token = token;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,12 +29,14 @@ namespace New_College.Services
|
|||
private readonly IBaseRepository<V_CustomerInfo> _dal;
|
||||
private readonly IT_BatchlineRepository t_BatchlineRepository;
|
||||
private readonly ICasdoorUserRepository _casdoorUserRepository;
|
||||
public V_CustomerInfoServices(IBaseRepository<V_CustomerInfo> dal, IT_BatchlineRepository t_Batchline, ICasdoorUserRepository casdoorUserRepository)
|
||||
private readonly ID_UserSettingBaseServices _userSetting;
|
||||
public V_CustomerInfoServices(IBaseRepository<V_CustomerInfo> dal, IT_BatchlineRepository t_Batchline, ICasdoorUserRepository casdoorUserRepository, ID_UserSettingBaseServices userSetting)
|
||||
{
|
||||
this._dal = dal;
|
||||
base.BaseDal = dal;
|
||||
t_BatchlineRepository = t_Batchline;
|
||||
_casdoorUserRepository = casdoorUserRepository;
|
||||
_userSetting = userSetting;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -76,8 +78,7 @@ namespace New_College.Services
|
|||
//info.Phone = query.Phone;
|
||||
info.Gender = query.Gender;
|
||||
info.AvatarUrl = query.AvatarUrl;
|
||||
DingHookHelper.DingTalkHookMessage("CasDoorUpdate", query.service_token);
|
||||
|
||||
var result = await _dal.Update(info);
|
||||
if (!string.IsNullOrWhiteSpace(query.UserPwd))
|
||||
{
|
||||
UpdateCasdoorPwd(new CasDoorUpdatePwdDto()
|
||||
|
|
@ -89,7 +90,6 @@ namespace New_College.Services
|
|||
var salt = RadomHelper.RandCode(6);
|
||||
info.UserPwd = MD5Helper.MD5Encrypt16(query.UserPwd + salt);
|
||||
}
|
||||
var result = await _dal.Update(info);
|
||||
return new CustomerInfoResult()
|
||||
{
|
||||
Status = 1,
|
||||
|
|
@ -213,8 +213,11 @@ namespace New_College.Services
|
|||
}
|
||||
if (query.Expectedscore > 0)
|
||||
{
|
||||
|
||||
info.Expectedscore = query.Expectedscore;
|
||||
if (query.Expectedscore != info.Expectedscore)
|
||||
{
|
||||
await _userSetting.UpdateSingleCustomerSetting(new UserBaseSettingUpdateDTO() { UType = 0, CustomerId = query.StudentId });//修改参数次数
|
||||
info.Expectedscore = query.Expectedscore;
|
||||
}
|
||||
}
|
||||
if (query.Year > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue