|
@@ -20,10 +20,11 @@ class FinancialProducts extends Base
|
|
|
public function List()
|
|
|
{
|
|
|
$param = $this->request->param(["skuCode" => "", "good_type" => "", "buyer_code" => "", "buyer_name" => "", "start" => "",
|
|
|
- "end" => "", "is_combind" => "", "basic_status" => "", "page" => 1, "size" => 15], "post", "trim");
|
|
|
+ "end" => "", "is_combind" => "","good_source"=>"" ,"basic_status" => "", "page" => 1, "size" => 15], "post", "trim");
|
|
|
$where = [];
|
|
|
if ($param['skuCode'] != "") $where[] = ["skuCode", "like", "%{$param['skuCode']}%"];
|
|
|
if ($param['good_type'] != "") $where[] = ["good_type", "=", $param['good_type']];
|
|
|
+ if($param['good_source']!="") $where[]= ["good_source","=",$param['good_source']];
|
|
|
if ($param['buyer_code'] != "") $where[] = ["buyer_code", "=", $param['buyer_code']];
|
|
|
if ($param['buyer_name'] != "") $where[] = ["buyer_name", "like", "%{$param['buyer_name']}%"];
|
|
|
if ($param['start'] != "") $where[] = ["create_time", ">=", startTime($param['start'])];
|
|
@@ -217,7 +218,7 @@ class FinancialProducts extends Base
|
|
|
public function getGoods()
|
|
|
{
|
|
|
$param = $this->request->param(["skuCode" => "", "good_type" => "", "buyer_code" => "", "seller_code" => "", "start" => "",
|
|
|
- "end" => "", "is_combind" => "", "basic_status" => "", "limit" => 100], "post", "trim");
|
|
|
+ "end" => "", "is_combind" => "","good_source"=>"", "basic_status" => "", "limit" => 100], "post", "trim");
|
|
|
$valid = $this->validate($param, [
|
|
|
'skuCode|商品编号' => 'max:255',
|
|
|
'good_type|商品类型' => 'in:1,2,3',
|
|
@@ -231,6 +232,7 @@ class FinancialProducts extends Base
|
|
|
if ($valid !== true) return error($valid);
|
|
|
$where = [];
|
|
|
if ($param['basic_status'] !== '') $where[] = ['basic_status', '=', $param['basic_status']];
|
|
|
+ if($param['good_source']!="") $where[]= ["good_source","=",$param['good_source']];
|
|
|
if (!empty($param['skuCode'])) $where[] = ['skuCode', 'like', '%' . $param['skuCode'] . '%'];
|
|
|
if (!empty($param['good_type'])) $where[] = ['good_type', '=', $param['good_type']];
|
|
|
if (!empty($param['buyer_code'])) $where[] = ['buyer_code', 'like', '%' . $param['buyer_code'] . '%'];
|