Ibatis 查询语句出错,看了半天没看出错误。。。。。
lx707 2012-02-28 12:06:43 public class PuterBoot
{
private String puterId;
private String goodsId;
private int optId;
/**
* @return the puterId
*/
public String getPuterId() {
return puterId;
}
/**
* @param puterId the puterId to set
*/
public void setPuterId(String puterId) {
this.puterId = puterId;
}
/**
* @return the goodsId
*/
public String getGoodsId() {
return goodsId;
}
}
public class PuterBootDAO
{
public List<?> getGoodsIdArFlagCount(PuterBoot put)
{
System.out.println("optIdMM"+put.getOptId());
System.out.println("puterIdMM"+put.getPuterId());
System.out.println("devIdMM"+put.getDevId());
return getBackOfficeSqlMapClientTemplate1().queryForList("PuterBoot.selectGoodsIdArFlagCount",put);
}
services中调用这个DAO里方法,能输出各种值
这是XML中写的SQL语句
<sqlMap namespace="PuterBoot">
<select id="selectGoodsIdArFlagCount" parameterClass="com.dingding.vms.backoffice.data.pt.PuterBoot" resultClass="java.util.HashMap">
select goods_id, ar_flag, count
from t_puter_action_detail
where opt_id = #optId#
and puter_id = #puterId#
and dev_id = #devId#
</select>
最后反回的List是空,这代码有什么问题?谢谢了