diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java index 57f03ffc..9d11e677 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java @@ -118,6 +118,9 @@ public class OrderDetailController extends BaseController { @ResponseBody public TableDataInfo list(OrderDetail orderDetail) { startPage(); + if(this.getSysUser().getDept().getParentId() != 101){ + orderDetail.setDeptId(this.getSysUser().getDept().getParentId()); + } List orderDetails = orderDetailService.selectOrderDetailList(orderDetail); Set customerIds = orderDetails.stream().map(OrderDetail::getCustomerId).collect(Collectors.toSet()); diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerCertificationController.java b/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerCertificationController.java index 2e8d62de..e5c60d1b 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerCertificationController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/worker/WorkerCertificationController.java @@ -81,6 +81,9 @@ public class WorkerCertificationController extends BaseController public TableDataInfo list(WorkerCertification workerCertification) { startPage(); + if(this.getSysUser().getDept().getParentId() != 101){ + workerCertification.setDeptId(this.getSysUser().getDept().getParentId()); + } List list = workerCertificationService.selectWorkerCertificationList(workerCertification); return getDataTable(list); } diff --git a/ghy-order/src/main/resources/mapper/order/OrderDetailMapper.xml b/ghy-order/src/main/resources/mapper/order/OrderDetailMapper.xml index 282fd4e7..c15acfed 100644 --- a/ghy-order/src/main/resources/mapper/order/OrderDetailMapper.xml +++ b/ghy-order/src/main/resources/mapper/order/OrderDetailMapper.xml @@ -96,11 +96,15 @@ LEFT JOIN order_master om ON om.id = od.order_master_id LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id LEFT JOIN goods g ON g.goods_id = om.goods_id + left join worker w on od.worker_id = w.worker_id - + select worker_certification.* from worker_certification left join worker on worker_certification.worker_id = worker.worker_id - and worker_id = #{workerId} - and name like concat('%', #{name}, '%') - and id_card_num = #{idCardNum} - and id_card_url_1 = #{idCardUrl1} - and id_card_url_2 = #{idCardUrl2} - and brand_name like concat('%', #{brandName}, '%') - and company_size = #{companySize} - and company_name like concat('%', #{companyName}, '%') - and business_license_num = #{businessLicenseNum} - and business_license_url = #{businessLicenseUrl} - and company_province_id = #{companyProvinceId} - and company_city_id = #{companyCityId} - and company_country_id = #{companyCountryId} - and company_address = #{companyAddress} - and legal_persion_name like concat('%', #{legalPersionName}, '%') - and legal_persion_phone_num = #{legalPersionPhoneNum} - and other_serv = #{otherServ} - and status = #{status} + and worker_certification.worker_id = #{workerId} + and worker_certification.name like concat('%', #{name}, '%') + and worker_certification.id_card_num = #{idCardNum} + and worker_certification.id_card_url_1 = #{idCardUrl1} + and worker_certification.id_card_url_2 = #{idCardUrl2} + and worker_certification.brand_name like concat('%', #{brandName}, '%') + and worker_certification.company_size = #{companySize} + and worker_certification.company_name like concat('%', #{companyName}, '%') + and worker_certification.business_license_num = #{businessLicenseNum} + and worker_certification.business_license_url = #{businessLicenseUrl} + and worker_certification.company_province_id = #{companyProvinceId} + and worker_certification.company_city_id = #{companyCityId} + and worker_certification.company_country_id = #{companyCountryId} + and worker_certification.company_address = #{companyAddress} + and worker_certification.legal_persion_name like concat('%', #{legalPersionName}, '%') + and worker_certification.legal_persion_phone_num = #{legalPersionPhoneNum} + and worker_certification.other_serv = #{otherServ} + and worker_certification.status = #{status} + and worker.dept_id = #{deptId}