BuildingAccountMapper.xml 2.3 KB

12345678910111213141516171819202122232425262728293031
  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.BuildingAccountMapper">
  4. <!-- 插入楼幢虚拟户表数据 -->
  5. <insert id="insertBuildingAccount">
  6. insert into
  7. fc_building_account (id, org_id, org_name, project_id, project_account_id, project_number, project_name, building_id, building_number, building_name, building_address, build_area, house_number, build_cost_id, build_cost_name, build_cost_price, progress_id, progress_name, limit_percentage, adjustment_percentage, bank_percentage, keep_percentage, keep_amount, supervise_amount, account_balance, in_transit_fund, in_limit_fund, relieve_id, relieve_date, is_frozen, account_type, state, create_time, del_flag)
  8. values
  9. <foreach collection="list" item="item" separator=",">
  10. (#{item.id}, #{item.orgId}, #{item.orgName}, #{item.projectId}, #{projectAccountId}, #{item.projectNumber}, #{item.projectName}, #{item.buildingId}, #{item.buildingNumber}, #{item.buildingName}, #{item.buildingAddress}, #{item.buildArea}, #{item.houseNumber}, #{item.buildCostId}, #{item.buildCostName}, #{item.buildCostPrice}, #{item.progressId}, #{item.progressName}, #{item.limitPercentage}, #{item.adjustmentPercentage}, #{item.bankPercentage}, #{item.keepPercentage}, #{item.keepAmount}, #{item.superviseAmount}, #{item.accountBalance}, #{item.inTransitFund}, #{item.inLimitFund}, #{item.relieveId}, #{item.relieveDate}, #{item.isFrozen}, #{item.accountType}, #{item.state}, #{item.createTime}, #{item.delFlag})
  11. </foreach>
  12. </insert>
  13. <!-- 变更楼幢虚拟户额度内拨付金额 -->
  14. <update id="updateInLimitFundById">
  15. <foreach collection="list" item="item" separator=";">
  16. update fc_building_account set in_limit_fund = in_limit_fund + #{item.applyAmount} where id = #{item.buildingAccountId}
  17. </foreach>
  18. </update>
  19. <select id="selectByBuildingNumber" resultType="com.cool.bang.modules.mysql.domain.BuildingAccount">
  20. select
  21. id, building_number as buildingNumber, building_name as buildingName
  22. from
  23. fc_building_account
  24. where
  25. building_number = #{buildingNumber}
  26. </select>
  27. </mapper>