Commit fa0c5657 authored by jiaorz's avatar jiaorz

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents d3d7466d 3f892d9c
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<mapper namespace="com.xxfc.platform.vehicle.mapper.CompanyBaseMapper" > <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 id="getList" parameterType="com.xxfc.platform.vehicle.pojo.vo.CompanyVo" resultType="com.xxfc.platform.vehicle.pojo.vo.CompanyVo">
SELECT
c.id as companyId, c.id as companyId,
c.`name` as companyName, c.`name` as companyName,
c.addr_detail as addrDetail, c.addr_detail as addrDetail,
...@@ -16,14 +15,14 @@ ...@@ -16,14 +15,14 @@
c.longitude, c.longitude,
c.vehice_service_phone as vehiceServicePhone, c.vehice_service_phone as vehiceServicePhone,
c.tour_service_phone as tourServicePhone, c.tour_service_phone as tourServicePhone,
c.zone_id as zoneId, b.zone_id as zoneId,
a.name as zoneName, a.name as zoneName,
c.addr_province as addrProvince, b.addr_province as addrProvince,
c.province_name as provinceName, b.province_name as provinceName,
c.addr_city as addrCity, b.addr_city as addrCity,
c.city_name as cityName, b.city_name as cityName,
c.addr_town as addrTown, b.addr_town as addrTown,
c.town_name as townName, b.town_name as townName,
b.cover, b.cover,
b.id, b.id,
b.`name`, b.`name`,
...@@ -34,25 +33,25 @@ ...@@ -34,25 +33,25 @@
r.total, r.total,
r.type, r.type,
r.price r.price
FROM branch_company c FROM company_base b
LEFT JOIN company_base b ON c.company_base_id=b.id LEFT JOIN branch_company c 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 branch_company_stock_info_right r ON b.id=r.company_base_id
LEFT JOIN area a ON c.zone_id=a.id LEFT JOIN area a ON b.zone_id=a.id
<where> <where>
b.is_del=0 b.is_del=0
<if test="zoneId != null and zoneId !='' "> <if test="zoneId != null and zoneId !='' ">
and c.zone_id = #{zoneId} and b.zone_id = #{zoneId}
</if> </if>
<if test="addrProvince != null and addrProvince != ''"> <if test="addrProvince != null and addrProvince != ''">
and c.addr_province =#{addrProvince} and b.addr_province =#{addrProvince}
</if> </if>
<if test="addrCity != null and addrCity != ''"> <if test="addrCity != null and addrCity != ''">
and c.addr_city =#{addrCity} and b.addr_city =#{addrCity}
</if> </if>
<if test="name != null and name != ''"> <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> </if>
</where> </where>
order by c.id desc order by b.id desc
</select> </select>
</mapper> </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