Commit f2b741b4 authored by hanfeng's avatar hanfeng

修改峰会列表

parent c33b9ac0
...@@ -137,4 +137,19 @@ public class ActivityBiz extends BaseBiz<ActivityMapper, Activity> { ...@@ -137,4 +137,19 @@ public class ActivityBiz extends BaseBiz<ActivityMapper, Activity> {
params.put("id",id); params.put("id",id);
return params; return params;
} }
@Transactional(rollbackFor = Exception.class)
public boolean remove(Integer id) {
try {
Activity activity = new Activity();
activity.setId(id);
activity.setIsDel(1);
updateSelectiveById(activity);
return true;
} catch (Exception e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
e.printStackTrace();
return false;
}
}
} }
...@@ -68,4 +68,13 @@ public class ActivityController extends BaseController<ActivityBiz, Activity> { ...@@ -68,4 +68,13 @@ public class ActivityController extends BaseController<ActivityBiz, Activity> {
return ObjectRestResponse.createDefaultFail(); return ObjectRestResponse.createDefaultFail();
} }
@PutMapping("/remove/id")
@ApiOperation(value = "删除",notes = "删除")
public ObjectRestResponse remove(@PathVariable Integer id ){
if (baseBiz.remove(id)) {
return ObjectRestResponse.succ();
}
return ObjectRestResponse.createDefaultFail();
}
} }
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