Пример #1
0
  public Merchant getDetails(String merchantName) {
    String baseKey = "merchant." + merchantName;

    Merchant merchant = new Merchant();

    // or use template directly
    merchant.setName(template.opsForValue().get(baseKey + ".name"));
    merchant.setPhoneNumber(template.opsForValue().get(baseKey + ".phone"));
    merchant.setEmail(template.opsForValue().get(baseKey + ".email"));
    merchant
        .getWalletMerchantId()
        .put(
            Wallets.PAYTM,
            template.opsForValue().get(baseKey + Wallets.PAYTM.getRedisMerchantIdKey()));
    merchant
        .getWalletMerchantId()
        .put(
            Wallets.PAYUMONEY,
            template.opsForValue().get(baseKey + Wallets.PAYUMONEY.getRedisMerchantIdKey()));
    merchant
        .getWalletMerchantId()
        .put(
            Wallets.CITRUS,
            template.opsForValue().get(baseKey + Wallets.CITRUS.getRedisMerchantIdKey()));

    return merchant;
  }
Пример #2
0
 public Map<Wallets, String> getAnalytics() {
   Map<Wallets, String> walletTransactionCount = new HashMap<Wallets, String>();
   walletTransactionCount.put(
       Wallets.PAYTM, template.opsForValue().get(Wallets.PAYTM.getTransactionCountKey()));
   walletTransactionCount.put(
       Wallets.CITRUS, template.opsForValue().get(Wallets.CITRUS.getTransactionCountKey()));
   walletTransactionCount.put(
       Wallets.PAYUMONEY, template.opsForValue().get(Wallets.PAYUMONEY.getTransactionCountKey()));
   return walletTransactionCount;
 }