DeviceInfoPushConfigMapper.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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.bz.smart_city.dao.DeviceInfoPushConfigMapper">
  4. <resultMap id="BaseResultMap"
  5. type="com.bz.smart_city.entity.DeviceInfoPushConfig">
  6. <result column="id" jdbcType="INTEGER" property="id" />
  7. <result column="receiver_name" jdbcType="VARCHAR"
  8. property="receiverName" />
  9. <result column="push_method" jdbcType="VARCHAR"
  10. property="pushMethod" />
  11. <result column="push_customers" jdbcType="VARCHAR"
  12. property="pushCustomers" />
  13. <result column="push_communitys" jdbcType="VARCHAR"
  14. property="pushCommunitys" />
  15. <result column="push_buildings" jdbcType="VARCHAR"
  16. property="pushBuildings" />
  17. <result column="push_channels" jdbcType="VARCHAR"
  18. property="pushChannels"/>
  19. <result column="push_device_types" jdbcType="VARCHAR"
  20. property="pushDeviceTypes"/>
  21. <result column="push_url" jdbcType="VARCHAR"
  22. property="pushUrl" />
  23. <result column="period" jdbcType="VARCHAR"
  24. property="period" />
  25. <result column="status" jdbcType="INTEGER"
  26. property="status" />
  27. <result column="create_by" jdbcType="VARCHAR"
  28. property="createBy" />
  29. <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
  30. <result column="date_create" jdbcType="TIMESTAMP"
  31. property="dateCreate" />
  32. <result column="date_update" jdbcType="TIMESTAMP"
  33. property="dateUpdate" />
  34. </resultMap>
  35. <sql id="BaseColumnSQL">
  36. id,
  37. receiver_name,
  38. push_method,
  39. push_customers,
  40. push_communitys,
  41. push_buildings,
  42. push_channels,
  43. push_device_types,
  44. push_url,
  45. period,
  46. status,
  47. create_by,
  48. update_by,
  49. date_create,
  50. date_update
  51. </sql>
  52. <select id="findConfigById" resultMap="BaseResultMap">
  53. select
  54. <include refid="BaseColumnSQL" />
  55. from
  56. sc_device_info_push_config
  57. where status = 1
  58. and id = #{configId}
  59. </select>
  60. <select id="findAll" resultMap="BaseResultMap">
  61. select
  62. <include refid="BaseColumnSQL" />
  63. from
  64. sc_device_info_push_config
  65. where status = 1
  66. </select>
  67. </mapper>