| Line 58... |
Line 58... |
| 58 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
58 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 59 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
59 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| 60 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
60 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 61 |
import com.spice.profitmandi.common.model.SendNotificationModel;
|
61 |
import com.spice.profitmandi.common.model.SendNotificationModel;
|
| 62 |
import com.spice.profitmandi.common.util.FileUtil;
|
62 |
import com.spice.profitmandi.common.util.FileUtil;
|
| - |
|
63 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
| 63 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
64 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
| 64 |
import com.spice.profitmandi.dao.entity.catalog.Offer;
|
65 |
import com.spice.profitmandi.dao.entity.catalog.Offer;
|
| 65 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
66 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
| 66 |
import com.spice.profitmandi.dao.enumuration.catalog.ItemCriteriaType;
|
67 |
import com.spice.profitmandi.dao.enumuration.catalog.ItemCriteriaType;
|
| 67 |
import com.spice.profitmandi.dao.model.CreateOfferRequest;
|
68 |
import com.spice.profitmandi.dao.model.CreateOfferRequest;
|
| Line 200... |
Line 201... |
| 200 |
String fileName = "offer-" + offer.getId() + ".png";
|
201 |
String fileName = "offer-" + offer.getId() + ".png";
|
| 201 |
CreateOfferRequest createOfferRequest = offerService.getCreateOfferRequest(offer);
|
202 |
CreateOfferRequest createOfferRequest = offerService.getCreateOfferRequest(offer);
|
| 202 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
203 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
| 203 |
sendNotificationModel.setCampaignName("SchemeOffer");
|
204 |
sendNotificationModel.setCampaignName("SchemeOffer");
|
| 204 |
sendNotificationModel.setTitle(offer.getName());
|
205 |
sendNotificationModel.setTitle(offer.getName());
|
| 205 |
sendNotificationModel.setMessage(createOfferRequest.getDashboardHtml());
|
206 |
sendNotificationModel.setMessage("On " + createOfferRequest.getSchemeType().name() + "of select models, From "
|
| - |
|
207 |
+ FormattingUtils.format(offer.getStartDate()) + " to " + FormattingUtils.format(offer.getEndDate()));
|
| 206 |
sendNotificationModel.setType("url");
|
208 |
sendNotificationModel.setType("url");
|
| 207 |
sendNotificationModel.setImageUrl(IMAGE_STATIC_SERVER_URL + "/" + "image" + LocalDate.now() + "/" + fileName);
|
209 |
sendNotificationModel.setImageUrl(IMAGE_STATIC_SERVER_URL + "/" + "image" + LocalDate.now() + "/" + fileName);
|
| 208 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
210 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
| 209 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
211 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
| 210 |
sendNotificationModel.setMessageType(MessageType.scheme);
|
212 |
sendNotificationModel.setMessageType(MessageType.scheme);
|