|
|
@@ -18,30 +18,39 @@
|
|
|
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- insure_id, additional_insure, data_status, end_time, estate_company_id, estate_staff_id,
|
|
|
- insure_company_id, insure_no, insure_staff_id, insure_type_id, mainten_company_id,
|
|
|
+ insure_id, additional_insure, data_status, end_time, estate_company_id, estate_staff_id,
|
|
|
+ insure_company_id, insure_no, insure_staff_id, insure_type_id, mainten_company_id,
|
|
|
mainten_staff_id, policy_file_url, start_time
|
|
|
</sql>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from `fault_insure`
|
|
|
where insure_id = #{insureId,jdbcType=VARCHAR}
|
|
|
+ <if test="query.estateCompanyId != null">
|
|
|
+ AND estate_company_id = #{query.estateCompanyId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="query.insureCompanyId != null">
|
|
|
+ AND insure_company_id = #{query.insureCompanyId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="query.maintenCompanyId != null">
|
|
|
+ AND mainten_company_id = #{query.maintenCompanyId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
delete from `fault_insure`
|
|
|
where insure_id = #{insureId,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.inspur.idm.media.po.fault.FaultInsure">
|
|
|
- insert into `fault_insure` (insure_id, additional_insure, data_status,
|
|
|
- end_time, estate_company_id, estate_staff_id,
|
|
|
- insure_company_id, insure_no, insure_staff_id,
|
|
|
- insure_type_id, mainten_company_id, mainten_staff_id,
|
|
|
+ insert into `fault_insure` (insure_id, additional_insure, data_status,
|
|
|
+ end_time, estate_company_id, estate_staff_id,
|
|
|
+ insure_company_id, insure_no, insure_staff_id,
|
|
|
+ insure_type_id, mainten_company_id, mainten_staff_id,
|
|
|
policy_file_url, start_time)
|
|
|
- values (#{insureId,jdbcType=VARCHAR}, #{additionalInsure,jdbcType=INTEGER}, #{dataStatus,jdbcType=INTEGER},
|
|
|
- #{endTime,jdbcType=TIMESTAMP}, #{estateCompanyId,jdbcType=VARCHAR}, #{estateStaffId,jdbcType=VARCHAR},
|
|
|
- #{insureCompanyId,jdbcType=VARCHAR}, #{insureNo,jdbcType=VARCHAR}, #{insureStaffId,jdbcType=VARCHAR},
|
|
|
- #{insureTypeId,jdbcType=VARCHAR}, #{maintenCompanyId,jdbcType=VARCHAR}, #{maintenStaffId,jdbcType=VARCHAR},
|
|
|
+ values (#{insureId,jdbcType=VARCHAR}, #{additionalInsure,jdbcType=INTEGER}, #{dataStatus,jdbcType=INTEGER},
|
|
|
+ #{endTime,jdbcType=TIMESTAMP}, #{estateCompanyId,jdbcType=VARCHAR}, #{estateStaffId,jdbcType=VARCHAR},
|
|
|
+ #{insureCompanyId,jdbcType=VARCHAR}, #{insureNo,jdbcType=VARCHAR}, #{insureStaffId,jdbcType=VARCHAR},
|
|
|
+ #{insureTypeId,jdbcType=VARCHAR}, #{maintenCompanyId,jdbcType=VARCHAR}, #{maintenStaffId,jdbcType=VARCHAR},
|
|
|
#{policyFileUrl,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.inspur.idm.media.po.fault.FaultInsure">
|
|
|
@@ -268,4 +277,4 @@
|
|
|
select count(0) from `fault_insure`
|
|
|
where DATEDIFF(end_time, now()) <= 7 and DATEDIFF(end_time, now()) >= 0
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+</mapper>
|