Design and implementation of edible mushroom stick traceability system based on Java (source code + lw + deployment documents + explanation, etc.)

Blogger Introduction: ?300,000+ fans across the entire network, csdn guest author, blog expert, CSDN Rising Star Program mentor, high-quality creator in the Java field, Blog Star, Nuggets / Huawei Cloud / Alibaba Cloud / InfoQ and other platforms are high-quality authors, focusing on the field of Java technology and practical graduation projects?

Contact for source code at the end of the article

Recommended subscription for wonderful columns Otherwise, you won’t find it next time

The most comprehensive collection of computer software graduation project topics for 2022-2024: 1,000 popular topic recommendations?

Java project quality practical cases “100 sets”

Java WeChat Mini Program Project Practical “100 Sets”

If you are interested, you can save it first. If you have questions about graduation topics, projects, thesis writing and other related questions, you can leave me a message for consultation. I hope to help more people

?

System introduction:

With the rapid development of information Internet shopping, most companies are creating their own management systems. This article introduces the entire process of development of the edible mushroom stick traceability system. By analyzing the enterprise’s needs for the edible mushroom stick traceability system, a computer-managed edible mushroom stick traceability system program was created. The article introduces the system analysis part of the edible mushroom stick traceability system, including feasibility analysis, etc. The system design part mainly introduces the system function design and database design.

Administrator of this edible mushroom stick traceability system, ordinary administrator, ordinary user. Administrator functions include personal center, ordinary user management, ordinary administrator management, basic information management, growth information management, bacterial room information management, etc. Common administrator functions include personal center, common user management, basic information management, growth information management, bacterial room information management, etc. Common user functions include personal center, basic information management, growth information management, etc. Therefore it has certain practicality.

This site is a B/S mode system. The backend uses the SSM framework as the development technology. The frontend uses VUE development technology and MYSQL database design and development to fully ensure the stability of the system. The system has the characteristics of clear interface, simple operation and complete functions, making the management of edible mushroom stick traceability system systematic and standardized.

The system is a website system based on B/S architecture. The designed functional structure diagram is shown below:

When the program is handed over to the user for use, the operation flow chart of the program needs to be provided, so that the user can easily understand the specific working steps of the program. Nowadays, the operation process of the program has a general standard, that is, first submit the login data through the login page, After the program is verified correctly, the user can operate the corresponding function on the program function operation area page.

?

Program operation flow chart

Function screenshot:

5.1 Ordinary user management

The system administrator of the edible mushroom stick traceability system can manage ordinary user information, and can add, modify, and delete ordinary user information. The specific interface is shown in Figure 5.1.

Figure 5.1 Ordinary user information management interface

5.2 General administrator management

System administrators can manage general administrator information, and can add, modify, and delete query operations for general administrator information. The specific interface is shown in Figure 5.2.

Figure 5.2 General administrator information management interface

5.3 Basic information management

System administrators can manage basic information and add, modify, and delete basic information. The interface is as shown below:

Figure 5.3 Basic information management interface

5.4 Growth information management

System administrators can manage growth information and add, modify, and delete growth information. The interface is as shown below:

Figure 5.4 Growth information interface

5.5 Bacteria room information management

System administrators can manage bacterial room information and add, modify, and delete bacterial room information. The interface is as shown below:

Figure 5.5 Bacteria room information interface

Code implementation:

/**
 * Login related
 */
@RequestMapping("users")
@RestController
public class UserController{
    
    @Autowired
    private UserService userService;
    
    @Autowired
    private TokenService tokenService;

    /**
     * Log in
     */
    @IgnoreAuth
    @PostMapping(value = "/login")
    public R login(String username, String password, String role, HttpServletRequest request) {
        UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
        if(user != null){
            if(!user.getRole().equals(role)){
                return R.error("Permissions are abnormal");
            }
            if(user==null || !user.getPassword().equals(password)) {
                return R.error("Account or password is incorrect");
            }
            String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
            return R.ok().put("token", token);
        }else{
            return R.error("Account or password or permissions are incorrect");
        }

    }
    
    /**
     * register
     */
    @IgnoreAuth
    @PostMapping(value = "/register")
    public R register(@RequestBody UserEntity user){
// ValidatorUtils.validateEntity(user);
        if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
            return R.error("User already exists");
        }
        userService.insert(user);
        return R.ok();
    }

    /**
     * quit
     */
    @GetMapping(value = "logout")
    public R logout(HttpServletRequest request) {
        request.getSession().invalidate();
        return R.ok("Exit successfully");
    }
    
    /**
     * reset Password
     */
    @IgnoreAuth
    @RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
        UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
        if(user==null) {
            return R.error("Account does not exist");
        }
        user.setPassword("123456");
        userService.update(user,null);
        return R.ok("Password has been reset to: 123456");
    }
    
    /**
     * list
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,UserEntity user){
        EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
        PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
        return R.ok().put("data", page);
    }

    /**
     * information
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * Get the user's session user information
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){
        Integer id = (Integer)request.getSession().getAttribute("userId");
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }

    /**
     * save
     */
    @PostMapping("/save")
    public R save(@RequestBody UserEntity user){
// ValidatorUtils.validateEntity(user);
        if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
            return R.error("User already exists");
        }
        userService.insert(user);
        return R.ok();
    }

    /**
     * Revise
     */
    @RequestMapping("/update")
    public R update(@RequestBody UserEntity user){
// ValidatorUtils.validateEntity(user);
        userService.updateById(user);//Update all
        return R.ok();
    }

    /**
     * delete
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        userService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}

Paper reference:

Source code acquisition:

Everyone like, collect, follow, comment, viewget contact information

Recommended subscription for wonderful columns: In the column below

The most comprehensive collection of computer software graduation project topics for 2022-2024: 1,000 popular topic recommendations?

Java project quality practical cases “100 sets”

Java WeChat Mini Program Project Practice “100 Sets”

The knowledge points of the article match the official knowledge files, and you can further learn related knowledge. Java Skill TreeHomepageOverview 132,412 people are learning the system