|
@@ -4,6 +4,7 @@ namespace app\admin\controller;
|
|
|
|
|
|
use app\common\controller\Backend;
|
|
|
use app\common\model\MobileOrderOperation;
|
|
|
+use think\Db;
|
|
|
|
|
|
/**
|
|
|
*
|
|
@@ -103,7 +104,23 @@ class MobileOrder extends Backend
|
|
|
$this->success('');
|
|
|
}
|
|
|
}
|
|
|
+ public function refund($ids){
|
|
|
+ $model=$this->model->find($ids);
|
|
|
+ $this->assign('row',$model);
|
|
|
+ if($this->request->isGet()){
|
|
|
+ return view();
|
|
|
+ }else{
|
|
|
+ $data=input('row/a');
|
|
|
+ $this->validate($data,[
|
|
|
+ 'amount|金额'=>'require|integer|egt:0',
|
|
|
+ ]);
|
|
|
+ Db::startTrans();
|
|
|
+ $model=$this->model->where('id',$ids)->lock(true)->findOrFail();
|
|
|
+ $model['amount_refund']=$data['amount'];
|
|
|
+ $model->save();
|
|
|
|
|
|
+ }
|
|
|
+ }
|
|
|
public function status(){
|
|
|
return \app\common\model\MobileOrder::$status;
|
|
|
}
|