|
@@ -13,6 +13,7 @@ import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.company.domain.*;
|
|
|
import com.fs.company.mapper.*;
|
|
|
import com.fs.company.param.CompanyParam;
|
|
|
+import com.fs.company.service.ICompanyMiniappService;
|
|
|
import com.fs.company.service.ICompanyProfitService;
|
|
|
import com.fs.company.service.ICompanyRoleService;
|
|
|
import com.fs.company.vo.CompanyCrmVO;
|
|
@@ -54,6 +55,8 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
@Autowired
|
|
|
private CompanyMapper companyMapper;
|
|
|
@Autowired
|
|
|
+ private ICompanyMiniappService companyMiniappService;
|
|
|
+ @Autowired
|
|
|
private CompanyDeptMapper deptMapper;
|
|
|
@Autowired
|
|
|
private ICompanyRoleService roleService;
|
|
@@ -232,7 +235,7 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
userPostMapper.insertCompanyUserPost(userPost);
|
|
|
company.setUserId(user.getUserId());
|
|
|
companyMapper.updateCompany(company);
|
|
|
-
|
|
|
+ bindMiniApp(company);
|
|
|
return R.ok();
|
|
|
}
|
|
|
else
|
|
@@ -251,8 +254,22 @@ public class CompanyServiceImpl implements ICompanyService
|
|
|
public int updateCompany(Company company)
|
|
|
{
|
|
|
company.setUpdateTime(DateUtils.getNowDate());
|
|
|
+ bindMiniApp(company);
|
|
|
return companyMapper.updateCompany(company);
|
|
|
}
|
|
|
+ // 绑定小程序
|
|
|
+ public void bindMiniApp(Company company){
|
|
|
+ companyMiniappService.removeByCompanyId(company.getCompanyId());
|
|
|
+ List<String> miniAppMaster = company.getMiniAppMaster();
|
|
|
+ if(miniAppMaster != null && !miniAppMaster.isEmpty()){
|
|
|
+ companyMiniappService.insertBatch(miniAppMaster, company.getCompanyId(), 0);
|
|
|
+ }
|
|
|
+ List<String> miniAppServer = company.getMiniAppServer();
|
|
|
+ if(miniAppServer != null && !miniAppServer.isEmpty()){
|
|
|
+ companyMiniappService.insertBatch(miniAppServer, company.getCompanyId(), 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 批量删除企业
|