逐梦校友圈——β冲刺day4

这个作业属于哪个课程 <福州大学2021春软件工程实践S班>
这个作业要求在哪里 团队作业六——beta冲刺+事后诸葛亮
团队名称 逐梦校友圈
这个作业的目标 β每日冲刺文档

SCRUM

任务总览

前端

  • 昨日安排
任务 完成情况
scroll-view下拉刷新出现的bug问题 未完成90%
个人信息上传 未完成80%
帖文详情界面 已完成
组局bug修复 已完成
组局图片处理 未完成90%
  • 明日安排
任务 分派人员
bug问题 茂基
个人信息上传 语涵
完成个人设置界面的时间显示部分,继续完成贴文详情界面 炜华
完成鉴权 伟峰

后端

  • 昨日安排
任务 完成情况
在发帖功能、评论功能使用内容审核功能 未完成95%
完成用户接收消息service、controller层代码 已完成
修改组局接口 已完成
  • 明日安排
任务 分派人员
完成帖子搜索优化 亮亮
测试接口 海翔
解散组局 小螃蟹

成员描述

成员 昨日成就 存在问题 问题解决方案或描述 明日安排
语涵104 个人信息上传完成10% (2h/3h) 代码含义 参照代码案例写代码需要弄懂各个部分的含义,这点比较消耗时间 个人信息上传
建斌209 编写获取聊天列表及界面中 (1h/3h) 编写获取聊天列表及界面
茂基222 修复bug问题 过度刷新 微信小程序scroll-view下拉刷新被触发多次。发帖抽风,出现500报错。 bug修复
炜华230 修复了个人设置头像修改的bug 方法 个人头像设置,研究van-uploader的用法花费较多时间 完成个人设置界面的时间显示部分,继续完成贴文详情界面
伟峰432 完成组局修改的图片处理 (6h/8h) readFile接口 小程序的readFile接口只能处理本地地址的文件 完成鉴权
亮亮215 部分优化帖子搜索查询、发布帖子评论内容审核、发布帖子内容审核(200min/230min) 完成帖子搜索优化
海翔321 完成用户接收消息service、controller层代码(1h) 如何使用mybatis-plus进行分页查询 使用mybaits-plus的分页插件/ 分页插件 @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); } } 测试接口
小螃蟹411 修改组局的改善(1h) 解散组局
丫比125 项目督促,博客园撰写(1h) 督促开发,博客园撰写

内容展示

  • 炜华230
Promise.all(promiseArr).then(function (values) {
    console.log(values);
    values.forEach(function (e) {
      console.log(e);
      imgServerUrls.push(e.data.data)
    })
    // console.log(imgServerUrls);
    that.setData({
      imgUrls:imgServerUrls,
    })
    let baseUrl = app.globalData.baseUrl;
    request({
      url: baseUrl + '/api/user/data/update',
      method: 'POST',
      data: {
        userIconUrl:that.data.imgUrls[0],
      },
      success(res){
        console.log(res);
      }
    })
    console.log(that.data.imgUrls[0]);
  }).catch(
      reason=>{
        console.log(reason)
      }
  )
},
  • 伟峰432
function getSuffix(interList) {
  let interUrls = []
  interList.forEach((item, index) => {
    let array = item.url.split('/')
    let suffix = array[array.length - 1]
    console.log(index , '-----------\n',  item)
    interUrls.push(suffix)
  })
  console.log('interUrls---------', interUrls)
  return interUrls;
}
  • 亮亮215

完成issue1

完成issue2

完成issue3

