| Line 81... |
Line 81... |
| 81 |
import javax.servlet.http.HttpServletResponse;
|
81 |
import javax.servlet.http.HttpServletResponse;
|
| 82 |
import java.io.ByteArrayInputStream;
|
82 |
import java.io.ByteArrayInputStream;
|
| 83 |
import java.io.ByteArrayOutputStream;
|
83 |
import java.io.ByteArrayOutputStream;
|
| 84 |
import java.io.IOException;
|
84 |
import java.io.IOException;
|
| 85 |
import java.io.InputStream;
|
85 |
import java.io.InputStream;
|
| - |
|
86 |
import java.time.LocalDate;
|
| 86 |
import java.time.LocalDateTime;
|
87 |
import java.time.LocalDateTime;
|
| 87 |
import java.time.LocalTime;
|
88 |
import java.time.LocalTime;
|
| 88 |
import java.time.format.DateTimeFormatter;
|
89 |
import java.time.format.DateTimeFormatter;
|
| 89 |
import java.util.*;
|
90 |
import java.util.*;
|
| 90 |
import java.util.stream.Collectors;
|
91 |
import java.util.stream.Collectors;
|
| Line 1314... |
Line 1315... |
| 1314 |
}
|
1315 |
}
|
| 1315 |
|
1316 |
|
| 1316 |
@RequestMapping(value = "/store/clearance/bid", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
1317 |
@RequestMapping(value = "/store/clearance/bid", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 1317 |
@ApiImplicitParams({@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header")})
|
1318 |
@ApiImplicitParams({@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header")})
|
| 1318 |
public ResponseEntity<?> saveBidding(HttpServletRequest request, @RequestBody BiddingModel biddingModel) throws Exception {
|
1319 |
public ResponseEntity<?> saveBidding(HttpServletRequest request, @RequestBody BiddingModel biddingModel) throws Exception {
|
| - |
|
1320 |
LocalDateTime now = LocalDateTime.now();
|
| - |
|
1321 |
LocalDateTime sixPmToday = LocalDateTime.of(LocalDate.now(), LocalTime.of(18, 0));
|
| - |
|
1322 |
if (now.isAfter(sixPmToday)) {
|
| - |
|
1323 |
return responseSender.badRequest("false");
|
| - |
|
1324 |
}
|
| 1319 |
Bid bid = null;
|
1325 |
Bid bid = null;
|
| 1320 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
1326 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
| 1321 |
if (biddingModel.getId() != null && biddingModel.getId() > 0) {
|
1327 |
if (biddingModel.getId() != null && biddingModel.getId() > 0) {
|
| 1322 |
bid = bidRepository.selectById(biddingModel.getId());
|
1328 |
bid = bidRepository.selectById(biddingModel.getId());
|
| 1323 |
if (bid == null) {
|
1329 |
if (bid == null) {
|