update last_modified time
This commit is contained in:
parent
5472f6ef77
commit
cc41875ad2
|
@ -151,7 +151,7 @@ class ApiController extends Controller {
|
|||
public function actionFullData() {
|
||||
if (Yii::$app->request->post()) {
|
||||
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 = [];
|
||||
foreach ($lists as $key => $value) {
|
||||
$f = [];
|
||||
|
|
|
@ -146,6 +146,7 @@ class ListManagementController extends Controller {
|
|||
$listManagement->telephone = $data['telephone'];
|
||||
$listManagement->address = $data['address'];
|
||||
$listManagement->image = json_encode($images);
|
||||
$listManagement->last_modified = time();
|
||||
$listManagement->save();
|
||||
common::updateFeature([
|
||||
"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->telephone = $data['telephone'];
|
||||
$model->address = $data['address'];
|
||||
$model->last_modified = time();
|
||||
$model->save();
|
||||
common::updateFeature([
|
||||
"cmd" => "update",
|
||||
|
|
Loading…
Reference in New Issue
Block a user