lisai17@sina.com 2020-10-26 17:40:21 +08:00
parent 780bdc2ddc
commit ec9a392551
2 changed files with 7 additions and 7 deletions

View File

@ -36,7 +36,7 @@ public class InvoiceInvalidVerifySyncService {
}
InvoiceInvalidVerify old = InvoiceInvalidVerify.dao.findFirst(
"select * from invoice_invalid_verify t where t.state = ? and t.order_sn = ? limit 1", 1, order_sn);
"select * from invoice_invalid_verify t where t.order_sn = ? and ( t.state = 1 or t.state = 2 ) limit 1", order_sn);
if (old != null) {
return Result.failedstr("订单 %s 已提交申请", order_sn);
@ -88,10 +88,10 @@ public class InvoiceInvalidVerifySyncService {
public Result save(InvoiceInvalidVerify model, Sysuser sysuser) {
InvoiceInvalidVerify old = InvoiceInvalidVerify.dao.findFirst(
"select * from invoice_invalid_verify t \n" +
" where t.state = ? \n" +
" and t.invoice_number = ? \n" +
" wheret.invoice_number = ? \n" +
" and t.invoice_code = ? \n" +
" limit 1", 1, model.getInvoiceNumber(), model.getInvoiceCode());
" and ( t.state = 1 or t.state = 2 )" +
" limit 1", model.getInvoiceNumber(), model.getInvoiceCode());
if (old != null) {
return Result.failedstr("发票 %s|%s 已提交申请", model.getInvoiceNumber(), model.getInvoiceCode());

View File

@ -32,9 +32,9 @@ public class OrderInvalidVerifySyncService {
}
OrderInvalidVerify old = OrderInvalidVerify.dao.findFirst("select * from order_invalid_verify t \n" +
" where t.state = ? \n" +
" and t.order_sn = ? \n" +
" limit 1", 1, order_sn);
" where t.order_sn = ? \n" +
" and ( t.state= 1 or t.state = 2 )\n" +
" limit 1", order_sn);
if (old != null) {
return Result.failedstr("订单 %s 已提交申请", order_sn);