title: Why my mybatis query result is null?
body: <p>I am completely new here.Could anyone please give me some help?My Syntax is as following.</p>
  
  <p>PO:</p>
  
  <pre><code>package com.cabr.po;
  
  public class InputVAT {
  
  private String dept;
  private String period;
  private String tax;
  private String type;
  }
  </code></pre>
  
  <p>toString and get,set methods are ommited here.</p>
  
  <p>Aliases in configuration:</p>
  
  <pre><code>&lt;typeAliases&gt;
      &lt;package name="com.cabr.po" /&gt;
  &lt;/typeAliases&gt;
  </code></pre>
  
  <p>DaoImplement:</p>
  
  <pre><code>@Override
  public InputVAT findInputVATByPeriod(String period) {
      SqlSession sqlSession = sqlSessionFactory.openSession();
  
      InputVAT inputVAT =        sqlSession.selectOne("com.cabr.findInputVATByPeriod", period);
      return inputVAT;
  }
  </code></pre>
  
  <p>mapper:</p>
  
  <pre><code>&lt;mapper namespace="com.cabr"&gt;
  &lt;select id="findInputVATByPeriod" parameterType="string"
      resultType="InputVAT"&gt;
      SELECT * FROM input_vat WHERE period = #{period}
  &lt;/select&gt;
  </code></pre>
  
  <p>test:</p>
  
  <pre><code>@Test
  public void testFindInputVATByPeriod() {
      InputVATDao dao = new InputVATDaoImpl(sqlSessionFactory);
      InputVAT inputVAT = dao.findInputVATByPeriod("201607");
      System.out.println(inputVAT);
  }
  </code></pre>
  
  <p>database:</p>
  
  <pre><code>CREATE TABLE `input_vat` (
  `id` varchar(32) NOT NULL,
  `dept` varchar(10) NOT NULL,
  `period` varchar(6) NOT NULL,
  `tax` varchar(10) NOT NULL,
  `type` varchar(128) NOT NULL,
  PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>When I try to run this test,the console shows:</p>
  
  <pre><code> 2016-08-22 15:54:08,282 [main] [com.cabr.findInputVATByPeriod]-[DEBUG] ==&gt;
   Preparing: SELECT * FROM input_vat WHERE period = ? 
  
  2016-08-22 15:54:08,360 [main] [com.cabr.findInputVATByPeriod]-[DEBUG] ==&gt; 
  Parameters: 201607(String)
  
  2016-08-22 15:54:08,462 [main] [com.cabr.findInputVATByPeriod]-[DEBUG] &lt;==  
  Total: 0
  
  null
  </code></pre>
  
  <p>I wish I have descripted my problem clearly.I wonder why the result is null while there is actually data in the database.</p>