@Test public void testGetNextInvoiceCode() throws Exception { }
@Override public synchronized CommonResult getNextInvoiceCode() { String nextInvoiceCode = invoiceMapper.getAvailableInvoiceCode(null); if(nextInvoiceCode == null) return CommonResult.fail(E_713); invoiceMapper.updateInvoiceStatusById((byte)2, nextInvoiceCode); System.out.println("[INFO]正在使用发票号: " + nextInvoiceCode); return CommonResult.success(nextInvoiceCode); }
InvoiceServiceImpl implements InvoiceService { @Override public synchronized CommonResult getNextInvoiceCode() { String nextInvoiceCode = invoiceMapper.getAvailableInvoiceCode(null); if(nextInvoiceCode == null) return CommonResult.fail(E_713); invoiceMapper.updateInvoiceStatusById((byte)2, nextInvoiceCode); System.out.println("[INFO]正在使用发票号: " + nextInvoiceCode); return CommonResult.success(nextInvoiceCode); } }
InvoiceServiceImpl implements InvoiceService { @Override public synchronized CommonResult getNextInvoiceCode() { String nextInvoiceCode = invoiceMapper.getAvailableInvoiceCode(null); if(nextInvoiceCode == null) return CommonResult.fail(E_713); invoiceMapper.updateInvoiceStatusById((byte)2, nextInvoiceCode); System.out.println("[INFO]正在使用发票号: " + nextInvoiceCode); return CommonResult.success(nextInvoiceCode); }  }
InvoiceServiceImpl implements InvoiceService { @Override public synchronized CommonResult getNextInvoiceCode() { String nextInvoiceCode = invoiceMapper.getAvailableInvoiceCode(null); if(nextInvoiceCode == null) return CommonResult.fail(E_713); invoiceMapper.updateInvoiceStatusById((byte)2, nextInvoiceCode); System.out.println("[INFO]正在使用发票号: " + nextInvoiceCode); return CommonResult.success(nextInvoiceCode); }  @Override synchronized CommonResult getNextInvoiceCode(); @Override CommonResult updateStatus(Byte status, String invoiceCode); @Override CommonResult insertInvoices(String beginInvoiceCode, String endInvoiceCode); @Override CommonResult getInvoiceInfo(); @Override CommonResult list(); }
InvoiceServiceImpl implements InvoiceService { @Override public synchronized CommonResult getNextInvoiceCode() { String nextInvoiceCode = invoiceMapper.getAvailableInvoiceCode(null); if(nextInvoiceCode == null) return CommonResult.fail(E_713); invoiceMapper.updateInvoiceStatusById((byte)2, nextInvoiceCode); System.out.println("[INFO]正在使用发票号: " + nextInvoiceCode); return CommonResult.success(nextInvoiceCode); }  @Override synchronized CommonResult getNextInvoiceCode(); @Override CommonResult updateStatus(Byte status, String invoiceCode); @Override CommonResult insertInvoices(String beginInvoiceCode, String endInvoiceCode); @Override CommonResult getInvoiceInfo(); @Override CommonResult list();  }