Rev 6111 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package in.shop2020.serving.controllers;import in.shop2020.model.v1.order.RechargeOrder;import in.shop2020.model.v1.order.TransactionService.Client;import in.shop2020.thrift.clients.TransactionClient;import java.util.List;import org.apache.log4j.Logger;/*** @author vikas**/@SuppressWarnings("serial")public class RechargeOrdersController extends BaseController {private static Logger log = Logger.getLogger(Class.class);private long userId;private List<RechargeOrder> rechargeOrders;private long walletAmount;public String index() throws Exception {TransactionClient transactionServiceClient = new TransactionClient();Client tclient = transactionServiceClient.getClient();setRechargeOrders(tclient.getRechargeOrders(userId));setWalletAmount(tclient.getUserWallet(userId).getAmount());return INDEX;}public void setUserId(String userId) {try {this.userId = Long.parseLong(userId);}catch (NumberFormatException e) {log.error(e);}}public Long getUserId() {return userId;}public void setRechargeOrders(List<RechargeOrder> rechargeOrders) {this.rechargeOrders = rechargeOrders;}public List<RechargeOrder> getRechargeOrders() {return rechargeOrders;}public void setWalletAmount(long walletAmount) {this.walletAmount = walletAmount;}public long getWalletAmount() {return walletAmount;}}