diff --git a/app/admin/controller/SysDictCategoryController.php b/app/admin/controller/SysDictCategoryController.php new file mode 100644 index 0000000..a75980d --- /dev/null +++ b/app/admin/controller/SysDictCategoryController.php @@ -0,0 +1,48 @@ +service = new SysDictCategoryService(); + } + + /** + * 列表页数据格式化 + * + * @param array $data + * @return array + */ + protected function indexFormat($data) + { + if (isset($data['created_at'])) + $data['created_at'] = date('Y-m-d H:i:s', $data['created_at']); + if (isset($data['updated_at'])) + $data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']); + return $data; + } + + /** + * 数据格式化 + * + * @param array $data + * @return array + */ + protected function showFormat($data) + { + if (isset($data['created_at'])) + $data['created_at'] = date('Y-m-d H:i:s', $data['created_at']); + if (isset($data['updated_at'])) + $data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']); + return $data; + } +} \ No newline at end of file diff --git a/app/admin/controller/VehColorController.php b/app/admin/controller/VehColorController.php index 0d208ae..9f17c7c 100644 --- a/app/admin/controller/VehColorController.php +++ b/app/admin/controller/VehColorController.php @@ -22,12 +22,27 @@ class VehColorController extends BaseController * @param array $data * @return array */ - // protected function indexFormat($data) - // { - // if (isset($data['created_at'])) - // $data['created_at'] = date('Y-m-d H:i:s', $data['created_at']); - // if (isset($data['updated_at'])) - // $data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']); - // return $data; - // } + protected function indexFormat($data) + { + if (isset($data['created_at'])) + $data['created_at'] = date('Y-m-d H:i:s', $data['created_at']); + if (isset($data['updated_at'])) + $data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']); + return $data; + } + + /** + * 数据格式化 + * + * @param array $data + * @return array + */ + protected function showFormat($data) + { + if (isset($data['created_at'])) + $data['created_at'] = date('Y-m-d H:i:s', $data['created_at']); + if (isset($data['updated_at'])) + $data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']); + return $data; + } } \ No newline at end of file diff --git a/app/admin/logic/SysDictCategoryLogic.php b/app/admin/logic/SysDictCategoryLogic.php new file mode 100644 index 0000000..c52cb72 --- /dev/null +++ b/app/admin/logic/SysDictCategoryLogic.php @@ -0,0 +1,17 @@ +validator; + } +} \ No newline at end of file diff --git a/app/admin/validate/SysDictCategoryValidate.php b/app/admin/validate/SysDictCategoryValidate.php new file mode 100644 index 0000000..f494854 --- /dev/null +++ b/app/admin/validate/SysDictCategoryValidate.php @@ -0,0 +1,29 @@ + [ + + ], + + 'update' => [ + + ] + ]; +} \ No newline at end of file diff --git a/app/common/model/SysCurrency.php b/app/common/model/SysCurrency.php index 200a23b..a13d120 100644 --- a/app/common/model/SysCurrency.php +++ b/app/common/model/SysCurrency.php @@ -40,7 +40,7 @@ class SysCurrency extends Model /** * 允许自动填充模型字段 */ - protected $fillable = ['id', 'currency_code', 'currency_name', 'currency_symbol', 'exchange_rate', 'base_currency', 'float_percent', 'status', 'last_updated', 'created_at', 'updated_at']; + protected $fillable = ['id', 'currency_code', 'currency_name', 'currency_symbol', 'exchange_rate', 'base_currency', 'float_percent_up', 'float_percent_down', 'status', 'last_updated', 'created_at', 'updated_at']; /** * 不允许自动填充模型字段 diff --git a/app/common/model/SysDictCategory.php b/app/common/model/SysDictCategory.php new file mode 100644 index 0000000..fef0219 --- /dev/null +++ b/app/common/model/SysDictCategory.php @@ -0,0 +1,49 @@ +