| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\modules\admin\controllers\alipay;
- use app\modules\admin\controllers\BaseController;
- use app\modules\admin\models\AlipayThirdForm;
- use app\utils\Delivery\Alipay\ADelivery;
- use app\modules\admin\models\CouponForm;
- use \app\models\AlipayAcitvityVoucherOrder;
- class DeliveryController extends BaseController
- {
- public function actionConf() {
- $store_id = get_store_id();
- $mini_id = post_params("id")??get_params("id");
- try {
- $conf = ADelivery::getConf($store_id, $mini_id, 1, 1, 1);
- $res = [
- 'code'=>0,
- 'msg'=>'ok',
- 'data'=>$conf,
- ];
- } catch (\Exception $e) {
- return $this->asJson([
- 'code'=>1,
- 'msg'=>$e->getMessage(),
- ]);
- }
- return $this->asJson($res);
- }
- public function actionCompanyList() {
- $form = new AlipayThirdForm();
- $form->mini_id = post_params("id")??get_params("id");
- $res = $form->AlipayCommerceLogisticsLogisticscompanyInstantdeliveryQueryRequest();
- return $this->asJson($res);
- }
- public function actionCreateAccount() {
- $store_id = get_store_id();
- $mini_id = post_params("id")??get_params("id");
- $logistics_codes = post_params('logistics_codes');
- $res = ADelivery::createAccount($store_id, $mini_id, $logistics_codes);
- return $this->asJson($res);
- }
- public function actionQueryAccount() {
- $form = new AlipayThirdForm();
- $form->mini_id = post_params("id")??get_params("id");
- $res = $form->AlipayOpenInstantdeliveryAccountQueryRequest();
- return $this->asJson($res);
- }
- public function actionCreateMd() {
- $store_id = get_store_id();
- $mini_id = post_params("id")??get_params("id");
- $biz_content = post_params();
- $res = ADelivery::createMd($store_id, $mini_id, $biz_content);
- return $this->asJson($res);
- }
- public function actionQueryMd() {
- $store_id = get_store_id();
- $mini_id = post_params("id")??get_params("id");
- $res = ADelivery::getMd($store_id, $mini_id);
- return $this->asJson($res);
- }
- public function actionListMd() {
- $form = new AlipayThirdForm();
- $form->mini_id = post_params("id")??get_params("id");
- $page_no = post_params('page', 1);
- $res = $form->AlipayOpenInstantdeliveryMerchantshopQueryRequest($page_no);
- return $this->asJson($res);
- }
- }
|