| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <?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="cn.com.goldenwater.dcproj.dao.AttProjectInsuranceRecordDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttProjectInsuranceRecord" id="attProjectInsuranceRecordResultMap">
- <result property="id" column="ID"/>
- <result property="projectId" column="PROJECT_ID"/>
- <result property="policyholder" column="POLICYHOLDER"/>
- <result property="policyholderPhone" column="POLICYHOLDER_PHONE"/>
- <result property="insuranceCompany" column="INSURANCE_COMPANY"/>
- <result property="insuranceContactPerson" column="INSURANCE_CONTACT_PERSON"/>
- <result property="insuranceContactPhone" column="INSURANCE_CONTACT_PHONE"/>
- <result property="premiumAmount" column="PREMIUM_AMOUNT"/>
- <result property="preventionServiceFee" column="PREVENTION_SERVICE_FEE"/>
- <result property="insuranceDate" column="INSURANCE_DATE"/>
- <result property="preventionServiceUnit" column="PREVENTION_SERVICE_UNIT"/>
- <result property="serviceUnitContactPerson" column="SERVICE_UNIT_CONTACT_PERSON"/>
- <result property="serviceUnitContactPhone" column="SERVICE_UNIT_CONTACT_PHONE"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- PROJECT_ID,
- POLICYHOLDER,
- POLICYHOLDER_PHONE,
- INSURANCE_COMPANY,
- INSURANCE_CONTACT_PERSON,
- INSURANCE_CONTACT_PHONE,
- PREMIUM_AMOUNT,
- PREVENTION_SERVICE_FEE,
- INSURANCE_DATE,
- PREVENTION_SERVICE_UNIT,
- SERVICE_UNIT_CONTACT_PERSON,
- SERVICE_UNIT_CONTACT_PHONE,
- INTM,
- UPTM,
- DATA_STAT
- </sql>
- <sql id="entity_properties">
- #{id},
- #{projectId},
- #{policyholder},
- #{policyholderPhone},
- #{insuranceCompany},
- #{insuranceContactPerson},
- #{insuranceContactPhone},
- #{premiumAmount},
- #{preventionServiceFee},
- #{insuranceDate},
- #{preventionServiceUnit},
- #{serviceUnitContactPerson},
- #{serviceUnitContactPhone},
- #{intm},
- #{uptm},
- #{dataStat}
- </sql>
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="projectId != null and projectId != ''">and PROJECT_ID = #{projectId}</if>
- <if test="policyholder != null and policyholder != ''">and POLICYHOLDER = #{policyholder}</if>
- <if test="policyholderPhone != null and policyholderPhone != ''">and POLICYHOLDER_PHONE = #{policyholderPhone}</if>
- <if test="insuranceCompany != null and insuranceCompany != ''">and INSURANCE_COMPANY = #{insuranceCompany}</if>
- <if test="insuranceContactPerson != null and insuranceContactPerson != ''">and INSURANCE_CONTACT_PERSON = #{insuranceContactPerson}</if>
- <if test="insuranceContactPhone != null and insuranceContactPhone != ''">and INSURANCE_CONTACT_PHONE = #{insuranceContactPhone}</if>
- <if test="premiumAmount != null and premiumAmount != ''">and PREMIUM_AMOUNT = #{premiumAmount}</if>
- <if test="preventionServiceFee != null and preventionServiceFee != ''">and PREVENTION_SERVICE_FEE = #{preventionServiceFee}</if>
- <if test="insuranceDate != null">and INSURANCE_DATE = #{insuranceDate}</if>
- <if test="preventionServiceUnit != null and preventionServiceUnit != ''">and PREVENTION_SERVICE_UNIT = #{preventionServiceUnit}</if>
- <if test="serviceUnitContactPerson != null and serviceUnitContactPerson != ''">and SERVICE_UNIT_CONTACT_PERSON = #{serviceUnitContactPerson}</if>
- <if test="serviceUnitContactPhone != null and serviceUnitContactPhone != ''">and SERVICE_UNIT_CONTACT_PHONE = #{serviceUnitContactPhone}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="attProjectInsuranceRecordResultMap" parameterType="String" >
- select <include refid="table_columns" /> from ATT_PROJECT_INSURANCE_RECORD where ID = #{id}
- </select>
- <select id="getBy" resultMap="attProjectInsuranceRecordResultMap">
- select <include refid="table_columns" /> from ATT_PROJECT_INSURANCE_RECORD <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="attProjectInsuranceRecordResultMap">
- select <include refid="table_columns" /> from ATT_PROJECT_INSURANCE_RECORD
- </select>
- <select id="findList" resultMap="attProjectInsuranceRecordResultMap">
- select <include refid="table_columns" /> from ATT_PROJECT_INSURANCE_RECORD <include refid="page_where" />
- order by intm desc
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from ATT_PROJECT_INSURANCE_RECORD <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttProjectInsuranceRecord">
- insert into ATT_PROJECT_INSURANCE_RECORD( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update ATT_PROJECT_INSURANCE_RECORD set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttProjectInsuranceRecord">
- update ATT_PROJECT_INSURANCE_RECORD set DATA_STAT='9' <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_PROJECT_INSURANCE_RECORD set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttProjectInsuranceRecord">
- update ATT_PROJECT_INSURANCE_RECORD
- <trim prefix="set" suffixOverrides=",">
- <if test="projectId != null and projectId != ''">PROJECT_ID = #{projectId},</if>
- <if test="policyholder != null and policyholder != ''">POLICYHOLDER = #{policyholder},</if>
- <if test="policyholderPhone != null and policyholderPhone != ''">POLICYHOLDER_PHONE = #{policyholderPhone},</if>
- <if test="insuranceCompany != null and insuranceCompany != ''">INSURANCE_COMPANY = #{insuranceCompany},</if>
- <if test="insuranceContactPerson != null and insuranceContactPerson != ''">INSURANCE_CONTACT_PERSON = #{insuranceContactPerson},</if>
- <if test="insuranceContactPhone != null and insuranceContactPhone != ''">INSURANCE_CONTACT_PHONE = #{insuranceContactPhone},</if>
- <if test="premiumAmount != null and premiumAmount != ''">PREMIUM_AMOUNT = #{premiumAmount},</if>
- <if test="preventionServiceFee != null and preventionServiceFee != ''">PREVENTION_SERVICE_FEE = #{preventionServiceFee},</if>
- <if test="insuranceDate != null">INSURANCE_DATE = #{insuranceDate},</if>
- <if test="preventionServiceUnit != null and preventionServiceUnit != ''">PREVENTION_SERVICE_UNIT = #{preventionServiceUnit},</if>
- <if test="serviceUnitContactPerson != null and serviceUnitContactPerson != ''">SERVICE_UNIT_CONTACT_PERSON = #{serviceUnitContactPerson},</if>
- <if test="serviceUnitContactPhone != null and serviceUnitContactPhone != ''">SERVICE_UNIT_CONTACT_PHONE = #{serviceUnitContactPhone},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttProjectInsuranceRecord">
- update ATT_PROJECT_INSURANCE_RECORD
- <trim prefix="set" suffixOverrides=",">
- <if test="projectId != null and projectId != ''">PROJECT_ID = #{projectId},</if>
- <if test="policyholder != null and policyholder != ''">POLICYHOLDER = #{policyholder},</if>
- <if test="policyholderPhone != null and policyholderPhone != ''">POLICYHOLDER_PHONE = #{policyholderPhone},</if>
- <if test="insuranceCompany != null and insuranceCompany != ''">INSURANCE_COMPANY = #{insuranceCompany},</if>
- <if test="insuranceContactPerson != null and insuranceContactPerson != ''">INSURANCE_CONTACT_PERSON = #{insuranceContactPerson},</if>
- <if test="insuranceContactPhone != null and insuranceContactPhone != ''">INSURANCE_CONTACT_PHONE = #{insuranceContactPhone},</if>
- <if test="premiumAmount != null and premiumAmount != ''">PREMIUM_AMOUNT = #{premiumAmount},</if>
- <if test="preventionServiceFee != null and preventionServiceFee != ''">PREVENTION_SERVICE_FEE = #{preventionServiceFee},</if>
- <if test="insuranceDate != null">INSURANCE_DATE = #{insuranceDate},</if>
- <if test="preventionServiceUnit != null and preventionServiceUnit != ''">PREVENTION_SERVICE_UNIT = #{preventionServiceUnit},</if>
- <if test="serviceUnitContactPerson != null and serviceUnitContactPerson != ''">SERVICE_UNIT_CONTACT_PERSON = #{serviceUnitContactPerson},</if>
- <if test="serviceUnitContactPhone != null and serviceUnitContactPhone != ''">SERVICE_UNIT_CONTACT_PHONE = #{serviceUnitContactPhone},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|