@Test public void testUpdateCostById() throws Exception { }
@Override public CommonResult updateCostById(Cost cost){ if (costMapper.get(cost.getId()) == null) { return CommonResult.fail(E_602); } int count = costMapper.update(cost); if (count == 0) { return CommonResult.fail(); } return CommonResult.success(count); }
CostManagementImpl implements CostManagementService { @Override public CommonResult updateCostById(Cost cost){ if (costMapper.get(cost.getId()) == null) { return CommonResult.fail(E_602); } int count = costMapper.update(cost); if (count == 0) { return CommonResult.fail(); } return CommonResult.success(count); } }
CostManagementImpl implements CostManagementService { @Override public CommonResult updateCostById(Cost cost){ if (costMapper.get(cost.getId()) == null) { return CommonResult.fail(E_602); } int count = costMapper.update(cost); if (count == 0) { return CommonResult.fail(); } return CommonResult.success(count); }  }
CostManagementImpl implements CostManagementService { @Override public CommonResult updateCostById(Cost cost){ if (costMapper.get(cost.getId()) == null) { return CommonResult.fail(E_602); } int count = costMapper.update(cost); if (count == 0) { return CommonResult.fail(); } return CommonResult.success(count); }  @Override CommonResult listAllCosts(); @Override CommonResult getCostById(Integer id); @Override CommonResult insertCost(Cost cost); @Override CommonResult updateCostById(Cost cost); @Override CommonResult deleteCostById(Integer id); }
CostManagementImpl implements CostManagementService { @Override public CommonResult updateCostById(Cost cost){ if (costMapper.get(cost.getId()) == null) { return CommonResult.fail(E_602); } int count = costMapper.update(cost); if (count == 0) { return CommonResult.fail(); } return CommonResult.success(count); }  @Override CommonResult listAllCosts(); @Override CommonResult getCostById(Integer id); @Override CommonResult insertCost(Cost cost); @Override CommonResult updateCostById(Cost cost); @Override CommonResult deleteCostById(Integer id);  }