| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?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.wx.blink.backend.repository.BlinkCompetitorProjectRepository">
- <!-- 查询单个企业资质-->
- <select id="queryByProjectName" resultType="com.wx.blink.backend.domain.dataobject.BlinkCompetitorProjectDO">
- select *
- from blink_competitor_project_situation
- where deleted_flag = #{deletedFlag}
- <if test="projectName != null and projectName != ''">
- AND project_name = #{projectName}
- </if>
- <if test="id != null">
- AND id = #{id}
- </if>
- </select>
- <!-- 分页查询企业资质列表-->
- <select id="supportsCompetitorProjectQueryPage" resultType="com.wx.blink.backend.domain.dto.BlinkCompetitorProjectDTO">
- select *
- from blink_competitor_project_situation
- where deleted_flag = '0'
- <if test="query.projectName != null and query.qualificationprojectName != ''">
- AND project_name LIKE concat('%', #{query.projectName}, '%')
- </if>
- <!-- <if test="query.competitorId != null">-->
- <!-- AND competitor_id = #{query.competitorId}-->
- <!-- </if>-->
- order by create_time desc
- </select>
- <select id="supportsCompetitorProjectQtyByCompetitorId" resultType="java.lang.Integer">
- select COUNT(1) cnt
- from blink_competitor_project_situation
- where deleted_flag = 0
- -- and competitor_id=#{competitorId}
- </select>
- <select id="supportsCompetitorProjectByCompetitorIdQueryPage"
- resultType="com.wx.blink.backend.domain.dto.BlinkCompetitorProjectDTO">
- select si.*
- from blink_competitor_project_situation si
- inner join blink_competitor_project_situation_offer offer
- on si.id=offer.situation_id and offer.deleted_flag = 0
- where si.deleted_flag = 0
- <if test="query.competitorId != null">
- and offer.competitor_id = #{query.competitorId}
- </if>
- <if test="query.projectName != null and query.projectName != ''">
- and si.project_name LIKE concat('%', #{query.projectName}, '%')
- </if>
- <if test="query.customerName != null and query.customerName != ''">
- and si.customer_name LIKE concat('%', #{query.customerName}, '%')
- </if>
- <if test="query.isOffer != null">
- and si.is_offer = #{query.isOffer}
- </if>
- <if test="query.isAward != null">
- and si.is_award = #{query.isAward}
- </if>
- </select>
- <select id="getById"
- resultType="com.wx.blink.backend.domain.dataobject.BlinkCompetitorProjectDO">
- select *
- from blink_competitor_project_situation
- where deleted_flag = 0
- and id = #{id}
- </select>
- </mapper>
|