diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/basedata/common/controller/TableNameDataController.java b/sparchetype/src/main/java/com/songpeng/sparchetype/basedata/common/controller/TableNameDataController.java index 11f58c3..2e59048 100644 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/basedata/common/controller/TableNameDataController.java +++ b/sparchetype/src/main/java/com/songpeng/sparchetype/basedata/common/controller/TableNameDataController.java @@ -20,7 +20,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; import java.util.List; import java.util.Map; @@ -32,7 +31,7 @@ import java.util.Map; */ @Controller @RequestMapping("basedata/common") -public class TableNameDataController extends BaseController { +public class TableNameDataController extends BaseController { /** * 通用基础数据service */ @@ -87,13 +86,11 @@ public class TableNameDataController extends BaseController { @ResponseBody public Result addOrUpdate(HttpServletRequest request) throws Exception { String id = request.getParameter("id"); - SysUser user =getSysUser(); + SysUser user = getSysUser(); if (StringUtils.isNotEmpty(id)) { - //TODO 修改当前数据 - tableNameDataService.commonUpdate(request,user); + tableNameDataService.commonUpdate(request, user); } else { - //TODO 新增当前表数据 - tableNameDataService.commonSave(request,user); + tableNameDataService.commonSave(request, user); } return Result.success(); } diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/basedata/common/service/impl/TableNameDataServiceImpl.java b/sparchetype/src/main/java/com/songpeng/sparchetype/basedata/common/service/impl/TableNameDataServiceImpl.java index f0cffb2..71bfa39 100644 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/basedata/common/service/impl/TableNameDataServiceImpl.java +++ b/sparchetype/src/main/java/com/songpeng/sparchetype/basedata/common/service/impl/TableNameDataServiceImpl.java @@ -69,8 +69,7 @@ public class TableNameDataServiceImpl implements TableNameDataService { */ @Override public String buildCol(String tableNameId) throws Exception { - if(StringUtils.isEmpty(tableNameId)) - { + if (StringUtils.isEmpty(tableNameId)) { throw new Exception("表关联ID不能为空"); } List spTableManagerItems = iSpTableManagerItemService.queryItemBytableNameId(tableNameId); @@ -91,7 +90,6 @@ public class TableNameDataServiceImpl implements TableNameDataService { @Override public void commonSave(HttpServletRequest request, SysUser user) throws Exception { CommonDto commonDto = new CommonDto(); - //拼接插入的SQL语句 String jsTableName = request.getParameter("jsTableName"); String jsTableNameId = request.getParameter("jsTableNameId");