@Test public void testUpdate(){ RegisterInstanceRequest registerInstanceRequest = RegisterInstanceUtil.setRegisterInstanceRequest(); RegisterInstanceResponse response = instanceService.registerInstance(registerInstanceRequest); InstanceEntity testInstanceEntity = RegisterInstanceUtil.createTestInstanceEntity(); InstanceEntity instanceEntity = instanceService.findByCandInstanceId("w545878765"); Map<String, Object> parameterMap = new LinkedHashMap<String, Object>(); parameterMap.put("appName", "wApp"); AppEntity appEntity=(AppEntity) uiAppService.findByAppName(parameterMap).getData().get(0); Assert.assertEquals("wApp", appEntity.getAppName()); int result=uiAppService.update(appEntity); Assert.assertEquals(1, result); }
public int update(AppEntity updateEntity) { int result = 0; try { appService.updateVersionByIds(Arrays.asList(updateEntity.getId())); result = appRepository.update(updateEntity); } catch (Exception e) { e.printStackTrace(); } return result; }
UiAppService { public int update(AppEntity updateEntity) { int result = 0; try { appService.updateVersionByIds(Arrays.asList(updateEntity.getId())); result = appRepository.update(updateEntity); } catch (Exception e) { e.printStackTrace(); } return result; } }
UiAppService { public int update(AppEntity updateEntity) { int result = 0; try { appService.updateVersionByIds(Arrays.asList(updateEntity.getId())); result = appRepository.update(updateEntity); } catch (Exception e) { e.printStackTrace(); } return result; }  }
UiAppService { public int update(AppEntity updateEntity) { int result = 0; try { appService.updateVersionByIds(Arrays.asList(updateEntity.getId())); result = appRepository.update(updateEntity); } catch (Exception e) { e.printStackTrace(); } return result; }  UiResponse findByInstanceId(String instanceId); UiResponse findByAppName(Map parameterMap); int update(AppEntity updateEntity); UiResponse update(AppUpdateRequest appUpdateRequest); AppEntity setUpdateEntity(AppUpdateRequest appUpdateRequest); }
UiAppService { public int update(AppEntity updateEntity) { int result = 0; try { appService.updateVersionByIds(Arrays.asList(updateEntity.getId())); result = appRepository.update(updateEntity); } catch (Exception e) { e.printStackTrace(); } return result; }  UiResponse findByInstanceId(String instanceId); UiResponse findByAppName(Map parameterMap); int update(AppEntity updateEntity); UiResponse update(AppUpdateRequest appUpdateRequest); AppEntity setUpdateEntity(AppUpdateRequest appUpdateRequest);  }