InstallService.php 375 B

1234567891011121314151617
  1. <?php
  2. namespace app\common\service;
  3. use app\common\model\GoodsInstallLink;
  4. class InstallService{
  5. /**
  6. * sku_id=>[num=>1,]
  7. */
  8. public static function getFee($goods,$numKey='num_install'){
  9. $fee=0;
  10. foreach ($goods as $sku_id=>$info){
  11. $fee=bcadd($fee,GoodsInstallLink::getFee($sku_id,$info[$numKey]));
  12. }
  13. return $fee;
  14. }
  15. }