Skip to content
Snippets Groups Projects
Commit 25b1c189 authored by fz2907's avatar fz2907
Browse files

Change == to equals

parent 2337c5aa
No related branches found
No related tags found
1 merge request!37Start AgreedMatchPage to show the ongoing matches and history matches for user...
...@@ -51,7 +51,7 @@ public class InteractiveController { ...@@ -51,7 +51,7 @@ public class InteractiveController {
InteractionModel result = interactionService.searchBothIdFromDB(newData.get("offerId").toString(), newData.get("wishlistId").toString()); InteractionModel result = interactionService.searchBothIdFromDB(newData.get("offerId").toString(), newData.get("wishlistId").toString());
if(result == null) { if(result == null) {
back = interactionService.addDataToDB(Integer.parseInt(newData.get("userId").toString()), null, newData.get("phone").toString(), null, false, newData.get("offerId").toString(), newData.get("wishlistId").toString()); back = interactionService.addDataToDB(Integer.parseInt(newData.get("userId").toString()), null, newData.get("phone").toString(), null, false, newData.get("offerId").toString(), newData.get("wishlistId").toString());
if(newData.get("see").toString() == "offer") { if("offer".equals(newData.get("see").toString())) {
MatchedWishlistRecordModel history = matchedWishlistRecordService.getHistoryFromDB(Long.parseLong(newData.get("offerId").toString()), Long.parseLong(newData.get("wishlistId").toString())); MatchedWishlistRecordModel history = matchedWishlistRecordService.getHistoryFromDB(Long.parseLong(newData.get("offerId").toString()), Long.parseLong(newData.get("wishlistId").toString()));
history.setOfferResult(LookupTables.MATCHING_RECORD_USER_RESULT.Accepted); history.setOfferResult(LookupTables.MATCHING_RECORD_USER_RESULT.Accepted);
matchedWishlistRecordService.updateToDB(history); matchedWishlistRecordService.updateToDB(history);
...@@ -77,7 +77,7 @@ public class InteractiveController { ...@@ -77,7 +77,7 @@ public class InteractiveController {
MatchedWishlistRecordModel history = matchedWishlistRecordService.getHistoryFromDB(Long.parseLong(newData.get("offerId").toString()), Long.parseLong(newData.get("wishlistId").toString())); MatchedWishlistRecordModel history = matchedWishlistRecordService.getHistoryFromDB(Long.parseLong(newData.get("offerId").toString()), Long.parseLong(newData.get("wishlistId").toString()));
System.out.println("why this happened " + history.toString()); System.out.println("why this happened " + history.toString());
} }
if(newData.get("see").toString() == "offer") { if("offer".equals(newData.get("see").toString())) {
MatchedWishlistRecordModel history = matchedWishlistRecordService.getHistoryFromDB(Long.parseLong(newData.get("offerId").toString()), Long.parseLong(newData.get("wishlistId").toString())); MatchedWishlistRecordModel history = matchedWishlistRecordService.getHistoryFromDB(Long.parseLong(newData.get("offerId").toString()), Long.parseLong(newData.get("wishlistId").toString()));
history.setOfferResult(LookupTables.MATCHING_RECORD_USER_RESULT.Accepted); history.setOfferResult(LookupTables.MATCHING_RECORD_USER_RESULT.Accepted);
matchedWishlistRecordService.updateToDB(history); matchedWishlistRecordService.updateToDB(history);
...@@ -133,7 +133,7 @@ public class InteractiveController { ...@@ -133,7 +133,7 @@ public class InteractiveController {
System.out.println(result); System.out.println(result);
if(result == null) { if(result == null) {
back = interactionService.addDataToDB(Integer.parseInt(newData.get("userId").toString()), null, null, null, false, newData.get("offerId").toString(), newData.get("wishlistId").toString()); back = interactionService.addDataToDB(Integer.parseInt(newData.get("userId").toString()), null, null, null, false, newData.get("offerId").toString(), newData.get("wishlistId").toString());
if(newData.get("see").toString() == "offer") { if("offer".equals(newData.get("see").toString())) {
MatchedWishlistRecordModel history = matchedWishlistRecordService.getHistoryFromDB(Long.parseLong(newData.get("offerId").toString()), Long.parseLong(newData.get("wishlistId").toString())); MatchedWishlistRecordModel history = matchedWishlistRecordService.getHistoryFromDB(Long.parseLong(newData.get("offerId").toString()), Long.parseLong(newData.get("wishlistId").toString()));
history.setOfferResult(LookupTables.MATCHING_RECORD_USER_RESULT.Declined); history.setOfferResult(LookupTables.MATCHING_RECORD_USER_RESULT.Declined);
matchedWishlistRecordService.updateToDB(history); matchedWishlistRecordService.updateToDB(history);
...@@ -152,7 +152,7 @@ public class InteractiveController { ...@@ -152,7 +152,7 @@ public class InteractiveController {
InteractionModel resultAfterUpdate = interactionService.updateToDB(result); InteractionModel resultAfterUpdate = interactionService.updateToDB(result);
back = resultAfterUpdate; back = resultAfterUpdate;
} }
if(newData.get("see").toString() == "offer") { if("offer".equals(newData.get("see").toString())) {
MatchedWishlistRecordModel history = matchedWishlistRecordService.getHistoryFromDB(Long.parseLong(newData.get("offerId").toString()), Long.parseLong(newData.get("wishlistId").toString())); MatchedWishlistRecordModel history = matchedWishlistRecordService.getHistoryFromDB(Long.parseLong(newData.get("offerId").toString()), Long.parseLong(newData.get("wishlistId").toString()));
history.setOfferResult(LookupTables.MATCHING_RECORD_USER_RESULT.Declined); history.setOfferResult(LookupTables.MATCHING_RECORD_USER_RESULT.Declined);
matchedWishlistRecordService.updateToDB(history); matchedWishlistRecordService.updateToDB(history);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment