Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
83f03f126d
@ -29,6 +29,22 @@ class FinancialTransfersController extends BaseAdminController
|
|||||||
return $this->dataLists(new FinancialTransfersLists());
|
return $this->dataLists(new FinancialTransfersLists());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function send_transfers()
|
||||||
|
{
|
||||||
|
$params = (new FinancialTransfersValidate())->post()->goCheck('send');
|
||||||
|
$result = FinancialTransfersLogic::dealsend($params);
|
||||||
|
|
||||||
|
if (true === $result) {
|
||||||
|
return $this->success('发送成功', [], );
|
||||||
|
}
|
||||||
|
return $this->fail(FinancialTransfersLogic::getError());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 添加
|
* @notes 添加
|
||||||
|
@ -107,4 +107,29 @@ class FinancialTransfersLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
return FinancialTransfers::findOrEmpty($params['id'])->toArray();
|
return FinancialTransfers::findOrEmpty($params['id'])->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function dealsend($params)
|
||||||
|
{
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
FinancialTransfers::where('id',$params['id'])
|
||||||
|
->update(
|
||||||
|
[
|
||||||
|
'status'=>1,
|
||||||
|
'initiation_time'=>time()
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
Db::commit();
|
||||||
|
return true;
|
||||||
|
}catch (\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
self::setError($e->getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -36,6 +36,13 @@ class FinancialTransfersValidate extends BaseValidate
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
public function sceneSend()
|
||||||
|
{
|
||||||
|
return $this->only(['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 添加场景
|
* @notes 添加场景
|
||||||
* @return FinancialTransfersValidate
|
* @return FinancialTransfersValidate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user