2023年6月29日 添加假删除(课堂)
This commit is contained in:
parent
6d3a257f2c
commit
6739a2d689
|
@ -15,6 +15,7 @@ import cn.hutool.core.date.DateField;
|
||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.common.api.CommonAPI;
|
import org.jeecg.common.api.CommonAPI;
|
||||||
|
@ -149,7 +150,11 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
||||||
// @RequiresPermissions("ktgl:kc_ketangbiao:delete")
|
// @RequiresPermissions("ktgl:kc_ketangbiao:delete")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
kcKetangbiaoService.removeById(id);
|
UpdateWrapper<KcKetangbiao> uw = new UpdateWrapper<>();
|
||||||
|
uw.set("is_delete",1);
|
||||||
|
uw.eq("id",id);
|
||||||
|
// kcKetangbiaoService.removeById(id);
|
||||||
|
kcKetangbiaoService.update(uw);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +169,12 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
||||||
// @RequiresPermissions("ktgl:kc_ketangbiao:deleteBatch")
|
// @RequiresPermissions("ktgl:kc_ketangbiao:deleteBatch")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
this.kcKetangbiaoService.removeByIds(Arrays.asList(ids.split(",")));
|
// this.kcKetangbiaoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
UpdateWrapper<KcKetangbiao> uw = new UpdateWrapper<>();
|
||||||
|
uw.set("is_delete",1);
|
||||||
|
uw.in("id",Arrays.asList(ids.split(",")));
|
||||||
|
// kcKetangbiaoService.removeById(id);
|
||||||
|
kcKetangbiaoService.update(uw);
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -242,6 +242,12 @@ public class KcKetangbiao implements Serializable {
|
||||||
@Excel(name = "状态", width = 15)
|
@Excel(name = "状态", width = 15)
|
||||||
@ApiModelProperty(value = "状态")
|
@ApiModelProperty(value = "状态")
|
||||||
private java.lang.String zt;
|
private java.lang.String zt;
|
||||||
|
/**是否删除(0:未删除,1:已删除)*/
|
||||||
|
@Excel(name = "是否删除(0:未删除,1:已删除)", width = 15)
|
||||||
|
@ApiModelProperty(value = "是否删除(0:未删除,1:已删除)")
|
||||||
|
private java.lang.Integer isDelete;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String jssj;
|
private String jssj;
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
left join xxhbjxljbxx jxljbxx on jsjbxx.jxlh = jxljbxx.jzwh
|
left join xxhbjxljbxx jxljbxx on jsjbxx.jxlh = jxljbxx.jzwh
|
||||||
left join kc_jieci jc on ktb.hh = jc.jieci
|
left join kc_jieci jc on ktb.hh = jc.jieci
|
||||||
<where>
|
<where>
|
||||||
|
and ktb.is_delete = 0
|
||||||
<if test="kcKetangbiao.ywmc!=null and kcKetangbiao.ywmc!=''">
|
<if test="kcKetangbiao.ywmc!=null and kcKetangbiao.ywmc!=''">
|
||||||
and (ktb.skjs like concat('%',#{kcKetangbiao.ywmc},'%') or ktb.kcmc like concat('%',#{kcKetangbiao.ywmc},'%') )
|
and (ktb.skjs like concat('%',#{kcKetangbiao.ywmc},'%') or ktb.kcmc like concat('%',#{kcKetangbiao.ywmc},'%') )
|
||||||
</if>
|
</if>
|
||||||
|
|
Loading…
Reference in New Issue