| | |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/addActUser") |
| | | public Result addActUser(@RequestParam String userId){ |
| | | return identityService.addUser(userId); |
| | | } |
| | | |
| | | @RequestMapping(value = "/addActRole") |
| | | public Result addActRole(@RequestParam String roleId){ |
| | | return identityService.addRole(roleId); |
| | | } |
| | | |
| | | @RequestMapping(value = "/addActUserRole") |
| | | public Result addActUserRole(@RequestParam String roleId, @RequestParam String userId){ |
| | | return identityService.addUserRole(roleId,userId); |
| | | } |
| | | @RequestMapping(value = "/deleteActUserRole") |
| | | public Result deleteActUserRole(@RequestParam String roleId, @RequestParam String userId){ |
| | | return identityService.deleteUserRole(roleId,userId); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deleteActRole") |
| | | public Result deleteActRole(@RequestParam String roleId){ |
| | | return identityService.deleteRole(roleId); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deleteActUser") |
| | | public Result deleteActUser(@RequestParam String userId){ |
| | | return identityService.deleteUser(userId); |
| | | } |
| | | |
| | | } |
| | |
| | | SysAssemble assemble = new SysAssemble();
|
| | | TUser user = (TUser) request.getSession().getAttribute(Constant.USER);
|
| | | assemble.setStatus(SysAssembleStatus.edit).setCreateTime(new Date()).setUserId(user.getUserId()).setUpdateType(SysAssembleUpdateType.All);
|
| | | boolean insert = assemble.setId(DbUtils.getUUID()).insert();
|
| | | boolean insert = assemble.setId(DbUtils.getUUID()).setEmptyData(true).insert();
|
| | | if (insert) {
|
| | | String assembleId = assemble.getId();
|
| | | // 创建job的时候将所有 通用参数搬一份过去
|
| | |
| | | return Result.error(CodeMsg.ERROR_PARAMS_NOT_MATHED);
|
| | | }
|
| | | assemble.setUpdateType(updateType).setUpdateFields(updateFields);
|
| | | assemble.setEmptyData(false);
|
| | | assemble.setBigdata(Boolean.valueOf(bigData));
|
| | | TUser user = (TUser) request.getSession().getAttribute(Constant.USER);
|
| | | boolean insert = assemble.setUserId(user.getUserId()).setMenuId(menuId).setUpdateTime(new Date()).updateById();
|
| | |
| | | import com.highdatas.mdm.service.IFlowsService; |
| | | import com.highdatas.mdm.service.ITUserService; |
| | | import com.sun.tools.javac.jvm.Code; |
| | | import org.activiti.engine.HistoryService; |
| | | import org.activiti.engine.RuntimeService; |
| | | import org.activiti.engine.runtime.ProcessInstance; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | |
| | | IFlowsService flowsService; |
| | | @Autowired |
| | | ITUserService userService; |
| | | @Autowired |
| | | RuntimeService runtimeService; |
| | | @RequestMapping(value = "/{pageno}", method = RequestMethod.GET) |
| | | public Result<Page<Flows>> getAll(@PathVariable int pageno, HttpServletRequest request) { |
| | | String pageSize = request.getParameter("pageSize"); |
| | |
| | | if (flows == null) { |
| | | return Result.error(CodeMsg.ERROR_PARAMS_NOT_MATHED); |
| | | } |
| | | String workflowId = flows.getWorkflowId(); |
| | | ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(workflowId).singleResult(); |
| | | if (processInstance != null) { |
| | | runtimeService.deleteProcessInstance(workflowId,"终止流程"); |
| | | } |
| | | flows.setStatus(ActivitiStatus.close); |
| | | |
| | | flowsService.aduitFinish(flows); |
| | |
| | | continue; |
| | | } |
| | | if (flows.getStatus().equals(ActivitiStatus.working) || flows.getStatus().equals(ActivitiStatus.refuse)) { |
| | | // boolean nextAudit = flowsService.isNextAudit(flows, userId); |
| | | // if (nextAudit) { |
| | | // count++; |
| | | // } |
| | | boolean nextAudit = flowsService.isNextAudit(flows, userId); |
| | | if (nextAudit) { |
| | | count++; |
| | | } |
| | | // count++; |
| | | continue; |
| | | }else if(flows.getStatus().equals(ActivitiStatus.open)){ |
| | | maintain.setMaintainType(1); |
| | |
| | | |
| | | } |
| | | |
| | | @RequestMapping(value = "total/{tableName}", method = RequestMethod.GET) |
| | | public Result getTotalFields(@PathVariable String tableName, HttpServletRequest request){ |
| | | return fieldService.getTotalFields(tableName); |
| | | @RequestMapping(value = "total/{tableName}/{pageNo}", method = RequestMethod.GET) |
| | | public Result getTotalFields(@PathVariable String tableName,@PathVariable Integer pageNo, HttpServletRequest request){ |
| | | String pageSize = request.getParameter("pageSize"); |
| | | if(StringUtils.isEmpty(pageSize)){ |
| | | return fieldService.getTotalFields(tableName, pageNo, 15); |
| | | }else { |
| | | return fieldService.getTotalFields(tableName, pageNo, Integer.valueOf(pageSize)); |
| | | } |
| | | |
| | | } |
| | | |
| | | @RequestMapping(value = "fix/{tableName}", method = RequestMethod.GET) |
| | |
| | | data.fluentPut("aduit", true); |
| | | return totalFields; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/menu/{id}", method = RequestMethod.GET) |
| | | public Result getFieldByMenu(@PathVariable String id){ |
| | |
| | | if (dataMaxVersion == null) { |
| | | isInit = true; |
| | | } |
| | | if (!StringUtils.isEmpty(sysField.getId())) { |
| | | String id = sysField.getId(); |
| | | SysField field = fieldService.selectById(id); |
| | | if (field != null){ |
| | | Operate operate = field.getOperate(); |
| | | if (operate != null) { |
| | | isInit = true; |
| | | } |
| | | } |
| | | } |
| | | |
| | | Operate operate = sysField.getOperate(); |
| | | |
| | |
| | | if (StringUtils.isEmpty(sysField.getId())) { |
| | | sysField.setId(DbUtils.getUUID()); |
| | | } |
| | | sysField.setOperate(null); |
| | | boolean update = sysField.insertOrUpdate(); |
| | | if (update) { |
| | | return Result.success(CodeMsg.SUCCESS); |
| | |
| | | } |
| | | } |
| | | if (isInit && operate.equals(Operate.delete)) { |
| | | String maintainFieldId = sysField.getMaintainFieldId(); |
| | | boolean delete = sysField.deleteById(); |
| | | if (delete) { |
| | | //删除后 判断是否有未提交的了 |
| | | if (StringUtils.isEmpty(maintainFieldId)) { |
| | | return Result.success(CodeMsg.SUCCESS); |
| | | } |
| | | List<SysField> fieldList = fieldService.selectList(new EntityWrapper<SysField>().eq("maintain_field_id", maintainFieldId)); |
| | | long count = fieldList.stream().filter(field -> field.getOperate() != null).count(); |
| | | if (count == 0) { |
| | | //说明 当前版本没有修改的字段了 |
| | | delete = fieldService.delete(new EntityWrapper<SysField>().eq("maintain_field_id", maintainFieldId)); |
| | | delete = maintainFieldService.deleteById(maintainFieldId); |
| | | if (delete) { |
| | | return Result.success(CodeMsg.SUCCESS); |
| | | } |
| | | } |
| | | return Result.success(CodeMsg.SUCCESS); |
| | | |
| | | }else { |
| | | return Result.error(CodeMsg.DELETE_ERROR); |
| | | } |
| | | } |
| | | |
| | | if (operate.equals(Operate.update)) { |
| | | String id = sysField.getId(); |
| | | SysField field = fieldService.selectById(id); |
| | |
| | | } |
| | | } |
| | | MaintainField maxVersion = maintainFieldService.getMaxVersion(sysField.getTableName()); |
| | | String maintainId = maxVersion.getId(); |
| | | String maintainId = null; |
| | | if(maxVersion != null) { |
| | | maintainId = maxVersion.getId(); |
| | | } |
| | | |
| | | MaintainField nowMaintain = null; |
| | | HttpSession session = request.getSession(); |
| | | TUser user = (TUser) session.getAttribute("user"); |
| | |
| | | TUser user = (TUser) session.getAttribute("user"); |
| | | String userId = user.getUserId(); |
| | | List<Flows> flows = flowsService.selectList(new EntityWrapper<Flows>().ne("business_type", ActivitiBusinessType.exists).ne("status", ActivitiStatus.open).ne("status", ActivitiStatus.close)); |
| | | // flows = flows.stream().filter(flow -> flowsService.isNextAudit(flow, userId)).collect(Collectors.toList()); |
| | | flows = flows.stream().filter(flow -> flowsService.isNextAudit(flow, userId)).collect(Collectors.toList()); |
| | | |
| | | HashSet<String> tableNameSet = new HashSet<>(); |
| | | List<String> maintainIds = flows.stream().map(Flows::getBusinessId).collect(Collectors.toList()); |
| | |
| | | @TableField("pre_msg") |
| | | private String preMsg; |
| | | |
| | | @TableField("empty_data") |
| | | private Boolean emptyData; |
| | | |
| | | @TableField("pre_cnt") |
| | | private Integer preCnt; |
| | | |
| | |
| | | @TableField("update_time") |
| | | private Date updateTime; |
| | | |
| | | |
| | | public Boolean getEmptyData() { |
| | | return emptyData; |
| | | } |
| | | |
| | | public SysAssemble setEmptyData(Boolean emptyData) { |
| | | this.emptyData = emptyData; |
| | | return this; |
| | | } |
| | | |
| | | public String getPreMsg() { |
| | | return preMsg; |
| | | } |
| | |
| | | package com.highdatas.mdm.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | * @since 2020-03-11 |
| | | */ |
| | | public interface MasterModifiedMapper { |
| | | Map<String,String> selectByTableMasterId(String tableName, String masterId); |
| | | Map<String,String> selectByTableMasterId(@Param("tableName") String tableName,@Param("masterId") String masterId); |
| | | |
| | | List<Map<String, String>> selectByMaintainId(String recoedTableName, String maintainId); |
| | | List<Map<String, String>> selectByMaintainId(@Param("recoedTableName") String recoedTableName, @Param("maintainId")String maintainId); |
| | | |
| | | void insertUserByTableNameUserId(String maintainId, String tableName,String recordTableName, String userId, String fieldStr); |
| | | void insertUserByTableNameUserId( @Param("maintainId")String maintainId, @Param("tableName")String tableName, @Param("recordTableName") String recordTableName, @Param("userId") String userId, @Param("fieldStr")String fieldStr); |
| | | |
| | | void insertJsonByTableNameUserId(String maintainId, String tableName,String recordTableName, String jsonStr); |
| | | void insertJsonByTableNameUserId( @Param("maintainId")String maintainId, @Param("tableName")String tableName, @Param("recordTableName")String recordTableName, @Param("jsonStr")String jsonStr); |
| | | |
| | | } |
| | |
| | | SysField getOneFieldByMaintainField(String maintainFieldId, String field); |
| | | |
| | | List<SysField> getFieldByMaintainField(String maintainId); |
| | | |
| | | Result getTotalFields(String tableName, Integer pageNo, Integer pageSize); |
| | | } |
| | |
| | | package com.highdatas.mdm.service.act; |
| | | |
| | | import com.highdatas.mdm.pojo.Result; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | |
| | | public interface IdentityService extends BaseService{ |
| | | public String startProcess(String businssId, String key); |
| | | public String startProcess(String businssId, String key, String workflowStall, HashMap<String, Object> variables); |
| | | Result addUser(String id); |
| | | Result addRole(String id); |
| | | Result addUserRole(String roleId, String userId); |
| | | |
| | | Result deleteUser(String id); |
| | | |
| | | Result deleteRole(String id); |
| | | Result deleteUserRole(String roleId, String userId); |
| | | } |
| | |
| | | package com.highdatas.mdm.service.act.impl; |
| | | |
| | | import com.highdatas.mdm.entity.TUser; |
| | | import com.highdatas.mdm.pojo.CodeMsg; |
| | | import com.highdatas.mdm.pojo.Result; |
| | | import org.activiti.engine.IdentityService; |
| | | import org.activiti.engine.RepositoryService; |
| | | import org.activiti.engine.RuntimeService; |
| | | import org.activiti.engine.identity.Group; |
| | | import org.activiti.engine.identity.User; |
| | | import org.activiti.engine.repository.Model; |
| | | import org.activiti.engine.repository.ProcessDefinition; |
| | | import org.activiti.engine.runtime.ProcessInstance; |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Result addUser(String id) { |
| | | try { |
| | | User user = identityService.newUser(id); |
| | | identityService.saveUser(user); |
| | | return Result.success(null); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return Result.error(new CodeMsg(6002, e.getMessage())); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public Result addRole(String id) { |
| | | try { |
| | | Group group = identityService.newGroup(id); |
| | | identityService.saveGroup(group); |
| | | return Result.success(null); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return Result.error(new CodeMsg(6002, e.getMessage())); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Result addUserRole(String roleId, String userId) { |
| | | try { |
| | | User user = identityService.createUserQuery().userId(userId).singleResult(); |
| | | if (user == null) { |
| | | return Result.error(new CodeMsg(3001, "当前用户不存在,请先创建用户")); |
| | | } |
| | | Group group = identityService.createGroupQuery().groupId(roleId).singleResult(); |
| | | if (user == null) { |
| | | return Result.error(new CodeMsg(3001, "当前角色不存在,请先角色用户")); |
| | | } |
| | | identityService.createMembership(userId,roleId); |
| | | return Result.success(null); |
| | | } |
| | | catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return Result.error(new CodeMsg(3002, e.getMessage())); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Result deleteUser(String id) { |
| | | try { |
| | | User user = identityService.createUserQuery().userId(id).singleResult(); |
| | | if (user == null) { |
| | | return Result.error(new CodeMsg(3001, "当前用户不存在")); |
| | | } |
| | | identityService.deleteUser(id); |
| | | return Result.success(null); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return Result.error(new CodeMsg(3002, e.getMessage())); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public Result deleteRole(String id) { |
| | | try { |
| | | Group group = identityService.createGroupQuery().groupId(id).singleResult(); |
| | | if (group == null) { |
| | | return Result.error(new CodeMsg(3001, "当前角色不存在")); |
| | | } |
| | | identityService.deleteGroup(id); |
| | | return Result.success(null); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return Result.error(new CodeMsg(3002, e.getMessage())); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Result deleteUserRole(String roleId, String userId) { |
| | | try { |
| | | User user = identityService.createUserQuery().userId(userId).singleResult(); |
| | | if (user == null) { |
| | | return Result.error(new CodeMsg(3001, "当前用户不存在,请先创建用户")); |
| | | } |
| | | Group group = identityService.createGroupQuery().groupId(roleId).singleResult(); |
| | | if (user == null) { |
| | | return Result.error(new CodeMsg(3001, "当前角色不存在,请先角色用户")); |
| | | } |
| | | identityService.deleteMembership(userId,roleId); |
| | | return Result.success(null); |
| | | } |
| | | catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return Result.error(new CodeMsg(3002, e.getMessage())); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | List<Flows> maintainList = records.stream() |
| | | .filter(flows -> flows.getBusinessType().equals(ActivitiBusinessType.maintain)) |
| | | .filter(flows -> (!flows.getStatus().equals(ActivitiStatus.open) || !flows.getStatus().equals(ActivitiStatus.close))) |
| | | .filter(flows -> maintainService.selectById(flows.getBusinessId()) != null) |
| | | .filter(flows -> maintainService.selectById(flows.getBusinessId()).getTableName().equalsIgnoreCase(tableName)).collect(Collectors.toList()); |
| | | |
| | | List<Flows> maintainFieldList = records.stream() |
| | | List<Flows> collect = records.stream() |
| | | .filter(flows -> flows.getBusinessType().equals(ActivitiBusinessType.field)) |
| | | .filter(flows -> (!flows.getStatus().equals(ActivitiStatus.open) || !flows.getStatus().equals(ActivitiStatus.close))) |
| | | .filter(flows -> maintainFieldService.selectById(flows.getBusinessId()) != null) |
| | | .filter(flows -> maintainFieldService.selectById(flows.getBusinessId()).getTableName().equalsIgnoreCase(tableName)).collect(Collectors.toList()); |
| | | records = new ArrayList<>(); |
| | | |
| | | records.addAll(maintainFieldList); |
| | | records.addAll(maintainList); |
| | | records.addAll(collect); |
| | | } |
| | | Page page = new Page(records.size()); |
| | | page.setPageNo(pageNo); |
| | |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | String menuId = menuMapping.getMenuId(); |
| | | if (StringUtils.isEmpty(menuId)) { |
| | | return null; |
| | | } |
| | | int cnt = selectCount(new EntityWrapper<MenuMapping>().eq("menu_id", menuId)); |
| | | if (cnt != 0) { |
| | | return null; |
| | | } |
| | | //menuMapping.setMaintainFieldId(maintainId); |
| | | return create(menuMapping); |
| | | } |
| | |
| | | @Override |
| | | public Result getMapping(HttpSession session, String id) { |
| | | SysMenu sysMenu = menuService.selectById(id); |
| | | if (sysMenu == null) { |
| | | return Result.error(CodeMsg.SELECT_ERROR); |
| | | } |
| | | String menuType = sysMenu.getMenuType(); |
| | | if (StringUtils.isEmpty(menuType)) { |
| | | return Result.error(CodeMsg.SELECT_ERROR); |
| | |
| | | package com.highdatas.mdm.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | |
| | | import com.highdatas.mdm.mapper.TableInfoMapper; |
| | | import com.highdatas.mdm.pojo.ActivitiStatus; |
| | | import com.highdatas.mdm.pojo.Operate; |
| | | import com.highdatas.mdm.pojo.Page; |
| | | import com.highdatas.mdm.pojo.Result; |
| | | import com.highdatas.mdm.service.IFlowsService; |
| | | import com.highdatas.mdm.service.IMaintainFieldService; |
| | |
| | | return Result.success(result); |
| | | } |
| | | |
| | | @Override |
| | | public Result getTotalFields(String tableName, Integer pageNo, Integer pageSize) { |
| | | Result totalFields = getTotalFields(tableName); |
| | | JSONObject result = (JSONObject) totalFields.getData(); |
| | | JSONArray list = result.getJSONArray("list"); |
| | | int total = list.size(); |
| | | Page page = new Page(total); |
| | | page.setPageSize(pageSize); |
| | | page.setPageNo(pageNo); |
| | | List<Object> subList = list.stream().skip(page.getBeginRecordNo_1()).limit(page.getPageSize()).collect(Collectors.toList()); |
| | | result.fluentPut("pages", page.getPageCount()); |
| | | result.fluentPut("current", pageNo); |
| | | result.fluentPut("size", pageSize); |
| | | result.fluentPut("total", page.getRecordCount()); |
| | | result.fluentPut("list", subList); |
| | | |
| | | return Result.success(result); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | private List<SysField> packageFieldList(List<SysField> nowFields, List<SysField> maxFields) { |
| | | //原始的清除operate用于前端显示 |
| | | nowFields = nowFields.stream().map(sysField -> sysField.setOperate(null)).collect(Collectors.toList()); |
| | |
| | | package com.highdatas.mdm.util;
|
| | |
|
| | | import com.alibaba.fastjson.JSON;
|
| | | import com.alibaba.fastjson.JSONObject;
|
| | | import lombok.Data;
|
| | | import lombok.extern.slf4j.Slf4j;
|
| | | import org.apache.commons.io.IOUtils;
|
| | |
| | | @Slf4j
|
| | | public class HttpTraceLogFilter extends OncePerRequestFilter implements Ordered {
|
| | |
|
| | | private static final String NEED_TRACE_PATH_PREFIX = "/api";
|
| | | private static final String UNNEED_TRACE_PATH_PREFIX = "/file";
|
| | | private static final String IGNORE_CONTENT_TYPE = "multipart/form-data";
|
| | |
|
| | |
|
| | |
| | | status = response.getStatus();
|
| | | } finally {
|
| | | String path = request.getRequestURI();
|
| | | boolean isFilterPath = path.startsWith(NEED_TRACE_PATH_PREFIX);
|
| | | boolean isFilterPath = path.startsWith(UNNEED_TRACE_PATH_PREFIX);
|
| | | isFilterPath = true;
|
| | | if (isFilterPath) {
|
| | | if (!isFilterPath) {
|
| | | String requestBody = IOUtils.toString(request.getInputStream(), StandardCharsets.UTF_8.name());
|
| | | log.info(requestBody);
|
| | | //1. 记录日志
|
| | |
| | | traceLog.setTime(LocalDateTime.now().toString());
|
| | | traceLog.setParameterMap(JSON.toJSONString(request.getParameterMap()));
|
| | | traceLog.setStatus(status);
|
| | | traceLog.setUserIp( request.getRemoteAddr());
|
| | | traceLog.setRequestBody(getRequestBody(request));
|
| | | traceLog.setResponseBody(getResponseBody(response));
|
| | | String responseBody = getResponseBody(response);
|
| | | try{
|
| | | JSONObject jsonObject = JSONObject.parseObject(responseBody);
|
| | | if (jsonObject != null){
|
| | | traceLog.setResponseStatus(jsonObject.getString("success"));
|
| | | }
|
| | | }
|
| | | catch (Exception e){
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // traceLog.setResponseBody(responseBody);
|
| | | log.info("Http trace log: {}", JSON.toJSONString(traceLog));
|
| | | }
|
| | | updateResponse(response);
|
| | |
| | | private String userId;
|
| | | private String userIp;
|
| | | private String urlId;
|
| | | private String responseBody;
|
| | | private String responseStatus;
|
| | | }
|
| | | }
|
| | |
| | | // 全局配置 |
| | | GlobalConfig gc = new GlobalConfig(); |
| | | gc.setAuthor("kimi"); |
| | | gc.setOutputDir("D://workspace/workspace_idea/mdm_new/src/main/java"); |
| | | gc.setOutputDir("H://workspace/workspace_idea/mdm/src/main/java"); |
| | | gc.setFileOverride(true);// 是否覆盖同名文件,默认是false |
| | | gc.setActiveRecord(true);// 不需要ActiveRecord特性的请改为false |
| | | gc.setEnableCache(false);// XML 二级缓存 |
| | |
| | | params.set("userIp",traceLog.getUserIp());
|
| | | params.set("urlId",traceLog.getUrlId());
|
| | | params.set("requestParam",traceLog.getRequestBody());
|
| | | params.set("requestResult",traceLog.getResponseBody());
|
| | | params.set("requestResult",traceLog.getResponseStatus());
|
| | | String s = HttpUtils.HttpRestClient(url, HttpMethod.POST, params);
|
| | | JSONObject result = (JSONObject) JSON.parse(s);
|
| | | String sucess = result.getString(Constant.Success);
|
| | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | url: jdbc:mysql://localhost:3306/mdm?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | url: jdbc:mysql://localhost:3306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | username: root |
| | | password: 123456 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | |
| | | unbigdata: |
| | | db: |
| | | host: localhost |
| | | url: jdbc:mysql://localhost:3306/mdm?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | url: jdbc:mysql://localhost:3306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | type: MYSQL |
| | | port: 3306 |
| | | schema: mdm |
New file |
| | |
| | | server: |
| | | port: 18090 |
| | | |
| | | img: |
| | | url: /usr/datagovernance/file/activiti/ |
| | | |
| | | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | url: jdbc:mysql://127.0.0.1:3306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | username: root |
| | | password: datacvg123! |
| | | hikari: |
| | | minimum-idle: 3 |
| | | max-lifetime: 30000 |
| | | connection-test-query: select 1 |
| | | activiti: |
| | | database-schema-update: true |
| | | |
| | | thymeleaf: |
| | | cache: false |
| | | prefix: classpath:/templates/ |
| | | suffix: .html |
| | | servlet: |
| | | content-type: text/html |
| | | encoding: utf-8 |
| | | |
| | | logging: |
| | | level: |
| | | com: |
| | | highdatas: |
| | | mdm: |
| | | mapper: DEBUG |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath:mapping/*.xml |
| | | type-aliases-package: com.highdatas.mdm.mapper |
| | | global-config: |
| | | db-config: |
| | | column-underline: true |
| | | |
| | | redis: |
| | | host: http://127.0.0.1 |
| | | port: 9107 |
| | | |
| | | rule: |
| | | url: http://127.0.0.1:9107 |
| | | |
| | | |
| | | xxljob: |
| | | local: http://127.0.0.1:9010 |
| | | url: http://127.0.0.1:6890 |
| | | bak: |
| | | xxl: |
| | | job: |
| | | accessToken: |
| | | executor: |
| | | ip: |
| | | port: 9909 |
| | | logpath: /data/applogs/xxl-job/jobhandler |
| | | logretentiondays: 1 |
| | | appname: assemble |
| | | admin: |
| | | addresses: http://127.0.0.1:8090/xxl-job-admin |
| | | |
| | | |
| | | master: |
| | | unbigdata: |
| | | db: |
| | | host: http://127.0.0.1 |
| | | url: jdbc:mysql://127.0.0.1:3306/data_admin?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true |
| | | type: MYSQL |
| | | port: 3306 |
| | | schema: data_admin |
| | | username: root |
| | | password: datacvg123! |
| | | bigdata: |
| | | db:hbase? |
| | |
| | | spring: |
| | | profiles: |
| | | active: |
| | | prod |
| | | pro |
| | | |
| | | main: |
| | | allow-bean-definition-overriding: true |
| | |
| | | |
| | | |
| | | <select id="addCloumn" resultType="java.lang.String" statementType="STATEMENT" > |
| | | alter table ${tableName} add ${field} ${fieldType} null; |
| | | alter table ${tableName} add ${field} ${fieldType} null |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | |
| | | <insert id="insertUserByTableNameUserId" statementType="STATEMENT" > |
| | | INSERT INTO master_modified (id, table_name, master_id, ${userId}) SELECT replace(uuid(),'-', '') as id, ${tableName} as table_name, a.id as master_id, ${fieldStr} as ${userId} from |
| | | INSERT INTO master_modified (id, table_name, master_id, ${userId}) SELECT UUID_SHORT() as id, ${tableName} as table_name, a.id as master_id, ${fieldStr} as ${userId} from |
| | | ( |
| | | SELECT temp.id from maintain_detail LEFT JOIN |
| | | ${recordTableName} temp on temp.id = maintain_detail.pre_merge_id |
| | |
| | | </insert> |
| | | |
| | | <insert id="insertJsonByTableNameUserId" statementType="STATEMENT" > |
| | | INSERT INTO master_modified (id, table_name, master_id, pre_record ) SELECT replace(uuid(),'-', '') as id, ${tableName} as table_name, a.id as master_id, ${jsonStr} as pre_record from |
| | | INSERT INTO master_modified (id, table_name, master_id, pre_record ) SELECT UUID_SHORT() as id, ${tableName} as table_name, a.id as master_id, ${jsonStr} as pre_record from |
| | | ( |
| | | SELECT temp.id from maintain_detail LEFT JOIN |
| | | ${recordTableName} temp on temp.id = maintain_detail.pre_merge_id |
| | |
| | | </select> |
| | | |
| | | <select id="getTableField" parameterType="String" resultType="com.highdatas.mdm.entity.TableSchemaResult"> |
| | | select COLUMN_NAME as fieldName,DATA_TYPE as dbType from information_schema.COLUMNS where table_name = #{tableName} and table_schema = (select database()) ; |
| | | select COLUMN_NAME as fieldName,DATA_TYPE as dbType from information_schema.COLUMNS where table_name = #{tableName} and table_schema = (select database()) |
| | | </select> |
| | | |
| | | <select id="getTableFieldFromDb" parameterType="com.highdatas.mdm.entity.TableSchema" resultType="com.highdatas.mdm.entity.TableSchemaResult"> |
| | | select COLUMN_NAME as fieldName,DATA_TYPE as dbType from information_schema.COLUMNS where table_name = #{tableName} and table_schema = #{dbName}; |
| | | select COLUMN_NAME as fieldName,DATA_TYPE as dbType from information_schema.COLUMNS where table_name = #{tableName} and table_schema = #{dbName} |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="java.util.Map" statementType="STATEMENT" > |