|
@@ -0,0 +1,693 @@
|
|
|
|
|
+<?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.DemandMapper" >
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.Demand" >
|
|
|
|
|
+ <id column="id" property="id" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="serial_number" property="serialNumber" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="data_category" property="dataCategory" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="name" property="name" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="keyword" property="keyword" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="info_sources" property="infoSources" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="industry_category_a" property="industryCategoryA" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="industry_category_b" property="industryCategoryB" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="industry_category_c" property="industryCategoryC" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="demand_type" property="demandType" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="problem_des" property="problemDes" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="technical_requirements" property="technicalRequirements" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="picture_url" property="pictureUrl" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="text_file_url" property="textFileUrl" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="video_url" property="videoUrl" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="fixed_budget" property="fixedBudget" jdbcType="DECIMAL" />
|
|
|
|
|
+ <result column="fixed_cycle" property="fixedCycle" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="people_number" property="peopleNumber" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="fixed_scheme" property="fixedScheme" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="cost_escrow" property="costEscrow" jdbcType="DECIMAL" />
|
|
|
|
|
+ <result column="budget_cost" property="budgetCost" jdbcType="DECIMAL" />
|
|
|
|
|
+ <result column="validity_period" property="validityPeriod" jdbcType="TIMESTAMP" />
|
|
|
|
|
+ <result column="employer_id" property="employerId" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="employer_name" property="employerName" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="employer_address" property="employerAddress" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="employer_contacts" property="employerContacts" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="employer_contacts_mobile" property="employerContactsMobile" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="employer_contacts_mailbox" property="employerContactsMailbox" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="contacts" property="contacts" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="status" property="status" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="release_status" property="releaseStatus" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="release_date" property="releaseDate" jdbcType="TIMESTAMP" />
|
|
|
|
|
+ <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
|
|
+ <result column="principal_id" property="principalId" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
|
|
+ id, serial_number, data_category, name, keyword, info_sources, industry_category_a,
|
|
|
|
|
+ industry_category_b, industry_category_c, demand_type, problem_des, technical_requirements,
|
|
|
|
|
+ picture_url, text_file_url, video_url, fixed_budget, fixed_cycle, people_number,
|
|
|
|
|
+ fixed_scheme, cost_escrow, budget_cost, validity_period, employer_id, employer_name,
|
|
|
|
|
+ employer_address, employer_contacts, employer_contacts_mobile, employer_contacts_mailbox,
|
|
|
|
|
+ contacts, status, release_status, release_date, create_time, principal_id, deleted_sign
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
|
+ from demand
|
|
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
|
|
|
|
+ delete from demand
|
|
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.Demand" >
|
|
|
|
|
+ insert into demand (id, serial_number, data_category,
|
|
|
|
|
+ name, keyword, info_sources,
|
|
|
|
|
+ industry_category_a, industry_category_b, industry_category_c,
|
|
|
|
|
+ demand_type, problem_des, technical_requirements,
|
|
|
|
|
+ picture_url, text_file_url, video_url,
|
|
|
|
|
+ fixed_budget, fixed_cycle, people_number,
|
|
|
|
|
+ fixed_scheme, cost_escrow, budget_cost,
|
|
|
|
|
+ validity_period, employer_id, employer_name,
|
|
|
|
|
+ employer_address, employer_contacts, employer_contacts_mobile,
|
|
|
|
|
+ employer_contacts_mailbox, contacts, status,
|
|
|
|
|
+ release_status, release_date, create_time,
|
|
|
|
|
+ principal_id, deleted_sign)
|
|
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER},
|
|
|
|
|
+ #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{infoSources,jdbcType=INTEGER},
|
|
|
|
|
+ #{industryCategoryA,jdbcType=INTEGER}, #{industryCategoryB,jdbcType=INTEGER}, #{industryCategoryC,jdbcType=INTEGER},
|
|
|
|
|
+ #{demandType,jdbcType=INTEGER}, #{problemDes,jdbcType=VARCHAR}, #{technicalRequirements,jdbcType=VARCHAR},
|
|
|
|
|
+ #{pictureUrl,jdbcType=VARCHAR}, #{textFileUrl,jdbcType=VARCHAR}, #{videoUrl,jdbcType=VARCHAR},
|
|
|
|
|
+ #{fixedBudget,jdbcType=DECIMAL}, #{fixedCycle,jdbcType=VARCHAR}, #{peopleNumber,jdbcType=INTEGER},
|
|
|
|
|
+ #{fixedScheme,jdbcType=VARCHAR}, #{costEscrow,jdbcType=DECIMAL}, #{budgetCost,jdbcType=DECIMAL},
|
|
|
|
|
+ #{validityPeriod,jdbcType=TIMESTAMP}, #{employerId,jdbcType=VARCHAR}, #{employerName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{employerAddress,jdbcType=VARCHAR}, #{employerContacts,jdbcType=VARCHAR}, #{employerContactsMobile,jdbcType=VARCHAR},
|
|
|
|
|
+ #{employerContactsMailbox,jdbcType=VARCHAR}, #{contacts,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
|
|
|
|
|
+ #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{principalId,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER})
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.Demand" >
|
|
|
|
|
+ insert into demand
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
|
|
+ <if test="id != null" >
|
|
|
|
|
+ id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="serialNumber != null" >
|
|
|
|
|
+ serial_number,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dataCategory != null" >
|
|
|
|
|
+ data_category,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null" >
|
|
|
|
|
+ name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="keyword != null" >
|
|
|
|
|
+ keyword,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="infoSources != null" >
|
|
|
|
|
+ info_sources,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="industryCategoryA != null" >
|
|
|
|
|
+ industry_category_a,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="industryCategoryB != null" >
|
|
|
|
|
+ industry_category_b,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="industryCategoryC != null" >
|
|
|
|
|
+ industry_category_c,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="demandType != null" >
|
|
|
|
|
+ demand_type,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="problemDes != null" >
|
|
|
|
|
+ problem_des,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="technicalRequirements != null" >
|
|
|
|
|
+ technical_requirements,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="pictureUrl != null" >
|
|
|
|
|
+ picture_url,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="textFileUrl != null" >
|
|
|
|
|
+ text_file_url,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="videoUrl != null" >
|
|
|
|
|
+ video_url,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fixedBudget != null" >
|
|
|
|
|
+ fixed_budget,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fixedCycle != null" >
|
|
|
|
|
+ fixed_cycle,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="peopleNumber != null" >
|
|
|
|
|
+ people_number,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fixedScheme != null" >
|
|
|
|
|
+ fixed_scheme,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="costEscrow != null" >
|
|
|
|
|
+ cost_escrow,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="budgetCost != null" >
|
|
|
|
|
+ budget_cost,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="validityPeriod != null" >
|
|
|
|
|
+ validity_period,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerId != null" >
|
|
|
|
|
+ employer_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerName != null" >
|
|
|
|
|
+ employer_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerAddress != null" >
|
|
|
|
|
+ employer_address,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerContacts != null" >
|
|
|
|
|
+ employer_contacts,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerContactsMobile != null" >
|
|
|
|
|
+ employer_contacts_mobile,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerContactsMailbox != null" >
|
|
|
|
|
+ employer_contacts_mailbox,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contacts != null" >
|
|
|
|
|
+ contacts,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null" >
|
|
|
|
|
+ status,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="releaseStatus != null" >
|
|
|
|
|
+ release_status,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="releaseDate != null" >
|
|
|
|
|
+ release_date,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null" >
|
|
|
|
|
+ create_time,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="principalId != null" >
|
|
|
|
|
+ principal_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deletedSign != null" >
|
|
|
|
|
+ deleted_sign,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
|
+ <if test="id != null" >
|
|
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="serialNumber != null" >
|
|
|
|
|
+ #{serialNumber,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dataCategory != null" >
|
|
|
|
|
+ #{dataCategory,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null" >
|
|
|
|
|
+ #{name,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="keyword != null" >
|
|
|
|
|
+ #{keyword,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="infoSources != null" >
|
|
|
|
|
+ #{infoSources,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="industryCategoryA != null" >
|
|
|
|
|
+ #{industryCategoryA,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="industryCategoryB != null" >
|
|
|
|
|
+ #{industryCategoryB,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="industryCategoryC != null" >
|
|
|
|
|
+ #{industryCategoryC,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="demandType != null" >
|
|
|
|
|
+ #{demandType,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="problemDes != null" >
|
|
|
|
|
+ #{problemDes,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="technicalRequirements != null" >
|
|
|
|
|
+ #{technicalRequirements,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="pictureUrl != null" >
|
|
|
|
|
+ #{pictureUrl,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="textFileUrl != null" >
|
|
|
|
|
+ #{textFileUrl,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="videoUrl != null" >
|
|
|
|
|
+ #{videoUrl,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fixedBudget != null" >
|
|
|
|
|
+ #{fixedBudget,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fixedCycle != null" >
|
|
|
|
|
+ #{fixedCycle,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="peopleNumber != null" >
|
|
|
|
|
+ #{peopleNumber,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fixedScheme != null" >
|
|
|
|
|
+ #{fixedScheme,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="costEscrow != null" >
|
|
|
|
|
+ #{costEscrow,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="budgetCost != null" >
|
|
|
|
|
+ #{budgetCost,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="validityPeriod != null" >
|
|
|
|
|
+ #{validityPeriod,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerId != null" >
|
|
|
|
|
+ #{employerId,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerName != null" >
|
|
|
|
|
+ #{employerName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerAddress != null" >
|
|
|
|
|
+ #{employerAddress,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerContacts != null" >
|
|
|
|
|
+ #{employerContacts,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerContactsMobile != null" >
|
|
|
|
|
+ #{employerContactsMobile,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerContactsMailbox != null" >
|
|
|
|
|
+ #{employerContactsMailbox,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contacts != null" >
|
|
|
|
|
+ #{contacts,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null" >
|
|
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="releaseStatus != null" >
|
|
|
|
|
+ #{releaseStatus,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="releaseDate != null" >
|
|
|
|
|
+ #{releaseDate,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null" >
|
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="principalId != null" >
|
|
|
|
|
+ #{principalId,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deletedSign != null" >
|
|
|
|
|
+ #{deletedSign,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Demand" >
|
|
|
|
|
+ update demand
|
|
|
|
|
+ <set >
|
|
|
|
|
+ <if test="serialNumber != null" >
|
|
|
|
|
+ serial_number = #{serialNumber,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dataCategory != null" >
|
|
|
|
|
+ data_category = #{dataCategory,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null" >
|
|
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="keyword != null" >
|
|
|
|
|
+ keyword = #{keyword,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="infoSources != null" >
|
|
|
|
|
+ info_sources = #{infoSources,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="industryCategoryA != null" >
|
|
|
|
|
+ industry_category_a = #{industryCategoryA,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="industryCategoryB != null" >
|
|
|
|
|
+ industry_category_b = #{industryCategoryB,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="industryCategoryC != null" >
|
|
|
|
|
+ industry_category_c = #{industryCategoryC,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="demandType != null" >
|
|
|
|
|
+ demand_type = #{demandType,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="problemDes != null" >
|
|
|
|
|
+ problem_des = #{problemDes,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="technicalRequirements != null" >
|
|
|
|
|
+ technical_requirements = #{technicalRequirements,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="pictureUrl != null" >
|
|
|
|
|
+ picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="textFileUrl != null" >
|
|
|
|
|
+ text_file_url = #{textFileUrl,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="videoUrl != null" >
|
|
|
|
|
+ video_url = #{videoUrl,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fixedBudget != null" >
|
|
|
|
|
+ fixed_budget = #{fixedBudget,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fixedCycle != null" >
|
|
|
|
|
+ fixed_cycle = #{fixedCycle,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="peopleNumber != null" >
|
|
|
|
|
+ people_number = #{peopleNumber,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fixedScheme != null" >
|
|
|
|
|
+ fixed_scheme = #{fixedScheme,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="costEscrow != null" >
|
|
|
|
|
+ cost_escrow = #{costEscrow,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="budgetCost != null" >
|
|
|
|
|
+ budget_cost = #{budgetCost,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="validityPeriod != null" >
|
|
|
|
|
+ validity_period = #{validityPeriod,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerId != null" >
|
|
|
|
|
+ employer_id = #{employerId,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerName != null" >
|
|
|
|
|
+ employer_name = #{employerName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerAddress != null" >
|
|
|
|
|
+ employer_address = #{employerAddress,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerContacts != null" >
|
|
|
|
|
+ employer_contacts = #{employerContacts,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerContactsMobile != null" >
|
|
|
|
|
+ employer_contacts_mobile = #{employerContactsMobile,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="employerContactsMailbox != null" >
|
|
|
|
|
+ employer_contacts_mailbox = #{employerContactsMailbox,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contacts != null" >
|
|
|
|
|
+ contacts = #{contacts,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null" >
|
|
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="releaseStatus != null" >
|
|
|
|
|
+ release_status = #{releaseStatus,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="releaseDate != null" >
|
|
|
|
|
+ release_date = #{releaseDate,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null" >
|
|
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="principalId != null" >
|
|
|
|
|
+ principal_id = #{principalId,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.Demand" >
|
|
|
|
|
+ update demand
|
|
|
|
|
+ set serial_number = #{serialNumber,jdbcType=INTEGER},
|
|
|
|
|
+ data_category = #{dataCategory,jdbcType=INTEGER},
|
|
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
|
|
+ keyword = #{keyword,jdbcType=VARCHAR},
|
|
|
|
|
+ info_sources = #{infoSources,jdbcType=INTEGER},
|
|
|
|
|
+ industry_category_a = #{industryCategoryA,jdbcType=INTEGER},
|
|
|
|
|
+ industry_category_b = #{industryCategoryB,jdbcType=INTEGER},
|
|
|
|
|
+ industry_category_c = #{industryCategoryC,jdbcType=INTEGER},
|
|
|
|
|
+ demand_type = #{demandType,jdbcType=INTEGER},
|
|
|
|
|
+ problem_des = #{problemDes,jdbcType=VARCHAR},
|
|
|
|
|
+ technical_requirements = #{technicalRequirements,jdbcType=VARCHAR},
|
|
|
|
|
+ picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
|
|
+ text_file_url = #{textFileUrl,jdbcType=VARCHAR},
|
|
|
|
|
+ video_url = #{videoUrl,jdbcType=VARCHAR},
|
|
|
|
|
+ fixed_budget = #{fixedBudget,jdbcType=DECIMAL},
|
|
|
|
|
+ fixed_cycle = #{fixedCycle,jdbcType=VARCHAR},
|
|
|
|
|
+ people_number = #{peopleNumber,jdbcType=INTEGER},
|
|
|
|
|
+ fixed_scheme = #{fixedScheme,jdbcType=VARCHAR},
|
|
|
|
|
+ cost_escrow = #{costEscrow,jdbcType=DECIMAL},
|
|
|
|
|
+ budget_cost = #{budgetCost,jdbcType=DECIMAL},
|
|
|
|
|
+ validity_period = #{validityPeriod,jdbcType=TIMESTAMP},
|
|
|
|
|
+ employer_id = #{employerId,jdbcType=VARCHAR},
|
|
|
|
|
+ employer_name = #{employerName,jdbcType=VARCHAR},
|
|
|
|
|
+ employer_address = #{employerAddress,jdbcType=VARCHAR},
|
|
|
|
|
+ employer_contacts = #{employerContacts,jdbcType=VARCHAR},
|
|
|
|
|
+ employer_contacts_mobile = #{employerContactsMobile,jdbcType=VARCHAR},
|
|
|
|
|
+ employer_contacts_mailbox = #{employerContactsMailbox,jdbcType=VARCHAR},
|
|
|
|
|
+ contacts = #{contacts,jdbcType=INTEGER},
|
|
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
|
|
+ release_status = #{releaseStatus,jdbcType=INTEGER},
|
|
|
|
|
+ release_date = #{releaseDate,jdbcType=TIMESTAMP},
|
|
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ principal_id = #{principalId,jdbcType=VARCHAR},
|
|
|
|
|
+ deleted_sign = #{deletedSign,jdbcType=INTEGER}
|
|
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="findManageUserDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
|
|
|
|
|
+ select
|
|
|
|
|
+ d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
|
|
|
|
|
+ d.name, d.keyword, d.info_sources as infoSources,
|
|
|
|
|
+ ui.username, d.demand_type as demandType, d.validity_period as validityPeriod,
|
|
|
|
|
+ d.employer_name as employerName, ui.province, d.status,
|
|
|
|
|
+ d.release_status as releaseStatus, d.release_date as releaseDate, a.name as principalId
|
|
|
|
|
+ from demand d
|
|
|
|
|
+ LEFT JOIN user_identity ui on d.principal_id = ui.uid
|
|
|
|
|
+ LEFT JOIN admin a on a.id = d.principal_id
|
|
|
|
|
+ <if test="mid != null">
|
|
|
|
|
+ LEFT JOIN user u on d.employer_id = u.id
|
|
|
|
|
+ </if>
|
|
|
|
|
+ where d.deleted_sign = 0 and d.data_category = 0
|
|
|
|
|
+ <if test="mid != null">
|
|
|
|
|
+ and u.mid = #{mid,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="principal != null">
|
|
|
|
|
+ and d.principal_id = #{principal,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="province != null">
|
|
|
|
|
+ and ui.province = #{province,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="serialNumber != null">
|
|
|
|
|
+ and d.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null">
|
|
|
|
|
+ and d.name = #{name,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="keyword != null">
|
|
|
|
|
+ and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="username != null">
|
|
|
|
|
+ and ui.username = #{username,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="infoSources != null">
|
|
|
|
|
+ and d.info_sources = #{infoSources,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="demandType != null">
|
|
|
|
|
+ and d.demand_type = #{demandType,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null">
|
|
|
|
|
+ and d.status = #{status,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="releaseStatus != null">
|
|
|
|
|
+ and d.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vStart != null">
|
|
|
|
|
+ and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vEnd != null">
|
|
|
|
|
+ and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rStart != null">
|
|
|
|
|
+ and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rEnd != null">
|
|
|
|
|
+ and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ order by d.serial_number desc
|
|
|
|
|
+ <if test="page_sql!=null">
|
|
|
|
|
+ ${page_sql}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id ="findManageUserDemandCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
|
|
+ select
|
|
|
|
|
+ count(1)
|
|
|
|
|
+ from demand d
|
|
|
|
|
+ LEFT JOIN user_identity ui on d.principal_id = ui.uid
|
|
|
|
|
+ LEFT JOIN admin a on a.id = d.principal_id
|
|
|
|
|
+ <if test="mid != null">
|
|
|
|
|
+ LEFT JOIN user u on d.employer_id = u.id
|
|
|
|
|
+ </if>
|
|
|
|
|
+ where d.deleted_sign = 0 and d.data_category = 0
|
|
|
|
|
+ <if test="mid != null">
|
|
|
|
|
+ and u.mid = #{mid,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="principal != null">
|
|
|
|
|
+ and d.principal_id = #{principal,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="serialNumber != null">
|
|
|
|
|
+ and d.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="province != null">
|
|
|
|
|
+ and ui.province = #{province,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null">
|
|
|
|
|
+ and d.name = #{name,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="keyword != null">
|
|
|
|
|
+ and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="username != null">
|
|
|
|
|
+ and ui.username = #{username,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="infoSources != null">
|
|
|
|
|
+ and d.info_sources = #{infoSources,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="demandType != null">
|
|
|
|
|
+ and d.demand_type = #{demandType,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null">
|
|
|
|
|
+ and d.status = #{status,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="releaseStatus != null">
|
|
|
|
|
+ and d.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vStart != null">
|
|
|
|
|
+ and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vEnd != null">
|
|
|
|
|
+ and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rStart != null">
|
|
|
|
|
+ and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rEnd != null">
|
|
|
|
|
+ and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="findManageOrgDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
|
|
|
|
|
+ select
|
|
|
|
|
+ d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
|
|
|
|
|
+ d.name, d.keyword, d.info_sources as infoSources,
|
|
|
|
|
+ oi.unit_name as username, d.demand_type as demandType, d.validity_period as validityPeriod,
|
|
|
|
|
+ d.employer_name as employerName, oi.licence_province as province, d.status,
|
|
|
|
|
+ d.release_status as releaseStatus, d.release_date as releaseDate, a.name as principalId
|
|
|
|
|
+ from demand d
|
|
|
|
|
+ LEFT JOIN organization_identity oi on d.principal_id = oi.uid
|
|
|
|
|
+ LEFT JOIN admin a on a.id = d.principal_id
|
|
|
|
|
+ <if test="mid != null">
|
|
|
|
|
+ LEFT JOIN user u on d.employer_id = u.id
|
|
|
|
|
+ </if>
|
|
|
|
|
+ where d.deleted_sign = 0 and d.data_category = 1
|
|
|
|
|
+ <if test="mid != null">
|
|
|
|
|
+ and u.mid = #{mid,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="principal != null">
|
|
|
|
|
+ and d.principal_id = #{principal,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="province != null">
|
|
|
|
|
+ and oi.licence_province = #{province,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="serialNumber != null">
|
|
|
|
|
+ and d.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null">
|
|
|
|
|
+ and d.name = #{name,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="keyword != null">
|
|
|
|
|
+ and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="username != null">
|
|
|
|
|
+ and oi.unit_name = #{username,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="infoSources != null">
|
|
|
|
|
+ and d.info_sources = #{infoSources,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="demandType != null">
|
|
|
|
|
+ and d.demand_type = #{demandType,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null">
|
|
|
|
|
+ and d.status = #{status,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="releaseStatus != null">
|
|
|
|
|
+ and d.release_status = #{releaseStatus,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vStart != null">
|
|
|
|
|
+ and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vEnd != null">
|
|
|
|
|
+ and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rStart != null">
|
|
|
|
|
+ and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rEnd != null">
|
|
|
|
|
+ and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ order by d.serial_number desc
|
|
|
|
|
+ <if test="page_sql!=null">
|
|
|
|
|
+ ${page_sql}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id ="findManageOrgDemandCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
|
|
+ select
|
|
|
|
|
+ count(1)
|
|
|
|
|
+ from demand d
|
|
|
|
|
+ LEFT JOIN organization_identity oi on d.principal_id = oi.uid
|
|
|
|
|
+ LEFT JOIN admin a on a.id = d.principal_id
|
|
|
|
|
+ <if test="mid != null">
|
|
|
|
|
+ LEFT JOIN user u on d.employer_id = u.id
|
|
|
|
|
+ </if>
|
|
|
|
|
+ where d.deleted_sign = 0 and d.data_category = 1
|
|
|
|
|
+ <if test="mid != null">
|
|
|
|
|
+ and u.mid = #{mid,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="principal != null">
|
|
|
|
|
+ and d.principal_id = #{principal,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="serialNumber != null">
|
|
|
|
|
+ and d.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="province != null">
|
|
|
|
|
+ and oi.licence_province = #{province,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="name != null">
|
|
|
|
|
+ and d.name = #{name,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="keyword != null">
|
|
|
|
|
+ and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="username != null">
|
|
|
|
|
+ and oi.unit_name = #{username,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="infoSources != null">
|
|
|
|
|
+ and d.info_sources = #{infoSources,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="demandType != null">
|
|
|
|
|
+ and d.demand_type = #{demandType,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null">
|
|
|
|
|
+ and d.status = #{status,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="releaseStatus != null">
|
|
|
|
|
+ and d.release_status = #{releaseStatus,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vStart != null">
|
|
|
|
|
+ and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vEnd != null">
|
|
|
|
|
+ and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rStart != null">
|
|
|
|
|
+ and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rEnd != null">
|
|
|
|
|
+ and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+</mapper>
|