| Line 9... |
Line 9... |
| 9 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
9 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
| 10 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
10 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
| 11 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
11 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
| 12 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
12 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
| 13 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
13 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
| - |
|
14 |
import com.spice.profitmandi.dao.entity.cs.PartnerRegion;
|
| 14 |
import com.spice.profitmandi.dao.entity.cs.Position;
|
15 |
import com.spice.profitmandi.dao.entity.cs.Position;
|
| 15 |
import com.spice.profitmandi.dao.entity.cs.TicketAssigned;
|
16 |
import com.spice.profitmandi.dao.entity.cs.TicketAssigned;
|
| 16 |
import com.spice.profitmandi.dao.entity.dtr.Document;
|
17 |
import com.spice.profitmandi.dao.entity.dtr.Document;
|
| 17 |
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaign;
|
18 |
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaign;
|
| 18 |
import com.spice.profitmandi.dao.entity.fofo.*;
|
19 |
import com.spice.profitmandi.dao.entity.fofo.*;
|
| Line 318... |
Line 319... |
| 318 |
SchemeService schemeService;
|
319 |
SchemeService schemeService;
|
| 319 |
|
320 |
|
| 320 |
@Value("${google.api.key}")
|
321 |
@Value("${google.api.key}")
|
| 321 |
private String googleApiKey;
|
322 |
private String googleApiKey;
|
| 322 |
|
323 |
|
| - |
|
324 |
@Autowired
|
| - |
|
325 |
PrintResourceRegionRepository printResourceRegionRepository;
|
| - |
|
326 |
|
| - |
|
327 |
@Autowired
|
| - |
|
328 |
PartnerRegionRepository partnerRegionRepository;
|
| - |
|
329 |
|
| - |
|
330 |
@Autowired
|
| - |
|
331 |
PrintResourceRepository printResourceRepository;
|
| - |
|
332 |
|
| 323 |
@RequestMapping(value = "/dashboard", method = RequestMethod.GET)
|
333 |
@RequestMapping(value = "/dashboard", method = RequestMethod.GET)
|
| 324 |
public String dashboard(HttpServletRequest request, Model model) throws Exception {
|
334 |
public String dashboard(HttpServletRequest request, Model model) throws Exception {
|
| 325 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
335 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 326 |
String email = loginDetails.getEmailId();
|
336 |
String email = loginDetails.getEmailId();
|
| 327 |
int fofoId = loginDetails.getFofoId();
|
337 |
int fofoId = loginDetails.getFofoId();
|
| Line 331... |
Line 341... |
| 331 |
model.addAttribute("webApiHost", webApiHost);
|
341 |
model.addAttribute("webApiHost", webApiHost);
|
| 332 |
model.addAttribute("webApiPort", webApiPort);
|
342 |
model.addAttribute("webApiPort", webApiPort);
|
| 333 |
model.addAttribute("webApiScheme", webApiScheme);
|
343 |
model.addAttribute("webApiScheme", webApiScheme);
|
| 334 |
model.addAttribute("webApiRoot", webApiRoot);
|
344 |
model.addAttribute("webApiRoot", webApiRoot);
|
| 335 |
model.addAttribute("googleApiKey", googleApiKey);
|
345 |
model.addAttribute("googleApiKey", googleApiKey);
|
| - |
|
346 |
|
| - |
|
347 |
List<PartnerRegion> partnerRegion = partnerRegionRepository.selectByfofoId(fofoId);
|
| - |
|
348 |
LocalDateTime currentDate = LocalDateTime.now();
|
| - |
|
349 |
List<PrintResource> printResources = printResourceRepository.selectPrintResourcesByFofoRegion(partnerRegion.get(0).getRegionId(), currentDate);
|
| - |
|
350 |
LOGGER.info("printresourcesList {}", printResources);
|
| - |
|
351 |
model.addAttribute("printResources", printResources);
|
| - |
|
352 |
|
| 336 |
if (isAdmin) {
|
353 |
if (isAdmin) {
|
| 337 |
return adminUser.adminPanel(loginDetails.getFofoId(), email, model);
|
354 |
return adminUser.adminPanel(loginDetails.getFofoId(), email, model);
|
| 338 |
} else {
|
355 |
} else {
|
| 339 |
FofoStore fofoStore = null;
|
356 |
FofoStore fofoStore = null;
|
| 340 |
try {
|
357 |
try {
|