<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.seeyon.recbill.dao.impl.RecBillDaoImpl">
    <resultMap id="get-RecBillEntity-result" type="com.hzya.frame.seeyon.recbill.entity.RecBillEntity" >
        <result property="id" column="id" jdbcType="VARCHAR"/>
        <result property="pkOrg" column="pk_org" jdbcType="VARCHAR"/>
        <result property="billDate" column="bill_date" jdbcType="VARCHAR"/>
        <result property="primalMoney" column="primal_money" jdbcType="VARCHAR"/>
        <result property="pkAccount" column="pk_account" jdbcType="VARCHAR"/>
        <result property="pkCustomer" column="pk_customer" jdbcType="VARCHAR"/>
        <result property="pkOppaccount" column="pk_oppaccount" jdbcType="VARCHAR"/>
        <result property="pkSupplier" column="pk_supplier" jdbcType="VARCHAR"/>
        <result property="tableName" column="table_name" jdbcType="VARCHAR"/>
        <result property="fieldName" column="field_name" jdbcType="VARCHAR"/>

    </resultMap>

    <!--工程项目查询-->
    <select id="RecBillEntity_list_base" resultMap="get-RecBillEntity-result" parameterType="com.hzya.frame.seeyon.recbill.entity.RecBillEntity">
      SELECT
        field0002 AS pk_org,
        field0006 AS bill_date,
        field0009 AS primal_money,
        field0001 AS pk_account,
        field0013  AS pk_customer,
        field0012 AS pk_oppaccount,
        'formmain_0233' as table_name,
        'field0016' as field_name
        FROM formmain_0233
        WHERE field0016 IS null
    </select>

    <!--通过主键修改方法-->
    <update id="RecBillEntity_update" parameterType = "java.util.Map" >
        update ${tableName} set ${fieldName} = #{state} where id = #{id}
    </update>


</mapper>

