update last_modified time
This commit is contained in:
parent
5472f6ef77
commit
cc41875ad2
|
@ -151,7 +151,7 @@ class ApiController extends Controller {
|
||||||
public function actionFullData() {
|
public function actionFullData() {
|
||||||
if (Yii::$app->request->post()) {
|
if (Yii::$app->request->post()) {
|
||||||
Yii::$app->response->format = "json";
|
Yii::$app->response->format = "json";
|
||||||
$lists = ListManagement::find()->andWhere(["IN", "code", Yii::$app->request->post()])->orderBy(['id' => SORT_DESC])->all();
|
$lists = ListManagement::find()->andWhere(["IN", "code", Yii::$app->request->post()])->orderBy(['last_modified' => SORT_DESC])->all();
|
||||||
$res = [];
|
$res = [];
|
||||||
foreach ($lists as $key => $value) {
|
foreach ($lists as $key => $value) {
|
||||||
$f = [];
|
$f = [];
|
||||||
|
|
|
@ -146,6 +146,7 @@ class ListManagementController extends Controller {
|
||||||
$listManagement->telephone = $data['telephone'];
|
$listManagement->telephone = $data['telephone'];
|
||||||
$listManagement->address = $data['address'];
|
$listManagement->address = $data['address'];
|
||||||
$listManagement->image = json_encode($images);
|
$listManagement->image = json_encode($images);
|
||||||
|
$listManagement->last_modified = time();
|
||||||
$listManagement->save();
|
$listManagement->save();
|
||||||
common::updateFeature([
|
common::updateFeature([
|
||||||
"cmd" => "update",
|
"cmd" => "update",
|
||||||
|
@ -244,6 +245,7 @@ class ListManagementController extends Controller {
|
||||||
$model->birthday = $data['birthday'] === "" ? 0 : date_format(date_create_from_format('d/m/Y', $data['birthday']), 'U');
|
$model->birthday = $data['birthday'] === "" ? 0 : date_format(date_create_from_format('d/m/Y', $data['birthday']), 'U');
|
||||||
$model->telephone = $data['telephone'];
|
$model->telephone = $data['telephone'];
|
||||||
$model->address = $data['address'];
|
$model->address = $data['address'];
|
||||||
|
$model->last_modified = time();
|
||||||
$model->save();
|
$model->save();
|
||||||
common::updateFeature([
|
common::updateFeature([
|
||||||
"cmd" => "update",
|
"cmd" => "update",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user