Compare commits
2 Commits
v1.4.0
...
5beae1b39b
| Author | SHA1 | Date | |
|---|---|---|---|
| 5beae1b39b | |||
| d314cfd12a |
@@ -151,14 +151,14 @@ class VideoCategory
|
|||||||
|
|
||||||
$validate = new VideoCategoryValidate;
|
$validate = new VideoCategoryValidate;
|
||||||
if (!$validate->scene('sort')->check(['id' => $id,'sort' => $sort])) {
|
if (!$validate->scene('sort')->check(['id' => $id,'sort' => $sort])) {
|
||||||
return error($validate::getError());
|
return error($validate->getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
$category = VideoCategoryModel::bypk($id)->find();
|
$category = VideoCategoryModel::bypk($id)->find();
|
||||||
if (!$category) {
|
if (!$category) {
|
||||||
return error('请确认操作对象是否存在');
|
return error('请确认操作对象是否存在');
|
||||||
}
|
}
|
||||||
|
|
||||||
$category->sort = $sort;
|
$category->sort = $sort;
|
||||||
if (!$category->save()) {
|
if (!$category->save()) {
|
||||||
return error('操作失败');
|
return error('操作失败');
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
use think\migration\Migrator;
|
use think\migration\Migrator;
|
||||||
use think\migration\db\Column;
|
use think\migration\db\Column;
|
||||||
|
|
||||||
class SysMallStoreEntrance extends Migrator
|
class CreateSysMallStoreEntrance extends Migrator
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Change Method.
|
* Change Method.
|
||||||
Reference in New Issue
Block a user