|
@@ -402,7 +402,6 @@ public class CaseLogicImpl implements CaseLogic {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public CaseExtendsVO delete(Long caseExtendsId) {
|
|
public CaseExtendsVO delete(Long caseExtendsId) {
|
|
- Long userId = (Long) SecurityUtils.getSubject().getSession().getAttribute("userId");
|
|
|
|
CaseExtends caseExtends = caseService.getCaseExtendsById(caseExtendsId);
|
|
CaseExtends caseExtends = caseService.getCaseExtendsById(caseExtendsId);
|
|
if (caseExtends == null) {
|
|
if (caseExtends == null) {
|
|
throw new IllegalArgumentException("Cannot find the caseExtends");
|
|
throw new IllegalArgumentException("Cannot find the caseExtends");
|
|
@@ -412,9 +411,9 @@ public class CaseLogicImpl implements CaseLogic {
|
|
throw new IllegalArgumentException("Cannot delete the public case");
|
|
throw new IllegalArgumentException("Cannot delete the public case");
|
|
}
|
|
}
|
|
// 判断是否是case的创建者
|
|
// 判断是否是case的创建者
|
|
- if (!caseExtends.getOwnerId().equals(userId)){
|
|
|
|
- throw new IllegalArgumentException("Cannot delete the private case. Because you are not the owner of this case.");
|
|
|
|
- }
|
|
|
|
|
|
+// if (!caseExtends.getOwnerId().equals(userId)){
|
|
|
|
+// throw new IllegalArgumentException("Cannot delete the private case. Because you are not the owner of this case.");
|
|
|
|
+// }
|
|
// 判断是否已删除
|
|
// 判断是否已删除
|
|
if (caseExtends.getDeleted() == true){
|
|
if (caseExtends.getDeleted() == true){
|
|
throw new IllegalArgumentException("The case is deleted");
|
|
throw new IllegalArgumentException("The case is deleted");
|