request->get('id'); $remark = MerchantRemarkService::getById($id); MerchantRemarkService::valid($remark, $this->sjId); MerchantRemarkService::deleteById($id); util::complete('删除成功'); } //添加备注 ssh 2019.12.19 public function actionAdd() { $post = Yii::$app->request->post(); $userId = isset($post['userId']) ? $post['userId'] : 0; $remark = isset($post['remark']) ? $post['remark'] : ''; if (empty($remark)) { util::fail('请填写备注189'); } $user = UserService::getById($userId); UserService::valid($user, $this->sjId); $post['addTime'] = time(); $post['sjId'] = $this->sjId; MerchantRemarkService::add($post); util::complete('添加成功'); } }