InterfaceManageMapper.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.tofly.dc.mapper.InterfaceManageMapper">
  4. <resultMap id="interfaceManageMap" type="com.tofly.dc.entity.InterfaceManage">
  5. <id property="id" column="ID"/>
  6. <result property="code" column="CODE"/>
  7. <result property="name" column="NAME"/>
  8. <result property="note" column="NOTE"/>
  9. <result property="ownershipSystem" column="OWNERSHIP_SYSTEM"/>
  10. <result property="ownershipBusiness" column="OWNERSHIP_BUSINESS"/>
  11. <result property="url" column="URL"/>
  12. <result property="runningStatus" column="RUNNING_STATUS"/>
  13. <result property="del" column="DEL"/>
  14. <result property="createTime" column="CREATE_TIME"/>
  15. <result property="createUser" column="CREATE_USER"/>
  16. <result property="type" column="TYPE"/>
  17. <result property="contentType" column="CONTENT_TYPE"/>
  18. <association property="ownershipSystemName" column="OWNERSHIP_SYSTEM" select="getOwnershipSystemName"/>
  19. <association property="ownershipBusinessName" column="OWNERSHIP_BUSINESS" select="getOwnershipBusinessName"/>
  20. <association property="runningStatusName" column="RUNNING_STATUS" select="getRunningStatusName"/>
  21. <association property="delName" column="DEL" select="getDelName"/>
  22. <association property="createUserName" column="CREATE_USER"
  23. select="com.tofly.dc.mapper.InterfaceLogMapper.getRealName"/>
  24. <association property="typeName" column="TYPE" select="getTypeName"/>
  25. <association property="contentTypeName" column="CONTENT_TYPE" select="getContentTypeName"/>
  26. </resultMap>
  27. <select id="getOwnershipSystemName" resultType="string">
  28. SELECT CNAME
  29. FROM
  30. TF_YWPN_SYSCHILDCODE_D
  31. WHERE
  32. PCID =50001
  33. AND
  34. CCODE = #{ownershipSystem}
  35. </select>
  36. <select id="getOwnershipBusinessName" resultType="string">
  37. SELECT CNAME
  38. FROM
  39. TF_YWPN_SYSCHILDCODE_D
  40. WHERE
  41. PCID =50100
  42. AND
  43. CCODE = #{ownershipBusiness}
  44. </select>
  45. <select id="getRunningStatusName" resultType="string">
  46. SELECT CNAME
  47. FROM
  48. TF_YWPN_SYSCHILDCODE_D
  49. WHERE
  50. PCID =50300
  51. AND
  52. CCODE = #{runningStatus}
  53. </select>
  54. <select id="getDelName" resultType="string">
  55. SELECT CNAME
  56. FROM
  57. TF_YWPN_SYSCHILDCODE_D
  58. WHERE
  59. PCID =50600
  60. AND
  61. CCODE = #{del}
  62. </select>
  63. <select id="getTypeName" resultType="string">
  64. SELECT CNAME
  65. FROM
  66. TF_YWPN_SYSCHILDCODE_D
  67. WHERE
  68. PCID =50200
  69. AND
  70. CCODE = #{type}
  71. </select>
  72. <select id="getContentTypeName" resultType="string">
  73. SELECT CNAME
  74. FROM
  75. TF_YWPN_SYSCHILDCODE_D
  76. WHERE
  77. PCID =50400
  78. AND
  79. CCODE = #{contentType}
  80. </select>
  81. <select id="getByIdInterfaceManage" resultMap="interfaceManageMap">
  82. select * from TF_INTERFACE_MANAGE
  83. where ID = #{id}
  84. </select>
  85. </mapper>