64 changed files with 1500 additions and 631 deletions
-
5Source/DealerSelection.Api.Models/AuthValidateModel.cs
-
28Source/DealerSelection.Api.Models/CustomerDealerInfoRequest.cs
-
10Source/DealerSelection.Api.Models/DealerSelectionJobStatus.cs
-
7Source/DealerSelection.Api.Models/Enum/CCAvenueTransactionStatus.cs
-
8Source/DealerSelection.Api.Models/Enum/DealerSelectedMode.cs
-
10Source/DealerSelection.Api.Models/Enum/DealerSelectionJobStatus.cs
-
12Source/DealerSelection.Api.Models/ModelDetail.cs
-
58Source/DealerSelection.Api.Models/MulesoftCustomerInfo.cs
-
16Source/DealerSelection.Api.Models/Procedure.cs
-
23Source/DealerSelection.Api.Models/RefundApiResponse.cs
-
31Source/DealerSelection.Api.Models/WebEngageEvent.cs
-
92Source/DealerSelection.Api/AssignDealerApi.cs
-
42Source/DealerSelection.Api/BatchJobApi.cs
-
BINSource/DealerSelection.Api/CCAvenue/MCPG.CCA.Util.dll
-
190Source/DealerSelection.Api/CCAvenueApi.cs
-
95Source/DealerSelection.Api/CommonUtil/CustomConfig.cs
-
8Source/DealerSelection.Api/InfoBipSmsServiceApi.cs
-
39Source/DealerSelection.Api/JwtTokenApi.cs
-
348Source/DealerSelection.Api/MulesoftApi.cs
-
6Source/DealerSelection.Api/MulesoftTokenApi.cs
-
95Source/DealerSelection.Api/YellowAIApi.cs
-
21Source/DealerSelection.Common/CommonBaseClass/StartupBase.cs
-
9Source/DealerSelection.DependencyInjection/ApiRegistry.cs
-
15Source/DealerSelection.DependencyInjection/InfrastructureRegistry.cs
-
2Source/DealerSelection.Infrastructure/AssignDealer/IAssignDealerRepository.cs
-
2Source/DealerSelection.Infrastructure/AssignDealer/Repository.cs
-
9Source/DealerSelection.Infrastructure/BatchJob/IRepository.cs
-
37Source/DealerSelection.Infrastructure/BatchJob/Repository.cs
-
16Source/DealerSelection.Infrastructure/CCAvenue/Dto.cs
-
8Source/DealerSelection.Infrastructure/CCAvenue/IRepository.cs
-
74Source/DealerSelection.Infrastructure/CCAvenue/Repository.cs
-
14Source/DealerSelection.Infrastructure/CustomerDetail/CustomerDto.cs
-
5Source/DealerSelection.Infrastructure/CustomerDetail/CustomerInfoDto.cs
-
9Source/DealerSelection.Infrastructure/CustomerDetail/IRepository.cs
-
79Source/DealerSelection.Infrastructure/CustomerDetail/Repository.cs
-
2Source/DealerSelection.Infrastructure/InfoBip/Repository.cs
-
7Source/DealerSelection.Infrastructure/Mulesoft/MulesoftCustomerInfoDto.cs
-
8Source/DealerSelection.Infrastructure/Mulesoft/Repository.cs
-
8Source/DealerSelection.Infrastructure/YellowAI/IRepository.cs
-
14Source/DealerSelection.Infrastructure/YellowAI/ModelDetailDto.cs
-
44Source/DealerSelection.Infrastructure/YellowAI/Repository.cs
-
7Source/DealerSelection.Interface/IBatchJobApi.cs
-
9Source/DealerSelection.Interface/ICCAvenueApi.cs
-
12Source/DealerSelection.Interface/IMulesoftApi.cs
-
4Source/DealerSelection.Interface/IYellowAIApi.cs
-
9Source/DealerSelection.WebApi.Models/CustomerInfoRequest.cs
-
6Source/DealerSelection.WebApi.Models/ModelDetail.cs
-
9Source/DealerSelection.WebApi.Models/ModelDetailRequest.cs
-
8Source/DealerSelection.WebApi.Models/RefundRequest.cs
-
13Source/DealerSelection.WebApi.Models/RefundResponse.cs
-
13Source/DealerSelection.WebApi/App_Start/Mapper.cs
-
32Source/DealerSelection.WebApi/Controllers/BatchJobController.cs
-
35Source/DealerSelection.WebApi/Controllers/CCAvenueController.cs
-
5Source/DealerSelection.WebApi/Controllers/DealerSelectionController.cs
-
4Source/DealerSelection.WebApi/Controllers/JWTAuthController.cs
-
22Source/DealerSelection.WebApi/Controllers/MulesoftController.cs
-
27Source/DealerSelection.WebApi/Controllers/YellowController.cs
-
27Source/DealerSelection.WebApi/Scripts/001.AlterTable.sql
-
5Source/DealerSelection.WebApi/Scripts/002.AddDealerSelectionSchema.sql
-
285Source/DealerSelection.WebApi/Scripts/003.AddStoredProcedure.sql
-
47Source/DealerSelection.WebApi/appsettings.json
-
42Source/WebJobService/Service.cs
-
2Source/WebJobService/app.config
-
2Source/WebJobService/connectionString.json
@ -1,10 +0,0 @@ |
|||
namespace DealerSelection.Api.Models; |
|||
|
|||
public enum DealerSelectionJobStatus |
|||
{ |
|||
OldData = -1, |
|||
ReadyForJob = 0, |
|||
Picked = 1, |
|||
SentToBot = 2, |
|||
Complete = 3, |
|||
} |
@ -0,0 +1,7 @@ |
|||
namespace DealerSelection.Api.Models.Enum; |
|||
|
|||
public enum CCAvenueTransactionStatus |
|||
{ |
|||
Refunded = 0, |
|||
RefundFailed = 1 |
|||
} |
@ -0,0 +1,8 @@ |
|||
namespace DealerSelection.Api.Models.Enum; |
|||
|
|||
public enum DealerSelectedMode |
|||
{ |
|||
Auto = 0, //Single Dealer
|
|||
Dummy = 1, //No Response From Bot
|
|||
Bot=2 //Selected through Bot
|
|||
} |
@ -0,0 +1,10 @@ |
|||
namespace DealerSelection.Api.Models.Enum; |
|||
|
|||
public enum DealerSelectionJobStatus |
|||
{ |
|||
OldData = -1, |
|||
ReadyForJob = 0, //Booking Done and ready to pick
|
|||
Picked = 1, // Picked by Job
|
|||
SentToBot = 2, // Web Engage Event called to Inititate Bot
|
|||
Complete = 3, //Dealer Assigned through Single/BOT/Dummy
|
|||
} |
@ -0,0 +1,12 @@ |
|||
namespace DealerSelection.Api.Models |
|||
{ |
|||
public class ModelDetail |
|||
{ |
|||
public ModelDetail(string modelCode) |
|||
{ |
|||
ModelCode = modelCode; |
|||
} |
|||
|
|||
public string ModelCode { get; } |
|||
} |
|||
} |
@ -0,0 +1,58 @@ |
|||
|
|||
namespace DealerSelection.Api.Models; |
|||
|
|||
public class MulesoftCustomerInfo |
|||
{ |
|||
public MulesoftCustomerInfo(int buId, string buName, int recordId, string bookingId, string customerName, string mobileNumber, string modelCode, string modelName, string colorCode, string dealerCode, string dealerName, bool isRegisterInterestRequest, string pinCode, string utmCustomDetails1, string utmCustomDetails2, string status, string cCTransactionId, string receiptId, string amountPaid, string referralUrl, bool isWhatsappOptIn, int leadTransferred, string customerLat, string customerLong) |
|||
{ |
|||
BuId = buId; |
|||
BuName = buName; |
|||
RecordId = recordId; |
|||
BookingId = bookingId; |
|||
CustomerName = customerName; |
|||
MobileNumber = mobileNumber; |
|||
ModelCode = modelCode; |
|||
ModelName = modelName; |
|||
ColorCode = colorCode; |
|||
DealerCode = dealerCode; |
|||
DealerName = dealerName; |
|||
IsRegisterInterestRequest = isRegisterInterestRequest; |
|||
PinCode = pinCode; |
|||
UtmCustomDetails1 = utmCustomDetails1; |
|||
UtmCustomDetails2 = utmCustomDetails2; |
|||
Status = status; |
|||
CCTransactionId = cCTransactionId; |
|||
ReceiptId = receiptId; |
|||
AmountPaid = amountPaid; |
|||
ReferralUrl = referralUrl; |
|||
IsWhatsappOptIn = isWhatsappOptIn; |
|||
LeadTransferred = leadTransferred; |
|||
CustomerLat = customerLat; |
|||
CustomerLong = customerLong; |
|||
} |
|||
|
|||
public int BuId { get; } |
|||
public string BuName { get; } |
|||
public int RecordId { get; } |
|||
public string BookingId { get; } |
|||
public string CustomerName { get; } |
|||
public string MobileNumber { get; } |
|||
public string ModelCode { get; } |
|||
public string ModelName { get; } |
|||
public string ColorCode { get; } |
|||
public string DealerCode { get; } |
|||
public string DealerName { get; } |
|||
public bool IsRegisterInterestRequest { get; } |
|||
public string PinCode { get; } |
|||
public string UtmCustomDetails1 { get; } |
|||
public string UtmCustomDetails2 { get; } |
|||
public string Status { get; } |
|||
public string CCTransactionId { get; } |
|||
public string ReceiptId { get; } |
|||
public string AmountPaid { get; } |
|||
public string ReferralUrl { get; } |
|||
public bool IsWhatsappOptIn { get; } |
|||
public int LeadTransferred { get; } |
|||
public string CustomerLat { get; } |
|||
public string CustomerLong { get; } |
|||
} |
@ -0,0 +1,23 @@ |
|||
|
|||
namespace DealerSelection.Api.Models; |
|||
|
|||
public class RefundApiResponse |
|||
{ |
|||
public RefundApiResponse(string status, RefundStatusResponse refundStatusResponse) |
|||
{ |
|||
Status = status; |
|||
RefundStatusResponse = refundStatusResponse; |
|||
} |
|||
public string Status { get; set; } |
|||
public RefundStatusResponse RefundStatusResponse { get; set; } |
|||
} |
|||
public class RefundStatusResponse |
|||
{ |
|||
public int? refund_status { get; set; } |
|||
public string reason { get; set; } |
|||
public string error_code { get; set; } |
|||
} |
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,42 @@ |
|||
using DealerSelection.Api.CommonUtil; |
|||
using DealerSelection.Api.Infrastructure.BatchJob; |
|||
using DealerSelection.Api.Infrastructure.Mulesoft; |
|||
using DealerSelection.Api.Interface; |
|||
using DealerSelection.Api.Models.Enum; |
|||
using Microsoft.Extensions.Logging; |
|||
using System.Collections.Generic; |
|||
|
|||
public class BatchJobApi : IBatchJobApi |
|||
{ |
|||
|
|||
private readonly ILogger _logger; |
|||
private DealerSelection.Api.Infrastructure.BatchJob.IRepository Repository { get; } |
|||
private IMulesoftApi MulesoftApi { get; } |
|||
public BatchJobApi(DealerSelection.Api.Infrastructure.BatchJob.IRepository repository, ILogger<MulesoftApi> logger, IMulesoftApi mulesoftApi) |
|||
{ |
|||
Repository = repository; |
|||
_logger = logger; |
|||
MulesoftApi = mulesoftApi; |
|||
} |
|||
public async Task Process24HrOldRecords() |
|||
{ |
|||
try |
|||
{ |
|||
List<MulesoftCustomerInfoDto> customerInfo = await Repository.Get24HrOldRecordsForJobProcessing(); |
|||
|
|||
foreach (var item in customerInfo) |
|||
{ |
|||
CustomCfg cfg = CustomCfg.GetCustomCfg(item.BuId); |
|||
item.DealerCode = cfg.DeafaultDealerCode; |
|||
item.DealerSelectedMode = DealerSelectedMode.Dummy.ToString(); |
|||
await MulesoftApi.InsertLSQData(item); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
_logger.LogError($"DS Api:-Api:- BatchJob:- " + ex.StackTrace.ToString()); |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,190 @@ |
|||
using DealerSelection.Api.CommonUtil; |
|||
using DealerSelection.Api.Infrastructure.CCAvenue; |
|||
using DealerSelection.Api.Interface; |
|||
using DealerSelection.Common.Configuration; |
|||
using Microsoft.Extensions.Logging; |
|||
using Newtonsoft.Json.Linq; |
|||
using Newtonsoft.Json; |
|||
using System.Collections.Generic; |
|||
using System.Collections.Specialized; |
|||
using System.Net; |
|||
using CCA.Util; |
|||
using DealerSelection.Api.Models; |
|||
using FastExpressionCompiler; |
|||
using JasperFx.Core; |
|||
using System.Security.Cryptography; |
|||
|
|||
public class CCAvenueApi : ICCAvenueApi |
|||
{ |
|||
|
|||
private readonly ILogger _logger; |
|||
private IRepository Repository { get; } |
|||
private IMulesoftApi MulesoftApi { get; } |
|||
private string? CCAvenueApiPayUrl = ConfigurationHelper.GetSetting<string>("CCAvenueApiPayUrl", true); |
|||
public CCAvenueApi(ILogger<MulesoftApi> logger, IRepository repository) |
|||
{ |
|||
_logger = logger; |
|||
Repository = repository; |
|||
} |
|||
public async Task<RefundApiResponse> RefundOrder(string bookingId, string transactionId) |
|||
{ |
|||
Dto customerInfo = await Repository.GetBookingDetail(bookingId, transactionId); |
|||
//Dto customerInfo = new Dto()
|
|||
//{
|
|||
// AmountPaid = "4499",
|
|||
// BuId = 1,
|
|||
// RecordId = 800
|
|||
//};
|
|||
|
|||
RefundApiResponse response = null; |
|||
if (customerInfo != null) |
|||
{ |
|||
CustomCfg cfg = CustomCfg.GetCustomCfg(customerInfo.BuId); |
|||
try |
|||
{ |
|||
int rnd = RandomNumberGenerator.GetInt32(100000,999999); |
|||
string refundRefNo= cfg.BuCode + customerInfo.RecordId + rnd; |
|||
string orderStatusQueryJson = "{\"reference_no\":\"" + transactionId + "\",\"refund_amount\": \"" + customerInfo.AmountPaid + "\"," + |
|||
"\"refund_ref_no\": \"" + refundRefNo + "\" }"; |
|||
string encJson = ""; |
|||
string queryUrl = CCAvenueApiPayUrl + "/apis/servlet/DoWebTrans?"; |
|||
|
|||
CCACrypto ccaCrypto = new CCACrypto(); |
|||
encJson = ccaCrypto.Encrypt(orderStatusQueryJson, cfg.CCAvenueWorkingKey); //
|
|||
|
|||
|
|||
string authQueryUrlParam = "enc_request=" + encJson + "&access_code=" + cfg.CCAvenueAccessCode |
|||
+ "&command=refundOrder&request_type=JSON&response_type=JSON"; |
|||
|
|||
string message = await SendRequestToGateWay(queryUrl, authQueryUrlParam); |
|||
NameValueCollection param = GetResponseCollection(message); |
|||
string status = ""; |
|||
string encResJson = ""; |
|||
if (param != null && param.Count == 2) |
|||
{ |
|||
//for (int i = 0; i < param.Count; i++)
|
|||
//{
|
|||
// if ("status".Equals(param.Keys[i]))
|
|||
// {
|
|||
// status = param[i];
|
|||
// }
|
|||
// if ("enc_response".Equals(param.Keys[i]))
|
|||
// {
|
|||
// encResJson = param[i];
|
|||
// }
|
|||
//}
|
|||
if (message.Contains("status") && message.Contains("enc_response")) |
|||
{ |
|||
status = param.Get("status"); |
|||
encResJson = param.Get("enc_response"); |
|||
} |
|||
|
|||
string ResJson = ""; |
|||
|
|||
// response.Status = status;
|
|||
RefundStatusResponse _refundStatusResponse = new(); |
|||
if (!"".Equals(status) && status.Equals("0")) |
|||
{ |
|||
ResJson = ccaCrypto.Decrypt(encResJson, cfg.CCAvenueWorkingKey); |
|||
dynamic objResult = JObject.Parse(ResJson); |
|||
_refundStatusResponse.reason = objResult.Refund_Order_Result.reason; |
|||
_refundStatusResponse.refund_status = objResult.Refund_Order_Result.refund_status; |
|||
|
|||
_refundStatusResponse.error_code = objResult.Refund_Order_Result.error_code; |
|||
|
|||
//_refundStatusResponse = JsonConvert.DeserializeObject<RefundStatusResponse>(ResJson);
|
|||
|
|||
_logger.LogInformation($"DS Api:-BU:- {customerInfo.BuId} + Refund Api Response for bookingId:- {bookingId} and Response:- {ResJson}"); |
|||
|
|||
//if (_refundStatusResponse != null)
|
|||
//{
|
|||
// response.refundStatusResponse = _refundStatusResponse;
|
|||
//}
|
|||
} |
|||
else if (!"".Equals(status) && status.Equals("1")) |
|||
{ |
|||
_refundStatusResponse.reason = encResJson; |
|||
} |
|||
await Repository.UpdateRefundStatus(customerInfo.BuId,bookingId, transactionId, refundRefNo, _refundStatusResponse); |
|||
|
|||
response = new RefundApiResponse(status, _refundStatusResponse); |
|||
} |
|||
return response; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
_logger.LogError($"DS Api:-BU:- {customerInfo.BuId} + RefundOrder Error for bookingId:- {bookingId} - {ex.StackTrace}"); |
|||
throw ex; |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
RefundStatusResponse _refundStatusResponse = new(); |
|||
{ |
|||
_refundStatusResponse.refund_status = 1; |
|||
_refundStatusResponse.reason = "No record found"; |
|||
}; |
|||
response = new RefundApiResponse("1", _refundStatusResponse); |
|||
response.Status = "1"; |
|||
|
|||
} |
|||
return response; |
|||
|
|||
} |
|||
private static async Task<string> SendRequestToGateWay(string queryUrl, string urlParam) |
|||
{ |
|||
|
|||
string message = ""; |
|||
try |
|||
{ |
|||
StreamWriter myWriter = null;// it will open a http connection with provided url
|
|||
WebRequest objRequest = WebRequest.Create(queryUrl);//send data using objxmlhttp object
|
|||
objRequest.Method = "POST"; |
|||
objRequest.ContentType = "application/x-www-form-urlencoded";//to set content type
|
|||
myWriter = new StreamWriter(objRequest.GetRequestStream()); |
|||
myWriter.Write(urlParam);//send data
|
|||
myWriter.Close();//closed the myWriter object
|
|||
|
|||
// Getting Response
|
|||
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();//receive the responce from objxmlhttp object
|
|||
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream())) |
|||
{ |
|||
message = sr.ReadToEnd(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
return message; |
|||
|
|||
} |
|||
|
|||
private static NameValueCollection GetResponseCollection(string message) |
|||
{ |
|||
NameValueCollection Params = new NameValueCollection(); |
|||
try |
|||
{ |
|||
if (message != null || !"".Equals(message)) |
|||
{ |
|||
string[] segments = message.Split('&'); |
|||
foreach (string seg in segments) |
|||
{ |
|||
string[] parts = seg.Split('='); |
|||
if (parts.Length > 0) |
|||
{ |
|||
string Key = parts[0].Trim(); |
|||
string Value = parts[1].Trim(); |
|||
Params.Add(Key, Value); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
return Params; |
|||
} |
|||
|
|||
} |
@ -1,7 +1,7 @@ |
|||
|
|||
namespace DealerSelection.Api.Infrastructure.AssignDealer; |
|||
|
|||
public interface IAssignDealerRepository |
|||
public interface IRepository |
|||
{ |
|||
|
|||
} |
@ -0,0 +1,9 @@ |
|||
|
|||
using DealerSelection.Api.Infrastructure.Mulesoft; |
|||
|
|||
namespace DealerSelection.Api.Infrastructure.BatchJob; |
|||
|
|||
public interface IRepository |
|||
{ |
|||
Task<List<MulesoftCustomerInfoDto>> Get24HrOldRecordsForJobProcessing(); |
|||
} |
@ -0,0 +1,37 @@ |
|||
using Dapper; |
|||
using DealerSelection.Api.Infrastructure.Mulesoft; |
|||
using DealerSelection.Api.Models; |
|||
using DealerSelection.Common.Data.Dapper; |
|||
using Microsoft.Extensions.Logging; |
|||
using System.Data; |
|||
using System.Data.SqlClient; |
|||
|
|||
namespace DealerSelection.Api.Infrastructure.BatchJob; |
|||
|
|||
public class Repository : RepositoryBaseDapperAsync, IRepository |
|||
{ |
|||
private readonly ILogger _logger; |
|||
public Repository(string cxnName, ILogger<Repository> logger) : base(cxnName) |
|||
{ |
|||
_logger = logger; |
|||
} |
|||
|
|||
public async Task<List<MulesoftCustomerInfoDto>> Get24HrOldRecordsForJobProcessing() |
|||
{ |
|||
try |
|||
{ |
|||
using (SqlConnection cxn = await OpenCxnAsync()) |
|||
{ |
|||
IEnumerable<MulesoftCustomerInfoDto> cusotmerInfo = await cxn.QueryAsync<MulesoftCustomerInfoDto>(Procedure.Get24HrOldRecordsForJobProcessing, |
|||
commandType: CommandType.StoredProcedure); |
|||
return cusotmerInfo.ToList(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
_logger.LogError($"DS Repo:-Error at Repository:BatchJob in Get24HrOldRecordsForJobProcessing.", ex.StackTrace); |
|||
throw new UnexpectedDataException("Error at Repository:BatchJob in Get24HrOldRecordsForJobProcessing.", ex); |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
|
|||
namespace DealerSelection.Api.Infrastructure.CCAvenue; |
|||
|
|||
public class Dto |
|||
{ |
|||
public int BuId { get; set; } |
|||
public int RecordId { get; set; } |
|||
public string AmountPaid { get; set; } |
|||
|
|||
|
|||
|
|||
public string RequestDetail() |
|||
{ |
|||
return $"BuId: {BuId}, RecordId: {RecordId}"; |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
using DealerSelection.Api.Models; |
|||
|
|||
namespace DealerSelection.Api.Infrastructure.CCAvenue; |
|||
public interface IRepository |
|||
{ |
|||
Task<Dto> GetBookingDetail(string bookingId, string transactionId); |
|||
Task UpdateRefundStatus(int buId,string bookingId, string transactionId,string refundReferenceNo, RefundStatusResponse refundStatusResponse); |
|||
} |
@ -0,0 +1,74 @@ |
|||
using DealerSelection.Api.Models; |
|||
using DealerSelection.Common.Data.Dapper; |
|||
using Dapper; |
|||
using System.Data; |
|||
using System.Data.SqlClient; |
|||
using Microsoft.Extensions.Logging; |
|||
using DealerSelection.Api.Infrastructure.CCAvenue; |
|||
using DealerSelection.Api.Models.Enum; |
|||
|
|||
namespace DealerSelection.Api.Infrastructure.CCAvenue; |
|||
|
|||
public class Repository : RepositoryBaseDapperAsync, IRepository |
|||
{ |
|||
private readonly ILogger _logger; |
|||
public Repository(string cxnName, ILogger<Repository> logger) : base(cxnName) |
|||
{ |
|||
_logger = logger; |
|||
} |
|||
|
|||
public async Task<Dto> GetBookingDetail(string bookingId,string transactionId) |
|||
{ |
|||
try |
|||
{ |
|||
using (SqlConnection cxn = await OpenCxnAsync()) |
|||
{ |
|||
IEnumerable<Dto> cusotmerInfo = await cxn.QueryAsync<Dto>(Procedure.GetBokingDetailOnBookingId, |
|||
new |
|||
{ |
|||
bookingId, |
|||
transactionId |
|||
}, |
|||
commandType: CommandType.StoredProcedure); |
|||
return cusotmerInfo.ToList().FirstOrDefault(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
_logger.LogError($"DS Repo:-BookingId:- " + bookingId.ToString() + " Error at Repository:CCAvenueRefund in GetPendingOrderStatusList " + ex.Message.ToString()); |
|||
throw new UnexpectedDataException($"Error at Repository:PendingStatusUpdate in CCAvenueRefund for BookingId: {bookingId}.", ex); |
|||
} |
|||
|
|||
} |
|||
|
|||
public async Task UpdateRefundStatus(int BuId,string bookingId, string transactionId, string refundReferenceNo, RefundStatusResponse request) |
|||
{ |
|||
string failreason = request.error_code + ' ' + request.reason; |
|||
try |
|||
{ |
|||
using (SqlConnection cxn = await OpenCxnAsync()) |
|||
{ |
|||
await cxn.QueryAsync(Procedure.UpdateRefundStatus, |
|||
new |
|||
{ |
|||
BuId, |
|||
bookingId, |
|||
CCTransactionId=transactionId, |
|||
RefundReferenceNo=refundReferenceNo, |
|||
CCTransactionStatus = request.refund_status == 0 ? CCAvenueTransactionStatus.Refunded.ToString() : CCAvenueTransactionStatus.RefundFailed.ToString(), |
|||
CCTransactionStatusReason = failreason |
|||
}, |
|||
commandType: CommandType.StoredProcedure); |
|||
|
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
_logger.LogError($"DS Repo:-BookingId:-{bookingId}, TransactionId: {transactionId} Error at Repository:CCAvenue in UpdateRefundStatus" + ex.StackTrace); |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,14 @@ |
|||
|
|||
namespace DealerSelection.Api.Infrastructure.CustomerDetail; |
|||
|
|||
public class CustomerDto |
|||
{ |
|||
public int BuId { get; set; } |
|||
public int RecordId { get; set; } |
|||
|
|||
|
|||
public string RequestDetail() |
|||
{ |
|||
return $"BuId: {BuId}, RecordId: {RecordId}"; |
|||
} |
|||
} |
@ -1,13 +1,14 @@ |
|||
using DealerSelection.Api.Infrastructure.Mulesoft; |
|||
using DealerSelection.Api.Models; |
|||
using DealerSelection.Api.Models.Enum; |
|||
|
|||
namespace DealerSelection.Api.Infrastructure.CustomerDetail; |
|||
|
|||
public interface IRepository |
|||
{ |
|||
Task<int> UpdateDealerDetail(CustomerDealerInfoRequestDto customerInfo); |
|||
Task UpdateDealerDetail(CustomerDealerInfoRequestDto customerInfo); |
|||
// Task<MulesoftCustomerInfoDto> GetCustomerData();
|
|||
Task<MulesoftCustomerInfoDto> GetCustomerData(int buid, int recordId); |
|||
Task<bool> IsDuplicateMobileNumber(int mobileNumber); |
|||
Task UpdateDealerSelectionJobStatus(int buId, int recordId, int mobileNumber, DealerSelectionJobStatus dealerSelectionJobStatus); |
|||
Task<CustomerDto> IsDuplicateMobileNumber(int mobileNumber, string buName); |
|||
Task<CustomerDto> GetCustomerDetailByBuCode(string mobileNumber, string buName, string buSubType); |
|||
Task UpdateDealerSelectionJobStatus(int buId, int recordId, DealerSelectionJobStatus dealerSelectionJobStatus); |
|||
} |
@ -0,0 +1,8 @@ |
|||
|
|||
|
|||
namespace DealerSelection.Api.Infrastructure.YellowAI; |
|||
|
|||
public interface IRepository |
|||
{ |
|||
Task<ModelDetailDto> GetModelDetails(string mobileNumber, string buName, string buSubType); |
|||
} |
@ -0,0 +1,14 @@ |
|||
|
|||
namespace DealerSelection.Api.Infrastructure.YellowAI; |
|||
|
|||
public class ModelDetailDto |
|||
{ |
|||
public string ModelCode { get; set; } |
|||
|
|||
|
|||
|
|||
public string RequestDetail() |
|||
{ |
|||
return $"ModelCode: {ModelCode}"; |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
using Dapper; |
|||
using DealerSelection.Api.Infrastructure.Mulesoft; |
|||
using DealerSelection.Api.Models; |
|||
using DealerSelection.Api.Models.Enum; |
|||
using DealerSelection.Common.Data.Dapper; |
|||
using Microsoft.Extensions.Logging; |
|||
using System.Data; |
|||
using System.Data.SqlClient; |
|||
|
|||
namespace DealerSelection.Api.Infrastructure.YellowAI; |
|||
|
|||
public class Repository : RepositoryBaseDapperAsync, IRepository |
|||
{ |
|||
private readonly ILogger _logger; |
|||
public Repository(string cxnName, ILogger<Repository> logger) : base(cxnName) |
|||
{ |
|||
_logger = logger; |
|||
} |
|||
|
|||
public async Task<ModelDetailDto> GetModelDetails(string mobileNumber, string buCode, string buSubType) |
|||
{ |
|||
try |
|||
{ |
|||
using (SqlConnection cxn = await OpenCxnAsync()) |
|||
{ |
|||
IEnumerable<ModelDetailDto> cusotmerInfo = await cxn.QueryAsync<ModelDetailDto>(Procedure.GetModelDetails, |
|||
new |
|||
{ |
|||
buCode, |
|||
buSubType, |
|||
mobileNumber |
|||
}, |
|||
commandType: CommandType.StoredProcedure); |
|||
return cusotmerInfo.ToList().FirstOrDefault(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
_logger.LogError($"DS Repo:Error at Repository:YellowAi in GetModelDetails for MobileNumber: {mobileNumber}, BuName: {buCode}.", ex.StackTrace); |
|||
throw new UnexpectedDataException("Error at Repository:YellowAi in GetModelDetails for MobileNumber: {mobileNumber}, BuName: {buName}.", ex); |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,7 @@ |
|||
namespace DealerSelection.Api.Interface; |
|||
|
|||
public interface IBatchJobApi |
|||
{ |
|||
Task Process24HrOldRecords(); |
|||
|
|||
} |
@ -0,0 +1,9 @@ |
|||
using DealerSelection.Api.Models; |
|||
|
|||
namespace DealerSelection.Api.Interface; |
|||
|
|||
public interface ICCAvenueApi |
|||
{ |
|||
Task<RefundApiResponse> RefundOrder(string BookingId, string TransactionId); |
|||
|
|||
} |
@ -0,0 +1,6 @@ |
|||
namespace DealerSelection.WebApi.Models; |
|||
|
|||
public class ModelDetail |
|||
{ |
|||
public string ModelCode { get; set; } |
|||
} |
@ -0,0 +1,9 @@ |
|||
|
|||
namespace DealerSelection.WebApi.Models; |
|||
|
|||
public class ModelDetailRequest |
|||
{ |
|||
public string BuCode { get; set; } |
|||
public string BuSubType { get; set; } |
|||
public string MobileNumber { get; set; } |
|||
} |
@ -0,0 +1,8 @@ |
|||
|
|||
namespace DealerSelection.WebApi.Models; |
|||
|
|||
public class RefundRequest |
|||
{ |
|||
public string bookingId { get; set; } |
|||
public string transactionId { get; set; } |
|||
} |
@ -0,0 +1,13 @@ |
|||
namespace DealerSelection.WebApi.Models; |
|||
|
|||
public class RefundResponse |
|||
{ |
|||
public string status { get; set; } |
|||
public RefundStatusResponse RefundStatusResponse { get; set; } |
|||
} |
|||
public class RefundStatusResponse |
|||
{ |
|||
public int? refund_status { get; set; } |
|||
public string reason { get; set; } |
|||
public string error_code { get; set; } |
|||
} |
@ -0,0 +1,32 @@ |
|||
using DealerSelection.Api.Interface; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Swashbuckle.AspNetCore.Annotations; |
|||
|
|||
namespace DealerSelection.WebApi.Controllers; |
|||
|
|||
[ApiController] |
|||
[Route("BatchJob")] |
|||
public class BatchJobController : ControllerBase |
|||
{ |
|||
|
|||
private IBatchJobApi Api { get; } |
|||
public BatchJobController(IBatchJobApi api) |
|||
{ |
|||
Api = api; |
|||
} |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
[Authorize] |
|||
[HttpPost] |
|||
[ProducesResponseType(StatusCodes.Status200OK)] |
|||
[SwaggerOperation(Tags = new[] { "Process24HrOldRecords" })] |
|||
[Route("BatchJob")] |
|||
public async Task Process24HrOldRecords() |
|||
{ |
|||
await Api.Process24HrOldRecords(); |
|||
} |
|||
} |
@ -0,0 +1,35 @@ |
|||
using DealerSelection.Api.Interface; |
|||
using Model = DealerSelection.Api.Models; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Swashbuckle.AspNetCore.Annotations; |
|||
using DealerSelection.WebApi.Models; |
|||
|
|||
namespace DealerSelection.WebApi.Controllers; |
|||
|
|||
[ApiController] |
|||
public class CCAvenueController : ControllerBase |
|||
{ |
|||
|
|||
private ICCAvenueApi Api { get; } |
|||
public CCAvenueController(ICCAvenueApi api) |
|||
{ |
|||
Api = api; |
|||
} |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
[Authorize] |
|||
[HttpPost] |
|||
[ProducesResponseType(StatusCodes.Status200OK)] |
|||
[SwaggerOperation(Tags = new[] { "Cancellation" })] |
|||
[Route("cancelorder")] |
|||
public async Task<RefundResponse> RefundOrder(RefundRequest details) |
|||
{ |
|||
Model.RefundApiResponse apiresponse= await Api.RefundOrder(details.bookingId, details.transactionId); |
|||
RefundResponse response = MapperConfig.MapRefundResponse(apiresponse); |
|||
return response; |
|||
} |
|||
} |
@ -0,0 +1,27 @@ |
|||
ALTER TABLE [dbo].[tbl_transaction_details] |
|||
ADD RefundReferenceNo varchar(50) |
|||
|
|||
ALTER TABLE [dbo].[tbl_customer_information] |
|||
ADD DealerSelectedMode varchar(50) |
|||
|
|||
ALTER TABLE [dbo].[tbl_customer_information] |
|||
ADD DealerSelectionJobStatus int |
|||
|
|||
ALTER TABLE [dbo].[tbl_businessUnit] |
|||
ADD BuCode varchar(10) |
|||
|
|||
ALTER TABLE [dbo].[tbl_businessUnit] |
|||
ADD BuSubType varchar(10) |
|||
|
|||
UPDATE [dbo].[tbl_businessUnit] |
|||
set BuSubType='KTM' where BuId =1 |
|||
|
|||
UPDATE [dbo].[tbl_businessUnit] |
|||
set BuCode='PB' where BuId in(1,4) |
|||
|
|||
UPDATE [dbo].[tbl_businessUnit] |
|||
set BuCode='MC' where BuId =2 |
|||
|
|||
|
|||
UPDATE [dbo].[tbl_businessUnit] |
|||
set BuSubType='HUS' where BuId =4 |
@ -0,0 +1,5 @@ |
|||
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'DealerSelection') |
|||
|
|||
EXEC('CREATE SCHEMA [DealerSelection] AUTHORIZATION [dbo]') |
|||
|
|||
GO |
@ -0,0 +1,285 @@ |
|||
/****** Object: StoredProcedure [DealerSelection].[usp_get_24HrOldRecordsFor_jobProcessing] Script Date: 1/2/2024 12:08:07 PM ******/ |
|||
SET ANSI_NULLS ON |
|||
GO |
|||
SET QUOTED_IDENTIFIER ON |
|||
GO |
|||
CREATE PROCEDURE [DealerSelection].[usp_get_24HrOldRecordsFor_jobProcessing] |
|||
@BuId Int |
|||
AS |
|||
BEGIN |
|||
DECLARE @BuCode AS VARCHAR(10) |
|||
SELECT @BuCode = BuCode FROM tbl_businessUnit WHERE BuId=@buId |
|||
|
|||
SELECT top 1 cust.BuId,@BuCode as BuName,trans.BookingId,ModelName,ModelCode, ColorCode,CustomerName,CustomerLat,CustomerLong, |
|||
MobileNumber,Pincode,DealerCode,cust.RecordId,ReferrerUrl as ReferralUrl,IsWhatsAppOptIn,IsRegisterInterestRequest, |
|||
UtmCustomDetails1,UtmCustomDetails2, trans.Status,trans.CCTransactionId, |
|||
trans.ReceiptId,trans.AmountPaid |
|||
FROM [tbl_customer_information] cust INNER JOIN |
|||
[tbl_transaction_details] trans ON cust.RecordId = trans.RecordId |
|||
AND cust.BuId = trans.BuId |
|||
WHERE DealerSelectionJobStatus in (0,1,2)-- ReadyForJob,Picked,SentToBot |
|||
and trans.CompletionDate < DATEADD(HOUR, -24, GETDATE()) |
|||
and trans.Status='Successful' |
|||
order by trans.CreationDate desc |
|||
|
|||
END |
|||
GO |
|||
/****** Object: StoredProcedure [DealerSelection].[usp_get_BookingDetail_OnBookingId] Script Date: 1/2/2024 12:08:07 PM ******/ |
|||
SET ANSI_NULLS ON |
|||
GO |
|||
SET QUOTED_IDENTIFIER ON |
|||
GO |
|||
CREATE PROCEDURE [DealerSelection].[usp_get_BookingDetail_OnBookingId] |
|||
( |
|||
@bookingId VARCHAR(50), |
|||
@transactionId VARCHAR(50) |
|||
) |
|||
AS |
|||
BEGIN |
|||
|
|||
SELECT t.BuId,t.RecordId,t.AmountPaid FROM tbl_transaction_details t |
|||
where t.BookingId=@bookingId and t.CCTransactionId=@transactionId |
|||
END |
|||
GO |
|||
/****** Object: StoredProcedure [DealerSelection].[usp_get_CustomerDataForJob] Script Date: 1/2/2024 12:08:07 PM ******/ |
|||
SET ANSI_NULLS ON |
|||
GO |
|||
SET QUOTED_IDENTIFIER ON |
|||
GO |
|||
-- ============================================= |
|||
-- Author: <Author, , Name> |
|||
-- Create Date: <Create Date, , > |
|||
-- Description: <Description, , > |
|||
-- ============================================= |
|||
CREATE PROCEDURE [DealerSelection].[usp_get_CustomerDataForJob] |
|||
( |
|||
@buid int, |
|||
@recordId int |
|||
) |
|||
AS |
|||
BEGIN |
|||
-- SET NOCOUNT ON added to prevent extra result sets from |
|||
-- interfering with SELECT statements. |
|||
SET NOCOUNT ON |
|||
DECLARE @BuCode AS VARCHAR(10) |
|||
SELECT @BuCode = BuCode FROM tbl_businessUnit WHERE BuId=@buId |
|||
|
|||
SELECT top 1 cus.BuId,@BuCode as BuCode,trans.BookingId,ModelName,ModelCode, ColorCode,CustomerName,CustomerLat,CustomerLong, |
|||
MobileNumber,Pincode,DealerCode,cus.RecordId,ReferrerUrl as ReferralUrl,IsWhatsAppOptIn,IsRegisterInterestRequest, |
|||
UtmCustomDetails1,UtmCustomDetails2, trans.Status,trans.CCTransactionId, |
|||
trans.ReceiptId,trans.AmountPaid |
|||
FROM [dbo].[tbl_customer_information] as cus |
|||
left join tbl_transaction_details as trans on cus.RecordId=trans.RecordId |
|||
WHERE trans.RecordId=@recordId and cus.BuId =@buid and cus.RecordId=@recordId and trans.BuId=@buid |
|||
END |
|||
GO |
|||
/****** Object: StoredProcedure [DealerSelection].[usp_get_CustomerDetailByBuCode] Script Date: 1/2/2024 12:08:07 PM ******/ |
|||
SET ANSI_NULLS ON |
|||
GO |
|||
SET QUOTED_IDENTIFIER ON |
|||
GO |
|||
|
|||
CREATE PROCEDURE [DealerSelection].[usp_get_CustomerDetailByBuCode] |
|||
( |
|||
@BuCode VARCHAr(10), |
|||
@MobileNumber VARCHAr(50), |
|||
@BuSubType varchar(10), |
|||
@DealerSelectionJobStatus int |
|||
) |
|||
AS |
|||
BEGIN |
|||
|
|||
SELECT c.BuId,c.RecordId FROM tbl_transaction_details T |
|||
LEFT JOIN tbl_customer_information C ON |
|||
T.RecordId = C.RecordId |
|||
WHERE T.BuId=C.BuId AND C.BuId in(select BuId from tbl_businessUnit where BuCode=@BuCode and BuSubType=@BuSubType ) |
|||
AND C.MobileNumber = @mobileNumber |
|||
AND (UPPER([CCTransactionStatus]) = 'SUCCESS' OR UPPER(CCTransactionStatus) = 'SHIPPED') |
|||
--AND c.DealerSelectionJobStatus=@dealerSelectionJobStatus |
|||
|
|||
END |
|||
GO |
|||
/****** Object: StoredProcedure [DealerSelection].[usp_get_dealer_selection_for_job] Script Date: 1/2/2024 12:08:07 PM ******/ |
|||
SET ANSI_NULLS ON |
|||
GO |
|||
SET QUOTED_IDENTIFIER ON |
|||
GO |
|||
-- ============================================= |
|||
-- Author: <Author, , Name> |
|||
-- Create Date: <Create Date, , > |
|||
-- Description: <Description, , > |
|||
-- ============================================= |
|||
CREATE PROCEDURE [DealerSelection].[usp_get_dealer_selection_for_job] |
|||
AS |
|||
BEGIN |
|||
-- SET NOCOUNT ON added to prevent extra result sets from |
|||
-- interfering with SELECT statements. |
|||
SET NOCOUNT ON |
|||
|
|||
SELECT top 1 buid,recordid from tbl_customer_information order by RecordId desc |
|||
|
|||
END |
|||
GO |
|||
/****** Object: StoredProcedure [DealerSelection].[usp_get_ModelDetails] Script Date: 1/2/2024 12:08:07 PM ******/ |
|||
SET ANSI_NULLS ON |
|||
GO |
|||
SET QUOTED_IDENTIFIER ON |
|||
GO |
|||
CREATE PROCEDURE [DealerSelection].[usp_get_ModelDetails] |
|||
( |
|||
@buCode VARCHAR(10), |
|||
@BuSubType varchar(10), |
|||
@mobileNumber VARCHAR(12) |
|||
) |
|||
AS |
|||
BEGIN |
|||
|
|||
SELECT c.ModelCode FROM tbl_customer_information C |
|||
LEFT JOIN tbl_businessUnit b |
|||
ON c.buId = b.buId |
|||
where c.MobileNumber=@mobileNumber and b.BuCode=@buCode and b.BuSubType=@BuSubType |
|||
|
|||
END |
|||
GO |
|||
/****** Object: StoredProcedure [DealerSelection].[usp_isDuplicateMobileNumber] Script Date: 1/2/2024 12:08:07 PM ******/ |
|||
SET ANSI_NULLS ON |
|||
GO |
|||
SET QUOTED_IDENTIFIER ON |
|||
GO |
|||
|
|||
-- ============================================= |
|||
-- Author: <Author, , Name> |
|||
-- Create Date: <Create Date, , > |
|||
-- Description: <Description, , > |
|||
-- ============================================= |
|||
|
|||
CREATE PROCEDURE [DealerSelection].[usp_isDuplicateMobileNumber] |
|||
( |
|||
@buName VARCHAr(50), |
|||
@mobileNumber int, |
|||
@dealerSelectionJobStatus int |
|||
) |
|||
AS |
|||
BEGIN |
|||
DECLARE @SucessCount INT = 0 |
|||
DECLARE @BuId INT=0 |
|||
SET @BuId=(SELECT BUID FROM tbl_businessUnit WHERE BuName=@buName) |
|||
|
|||
SELECT c.BuId,c.RecordId FROM tbl_transaction_details T |
|||
LEFT JOIN tbl_customer_information C ON |
|||
T.RecordId = C.RecordId |
|||
WHERE T.BuId=C.BuId AND C.BuId = @BuId |
|||
AND C.MobileNumber = @mobileNumber |
|||
AND (UPPER([CCTransactionStatus]) = 'SUCCESS' OR UPPER(CCTransactionStatus) = 'SHIPPED') |
|||
AND c.DealerSelectionJobStatus=@dealerSelectionJobStatus |
|||
|
|||
|
|||
--IF @SucessCount > 1 |
|||
--BEGIN |
|||
-- SELECT @SucessCount AS SucessCount |
|||
-- RETURN |
|||
--END |
|||
|
|||
--SELECT BookingId,T.CreationDate FROM tbl_transaction_details T |
|||
--LEFT JOIN tbl_customer_information C ON |
|||
--T.RecordId = C.RecordId |
|||
--WHERE T.BuId=C.BuId AND C.BuId = 1 |
|||
--AND C.MobileNumber = @mobileNumber |
|||
--AND (CCTransactionStatus IS NULL OR UPPER(CCTransactionStatus) = 'AWAITED') |
|||
--order by t.CreationDate desc |
|||
|
|||
END |
|||
GO |
|||
/****** Object: StoredProcedure [DealerSelection].[usp_update_dealer_details] Script Date: 1/2/2024 12:08:07 PM ******/ |
|||
SET ANSI_NULLS ON |
|||
GO |
|||
SET QUOTED_IDENTIFIER ON |
|||
GO |
|||
CREATE PROCEDURE [DealerSelection].[usp_update_dealer_details] |
|||
( |
|||
-- Add the parameters for the stored procedure here |
|||
@BuId INT, |
|||
@RecordId INT, |
|||
@MobileNumber varchar(12), |
|||
@DealerCode varchar(100), |
|||
@DealerName varchar(100), |
|||
@CustomerLat varchar(100), |
|||
@CustomerLong varchar(100), |
|||
@Pincode varchar(100) = '', |
|||
@DealerSelectionJobStatus INT, |
|||
@DealerSelectedMode varchar(50) |
|||
) |
|||
AS |
|||
BEGIN |
|||
-- SET NOCOUNT ON added to prevent extra result sets from |
|||
-- interfering with SELECT statements. |
|||
SET NOCOUNT ON |
|||
|
|||
|
|||
UPDATE [dbo].[tbl_customer_information] |
|||
SET |
|||
[DealerCode]=@DealerCode |
|||
,[DealerName] = @DealerName |
|||
,[CustomerLat]=@CustomerLat |
|||
,[CustomerLong]=@CustomerLong |
|||
,[Pincode] = @Pincode |
|||
,[DealerSelectionJobStatus]=@DealerSelectionJobStatus |
|||
,[DealerSelectedMode] = @DealerSelectedMode |
|||
WHERE RecordId=@RecordId and BuId = @BuId and MobileNumber=@MobileNumber |
|||
|
|||
END |
|||
GO |
|||
/****** Object: StoredProcedure [DealerSelection].[usp_update_RefundStatus] Script Date: 1/2/2024 12:08:07 PM ******/ |
|||
SET ANSI_NULLS ON |
|||
GO |
|||
SET QUOTED_IDENTIFIER ON |
|||
GO |
|||
CREATE PROCEDURE [DealerSelection].[usp_update_RefundStatus] |
|||
( |
|||
-- Add the parameters for the stored procedure here |
|||
@BuId INT, |
|||
@BookingId varchar(50), |
|||
@CCTransactionId varchar(50), |
|||
@RefundReferenceNo varchar(50), |
|||
@CCTransactionStatus varchar(50), |
|||
@CCTransactionStatusReason varchar(100) |
|||
) |
|||
AS |
|||
BEGIN |
|||
SET NOCOUNT ON |
|||
|
|||
UPDATE [dbo].[tbl_transaction_details] |
|||
SET |
|||
RefundReferenceNo=@RefundReferenceNo, |
|||
CCTransactionStatus=@CCTransactionStatus, |
|||
CCTransactionStatusReason = @CCTransactionStatusReason |
|||
WHERE BookingId=@BookingId and CCTransactionId = @CCTransactionId and BuId=@BuId |
|||
|
|||
END |
|||
GO |
|||
|
|||
/****** Object: StoredProcedure [DealerSelection].[usp_update_dealer_details] Script Date: 1/3/2024 4:01:31 PM ******/ |
|||
SET ANSI_NULLS ON |
|||
GO |
|||
SET QUOTED_IDENTIFIER ON |
|||
GO |
|||
CREATE or ALTER PROCEDURE [DealerSelection].[usp_update_DealerSelectionJobStatus] |
|||
( |
|||
-- Add the parameters for the stored procedure here |
|||
@BuId INT, |
|||
@RecordId INT, |
|||
@DealerSelectionJobStatus INT |
|||
) |
|||
AS |
|||
BEGIN |
|||
-- SET NOCOUNT ON added to prevent extra result sets from |
|||
-- interfering with SELECT statements. |
|||
SET NOCOUNT ON |
|||
|
|||
|
|||
UPDATE [dbo].[tbl_customer_information] |
|||
SET |
|||
[DealerSelectionJobStatus]=@DealerSelectionJobStatus |
|||
WHERE RecordId=@RecordId and BuId = @BuId |
|||
|
|||
END |
@ -1,7 +1,7 @@ |
|||
{ |
|||
|
|||
"ConnectionStrings": { |
|||
"BOOKING": "user id=sqlAdmin;password=bFLW43%p40^;Data Source=mc-5f2bf602-449a-48b2-ae5a-5901-sql.database.windows.net,1433;Database=NoDealerBooking;", |
|||
"BOOKING": "user id=sqlAdmin;password=bFLW43%p40^;Data Source=mc-5f2bf602-449a-48b2-ae5a-5901-sql.database.windows.net,1433;Database=Booking;", |
|||
"BAJAJ": "user id=sqlAdmin;password=bFLW43%p40^;Data Source=mc-5f2bf602-449a-48b2-ae5a-5901-sql.database.windows.net,1433;Database=bajaj;", |
|||
"AZURE_LOGGING": "InstrumentationKey=2fead737-737a-4241-9e66-dfc5391583ba;IngestionEndpoint=https://centralindia-0.in.applicationinsights.azure.com/;LiveEndpoint=https://centralindia.livediagnostics.monitor.azure.com/" |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue