Commit 4f861848 authored by mengmeng's avatar mengmeng

修改评价反馈删除存在的BUG

parent eba46ee3
......@@ -190,7 +190,6 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
if(item.getRoleId() !=null){
Optional<RoleDTO> roleDTO = Optional.ofNullable(roleService.get(item.getRoleId()));
roleDTO.ifPresent(r-> item.setUserRole(r.getName()));
}
/*
......@@ -207,8 +206,11 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
@Transactional(rollbackFor = Exception.class)
public void delete(Long[] ids) {
Arrays.asList(ids).stream().forEach(id ->{
Long case_id = selectById(id).getCaseId();
baseDao.delete(new QueryWrapper<FhjwCommentEntity>().eq("case_id",case_id));
FhjwCommentEntity entity = selectById(id);
Long case_id = entity.getCaseId();
Long user_id = entity.getUserId();
baseDao.delete(new QueryWrapper<FhjwCommentEntity>().eq("case_id",case_id)
.eq("user_id",user_id));
});
}
......
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