java computer graduation design uniApp, a children's vaccination management applet based on Android WeChat

This paper describes the design and implementation of App for Childhood Vaccine Management. Based on the characteristics of electronic management system, the current status of children's vaccine management App is analyzed, and the design scheme of implementation of children's vaccine management App is given.
This paper mainly completes the privilege division of different users, different users have different privileges of operation functions. On the client side, there are three roles: administrator, doctor and user, which can log on. Users can query children's vaccines, book vaccines, view administrator's information, modify personal information, etc. Administrators can publish vaccines information, book vaccines, and view user's information. Modify personal information and so on: In the WEB server, administrators can manage the information of users and administrators, as well as vaccines, vaccine classification, rotation maps, system announcements, and so on.

System privileges are divided into two categories, service-side and client-side, involving users.
(a) Server - Administrator: Administrators use the system involves the main functions: personal center, user management, vaccination station management, hospital management, vaccine classification management, vaccine information management, vaccination appointment management, vaccination registration management, system management and other functions.
(b) Client - User: User access system can operate on homepage, vaccine information, training learning, forum communication, and me accordingly

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

	/**
	 * Sign in
	 */
	@IgnoreAuth
	@PostMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
		if(user==null || !user.getPassword().equals(password)) {
			return R.error("Incorrect account or password");
		}
		String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
		return R.ok().put("token", token);
	}
	
	/**
	 * 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();
    }

	/**
	 * Sign out
	 */
	@GetMapping(value = "logout")
	public R logout(HttpServletRequest request) {
		request.getSession().invalidate();
		return R.ok("Exit succeeded");
	}
	
	/**
     * Password Reset
     */
    @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 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);
    }

	/**
     * list
     */
    @RequestMapping("/list")
    public R list( UserEntity user){
       	EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
      	ew.allEq(MPUtil.allEQMapPre( user, "user")); 
        return R.ok().put("data", userService.selectListView(ew));
    }

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

    /**
     * Preservation
     */
    @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();
    }

    /**
     * modify
     */
    @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 Long[] ids){
        userService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}


Catalog
1 Introduction 1
1.1 Topic Background 1
1.2 Research Status 1
1.3 Preliminary design method and implementation plan 2
1.4 Contents of this study 2
2 System Development Environment 4
2.1 Introduction to Tools 4
2.2 Environment Configuration 4
2.3 B/S structure Introduction 4
2.4 MySQL Database 5
2.5 Framework Introduction 5
3System Analysis 6
3.1 System Feasibility Analysis 6
3.1.1 Economic Feasibility 6
3.1.2 Technical Feasibility 6
3.1.3 Operational Feasibility 6
3.2 System Status Analysis 6
3.3 Functional requirements analysis 7
3.4 System Design Rules and Operating Environment 8
3.5 System Process Analysis 8
3.5.1 Operation Flow 8
3.5.2 Add Information Flow 9
3.5.3 Delete Information Flow 10
System Design 4 11
4.1 System Design Main Functions 11
4.2 Database Design 11
4.2.1 Database Design Specification 11
4.2.2 E/R Fig. 11
4.2.3 Data Table 12
5 System implementation 25
5.1 System Module 25
5.2 Background module 27
5.2.1 Administrator Module 27
5.2.2 User Module 30
6System Test 33
6.1 Functional Test 33
6.2 Usability Test 33
6.3 Performance Test 34
6.4 Test Result Analysis 34
7 Conclusion 35
Reference 36
Thank you 37

Tags: Java Android Mini Program uni-app wechat

Posted by rks on Mon, 12 Sep 2022 01:56:36 +0930