| | |
| | | .setStatus(ViewStatus.edit) |
| | | .setEmptyData(true) |
| | | .insert(); |
| | | |
| | | viewService.getMappingTableName(sysView); |
| | | return Result.success(sysView); |
| | | } |
| | |
| | | |
| | | for (String subField: subFieldList) { |
| | | String changeFieldName = viewService.changeFieldName(joinMaintain.getTableName(), subField); |
| | | logicService.delete(new EntityWrapper<SysViewLogic>() |
| | | logicmapService.delete(new EntityWrapper<SysViewLogicmap>() |
| | | .eq(Constant.PARENT_ID, sysView.getId()) |
| | | .eq(Constant.FIELD, changeFieldName) |
| | | ); |
| | |
| | | if (StringUtils.isEmpty(view.getMenuId()) || StringUtils.isEmpty(view.getBaseMaintain()) ) { |
| | | return Result.error(CodeMsg.ERROR_PARAMS_NOT_MATHED); |
| | | } |
| | | if (StringUtils.isEmpty(view.getViewTableName())) { |
| | | viewService.getViewTableName(view); |
| | | } |
| | | List<SysViewLogicmap> logicmapList = view.getLogicmapList(); |
| | | |
| | | logicmapService.delete(new EntityWrapper<SysViewLogicmap>().eq(Constant.PARENT_ID, view.getId())); |
| | | |
| | | for (SysViewLogicmap logicmap : logicmapList) { |
| | | logicmap.setId(DbUtils.getUUID()).setParentId(view.getId()).insert(); |
| | | if (logicmapList != null) { |
| | | for (SysViewLogicmap logicmap : logicmapList) { |
| | | logicmap.setId(DbUtils.getUUID()).setParentId(view.getId()).insert(); |
| | | } |
| | | } |
| | | |
| | | view.setEmptyData(false).setStatus(ViewStatus.edit); |
| | | //delete |
| | | sysViewJoinService.delete(new EntityWrapper<SysViewJoin>().eq(Constant.PARENT_ID, view.getId())); |