| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- <?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.OrgTechProductMapper" >
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgTechProduct" >
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="uid" property="uid" jdbcType="VARCHAR" />
- <result column="serial_number" property="serialNumber" jdbcType="VARCHAR" />
- <result column="product_name" property="productName" jdbcType="VARCHAR" />
- <result column="technical_field1" property="technicalField1" jdbcType="INTEGER" />
- <result column="technical_field2" property="technicalField2" jdbcType="INTEGER" />
- <result column="technical_field3" property="technicalField3" jdbcType="INTEGER" />
- <result column="technical_source" property="technicalSource" jdbcType="INTEGER" />
- <result column="last_year_revenue" property="lastYearRevenue" jdbcType="VARCHAR" />
- <result column="main_product" property="mainProduct" jdbcType="INTEGER" />
- <result column="intellectual_property_number" property="intellectualPropertyNumber" jdbcType="VARCHAR" />
- <result column="key_technology" property="keyTechnology" jdbcType="VARCHAR" />
- <result column="competitive_edge" property="competitiveEdge" jdbcType="VARCHAR" />
- <result column="condition_effect" property="conditionEffect" jdbcType="VARCHAR" />
- <result column="year" property="year" jdbcType="INTEGER" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="account_url" property="accountUrl" jdbcType="VARCHAR" />
- <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, uid, serial_number, product_name, technical_field1, technical_field2, technical_field3,
- technical_source, last_year_revenue, main_product, intellectual_property_number,
- key_technology, competitive_edge, condition_effect, year, create_time, account_url, deleted_sign
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from org_tech_product
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from org_tech_product
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.OrgTechProduct" >
- insert into org_tech_product (id, uid, serial_number,
- product_name, technical_field1, technical_field2,
- technical_field3, technical_source, last_year_revenue,
- main_product, intellectual_property_number,
- key_technology, competitive_edge, condition_effect,
- year, create_time, account_url, deleted_sign)
- values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=VARCHAR},
- #{productName,jdbcType=VARCHAR}, #{technicalField1,jdbcType=INTEGER}, #{technicalField2,jdbcType=INTEGER},
- #{technicalField3,jdbcType=INTEGER}, #{technicalSource,jdbcType=INTEGER}, #{lastYearRevenue,jdbcType=VARCHAR},
- #{mainProduct,jdbcType=INTEGER}, #{intellectualPropertyNumber,jdbcType=VARCHAR},
- #{keyTechnology,jdbcType=VARCHAR}, #{competitiveEdge,jdbcType=VARCHAR}, #{conditionEffect,jdbcType=VARCHAR},
- #{year,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{accountUrl,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgTechProduct" >
- insert into org_tech_product
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="uid != null" >
- uid,
- </if>
- <if test="serialNumber != null" >
- serial_number,
- </if>
- <if test="productName != null" >
- product_name,
- </if>
- <if test="technicalField1 != null" >
- technical_field1,
- </if>
- <if test="technicalField2 != null" >
- technical_field2,
- </if>
- <if test="technicalField3 != null" >
- technical_field3,
- </if>
- <if test="technicalSource != null" >
- technical_source,
- </if>
- <if test="lastYearRevenue != null" >
- last_year_revenue,
- </if>
- <if test="mainProduct != null" >
- main_product,
- </if>
- <if test="intellectualPropertyNumber != null" >
- intellectual_property_number,
- </if>
- <if test="keyTechnology != null" >
- key_technology,
- </if>
- <if test="competitiveEdge != null" >
- competitive_edge,
- </if>
- <if test="conditionEffect != null" >
- condition_effect,
- </if>
- <if test="year != null" >
- year,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- <if test="accountUrl != null" >
- account_url,
- </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="serialNumber != null" >
- #{serialNumber,jdbcType=VARCHAR},
- </if>
- <if test="productName != null" >
- #{productName,jdbcType=VARCHAR},
- </if>
- <if test="technicalField1 != null" >
- #{technicalField1,jdbcType=INTEGER},
- </if>
- <if test="technicalField2 != null" >
- #{technicalField2,jdbcType=INTEGER},
- </if>
- <if test="technicalField3 != null" >
- #{technicalField3,jdbcType=INTEGER},
- </if>
- <if test="technicalSource != null" >
- #{technicalSource,jdbcType=INTEGER},
- </if>
- <if test="lastYearRevenue != null" >
- #{lastYearRevenue,jdbcType=VARCHAR},
- </if>
- <if test="mainProduct != null" >
- #{mainProduct,jdbcType=INTEGER},
- </if>
- <if test="intellectualPropertyNumber != null" >
- #{intellectualPropertyNumber,jdbcType=VARCHAR},
- </if>
- <if test="keyTechnology != null" >
- #{keyTechnology,jdbcType=VARCHAR},
- </if>
- <if test="competitiveEdge != null" >
- #{competitiveEdge,jdbcType=VARCHAR},
- </if>
- <if test="conditionEffect != null" >
- #{conditionEffect,jdbcType=VARCHAR},
- </if>
- <if test="year != null" >
- #{year,jdbcType=INTEGER},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="accountUrl != null" >
- #{accountUrl,jdbcType=VARCHAR},
- </if>
- <if test="deletedSign != null" >
- #{deletedSign,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgTechProduct" >
- update org_tech_product
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=VARCHAR},
- </if>
- <if test="serialNumber != null" >
- serial_number = #{serialNumber,jdbcType=VARCHAR},
- </if>
- <if test="productName != null" >
- product_name = #{productName,jdbcType=VARCHAR},
- </if>
- <if test="technicalField1 != null" >
- technical_field1 = #{technicalField1,jdbcType=INTEGER},
- </if>
- <if test="technicalField2 != null" >
- technical_field2 = #{technicalField2,jdbcType=INTEGER},
- </if>
- <if test="technicalField3 != null" >
- technical_field3 = #{technicalField3,jdbcType=INTEGER},
- </if>
- <if test="technicalSource != null" >
- technical_source = #{technicalSource,jdbcType=INTEGER},
- </if>
- <if test="lastYearRevenue != null" >
- last_year_revenue = #{lastYearRevenue,jdbcType=VARCHAR},
- </if>
- <if test="mainProduct != null" >
- main_product = #{mainProduct,jdbcType=INTEGER},
- </if>
- <if test="intellectualPropertyNumber != null" >
- intellectual_property_number = #{intellectualPropertyNumber,jdbcType=VARCHAR},
- </if>
- <if test="keyTechnology != null" >
- key_technology = #{keyTechnology,jdbcType=VARCHAR},
- </if>
- <if test="competitiveEdge != null" >
- competitive_edge = #{competitiveEdge,jdbcType=VARCHAR},
- </if>
- <if test="conditionEffect != null" >
- condition_effect = #{conditionEffect,jdbcType=VARCHAR},
- </if>
- <if test="year != null" >
- year = #{year,jdbcType=INTEGER},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="accountUrl != null" >
- account_url = #{accountUrl,jdbcType=VARCHAR},
- </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.OrgTechProduct" >
- update org_tech_product
- set uid = #{uid,jdbcType=VARCHAR},
- serial_number = #{serialNumber,jdbcType=VARCHAR},
- product_name = #{productName,jdbcType=VARCHAR},
- technical_field1 = #{technicalField1,jdbcType=INTEGER},
- technical_field2 = #{technicalField2,jdbcType=INTEGER},
- technical_field3 = #{technicalField3,jdbcType=INTEGER},
- technical_source = #{technicalSource,jdbcType=INTEGER},
- last_year_revenue = #{lastYearRevenue,jdbcType=VARCHAR},
- main_product = #{mainProduct,jdbcType=INTEGER},
- intellectual_property_number = #{intellectualPropertyNumber,jdbcType=VARCHAR},
- key_technology = #{keyTechnology,jdbcType=VARCHAR},
- competitive_edge = #{competitiveEdge,jdbcType=VARCHAR},
- condition_effect = #{conditionEffect,jdbcType=VARCHAR},
- year = #{year,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- account_url = #{accountUrl,jdbcType=VARCHAR},
- deleted_sign = #{deletedSign,jdbcType=INTEGER}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id = "findOrgTechProductListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from org_tech_product
- where deleted_sign = 0
- <if test="uid != null">
- and uid = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="year != null">
- and year = #{year,jdbcType=INTEGER}
- </if>
- order by create_time desc
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findOrgTechProductCount" resultType="java.lang.Integer" parameterType="String">
- select count(1)
- from org_tech_product
- where deleted_sign = 0
- <if test="uid != null">
- and uid = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="year != null">
- and year = #{year,jdbcType=INTEGER}
- </if>
- </select>
-
- <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
- update org_tech_product set deleted_sign = 1
- where id in
- <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
- #{item}
- </foreach>
- </update>
- </mapper>
|