java Python+Django bank number management system

The Python language has a large number of development library files, which can be used directly by introducing these developed library files when using, which greatly improves the development efficiency.
Because of the powerful functions and high development efficiency of Python language, python language has been very popular in recent years. Many colleges and universities have also offered courses on Python language, especially in the face of large databases and artificial intelligence. Python has a very mature class library, which is one of the reasons why it is very popular.
Based on python language and MySQL technology, a bank number retrieval user management system is designed and implemented. The system mainly includes system user center, display management, user management, queuing management, service business management, user evaluation management, waiting area management and other functional modules

With the rapid development of information technology and network technology, human beings have entered a new information age. Traditional management technology has been unable to manage information efficiently and conveniently. In order to meet the needs of the times and optimize management efficiency, a variety of management systems came into being. All walks of life have entered the information management era one after another. The bank number user management system is one of the products of the information age.
Any system must follow the basic process of system design, and this system is no exception. It also needs to go through market research, demand analysis, outline design, detailed design, coding and testing,


In terms of database selection, the system uses the MySQL database with the highest utilization rate. The current mainstream databases include Microsoft's SQL Server, Oracle and MySQL of Oracle. Compared with the former two, MySQL is more compact and lightweight. It has commonly used functions such as attempts, stored procedures and transactions. It basically has all the contents, and it supports the standard SQL structured query language. MySQL is not only free, but also a cross platform data storage medium. These advantages are the important reasons why MySQL can stand out.

/**
 * 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 number 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);
    }

	/**
     * 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 the session user information of 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();
    }
}


catalogue
1 Introduction 1
1.1 subject background 1
1.2 current research situation 1
1.3 preliminary design method and implementation scheme
1.4 research contents of this paper 2
System development environment
2.1 introduction to Java 4
2.2myieclipse environment configuration 4
2.3 introduction to B / S structure
2.4MySQL database 5
2.5 SPRINGBOOT framework 5
3 system analysis 6
3.1 system feasibility analysis 6
3.1.1 economic feasibility 6
3.1.2 technical feasibility 6
3.1.3 operation 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 flow analysis 8
3.5.1 operation flow 8
3.5.2 add information flow 9
3.5.3 deleting information process10
4 system design 11
4.1 main functions of system design 11
4.2 database design 11
4.2.1 database design specifications 11
4.2.2 E/R Figure 11
4.2.3 data sheet 12
5 system realization 25
5.1 system function module 25
5.2 background module 27
5.2.1 administrator function module 27
5.2.2 user function module 30
6 system test 33
6.1 function test 33
6.2 availability test33
6.3 performance test 34
6.4 analysis of test results 34
7 conclusion 35
References 36
Acknowledgement37

Tags: Java Python Database Django

Posted by ev66 on Thu, 01 Sep 2022 02:49:54 +0930