|
|
@@ -9,6 +9,7 @@ use common\logic\SolverInterface; |
|
|
|
use common\logic\User\User\Model\User; |
|
|
|
use common\logic\User\User\Service\UserSolver; |
|
|
|
use common\logic\User\UserGroup\Model\UserGroup; |
|
|
|
use common\logic\User\UserGroup\Repository\UserGroupRepository; |
|
|
|
|
|
|
|
class ProductPriceSolver extends AbstractService implements SolverInterface |
|
|
|
{ |
|
|
@@ -90,7 +91,7 @@ class ProductPriceSolver extends AbstractService implements SolverInterface |
|
|
|
{ |
|
|
|
// @TODO : trouver une solution pour hydrater autrement cette donnée |
|
|
|
if($productPrice->id_user_group && !$productPrice->userGroup) { |
|
|
|
$userGroup = UserGroup::searchOne(['id' => $productPrice->id_user_group]); |
|
|
|
$userGroup = UserGroupRepository::getInstance()->findOneUserGroupById($productPrice->id_user_group); |
|
|
|
if($userGroup) { |
|
|
|
$productPrice->populateUserGroup($userGroup); |
|
|
|
} |
|
|
@@ -126,7 +127,7 @@ class ProductPriceSolver extends AbstractService implements SolverInterface |
|
|
|
{ |
|
|
|
// @TODO : trouver une solution pour hydrater autrement cette donnée |
|
|
|
if($productPrice->id_user_group && !$productPrice->userGroup) { |
|
|
|
$userGroup = UserGroup::searchOne(['id' => $productPrice->id_user_group]); |
|
|
|
$userGroup = UserGroupRepository::getInstance()->findOneUserGroupById($productPrice->id_user_group); |
|
|
|
if($userGroup) { |
|
|
|
$productPrice->populateUserGroup($userGroup); |
|
|
|
} |