| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace pt\controllers;
- use biz\shop\classes\ShopYeChangeClass;
- use common\components\dict;
- use common\components\util;
- use Yii;
- class ShopYeChangeController extends BaseController
- {
- public $guestAccess = [];
- public function actionList()
- {
- $get = Yii::$app->request->get();
- $shopId = $get['shopId'] ?? 0;
- $tx = $get['tx'] ?? dict::getDict('yeTx', 'canNot');
- $where = [];
- $where['shopId'] = $shopId;
- if (!empty($tx)) {
- $where['tx'] = $tx;
- }
- $respond = ShopYeChangeClass::getChangeList($where);
- if (isset($respond['list']) && !empty($respond['list'])) {
- foreach ($respond['list'] as $key => $val) {
- if ($tx == dict::getDict('yeTx', 'can')) {
- $respond['list'][$key]['balance'] = '-';
- } else {
- $respond['list'][$key]['txBalance'] = '-';
- }
- }
- }
- util::success($respond);
- }
- }
|