|
@@ -0,0 +1,96 @@
|
|
|
|
|
+<?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.chinaunicom.omniFlowNetCompute.mapper.FreemarketMapper">
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap type="cn.chinaunicom.omniFlowNetCompute.domain.Freemarket" id="BaseResultMap">
|
|
|
|
|
+ <id column="id" property="id" jdbcType="BIGINT"/>
|
|
|
|
|
+ <result column="announcement_type" property="announcementType" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="announcement_title" property="announcementTitle" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="project_code" property="projectCode" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="is_relevant" property="isRelevant" jdbcType="TINYINT"/>
|
|
|
|
|
+ <result column="purchase_unit" property="purchaseUnit" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="final_user" property="finalUser" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="natural_customer_id" property="naturalCustomerId" jdbcType="BIGINT"/>
|
|
|
|
|
+ <result column="customer_group" property="customerGroup" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="category" property="category" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="project_name" property="projectName" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="tender_agent" property="tenderAgent" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="tender_agent_phone" property="tenderAgentPhone" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="match_keywords" property="matchKeywords" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="bid_document_deadline" property="bidDocumentDeadline" />
|
|
|
|
|
+ <result column="bid_opening_date" property="bidOpeningDate" />
|
|
|
|
|
+ <result column="announcement_url" property="announcementUrl" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="jianyu_url" property="jianyuUrl" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="budget" property="budget" jdbcType="DECIMAL"/>
|
|
|
|
|
+ <result column="tender_info_publish_time" property="tenderInfoPublishTime" />
|
|
|
|
|
+ <result column="branch_company" property="branchCompany" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="industry" property="industry" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="business_category" property="businessCategory" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="business_demand" property="businessDemand" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="opportunity_id" property="opportunityId" jdbcType="BIGINT"/>
|
|
|
|
|
+ <result column="is_participate" property="isParticipate" jdbcType="TINYINT"/>
|
|
|
|
|
+ <result column="not_participate_reason" property="notParticipateReason" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="current_stage_start_time" property="currentStageStartTime" />
|
|
|
|
|
+ <result column="support_main_unit" property="supportMainUnit" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="support_department" property="supportDepartment" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="is_aware" property="isAware" jdbcType="TINYINT"/>
|
|
|
|
|
+ <result column="rbg_label" property="rbgLabel" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="discard_approval_number" property="discardApprovalNumber" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="publish_time" property="publishTime" />
|
|
|
|
|
+ <result column="create_time" property="createTime" />
|
|
|
|
|
+ <result column="update_time" property="updateTime" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 通用查询字段 -->
|
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
|
+ id, announcement_type, announcement_title, project_code, is_relevant, purchase_unit, final_user,
|
|
|
|
|
+ natural_customer_id, customer_group, category, project_name, tender_agent, tender_agent_phone,
|
|
|
|
|
+ match_keywords, bid_document_deadline, bid_opening_date, announcement_url, jianyu_url, budget,
|
|
|
|
|
+ tender_info_publish_time, branch_company, industry, business_category, business_demand,
|
|
|
|
|
+ opportunity_id, is_participate, not_participate_reason, is_aware, rbg_label, discard_approval_number,
|
|
|
|
|
+ publish_time, create_time, update_time
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- ========== 核心SQL 1:详情页查询 - 根据主键ID查询单条详情数据 ========== -->
|
|
|
|
|
+ <select id="selectById" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ FROM project_announcement
|
|
|
|
|
+ WHERE id = #{id}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- ========== 核心SQL 2:列表页查询 - 分页+多条件模糊查询(最常用) ========== -->
|
|
|
|
|
+ <select id="selectPageByCondition" parameterType="cn.chinaunicom.omniFlowNetCompute.domain.Freemarket" resultMap="BaseResultMap">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ FROM freemarket
|
|
|
|
|
+ WHERE 1=1
|
|
|
|
|
+ <!-- 公告标题 模糊查询 -->
|
|
|
|
|
+ <if test="announcementTitle != null and announcementTitle != ''">
|
|
|
|
|
+ AND announcement_title LIKE CONCAT('%',#{announcementTitle},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!-- 项目编号 精准查询 -->
|
|
|
|
|
+ <if test="projectCode != null and projectCode != ''">
|
|
|
|
|
+ AND project_code = #{projectId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!-- 采购单位 模糊查询 -->
|
|
|
|
|
+ <if test="purchaseUnit != null and purchaseUnit != ''">
|
|
|
|
|
+ AND purchase_unit LIKE CONCAT('%',#{purchaseUnit},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!-- 是否相关 精准查询 -->
|
|
|
|
|
+ <if test="isRelevant != null">
|
|
|
|
|
+ AND is_relevant = #{isRelevant}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!-- 客户群 精准查询 -->
|
|
|
|
|
+ <if test="customerGroup != null and customerGroup != ''">
|
|
|
|
|
+ AND customer_group = #{customerGroup}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!-- 是否参与 精准查询 -->
|
|
|
|
|
+ <if test="isParticipate != null">
|
|
|
|
|
+ AND is_participate = #{isParticipate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!-- 排序:按创建时间倒序,最新的在前面 -->
|
|
|
|
|
+ ORDER BY create_time DESC
|
|
|
|
|
+ </select>
|
|
|
|
|
+</mapper>
|