Commit cb24b852 by 田超

Merge branch 'fixbug/getCollectState' into 'master'

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

See merge request rays/pcloud-book!1538
parents 9bb6a66b 65601945
......@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* (ServeCollect)表控制层
......@@ -173,9 +174,12 @@ public class ServeCollectFacade {
@ApiOperation("查询应用作品收藏状态")
@GetMapping("getCollectState")
public ResponseDto<?> getCollectState(@CookieValue("userInfo") String userInfo,
@RequestParam("serverId") Long serverId,
@RequestParam(value = "serverId", required = false) Long serverId,
@RequestParam("serveType") Integer serveType) {
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));
}
}
\ 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