| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php
- namespace app\modules\admin\controllers;
- use app\modules\admin\models\WechatDeliveryForm;
- class WechatDeliveryController extends BaseController
- {
- //创建同城配送门店
- public function actionCreateStore() {
- $form = new WechatDeliveryForm();
- $form->attributes = post_params();
- $form->store_id = get_store_id();
- $form->md_id = get_md_id();
- return $this->asJson($form->createStore());
- }
- //获取门店信息
- public function actionGetDeliveryStore() {
- $form = new WechatDeliveryForm();
- $form->attributes = get_params();
- $form->store_id = get_store_id();
- $form->md_id = get_md_id();
- return $this->asJson($form->getDeliveryStore());
- }
- //充值
- public function actionStoreCharge() {
- $form = new WechatDeliveryForm();
- $form->attributes = post_params();
- $form->store_id = get_store_id();
- $form->md_id = get_md_id();
- return $this->asJson($form->storeCharge());
- }
- //退款
- public function actionStoreRefund() {
- $form = new WechatDeliveryForm();
- $form->attributes = post_params();
- $form->store_id = get_store_id();
- $form->md_id = get_md_id();
- return $this->asJson($form->storeRefund());
- }
- //查询
- public function actionBalanceQuery() {
- $form = new WechatDeliveryForm();
- $form->attributes = post_params();
- $form->store_id = get_store_id();
- $form->md_id = get_md_id();
- return $this->asJson($form->balanceQuery());
- }
- //同步流水
- public function actionQueryFlow() {
- $form = new WechatDeliveryForm();
- $form->attributes = post_params();
- $form->flow_type = 1;
- $form->store_id = get_store_id();
- $form->md_id = get_md_id();
- return $this->asJson($form->queryFlow());
- }
- //获取流水
- public function actionGetBalanceLog() {
- $form = new WechatDeliveryForm();
- $form->attributes = get_params();
- $form->store_id = get_store_id();
- $form->md_id = get_md_id();
- return $this->asJson($form->getBalanceLog());
- }
- }
|