mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 22:10:49 +00:00
修复权限缓存的问题,修复拆分的订单无法正常核销的问题
This commit is contained in:
parent
7feb20435f
commit
5ae976edc6
@ -80,12 +80,12 @@ class SystemRole extends AuthController
|
||||
$data['rules'] = implode(',', $data['rules']);
|
||||
if ($id) {
|
||||
if (!$this->services->update($id, $data)) return app('json')->fail(100007);
|
||||
CacheService::clear();
|
||||
$this->services->cacheDriver()->clear();
|
||||
return app('json')->success(100001);
|
||||
} else {
|
||||
$data['level'] = $this->adminInfo['level'] + 1;
|
||||
if (!$this->services->save($data)) return app('json')->fail(400223);
|
||||
CacheService::clear();
|
||||
$this->services->cacheDriver()->clear();
|
||||
return app('json')->success(400222);
|
||||
}
|
||||
}
|
||||
@ -123,7 +123,7 @@ class SystemRole extends AuthController
|
||||
if (!$this->services->delete($id))
|
||||
return app('json')->fail(100008);
|
||||
else {
|
||||
CacheService::clear();
|
||||
$this->services->cacheDriver()->clear();
|
||||
return app('json')->success(100002);
|
||||
}
|
||||
}
|
||||
@ -145,7 +145,7 @@ class SystemRole extends AuthController
|
||||
}
|
||||
$role->status = $status;
|
||||
if ($role->save()) {
|
||||
CacheService::clear();
|
||||
$this->services->cacheDriver()->clear();
|
||||
return app('json')->success(100001);
|
||||
} else {
|
||||
return app('json')->fail(100007);
|
||||
|
||||
@ -49,7 +49,13 @@ class StoreOrderWriteOffServices extends BaseServices
|
||||
*/
|
||||
public function writeOffOrder(string $code, int $confirm, int $uid = 0)
|
||||
{
|
||||
$orderInfo = $this->dao->getOne(['verify_code' => $code, 'paid' => 1, 'refund_status' => 0, 'is_del' => 0]);
|
||||
$orderInfo = $this->dao->getOne([
|
||||
['verify_code', '=', $code],
|
||||
['paid', '=', 1],
|
||||
['refund_status', '=', 0],
|
||||
['is_del', '=', 0],
|
||||
['pid', '>=', 0]
|
||||
]);
|
||||
if (!$orderInfo) {
|
||||
throw new ApiException(410173);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user