冲刺博客Day7

DAY7

1.会议照片

2.工作详情

成员 昨天已完成的工作 今天计划完成的工作 工作中遇到的困难
周讯超 完成帖子 完成评论模块
林佳浩 评论模块后端开发 剩余的帖子模块代码的完成 细节的完善要很有耐心
黄欣茵 完成首页部分UI 完善系统设计与详细设计 功能实现这块感觉不是很详细
江男辉 进一步学习新技术 把用户需求新增功能完善可运作 进程问题
夏依达 完成登录 注册 找回密码等基础功能 Alpha版本程序测试 软件使用对用户的设备有一定要求
阿卜杜乃比 完成登录 注册 找回密码等基础功能 Alpha版本程序测试 功能实现这块感觉不是很详细

3.燃尽图

4.签入记录

5.主要代码截图

点击查看代码
    // 1.增加一条帖子
    @PostMapping("/add")
    public ReturnResult addPost(@RequestBody Post post) {
        Integer postId = postService.addPost(post);
        if (postId != null && postId != 0) {
            HashMap<String, Object> resultMap = new HashMap<>();
            resultMap.put("postId",postId);
            returnResult.success(resultMap);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 2.根据帖子id获取某条帖子
    @GetMapping("/findOne/{postId}")
    public ReturnResult getPost(@PathVariable(value = "postId", required = true) Integer postId) {
        Post post = postService.getPost(postId);
        if (post != null) {
            returnResult.success(post);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 3.批量删除
    @PostMapping("/deleteSome")
    public ReturnResult deleteSome(Integer[] postIds) {
        Integer result = postService.deleteSome(postIds);
        if (result != 0) {
            returnResult.success(result);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 3.1 全选删除
    @DeleteMapping("/deleteAll/{userId}/{exist}")
    public ReturnResult deleteAll(@PathVariable(value = "userId")Integer userId,
                                   @PathVariable(value = "exist")Integer exist) {
        Integer result = postService.deleteAll(userId,exist);
        if (result != 0) {
            returnResult.success(result);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 4.根据帖子id删除某条帖子
    @DeleteMapping("/delete/{postId}")
    public ReturnResult deletePost(@PathVariable(value = "postId", required = true) Integer postId) {
        Integer result = postService.deletePost(postId);
        if (result != 0) {
            returnResult.success(result);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 5.根据帖子id修改某条帖子
    @PostMapping("/update")
    public ReturnResult update(@RequestBody Post post){
        Integer result = postService.update(post);
        if (result != 0) {
            returnResult.success(result);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 6.通过keyId获取对应的关键字
    @GetMapping("/getKey/{keyId}")
    public ReturnResult getKey(@PathVariable(value = "keyId",required = true) Integer keyId){
        Key key = postService.getKey(keyId);
        if (key != null) {
            returnResult.success(key);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 7.根据用户id、exist标识获取所有的草稿或已发布的帖子
    @GetMapping("/getOneCatory/{userId}/{exist}")
    public ReturnResult getOneCatory(@PathVariable(value = "userId", required = true) Integer userId,
                                     @PathVariable(value = "exist", required = true) Integer exist) {
        List<Post> posts = postService.getOneCategory(userId,exist);
        if (posts != null) {
            returnResult.success(posts);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 8.根据专区id和排序获取对应的已发布(exist=1)的帖子
    @GetMapping("/getByPartId/{partId}/{order}")
    public ReturnResult getByPartId(@PathVariable(value = "partId") Integer partId,
                                    @PathVariable(value = "order") Integer order) {
        List<Post> posts = postService.getByPartId(partId,order);
        if (posts != null) {
            returnResult.success(posts);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 9.根据关键字获取对应的文章(模糊查询)
    @GetMapping("/getByKeyId/{keyId}")
    public ReturnResult getByKeyId(@PathVariable(value = "keyId", required = true) Integer keyId) {
        List<Post> posts = postService.getByKeyId(keyId);
        if (posts != null) {
            returnResult.success(posts);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 10.根据搜索词模糊搜索帖子
    @GetMapping("/searchPosts/{search}")
    public ReturnResult searchPosts(@PathVariable(value = "search", required = true) String search) {
        List<Post> posts = postService.searchPosts(search);
        if (posts != null) {
            returnResult.success(posts);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 11.点亮
    @PutMapping("/like/{postId}")
    public ReturnResult like(@PathVariable(value = "postId",required = true) Integer postId){
        Integer result = postService.like(postId);
        if (result != 0) {
            returnResult.success(result);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }



    // 12.点灭
    @PutMapping("/unlike/{postId}")
    public ReturnResult unlike(@PathVariable(value = "postId",required = true) Integer postId){
        Integer result = postService.unlike(postId);
        if (result != 0) {
            returnResult.success(result);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }


    // 13.轮播图接口1——图片
    @GetMapping("/slideShowRmImg/{postId}")
    public ReturnResult slideShowRmImg(@PathVariable(value = "postId",required = true) Integer postId){
        Post post = postService.slideShowRmImg(postId);
        if (post != null) {
            returnResult.success(post);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 14.轮播图接口2——文字
    @GetMapping("/slideShowBrief/{postId}")
    public ReturnResult sslideShowBrief(@PathVariable(value = "postId",required = true) Integer postId){
        Post post = postService.slideShowBrief(postId);
        if (post != null) {
            returnResult.success(post);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

6.运行截图

二级评论

7.每日工作总结

成员 总结
周讯超 完成二级评论
林佳浩 项目在今天终于告一段落了,明天不肝了!
黄欣茵 通过团队合作,进行7天冲刺,进而完成任务
江男辉 单元测试很期待app的投入使用
夏依达 我们接下来会继续优化算法,提高使用效率
阿卜杜乃比 团队进一步优化测试时发现的问题
posted @ 2021-11-27 01:21  代码能跑就行  阅读(49)  评论(0编辑  收藏  举报