首页 新闻 赞助 找找看

加载时发生的错误sqlmap。 检查getappealbymul。

0
悬赏园豆:40 [已关闭问题] 关闭于 2016-09-11 13:06
<statements>
    <select id="SelectAllPerson" parameterClass="int" resultMap="SelectAllResult" >
     
      <![CDATA[ select f_id, f_title, f_keyword, f_brief, f_mid, f_cid, f_type,  (case f_del when 0 then '启用' else '禁用' end) f_del, f_time from TS_WEB_S_T_Article_Main ]]>
      <dynamic prepend="WHERE">
        <isNotEmpty prepend=" and" property="f_title">
          f_title like '%$f_title$%'  
        </isNotEmpty>
        <isNotEmpty prepend=" and" property="f_id">
          f_id = #f_id#
        </isNotEmpty>
        <isGreaterThan prepend=" and" property="StartTime"  compareValue="1900-1-1">
          <![CDATA[
          f_time >= #StartTime#
          ]]>

        </isGreaterThan>
        <isGreaterThan prepend=" and" property="EndTime"  compareValue="1900-1-1">
          <![CDATA[
          f_time <= #EndTime#
           ]]>
        </isGreaterThan>
      </dynamic>
    </select>

    <insert  id="GetAppealByMul" parameterClass="Domain.personlist" resultClass="int">
              insert into TS_WEB_S_T_Article_Main( f_title, f_keyword, f_brief, f_time) values( #f_title#, #f_keyword#, f_brief#, #f_time#)  
    </insert >
    <!--删除-->
    <delete id="DeleteOne" resultMap="SelectAllResult">
      Delete TS_WEB_S_T_Article_Main Where f_id = #f_id#
    </delete>
    
    
  </statements> 



public int InsertQuery(TS_WEB_S_T_Article_Main ts)
        {
            ISqlMapper mapper = Mapper.Instance();
            int result = (int)mapper.Insert("GetAppealByMul", ts);
            return result;
        }

 

这个方法名绝对是一模一样的,并且我只开了一个sql地图,里面的查询。和删除都是正常的。只有这个insert的时候,会报错    加载时发生的错误sqlmap。 检查getappealbymul。 。当我(insert)节点改个节点名的时候(提示:只是把<insert>  改成<inserts>时),这个时候会报 这个SQL地图不包含mappedstatement名叫GetAppealByMul这个方法,主要是这个方法名我都没动过,然后都是节点复制到类里面去的。可能是我的写法错误吧,请各位大牛帮忙看下是什么问题,指明一下,帮助小弟解决这个问题,非常感谢!

Color_male_goat的主页 Color_male_goat | 初学一级 | 园豆:10
提问于:2016-09-07 00:24
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册