@Test public void testFreezeTransactionLogs() throws Exception { }
@Override public CommonResult freezeTransactionLogs(DailySummaryParam dailySummaryParam){ List<HashMap> transactionLogs = dailySummaryParam.getInvoiceCollection(); Integer cashierRoleId = dailySummaryParam.getCashierId(); Timestamp beginDate = Timestamp.valueOf(dailySummaryParam.getBeginDateStr()); Timestamp endDate = Timestamp.valueOf(dailySummaryParam.getEndDateStr()); BigDecimal totalMoney = dailySummaryParam.getTotalMoney(); String invoiceCodeBegin = dailySummaryParam.getInvoiceCodeBegin(); String invoiceCodeEnd = dailySummaryParam.getInvoiceCodeEnd(); DailySummaryLog dailySummaryLog = new DailySummaryLog(cashierRoleId, totalMoney, invoiceCodeBegin, invoiceCodeEnd, beginDate, endDate); for (HashMap t: transactionLogs){ transactionLogMapper.updateTransactionLogsByInvoiceCode((String) t.get("invoiceCode")); } int count = dailySummaryLogMapper.insert(dailySummaryLog); if (count > 0) return CommonResult.success(count); else return CommonResult.fail(E_805); }
DailySummaryServiceImpl implements DailySummaryService { @Override public CommonResult freezeTransactionLogs(DailySummaryParam dailySummaryParam){ List<HashMap> transactionLogs = dailySummaryParam.getInvoiceCollection(); Integer cashierRoleId = dailySummaryParam.getCashierId(); Timestamp beginDate = Timestamp.valueOf(dailySummaryParam.getBeginDateStr()); Timestamp endDate = Timestamp.valueOf(dailySummaryParam.getEndDateStr()); BigDecimal totalMoney = dailySummaryParam.getTotalMoney(); String invoiceCodeBegin = dailySummaryParam.getInvoiceCodeBegin(); String invoiceCodeEnd = dailySummaryParam.getInvoiceCodeEnd(); DailySummaryLog dailySummaryLog = new DailySummaryLog(cashierRoleId, totalMoney, invoiceCodeBegin, invoiceCodeEnd, beginDate, endDate); for (HashMap t: transactionLogs){ transactionLogMapper.updateTransactionLogsByInvoiceCode((String) t.get("invoiceCode")); } int count = dailySummaryLogMapper.insert(dailySummaryLog); if (count > 0) return CommonResult.success(count); else return CommonResult.fail(E_805); } }
DailySummaryServiceImpl implements DailySummaryService { @Override public CommonResult freezeTransactionLogs(DailySummaryParam dailySummaryParam){ List<HashMap> transactionLogs = dailySummaryParam.getInvoiceCollection(); Integer cashierRoleId = dailySummaryParam.getCashierId(); Timestamp beginDate = Timestamp.valueOf(dailySummaryParam.getBeginDateStr()); Timestamp endDate = Timestamp.valueOf(dailySummaryParam.getEndDateStr()); BigDecimal totalMoney = dailySummaryParam.getTotalMoney(); String invoiceCodeBegin = dailySummaryParam.getInvoiceCodeBegin(); String invoiceCodeEnd = dailySummaryParam.getInvoiceCodeEnd(); DailySummaryLog dailySummaryLog = new DailySummaryLog(cashierRoleId, totalMoney, invoiceCodeBegin, invoiceCodeEnd, beginDate, endDate); for (HashMap t: transactionLogs){ transactionLogMapper.updateTransactionLogsByInvoiceCode((String) t.get("invoiceCode")); } int count = dailySummaryLogMapper.insert(dailySummaryLog); if (count > 0) return CommonResult.success(count); else return CommonResult.fail(E_805); }  }
DailySummaryServiceImpl implements DailySummaryService { @Override public CommonResult freezeTransactionLogs(DailySummaryParam dailySummaryParam){ List<HashMap> transactionLogs = dailySummaryParam.getInvoiceCollection(); Integer cashierRoleId = dailySummaryParam.getCashierId(); Timestamp beginDate = Timestamp.valueOf(dailySummaryParam.getBeginDateStr()); Timestamp endDate = Timestamp.valueOf(dailySummaryParam.getEndDateStr()); BigDecimal totalMoney = dailySummaryParam.getTotalMoney(); String invoiceCodeBegin = dailySummaryParam.getInvoiceCodeBegin(); String invoiceCodeEnd = dailySummaryParam.getInvoiceCodeEnd(); DailySummaryLog dailySummaryLog = new DailySummaryLog(cashierRoleId, totalMoney, invoiceCodeBegin, invoiceCodeEnd, beginDate, endDate); for (HashMap t: transactionLogs){ transactionLogMapper.updateTransactionLogsByInvoiceCode((String) t.get("invoiceCode")); } int count = dailySummaryLogMapper.insert(dailySummaryLog); if (count > 0) return CommonResult.success(count); else return CommonResult.fail(E_805); }  @Override CommonResult getLastEndDate(Integer cashierId); @Override CommonResult listLogsByCashierIdAndDate(DailySummaryParam dailySummaryParam); @Override CommonResult freezeTransactionLogs(DailySummaryParam dailySummaryParam); @Override CommonResult listHistorySummaryLogs(DailySummaryParam dailySummaryParam); @Override CommonResult listInvoiceInfoByCashierIdAndDate(DailySummaryParam dailySummaryParam); @Override CommonResult getFirstSummaryDate(Integer cashierId); }
DailySummaryServiceImpl implements DailySummaryService { @Override public CommonResult freezeTransactionLogs(DailySummaryParam dailySummaryParam){ List<HashMap> transactionLogs = dailySummaryParam.getInvoiceCollection(); Integer cashierRoleId = dailySummaryParam.getCashierId(); Timestamp beginDate = Timestamp.valueOf(dailySummaryParam.getBeginDateStr()); Timestamp endDate = Timestamp.valueOf(dailySummaryParam.getEndDateStr()); BigDecimal totalMoney = dailySummaryParam.getTotalMoney(); String invoiceCodeBegin = dailySummaryParam.getInvoiceCodeBegin(); String invoiceCodeEnd = dailySummaryParam.getInvoiceCodeEnd(); DailySummaryLog dailySummaryLog = new DailySummaryLog(cashierRoleId, totalMoney, invoiceCodeBegin, invoiceCodeEnd, beginDate, endDate); for (HashMap t: transactionLogs){ transactionLogMapper.updateTransactionLogsByInvoiceCode((String) t.get("invoiceCode")); } int count = dailySummaryLogMapper.insert(dailySummaryLog); if (count > 0) return CommonResult.success(count); else return CommonResult.fail(E_805); }  @Override CommonResult getLastEndDate(Integer cashierId); @Override CommonResult listLogsByCashierIdAndDate(DailySummaryParam dailySummaryParam); @Override CommonResult freezeTransactionLogs(DailySummaryParam dailySummaryParam); @Override CommonResult listHistorySummaryLogs(DailySummaryParam dailySummaryParam); @Override CommonResult listInvoiceInfoByCashierIdAndDate(DailySummaryParam dailySummaryParam); @Override CommonResult getFirstSummaryDate(Integer cashierId);  }