|
jeecg中的通知公告模块,删除通知时,在controller和service层代码中同时实现了通知公告信息的删除功能,谁知道是什么原因吗?????????????????????
controller层:
if("2".equals(tSNotice.getNoticeLevel())){
String sql = "delete from t_s_notice_authority_role where notice_id = '"+tSNotice.getId()+"'";
systemService.executeSql(sql);
}else if("3".equals(tSNotice.getNoticeLevel())){
String sql = "delete from t_s_notice_authority_user where notice_id = '"+tSNotice.getId()+"'";
systemService.executeSql(sql);
}
String sql = "delete from t_s_notice_read_user where notice_id = '"+tSNotice.getId()+"'";
systemService.executeSql(sql);
noticeService.delete(tSNotice);service层:
@Override
public <T> void delete(T entity) {
TSNotice notice = (TSNotice)entity;
super.deleteAllEntitie(super.findByProperty(TSNoticeReadUser.class, "noticeId", notice.getId()));
super.deleteAllEntitie(super.findByProperty(TSNoticeAuthorityUser.class, "noticeId", notice.getId()));
super.deleteAllEntitie(super.findByProperty(TSNoticeAuthorityRole.class, "noticeId", notice.getId()));
super.delete(notice);
//执行删除操作配置的sql增强
this.doDelSql(notice);
}
一脸懵逼心茫然啊,求道友解惑!!!!
|
|