feat(controller):增加控制器功能以及产品检索控制器。

This commit is contained in:
徐涛
2024-04-03 09:55:29 +08:00
parent 55dd3c0cc0
commit e068143f60
8 changed files with 74 additions and 3 deletions

View File

@@ -0,0 +1,3 @@
mod shared;
pub use shared::*;

View File

@@ -0,0 +1,12 @@
use serde::Deserialize;
#[derive(Debug, Clone, Deserialize)]
pub struct KeywordQuery {
pub keyword: Option<String>,
}
impl KeywordQuery {
pub fn keyword(&self) -> Option<String> {
self.keyword.clone().and_then(crate::utils::empty_to_none)
}
}