1

我是这个框架的新手,我有一个使用 spring-ibatis 的项目。我的工作是将其转换为 spring-mybatis。任何人都可以建议我完成这项工作的起点是什么。导入 org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import java.util.*;

public class PortTrackerDataDAOImpl extends SqlMapClientDaoSupport implements PortTrackerDataDAO {

    public List<?> getTypeLookup()
    {
        return this.getSqlMapClientTemplate().queryForList("getTypeLookup", null);
    }

    public List<?> getNavLookup()
    {
        return this.getSqlMapClientTemplate().queryForList("getNavLookup", null);
    }

    public List<?> getMarketDays(Date extractDate)
    {
        return this.getSqlMapClientTemplate().queryForList("getMarketDays", extractDate);
    }

    public List<?> getAccountDetail(Integer webUserId)
    {
        return this.getSqlMapClientTemplate().queryForList("getAccountDetail", webUserId);
    }

    public List<?> getFalPositions(String acctNo)
    {
        return this.getSqlMapClientTemplate().queryForList("getFalPositions", acctNo);
    }

    public Double getFalBalance(String acctNo)
    {
        return (Double) this.getSqlMapClientTemplate().queryForObject("getFalBalance", acctNo);
    }

    public Double getDSTShares(String fundNo, String region, String acctNo)
    {
        Map<String, String> parm = createParameterMap( fundNo,  region,  acctNo);
        return (Double) this.getSqlMapClientTemplate().queryForObject("getDSTShares", parm);
    }

    public List<?> getFlaggedUsers(Date updatedDt)
    {
        return this.getSqlMapClientTemplate().queryForList("getFlaggedUsers", updatedDt);
    }

    public List<?> getFlaggedUsersOnly()
    {
        return this.getSqlMapClientTemplate().queryForList("getFlaggedUsersOnly", null);
    }

    public void resetFlaggedUsers(Integer webUserId)
    {
        this.getSqlMapClientTemplate().update("resetFlaggedUsers", webUserId);
    }

    private Map<String, String> createParameterMap(String fundNo, String region, String acctNo)
    {

        Map<String, String> paramMap = new TreeMap<String, String>();
        paramMap.put("region", region);
        paramMap.put("fundNo", fundNo);
        paramMap.put("acctNo", acctNo);

        return paramMap;
    }

}
4

0 回答 0