Weekly summary of group 02 (2 / 3)

Weekly summary of group 02 (2 / 3)

Basic information

Sprint Report

What tasks have you accomplished in the past week? Written / oral description

front end:

  • Today's popular and recommended exchange locations to optimize the user experience
  • Label selection: add the number of labels to be printed
  • Map style modification

back-end

  • Corresponding test unit and service layer

  • Do quartz timer task to calculate today's hot

  • Add tagNum of system/getInfo to help the front end display popular tags

Show GitHub current day code / document check-in record

front end

back-end

What optimizations and iterations have been made

front end

  • Partial style modification
  • Label selection: add the number of labels to be printed
  • Map style modification

back-end

  • Do the quartz timer task, calculate the popular today regularly every day, exchange space for time, and put it in memory first

Bugs detected through automated testing (if not, it is not required to fill in)

Which bugs have been solved and how (need to write in detail)

front end

Map style error

image component setting mode='widthFix '

import {Image, Text, View} from '@tarojs/components';
import * as React from 'react';
import {AtFloatLayout} from 'taro-ui';
import './windowDesc.scss';

export default function WindowDesc(props: {
  windowName: string;
  pngSrc: string;
  description: string;
  mapSrc: string;
  star: number;
  canteenName: string;
}): JSX.Element {
  const [open, setOpen] = React.useState<boolean>();
  return (
    <View className='window-desc'>
      <View className='window-desc-top'>
        <View className='window-desc-top-text'>
          <Text className='window-desc-title'>{props.windowName}</Text>
          <View className='window-desc-canteen-star'>
            <Text className='window-desc-canteen'>{props.canteenName}</Text>
            <Text className='window-desc-star'>{props.star.toFixed(1)}branch</Text>
          </View>
        </View>
        <Image className='window-desc-top-image' src={props.pngSrc}/>
      </View>
      <View className='window-desc-desc'>{props.description}</View>
      <View
        className='window-desc-more'
        onClick={() => {
          setOpen(true);
        }}
      >
        Expand more
      </View>
      <AtFloatLayout
        title='detailed information'
        isOpened={open}
        onClose={() => {
          setOpen(false);
        }}
      >
        <View className='window-desc-map-title'>describe</View>
        <View className='window-desc-map-content'>{props.description}</View>
        <View className='window-desc-map-title'>Map Guide</View>
        <Image mode='widthFix' src={props.mapSrc} className='window-desc-map-image' />
      </AtFloatLayout>
    </View>
  );
}

Set the corresponding style file again

.window-desc-map-image {
  width: 100%;
}

The picture can be displayed at normal scale

back-end

  • For spring classes other than the three basic layers, @ Autowired cannot inject, crazy null pointer

This problem of injection has been solved for a long time, because the persistence layer method needs to be called in the implementation class of the Job, and the corresponding persistence layer interface has to be injected

The solution is:

Introduce a static class reference object into the Job implementation class, force its class to load, and perform some initialization tasks before servlet initialization loading, as follows:

@Component
public class PopularJob implements Job {

    @Autowired
    private WindowMapper windowMapper;
    @Autowired
    private DishTagMapper dishTagMapper;
    @Autowired
    private DishCommentMapper dishCommentMapper;

    public static PopularJob popularJob;
    private Recommend recommend;
    private List<DishRecommend> dishRecommends;

    @PostConstruct
    public void init(){
        popularJob = this;
        popularJob.windowMapper = this.windowMapper;
        popularJob.dishCommentMapper = this.dishCommentMapper;
        popularJob.dishTagMapper = this.dishTagMapper;
        popularJob.recommend = new Recommend();
        popularJob.dishRecommends = new ArrayList<>();
    }
    
    // ...
}

The most important thing is that the mapper object used later must use this static class, otherwise it is still a null pointer!

For example, to get the window list:

List<Window> windowList = popularJob.windowMapper.listWindows();

What tasks remain in the next plan?

front end

back-end

  • automated testing

  • Optimization of recommendation algorithm

  • Implementation of visual interface for canteen congestion

  • Do safety related matters

What difficulties have you encountered?

At present, the biggest difficulty may lie in the back end. The recommended algorithm is not good, and the IO processing is not very good (popular applications can be calculated in advance, but the recommendation needs to be calculated in real time according to the user status). In addition, the bandwidth is not very awesome, so there are some speed problems, resulting in poor user experience.

What are the team's gains and questions?

Harvest: learned the tips to optimize the user experience, and learned to learn new knowledge and fix bug s in a hurry

Question: automated testing is still almost interesting. The project is really small. It really can't measure too much content

Achievement display

Show the latest achievements in the group

Home page interface optimization includes icons and opening speed

Window optimization and map size

Superscript of label

Show the results of this week's automated test

We have written test code in the back-end members, and some simple logic errors detected have been solved. At the same time, through automatic testing, we have determined the quartz timer task; Preload the popular homepage to give users a smoother experience; In the search, the results of our automated test show that our filtering function has been improved. Using violence testing, we solved the display problems on various models, especially the display bug of Android phones.

Demonstrate continuous integration of automation (bonus item, corresponding to automation test)

Posted by richclever on Sun, 01 May 2022 23:25:14 +0300