Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OTSWithFeign
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siva Naga Someswara Jatla
OTSWithFeign
Commits
285acc44
Commit
285acc44
authored
Apr 17, 2020
by
Naren Medarametla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed data type in offerlookup entity
parent
a6d55bdd
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
18 deletions
+18
-18
OfferLookupRepo.java
...om/nisum/offertransactionservice/dao/OfferLookupRepo.java
+2
-2
OfferLookupDTO.java
...com/nisum/offertransactionservice/dto/OfferLookupDTO.java
+1
-1
OfferTransactionRequest.java
.../offertransactionservice/dto/OfferTransactionRequest.java
+1
-1
OfferLookup.java
.../com/nisum/offertransactionservice/model/OfferLookup.java
+1
-1
OfferLookupComposite.java
...m/offertransactionservice/model/OfferLookupComposite.java
+1
-1
application.properties
src/main/resources/application.properties
+1
-1
OfferTransactionControllerTest.java
...ionservice/controller/OfferTransactionControllerTest.java
+4
-4
EndOfSaleTest.java
.../nisum/offertransactionservice/service/EndOfSaleTest.java
+2
-2
OfferServiceTest.java
...sum/offertransactionservice/service/OfferServiceTest.java
+5
-5
No files found.
src/main/java/com/nisum/offertransactionservice/dao/OfferLookupRepo.java
View file @
285acc44
...
...
@@ -10,10 +10,10 @@ import javax.swing.text.html.Option;
import
java.util.List
;
import
java.util.Optional
;
public
interface
OfferLookupRepo
extends
JpaRepository
<
OfferLookup
,
Lo
ng
>
{
public
interface
OfferLookupRepo
extends
JpaRepository
<
OfferLookup
,
Stri
ng
>
{
@Query
(
value
=
"SELECT * FROM offer_lookup WHERE id=:hhid"
,
nativeQuery
=
true
)
public
List
<
OfferLookup
>
findByHhId
(
Lo
ng
hhid
);
public
List
<
OfferLookup
>
findByHhId
(
Stri
ng
hhid
);
...
...
src/main/java/com/nisum/offertransactionservice/dto/OfferLookupDTO.java
View file @
285acc44
...
...
@@ -18,7 +18,7 @@ import javax.persistence.EmbeddedId;
public
class
OfferLookupDTO
{
Lo
ng
id
;
Stri
ng
id
;
String
idType
;
Long
offerId
;
String
storeId
;
...
...
src/main/java/com/nisum/offertransactionservice/dto/OfferTransactionRequest.java
View file @
285acc44
...
...
@@ -21,7 +21,7 @@ import static com.google.common.collect.Lists.newArrayList;
public
class
OfferTransactionRequest
{
@NotNull
Lo
ng
hhId
;
Stri
ng
hhId
;
String
transactionId
=
UUID
.
randomUUID
().
toString
();
...
...
src/main/java/com/nisum/offertransactionservice/model/OfferLookup.java
View file @
285acc44
...
...
@@ -19,7 +19,7 @@ public class OfferLookup {
@Id
@Column
(
name
=
"id"
)
Lo
ng
id
;
Stri
ng
id
;
@Id
@Column
(
name
=
"offer_type"
)
...
...
src/main/java/com/nisum/offertransactionservice/model/OfferLookupComposite.java
View file @
285acc44
...
...
@@ -19,7 +19,7 @@ public class OfferLookupComposite implements Serializable {
@Column
(
name
=
"id"
)
Lo
ng
id
;
Stri
ng
id
;
@Column
(
name
=
"offer_type"
)
String
idType
;
...
...
src/main/resources/application.properties
View file @
285acc44
spring.datasource.url
=
jdbc:postgresql://127.0.0.1:5432/storedb
spring.datasource.username
=
postgres
spring.datasource.password
=
dbpwd
spring.datasource.password
=
welcome123
endpoint.url.promotionEngineUrl
=
/promotionEngine/calculateDiscount
endpoint.url.peBaseUrl
=
http://localhost:7073
endpoint.url.storeProducerUrl
=
/store/producer
...
...
src/test/java/com/nisum/offertransactionservice/controller/OfferTransactionControllerTest.java
View file @
285acc44
...
...
@@ -81,8 +81,8 @@ class OfferTransactionControllerTest {
}
private
List
<
OfferLookup
>
getOffers
()
{
OfferLookup
offerLookup1
=
new
OfferLookup
(
1L
,
"12"
,
234L
,
"02"
,
"AND"
,
"BOGO"
);
OfferLookup
offerLookup2
=
new
OfferLookup
(
2L
,
"13"
,
234L
,
"02"
,
"OR"
,
"BXGY"
);
OfferLookup
offerLookup1
=
new
OfferLookup
(
"123"
,
"12"
,
234L
,
"02"
,
"AND"
,
"BOGO"
);
OfferLookup
offerLookup2
=
new
OfferLookup
(
"1213"
,
"13"
,
234L
,
"02"
,
"OR"
,
"BXGY"
);
List
<
OfferLookup
>
offerLookups
=
new
ArrayList
<>();
offerLookups
.
add
(
offerLookup1
);
offerLookups
.
add
(
offerLookup2
);
...
...
@@ -139,7 +139,7 @@ class OfferTransactionControllerTest {
private
List
<
OfferLookupDTO
>
getOfferLookupDto
(){
OfferLookupDTO
offerLookupDTO
=
new
OfferLookupDTO
();
offerLookupDTO
.
setId
(
123456L
);
offerLookupDTO
.
setId
(
"123"
);
offerLookupDTO
.
setIdType
(
"1234"
);
offerLookupDTO
.
setOfferId
(
1L
);
offerLookupDTO
.
setPreCondition
(
"And"
);
...
...
@@ -161,7 +161,7 @@ class OfferTransactionControllerTest {
OfferLookupDTO
offerLookupDTO1
=
new
OfferLookupDTO
();
offerLookupDTO1
.
setId
(
123456L
);
offerLookupDTO1
.
setId
(
"123"
);
offerLookupDTO1
.
setIdType
(
"1234"
);
offerLookupDTO1
.
setOfferId
(
1L
);
offerLookupDTO1
.
setPreCondition
(
"And"
);
...
...
src/test/java/com/nisum/offertransactionservice/service/EndOfSaleTest.java
View file @
285acc44
...
...
@@ -93,8 +93,8 @@ public class EndOfSaleTest {
}
public
List
<
OfferLookup
>
returnOffers
()
{
OfferLookup
offerLookup1
=
new
OfferLookup
(
1L
,
"12"
,
23L
,
"02"
,
"AND"
,
"BOGO"
);
OfferLookup
offerLookup2
=
new
OfferLookup
(
2L
,
"13"
,
24L
,
"02"
,
"OR"
,
"BXGY"
);
OfferLookup
offerLookup1
=
new
OfferLookup
(
"1"
,
"12"
,
23L
,
"02"
,
"AND"
,
"BOGO"
);
OfferLookup
offerLookup2
=
new
OfferLookup
(
"2"
,
"13"
,
24L
,
"02"
,
"OR"
,
"BXGY"
);
List
<
OfferLookup
>
offerLookups
=
new
ArrayList
<>();
offerLookups
.
add
(
offerLookup1
);
offerLookups
.
add
(
offerLookup2
);
...
...
src/test/java/com/nisum/offertransactionservice/service/OfferServiceTest.java
View file @
285acc44
...
...
@@ -103,7 +103,7 @@ public class OfferServiceTest {
private
OfferTransactionRequest
getOfferTransactionRequest
()
{
OfferTransactionRequest
offerTransactionRequest
=
new
OfferTransactionRequest
();
offerTransactionRequest
.
setHhId
(
123L
);
offerTransactionRequest
.
setHhId
(
"123"
);
List
<
Item
>
itemList
=
new
ArrayList
<>();
Item
item1
=
new
Item
(
"Coke"
,
"12"
,
6.05
);
Item
item2
=
new
Item
(
"Thumpsup"
,
"11"
,
12.32
);
...
...
@@ -114,8 +114,8 @@ public class OfferServiceTest {
}
public
List
<
OfferLookup
>
returnOffers
()
{
OfferLookup
offerLookup1
=
new
OfferLookup
(
1L
,
"12"
,
20L
,
"02"
,
"AND"
,
"BOGO"
);
OfferLookup
offerLookup2
=
new
OfferLookup
(
2L
,
"13"
,
23L
,
"02"
,
"OR"
,
"BXGY"
);
OfferLookup
offerLookup1
=
new
OfferLookup
(
"1"
,
"12"
,
20L
,
"02"
,
"AND"
,
"BOGO"
);
OfferLookup
offerLookup2
=
new
OfferLookup
(
"2"
,
"13"
,
23L
,
"02"
,
"OR"
,
"BXGY"
);
List
<
OfferLookup
>
offerLookups
=
new
ArrayList
<>();
offerLookups
.
add
(
offerLookup1
);
offerLookups
.
add
(
offerLookup2
);
...
...
@@ -141,7 +141,7 @@ public class OfferServiceTest {
private
List
<
OfferLookupDTO
>
getOfferLookupDto
(){
OfferLookupDTO
offerLookupDTO
=
new
OfferLookupDTO
();
offerLookupDTO
.
setId
(
123456L
);
offerLookupDTO
.
setId
(
"12345"
);
offerLookupDTO
.
setIdType
(
"1234"
);
offerLookupDTO
.
setOfferId
(
1L
);
offerLookupDTO
.
setPreCondition
(
"And"
);
...
...
@@ -163,7 +163,7 @@ public class OfferServiceTest {
OfferLookupDTO
offerLookupDTO1
=
new
OfferLookupDTO
();
offerLookupDTO1
.
setId
(
123456L
);
offerLookupDTO1
.
setId
(
"12345"
);
offerLookupDTO1
.
setIdType
(
"1234"
);
offerLookupDTO1
.
setOfferId
(
1L
);
offerLookupDTO1
.
setPreCondition
(
"And"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment