ProjectMapper.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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.cool.bang.modules.mysql.mapper.ProjectMapper">
  4. <resultMap id="resultMap" type="com.cool.bang.modules.mysql.domain.Project">
  5. <id property="id" column="id" jdbcType="BIGINT"/>
  6. <result property="orgId" column="org_id" jdbcType="INTEGER"/>
  7. <result property="orgName" column="org_name" jdbcType="VARCHAR"/>
  8. <result property="projectNumber" column="project_number" jdbcType="VARCHAR"/>
  9. <result property="projectName" column="project_name" jdbcType="VARCHAR"/>
  10. <result property="projectAddress" column="project_address" jdbcType="VARCHAR"/>
  11. <result property="buildArea" column="build_area" jdbcType="DECIMAL"/>
  12. <result property="buildingTotal" column="building_total" jdbcType="INTEGER"/>
  13. <result property="houseTotal" column="house_total" jdbcType="INTEGER"/>
  14. <result property="buildCostId" column="build_cost_id" jdbcType="BIGINT"/>
  15. <result property="buildCostName" column="build_cost_name" jdbcType="VARCHAR"/>
  16. <result property="adjustmentPercentage" column="adjustment_percentage" jdbcType="DECIMAL"/>
  17. <result property="bankPercentage" column="bank_percentage" jdbcType="DECIMAL"/>
  18. <result property="isFrozen" column="is_frozen" jdbcType="INTEGER"/>
  19. <result property="type" column="type" jdbcType="INTEGER"/>
  20. <result property="state" column="state" jdbcType="INTEGER"/>
  21. <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
  22. <result property="delFlag" column="del_flag" jdbcType="TINYINT"/>
  23. </resultMap>
  24. <!-- 插入项目表数据 -->
  25. <insert id="insertProject">
  26. insert into
  27. fc_project (id, org_id, org_name, project_number, project_name, project_address, build_area, building_total, house_total, build_cost_id, build_cost_name, adjustment_percentage, bank_percentage, is_frozen, type, state, create_time, del_flag)
  28. values
  29. <foreach collection="list" item="item" separator=",">
  30. (#{item.id},#{item.orgId},#{item.orgName},#{item.projectNumber},#{item.projectName},#{item.projectAddress},#{item.buildArea},#{item.buildingTotal},#{item.houseTotal},#{item.buildCostId},#{item.buildCostName},#{item.adjustmentPercentage},#{item.bankPercentage},#{item.isFrozen},#{item.type}, #{item.state}, #{item.createTime}, #{item.delFlag})
  31. </foreach>
  32. </insert>
  33. <select id="selectByProjectNumber" resultMap="resultMap">
  34. select * from fc_project where project_number = #{projectNumber}
  35. </select>
  36. <select id="selectProjectHouseTotal" resultType="java.lang.Integer">
  37. select zts from p_lpb_xmxx where xmbh = #{projectNumber}
  38. </select>
  39. </mapper>