|
|
@@ -0,0 +1,197 @@
|
|
|
+<?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.goafanti.common.dao.OrgAnnualReportMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgAnnualReport" >
|
|
|
+ <id column="id" property="id" jdbcType="VARCHAR" />
|
|
|
+ <result column="uid" property="uid" jdbcType="VARCHAR" />
|
|
|
+ <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="last_update_time" property="lastUpdateTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="total_tax" property="totalTax" jdbcType="DECIMAL" />
|
|
|
+ <result column="income_tax_relief" property="incomeTaxRelief" jdbcType="DECIMAL" />
|
|
|
+ <result column="total_export_volume" property="totalExportVolume" jdbcType="DECIMAL" />
|
|
|
+ <result column="year" property="year" jdbcType="INTEGER" />
|
|
|
+ <result column="state" property="state" jdbcType="INTEGER" />
|
|
|
+ <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
+ id, uid, create_time, last_update_time, total_tax, income_tax_relief, total_export_volume,
|
|
|
+ year, state, deleted_sign
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from org_annual_report
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
|
|
+ delete from org_annual_report
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.OrgAnnualReport" >
|
|
|
+ insert into org_annual_report (id, uid, create_time,
|
|
|
+ last_update_time, total_tax, income_tax_relief,
|
|
|
+ total_export_volume, year, state,
|
|
|
+ deleted_sign)
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ #{lastUpdateTime,jdbcType=TIMESTAMP}, #{totalTax,jdbcType=DECIMAL}, #{incomeTaxRelief,jdbcType=DECIMAL},
|
|
|
+ #{totalExportVolume,jdbcType=DECIMAL}, #{year,jdbcType=INTEGER}, #{state,jdbcType=INTEGER},
|
|
|
+ #{deletedSign,jdbcType=INTEGER})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgAnnualReport" >
|
|
|
+ insert into org_annual_report
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="id != null" >
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="uid != null" >
|
|
|
+ uid,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null" >
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="lastUpdateTime != null" >
|
|
|
+ last_update_time,
|
|
|
+ </if>
|
|
|
+ <if test="totalTax != null" >
|
|
|
+ total_tax,
|
|
|
+ </if>
|
|
|
+ <if test="incomeTaxRelief != null" >
|
|
|
+ income_tax_relief,
|
|
|
+ </if>
|
|
|
+ <if test="totalExportVolume != null" >
|
|
|
+ total_export_volume,
|
|
|
+ </if>
|
|
|
+ <if test="year != null" >
|
|
|
+ year,
|
|
|
+ </if>
|
|
|
+ <if test="state != null" >
|
|
|
+ state,
|
|
|
+ </if>
|
|
|
+ <if test="deletedSign != null" >
|
|
|
+ deleted_sign,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="id != null" >
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="uid != null" >
|
|
|
+ #{uid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null" >
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="lastUpdateTime != null" >
|
|
|
+ #{lastUpdateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="totalTax != null" >
|
|
|
+ #{totalTax,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="incomeTaxRelief != null" >
|
|
|
+ #{incomeTaxRelief,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalExportVolume != null" >
|
|
|
+ #{totalExportVolume,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="year != null" >
|
|
|
+ #{year,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="state != null" >
|
|
|
+ #{state,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="deletedSign != null" >
|
|
|
+ #{deletedSign,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgAnnualReport" >
|
|
|
+ update org_annual_report
|
|
|
+ <set >
|
|
|
+ <if test="uid != null" >
|
|
|
+ uid = #{uid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null" >
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="lastUpdateTime != null" >
|
|
|
+ last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="totalTax != null" >
|
|
|
+ total_tax = #{totalTax,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="incomeTaxRelief != null" >
|
|
|
+ income_tax_relief = #{incomeTaxRelief,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalExportVolume != null" >
|
|
|
+ total_export_volume = #{totalExportVolume,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="year != null" >
|
|
|
+ year = #{year,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="state != null" >
|
|
|
+ state = #{state,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="deletedSign != null" >
|
|
|
+ deleted_sign = #{deletedSign,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgAnnualReport" >
|
|
|
+ update org_annual_report
|
|
|
+ set uid = #{uid,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP},
|
|
|
+ total_tax = #{totalTax,jdbcType=DECIMAL},
|
|
|
+ income_tax_relief = #{incomeTaxRelief,jdbcType=DECIMAL},
|
|
|
+ total_export_volume = #{totalExportVolume,jdbcType=DECIMAL},
|
|
|
+ year = #{year,jdbcType=INTEGER},
|
|
|
+ state = #{state,jdbcType=INTEGER},
|
|
|
+ deleted_sign = #{deletedSign,jdbcType=INTEGER}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="findOrgAnnualReportListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from org_annual_report
|
|
|
+ where deleted_sign = 0
|
|
|
+ <if test="year != null">
|
|
|
+ and year = #{year,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ and state = #{state,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="uid != null">
|
|
|
+ and uid = #{uid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ order by create_time desc
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findOrgAnnualReportCount" resultType="java.lang.Integer" parameterType="String">
|
|
|
+ select count(1)
|
|
|
+ from org_annual_report
|
|
|
+ where deleted_sign = 0
|
|
|
+ <if test="year != null">
|
|
|
+ and year = #{year,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ and state = #{state,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="uid != null">
|
|
|
+ and uid = #{uid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
|
|
|
+ update org_annual_report set deleted_sign = 1
|
|
|
+ where id in
|
|
|
+ <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+</mapper>
|