Subversion Repositories SmartDukaan

Rev

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

Rev 25640 Rev 25698
Line 42... Line 42...
42
import org.springframework.web.bind.annotation.RequestMapping;
42
import org.springframework.web.bind.annotation.RequestMapping;
43
import org.springframework.web.bind.annotation.RequestMethod;
43
import org.springframework.web.bind.annotation.RequestMethod;
44
import org.springframework.web.bind.annotation.RequestParam;
44
import org.springframework.web.bind.annotation.RequestParam;
45
 
45
 
46
import com.google.gson.Gson;
46
import com.google.gson.Gson;
-
 
47
import com.spice.profitmandi.common.enumuration.MessageType;
47
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
48
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
48
import com.spice.profitmandi.common.model.CustomCurrentInventorySnapshot;
49
import com.spice.profitmandi.common.model.CustomCurrentInventorySnapshot;
49
import com.spice.profitmandi.common.model.CustomRetailer;
50
import com.spice.profitmandi.common.model.CustomRetailer;
50
import com.spice.profitmandi.common.model.InventoryItemAgingModel;
51
import com.spice.profitmandi.common.model.InventoryItemAgingModel;
51
import com.spice.profitmandi.common.model.ItemFeatureDataModel;
52
import com.spice.profitmandi.common.model.ItemFeatureDataModel;
Line 739... Line 740...
739
 
740
 
740
		NotificationCampaign nc = new NotificationCampaign();
741
		NotificationCampaign nc = new NotificationCampaign();
741
		nc.setName("Order Cancellation");
742
		nc.setName("Order Cancellation");
742
		nc.setImplementationType("SimpleCampaign");
743
		nc.setImplementationType("SimpleCampaign");
743
		nc.setImplementationParams(gson.toJson(scp));
744
		nc.setImplementationParams(gson.toJson(scp));
-
 
745
		nc.setMessageType(MessageType.notification);
744
		nc.setCreatedTimestamp(LocalDateTime.now());
746
		nc.setCreatedTimestamp(LocalDateTime.now());
745
		notificationCampaignRepository.persist(nc);
747
		notificationCampaignRepository.persist(nc);
746
 
748
 
747
		int userId = userAccountRepository.selectUserIdByRetailerId(order.getRetailerId());
749
		int userId = userAccountRepository.selectUserIdByRetailerId(order.getRetailerId());
748
		UserCampaign uc = new UserCampaign();
750
		UserCampaign uc = new UserCampaign();
Line 863... Line 865...
863
			NotificationCampaign nc = new NotificationCampaign();
865
			NotificationCampaign nc = new NotificationCampaign();
864
			nc.setName("Notify Partner");
866
			nc.setName("Notify Partner");
865
			nc.setImplementationType("SimpleCampaign");
867
			nc.setImplementationType("SimpleCampaign");
866
			nc.setImplementationParams(gson.toJson(scp));
868
			nc.setImplementationParams(gson.toJson(scp));
867
			nc.setCreatedTimestamp(LocalDateTime.now());
869
			nc.setCreatedTimestamp(LocalDateTime.now());
-
 
870
			nc.setMessageType(MessageType.notification);
868
			notificationCampaignRepository.persist(nc);
871
			notificationCampaignRepository.persist(nc);
869
 
872
 
870
			int userId = userAccountRepository.selectUserIdByRetailerId(order.getRetailerId());
873
			int userId = userAccountRepository.selectUserIdByRetailerId(order.getRetailerId());
871
			UserCampaign uc = new UserCampaign();
874
			UserCampaign uc = new UserCampaign();
872
			uc.setCampaignId(nc.getId());
875
			uc.setCampaignId(nc.getId());