1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- namespace app\controller\store\order;
- use app\common\controller\Recharge as CommonRecharge;
- use app\controller\store\AuthController;
- use app\services\user\UserRechargeServices;
- use think\facade\App;
- class Recharge extends AuthController
- {
- use CommonRecharge;
-
- protected $services;
-
- public function __construct(App $app, UserRechargeServices $services)
- {
- parent::__construct($app);
- $this->services = $services;
- }
-
- public function index()
- {
- $where = $this->request->getMore([
- ['data', ''],
- ['paid', 1],
- ['staff_id', ''],
- ]);
- $where['nickname'] = $this->request->param('nickname', '');
- $where['store_id'] = $this->storeId;
- return $this->success($this->services->getRechargeList($where, '*', 0, ['staff']));
- }
-
- public function getRemark($id)
- {
- return $this->success(['remarks' => $this->services->value(['id' => $id], 'remarks')]);
- }
-
- public function remarks($id)
- {
- $data = $this->request->param('remarks', '');
- $this->services->update(['id' => $id], ['remarks' => $data]);
- return $this->success('备注提交成功');
- }
- }
|