浏览代码

开票二维码存表

renjiaojiao 1 年之前
父节点
当前提交
e590bd6164
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/jfw/modules/subscribepay/src/service/invoice.go

+ 3 - 3
src/jfw/modules/subscribepay/src/service/invoice.go

@@ -1543,13 +1543,13 @@ func OpenInvoiceAgain(oldOnlyIdentifying string, data map[string]interface{}) er
 	if oldOnlyIdentifying == "" {
 		return errors.New("缺少关键参数")
 	}
+	if util.Mysql.Count("invoice_fail_record", map[string]interface{}{"only_Identifying": oldOnlyIdentifying}) >= config.InvoiceConfig.SubmitNum {
+		return errors.New("提交次数已达上限")
+	}
 	ok := InvoiceFailRecord(oldOnlyIdentifying)
 	if !ok {
 		return errors.New("插入失败记录出错")
 	}
-	if util.Mysql.Count("invoice_fail_record", map[string]interface{}{"only_Identifying": oldOnlyIdentifying}) >= config.InvoiceConfig.SubmitNum {
-		return errors.New("提交次数已达上限")
-	}
 	if !util.Mysql.Update("invoice", map[string]interface{}{"only_Identifying": oldOnlyIdentifying}, data) {
 		return errors.New("再次开票更新发票信息出错")
 	}