Commit 65601945 by guiq

bug: [none] 参数缺失返回默认值

parent 9bb6a66b
...@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* (ServeCollect)表控制层 * (ServeCollect)表控制层
...@@ -173,9 +174,12 @@ public class ServeCollectFacade { ...@@ -173,9 +174,12 @@ public class ServeCollectFacade {
@ApiOperation("查询应用作品收藏状态") @ApiOperation("查询应用作品收藏状态")
@GetMapping("getCollectState") @GetMapping("getCollectState")
public ResponseDto<?> getCollectState(@CookieValue("userInfo") String userInfo, public ResponseDto<?> getCollectState(@CookieValue("userInfo") String userInfo,
@RequestParam("serverId") Long serverId, @RequestParam(value = "serverId", required = false) Long serverId,
@RequestParam("serveType") Integer serveType) { @RequestParam("serveType") Integer serveType) {
Long wechatUserId = Cookie.getId(userInfo, Cookie._WECHAT_USER_ID); Long wechatUserId = Cookie.getId(userInfo, Cookie._WECHAT_USER_ID);
if (Objects.isNull(serverId)) {
return new ResponseDto<>(false);
}
return new ResponseDto<>(serveCollectBiz.getCollectState(wechatUserId, serverId, serveType)); return new ResponseDto<>(serveCollectBiz.getCollectState(wechatUserId, serverId, serveType));
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment