uco independent service added
commit
774370e148
@ -0,0 +1,33 @@
|
|||||||
|
# Compiled class file
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# Log file
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# BlueJ files
|
||||||
|
*.ctxt
|
||||||
|
|
||||||
|
# Mobile Tools for Java (J2ME)
|
||||||
|
.mtj.tmp/
|
||||||
|
|
||||||
|
# Package Files #
|
||||||
|
*.jar
|
||||||
|
*.war
|
||||||
|
*.nar
|
||||||
|
*.ear
|
||||||
|
*.zip
|
||||||
|
*.tar.gz
|
||||||
|
*.rar
|
||||||
|
*.iml
|
||||||
|
*.mnv
|
||||||
|
*.jar.original
|
||||||
|
maven-wrapper.properties
|
||||||
|
maven-wrapper.jar
|
||||||
|
.\mvn
|
||||||
|
|
||||||
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
|
hs_err_pid*
|
||||||
|
replay_pid*
|
||||||
|
.idea
|
||||||
|
|
||||||
|
target
|
||||||
@ -0,0 +1,114 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>3.2.2</version>
|
||||||
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
|
</parent>
|
||||||
|
<artifactId>uco</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
<name>UCO-BS</name>
|
||||||
|
<description>UCO-BS </description>
|
||||||
|
<properties>
|
||||||
|
<java.version>17</java.version>
|
||||||
|
<spring-cloud.version>2023.0.0</spring-cloud.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.itextpdf</groupId>
|
||||||
|
<artifactId>itext7-core</artifactId>
|
||||||
|
<version>7.1.9</version>
|
||||||
|
<type>pom</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mfsys</groupId>
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<version>3.2.2</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
<version>2.4.0-b180830.0359</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt-api</artifactId>
|
||||||
|
<version>0.11.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt-impl</artifactId>
|
||||||
|
<version>0.11.5</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt-jackson</artifactId>
|
||||||
|
<version>0.11.5</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||||
|
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.validation</groupId>
|
||||||
|
<artifactId>jakarta.validation-api</artifactId>
|
||||||
|
<version>2.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.persistence</groupId>
|
||||||
|
<artifactId>jakarta.persistence-api</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-dependencies</artifactId>
|
||||||
|
<version>${spring-cloud.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.mfsys.uco;
|
||||||
|
|
||||||
|
public interface UCOURI {
|
||||||
|
String VIEW_BALANCE = "/user/viewBalance";
|
||||||
|
String FETCH_DEPOSITACCOUNTS = "/depositAccounts";
|
||||||
|
String FETCH_ACCOUNT_STATEMENT = "/accountStatement";
|
||||||
|
String FETCH_ACCOUNT_INQUIRY = "/accountInquiry";
|
||||||
|
String GET_TRANSACTION_PIN = "/transactionPin";
|
||||||
|
String SUBMIT_TRANSACTION = "/submitTransaction";
|
||||||
|
String GENERATE_TRANSACTIONS_REPORT = "/generateReport";
|
||||||
|
String REFRESH_TOKEN = "/auth/refresh-token";
|
||||||
|
String CHANGE_PASSWORD = "/user/changePassword";
|
||||||
|
String RESET_PASSWORD = "/user/resetPassword";
|
||||||
|
String GENERATE_INTERNAL_TOKEN = "/auth/generateInternalToken";
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package com.mfsys.uco;
|
||||||
|
|
||||||
|
import com.mfsys.comm.constant.MicroserviceBaseURI;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||||
|
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
|
||||||
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
|
||||||
|
@SpringBootApplication(scanBasePackages = {"com.mfsys"})
|
||||||
|
@EnableDiscoveryClient
|
||||||
|
public class UcoApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(UcoApplication.class, args);
|
||||||
|
}
|
||||||
|
@Bean
|
||||||
|
public WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> webServerFactoryCustomizer() {
|
||||||
|
return factory -> factory.setContextPath(MicroserviceBaseURI.UCO);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,111 @@
|
|||||||
|
package com.mfsys.uco.controller;
|
||||||
|
|
||||||
|
import com.itextpdf.kernel.pdf.PdfDocument;
|
||||||
|
import com.itextpdf.kernel.pdf.PdfWriter;
|
||||||
|
import com.itextpdf.layout.Document;
|
||||||
|
import com.itextpdf.layout.element.Paragraph;
|
||||||
|
import com.mfsys.uco.UCOURI;
|
||||||
|
import com.mfsys.uco.dto.*;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Base64;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class UserController {
|
||||||
|
@PostMapping(UCOURI.VIEW_BALANCE)
|
||||||
|
public ViewBalanceResponseModel viewBalance(@RequestBody ViewBalanceRequestModel viewBalanceRequestModel) {
|
||||||
|
ViewBalanceResponseModel viewBalanceResponseModel = new ViewBalanceResponseModel();
|
||||||
|
viewBalanceResponseModel.setMbmBkmsbalance("100.00");
|
||||||
|
return viewBalanceResponseModel;
|
||||||
|
}
|
||||||
|
@GetMapping(UCOURI.FETCH_DEPOSITACCOUNTS)
|
||||||
|
public List<DepositAccount> getDepositAccounts(
|
||||||
|
@RequestParam String porOrgacode,
|
||||||
|
@RequestParam String custcode,
|
||||||
|
@RequestParam String pctcstycode) {
|
||||||
|
|
||||||
|
List<DepositAccount> accounts = new ArrayList<>();
|
||||||
|
DepositAccount account = new DepositAccount();
|
||||||
|
account.setPorOrgacode(porOrgacode);
|
||||||
|
account.setMbmBkmsnumber("123456789");
|
||||||
|
account.setPcrCurrdesc("US Dollars");
|
||||||
|
account.setPcrCurrCode("USD");
|
||||||
|
account.setPctCstycode(pctcstycode);
|
||||||
|
account.setMbmBkmstitle("Savings Account");
|
||||||
|
account.setMbmBkmsbalance(new BigDecimal("1000.00"));
|
||||||
|
account.setMbmBkmsopendate("2021-01-01");
|
||||||
|
account.setAccountType("SAVINGS");
|
||||||
|
accounts.add(account);
|
||||||
|
return accounts;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(UCOURI.FETCH_ACCOUNT_STATEMENT)
|
||||||
|
public List<DepositAccountTransaction> getAccountStatement(
|
||||||
|
@RequestParam String porOrgacode,
|
||||||
|
@RequestParam String mbmBkmsnumber,
|
||||||
|
@RequestParam String sgtGntrvaluedatefrom,
|
||||||
|
@RequestParam String sgtGntrvaluedateto
|
||||||
|
) {
|
||||||
|
|
||||||
|
List<DepositAccountTransaction> transactions = new ArrayList<>();
|
||||||
|
DepositAccountTransaction transaction = new DepositAccountTransaction();
|
||||||
|
transaction.setTranID("12345");
|
||||||
|
transaction.setSgtGntrCreatedAt("2024-03-17");
|
||||||
|
transaction.setSgtGntrNarration("Sample Transaction");
|
||||||
|
transaction.setSgtGntrvaluedate("2024-03-17");
|
||||||
|
transaction.setDeposit("100.00");
|
||||||
|
transaction.setWithdrawal("0.00");
|
||||||
|
transaction.setStatus("approved");
|
||||||
|
transaction.setSgtGntramt("1000.00");
|
||||||
|
transactions.add(transaction);
|
||||||
|
return transactions;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(UCOURI.FETCH_ACCOUNT_INQUIRY)
|
||||||
|
public AccountInquiryResponse getAccountInquiry(
|
||||||
|
@RequestParam String acntTypeCode,
|
||||||
|
@RequestParam String acntTypeValue) {
|
||||||
|
|
||||||
|
return new AccountInquiryResponse("Nabeel Dce");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(UCOURI.GET_TRANSACTION_PIN)
|
||||||
|
public TransactionPinResponseModel submitTransaction(@RequestBody TransactionPinRequestModel transactionPinRequestModel) {
|
||||||
|
TransactionPinResponseModel response = new TransactionPinResponseModel();
|
||||||
|
response.setOtdTranrequestid(123456);
|
||||||
|
response.setPinCode("1234");
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(UCOURI.SUBMIT_TRANSACTION)
|
||||||
|
public TransactionResponseModel submitTransaction(@RequestBody TransactionRequestModel transactionRequestModel) {
|
||||||
|
String mockTranID = "TRAN1234567890";
|
||||||
|
return new TransactionResponseModel(mockTranID);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(UCOURI.GENERATE_TRANSACTIONS_REPORT)
|
||||||
|
public String generateReport(@RequestBody TransactionHistoryRequest request) {
|
||||||
|
try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
|
||||||
|
PdfWriter writer = new PdfWriter(baos);
|
||||||
|
PdfDocument pdf = new PdfDocument(writer);
|
||||||
|
Document document = new Document(pdf);
|
||||||
|
|
||||||
|
document.add(new Paragraph("Account Transaction History Report"));
|
||||||
|
document.add(new Paragraph("Organization Code: " + request.getPorOrgacode()));
|
||||||
|
document.add(new Paragraph("Account Number: " + request.getMbmBkmsnumber()));
|
||||||
|
document.add(new Paragraph("From: " + request.getSgtGntrvaluedatefrom() + " To: " + request.getSgtGntrvaluedateto()));
|
||||||
|
document.close();
|
||||||
|
String base64EncodedPdf = Base64.getEncoder().encodeToString(baos.toByteArray());
|
||||||
|
return base64EncodedPdf;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return "Error generating report";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.mfsys.uco.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class AccountInquiryResponse {
|
||||||
|
private String mbmBkmstitle;
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.mfsys.uco.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DepositAccount {
|
||||||
|
private String porOrgacode;
|
||||||
|
private String mbmBkmsnumber;
|
||||||
|
private String pcrCurrdesc;
|
||||||
|
private String pcrCurrCode;
|
||||||
|
private String pctCstycode;
|
||||||
|
private String mbmBkmstitle;
|
||||||
|
private BigDecimal mbmBkmsbalance;
|
||||||
|
private String mbmBkmsopendate;
|
||||||
|
private String AccountType;
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package com.mfsys.uco.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DepositAccountTransaction{
|
||||||
|
private String tranID;
|
||||||
|
private String sgtGntrCreatedAt;
|
||||||
|
private String sgtGntrNarration;
|
||||||
|
private String sgtGntrvaluedate;
|
||||||
|
private String deposit;
|
||||||
|
private String withdrawal;
|
||||||
|
private String status;
|
||||||
|
private String sgtGntramt;
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.mfsys.uco.dto;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TransactionHistoryRequest {
|
||||||
|
private String porOrgacode;
|
||||||
|
private String mbmBkmsnumber;
|
||||||
|
private String sgtGntrvaluedatefrom;
|
||||||
|
private String sgtGntrvaluedateto;
|
||||||
|
private String type; // Expected to be "pdf"
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.mfsys.uco.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TransactionPinRequestModel {
|
||||||
|
private String porOrgacode;
|
||||||
|
private String pctCstycode;
|
||||||
|
private String channelCode;
|
||||||
|
private String cmpCustcode;
|
||||||
|
private String drMbmBkmsnumber;
|
||||||
|
private String crMbmBkmsnumber;
|
||||||
|
private String sgtGntrnarration;
|
||||||
|
private double sgtGntramtfc;
|
||||||
|
private String drCurrencyCode;
|
||||||
|
private String crCurrencyCode;
|
||||||
|
private String exchnageRate;
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.mfsys.uco.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TransactionPinResponseModel {
|
||||||
|
private double otdTranrequestid;
|
||||||
|
private String pinCode;
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.mfsys.uco.dto;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TransactionRequestModel {
|
||||||
|
private String porOrgacode;
|
||||||
|
private String pctCstycode;
|
||||||
|
private String channelCode;
|
||||||
|
private String cmpCustcode;
|
||||||
|
private String obpPincode;
|
||||||
|
private String otdTrancomment;
|
||||||
|
private String otdTranrequestid;
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.mfsys.uco.dto;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TransactionResponseModel {
|
||||||
|
private String tranID;
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.mfsys.uco.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ViewBalanceRequestModel {
|
||||||
|
String cmpCustcode;
|
||||||
|
String mbmBkmsNumber;
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.mfsys.uco.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ViewBalanceResponseModel {
|
||||||
|
private String mbmBkmsbalance;
|
||||||
|
}
|
||||||
@ -0,0 +1,132 @@
|
|||||||
|
|
||||||
|
|
||||||
|
POST=> WhiteListed
|
||||||
|
SignupStep1RequestModel {
|
||||||
|
final String username;
|
||||||
|
final String password;
|
||||||
|
final String email;
|
||||||
|
final String phone;
|
||||||
|
final String userRole; (hard code for now)
|
||||||
|
final String channelCode;
|
||||||
|
final String porOrgacode;
|
||||||
|
final boolean isOtpRequired;
|
||||||
|
}
|
||||||
|
|
||||||
|
response:
|
||||||
|
{
|
||||||
|
200
|
||||||
|
}
|
||||||
|
|
||||||
|
OTP verify request model:
|
||||||
|
|
||||||
|
POST=> WhiteListed
|
||||||
|
SignupVerifyOtpRequestModel {
|
||||||
|
final String username;
|
||||||
|
final String email;
|
||||||
|
final String phone;
|
||||||
|
final String channelCode;
|
||||||
|
final String porOrgacode;
|
||||||
|
String obpPincode;
|
||||||
|
}
|
||||||
|
|
||||||
|
Response: {
|
||||||
|
200
|
||||||
|
}
|
||||||
|
|
||||||
|
on success
|
||||||
|
|
||||||
|
POST=> WhiteListed
|
||||||
|
SignupStep2RequestModel {
|
||||||
|
final String username;
|
||||||
|
final String email;
|
||||||
|
final String phone;
|
||||||
|
final String name;
|
||||||
|
final String address;
|
||||||
|
final String identificationType;
|
||||||
|
final String identificationNumber;
|
||||||
|
final boolean isKycAdded;
|
||||||
|
final String kycType;
|
||||||
|
final String kycDocumentId1; (Either base64 or separate requset ==> Discussion)
|
||||||
|
final String kycDocumentId2; (Either base64 or separate requset ==> Discussion)
|
||||||
|
final String userRole;
|
||||||
|
final String channelCode;
|
||||||
|
final String porOrgacode;
|
||||||
|
}
|
||||||
|
|
||||||
|
user gets persisted in the db
|
||||||
|
request sent to ciihive for CRM and Deposit
|
||||||
|
custCode acc number saves in UCO database.
|
||||||
|
Response {200}
|
||||||
|
|
||||||
|
=========================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-----------Login REQ RES -----------
|
||||||
|
Request:
|
||||||
|
POST=>
|
||||||
|
LoginRequestModel {
|
||||||
|
final String username/email;
|
||||||
|
final String password;
|
||||||
|
final String channelCode;
|
||||||
|
final boolean isOtpRequired;
|
||||||
|
final String porOrgacode;
|
||||||
|
}
|
||||||
|
|
||||||
|
Response:
|
||||||
|
POST=>
|
||||||
|
class LoginResponseModel {
|
||||||
|
String cmpFirstname;
|
||||||
|
String cmpLastname;
|
||||||
|
String cmpCuststatus;
|
||||||
|
String plcLocacode;
|
||||||
|
String cmpCustlastlogin;
|
||||||
|
String cmpCustcode;
|
||||||
|
String userRole;
|
||||||
|
String jwtToken;
|
||||||
|
boolean isKycVerified;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if opt flag is true then an opt will be sent to user email once done then user can enter the otp and below request will be sent to the uco.
|
||||||
|
|
||||||
|
-----------OTP REQ RES -----------
|
||||||
|
POST=>
|
||||||
|
class LoginVerifyOtpRequestModel {
|
||||||
|
String cmpUserId / email;
|
||||||
|
String cmpCustpassword;
|
||||||
|
String channelCode;
|
||||||
|
String obpPincode;
|
||||||
|
String porOrgacode;
|
||||||
|
String String jwtToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
if otp gets matched then success else forbidden
|
||||||
|
response {
|
||||||
|
200
|
||||||
|
}
|
||||||
|
|
||||||
|
view balance request:
|
||||||
|
|
||||||
|
user balance wont be shown in the begning but simply ***** this
|
||||||
|
if user want to see there balance then
|
||||||
|
POST=>
|
||||||
|
class ViewBalanceRequestModel {
|
||||||
|
String plcLocacode;
|
||||||
|
String cmpCustcode;
|
||||||
|
String mbmBkmsNumber;
|
||||||
|
String jwtToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
response
|
||||||
|
class ViewBalanceResponseModel {
|
||||||
|
String mbmBkmsbalance
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
=======================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
server:
|
||||||
|
port: 8082
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: UCO-SERVICE
|
||||||
|
datasource:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://localhost:3306/uco
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
jpa:
|
||||||
|
show-sql: true
|
||||||
|
hibernate:
|
||||||
|
ddl-auto: update
|
||||||
|
properties:
|
||||||
|
hibernate:
|
||||||
|
dialect: org.hibernate.dialect.MySQLDialect
|
||||||
|
|
||||||
|
eureka:
|
||||||
|
instance:
|
||||||
|
prefer-ip-address: true
|
||||||
|
client:
|
||||||
|
fetch-registry: true
|
||||||
|
register-with-eureka: true
|
||||||
|
service-url:
|
||||||
|
defaultZone: http://localhost:8761/eureka
|
||||||
|
|
||||||
|
#application:
|
||||||
|
# security:
|
||||||
|
# jwt:
|
||||||
|
# secret-key: 404E635266556A586E3272357538782F413F4428472B4B6250645367566B5970
|
||||||
|
# expiration: 86400000
|
||||||
|
# refresh-token:
|
||||||
|
# expiration: 604800000 # 7 days
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
POST:
|
||||||
|
http://localhost:8888/security/auth/user/register
|
||||||
|
|
||||||
|
{
|
||||||
|
"firstname":"nabeel",
|
||||||
|
"lastname":"ahmad",
|
||||||
|
"email":"nabeelx64@icloud.com",
|
||||||
|
"password":"ki11",
|
||||||
|
"role":"ADMIN"
|
||||||
|
}
|
||||||
|
|
||||||
|
POST:
|
||||||
|
login
|
||||||
|
|
||||||
|
http://localhost:8888/security/auth/user/authenticate
|
||||||
|
|
||||||
|
{
|
||||||
|
"email":"nabeelx64@icloud.com",
|
||||||
|
"password":"ki11"
|
||||||
|
}
|
||||||
|
|
||||||
|
PATCH change password:
|
||||||
|
http://localhost:8888/security/user/changePassword
|
||||||
|
|
||||||
|
{
|
||||||
|
"oldPassword":"ki11",
|
||||||
|
"newPassword":"11223344",
|
||||||
|
"email":"nabeelx64@icloud.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
Get:
|
||||||
|
UCO test:
|
||||||
|
http://localhost:8888/uco/hello
|
||||||
Loading…
Reference in New Issue