CNGStation_TranInfo.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.CNDStationInterface">
  18. <!-- 结果集 -->
  19. <resultMap id="CNGStationTranInfoList" type="com.runzhixing.bean.CNGStation_TranInfo">
  20. <result column="STATIONNO" property="stationNo"/>
  21. <result column="STATIONNAME" property="stationName"/>
  22. <result column="CONNECTTIME" property="connectTime1"/>
  23. <result column="DISCONNECTTIME" property="disconnectTime1"/>
  24. <result column="TRANCOUNT" property="tranCount"/>
  25. <result column="TRANBYTE" property="tranByte"/>
  26. <result column="STATE" property="state"/>
  27. <result column="SERVERIP" property="serverIp"/>
  28. <result column="CLIENTIP" property="clientIp"/>
  29. </resultMap>
  30. <!-- sql配置文件 -->
  31. <select id="getCNGStationTranInfoList" parameterType="com.runzhixing.bean.CNGStation_TranInfo" resultMap="CNGStationTranInfoList">
  32. select
  33. t.STATIONNO,
  34. s.STATIONAB as STATIONNAME,
  35. t.CONNECTTIME,
  36. t.DISCONNECTTIME,
  37. t.TRANCOUNT,
  38. t.TRANBYTE,
  39. t.STATE,
  40. t.SERVERIP,
  41. t.CLIENTIP
  42. from TB_TRANINFO t ,TB_CNGSTATION s
  43. <where>
  44. <if test="1==1">
  45. and t.STATIONNO=s.STATIONNO
  46. </if>
  47. <!-- <if test="1==1">
  48. and t.STATIONNO like #{stationNo}
  49. </if> -->
  50. <if test="1==1">
  51. and t.STATIONNO like '%' || #{stationNo} || '%'
  52. </if>
  53. <!--<if test="1==1">
  54. and t.stationno like CONCAT('%',#{stationNo},'%')
  55. </if>
  56. --></where>
  57. </select>
  58. </mapper>