| Line 94... |
Line 94... |
| 94 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
94 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
| 95 |
import com.spice.profitmandi.dao.repository.dtr.RechargeProviderCreditWalletHistoryRepository;
|
95 |
import com.spice.profitmandi.dao.repository.dtr.RechargeProviderCreditWalletHistoryRepository;
|
| 96 |
import com.spice.profitmandi.dao.repository.dtr.RechargeProviderRepository;
|
96 |
import com.spice.profitmandi.dao.repository.dtr.RechargeProviderRepository;
|
| 97 |
import com.spice.profitmandi.dao.repository.dtr.RechargeTransactionRepository;
|
97 |
import com.spice.profitmandi.dao.repository.dtr.RechargeTransactionRepository;
|
| 98 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRegisteredAddressRepository;
|
98 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRegisteredAddressRepository;
|
| - |
|
99 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| 99 |
import com.spice.profitmandi.dao.repository.fofo.CustomerAddressRepository;
|
100 |
import com.spice.profitmandi.dao.repository.fofo.CustomerAddressRepository;
|
| 100 |
import com.spice.profitmandi.dao.repository.fofo.FofoLineItemRepository;
|
101 |
import com.spice.profitmandi.dao.repository.fofo.FofoLineItemRepository;
|
| 101 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
102 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
| 102 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
103 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
| 103 |
import com.spice.profitmandi.dao.repository.fofo.InventoryItemRepository;
|
104 |
import com.spice.profitmandi.dao.repository.fofo.InventoryItemRepository;
|
| Line 287... |
Line 288... |
| 287 |
@Autowired
|
288 |
@Autowired
|
| 288 |
private TicketSubCategoryRepository ticketSubCategoryRepository;
|
289 |
private TicketSubCategoryRepository ticketSubCategoryRepository;
|
| 289 |
|
290 |
|
| 290 |
@Autowired
|
291 |
@Autowired
|
| 291 |
private Mongo mongoClient;
|
292 |
private Mongo mongoClient;
|
| - |
|
293 |
|
| - |
|
294 |
@Autowired
|
| - |
|
295 |
private UserAccountRepository userAccountRepository;
|
| 292 |
|
296 |
|
| 293 |
private static final Logger LOGGER = LogManager.getLogger(ScheduledTasks.class);
|
297 |
private static final Logger LOGGER = LogManager.getLogger(ScheduledTasks.class);
|
| 294 |
|
298 |
|
| 295 |
public void generateDailyRecharge() {
|
299 |
public void generateDailyRecharge() {
|
| 296 |
List<RechargeProviderCreditWalletHistory> allCreditHistory = rechargeProviderCreditWalletHistoryRepository
|
300 |
List<RechargeProviderCreditWalletHistory> allCreditHistory = rechargeProviderCreditWalletHistoryRepository
|
| Line 1316... |
Line 1320... |
| 1316 |
notification.setType("Url");
|
1320 |
notification.setType("Url");
|
| 1317 |
notification.setUrl("http://app.profitmandi.com/pages/home/dashboard");
|
1321 |
notification.setUrl("http://app.profitmandi.com/pages/home/dashboard");
|
| 1318 |
notification
|
1322 |
notification
|
| 1319 |
.setSql(MessageFormat.format("SELECT distinct d1.user_id from devices d1 left join devices d2 on"
|
1323 |
.setSql(MessageFormat.format("SELECT distinct d1.user_id from devices d1 left join devices d2 on"
|
| 1320 |
+ "(d1.imeinumber = d2.imeinumber and d1.created < d2.created) "
|
1324 |
+ "(d1.imeinumber = d2.imeinumber and d1.created < d2.created) "
|
| 1321 |
+ " where d2.id is null and d1.user_id in ({0})", fofoId));
|
1325 |
+ " where d2.id is null and d1.user_id in ({0})", userAccountRepository.selectUserIdByRetailerId(fofoId)));
|
| 1322 |
notification.setExpiresat(LocalDateTime.now().plusDays(1).toEpochSecond(ZoneOffset.UTC) * 1000);
|
1326 |
notification.setExpiresat(LocalDateTime.now().plusDays(1).toEpochSecond(ZoneOffset.UTC) * 1000);
|
| 1323 |
notification.setStatus("active");
|
1327 |
notification.setStatus("active");
|
| 1324 |
notification.setSmsprocessed(0);
|
1328 |
notification.setSmsprocessed(0);
|
| 1325 |
notification.setNotification_processed(0);
|
1329 |
notification.setNotification_processed(0);
|
| 1326 |
notification.setNotification_type("GENERAL_NOTIFICATION");
|
1330 |
notification.setNotification_type("GENERAL_NOTIFICATION");
|