|
|
|
@ -4,6 +4,7 @@ namespace Repository\OrderPrint;
|
|
|
|
|
|
|
|
|
|
use CheckClient;
|
|
|
|
|
use CommonTool;
|
|
|
|
|
use Dao\Mall\MallSDao;
|
|
|
|
|
use Dao\OrderPrint\OpSysExpressTplDao;
|
|
|
|
|
use Dao\OrderPrint\OpUserExpressTplAuthDao;
|
|
|
|
|
use Dao\OrderPrint\OpUserExpressTplDao;
|
|
|
|
@ -19,12 +20,14 @@ use StatusConst;
|
|
|
|
|
use ZcArrayHelper;
|
|
|
|
|
|
|
|
|
|
class ExpressTplRepository extends AbstractRepository {
|
|
|
|
|
private $mallSDao;
|
|
|
|
|
private $opSysExpressTplDao;
|
|
|
|
|
private $opUserExpressTplDao;
|
|
|
|
|
private $opUserExpressTplAuthDao;
|
|
|
|
|
|
|
|
|
|
protected function __construct() {
|
|
|
|
|
parent::__construct();
|
|
|
|
|
$this->mallSDao = MallSDao::instance();
|
|
|
|
|
$this->opSysExpressTplDao = OpSysExpressTplDao::instance();
|
|
|
|
|
$this->opUserExpressTplDao = OpUserExpressTplDao::instance();
|
|
|
|
|
$this->opUserExpressTplAuthDao = OpUserExpressTplAuthDao::instance();
|
|
|
|
@ -37,8 +40,11 @@ class ExpressTplRepository extends AbstractRepository {
|
|
|
|
|
|
|
|
|
|
public function getUserExpressTplList($mallId, $filter = null) {
|
|
|
|
|
$expressList = $this->opUserExpressTplDao->searchList($mallId, $filter);
|
|
|
|
|
$mallIds = array_column($expressList, 'ownerMallId');
|
|
|
|
|
$mallIdAndMallNameMap = $this->mallSDao->getMallIdAndMallNameMap($mallIds);
|
|
|
|
|
foreach ($expressList as &$tmpExpress) {
|
|
|
|
|
$tmpExpress = $this->rebuildUserExpressTpl($tmpExpress);
|
|
|
|
|
$tmpExpress['ownerMallName'] = $mallIdAndMallNameMap[$tmpExpress['ownerMallId']];
|
|
|
|
|
}
|
|
|
|
|
return $expressList;
|
|
|
|
|
}
|
|
|
|
|