Commit 781c6c53 by levphon

bug修复或预防

1 parent ad9fae69
...@@ -5,6 +5,7 @@ import cn.com.glsx.admin.modules.model.*; ...@@ -5,6 +5,7 @@ import cn.com.glsx.admin.modules.model.*;
import cn.com.glsx.admin.modules.model.export.*; import cn.com.glsx.admin.modules.model.export.*;
import cn.com.glsx.admin.modules.model.param.*; import cn.com.glsx.admin.modules.model.param.*;
import com.glsx.plat.common.annotation.DataPerm; import com.glsx.plat.common.annotation.DataPerm;
import com.glsx.plat.common.annotation.DataPermShare;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper; import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -79,6 +80,7 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> { ...@@ -79,6 +80,7 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
* @param search * @param search
* @return * @return
*/ */
@DataPermShare
@DataPerm(showSql = true) @DataPerm(showSql = true)
List<VehicleInfoPageDTO> searchVehicleInfo(VehicleInfoSearch search); List<VehicleInfoPageDTO> searchVehicleInfo(VehicleInfoSearch search);
......
...@@ -307,7 +307,7 @@ ...@@ -307,7 +307,7 @@
tv.workorder_id , tv.workorder_id ,
tv.owner_name , tv.owner_name ,
tv.vin , tv.vin ,
td.sn , tvd.sn ,
td.source , td.source ,
case when tv.type_id is null then tv.model_name else case when tv.type_id is null then tv.model_name else
concat(tv.sub_brand_name,'/',tv.series_name,'/',tv.type_name) end modelName, concat(tv.sub_brand_name,'/',tv.series_name,'/',tv.type_name) end modelName,
...@@ -317,18 +317,17 @@ ...@@ -317,18 +317,17 @@
ddf.`status` AS freqStatus ddf.`status` AS freqStatus
from t_vehicle tv from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn = tvd.sn left join t_device td on td.sn = tvd.sn and td.del_flag = 0
left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf
on ddf.vehicle_id = tv.id and ddf.sn = td.sn on ddf.vehicle_id = tv.id and ddf.sn = td.sn
where tv.del_flag = 0 where tv.del_flag = 0
and tvd.bind_status = 1 and tvd.bind_status = 1
and tvd.del_flag = 0 and tvd.del_flag = 0
and td.del_flag = 0
<if test="keywords != null and keywords !=''"> <if test="keywords != null and keywords !=''">
and( and(
tv.owner_name like '%${keywords}%' tv.owner_name like '%${keywords}%'
or tv.vin like '%${keywords}%' or tv.vin like '%${keywords}%'
or td.sn like '%${keywords}%' or tvd.sn like '%${keywords}%'
or tv.model_name like '%${keywords}%' or tv.model_name like '%${keywords}%'
) )
</if> </if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!