Toggle navigation
Toggle navigation
This project
Loading...
Sign in
yoho-search
/
yoho-search-service
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hugufei
7 years ago
Commit
450e66247aec8779e5be99b25fcc833be9726acb
1 parent
cddeb423
拆包
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
46 deletions
service/src/main/java/com/yoho/search/restapi/shopbrand/BrandController.java
service/src/main/java/com/yoho/search/restapi/shopbrand/ShopBrandRecommendController.java
service/src/main/java/com/yoho/search/restapi/shopbrand/ShopsController.java
service/src/main/java/com/yoho/search/restapi/shopbrand/BrandController.java
View file @
450e662
...
...
@@ -4,6 +4,8 @@ import java.util.Map;
import
javax.servlet.http.HttpServletRequest
;
import
com.yoho.search.aop.downgrade.PersionalRateLimit
;
import
com.yoho.search.service.scene.shopbrand.RecommendBrandShopService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -21,6 +23,8 @@ public class BrandController {
@Autowired
private
BrandService
brandService
;
@Autowired
private
RecommendBrandShopService
recommendBrandShopService
;
/**
* 获取品牌列表[不包含全球购]
...
...
@@ -109,6 +113,17 @@ public class BrandController {
return
brandService
.
aggBrand
(
paramMap
);
}
/**
* 为用户推荐品牌-按相关性聚合8个品牌出来
*/
@PersionalRateLimit
(
isOrderUseable
=
false
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/productindex/aggRecommendBrand"
)
@ResponseBody
public
SearchApiResult
recommendBrand
(
HttpServletRequest
request
)
{
Map
<
String
,
String
>
paramMap
=
HttpServletRequestUtils
.
transParamType
(
request
);
return
recommendBrandShopService
.
aggRecommendBrand
(
paramMap
);
}
@RequestMapping
(
value
=
"/brand/{brandId}"
)
@ResponseBody
...
...
service/src/main/java/com/yoho/search/restapi/shopbrand/ShopBrandRecommendController.java
deleted
100644 → 0
View file @
cddeb42
package
com
.
yoho
.
search
.
restapi
.
shopbrand
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.yoho.search.aop.downgrade.PersionalRateLimit
;
import
com.yoho.search.common.utils.HttpServletRequestUtils
;
import
com.yoho.search.models.SearchApiResult
;
import
com.yoho.search.service.scene.shopbrand.RecommendBrandShopService
;
@Controller
public
class
ShopBrandRecommendController
{
@Autowired
private
RecommendBrandShopService
recommendBrandShopService
;
/**
* 为用户推荐店铺-按相关性聚合出店铺,支持分页查找
*/
@PersionalRateLimit
(
isOrderUseable
=
false
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/productindex/recommendShop"
)
@ResponseBody
public
SearchApiResult
recommendShop
(
HttpServletRequest
request
)
{
Map
<
String
,
String
>
paramMap
=
HttpServletRequestUtils
.
transParamType
(
request
);
return
recommendBrandShopService
.
aggRecommendShop
(
paramMap
);
}
/**
* 为用户推荐品牌-按相关性聚合8个品牌出来
*/
@PersionalRateLimit
(
isOrderUseable
=
false
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/productindex/aggRecommendBrand"
)
@ResponseBody
public
SearchApiResult
recommendBrand
(
HttpServletRequest
request
)
{
Map
<
String
,
String
>
paramMap
=
HttpServletRequestUtils
.
transParamType
(
request
);
return
recommendBrandShopService
.
aggRecommendBrand
(
paramMap
);
}
}
service/src/main/java/com/yoho/search/restapi/shopbrand/ShopsController.java
View file @
450e662
...
...
@@ -4,6 +4,8 @@ import java.util.Map;
import
javax.servlet.http.HttpServletRequest
;
import
com.yoho.search.aop.downgrade.PersionalRateLimit
;
import
com.yoho.search.service.scene.shopbrand.RecommendBrandShopService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -28,6 +30,8 @@ public class ShopsController {
private
ShopListService
shopListService
;
@Autowired
private
BrandWithShopsService
brandWithShopsService
;
@Autowired
private
RecommendBrandShopService
recommendBrandShopService
;
/**
* 按关键字搜出一个符合条件的品牌[待删除]
...
...
@@ -95,4 +99,15 @@ public class ShopsController {
Map
<
String
,
String
>
paramMap
=
HttpServletRequestUtils
.
transParamType
(
request
);
return
shopsService
.
group_shops
(
paramMap
);
}
/**
* 为用户推荐店铺-按相关性聚合出店铺,支持分页查找
*/
@PersionalRateLimit
(
isOrderUseable
=
false
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/productindex/recommendShop"
)
@ResponseBody
public
SearchApiResult
recommendShop
(
HttpServletRequest
request
)
{
Map
<
String
,
String
>
paramMap
=
HttpServletRequestUtils
.
transParamType
(
request
);
return
recommendBrandShopService
.
aggRecommendShop
(
paramMap
);
}
}
...
...
Please
register
or
login
to post a comment