Commit a3310810 authored by frank.xa.zhang's avatar frank.xa.zhang

fixed issues about create new db

parent a2cde1f4
...@@ -2609,42 +2609,42 @@ public class OrganizationServiceImpl implements OrganizationService { ...@@ -2609,42 +2609,42 @@ public class OrganizationServiceImpl implements OrganizationService {
// addLogList.add(updateLogParams); // addLogList.add(updateLogParams);
// } // }
for (OrganizationServiceTemplateGroup item : updates) { // for (OrganizationServiceTemplateGroup item : updates) {
OrganizationServiceTemplateGroup current = currentList.stream() // OrganizationServiceTemplateGroup current = currentList.stream()
.filter(sa -> Strings.equals(sa.getServiceTypeId(), item.getServiceTypeId())).findFirst() // .filter(sa -> Strings.equals(sa.getServiceTypeId(), item.getServiceTypeId())).findFirst()
.orElse(null); // .orElse(null);
if (current != null) { // if (current != null) {
ServiceType tService = queryService.stream() // ServiceType tService = queryService.stream()
.filter(sa -> Strings.equals(sa.getID(), item.getServiceTypeId())).findFirst().orElse(null); // .filter(sa -> Strings.equals(sa.getID(), item.getServiceTypeId())).findFirst().orElse(null);
Assert.notNull(tService, "tService null exception in updateOrganizationServiceTemplateGroupLog"); // Assert.notNull(tService, "tService null exception in updateOrganizationServiceTemplateGroupLog");
String serviceName = tService.getName(); // String serviceName = tService.getName();
//
TemplateGroup updateTemplate = queryTemplate.stream() // TemplateGroup updateTemplate = queryTemplate.stream()
.filter(sa -> Long.compare(sa.getId(), item.getTemplateGroupId())==0).findFirst().orElse(null); // .filter(sa -> Long.compare(sa.getId(), item.getTemplateGroupId())==0).findFirst().orElse(null);
Assert.notNull(updateTemplate, // Assert.notNull(updateTemplate,
"updateTemplate null exception in updateOrganizationServiceTemplateGroupLog"); // "updateTemplate null exception in updateOrganizationServiceTemplateGroupLog");
String updateStr = updateTemplate.getName(); // String updateStr = updateTemplate.getName();
//
TemplateGroup currentTemplate = queryTemplate.stream() // TemplateGroup currentTemplate = queryTemplate.stream()
.filter(sa -> Long.compare(sa.getId(), current.getTemplateGroupId())==0).findFirst() // .filter(sa -> Long.compare(sa.getId(), current.getTemplateGroupId())==0).findFirst()
.orElse(null); // .orElse(null);
Assert.notNull(currentTemplate, // Assert.notNull(currentTemplate,
"currentTemplate null exception in updateOrganizationServiceTemplateGroupLog"); // "currentTemplate null exception in updateOrganizationServiceTemplateGroupLog");
String currentStr = currentTemplate.getName(); // String currentStr = currentTemplate.getName();
//
UpdateLogParams updateLogParams = new UpdateLogParams(); // UpdateLogParams updateLogParams = new UpdateLogParams();
updateLogParams.setUpdateState(updateStr); // updateLogParams.setUpdateState(updateStr);
updateLogParams.setOriginalState(currentStr); // updateLogParams.setOriginalState(currentStr);
updateLogParams.setOperationContent(OrganizationMessage.OrganizationServiceTemplateGroup); // updateLogParams.setOperationContent(OrganizationMessage.OrganizationServiceTemplateGroup);
updateLogParams.setOperationObject(operateObject + DashSignSeparator + serviceName); // updateLogParams.setOperationObject(operateObject + DashSignSeparator + serviceName);
updateLogParams.setOperationModule(OperationModule.Organization.value()); // updateLogParams.setOperationModule(OperationModule.Organization.value());
updateLogParams.setOperateLogType(OperateLogType.OperationLogOrganization.value()); // updateLogParams.setOperateLogType(OperateLogType.OperationLogOrganization.value());
updateLogParams.setComment(""); // updateLogParams.setComment("");
updateLogParams.setOperationAction(OperationAction.Update.value()); // updateLogParams.setOperationAction(OperationAction.Update.value());
addLogList.add(updateLogParams); // addLogList.add(updateLogParams);
} // }
//
} // }
operationLogService.addOrDeleteDataAddLog(addLogList); operationLogService.addOrDeleteDataAddLog(addLogList);
} }
......
...@@ -1122,7 +1122,7 @@ CREATE TABLE IF NOT EXISTS `DBKeyword_ProjectDbName`.`modified_report_cell` ( ...@@ -1122,7 +1122,7 @@ CREATE TABLE IF NOT EXISTS `DBKeyword_ProjectDbName`.`modified_report_cell` (
`create_by` varchar(128) NOT NULL, `create_by` varchar(128) NOT NULL,
`update_by` varchar(128) NOT NULL, `update_by` varchar(128) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Insert INTO EnterpriseAccount Insert INTO EnterpriseAccount
SELECT SELECT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment