Commit 3ff5cd8f authored by jiaorz's avatar jiaorz

网关日志限制修改

parent f223f6f3
......@@ -158,10 +158,21 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
return RestResponse.suc();
}
}
if(vehicleBookRecordQueryVo.getLiftCompany() != null) {
if(companyList.contains(vehicleBookRecordQueryVo.getLiftCompany())) { //如果权限中有这个公司就允许查询, 否则就直接返回空
companyList.clear();
companyList.add(vehicleBookRecordQueryVo.getLiftCompany());
} else {
return RestResponse.suc();
}
}
} else {
if(vehicleBookRecordQueryVo.getCompanyId() != null) {
companyList.add(vehicleBookRecordQueryVo.getCompanyId());
}
if(vehicleBookRecordQueryVo.getLiftCompany() != null) {
companyList.add(vehicleBookRecordQueryVo.getLiftCompany());
}
}
vehicleBookRecordQueryVo.setCompanyIds(companyList);
Query query = new Query(vehicleBookRecordQueryVo);
......
......@@ -425,11 +425,14 @@
and v1.book_type = #{bookType}
</if>
<if test="companyIds != null and companyIds.size > 0">
and v1.lift_company in
and (v1.lift_company in
<foreach collection="companyIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
or v1.ret_company in
<foreach collection="companyIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>)
</if>
and v1.status between 1 and 2 and v1.book_user != -2
</where>
......
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