@Test public void testKeepRound() throws Exception{ service.keepRound(3); }
@Override public void keepRound(long roundNum) { List<CommodityTemplate> temps = commodityService.getNotKeepRoundTemplate(roundNum); for (CommodityTemplate temp : temps) { final Integer count = temp.getCount(); for (int i = count; i < roundNum; i++) { generateCommodity(temp.getId(), temp.getBuyTotalNumber()); } } }
GenerateServiceImpl implements IGenerateService { @Override public void keepRound(long roundNum) { List<CommodityTemplate> temps = commodityService.getNotKeepRoundTemplate(roundNum); for (CommodityTemplate temp : temps) { final Integer count = temp.getCount(); for (int i = count; i < roundNum; i++) { generateCommodity(temp.getId(), temp.getBuyTotalNumber()); } } } }
GenerateServiceImpl implements IGenerateService { @Override public void keepRound(long roundNum) { List<CommodityTemplate> temps = commodityService.getNotKeepRoundTemplate(roundNum); for (CommodityTemplate temp : temps) { final Integer count = temp.getCount(); for (int i = count; i < roundNum; i++) { generateCommodity(temp.getId(), temp.getBuyTotalNumber()); } } }  }
GenerateServiceImpl implements IGenerateService { @Override public void keepRound(long roundNum) { List<CommodityTemplate> temps = commodityService.getNotKeepRoundTemplate(roundNum); for (CommodityTemplate temp : temps) { final Integer count = temp.getCount(); for (int i = count; i < roundNum; i++) { generateCommodity(temp.getId(), temp.getBuyTotalNumber()); } } }  @Override void generateCommodity(long tempId, long luckCodeCount); @Override String generateLuckCodes(long total); @Override void connectLuckCodes(long commodityId, long count); @Override void keepRound(long roundNum); @Override Long generateNewRoundTime(); }
GenerateServiceImpl implements IGenerateService { @Override public void keepRound(long roundNum) { List<CommodityTemplate> temps = commodityService.getNotKeepRoundTemplate(roundNum); for (CommodityTemplate temp : temps) { final Integer count = temp.getCount(); for (int i = count; i < roundNum; i++) { generateCommodity(temp.getId(), temp.getBuyTotalNumber()); } } }  @Override void generateCommodity(long tempId, long luckCodeCount); @Override String generateLuckCodes(long total); @Override void connectLuckCodes(long commodityId, long count); @Override void keepRound(long roundNum); @Override Long generateNewRoundTime();  }