Sfoglia il codice sorgente

新增品牌获取的接口

hulh 8 anni fa
parent
commit
767320c100

+ 12 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/api/BrandController.java

@@ -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);
+	}
 }