|
@@ -76,10 +76,15 @@ public class TECompareobjectController extends BaseController
|
|
|
@RequiresPermissions("system.base:compareobject:add")
|
|
|
@Log(title = "对照-对象", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody TECompareobject tECompareobject)
|
|
|
- {
|
|
|
- return toAjax(tECompareobjectService.insertTECompareobject(tECompareobject));
|
|
|
-
|
|
|
+ public AjaxResult add(@RequestBody TECompareobject tECompareobject) {
|
|
|
+ int result = tECompareobjectService.insertTECompareobject(tECompareobject);
|
|
|
+ if (result > 0) {
|
|
|
+ // 获取新增数据的 ID,可以从插入的对象中获取
|
|
|
+ String id = tECompareobject.getId();
|
|
|
+ return AjaxResult.success("新增成功", id);
|
|
|
+ } else {
|
|
|
+ return AjaxResult.error("新增失败");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|