Package com.sfpay.histran.service.impl

Source Code of com.sfpay.histran.service.impl.HistranServiceImpl

package com.sfpay.histran.service.impl;

import java.util.HashMap;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sfpay.histran.base.Page;
import com.sfpay.histran.dao.IHistranDao;
import com.sfpay.histran.domain.Histran;
import com.sfpay.histran.service.IHistranService;

@Service
public class HistranServiceImpl implements IHistranService {

  @Resource
  private IHistranDao histranDao;

  @SuppressWarnings({ "rawtypes", "unchecked" })
  @Override
  public Page query(Histran histran, int nowPage, float txnAmt1, float txnAmt2) {
    int pageSize = 20;
    HashMap map = new HashMap();
    map.put("txnDate", histran.getTxnDate());
    map.put("area", histran.getArea());
    map.put("txnAmt", histran.getTxnAmt());
    map.put("txnAmt1", txnAmt1);
    map.put("txnAmt2", txnAmt2);
    map.put("accType", histran.getAccType());
    map.put("trace1", histran.getTrace1());
    map.put("settleDate", histran.getSettleDate());
    map.put("cname", histran.getCname());
    map.put("tid", histran.getTid());
    map.put("spMid", histran.getSpMid());
    map.put("spTid", histran.getSpTid());
    map.put("pan", histran.getPan());

    map.put("start", (nowPage - 1) * pageSize);
    map.put("pageSize", 20);

    Page page = new Page(nowPage, histranDao.queryCount(map), pageSize, histranDao.queryList(map));

    return page;
  }

}
TOP

Related Classes of com.sfpay.histran.service.impl.HistranServiceImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.