瀏覽代碼

合作伙伴查询所有业务

lzm 2 年之前
父節點
當前提交
df2803d362
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessController.java

+ 7 - 1
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessController.java

@@ -13,6 +13,8 @@ import com.pj.project.tb_business_car.TbBusinessCar;
 import com.pj.project.tb_business_car.TbBusinessCarService;
 import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project.tb_business_item.TbBusinessItemService;
+import com.pj.project.tb_costomer.TbCostomer;
+import com.pj.project.tb_costomer.TbCostomerService;
 import com.pj.project.tb_declare.TbDeclareService;
 import com.pj.project.tb_item.TbItem;
 import com.pj.project.tb_notices.TbNoticesService;
@@ -51,6 +53,8 @@ public class TbBusinessController {
     private TbBusinessCarService tbBusinessCarService;
     @Resource
     private TbDeclareService tbDeclareService;
+    @Resource
+    private TbCostomerService tbCostomerService;
 
 
     @RequestMapping(value = "getMsg")
@@ -188,7 +192,9 @@ public class TbBusinessController {
     public AjaxJson getOtherBusiness() {
         SoMap so = SoMap.getRequestSoMap();
         String currentCustomerId = StpUserUtil.getCustomerId();
-        if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
+        TbCostomer currentCustomer = tbCostomerService.getById(currentCustomerId);
+        if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())
+                && currentCustomer.getType().equals(TbCostomer.CustomerEnum.BUSINESS_TYPE.getType())) {
             so.put("createByCustomerId", currentCustomerId);
         }
         List<TbBusiness> list = tbBusinessService.getList(so.startPage());