MerchantExtendController.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace saas\controllers;
  3. use biz\merchant\services\MerchantExtendService;
  4. use Yii;
  5. use biz\admin\services\AdminService;
  6. use biz\merchant\services\MerchantService;
  7. use common\components\util;
  8. use common\components\wxUtil;
  9. use common\services\xhMerchantService;
  10. class MerchantExtendController extends BaseController
  11. {
  12. //设置微信支付
  13. public function actionSetWxPay()
  14. {
  15. $post = Yii::$app->request->post();
  16. $merchantId = isset($post['merchantId']) ? $post['merchantId'] : 0;
  17. util::ok();
  18. MerchantExtendService::updateByCondition(['merchantId' => $merchantId], $post);
  19. }
  20. //设置支付宝支付
  21. public function actionSetAlipay()
  22. {
  23. $post = Yii::$app->request->post();
  24. $merchantId = isset($post['merchantId']) ? $post['merchantId'] : 0;
  25. util::ok();
  26. MerchantExtendService::updateByCondition(['merchantId' => $merchantId], $post);
  27. }
  28. //商家的拓展信息 shish 2020.2.16
  29. public function actionDetail()
  30. {
  31. $id = Yii::$app->request->get('id');
  32. $extend = MerchantExtendService::getByMerchantId($id);
  33. util::success($extend);
  34. }
  35. }