MerchantExtendController.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace pt\controllers;
  3. use biz\sj\services\MerchantExtendService;
  4. use Yii;
  5. use bizHd\admin\services\AdminService;
  6. use biz\sj\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. $sjId = isset($post['sjId']) ? $post['sjId'] : 0;
  17. $post['wxPayInit'] = 1;
  18. MerchantExtendService::updateByCondition(['sjId' => $sjId], $post);
  19. util::complete();
  20. }
  21. //设置支付宝支付
  22. public function actionSetAlipay()
  23. {
  24. $post = Yii::$app->request->post();
  25. $sjId = isset($post['sjId']) ? $post['sjId'] : 0;
  26. $post['alipayInit'] = 1;
  27. MerchantExtendService::updateByCondition(['sjId' => $sjId], $post);
  28. util::complete();
  29. }
  30. //商家的拓展信息 ssh 2020.2.16
  31. public function actionDetail()
  32. {
  33. $id = Yii::$app->request->get('id');
  34. $extend = MerchantExtendService::getBySjId($id);
  35. util::success($extend);
  36. }
  37. }