Unit.xml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. Copyright 2009-2012 the original author or authors.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <!DOCTYPE mapper
  15. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  16. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  17. <mapper namespace="com.runzhixing.dao.interf.UnitInterface">
  18. <!--模块配置-->
  19. <resultMap id="map" type="com.runzhixing.bean.Unit">
  20. <result property="id" column="UNITNO"/>
  21. <result property="name" column="UNITNAME"/>
  22. <result property="unitAB" column="UNITAB"/>
  23. <result property="manager" column="MANAGER"/>
  24. <result property="phone" column="PHONE"/>
  25. <result property="mobile" column="MOBILE"/>
  26. <result property="fax" column="FAX"/>
  27. <result property="addr" column="ADDR"/>
  28. <result property="post" column="POST"/>
  29. <result property="email" column="EMAIL"/>
  30. <result property="remark" column="REMARK"/>
  31. </resultMap>
  32. <!-- 缓存 -->
  33. <!--Statement配置-->
  34. <select id="getUnitList" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="map">
  35. select
  36. UNITNO,
  37. UNITNAME,
  38. UNITAB,
  39. MANAGER,
  40. PHONE,
  41. MOBILE,
  42. FAX,
  43. ADDR,
  44. POST,
  45. EMAIL,
  46. REMARK
  47. from tb_unit t
  48. <where>
  49. <if test="cpstring1 != null and !&quot;&quot;.equals(cpstring1.trim())">
  50. and t.unitno like '' || #{cpstring1} || '%'
  51. </if>
  52. </where>
  53. </select>
  54. </mapper>