|
|
|
@ -30,7 +30,7 @@ class Payment extends PaymentModel |
|
|
|
|
public function updateOptions(array $form, $merchantId = 0): bool |
|
|
|
|
{ |
|
|
|
|
// 生成写入的数据 |
|
|
|
|
$dataList = $this->buildData($form, $merchantId); |
|
|
|
|
$dataList = $this->buildData($form/*, $merchantId*/); |
|
|
|
|
// 删除所有的支付方式记录 |
|
|
|
|
static::deleteAll([]); |
|
|
|
|
// 批量写入商品图片记录 |
|
|
|
@ -65,7 +65,7 @@ class Payment extends PaymentModel |
|
|
|
|
* @param array $form |
|
|
|
|
* @return array[] |
|
|
|
|
*/ |
|
|
|
|
private function buildData(array $form, $merchantId = 0): array |
|
|
|
|
private function buildData(array $form/*, $merchantId = 0*/): array |
|
|
|
|
{ |
|
|
|
|
$data = []; |
|
|
|
|
foreach ($form as $item) { |
|
|
|
@ -79,7 +79,7 @@ class Payment extends PaymentModel |
|
|
|
|
'is_default' => (int)$method['is_default'], |
|
|
|
|
'others' => [], |
|
|
|
|
'store_id' => self::$storeId, |
|
|
|
|
'merchant_id' => $merchantId, |
|
|
|
|
//'merchant_id' => $merchantId, |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|