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