|
|
@@ -254,4 +254,16 @@ public class BrandController {
|
|
|
public List<Brand> getMostSearchBrands() {
|
|
|
return brandService.getMostSearchBrands();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过名字获取品牌信息
|
|
|
+ * @param name 品牌名
|
|
|
+ * @return 品牌信息
|
|
|
+ * @throws UnsupportedEncodingException
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/byName/brand", method = RequestMethod.GET)
|
|
|
+ public BrandInfo getBrandInfoByName(String name) throws UnsupportedEncodingException{
|
|
|
+ name = URLDecoder.decode(name, "utf-8");
|
|
|
+ return brandService.findByName(name, name);
|
|
|
+ }
|
|
|
}
|