Commit f892fe05 by lzzzzl

修改更新逻辑

parent 3d79e732
...@@ -78,6 +78,10 @@ class CustomerModel extends Model ...@@ -78,6 +78,10 @@ class CustomerModel extends Model
* 更新客户信息 * 更新客户信息
*/ */
public function updateCustomerInfo($arr) { public function updateCustomerInfo($arr) {
if(!empty($arr['erp_client_sn'])) {
$this->cusSn2Redis($arr['erp_client_sn'],$arr['erp_customer_id']);
$this->cusId2Redis($arr['erp_customer_id'],json_encode($arr));
}
return $this->where('erp_customer_id', '=', $arr)->update($arr); return $this->where('erp_customer_id', '=', $arr)->update($arr);
} }
......
...@@ -77,8 +77,11 @@ class SupplierModel extends Model ...@@ -77,8 +77,11 @@ class SupplierModel extends Model
* 更新供应商信息 * 更新供应商信息
*/ */
public function updateSupplierInfo($arr) { public function updateSupplierInfo($arr) {
if(!empty($arr['erp_supplier_sn'])) {
$this->supSn2Redis($arr['erp_supplier_sn'],$arr['supplier_id']);
$this->supId2Redis($arr['supplier_id'],json_encode($arr));
}
return $this->where('erp_supplier_id', '=', $arr)->update($arr); return $this->where('erp_supplier_id', '=', $arr)->update($arr);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment