提交 f63f585b 作者: 925993793@qq.com

删除操作改为逻辑删除

上级 20864e65
......@@ -101,6 +101,8 @@ public class ThinktankBasicInfo extends Model<ThinktankBasicInfo> {
private String fundsSource;
//是否展示(1-是;0-否)
private Integer ynDisplay;
//删除状态(1-是;0-否)
private Integer deleteStatus;
public List<String> toList(){
List<String> list = new ArrayList<>();
......
......@@ -141,12 +141,15 @@ public class ThinktankBasicInfoServiceImpl extends ServiceImpl<ThinktankBasicInf
public Result<?> del(String id) {
String[] idArr = id.split(",");
List<String> ids = Arrays.asList(idArr);
boolean b = this.removeByIds(ids);
boolean b = this.update(Wrappers.<ThinktankBasicInfo>lambdaUpdate()
.in(ThinktankBasicInfo::getId, ids)
.set(ThinktankBasicInfo::getDeleteStatus, 1)
.set(ThinktankBasicInfo::getUpdateTime, new Date()));
Result result = Result.OK();
if (!b) {
result.error500("删除失败!");
}
thinktankTagService.delLabel(ids);
//thinktankTagService.delLabel(ids);
return result;
}
......
......@@ -12,7 +12,7 @@
belong_unit_code,belong_unit,head_sculpture,biographical_notes,status,
lang,operate_status,profit_nature,nature,influence_position,staff_size,scale,achievement_type,funds_source,yn_display
from thinktank_basic_info a
where 1 = 1
where a.delete_status = 0
<if test="codeId != null and codeId != ''">
AND a.code_id = #{codeId}
</if>
......@@ -43,7 +43,7 @@
select
count(1)
from thinktank_basic_info a
where 1 = 1
where a.delete_status = 0
<if test="codeId != null and codeId != ''">
AND a.code_id = #{codeId}
</if>
......@@ -78,7 +78,7 @@
on a.id = b.group_id
LEFT JOIN info_source c
on b.source_id = c.id
where 1 = 1
where a.delete_status = 0
<if test="codeId != null and codeId != ''">
AND a.code_id = #{codeId}
</if>
......@@ -112,7 +112,7 @@
a.charge, a.address, a.belong_unit_code,a.lang,a.operate_status,a.profit_nature,a.nature,a.influence_position,
a.staff_size,a.scale,a.achievement_type,a.funds_source,a.yn_display
from thinktank_basic_info a
where 1 = 1
where a.delete_status = 0
<if test="ids != null and ids.size() > 0">
AND a.id in
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论