ConfigService.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的多应用管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace addon\mall\app\service\api;
  12. use addon\mall\app\service\core\order\CoreOrderConfigService;
  13. use app\service\core\sys\CoreConfigService;
  14. use core\base\BaseApiService;
  15. /**
  16. * 订单服务层
  17. */
  18. class ConfigService extends BaseApiService
  19. {
  20. /**
  21. * 查询发票配置
  22. * @return array|mixed
  23. */
  24. public function getInvoiceConfig() {
  25. $config = (new CoreConfigService())->getConfigValue(0, 'MALL_INVOICE');
  26. if (empty($config)) {
  27. $config = [
  28. 'is_invoice' => '2',
  29. 'invoice_type' => [],
  30. 'invoice_content' => []
  31. ];
  32. }
  33. return $config;
  34. }
  35. /**
  36. * 获取评价设置
  37. * @return array|int[]|mixed
  38. */
  39. public function getEvaluateConfig()
  40. {
  41. return (new CoreOrderConfigService())->getEvaluateConfig();
  42. }
  43. }