<select id="fuzzyListPostPageOrderByGmtCreateDesc" parameterType="map" resultMap="postToShowOptimized2">
        select post.id as id,
               post.publisher_id as publisher_id,
               post.status as status,
               post.post_type_id as post_type_id,
               post.message as message,
               post.image_urls as image_urls,
               post.gmt_create as gmt_create,
               post.gmt_modified as gmt_modified,
               post.deleted as deleted,
               user.username as username,
               post_type.name as post_type_name,
               ${queryMap.currentUserId} as currentUserId
   			   from post,user,post_type
        where post.message like concat('%',#{queryMap.content},'%')
          and post.deleted = 0
          and post.status = 0
          and post.publisher_id = user.id
          and post.post_type_id = post_type.id
</select>
    
    <resultMap id="postToShowOptimized2" type="com.team.backend.model.Post">
        <id column="id" property="id"/>
        <result property="publisherId" column="publisher_id"/>
        <result property="status" column="status"/>
        <result property="postTypeId" column="post_type_id"/>
        <result property="message" column="message"/>
        <result property="imageUrls" column="image_urls"/>
        <result property="gmtCreate" column="gmt_create"/>
        <result property="gmtModified" column="gmt_modified"/>
        <result property="deleted" column="deleted"/>
        <result property="currentUserId" column="currentUserId"/>
        <result property="publisherName" column="username"/>
        <result property="postTypeName" column="post_type_name"/>
        <association property="eyeOnNum" javaType="integer" column="id" select="countPostEyeOnByPostId"/>
        <association property="likeNum" javaType="integer" column="id" select="countPostLikeByPostId"/>
        <association property="isEyeOn" javaType="integer" column="{id=id,currentUserId=currentUserId}"
                     select="countCurrentUserEyeOnById"/>
        <association property="isLike" javaType="integer" column="{id=id,currentUserId=currentUserId}"
                     select="countCurrentUserLikeById"/>
        <association property="rewardNum" javaType="integer" column="{id=id,currentUserId=currentUserId}"
                     select="sumCurrentUserRewardNumById"/>
        <collection property="comments" ofType="com.team.backend.model.PostComment" column="id"
                    select="selectPostCommentByPostId">
            <result property="nameFrom" column="name_from"/>
        </collection>
    </resultMap>
public static int assumeContentStatus(String content){
        int result = 1;
        try {
            JSONObject json = new JSONObject();

            json.put("categories", new String[] {"porn","politics", "ad", "abuse", "contraband", "flood"});

            JSONObject text = new JSONObject();
            text.put("text", content);
            text.put("type", "content");

            JSONArray items = new JSONArray();
            items.add(text);

            json.put("items", items);

            StringEntity stringEntity = new StringEntity(json.toJSONString(), "utf-8");

            HttpResponse response = service.post(uri, stringEntity);

            ResponseProcessUtils.processResponseStatus(response);

            JSONObject jsonObject = JSON.parseObject(HttpClientUtils.convertStreamToString(response.getEntity().getContent()));

            String contentType = (String) jsonObject.getJSONObject("result").get("suggestion");
            if("pass".equals(contentType)) {
                result = 0;
            }else if ("block".equals(contentType)) {
                result = 2;
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            service.close();
        }
        return result;
    }


post.setStatus(ContentFilterUtil.assumeContentStatus(message));
  postComment.setStatus(ContentFilterUtil.assumeContentStatus(postComment.getMessage()));
 		//若通过审核,添加评论消息记录
        if (postComment.getStatus() == 0) {
          Notification notification = new Notification();
          notification.setType(0);//消息对应类型(0:评论,1:点赞,2:赞赏,3:收藏)
          notification.setIsRead(0);
          notification.setSourceId(postComment.getId());
          QueryWrapper<Post> postWrapper = new QueryWrapper<>();
          postWrapper.eq("id", postComment.getPostId());
          postWrapper.select("publisher_id");
          Post post = postMapper.selectOne(postWrapper);
          if (postComment.getIdTo() == -1) {
            notification.setUserId(post.getPublisherId());
          } else {
            notification.setUserId(postComment.getIdTo());
          }
          if (notificationMapper.insert(notification) == 1) {
            result = true;
          }
   
@PostMapping("/receive")

  public Result<List<Map<String, Object>>> receiveMessage(@RequestBody Map<String, Object> map) {



    if (user == null) {

      Result<List<Map<String, Object>>> result = new Result<>();

      result.setCode(ExceptionInfo.valueOf("USER_NOT_LOGIN").getCode());

      result.setMessage(ExceptionInfo.valueOf("USER_NOT_LOGIN").getMessage());

      return result;

    }



    Long toId = (Long) map.get("userIdFrom");

    Integer pageNum = (Integer) map.get("pageNum");

    Integer pageSize = (Integer) map.get("pageSize");



    return privateChatService.receiveMessage(user.getId(), toId, pageNum, pageSize);

  }
// 用户接收消息

  public Result<List<Map<String, Object>>> receiveMessage(Long id, Long toId, Integer pageNum,

      Integer pageSize) {



    Result<List<Map<String, Object>>> result = new Result<>();

    List<Map<String, Object>> messageList = new LinkedList<>();



    if (toId == null) {

      result.setCode(ExceptionInfo.valueOf("USER_DIALOG_ID_NULL").getCode());

      result.setMessage(ExceptionInfo.valueOf("USER_DIALOG_ID_NULL").getMessage());

      return result;

    }



    if (pageNum == null) {

      result.setCode(ExceptionInfo.valueOf("USER_PAGE_NUM_NULL").getCode());

      result.setMessage(ExceptionInfo.valueOf("USER_PAGE_NUM_NULL").getMessage());

      return result;

    }



    if (pageNum < 0) {

      result.setCode(ExceptionInfo.valueOf("USER_PAGE_NUM_BELOW0").getCode());

      result.setMessage(ExceptionInfo.valueOf("USER_PAGE_NUM_BELOW0").getMessage());

      return result;

    }



    if (pageSize == null) {

      result.setCode(ExceptionInfo.valueOf("USER_PAGE_SIZE_NULL").getCode());

      result.setMessage(ExceptionInfo.valueOf("USER_PAGE_SIZE_NULL").getMessage());

      return result;

    }



    if (pageSize < 0) {

      result.setCode(ExceptionInfo.valueOf("USER_PAGE_SIZE_BELOW0").getCode());

      result.setMessage(ExceptionInfo.valueOf("USER_PAGE_SIZE_BELOW0").getMessage());

      return result;

    }



    QueryWrapper<PrivateChat> wrapper = new QueryWrapper<>();

    wrapper.eq("from_id", id).eq("to_id", toId)

        .or(wq -> wq.eq("from_id", toId).eq("to_id", id))

        .orderByDesc("gmt_create");



    IPage<PrivateChat> page = new Page<>(pageNum, pageSize);

    page = privateChatMapper.selectPage(page, wrapper);

    List<PrivateChat> privateChatList = page.getRecords();



    for (PrivateChat privateChat : privateChatList) {

      Map<String, Object> message = new HashMap<>();

      message.put("time", privateChat.getGmtCreate());

      message.put("content", privateChat.getMessage());

      if (privateChat.getFromId().equals(id)) {

        message.put("isFromMe", 1);

      } else {

        message.put("isFromMe", 0);

      }



      messageList.add(message);

    }



    result.setCode(ExceptionInfo.valueOf("OK").getCode());

    result.setMessage(ExceptionInfo.valueOf("OK").getMessage());

    result.setData(messageList);

    return result;

  }
  • 小螃蟹411

完成issue

//实现类部分
  // 判断数据库是否存在这个组局
    if (party == null || party.getDeleted() == 1) {
      result.setCode(ExceptionInfo.valueOf("PARTY_NOT_EXISTED").getCode());
      result.setMessage(ExceptionInfo.valueOf("PARTY_NOT_EXISTED").getMessage());
      result.setData(0);
      return result;
    }
    party.setDescription(description);
    for (String imageurl : Urls) {
      imageUrls = imageurl + ";" + imageUrls;//为防止第一个image为"",逆序插入URL
    }
    party.setImageUrls(imageUrls);
    party.setPeopleCnt(peopleCnt);
    party.setPartyTypeId(partyTypeId);
    result.setCode(ExceptionInfo.valueOf("OK").getCode());
    result.setMessage(ExceptionInfo.valueOf("OK").getMessage());
    result.setData(partyMapper.updateById(party));
//    partyMapper.updateById(party)
    return result;
//controller部分 
    Number partyIdNum = (Number) requestMap.get("partyId");
    Long partyId = partyIdNum.longValue();
    String description = (String) requestMap.get("description");
    List<String> imageUrls = (List<String>) requestMap.get("images");
    int peopleCnt = (int) requestMap.get("peopleCnt");
    Number partyTypeNum = (Number) requestMap.get("partyTypeID");
    Long partyTypeId = partyTypeNum.longValue();
    return partyService.updateParty(partyId, description, imageUrls,       peopleCnt, partyTypeId);

会议图片

img

PM报告

工作总结

项目燃尽图

img

任务总量变化

变化日期 变化数量 变化描述 预计处理时间
2021/06/12 +67 β冲刺整体issue总览 7days
2021/06/14 +1 bug微信小程序scroll-view下拉刷新被触发多次,导致发帖页面不明缘由抽风,开始持续出现500错误 2days

最新项目截图

imgimg
img

imgimg
img

posted @ 2021-06-15 22:24  逐梦校友圈  阅读(84)  评论(7编辑  收藏  举报