liyong
2026-05-15 0578c6c76f13e367b5dc7d0882efe3c69ca4cb0e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?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.ruoyi.basic.mapper.BusinessOpportunityMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.basic.pojo.BusinessOpportunity">
        <id column="id" property="id" />
        <result column="status" property="status" />
        <result column="province" property="province" />
        <result column="city" property="city" />
        <result column="customer_name" property="customerName" />
        <result column="business_source" property="businessSource" />
        <result column="entry_date" property="entryDate" />
        <result column="entry_person" property="entryPerson" />
        <result column="tenant_id" property="tenantId" />
        <result column="create_user" property="createUser" />
        <result column="create_time" property="createTime" />
        <result column="update_user" property="updateUser" />
        <result column="update_time" property="updateTime" />
        <result column="information_state" property="informationState" />
        <result column="main_business_revenue" property="mainBusinessRevenue" />
        <result column="main_products" property="mainProducts" />
        <result column="customer_scale" property="customerScale" />
        <result column="industry" property="industry" />
        <result column="contract_amount" property="contractAmount" />
        <result column="payment_description" property="paymentDescription" />
        <result column="ren_content" property="renContent" />
    </resultMap>
    <select id="listPage" resultType="com.ruoyi.basic.dto.BusinessOpportunityDto">
        select * from
        business_opportunity bo
        <where>
            <if test="businessOpportunityDto.customerName != null">
                and bo.customer_name like concat('%',#{businessOpportunityDto.customerName},'%')
            </if>
            <if test="businessOpportunityDto.city != null">
                and bo.city like concat('%',#{businessOpportunityDto.city},'%')
            </if>
            <if test="businessOpportunityDto.entryPerson != null">
                and bo.entry_person like concat('%', #{businessOpportunityDto.entryPerson},'%')
            </if>
            <if test="businessOpportunityDto.status != null">
                and bo.status = #{businessOpportunityDto.status}
            </if>
            <if test="businessOpportunityDto.customerName != null">
                and bo.customer_name like concat('%',#{businessOpportunityDto.customerName},'%')
            </if>
            <if test="businessOpportunityDto.entryDateStart != null">
                and bo.entry_date &gt;= STR_TO_DATE(#{businessOpportunityDto.entryDateStart}, '%Y-%m-%d')
            </if>
            <if test="businessOpportunityDto.entryDateEnd != null">
                and bo.entry_date &lt;= STR_TO_DATE(#{businessOpportunityDto.entryDateEnd}, '%Y-%m-%d')
            </if>
        </where>
        order by bo.entry_date desc
    </select>
 
</mapper>