fix[litemall-wx-api]: 设置默认值防止空指针异常

This commit is contained in:
Junling Bu
2018-08-02 14:53:03 +08:00
parent 04bf86cbdf
commit 58fc87d2f0

View File

@@ -230,7 +230,8 @@ public class WxGoodsController {
@LoginUser Integer userId,
@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size,
@Sort String sort, @Order String order) {
@Sort @RequestParam(defaultValue = "add_time") String sort,
@Order @RequestParam(defaultValue = "desc") String order){
//添加到搜索历史
if (userId != null && !StringUtils.isNullOrEmpty(keyword)) {