check duplicate khi đồng bộ

This commit is contained in:
2020-12-09 11:04:33 +07:00
parent 4cb2f77598
commit ed4b8a0144
4 changed files with 25 additions and 4 deletions

View File

@@ -97,8 +97,10 @@ class ApiController extends Controller {
}
public function actionData() {
Yii::$app->response->format = "json";
return ListManagement::find()->orderBy(['id' => SORT_DESC])->all();
if (Yii::$app->request->post()) {
Yii::$app->response->format = "json";
return ListManagement::find()->andWhere(["NOT IN", "name", Yii::$app->request->post()])->orderBy(['id' => SORT_DESC])->all();
}
}
public function actionFullData() {