Quellcode durchsuchen

修复铃铛bug

laiguoran vor 2 Jahren
Ursprung
Commit
4f9f2ed57b
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 4 4
      app/service/payment_detail.js

+ 4 - 4
app/service/payment_detail.js

@@ -209,9 +209,9 @@ module.exports = app => {
                 uid, auditConst.status.uncheck, auditConst.status.checkNo];
             const result = await this.db.query(sql, params);
             if (result && result.length > 0) {
-                for (const one of result) {
+                for (const one of this._.uniqBy(result, 'id')) {
                     const maxOrder = await this.count({
-                        tr_id: one.id,
+                        tr_id: one.tr_id,
                     });
                     if (one.order === maxOrder) {
                         return 1;
@@ -232,9 +232,9 @@ module.exports = app => {
                 uid, auditConst.status.uncheck, auditConst.status.checkNo];
             const result = await this.db.query(sql, params);
             if (result && result.length > 0) {
-                for (const one of result) {
+                for (const one of this._.uniqBy(result, 'id')) {
                     const maxOrder = await this.count({
-                        tr_id: one.id,
+                        tr_id: one.tr_id,
                     });
                     if (one.order === maxOrder) {
                         return 1;