Commit 492cf855 authored by lixiaolei's avatar lixiaolei

submit

parent 4ec84a92
...@@ -76,8 +76,8 @@ public interface BusinessInfoMapper extends BaseMapper<BusinessInfo> ...@@ -76,8 +76,8 @@ public interface BusinessInfoMapper extends BaseMapper<BusinessInfo>
public int deleteBusinessInfoById(Long id); public int deleteBusinessInfoById(Long id);
/** /**
* 批量删除项目详情 * 批量删除项目
* * 项目关联的其他所有表数据一并删除
* @param ids 需要删除的数据主键集合 * @param ids 需要删除的数据主键集合
* @return 结果 * @return 结果
*/ */
......
...@@ -228,15 +228,17 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -228,15 +228,17 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
} }
/** /**
* 批量删除项目详情 * 批量删除项目
* * 项目关联的其他所有表数据一并删除
* @param ids 需要删除的项目详情主键 * @param ids 需要删除的项目详情主键
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional
public int deleteBusinessInfoByIds(Long[] ids) { public int deleteBusinessInfoByIds(Long[] ids) {
//删除项目详情,用户关联项目,项目工作代办,项目联系人,项目跟进记录,项目标签,项目相关企业
return businessInfoMapper.deleteBusinessInfoByIds(ids); return businessInfoMapper.deleteBusinessInfoByIds(ids);
//TODO 删除项目上传的文件
} }
/** /**
......
...@@ -373,7 +373,15 @@ ...@@ -373,7 +373,15 @@
</delete> </delete>
<delete id="deleteBusinessInfoByIds" parameterType="Long"> <delete id="deleteBusinessInfoByIds" parameterType="Long">
delete from business_info where id in delete i,b,co,f,l,r,u
from business_info i
left join business_backlog b on b.business_id = i.id
left join business_contacts co on co.business_id = i.id
left join business_follow_record f on f.business_id = i.id
left join business_label l on l.business_id = i.id
left join business_relate_company r on r.business_id = i.id
left join business_user u on u.business_id = i.id
where i.id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment