update customer endpoint response (add credit pros) and add access token validaity time in app settings
This commit is contained in:
parent
5778ee9203
commit
0250908261
|
|
@ -54,6 +54,7 @@ namespace OnlineSalesAutoCrop.CoreAPI.Models.Global
|
||||||
public bool JwtValidateIssuer { get; set; }
|
public bool JwtValidateIssuer { get; set; }
|
||||||
public bool JwtValidateAudience { get; set; }
|
public bool JwtValidateAudience { get; set; }
|
||||||
public int RefreshTokenDuration { get; set; }
|
public int RefreshTokenDuration { get; set; }
|
||||||
|
public int AccessTokenDuration { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Folder management
|
/// Folder management
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,11 @@ public class GetCustomerResponse
|
||||||
public string SalesOrgCode { get; set; }
|
public string SalesOrgCode { get; set; }
|
||||||
public string TeritoryCode { get; set; }
|
public string TeritoryCode { get; set; }
|
||||||
public string PlantCode { get; set; }
|
public string PlantCode { get; set; }
|
||||||
|
public bool IsCreditCustomer { get; set; }
|
||||||
|
public decimal CreditLimit { get; set; }
|
||||||
|
public decimal CreditBalance { get; set; }
|
||||||
|
public decimal CreditAvailable => CreditLimit - CreditBalance;
|
||||||
|
public decimal CreditOverdue { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,11 @@ public class MobileMasterDataService : IMobileMasterDataService
|
||||||
PaymentTermCode = dr.GetString(17),
|
PaymentTermCode = dr.GetString(17),
|
||||||
TeritoryCode = dr.GetString(18),
|
TeritoryCode = dr.GetString(18),
|
||||||
SalesOrgCode = dr.GetString(19),
|
SalesOrgCode = dr.GetString(19),
|
||||||
PlantCode = dr.GetString(20)
|
PlantCode = dr.GetString(20),
|
||||||
|
IsCreditCustomer = dr.GetInt32(21) > 0 ,
|
||||||
|
CreditLimit = dr.GetDecimal(22),
|
||||||
|
CreditBalance = dr.GetDecimal(23),
|
||||||
|
CreditOverdue = dr.GetDecimal(24),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
dr.Close();
|
dr.Close();
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ namespace OnlineSalesAutoCrop.CoreAPI.Controllers
|
||||||
Helper.CreateClaim("Mobile", $"{loginReponse.MobileNumber}"),
|
Helper.CreateClaim("Mobile", $"{loginReponse.MobileNumber}"),
|
||||||
Helper.CreateClaim("HashKey", Guid.NewGuid().ToString())
|
Helper.CreateClaim("HashKey", Guid.NewGuid().ToString())
|
||||||
]),
|
]),
|
||||||
Expires = DateTime.UtcNow.AddHours(12),
|
Expires = DateTime.UtcNow.AddMinutes(_appSettings.AccessTokenDuration),
|
||||||
SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha512Signature)
|
SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha512Signature)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,8 @@
|
||||||
"WaAuthToken": "024a6897584671d9f9fa588d7c94aa96",
|
"WaAuthToken": "024a6897584671d9f9fa588d7c94aa96",
|
||||||
"WaMsgSvcSid": "MG8401d33a9a3b2aea95619bda3e5757b5",
|
"WaMsgSvcSid": "MG8401d33a9a3b2aea95619bda3e5757b5",
|
||||||
"WaSenderId": "+8801326755660",
|
"WaSenderId": "+8801326755660",
|
||||||
"RefreshTokenDuration": "15"
|
"RefreshTokenDuration": "15",
|
||||||
|
"AccessTokenDuration": "60"
|
||||||
},
|
},
|
||||||
|
|
||||||
"MenuSettings": {
|
"MenuSettings": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user