20240120-ljl-routeConfig
ljl 10 months ago
parent 9bb0ee768b
commit 8a5e9b9f8a

@ -245,4 +245,12 @@ class ExpressTplRepository extends AbstractRepository {
} }
return $templateUrl; return $templateUrl;
} }
public function saveExpressWaybillAccount($mallId, $expressTplId, $account) {
return $this->opUserExpressTplDao->update(array(
'waybill_account' => serialize($account),
'gmt_modified' => \ZcDbEval::now()
), 'op_user_express_tpl_id = %i and `mall_id` = %s', $expressTplId, $mallId);
}
} }

@ -160,6 +160,13 @@ class ExpressTplService extends AbstractService {
CheckClient::checkEmpty($tplId, null, '模板id不能为空'); CheckClient::checkEmpty($tplId, null, '模板id不能为空');
$expressTpl = $this->expressTplRepository->getUserExpressTplById($mallId, $tplId); $expressTpl = $this->expressTplRepository->getUserExpressTplById($mallId, $tplId);
CheckClient::checkEmpty($expressTpl, null, '模板不存在'); CheckClient::checkEmpty($expressTpl, null, '模板不存在');
$account = $this->buildWaybillAccount($expressTpl, $params);
CheckClient::checkAnyEmpty('保存账号数据,参数错误', $tplId, $account);
$affRow = $this->expressTplRepository->saveExpressWaybillAccount($mallId, $tplId, $account);
CheckClient::checkIsFalse($affRow, '修改网点信息失败');
} }
private function buildWaybillAccount($expressTpl, $data) { private function buildWaybillAccount($expressTpl, $data) {
@ -191,12 +198,7 @@ class ExpressTplService extends AbstractService {
private function buildPddCloudWaybillAccount($params) { private function buildPddCloudWaybillAccount($params) {
return [ return [
'branchCode' => $params['branchCode'],
'branchName' => $params['branchName'],
'customerCode' => $params['customerCode'],
'branchAddress' => $params['branchAddress'], 'branchAddress' => $params['branchAddress'],
'orderType' => $params['orderType'],
'payType' => $params['payType'],
'serviceList' => $params['serviceList'], 'serviceList' => $params['serviceList'],
]; ];
} }

Loading…
Cancel
Save