|
|
@@ -54,7 +54,13 @@ public class PtServiceController extends BaseController {
|
|
|
if(ptService.getViewNum() == null){ //viewNum不能为空
|
|
|
ptService.setViewNum(0);
|
|
|
}
|
|
|
- return AjaxResult.success(ptServiceService.save(ptService));
|
|
|
+ boolean save = ptServiceService.save(ptService);
|
|
|
+ if (save){
|
|
|
+ return AjaxResult.success(ptService);
|
|
|
+
|
|
|
+ }else {
|
|
|
+ return AjaxResult.error("添加失败");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@ApiOperation("根据主键删除数据")
|