|
@@ -2,13 +2,20 @@ package com.yh.saas.plugin.yiliangyiyun.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
import com.baomidou.mybatisplus.plugins.Page;
|
|
|
+import com.winsea.svc.base.base.entity.CommonCompany;
|
|
|
+import com.winsea.svc.base.base.entity.CommonStaff;
|
|
|
+import com.winsea.svc.base.base.service.ICommonCompanyService;
|
|
|
+import com.winsea.svc.base.base.service.ICommonStaffService;
|
|
|
import com.yh.saas.common.support.util.IdGenerator;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.OpenServiceInfo;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.OpenServiceInfoMapper;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.service.IOpenServiceInfoService;
|
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -21,7 +28,10 @@ import java.util.List;
|
|
|
*/
|
|
|
@Service
|
|
|
public class OpenServiceInfoServiceImpl extends ServiceImpl<OpenServiceInfoMapper, OpenServiceInfo> implements IOpenServiceInfoService {
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private ICommonStaffService commonStaffService;
|
|
|
+ @Autowired
|
|
|
+ private ICommonCompanyService commonCompanyService;
|
|
|
/**
|
|
|
* 开通业务列表
|
|
|
* @param openServiceInfo
|
|
@@ -51,4 +61,19 @@ public class OpenServiceInfoServiceImpl extends ServiceImpl<OpenServiceInfoMappe
|
|
|
return "NG";
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<CommonCompany> selectCommonCompany(String phone) {
|
|
|
+ List temp=new ArrayList();
|
|
|
+ List<CommonStaff> commonStaffList=commonStaffService.selectList(new EntityWrapper<CommonStaff>()
|
|
|
+ .eq("staff_mobile_phone",phone));
|
|
|
+ if (CollectionUtils.isNotEmpty(commonStaffList)){
|
|
|
+ for (CommonStaff commonStaff:commonStaffList){
|
|
|
+ List<CommonCompany> commonCompanyList=commonCompanyService.selectList(new EntityWrapper<CommonCompany>()
|
|
|
+ .eq("comp_id",commonStaff.getCompId()));
|
|
|
+ temp=commonCompanyList;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return temp;
|
|
|
+ }
|
|
|
}
|