wugg 1 năm trước cách đây
mục cha
commit
d004b83037
2 tập tin đã thay đổi với 15 bổ sung6 xóa
  1. 4 4
      app/admin/controller/Sale.php
  2. 11 2
      app/txx/controller/TxGood.php

+ 4 - 4
app/admin/controller/Sale.php

@@ -5350,10 +5350,10 @@ class Sale extends Base
 		            $upd=$fill->save();
 		            if($upd==false)throw new \Exception('业务报备单更新失败');
                 }
-//				 $fininfo =GetFin("admin/orderischeck",["token"=>$this->post['token'],"orderCode"=>$sale['orderCode'], "isCgd"=>1]);
-//				if(!isset($fininfo['code'])||$fininfo['code']!=0 ){
-//					throw new Exception($fininfo['message']??"结算校验失败");
-//				}
+				 $fininfo =GetFin("admin/orderischeck",["token"=>$this->post['token'],"orderCode"=>$sale['orderCode'], "isCgd"=>1]);
+				if(!isset($fininfo['code'])||$fininfo['code']!=0 ){
+					throw new Exception($fininfo['message']??"结算校验失败");
+				}
 				$thtemp=[
 					"orderCode"=>$sale["orderCode"],
 					"th_type"=>4,//取消订单

+ 11 - 2
app/txx/controller/TxGood.php

@@ -3,7 +3,15 @@ declare (strict_types = 1);
 
 namespace app\txx\controller;
 
-use app\admin\model\Brand;use app\admin\model\Cat;use app\admin\model\PlatformYouzan;use app\admin\model\Unit;use app\report\model\GoodSpec;use app\report\model\SpecValue;use app\txx\model\ActGoodurl;use app\txx\model\YzGood;use think\App;use think\facade\Db;use think\facade\Validate;
+use app\admin\model\Brand;
+use app\admin\model\Cat;
+use app\admin\model\PlatformYouzan;
+use app\admin\model\Unit;
+use app\report\model\GoodSpec;
+use app\txx\model\ActGoodurl;
+use app\txx\model\YzGood;
+use think\App;
+use think\facade\Validate;
 
 class TxGood extends Base
 {
@@ -90,7 +98,7 @@ class TxGood extends Base
 		$this->success('获取成功',["list"=>$list->items(),"count"=>$list->total()]);
 	}
 	
-	  public function GoodInfo(){
+	public function GoodInfo(){
 	    $param =$this->request->only(['skuCode'=>''],'post','trim');
 	    $valid =Validate::rule(['skuCode|商品上线编号'=>'require']);
 		if($valid->check($param)==false)$this->error($valid->getError());
@@ -110,6 +118,7 @@ class TxGood extends Base
 	        $info->brand_name =Brand::where('id',$info->brand_id)->value('brand_name','');
 			$info->unit_name =Unit::where('id',$info->good_unit)->value('unit','');
 			$info->cat_name =Cat::where('id',$info->cat_id)->value('search','');
+			$info->act_good_url =ActGoodurl::where(['act_good_id'=>$info->platform_youzan_id,'is_del'=>0])->value('act_good_url','');;
 	        $info->good_url =YzGood::where(['item_no'=>$info->skuCode,'is_del'=>0])->value('detail_url','');
 	        $info->origin_price =YzGood::where(['item_no'=>$info->skuCode,'is_del'=>0])->value('origin','');
 	        $info->specinfo =GoodSpec::where(['spuCode' => $info->spuCode, 'is_del' => 0])->with(['spec','Spec_info'])->field('spec_id,spec_value_id')->select();