Subversion Repositories SmartDukaan

Rev

Rev 32532 | Rev 32868 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32532 Rev 32855
Line 26... Line 26...
26
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeService;
26
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeService;
27
import com.spice.profitmandi.service.NotificationService;
27
import com.spice.profitmandi.service.NotificationService;
28
import com.spice.profitmandi.service.authentication.RoleManager;
28
import com.spice.profitmandi.service.authentication.RoleManager;
29
import com.spice.profitmandi.service.offers.OfferService;
29
import com.spice.profitmandi.service.offers.OfferService;
30
import com.spice.profitmandi.service.user.RetailerService;
30
import com.spice.profitmandi.service.user.RetailerService;
-
 
31
import com.spice.profitmandi.service.whatsapp.WhatsappMessageType;
31
import com.spice.profitmandi.web.model.LoginDetails;
32
import com.spice.profitmandi.web.model.LoginDetails;
32
import com.spice.profitmandi.web.util.CookiesProcessor;
33
import com.spice.profitmandi.web.util.CookiesProcessor;
33
import com.spice.profitmandi.web.util.MVCResponseSender;
34
import com.spice.profitmandi.web.util.MVCResponseSender;
34
import org.apache.commons.io.FileUtils;
35
import org.apache.commons.io.FileUtils;
35
import org.apache.commons.io.output.ByteArrayOutputStream;
36
import org.apache.commons.io.output.ByteArrayOutputStream;
Line 283... Line 284...
283
                "\n" +
284
                "\n" +
284
                "Happy Selling\n" +
285
                "Happy Selling\n" +
285
                "Team Smartdukaan";
286
                "Team Smartdukaan";
286
        //TV's mobile
287
        //TV's mobile
287
        for (String mobileNumber : mobileNumbers) {
288
        for (String mobileNumber : mobileNumbers) {
288
            notificationService.sendWhatsappMediaMessage(String.format(message, offer.getName(), offer.getSchemeType().toString(), FormattingUtils.formatDate(offer.getStartDate()), FormattingUtils.formatDate(offer.getEndDate())), mobileNumber, imageUrl, "offer-" + offer.getId() + ".png");
289
            notificationService.sendWhatsappMediaMessage(String.format(message, offer.getName(),
-
 
290
                    offer.getSchemeType().toString(), FormattingUtils.formatDate(offer.getStartDate()),
-
 
291
                    FormattingUtils.formatDate(offer.getEndDate())), mobileNumber, imageUrl, "offer-" + offer.getId() + ".png", WhatsappMessageType.IMAGE);
289
        }
292
        }
290
    }
293
    }
291
 
294
 
292
    private InputStream asInputStream(BufferedImage bi) throws Exception {
295
    private InputStream asInputStream(BufferedImage bi) throws Exception {
293
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
296
        ByteArrayOutputStream baos = new ByteArrayOutputStream();