Commit 3ff5cd8f authored by jiaorz's avatar jiaorz

网关日志限制修改

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