Commit eb00c8a5 authored by hezhen's avatar hezhen

123

parent dcddf3c7
......@@ -3,7 +3,6 @@
<mapper namespace="com.xxfc.platform.vehicle.mapper.CompanyBaseMapper" >
<select id="getList" parameterType="com.xxfc.platform.vehicle.pojo.vo.CompanyVo" resultType="com.xxfc.platform.vehicle.pojo.vo.CompanyVo">
SELECT
c.id as companyId,
c.`name` as companyName,
c.addr_detail as addrDetail,
......@@ -16,14 +15,14 @@
c.longitude,
c.vehice_service_phone as vehiceServicePhone,
c.tour_service_phone as tourServicePhone,
c.zone_id as zoneId,
b.zone_id as zoneId,
a.name as zoneName,
c.addr_province as addrProvince,
c.province_name as provinceName,
c.addr_city as addrCity,
c.city_name as cityName,
c.addr_town as addrTown,
c.town_name as townName,
b.addr_province as addrProvince,
b.province_name as provinceName,
b.addr_city as addrCity,
b.city_name as cityName,
b.addr_town as addrTown,
b.town_name as townName,
b.cover,
b.id,
b.`name`,
......@@ -34,25 +33,25 @@
r.total,
r.type,
r.price
FROM branch_company c
LEFT JOIN company_base b ON c.company_base_id=b.id
LEFT JOIN branch_company_stock_info_right r ON c.company_base_id=r.company_base_id
LEFT JOIN area a ON c.zone_id=a.id
FROM company_base b
LEFT JOIN branch_company c ON c.company_base_id=b.id
LEFT JOIN branch_company_stock_info_right r ON b.id=r.company_base_id
LEFT JOIN area a ON b.zone_id=a.id
<where>
b.is_del=0
<if test="zoneId != null and zoneId !='' ">
and c.zone_id = #{zoneId}
and b.zone_id = #{zoneId}
</if>
<if test="addrProvince != null and addrProvince != ''">
and c.addr_province =#{addrProvince}
and b.addr_province =#{addrProvince}
</if>
<if test="addrCity != null and addrCity != ''">
and c.addr_city =#{addrCity}
and b.addr_city =#{addrCity}
</if>
<if test="name != null and name != ''">
and b.`name` like CONCAT('%',#{name},'%')
and (b.`name` like CONCAT('%',#{name},'%') or c.`name` like CONCAT('%',#{name},'%') )
</if>
</where>
order by c.id desc
order by b.id desc
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment