提交 49adcd04 作者: zhenjie

账号删除-单位连同删除

上级 a227dfa0
...@@ -199,4 +199,6 @@ public interface CompanyDao { ...@@ -199,4 +199,6 @@ public interface CompanyDao {
void unbindingAllPcUsers(Integer id); void unbindingAllPcUsers(Integer id);
List<CompanyInfoDO> listCompanyInfoByIds(@Param("ids") List<Integer> ids); List<CompanyInfoDO> listCompanyInfoByIds(@Param("ids") List<Integer> ids);
void deleteCompanyInfoById(Integer id);
} }
...@@ -166,4 +166,6 @@ public interface CompanyService { ...@@ -166,4 +166,6 @@ public interface CompanyService {
List<CompanyInfoVO> listCompanyInfoByIds(List<Integer> ids); List<CompanyInfoVO> listCompanyInfoByIds(List<Integer> ids);
List<CompanyInfoVO> listCompanyInfoByBUIds(List<Integer> backUserAccountIds); List<CompanyInfoVO> listCompanyInfoByBUIds(List<Integer> backUserAccountIds);
void deleteCompanyInfoById(Integer id);
} }
...@@ -162,6 +162,7 @@ public class BackUserAccountServiceImpl implements BackUserAccountService { ...@@ -162,6 +162,7 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
if (companyInfoVO != null && companyInfoVO.getCompanyType().equals(CompanyTypeEnums.FRANCHISEE.getType())) { if (companyInfoVO != null && companyInfoVO.getCompanyType().equals(CompanyTypeEnums.FRANCHISEE.getType())) {
// 加盟企业的账号,需要把对应的成员和后台账号解绑 // 加盟企业的账号,需要把对应的成员和后台账号解绑
companyService.unbindingAllUsers(companyInfoVO.getId()); companyService.unbindingAllUsers(companyInfoVO.getId());
companyService.deleteCompanyInfoById(companyInfoVO.getId());
} }
String accountNo = "DISABLE_" + backUserAccountDO.getAccountNo() + RandomStringUtils.randomAlphanumeric(3); String accountNo = "DISABLE_" + backUserAccountDO.getAccountNo() + RandomStringUtils.randomAlphanumeric(3);
backUserAccountDao.disableBackUserAccountDO(accountId, accountNo); backUserAccountDao.disableBackUserAccountDO(accountId, accountNo);
......
...@@ -254,4 +254,9 @@ public class CompanyServiceImpl implements CompanyService { ...@@ -254,4 +254,9 @@ public class CompanyServiceImpl implements CompanyService {
List<CompanyInfoVO> companyInfoVOS = companyInfoDOS.stream().map(CompanyInfoDO::buildCompanyInfoVO).collect(Collectors.toList()); List<CompanyInfoVO> companyInfoVOS = companyInfoDOS.stream().map(CompanyInfoDO::buildCompanyInfoVO).collect(Collectors.toList());
return companyInfoVOS; return companyInfoVOS;
} }
@Override
public void deleteCompanyInfoById(Integer id) {
companyDao.deleteCompanyInfoById(id);
}
} }
...@@ -110,6 +110,10 @@ ...@@ -110,6 +110,10 @@
delete from company_back_user where company_info_id = #{companyInfoId} delete from company_back_user where company_info_id = #{companyInfoId}
</delete> </delete>
<delete id="deleteCompanyInfoById">
delete from company_info where id = #{id}
</delete>
<select id="getCompanyInfoById" resultType="com.mmc.iuav.user.entity.CompanyInfoDO"> <select id="getCompanyInfoById" resultType="com.mmc.iuav.user.entity.CompanyInfoDO">
select id, company_type, company_name, full_name, province, city, district, address, company_user_name, select id, company_type, company_name, full_name, province, city, district, address, company_user_name,
phone_num, remark, create_time, lon, lat, credit_code, license_img, brand_name, brand_logo,content, score, back_img phone_num, remark, create_time, lon, lat, credit_code, license_img, brand_name, brand_logo,content, score, back_img
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论