我和群众站一队-alpha冲刺第2日

「已注销」 「已注销」 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

冲刺日记二:

这个作业属于哪个课程https://bbs.csdn.net/forums/2401_CS_SE_FZU
这个作业要求在哪里https://bbs.csdn.net/topics/619397949
这个作业的目标CodeArt团队实战总结
其他参考文献CSDN,博客园

目录

  • 冲刺日记二:
  • 一、项目进展
  • 二、存在的问题/遇到的困难及接下来的安排
  • 三、站立式会议照片
  • 四、今日完成度相关照片
  • 五、心得体会

一、项目进展

222200315张俊腾
进展一:完成了RescueInfoRepository接口的实现,支持查询用户参与的救援信息。

img

222200309孙阳
进展一:完成entity_message

package com.bafang.entity.entity_message;

import jakarta.persistence.*;

import java.time.LocalDateTime;

@Entity
@Table(name = "message")
public class Message {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "to_uid", nullable = false)
    private Long toUid;

    @Column(name = "title", nullable = false)
    private String title;

    @Column(name = "content", nullable = false)
    private String content;

    @Column(name = "created_at", nullable = false)
    private LocalDateTime createdAt;

    @Column(name = "updated_at")
    private LocalDateTime updatedAt;

    @Column(name = "deleted_at")
    private LocalDateTime deletedAt;

    @PrePersist
    protected void onCreate() {
        this.createdAt = LocalDateTime.now();
        this.updatedAt = LocalDateTime.now();
    }

    @PreUpdate
    protected void onUpdate() {
        this.updatedAt = LocalDateTime.now();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getToUid() {
        return toUid;
    }

    public void setToUid(Long toUid) {
        this.toUid = toUid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public LocalDateTime getDeletedAt() {
        return deletedAt;
    }

    public void setDeletedAt(LocalDateTime deletedAt) {
        this.deletedAt = deletedAt;
    }
}

进展二:完成entity_medal

package com.bafang.entity.entity_medal;

import jakarta.persistence.*;
import java.time.LocalDateTime;

@Entity
@Table(name = "user_medal")
public class UserMedal {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(nullable = false)
    private Long uid;

    @Column(name = "medal_type", nullable = false)
    private Byte medalType;

    @Column(name = "created_at", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
    private LocalDateTime createdAt;

    @Column(name = "updated_at", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
    private LocalDateTime updatedAt;

    @Column(name = "deleted_at")
    private LocalDateTime deletedAt;

    @PrePersist
    protected void onCreate() {
        this.createdAt = LocalDateTime.now();
        this.updatedAt = LocalDateTime.now();
    }

    @PreUpdate
    protected void onUpdate() {
        this.updatedAt = LocalDateTime.now();
    }

    // Getters and Setters

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Byte getMedalType() {
        return medalType;
    }

    public void setMedalType(Byte medalType) {
        this.medalType = medalType;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public LocalDateTime getDeletedAt() {
        return deletedAt;
    }

    public void setDeletedAt(LocalDateTime deletedAt) {
        this.deletedAt = deletedAt;
    }
}

222200304卢君豪
进展一:“获取我的求助信息”dto的创建

package com.bafang.dto.dto_help;

        import java.time.LocalDateTime;

        public class HelpRequestInfo {
            private Long id;
            private Long uid;
            private String location;
            private Integer type;
            private String phoneNumber;
            private String detailedAddress;
            private String roadCondition;
            private String weatherCondition;
            private String utilitiesInfo;
            private Integer assistanceType;
            private String suppliesNeeded;
            private String introduction;
            private LocalDateTime createdAt;

            public HelpRequestInfo(Long id, Long uid, String location, Integer type, String phoneNumber, String detailedAddress, String roadCondition, String weatherCondition, String utilitiesInfo, Integer assistanceType, String suppliesNeeded, String introduction, LocalDateTime createdAt) {
                this.id = id;
                this.uid = uid;
                this.location = location;
                this.type = type;
                this.phoneNumber = phoneNumber;
                this.detailedAddress = detailedAddress;
                this.roadCondition = roadCondition;
                this.weatherCondition = weatherCondition;
                this.utilitiesInfo = utilitiesInfo;
                this.assistanceType = assistanceType;
                this.suppliesNeeded = suppliesNeeded;
                this.introduction = introduction;
                this.createdAt = createdAt;
            }

            public Long getId() {
                return id;
            }

            public void setId(Long id) {
                this.id = id;
            }

            public Long getUid() {
                return uid;
            }

            public void setUid(Long uid) {
                this.uid = uid;
            }

            public String getLocation() {
                return location;
            }

            public void setLocation(String location) {
                this.location = location;
            }

            public Integer getType() {
                return type;
            }

            public void setType(Integer type) {
                this.type = type;
            }

            public String getPhoneNumber() {
                return phoneNumber;
            }

            public void setPhoneNumber(String phoneNumber) {
                this.phoneNumber = phoneNumber;
            }

            public String getDetailedAddress() {
                return detailedAddress;
            }

            public void setDetailedAddress(String detailedAddress) {
                this.detailedAddress = detailedAddress;
            }

            public String getRoadCondition() {
                return roadCondition;
            }

            public void setRoadCondition(String roadCondition) {
                this.roadCondition = roadCondition;
            }

            public String getWeatherCondition() {
                return weatherCondition;
            }

            public void setWeatherCondition(String weatherCondition) {
                this.weatherCondition = weatherCondition;
            }

            public String getUtilitiesInfo() {
                return utilitiesInfo;
            }

            public void setUtilitiesInfo(String utilitiesInfo) {
                this.utilitiesInfo = utilitiesInfo;
            }

            public Integer getAssistanceType() {
                return assistanceType;
            }

            public void setAssistanceType(Integer assistanceType) {
                this.assistanceType = assistanceType;
            }

            public String getSuppliesNeeded() {
                return suppliesNeeded;
            }

            public void setSuppliesNeeded(String suppliesNeeded) {
                this.suppliesNeeded = suppliesNeeded;
            }

            public String getIntroduction() {
                return introduction;
            }

            public void setIntroduction(String introduction) {
                this.introduction = introduction;
            }

            public LocalDateTime getCreatedAt() {
                return createdAt;
            }

            public void setCreatedAt(LocalDateTime createdAt) {
                this.createdAt = createdAt;
            }
        }

进展二:“获取我的求助信息”controller的创建

package com.bafang.controller;

        import com.bafang.dto.Response.ResultResponse;
        import com.bafang.dto.dto_help.HelpRequestInfo;
        import com.bafang.service.HelpRequestService;
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.web.bind.annotation.*;

        import java.util.List;

        @RestController
        @RequestMapping("/bafang/help_request")
        public class HelpRequestController {
            @Autowired
            private HelpRequestService helpRequestService;

            @GetMapping("/user")
            public ResultResponse<List<HelpRequestInfo>> getUserHelpRequestInfo(@RequestParam Long uid, @RequestHeader("Authorization") String token) {
                return helpRequestService.getUserHelpRequestInfo(uid, token);
            }
        }

进展三:token相关知识的学习
222200310李怡涵
进展一:各个功能的框架

package com.bafang.controller;

import com.bafang.dto.Response.ResultResponse;
import com.bafang.dto.dto_live.*;
import com.bafang.service.LiveInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/bafang/live_info")
public class LiveInfoController {
    @Autowired
    private LiveInfoService liveInfoService;

    @GetMapping("/user")
    public ResultResponse<List<UserLiveList>> getUserLive(
            @RequestParam("uid") Long uid,
            @RequestHeader("Authorization") String token
    ) {
        return liveInfoService.getUserLive(uid, token);
    }

    @GetMapping
    public ResultResponse<List<UserLiveList>> getNearbyLive(
            @RequestParam("location") String location,
            @RequestHeader("Authorization") String token
    ) {
        return liveInfoService.getNearbyLive(location, token);
    }

    @PostMapping
    public  ResultResponse<UserUpload> uploadLive(
            @ModelAttribute UserUploadRequest userUploadRequest,
            @RequestHeader("Authorization") String token
    ){
        return liveInfoService.uploadLive(userUploadRequest, token);
    }

    @PostMapping("/action")
    public  ResultResponse<UserAction> likeOrDislikeLive(
            @ModelAttribute UserActionRequest userActionRequest,
            @RequestHeader("Authorization") String token
    ){
        return liveInfoService.likeOrDislikeLive(userActionRequest, token);
    }


}

进展二:dto文件夹中的请求和返回类的定义。实例:UserUploadReque

package com.bafang.dto.dto_live;

public class UserUploadRequest {
    private String Location;
    private String weatherCondition;
    private String roadCondition;
    private String utilitiesInfo;
    private Integer level;
    private String introduction;
    private String expiryAt;

    public String getExpiryAt() {
        return expiryAt;
    }

    public void setExpiryAt(String expiryAt) {
        this.expiryAt = expiryAt;
    }

    public String getLocation() {
        return Location;
    }

    public void setLocation(String location) {
        Location = location;
    }

    public String getWeatherCondition() {
        return weatherCondition;
    }

    public void setWeatherCondition(String weatherCondition) {
        this.weatherCondition = weatherCondition;
    }

    public String getRoadCondition() {
        return roadCondition;
    }

    public void setRoadCondition(String roadCondition) {
        this.roadCondition = roadCondition;
    }

    public String getUtilitiesInfo() {
        return utilitiesInfo;
    }

    public void setUtilitiesInfo(String utilitiesInfo) {
        this.utilitiesInfo = utilitiesInfo;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }
}

222200311李梓玄
进展一:研究高德地图api使用https://lbs.amap.com/api/webservice/guide/api-advanced/newpoisearch

进展二:完成「发布实况」「发起求助」的按钮及页面跳转

img

222200328夏振
进展一:debug并拓展授予/取消管理员权限功能
进展二:新增token工具,用于解析token对应uid
进展三:新增查询id是否存在
222200401丁昌彪
进展一: 完成了客户端注册、登录和登出功能
222200312杨年申
进展一:完成UserController.login及其Request的搭建

@PostMapping("/login") // 表示这个方法将处理 POST /bafang/user/login 请求
            public ResultResponse<UserLogin> login(@ModelAttribute LoginRequest loginRequest) {
                return userService.login(loginRequest);
            }


public class LoginRequest {
                private String username;
                private String password;

                // Getter 和 Setter
                public String getUsername() {
                    return username;
                }

                public void setUsername(String username) {
                    this.username = username;
                }

                public String getPassword() {
                    return password;
                }

                public void setPassword(String password) {
                    this.password = password;
                }
            }

进展二:完善login的Service

 public class UserService {
                public ResultResponse<UserLogin> login(LoginRequest loginRequest) {
                    // 检查用户是否存在
                    User user = userRepository.findByUsername(loginRequest.getUsername());
                    if (user == null) {
                        return new ResultResponse<>(401, "用户名不存在", null);
                    }

                    // 验证密码
                    if (!passwordEncoder.matches(loginRequest.getPassword(), user.getPassword())) {
                        return new ResultResponse<>(401, "密码错误", null);
                    }

                    // 生成JWT令牌
                    String token = JwtUtil.generateToken(user.getId());

                    // 返回响应
                    return new ResultResponse<>(200, "success", new UserLogin(user.getId(), user.getUsername(), token));
                }
            }

222200230梁蕴潆
进展一:编写冲刺博客
进展二:尝试编写Vue 路由配置

import Vue from 'vue'
import VueRouter from 'vue-router'
import MutualAidList from '../components/互助信息列表/MutualAidList.vue'
import MutualAidForm from '../components/互助信息表单/MutualAidForm.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'MutualAidList',
    component: MutualAidList
  },
  {
    path: '/form',
    name: 'MutualAidForm',
    component: MutualAidForm
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router

二、存在的问题/遇到的困难及接下来的安排

成员存在的问题/遇到的困难接下来的安排
222200315张俊腾问题:在实现自定义查询方法时,遇到命名冲突。- 解答:调整了方法名以避免冲突,增加注解@Query来实现自定义逻辑。

img

开发AcceptHelpRequestRequest DTO 类和测试用例。
222200309孙阳无打算开始编写“获取用户奖牌”的接口代码
222200304卢君豪无“获取我的求助信息”service的创建和相关功能函数的实现
222200310李怡涵无继续完善后端代码,实现新的接口功能
222200311李梓玄问题、困难1:还是高德地图api,原本老旧的文档加上封装复杂导致代码难以理解,地图拖拽选点获取位置未能按时完成- 解答:已经理解大半,只能是花费更多时间了实现地图拖拽选点获取位置
222200328夏振id查询用户role竟然返回null导致卡壳3小时- 不知道哪里的bug自己就修复了,奇了怪了接下来例如软封禁等功能的设计和实现,并总结今天完成的内容
222200401丁昌彪问题:没有注入viewMoel导致客户端闪退 解决办法:开启调试模式,寻找闪退原因,找到后注入相应的viewModel1. 完成用户实名认证功能 2. 完成用户基本资料功能 3. 完成求助历史功能
222200312杨年申问题、困难1- - 登录业务逻辑复杂,可能需要处理多个场景,例如用户不存在、密码错误等,导致代码冗长且难以维护。- 解答 - - 将登录逻辑拆分成多个小的方法,每个方法负责一个具体的检查(如验证用户是否存在、验证密码等),提高代码的可读性和可维护性。- 问题、困难2 - - 登录接口容易受到攻击(如 SQL 注入、暴力破解等)。- 解答- - 使用 JWT 或其他令牌机制进行身份验证,确保接口的安全性。安排实现一个接口register
222200230梁蕴潆理解Vuex的深层原理、掌握高级组件通信对我来说还是有些困难。继续学习有关灾难互助平台vue框架

三、站立式会议照片

img

四、今日完成度相关照片

成员相关图片
222200315张俊腾

img

222200309孙阳

img

222200304卢君豪

img

222200310李怡涵

img

222200311李梓玄

img

222200328夏振

img

222200401丁昌彪

img

222200312杨年申

img

222200230梁蕴潆

img

五、心得体会

成员心得体会
222200315张俊腾理解了如何在JPA中使用命名约定和注解进行复杂查询
222200309孙阳认真做好每一件小事,小到包括对某个变量的命名
222200304卢君豪非常好的学习,使我学习token
222200310李怡涵更加了解后端代码的运行逻辑,了解了前后端对接的相关知识。
222200311李梓玄文档很重要,文档很重要,文档很重要。
222200328夏振感谢项目使我获得提升,谢谢
222200401丁昌彪编程是一个需要耐心的过程。遇到复杂的问题时,要冷静分析,分步解决,而不是急于求成。
222200312杨年申清晰的结构:将 Controller 和 Service 层的职责明确分开,可以让代码结构更加清晰。Controller 只负责处理请求和返回响应,而 Service 处理具体的业务逻辑,这种分层设计提高了代码的可维护性。- 重视安全性:在设计登录接口时,安全性是一个不容忽视的因素。通过合理的权限管理和安全措施,可以有效保护用户信息,防止恶意攻击。
222200230梁蕴潆更加了解前端代码的运行逻辑,学到很多新知识。
...全文

相关推荐

【工业自动化】欧姆龙PLC产品线与编程软件应用:从选型架构到调试排错的全流程技术指南

内容概要:本文《欧姆龙PLC与编程软件完全手册》系统介绍了欧姆龙PLC的产品架构、软件体系、通信协议、选型策略及编程调试技巧。重点区分了两大技术平台:基于CX-Programmer的传统C系列(CP/CJ/CS)与基于Sysmac Studio的新一代Sysmac平台(NJ/NX/NY),强调二者在软件生态、寻址方式和通信架构上的根本差异。手册详细对比了各系列PLC的性能参数,并提供与西门子产品的功能对标,帮助用户快速定位。深入讲解了编程操作中的关键问题,如任务结构设计、间接寻址、FB封装陷阱、在线调试五件套等,特别指出“FB使能关闭时状态不初始化”等易出错点。最后汇总了选型路径与现场避坑清单,极具实战指导价值。; 适合人群:具备一定工业自动化基础,从事PLC编程、设备调试、系统集成的研发工程师和技术人员,尤其是从西门子平台转向欧姆龙或参与新项目选型的1-5年经验从业者。; 使用场景及目标:① 新项目选型时判断应选用C系列还是Sysmac平台;② 编程调试过程中掌握高效操作技巧与常见问题排查方法;③ 实现跨平台迁移、系统升级或接手他人项目时规避架构与逻辑陷阱;④ 提升对欧姆龙PLC任务机制、间接寻址、FB设计等高级功能的理解与应用能力。; 阅读建议:本手册理论结合实践,建议按“先架构后操作”的顺序阅读,重点章节需结合实际工程反复演练。特别是FB设计规范、任务切换处理、强制操作收尾流程等内容,应在仿真环境中验证后再应用于现场。注意版本匹配问题,操作前确认所用软件与控制器固件版本兼容。

莫问西东LJ

CISP-CSE注册云安全工程师备考资源包

CISP-CSE注册云安全工程师备考资源包

嫑甭歪孬

科技中介服务机构如何通过AI技术降低技术评估与匹配服务的操作门槛?.docx

科技中介服务机构如何通过AI技术降低技术评估与匹配服务的操作门槛?

BIZKEEN

国央企创新负责人如何借助平台实现创新资源的高效配置与项目落地?.docx

国央企创新负责人如何借助平台实现创新资源的高效配置与项目落地?

BIZKEEN

高校技术转移办公室人员如何高效筛选并推介科技成果?.docx

高校技术转移办公室人员如何高效筛选并推介科技成果?

BIZKEEN
评论
收藏 已收藏
分享
返回顶部