wugg 2 年之前
父節點
當前提交
f7c4bdbdf6
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 1 1
      app/admin/controller/InterOrder.php
  2. 3 1
      app/admin/controller/OrderPay.php

+ 1 - 1
app/admin/controller/InterOrder.php

@@ -467,7 +467,7 @@ class InterOrder extends \app\admin\BaseController{
         $id = isset($post['id'])&&$post['id']!='' ? $post['id'] :"";
         $condition = [['a.id',"=",$id]];
         $list=Db::name('inter_order')->alias('a')->join('qrd_info b',"a.orderCode=b.sequenceNo and b.is_del=0 and b.department='网络部'",'left')
-            ->join('cgd_info c',"a.orderCode=b.sequenceNo and c.is_del=0 and c.department='网络部'",'left')->json
+            ->join('cgd_info c',"a.cgdNo=c.sequenceNo and c.is_del=0 and c.department='网络部'",'left')->json
             (["cat"])->where($condition)
             ->order("a.addtime desc")->field('a.id,
             b.goodNo ,

+ 3 - 1
app/admin/controller/OrderPay.php

@@ -930,9 +930,11 @@ class OrderPay extends BaseController{
        Db::startTrans();
         try{
             $tra=[];
+            $i=0;
             foreach ($list as $value) {
                 $temp = [];
-                $temp["tradNo"] = makeStr('S');
+                 $i++;
+                $temp["tradNo"] = makeStr('S').str_pad($i,3,'0');
                 $temp['trade_time'] = $value['tradeTime'];
                 $temp['total_fee'] = $value['trade_fee'];
                 $temp['trade_bank'] = $value['trade_bank'];