typos: backend 拼写处理

This commit is contained in:
fit2-zhao 2023-10-10 17:26:02 +08:00 committed by Craftsman
parent 391d38d183
commit 01c028adf2
7 changed files with 38 additions and 38 deletions

View File

@ -204,7 +204,7 @@ public class RsaUtils {
} }
} }
private static byte[] rsaSplitCodec(Cipher cipher, int opmode, byte[] datas, int keySize) { private static byte[] rsaSplitCodec(Cipher cipher, int opmode, byte[] data, int keySize) {
int maxBlock; int maxBlock;
if (opmode == Cipher.DECRYPT_MODE) { if (opmode == Cipher.DECRYPT_MODE) {
maxBlock = keySize / 8; maxBlock = keySize / 8;
@ -217,11 +217,11 @@ public class RsaUtils {
try ( try (
ByteArrayOutputStream out = new ByteArrayOutputStream() ByteArrayOutputStream out = new ByteArrayOutputStream()
) { ) {
while (datas.length > offSet) { while (data.length > offSet) {
if (datas.length - offSet > maxBlock) { if (data.length - offSet > maxBlock) {
buff = cipher.doFinal(datas, offSet, maxBlock); buff = cipher.doFinal(data, offSet, maxBlock);
} else { } else {
buff = cipher.doFinal(datas, offSet, datas.length - offSet); buff = cipher.doFinal(data, offSet, data.length - offSet);
} }
out.write(buff, 0, buff.length); out.write(buff, 0, buff.length);
i++; i++;

View File

@ -261,7 +261,7 @@ authsource_name_is_null=Authentication source name cannot be empty
authsource_configuration_is_null=Authentication source configuration cannot be empty authsource_configuration_is_null=Authentication source configuration cannot be empty
authsource_type_is_null=Authentication source type cannot be empty authsource_type_is_null=Authentication source type cannot be empty
mobile_phone_number_cannot_be_empty=When the receiving mode is pin and enterprise wechat: the user's mobile phone number cannot be empty mobile_phone_number_cannot_be_empty=When the receiving mode is pin and enterprise wechat: the user's mobile phone number cannot be empty
custom_field_already=A feild already exists under this organization: custom_field_already=A filed already exists under this organization:
template_already=A template already exists under this organization: template_already=A template already exists under this organization:
expect_name_exists=Expect name is exists expect_name_exists=Expect name is exists
ssl_password_error=The authentication password is wrong, please re-enter the password ssl_password_error=The authentication password is wrong, please re-enter the password

View File

@ -420,7 +420,7 @@ public class ProjectApplicationService {
*/ */
public List<ModuleDTO> getModuleSetting(String projectId) { public List<ModuleDTO> getModuleSetting(String projectId) {
String moduleSetting = extProjectMapper.getModuleSetting(projectId); String moduleSetting = extProjectMapper.getModuleSetting(projectId);
Map<String, Boolean> moudleMap = new HashMap<>(); Map<String, Boolean> moduleMap = new HashMap<>();
List<ModuleDTO> moduleDTOList = new ArrayList<>(); List<ModuleDTO> moduleDTOList = new ArrayList<>();
if (StringUtils.isNotEmpty(moduleSetting)) { if (StringUtils.isNotEmpty(moduleSetting)) {
ProjectApplicationExample example = new ProjectApplicationExample(); ProjectApplicationExample example = new ProjectApplicationExample();
@ -429,12 +429,12 @@ public class ProjectApplicationService {
example.createCriteria().andTypeEqualTo(String.valueOf(module)).andProjectIdEqualTo(projectId); example.createCriteria().andTypeEqualTo(String.valueOf(module)).andProjectIdEqualTo(projectId);
List<ProjectApplication> applications = projectApplicationMapper.selectByExample(example); List<ProjectApplication> applications = projectApplicationMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(applications)) { if (CollectionUtils.isNotEmpty(applications)) {
moudleMap.put(String.valueOf(module), Boolean.valueOf(applications.get(0).getTypeValue())); moduleMap.put(String.valueOf(module), Boolean.valueOf(applications.get(0).getTypeValue()));
} else { } else {
moudleMap.put(String.valueOf(module), Boolean.TRUE); moduleMap.put(String.valueOf(module), Boolean.TRUE);
} }
}); });
moduleDTOList = moudleMap.entrySet().stream().map(entry -> new ModuleDTO(entry.getKey(), entry.getValue())).collect(Collectors.toList()); moduleDTOList = moduleMap.entrySet().stream().map(entry -> new ModuleDTO(entry.getKey(), entry.getValue())).collect(Collectors.toList());
} }
return moduleDTOList; return moduleDTOList;
} }

View File

@ -501,8 +501,8 @@ public class ProjectApplicationControllerTests extends BaseTest {
@Test @Test
@Order(34) @Order(34)
public void testIssueConfig() throws Exception { public void testIssueConfig() throws Exception {
Map<String, String> congifs = mockTeseData(); Map<String, String> configs = mockTestData();
MvcResult mvcResult = this.requestPostWithOkAndReturn(UPDATE_ISSUE_CONFIG_URL + "/default-project-2", congifs); MvcResult mvcResult = this.requestPostWithOkAndReturn(UPDATE_ISSUE_CONFIG_URL + "/default-project-2", configs);
// 获取返回值 // 获取返回值
String returnData = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8); String returnData = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8);
ResultHolder resultHolder = JSON.parseObject(returnData, ResultHolder.class); ResultHolder resultHolder = JSON.parseObject(returnData, ResultHolder.class);
@ -510,19 +510,19 @@ public class ProjectApplicationControllerTests extends BaseTest {
Assertions.assertNotNull(resultHolder); Assertions.assertNotNull(resultHolder);
//更新 //更新
congifs.put("jiraKey", "222"); configs.put("jiraKey", "222");
MvcResult updateResult = this.requestPostWithOkAndReturn(UPDATE_ISSUE_CONFIG_URL + "/default-project-2", congifs); MvcResult updateResult = this.requestPostWithOkAndReturn(UPDATE_ISSUE_CONFIG_URL + "/default-project-2", configs);
// 获取返回值 // 获取返回值
String updateData = updateResult.getResponse().getContentAsString(StandardCharsets.UTF_8); String updateData = updateResult.getResponse().getContentAsString(StandardCharsets.UTF_8);
ResultHolder updateResultHolder = JSON.parseObject(updateData, ResultHolder.class); ResultHolder updateResultHolder = JSON.parseObject(updateData, ResultHolder.class);
// 返回请求正常 // 返回请求正常
Assertions.assertNotNull(updateResultHolder); Assertions.assertNotNull(updateResultHolder);
congifs.remove("CRON_EXPRESSION"); configs.remove("CRON_EXPRESSION");
this.requestPostWithOkAndReturn(UPDATE_ISSUE_CONFIG_URL + "/default-project-2", congifs); this.requestPostWithOkAndReturn(UPDATE_ISSUE_CONFIG_URL + "/default-project-2", configs);
} }
private Map<String, String> mockTeseData() { private Map<String, String> mockTestData() {
Map<String, String> configs = new HashMap<>(); Map<String, String> configs = new HashMap<>();
configs.put("platform", "jira"); configs.put("platform", "jira");
configs.put("jiraKey", "111"); configs.put("jiraKey", "111");
@ -578,8 +578,8 @@ public class ProjectApplicationControllerTests extends BaseTest {
@Test @Test
@Order(37) @Order(37)
public void testCaseRelatedConfig() throws Exception { public void testCaseRelatedConfig() throws Exception {
Map<String, String> congifs = mockRelatedTeseData(); Map<String, String> configs = mockRelatedTestData();
MvcResult mvcResult = this.requestPostWithOkAndReturn(UPDATE_CASE_RELATED_CONFIG_URL + "/default-project-2", congifs); MvcResult mvcResult = this.requestPostWithOkAndReturn(UPDATE_CASE_RELATED_CONFIG_URL + "/default-project-2", configs);
// 获取返回值 // 获取返回值
String returnData = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8); String returnData = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8);
ResultHolder resultHolder = JSON.parseObject(returnData, ResultHolder.class); ResultHolder resultHolder = JSON.parseObject(returnData, ResultHolder.class);
@ -587,8 +587,8 @@ public class ProjectApplicationControllerTests extends BaseTest {
Assertions.assertNotNull(resultHolder); Assertions.assertNotNull(resultHolder);
//更新 //更新
congifs.put("jiraKey", "222"); configs.put("jiraKey", "222");
MvcResult updateResult = this.requestPostWithOkAndReturn(UPDATE_CASE_RELATED_CONFIG_URL + "/default-project-2", congifs); MvcResult updateResult = this.requestPostWithOkAndReturn(UPDATE_CASE_RELATED_CONFIG_URL + "/default-project-2", configs);
// 获取返回值 // 获取返回值
String updateData = updateResult.getResponse().getContentAsString(StandardCharsets.UTF_8); String updateData = updateResult.getResponse().getContentAsString(StandardCharsets.UTF_8);
ResultHolder updateResultHolder = JSON.parseObject(updateData, ResultHolder.class); ResultHolder updateResultHolder = JSON.parseObject(updateData, ResultHolder.class);
@ -596,7 +596,7 @@ public class ProjectApplicationControllerTests extends BaseTest {
Assertions.assertNotNull(updateResultHolder); Assertions.assertNotNull(updateResultHolder);
} }
private Map<String, String> mockRelatedTeseData() { private Map<String, String> mockRelatedTestData() {
Map<String, String> configs = new HashMap<>(); Map<String, String> configs = new HashMap<>();
configs.put("platform", "jira"); configs.put("platform", "jira");
configs.put("jiraKey", "111"); configs.put("jiraKey", "111");

View File

@ -108,7 +108,7 @@ public class ProjectTemplateControllerTests extends BaseTest {
Assertions.assertEquals(template.getCreateUser(), ADMIN.getValue()); Assertions.assertEquals(template.getCreateUser(), ADMIN.getValue());
Assertions.assertEquals(template.getInternal(), false); Assertions.assertEquals(template.getInternal(), false);
Assertions.assertEquals(template.getScopeType(), TemplateScopeType.PROJECT.name()); Assertions.assertEquals(template.getScopeType(), TemplateScopeType.PROJECT.name());
asserTemplateCustomFields(request, template); assertTemplateCustomFields(request, template);
// @@重名校验异常 // @@重名校验异常
assertErrorCode(this.requestPost(DEFAULT_ADD, request), TEMPLATE_EXIST); assertErrorCode(this.requestPost(DEFAULT_ADD, request), TEMPLATE_EXIST);
@ -136,7 +136,7 @@ public class ProjectTemplateControllerTests extends BaseTest {
requestPostPermissionTest(PermissionConstants.PROJECT_TEMPLATE_ADD, DEFAULT_ADD, request); requestPostPermissionTest(PermissionConstants.PROJECT_TEMPLATE_ADD, DEFAULT_ADD, request);
} }
private void asserTemplateCustomFields(TemplateUpdateRequest request, Template template) { private void assertTemplateCustomFields(TemplateUpdateRequest request, Template template) {
List<TemplateCustomField> templateCustomFields = baseTemplateCustomFieldService.getByTemplateId(template.getId()); List<TemplateCustomField> templateCustomFields = baseTemplateCustomFieldService.getByTemplateId(template.getId());
Assertions.assertEquals(templateCustomFields.size(), request.getCustomFields().size()); Assertions.assertEquals(templateCustomFields.size(), request.getCustomFields().size());
for (int i = 0; i < templateCustomFields.size(); i++) { for (int i = 0; i < templateCustomFields.size(); i++) {
@ -190,13 +190,13 @@ public class ProjectTemplateControllerTests extends BaseTest {
Assertions.assertEquals(template.getScopeType(), TemplateScopeType.PROJECT.name()); Assertions.assertEquals(template.getScopeType(), TemplateScopeType.PROJECT.name());
Assertions.assertEquals(template.getScene(), scene); Assertions.assertEquals(template.getScene(), scene);
Assertions.assertEquals(template.getEnableThirdPart(), request.getEnableThirdPart()); Assertions.assertEquals(template.getEnableThirdPart(), request.getEnableThirdPart());
asserTemplateCustomFields(request, template); assertTemplateCustomFields(request, template);
// 带字段的更新 // 带字段的更新
TemplateCustomFieldRequest templateCustomFieldRequest = getTemplateCustomFieldRequest(scene); TemplateCustomFieldRequest templateCustomFieldRequest = getTemplateCustomFieldRequest(scene);
request.setCustomFields(List.of(templateCustomFieldRequest)); request.setCustomFields(List.of(templateCustomFieldRequest));
this.requestPostWithOk(DEFAULT_UPDATE, request); this.requestPostWithOk(DEFAULT_UPDATE, request);
asserTemplateCustomFields(request, template); assertTemplateCustomFields(request, template);
// 不更新字段 // 不更新字段
request.setCustomFields(null); request.setCustomFields(null);

View File

@ -113,7 +113,7 @@ public class OrganizationCustomFieldControllerTests extends BaseTest {
Assertions.assertEquals(false, optionItem.getInternal()); Assertions.assertEquals(false, optionItem.getInternal());
Assertions.assertEquals(customField.getId(), optionItem.getFieldId()); Assertions.assertEquals(customField.getId(), optionItem.getFieldId());
} }
asserRefCustomField(customField); assertRefCustomField(customField);
// @校验是否开启组织模板 // @校验是否开启组织模板
changeOrgTemplateEnable(false); changeOrgTemplateEnable(false);
@ -176,7 +176,7 @@ public class OrganizationCustomFieldControllerTests extends BaseTest {
Assertions.assertEquals(false, optionItem.getInternal()); Assertions.assertEquals(false, optionItem.getInternal());
Assertions.assertEquals(customField.getId(), optionItem.getFieldId()); Assertions.assertEquals(customField.getId(), optionItem.getFieldId());
} }
asserRefCustomField(customField); assertRefCustomField(customField);
// @校验是否开启组织模板 // @校验是否开启组织模板
changeOrgTemplateEnable(false); changeOrgTemplateEnable(false);
@ -283,7 +283,7 @@ public class OrganizationCustomFieldControllerTests extends BaseTest {
/** /**
* 校验变更组织字段时有没有同步变更项目字段 * 校验变更组织字段时有没有同步变更项目字段
*/ */
private void asserRefCustomField(CustomField customField) { private void assertRefCustomField(CustomField customField) {
List<CustomField> refFields = organizationCustomFieldService.getByRefId(customField.getId()); List<CustomField> refFields = organizationCustomFieldService.getByRefId(customField.getId());
List<Project> orgProjects = getProjectByOrgId(customField.getScopeId()); List<Project> orgProjects = getProjectByOrgId(customField.getScopeId());
// 校验所有项目下是否都有同步变更 // 校验所有项目下是否都有同步变更

View File

@ -111,8 +111,8 @@ public class OrganizationTemplateControllerTests extends BaseTest {
Assertions.assertEquals(template.getCreateUser(), ADMIN.getValue()); Assertions.assertEquals(template.getCreateUser(), ADMIN.getValue());
Assertions.assertEquals(template.getInternal(), false); Assertions.assertEquals(template.getInternal(), false);
Assertions.assertEquals(template.getScopeType(), TemplateScopeType.ORGANIZATION.name()); Assertions.assertEquals(template.getScopeType(), TemplateScopeType.ORGANIZATION.name());
asserTemplateCustomFields(request, template); assertTemplateCustomFields(request, template);
asserRefTemplate(template); assertRefTemplate(template);
// @@重名校验异常 // @@重名校验异常
assertErrorCode(this.requestPost(DEFAULT_ADD, request), TEMPLATE_EXIST); assertErrorCode(this.requestPost(DEFAULT_ADD, request), TEMPLATE_EXIST);
@ -146,7 +146,7 @@ public class OrganizationTemplateControllerTests extends BaseTest {
* *
* @param template * @param template
*/ */
private void asserRefTemplate(Template template) { private void assertRefTemplate(Template template) {
List<Template> refTemplates = organizationTemplateService.getByRefId(template.getId()); List<Template> refTemplates = organizationTemplateService.getByRefId(template.getId());
refTemplates.forEach(refTemplate -> { refTemplates.forEach(refTemplate -> {
Assertions.assertEquals(refTemplate.getEnableThirdPart(), template.getEnableThirdPart()); Assertions.assertEquals(refTemplate.getEnableThirdPart(), template.getEnableThirdPart());
@ -180,7 +180,7 @@ public class OrganizationTemplateControllerTests extends BaseTest {
} }
} }
private void asserTemplateCustomFields(TemplateUpdateRequest request, Template template) { private void assertTemplateCustomFields(TemplateUpdateRequest request, Template template) {
List<TemplateCustomField> templateCustomFields = baseTemplateCustomFieldService.getByTemplateId(template.getId()); List<TemplateCustomField> templateCustomFields = baseTemplateCustomFieldService.getByTemplateId(template.getId());
Assertions.assertEquals(templateCustomFields.size(), request.getCustomFields().size()); Assertions.assertEquals(templateCustomFields.size(), request.getCustomFields().size());
for (int i = 0; i < templateCustomFields.size(); i++) { for (int i = 0; i < templateCustomFields.size(); i++) {
@ -234,14 +234,14 @@ public class OrganizationTemplateControllerTests extends BaseTest {
Assertions.assertEquals(template.getScopeType(), TemplateScopeType.ORGANIZATION.name()); Assertions.assertEquals(template.getScopeType(), TemplateScopeType.ORGANIZATION.name());
Assertions.assertEquals(template.getScene(), scene); Assertions.assertEquals(template.getScene(), scene);
Assertions.assertEquals(template.getEnableThirdPart(), request.getEnableThirdPart()); Assertions.assertEquals(template.getEnableThirdPart(), request.getEnableThirdPart());
asserTemplateCustomFields(request, template); assertTemplateCustomFields(request, template);
asserRefTemplate(template); assertRefTemplate(template);
// 带字段的更新 // 带字段的更新
TemplateCustomFieldRequest templateCustomFieldRequest = getTemplateCustomFieldRequest(scene); TemplateCustomFieldRequest templateCustomFieldRequest = getTemplateCustomFieldRequest(scene);
request.setCustomFields(List.of(templateCustomFieldRequest)); request.setCustomFields(List.of(templateCustomFieldRequest));
this.requestPostWithOk(DEFAULT_UPDATE, request); this.requestPostWithOk(DEFAULT_UPDATE, request);
asserTemplateCustomFields(request, template); assertTemplateCustomFields(request, template);
// 不更新字段 // 不更新字段
request.setCustomFields(null); request.setCustomFields(null);
@ -359,7 +359,7 @@ public class OrganizationTemplateControllerTests extends BaseTest {
this.requestGetWithOk(SET_DEFAULT, addTemplate.getId()); this.requestGetWithOk(SET_DEFAULT, addTemplate.getId());
Template template = templateMapper.selectByPrimaryKey(addTemplate.getId()); Template template = templateMapper.selectByPrimaryKey(addTemplate.getId());
assertSetDefaultTemplate(template); assertSetDefaultTemplate(template);
asserRefSetDefaultTemplate(template); assertRefSetDefaultTemplate(template);
// @校验是否开启组织模板 // @校验是否开启组织模板
changeOrgTemplateEnable(false); changeOrgTemplateEnable(false);
@ -386,7 +386,7 @@ public class OrganizationTemplateControllerTests extends BaseTest {
* *
* @param template * @param template
*/ */
private void asserRefSetDefaultTemplate(Template template) { private void assertRefSetDefaultTemplate(Template template) {
List<Template> refTemplates = organizationTemplateService.getByRefId(template.getId()); List<Template> refTemplates = organizationTemplateService.getByRefId(template.getId());
refTemplates.forEach(this::assertSetDefaultTemplate); refTemplates.forEach(this::assertSetDefaultTemplate);
} }