Bläddra i källkod

合同支付,查询优化

MaiXinRong 3 år sedan
förälder
incheckning
9aa5d4f7a7
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      app/service/stage_pay.js

+ 2 - 2
app/service/stage_pay.js

@@ -40,7 +40,7 @@ module.exports = app => {
             const sql = 'SELECT SP.*, P.`csorder`, P.`cstimes`, P.`csaorder`, P.`order`, P.uid, P.minus, P.ptype, P.sprice, P.sexpr, P.rprice, P.rexpr, P.is_yf, P.dl_type, P.dl_count, P.dl_tp_type, P.dl_tp ' +
                 '  FROM ' + this.tableName + ' As SP ' +
                 '  LEFT JOIN ' + this.ctx.service.pay.tableName + ' As P ' +
-                '  ON SP.pid = p.id' +
+                '  ON SP.pid = P.id' +
                 '  WHERE SP.`sid` = ? AND SP.`stimes` = ? AND SP.`sorder` = ? AND SP.`pid` = P.`id` AND P.`valid`' + pidSql +
                 '  ORDER BY P.`order`';
             const sqlParam = [sid, times, order, pid];
@@ -65,7 +65,7 @@ module.exports = app => {
                 '    P.rprice, P.rexpr, P.is_yf, P.dl_type, P.dl_count, P.dl_tp_type, P.dl_tp, P.name as pName ' +
                 '  FROM ' + this.tableName + ' As SP ' +
                 '  LEFT JOIN ' + this.ctx.service.pay.tableName + ' As P ' +
-                '  ON SP.pid = p.id' +
+                '  ON SP.pid = P.id' +
                 '  WHERE SP.`sid` = ? AND SP.`stimes` = ? AND SP.`sorder` = ? AND SP.`pid` = P.`id` AND P.`valid`' +
                 '  ORDER BY P.`order`';
             const sqlParam = [sid, times, order];