<?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 >= STR_TO_DATE(#{businessOpportunityDto.entryDateStart}, '%Y-%m-%d')
|
</if>
|
<if test="businessOpportunityDto.entryDateEnd != null">
|
and bo.entry_date <= STR_TO_DATE(#{businessOpportunityDto.entryDateEnd}, '%Y-%m-%d')
|
</if>
|
</where>
|
order by bo.entry_date desc
|
</select>
|
|
</mapper>
|