You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
3.9 KiB
61 lines
3.9 KiB
USE [FastMoneyPro_Remit]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[proc_customerInfoWithPinNo] Script Date: 12/12/2023 1:10:41 PM ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
ALTER PROC [dbo].[proc_customerInfoWithPinNo]
|
|
@flag varchar(40)
|
|
,@user varchar(20) = NULL
|
|
,@customerId BIGINT = NULL
|
|
AS
|
|
---------------------------------------------------------------
|
|
-- Set '111111' as default txnpin for now
|
|
---------------------------------------------------------------
|
|
|
|
BEGIN
|
|
IF @flag = 'getDetailsWithPin'
|
|
BEGIN
|
|
DECLARE @pinNo int,@userName varchar(50),@firstName varchar(20),@password varchar(10),@createdFrom char(1),@txnPin int
|
|
|
|
SELECT @firstName = FIRSTNAME
|
|
,@createdFrom = createdFrom
|
|
,@txnPin = txnPin
|
|
,@userName = username
|
|
,@password = customerPassword
|
|
FROM CUSTOMERMASTER WHERE CUSTOMERID =@customerId
|
|
|
|
IF @userName IS NULL
|
|
BEGIN
|
|
SELECT @userName = DBO.GetRandomUsername(@firstName)
|
|
update customerMaster set userName = @userName where customerId = @customerId
|
|
END
|
|
|
|
--IF @password IS NULL
|
|
--BEGIN
|
|
-- SELECT @password = DBO.FNAGetRandomPassword(6)
|
|
-- update customerMaster set customerPassword = @password where customerId = @customerId
|
|
--END
|
|
|
|
IF @txnPin IS NULL OR @txnPin=''
|
|
BEGIN
|
|
SET @pinNo = DBO.FNAGetRandomTransactionPinNo(6)
|
|
update customerMaster set txnPin = @pinNo where customerId = @customerId
|
|
END
|
|
|
|
SELECT FullName
|
|
,txnPin PinNo
|
|
,username UserName
|
|
,DBO.FNADECRYPTSTRING(customerPassword) Password
|
|
,[Address1] = ISNULL(address,'')
|
|
,[Address2] = ISNULL( cm.additionalAddress,'')
|
|
,[City] = ISNULL(city,'')
|
|
,[additionalAddress] = ISNULL( cm.additionalAddress,'')
|
|
|
|
FROM customermaster CM (NOLOCK)
|
|
LEFT JOIN tbl_japan_address_detail detail WITH (NOLOCK) ON detail.zip_code = CM.zipcode
|
|
LEFT JOIN dbo.countryStateMaster SS(NOLOCK) ON cast(SS.stateId as int)= detail.state_Id
|
|
WHERE customerId = @customerId
|
|
END
|
|
END
|