| 21612 |
ashik.ali |
1 |
package com.spice.profitmandi.web.controller;
|
|
|
2 |
|
| 21689 |
ashik.ali |
3 |
import java.io.ByteArrayInputStream;
|
|
|
4 |
import java.io.ByteArrayOutputStream;
|
|
|
5 |
import java.io.InputStream;
|
| 22244 |
ashik.ali |
6 |
import java.time.LocalDateTime;
|
| 21680 |
ashik.ali |
7 |
import java.util.ArrayList;
|
| 21612 |
ashik.ali |
8 |
import java.util.HashSet;
|
| 21680 |
ashik.ali |
9 |
import java.util.List;
|
|
|
10 |
import java.util.Map;
|
| 21612 |
ashik.ali |
11 |
import java.util.Set;
|
|
|
12 |
|
|
|
13 |
import javax.servlet.http.HttpServletRequest;
|
| 21689 |
ashik.ali |
14 |
import javax.servlet.http.HttpServletResponse;
|
| 21612 |
ashik.ali |
15 |
|
|
|
16 |
import org.slf4j.Logger;
|
|
|
17 |
import org.slf4j.LoggerFactory;
|
|
|
18 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 21689 |
ashik.ali |
19 |
import org.springframework.core.io.InputStreamResource;
|
|
|
20 |
import org.springframework.http.HttpHeaders;
|
|
|
21 |
import org.springframework.http.HttpStatus;
|
|
|
22 |
import org.springframework.http.MediaType;
|
|
|
23 |
import org.springframework.http.ResponseEntity;
|
| 21612 |
ashik.ali |
24 |
import org.springframework.stereotype.Controller;
|
| 22064 |
ashik.ali |
25 |
import org.springframework.transaction.annotation.Transactional;
|
| 21985 |
kshitij.so |
26 |
import org.springframework.ui.Model;
|
| 21612 |
ashik.ali |
27 |
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
28 |
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
29 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| 21689 |
ashik.ali |
30 |
import org.springframework.web.bind.annotation.RequestParam;
|
| 21612 |
ashik.ali |
31 |
|
|
|
32 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 21985 |
kshitij.so |
33 |
import com.spice.profitmandi.common.model.CartFofo;
|
| 22860 |
ashik.ali |
34 |
import com.spice.profitmandi.common.model.CreateOrderRequest;
|
| 22660 |
ashik.ali |
35 |
import com.spice.profitmandi.common.model.PdfModel;
|
| 22581 |
ashik.ali |
36 |
import com.spice.profitmandi.common.model.PriceModel;
|
| 21612 |
ashik.ali |
37 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 21689 |
ashik.ali |
38 |
import com.spice.profitmandi.common.util.PdfUtils;
|
| 21680 |
ashik.ali |
39 |
import com.spice.profitmandi.common.util.StringUtils;
|
| 22244 |
ashik.ali |
40 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
| 22217 |
ashik.ali |
41 |
import com.spice.profitmandi.dao.entity.dtr.InsurancePolicy;
|
| 21728 |
ashik.ali |
42 |
import com.spice.profitmandi.dao.entity.fofo.Customer;
|
|
|
43 |
import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;
|
| 22860 |
ashik.ali |
44 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
|
| 21728 |
ashik.ali |
45 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
|
|
46 |
import com.spice.profitmandi.dao.entity.fofo.PaymentOption;
|
| 22217 |
ashik.ali |
47 |
import com.spice.profitmandi.dao.repository.dtr.InsurancePolicyRepository;
|
| 21728 |
ashik.ali |
48 |
import com.spice.profitmandi.dao.repository.fofo.CustomerAddressRepository;
|
|
|
49 |
import com.spice.profitmandi.dao.repository.fofo.CustomerRepository;
|
| 22860 |
ashik.ali |
50 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
| 21728 |
ashik.ali |
51 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
|
|
52 |
import com.spice.profitmandi.dao.repository.fofo.PaymentOptionRepository;
|
| 22069 |
ashik.ali |
53 |
import com.spice.profitmandi.service.pricing.PricingService;
|
| 22860 |
ashik.ali |
54 |
import com.spice.profitmandi.service.sale.OrderService;
|
| 22139 |
amit.gupta |
55 |
import com.spice.profitmandi.web.model.LoginDetails;
|
| 22069 |
ashik.ali |
56 |
import com.spice.profitmandi.web.util.CookiesProcessor;
|
| 21612 |
ashik.ali |
57 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
|
|
58 |
|
|
|
59 |
@Controller
|
| 22037 |
amit.gupta |
60 |
@Transactional(rollbackFor=Throwable.class)
|
| 21612 |
ashik.ali |
61 |
public class OrderController {
|
|
|
62 |
|
|
|
63 |
private static final Logger LOGGER = LoggerFactory.getLogger(OrderController.class);
|
| 21985 |
kshitij.so |
64 |
|
| 21612 |
ashik.ali |
65 |
@Autowired
|
| 22860 |
ashik.ali |
66 |
private CustomerRepository customerRepository;
|
| 21985 |
kshitij.so |
67 |
|
| 21612 |
ashik.ali |
68 |
@Autowired
|
| 22860 |
ashik.ali |
69 |
private FofoOrderItemRepository fofoLineItemRepository;
|
| 21985 |
kshitij.so |
70 |
|
| 21612 |
ashik.ali |
71 |
@Autowired
|
| 22860 |
ashik.ali |
72 |
private PaymentOptionRepository paymentOptionRepository;
|
| 21985 |
kshitij.so |
73 |
|
| 21680 |
ashik.ali |
74 |
@Autowired
|
| 22860 |
ashik.ali |
75 |
private FofoOrderRepository fofoOrderRepository;
|
| 21985 |
kshitij.so |
76 |
|
| 21680 |
ashik.ali |
77 |
@Autowired
|
| 22860 |
ashik.ali |
78 |
private CustomerAddressRepository customerAddressRepository;
|
| 22217 |
ashik.ali |
79 |
|
|
|
80 |
@Autowired
|
| 22860 |
ashik.ali |
81 |
private InsurancePolicyRepository insurancePolicyRepository;
|
| 21985 |
kshitij.so |
82 |
|
| 21896 |
ashik.ali |
83 |
@Autowired
|
| 22860 |
ashik.ali |
84 |
private MVCResponseSender mvcResponseSender;
|
| 21985 |
kshitij.so |
85 |
|
| 21612 |
ashik.ali |
86 |
@Autowired
|
| 22860 |
ashik.ali |
87 |
private CookiesProcessor cookiesProcessor;
|
| 22069 |
ashik.ali |
88 |
|
|
|
89 |
@Autowired
|
| 22860 |
ashik.ali |
90 |
private PricingService pricingService;
|
| 22244 |
ashik.ali |
91 |
|
| 22354 |
ashik.ali |
92 |
@Autowired
|
| 22860 |
ashik.ali |
93 |
private OrderService orderService;
|
| 22244 |
ashik.ali |
94 |
|
| 22354 |
ashik.ali |
95 |
|
|
|
96 |
@Autowired
|
| 22860 |
ashik.ali |
97 |
private ResponseSender<?> responseSender;
|
| 22689 |
amit.gupta |
98 |
|
| 21985 |
kshitij.so |
99 |
@RequestMapping(value = "/order")
|
| 22860 |
ashik.ali |
100 |
public String orderIndex(HttpServletRequest request, @RequestParam(name = "cartData") String cartData, Model model) throws Throwable{
|
| 22244 |
ashik.ali |
101 |
LoginDetails loginDetails = null;
|
| 21985 |
kshitij.so |
102 |
try {
|
| 22244 |
ashik.ali |
103 |
loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 21985 |
kshitij.so |
104 |
} catch (ProfitMandiBusinessException e) {
|
|
|
105 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_1009", false, "/login"));
|
|
|
106 |
return "response";
|
|
|
107 |
}
|
| 22860 |
ashik.ali |
108 |
List<CartFofo> cartItems = orderService.cartCheckout(cartData);
|
|
|
109 |
Set<Integer> itemIds = new HashSet<>();
|
|
|
110 |
for(CartFofo cartFofo : cartItems){
|
|
|
111 |
itemIds.add(cartFofo.getItemId());
|
| 21985 |
kshitij.so |
112 |
}
|
| 22860 |
ashik.ali |
113 |
Map<Integer, PriceModel> mopPriceMap = pricingService.getPurchasePriceMopPriceNotFound(itemIds, loginDetails.getFofoId());
|
|
|
114 |
LOGGER.info("mopPriceMap {}", mopPriceMap);
|
|
|
115 |
model.addAttribute("cartObj", cartItems);
|
|
|
116 |
model.addAttribute("mopPriceMap", mopPriceMap);
|
|
|
117 |
return "order-index";
|
| 21985 |
kshitij.so |
118 |
}
|
| 22660 |
ashik.ali |
119 |
|
| 21612 |
ashik.ali |
120 |
|
| 22244 |
ashik.ali |
121 |
@RequestMapping(value = "/insurancePrices", method = RequestMethod.GET)
|
|
|
122 |
public ResponseEntity<?> getInsurancePrices(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.PRICE) float price){
|
|
|
123 |
LOGGER.info("Request received at url : {}", request.getRequestURI());
|
|
|
124 |
try{
|
|
|
125 |
Set<Float> prices = new HashSet<>();
|
|
|
126 |
prices.add(price);
|
|
|
127 |
return responseSender.ok(pricingService.getInsurancePrices(prices, ProfitMandiConstants.GADGET_COPS));
|
|
|
128 |
}catch(ProfitMandiBusinessException profitMandiBusinessException){
|
|
|
129 |
return responseSender.notFound(profitMandiBusinessException);
|
|
|
130 |
}
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
|
| 21985 |
kshitij.so |
134 |
@RequestMapping(value = "/get-order", method = RequestMethod.GET)
|
| 22244 |
ashik.ali |
135 |
public String getOrder(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.ORDER_ID) int orderId, Model model) throws ProfitMandiBusinessException, Exception{
|
| 22139 |
amit.gupta |
136 |
LoginDetails fofoDetails;
|
| 21985 |
kshitij.so |
137 |
try {
|
| 22069 |
ashik.ali |
138 |
fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| 21985 |
kshitij.so |
139 |
} catch (ProfitMandiBusinessException e) {
|
|
|
140 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_1009", false, "/login"));
|
|
|
141 |
return "response";
|
|
|
142 |
}
|
| 22277 |
ashik.ali |
143 |
try{
|
|
|
144 |
FofoOrder fofoOrder = fofoOrderRepository.selectByFofoIdAndOrderId(fofoDetails.getFofoId(), orderId);
|
| 22860 |
ashik.ali |
145 |
List<FofoOrderItem> fofoLineItems = fofoLineItemRepository.selectByOrderId(fofoOrder.getId());
|
| 22277 |
ashik.ali |
146 |
CustomerAddress customerAddress = customerAddressRepository.selectById(fofoOrder.getCustomerAddressId());
|
| 22666 |
amit.gupta |
147 |
Customer customer = customerRepository.selectById(fofoOrder.getCustomerId());
|
|
|
148 |
customerAddress.setPhoneNumber(customer.getMobileNumber());
|
| 22277 |
ashik.ali |
149 |
List<PaymentOption> paymentOptions = paymentOptionRepository.selectByOrderId(fofoOrder.getId());
|
| 22680 |
amit.gupta |
150 |
List<InsurancePolicy> insurancePolicies = insurancePolicyRepository.selectByRetailerInvoiceNumber(fofoOrder.getFofoId(), fofoOrder.getInvoiceNumber());
|
| 22277 |
ashik.ali |
151 |
model.addAttribute("fofoOrder", fofoOrder);
|
|
|
152 |
model.addAttribute("fofoLineItems", fofoLineItems);
|
| 22860 |
ashik.ali |
153 |
model.addAttribute("customerBillingAddress", orderService.getBillingAddress(customerAddress));
|
| 22277 |
ashik.ali |
154 |
model.addAttribute("customerBillingAddressObj", customerAddress);
|
|
|
155 |
model.addAttribute("paymentOptions", paymentOptions);
|
|
|
156 |
model.addAttribute("insurancePolicies", insurancePolicies);
|
|
|
157 |
return "order-details";
|
|
|
158 |
}catch (Exception e) {
|
|
|
159 |
LOGGER.error("Unable to get Order details...", e);
|
|
|
160 |
return "error";
|
|
|
161 |
}
|
| 21985 |
kshitij.so |
162 |
}
|
| 22244 |
ashik.ali |
163 |
|
|
|
164 |
|
|
|
165 |
@RequestMapping(value = "/saleDetails", method = RequestMethod.GET)
|
|
|
166 |
public String getSaleDetails(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.ORDER_ID) int orderId, Model model) throws ProfitMandiBusinessException, Exception{
|
|
|
167 |
LoginDetails fofoDetails;
|
|
|
168 |
try {
|
|
|
169 |
fofoDetails = cookiesProcessor.getCookiesObject(request);
|
|
|
170 |
} catch (ProfitMandiBusinessException e) {
|
|
|
171 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_1009", false, "/login"));
|
|
|
172 |
return "response";
|
|
|
173 |
}
|
| 22279 |
ashik.ali |
174 |
try{
|
|
|
175 |
FofoOrder fofoOrder = fofoOrderRepository.selectByFofoIdAndOrderId(fofoDetails.getFofoId(), orderId);
|
| 22860 |
ashik.ali |
176 |
List<FofoOrderItem> fofoLineItems = fofoLineItemRepository.selectByOrderId(fofoOrder.getId());
|
| 22279 |
ashik.ali |
177 |
CustomerAddress customerAddress = customerAddressRepository.selectById(fofoOrder.getCustomerAddressId());
|
|
|
178 |
List<PaymentOption> paymentOptions = paymentOptionRepository.selectByOrderId(fofoOrder.getId());
|
| 22680 |
amit.gupta |
179 |
List<InsurancePolicy> insurancePolicies = insurancePolicyRepository.selectByRetailerInvoiceNumber(fofoOrder.getFofoId(), fofoOrder.getInvoiceNumber());
|
| 22279 |
ashik.ali |
180 |
model.addAttribute("fofoOrder", fofoOrder);
|
|
|
181 |
model.addAttribute("fofoLineItems", fofoLineItems);
|
| 22860 |
ashik.ali |
182 |
model.addAttribute("customerBillingAddress", orderService.getBillingAddress(customerAddress));
|
| 22279 |
ashik.ali |
183 |
model.addAttribute("customerBillingAddressObj", customerAddress);
|
|
|
184 |
model.addAttribute("paymentOptions", paymentOptions);
|
|
|
185 |
model.addAttribute("insurancePolicies", insurancePolicies);
|
|
|
186 |
return "sale-details";
|
|
|
187 |
}catch (Exception e) {
|
|
|
188 |
LOGGER.error("Unble to fetch sale details... ", e);
|
|
|
189 |
return "error";
|
|
|
190 |
}
|
| 22244 |
ashik.ali |
191 |
}
|
|
|
192 |
|
| 21985 |
kshitij.so |
193 |
|
|
|
194 |
@RequestMapping(value = "/create-order", method = RequestMethod.POST)
|
|
|
195 |
public String createOrder(HttpServletRequest request, @RequestBody CreateOrderRequest createOrderRequest, Model model) throws Throwable{
|
| 22064 |
ashik.ali |
196 |
LOGGER.info("request at uri {} body {}", request.getRequestURI(), createOrderRequest);
|
| 22139 |
amit.gupta |
197 |
LoginDetails fofoDetails;
|
| 21985 |
kshitij.so |
198 |
try {
|
| 22069 |
ashik.ali |
199 |
fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| 21985 |
kshitij.so |
200 |
} catch (ProfitMandiBusinessException e) {
|
|
|
201 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_1009", false, "/login"));
|
|
|
202 |
return "response";
|
|
|
203 |
}
|
| 22860 |
ashik.ali |
204 |
int fofoOrderId = orderService.createOrder(createOrderRequest, fofoDetails.getFofoId());
|
| 22280 |
ashik.ali |
205 |
LOGGER.info("Order has been created successfully...");
|
| 22860 |
ashik.ali |
206 |
return "redirect:/get-order/?orderId="+fofoOrderId;
|
| 21612 |
ashik.ali |
207 |
}
|
| 21985 |
kshitij.so |
208 |
|
|
|
209 |
|
| 21689 |
ashik.ali |
210 |
@RequestMapping(value = "/generateInvoice")
|
| 21896 |
ashik.ali |
211 |
public ResponseEntity<?> generateInvoice(HttpServletRequest request, HttpServletResponse response, @RequestParam(name = ProfitMandiConstants.ORDER_ID) int orderId) throws Throwable{
|
| 22064 |
ashik.ali |
212 |
LOGGER.info("Request received at url {} with params [{}={}] ", request.getRequestURI(), ProfitMandiConstants.ORDER_ID, orderId);
|
| 22139 |
amit.gupta |
213 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| 22860 |
ashik.ali |
214 |
|
|
|
215 |
PdfModel pdfModel = orderService.getInvoicePdfModel(fofoDetails.getFofoId(), orderId);
|
| 22026 |
ashik.ali |
216 |
|
| 21689 |
ashik.ali |
217 |
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
|
218 |
PdfUtils.generateAndWrite(pdfModel, byteArrayOutputStream);
|
|
|
219 |
LOGGER.info("Pdf Stream length {}", byteArrayOutputStream.toByteArray().length);
|
| 22026 |
ashik.ali |
220 |
final HttpHeaders headers=new HttpHeaders();
|
|
|
221 |
headers.setContentType(MediaType.APPLICATION_PDF);
|
| 22860 |
ashik.ali |
222 |
headers.set("Content-disposition", "inline; filename=invoice-" + pdfModel.getInvoiceNumber() + ".pdf");
|
| 22026 |
ashik.ali |
223 |
headers.setContentLength(byteArrayOutputStream.toByteArray().length);
|
|
|
224 |
final InputStream inputStream=new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
|
|
|
225 |
final InputStreamResource inputStreamResource=new InputStreamResource(inputStream);
|
|
|
226 |
return new ResponseEntity<InputStreamResource>(inputStreamResource, headers, HttpStatus.OK);
|
| 21689 |
ashik.ali |
227 |
}
|
| 22244 |
ashik.ali |
228 |
|
|
|
229 |
@RequestMapping(value = "/saleHistory")
|
|
|
230 |
public String saleHistory(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.START_TIME, required = false) String startTimeString, @RequestParam(name = ProfitMandiConstants.END_TIME, required = false) String endTimeString, @RequestParam(name = "offset", defaultValue = "0") int offset, @RequestParam(name = "limit", defaultValue = "10") int limit, @RequestParam(name = ProfitMandiConstants.INVOICE_NUMBER, defaultValue = "") String invoiceNumber, @RequestParam(name = "searchType",defaultValue="") String searchType, Model model) throws Exception{
|
|
|
231 |
LoginDetails loginDetails = null;
|
|
|
232 |
try {
|
|
|
233 |
loginDetails = cookiesProcessor.getCookiesObject(request);
|
|
|
234 |
} catch (ProfitMandiBusinessException e) {
|
|
|
235 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_1009", false, "/login"));
|
|
|
236 |
return "response";
|
|
|
237 |
}
|
|
|
238 |
|
|
|
239 |
LocalDateTime startDateTime = StringUtils.toDateTime(startTimeString);
|
|
|
240 |
LocalDateTime endDateTime = StringUtils.toDateTime(endTimeString);
|
|
|
241 |
long countItems = 0;
|
|
|
242 |
List<FofoOrder> fofoOrders = new ArrayList<>();
|
| 22284 |
ashik.ali |
243 |
if(searchType.equalsIgnoreCase(ProfitMandiConstants.INVOICE_NUMBER) && !invoiceNumber.isEmpty()){
|
| 22244 |
ashik.ali |
244 |
try {
|
|
|
245 |
FofoOrder fofoOrder = fofoOrderRepository.selectByFofoIdAndInvoiceNumber(loginDetails.getFofoId(), invoiceNumber);
|
|
|
246 |
fofoOrders.add(fofoOrder);
|
|
|
247 |
} catch (ProfitMandiBusinessException e) {
|
|
|
248 |
LOGGER.info("Sale history not found : ", e);
|
|
|
249 |
}
|
|
|
250 |
}else{
|
| 22860 |
ashik.ali |
251 |
fofoOrders = fofoOrderRepository.selectByFofoId(loginDetails.getFofoId(), startDateTime, endDateTime, offset, limit);
|
| 22244 |
ashik.ali |
252 |
countItems = fofoOrderRepository.selectCount(loginDetails.getFofoId(), startDateTime, endDateTime, invoiceNumber, searchType);
|
|
|
253 |
}
|
|
|
254 |
|
|
|
255 |
model.addAttribute("saleHistories", fofoOrders);
|
| 22551 |
ashik.ali |
256 |
model.addAttribute("start", offset + 1);
|
|
|
257 |
model.addAttribute("size", countItems);
|
|
|
258 |
model.addAttribute("searchType", searchType);
|
| 22244 |
ashik.ali |
259 |
model.addAttribute(ProfitMandiConstants.START_TIME, startTimeString);
|
|
|
260 |
model.addAttribute(ProfitMandiConstants.END_TIME, endTimeString);
|
|
|
261 |
if (fofoOrders.size() < limit){
|
| 22551 |
ashik.ali |
262 |
model.addAttribute("end", offset + fofoOrders.size());
|
| 22244 |
ashik.ali |
263 |
}
|
|
|
264 |
else{
|
| 22551 |
ashik.ali |
265 |
model.addAttribute("end", offset + limit);
|
| 22244 |
ashik.ali |
266 |
}
|
|
|
267 |
|
|
|
268 |
return "sale-history";
|
|
|
269 |
}
|
| 22291 |
ashik.ali |
270 |
|
|
|
271 |
|
|
|
272 |
@RequestMapping(value = "/getPaginatedSaleHistory")
|
|
|
273 |
public String getSaleHistoryPaginated(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.START_TIME, required = false) String startTimeString, @RequestParam(name = ProfitMandiConstants.END_TIME, required = false) String endTimeString, @RequestParam(name = "offset", defaultValue = "0") int offset, @RequestParam(name = "limit", defaultValue="10") int limit, @RequestParam(name = ProfitMandiConstants.INVOICE_NUMBER, defaultValue="") String invoiceNumber, @RequestParam(name = "searchType", defaultValue = "") String searchType, Model model) throws Exception{
|
|
|
274 |
LoginDetails loginDetails;
|
|
|
275 |
try {
|
|
|
276 |
loginDetails = cookiesProcessor.getCookiesObject(request);
|
|
|
277 |
} catch (ProfitMandiBusinessException e) {
|
|
|
278 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_1009", false, "/login"));
|
|
|
279 |
return "response";
|
|
|
280 |
}
|
|
|
281 |
LocalDateTime startDateTime = StringUtils.toDateTime(startTimeString);
|
|
|
282 |
LocalDateTime endDateTime = StringUtils.toDateTime(endTimeString);
|
| 21985 |
kshitij.so |
283 |
|
| 22291 |
ashik.ali |
284 |
List<FofoOrder> saleHistories = fofoOrderRepository.selectByFofoId(loginDetails.getFofoId(), startDateTime, endDateTime, offset, limit);
|
|
|
285 |
model.addAttribute("saleHistories", saleHistories);
|
|
|
286 |
return "sale-history-paginated";
|
|
|
287 |
}
|
|
|
288 |
|
| 21612 |
ashik.ali |
289 |
}
|