| Line 1133... |
Line 1133... |
| 1133 |
|
1133 |
|
| 1134 |
@RequestMapping(value = "/store/ScratchOffers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
1134 |
@RequestMapping(value = "/store/ScratchOffers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 1135 |
public ResponseEntity<?> scratchOffers(HttpServletRequest request, @RequestParam(value = "id") int id)
|
1135 |
public ResponseEntity<?> scratchOffers(HttpServletRequest request, @RequestParam(value = "id") int id)
|
| 1136 |
throws Exception {
|
1136 |
throws Exception {
|
| 1137 |
|
1137 |
|
| - |
|
1138 |
LocalDateTime startDate = LocalDateTime.of(LocalDate.now().getYear(), LocalDate.now().getMonth(), 14, 0, 0);
|
| - |
|
1139 |
|
| 1138 |
List<ScratchOffer> scratchOffers = scratchOfferRepository.selectBycCustomerId(id);
|
1140 |
List<ScratchOffer> scratchOffers = scratchOfferRepository.selectBycCustomerIdAndDate(id,
|
| - |
|
1141 |
startDate.toLocalDate());
|
| - |
|
1142 |
|
| - |
|
1143 |
// List<ScratchOffer> scratchOffers =
|
| - |
|
1144 |
// scratchOfferRepository.selectBycCustomerId(id);
|
| 1139 |
for (ScratchOffer so : scratchOffers) {
|
1145 |
for (ScratchOffer so : scratchOffers) {
|
| 1140 |
LocalDateTime endDate = LocalDateTime.of(LocalDate.now().getYear(), LocalDate.now().getMonth(), 27, 21, 00);
|
1146 |
LocalDateTime endDate = LocalDateTime.of(LocalDate.now().getYear(), LocalDate.now().getMonth(), 27, 21, 00);
|
| 1141 |
|
1147 |
|
| 1142 |
if (so.getOfferName() != null) {
|
1148 |
if (so.getOfferName() != null) {
|
| 1143 |
so.setExpiredTimestamp(endDate);
|
1149 |
so.setExpiredTimestamp(endDate);
|