gongdecai 3 yıl önce
ebeveyn
işleme
d885d48686

+ 9 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java

@@ -224,6 +224,15 @@ public class CommonUserController {
     public List<CommonCompany> getComp() {
         return commonUserService.getComp();
     }
+    /**
+     * 公司
+     *
+     * @return
+     */
+    @GetMapping("/getCompOwn")
+    public List<CommonCompany> getCompOwn(String phone) {
+        return commonUserService.getCompOwn(phone);
+    }
 
     /**
      * 次要职务

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonUserService.java

@@ -86,4 +86,6 @@ public interface ICommonUserService extends IService<CommonUser> {
     String saveRole(CommonStaffRole commonStaffRole);
 
     List<CommonCompany> getComp();
+
+    List<CommonCompany> getCompOwn(String phone);
 }

+ 19 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java

@@ -284,6 +284,25 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         return commonCompanyService.selectList(new EntityWrapper<CommonCompany>().eq("delete_flag","0"));
     }
 
+    /**
+     * 修改用户信息
+     *
+     * @return
+     */
+    @Override
+    public List<CommonCompany> getCompOwn(String phone)  {
+        List<CommonStaff> staffs = commonStaffService.selectList(new EntityWrapper<CommonStaff>()
+        .eq("staff_mobile_phone",phone));
+        List<CommonCompany> commonCompanyList = new ArrayList<>();
+        if(!CollectionUtils.isEmpty(staffs)){
+            for(int i=0;i<staffs.size();i++) {
+                commonCompanyList.add(commonCompanyService.selectById(staffs.get(i).getCompId()));
+            }
+        }
+        return commonCompanyList;
+    }
+
+
 
     /**
      * 发送验证码