20240120-ljl-routeConfig
ljl 10 months ago
parent 42bec9bd7d
commit 8c460de44c

@ -51,11 +51,16 @@ class PrintSettingService extends AbstractService {
public function getOpSetting($mallId) {
$opSetting = $this->opSettingRepository->getOpSetting($mallId);
$goodsPrintConfig = $this->getUserOpGoodsPrintConfig($mallId);
$opSetting['goodsSkipPrintKeywords'] = $goodsPrintConfig['goodsSkipPrintKeywords'];
return $opSetting;
}
public function saveOpSetting($mallId, $data) {
$opSetting = $this->opSettingRepository->saveUserOpSetting($mallId, $data);
if (isset($data['goodsSkipPrintKeywords'])) {
$this->saveUserOpGoodsPrintConfig($mallId, ['goodsSkipPrintKeywords' => $data['goodsSkipPrintKeywords']]);
}
return $opSetting;
}
@ -115,14 +120,15 @@ class PrintSettingService extends AbstractService {
public function saveUserOpGoodsPrintConfig($mallId, $data) {
$fieldsMap = array(
'num_position' => 'numPosition',
'title_mode' => 'titleMode',
'spec_mode' => 'specMode',
'wrap_mode' => 'wrapMode',
'wrap_on_num' => 'wrapOnNum',
'is_print_gift' => 'isPrintGift',
'numPosition' => 'numPosition',
'titleMode' => 'titleMode',
'specMode' => 'specMode',
'wrapMode' => 'wrapMode',
'wrapOnNum' => 'wrapOnNum',
'isPrintGift' => 'isPrintGift',
'goodsSkipPrintKeywords' => 'goodsSkipPrintKeywords',
);
$config = ['mall_id' => $mallId];
$config = ['mallId' => $mallId];
foreach ($fieldsMap as $field => $key) {
if (isset($data[$key])) {
$config[$field] = $data[$key];

Loading…
Cancel
Save