EnterpriseBindPayment.Class.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**暂时没有用了
  3. * Created by PhpStorm.
  4. * User: XiaoMing
  5. * Date: 2019/12/4
  6. * Time: 14:40
  7. */
  8. namespace JinDouYun\Controller\System;
  9. use JinDouYun\Controller\BaseController;
  10. use Mall\Framework\Core\ErrorCode;
  11. use Mall\Framework\Core\StatusCode;
  12. use JinDouYun\Model\System\MEnterpriseBindPayment;
  13. class EnterpriseBindPayment extends BaseController
  14. {
  15. private $objMEnterpriseBindPayment;
  16. /**
  17. * SystemTemplate constructor.
  18. * @param bool $isCheckAcl
  19. * @param bool $isMustLogin
  20. */
  21. public function __construct($isCheckAcl = true, $isMustLogin = true)
  22. {
  23. parent::__construct($isCheckAcl, $isMustLogin);
  24. $this->objMEnterpriseBindPayment = new MEnterpriseBindPayment($this->onlineUserId, $this->onlineEnterpriseId);
  25. }
  26. /**
  27. * 添加,编辑企业模版模块
  28. * @return array
  29. */
  30. public function commonFieldFilter()
  31. {
  32. $params = $this->request->getRawJson();
  33. if (empty($params)) {
  34. $this->sendOutput('参数为空', ErrorCode::$paramError);
  35. }
  36. $data = [
  37. 'paymentId' => isset($params['paymentId']) ? $params['paymentId'] : '',
  38. 'paymentData' => isset($params['paymentData']) ? json_encode($params['paymentData']) : '',
  39. 'title' => isset($params['title']) ? $params['title'] : '',
  40. 'enableStatus' => isset($params['enableStatus']) ? $params['enableStatus'] : StatusCode::$delete,
  41. 'defaultStatus' => isset($params['defaultStatus']) ? $params['defaultStatus'] : StatusCode::$delete,
  42. 'enterpriseId' => $this->onlineEnterpriseId,
  43. ];
  44. foreach ($data as $key => $value) {
  45. if (empty($value) && $value !== 0) {
  46. $this->sendOutput($key . '参数错误', ErrorCode::$paramError);
  47. }
  48. }
  49. $data['logo'] = isset($params['logo']) ? $params['logo'] : '';
  50. return $data;
  51. }
  52. }