冲刺博客Day2

DAY2

1.会议照片

2.工作详情

成员 昨天已完成的工作 今天计划完成的工作 工作中遇到的困难
周讯超 初始化小程序开发环境 完成登陆注册模块 接口请求超时,暂无解决方案
林佳浩 后端整体框架的搭建 用户模块后端开发 之前做过类似的,这次没什么困难
黄欣茵 完成博客,看软件测试 协助界面开发 原型设计和分析中的内容有些矛盾
江男辉 架构基本没有问题 再一次明确客户新增的需求 如何更好的满足需求
夏依达 完成项目原型设计 完成需求规格说明书 对钻井系统不太了解的人还是无法很好理解数据的计算和对软件的理解
阿卜杜乃比 完成博客,看软件测试 完成需求规格说明书 无法很好理解数据的计算和对软件的理解

3.燃尽图

4.签入记录

5.主要代码

点击查看代码
    // 1.用户注册
    @PostMapping("/register")
    public ReturnResult register(@RequestBody User user) {
        Integer userId = userService.register(user);
        if (userId != null && userId != 0) {
            Map<String, Integer> resultMap = new HashMap<>();
            resultMap.put("userId", userId);
            returnResult.success(resultMap);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 2.用户登陆
    @PostMapping("/login")
    public ReturnResult login(String sno, String password) {
        User user = userService.login(sno, password);
        if (user != null) {
            returnResult.success(user);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 3.通过userId来获取用户详细信息
    @GetMapping("/getByUid/{userId}")
    public ReturnResult getByUid(@PathVariable(value = "userId", required = true) Integer userId) {
        User user = userService.getByUid(userId);
        if (user != null) {
            returnResult.success(user);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }


    // 4.根据用户id获取用户的搜索记录
    @GetMapping("/getSearch/{userId}")
    public ReturnResult getSearch(@PathVariable(value = "userId", required = true) Integer userId) {
        String[] searches = userService.getSearches(userId);
        if (searches != null) {
            returnResult.success(searches);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 5.将本次搜索加入到用户搜索记录中
    @PutMapping("/insertSearch/{userId}/{search}")
    public ReturnResult insertSearch(@PathVariable(value = "userId", required = true) Integer userId,
                                     @PathVariable(value = "search", required = true) String search) {
        Integer result = userService.insertSearch(userId, search);
        if (result != 0) {
            returnResult.success(result);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }

    // 6.修改用户的用户名和头像
    @PostMapping("/update")
    public ReturnResult update(@RequestBody User user) {
        Integer result = userService.update(user);
        if (result != 0) {
            returnResult.success(result);
        } else {
            returnResult.failed();
        }
        return returnResult;
    }
}

6.运行截图

前端登录页

7.每日工作总结

成员 总结
周讯超 完成了首页和登陆注册,接口超时问题明天解决
林佳浩 今天完成了用户模块,明天继续肝
黄欣茵 进行编码,根据原型设计对页面进行撰写
江男辉 原型展现,加入新增功能,一种不一样的体验
夏依达 有些算法可能过于复杂导致运行时间很长
阿卜杜乃比 有些算法可能过于复杂导致运行时间很长
posted @ 2021-11-24 20:59  代码能跑就行  阅读(35)  评论(0编辑  收藏  举报