PereonalInsuranceMapper.xml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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.ydtech.modules.report.dao.PereonalInsuranceMapper">
  4. <resultMap id="BaseResultMap" type="com.ydtech.modules.report.model.PereonalInsurance">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="zhonglei" jdbcType="VARCHAR" property="zhonglei"/>
  7. <result column="xdbflj" jdbcType="VARCHAR" property="xdbflj"/>
  8. <result column="xqbflj" jdbcType="VARCHAR" property="xqbflj"/>
  9. <result column="yfbflj" jdbcType="VARCHAR" property="yfbflj"/>
  10. <result column="xddlyjlj" jdbcType="VARCHAR" property="xddlyjlj"/>
  11. <result column="xqdlyjlj" jdbcType="VARCHAR" property="xqdlyjlj"/>
  12. <result column="zyxdbfje" jdbcType="VARCHAR" property="zyxdbfje"/>
  13. <result column="zyxqbdje" jdbcType="VARCHAR" property="zyxqbdje"/>
  14. <result column="zyxddlyj" jdbcType="VARCHAR" property="zyxddlyj"/>
  15. <result column="zyxqdlyj" jdbcType="VARCHAR" property="zyxqdlyj"/>
  16. <result column="dsfxdbfje" jdbcType="VARCHAR" property="dsfxdbfje"/>
  17. <result column="dsfxqbdje" jdbcType="VARCHAR" property="dsfxqbdje"/>
  18. <result column="dsfxddlyj" jdbcType="VARCHAR" property="dsfxddlyj"/>
  19. <result column="dsfxqdlyj" jdbcType="VARCHAR" property="dsfxqdlyj"/>
  20. <result column="time" jdbcType="DATE" property="time"/>
  21. </resultMap>
  22. <sql id="Base_Column_List">
  23. id, zhonglei, xdbflj, xqbflj, yfbflj, xddlyjlj, xqdlyjlj, zyxdbfje, zyxqbdje, zyxddlyj,
  24. zyxqdlyj, dsfxdbfje, dsfxqbdje, dsfxddlyj, dsfxqdlyj
  25. </sql>
  26. <select id="selectAll" resultType="com.ydtech.modules.report.model.PereonalInsurance">
  27. select
  28. <include refid="Base_Column_List"/>
  29. from pereonal_insurance
  30. where 1=1
  31. <if test="startdate != null and enddate != null">
  32. AND STR_TO_DATE(time, '%Y-%m-%d') between DATE_FORMAT(#{startdate,jdbcType=DATE}, '%Y-%m-%d')
  33. and DATE_FORMAT(#{enddate,jdbcType=DATE}, '%Y-%m-%d')
  34. </if>
  35. </select>
  36. </mapper>