Abstract:

With the development of society, all walks of life are taking advantage of the information age. The superiority and popularization of computer make it necessary to develop all kinds of information system. Museum communication platform, the main modules include view personal center, user management, museum information management, cultural relics information management, cultural relics classification management, message board management, system management and other functions. The system administrator is mainly for the safe and effective storage and management of all kinds of information, but also can manage the system and update maintenance operations, and has the corresponding operation rights on the background. In order to realize the functions of museum communication platform, it needs the strong support of background database. The administrator verifies the registration information, collects the user information, and thus obtains the association information and so on the large amount of data by the database management. In this paper, the database server uses Mysql as the background database, so that the Web and database are closely linked. In the design process, the system code is fully guaranteed to be readable, practical, easy to expand, universal, easy to maintain, easy to operate and simple page characteristics. The development of this system makes it more convenient to obtain the information of the museum exchange platform, and also makes the management information of the museum exchange platform become more systematic and orderly. The system interface is friendly and easy to operate.

Functional design:

Administrator function structure diagram, as shown in the figure:

Structure diagram of the front desk, as shown in the figure

Function screenshots:

User login and registration:

System home page: System home page can view the home page, museum information, cultural relics information, notices and announcements, message board feedback, personal center, background management and other contents

Automobile information: on the automobile information page, users can view automobile number, automobile name, automobile classification, pictures, automobile introduction, cultural relic details and other contents. Users can save and comment, as shown in the picture below

Details:

 

Feedback:

Personal Center:

My collection:

Background information of common users:

Administrator Background management: Administrators can view the personal center, user management, museum information management, cultural relic information management, cultural relic classification management, message board management, and system management after logging in to the museum exchange platform, as shown in Figure 5-8

Automobile Information Management:

Details:

Automobile information classification:

Message board:

Home page rotation map:

Key code:


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

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

	/** * exit */
	@GetMapping(value = "logout")
	public R logout(HttpServletRequest request) {
		request.getSession().invalidate();
		return R.ok("Exit successful");
	}
	
	/**
     * 密码重置
     */
    @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));
    }

    /** * info */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /** * Get user session user information */
    @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);
    }

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

    /** * modify */
    @RequestMapping("/update")
    public R update(@RequestBody UserEntity user){
// ValidatorUtils.validateEntity(user);
    	UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));
    	if(u! =null&& u.getId()! =user.getId() && u.getUsername().equals(user.getUsername())) {return R.error("User name already exists.");
    	}
        userService.updateById(user);// All updates
        return R.ok();
    }

    /** * delete */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        userService.deleteBatchIds(Arrays.asList(ids));
        returnR.ok(); }}Copy the code

File upload:

/** * Upload the file mapping table */
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
	@Autowired
    private ConfigService configService;
	/** * Upload file */
	@RequestMapping("/upload")
	public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("Upload file cannot be empty");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") +1);
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(request.getSession().getServletContext().getRealPath("/upload") +"/"+fileName);
		file.transferTo(dest);
		if(StringUtils.isNotBlank(type) && type.equals("1")) {
			ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name"."faceFile"));
			if(configEntity==null) {
				configEntity = new ConfigEntity();
				configEntity.setName("faceFile");
				configEntity.setValue(fileName);
			} else {
				configEntity.setValue(fileName);
			}
			configService.insertOrUpdate(configEntity);
		}
		return R.ok().put("file", fileName);
	}
	
	/** * Download file */
	@IgnoreAuth
	@RequestMapping("/download")
	public void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {
		try {
			File file = new File(request.getSession().getServletContext().getRealPath("/upload") +"/"+fileName);
			if (file.exists()) {
				response.reset();
				response.setHeader("Content-Disposition"."attachment; filename="" + fileName+""");
				response.setHeader("Cache-Control"."no-cache");
				response.setHeader("Access-Control-Allow-Credentials"."true");
				response.setContentType("application/octet-stream; charset=UTF-8"); IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream()); }}catch(IOException e) { e.printStackTrace(); }}}Copy the code

Database design:

Transform the e-R diagram of database conceptual design into a relational database. In a relational database, data relationships consist of data tables, but the structure of the table is expressed in the fields of the table.

Table 4-1 wenwufenlei table

The column name The data type The length of the The constraint
id int 11 NOT NULL
addtime varchar 50 default NULL
wenwufenlei varchar 50 default NULL

Table 4-2: Wenwuxinxi table

The column name The data type The length of the The constraint
id  int 11 NOT NULL
addtime varchar 50 default NULL
wenwubianhao varchar 50 default NULL
wenwumingcheng varchar 50 default NULL
wenwufenlei varchar 200 default NULL
wenwujianjie varchar 200 default NULL
tupian varchar 200 default NULL
wenwuxiangqing varchar 200 default NULL
clicktime varchar 200 default NULL
clicknum varchar 200 default NULL

Table 4-3: YONGHU table

The column name The data type The length of the The constraint
id  int 11 NOT NULL
addtime varchar 50 default NULL
zhanghao varchar 50 default NULL
mima varchar 50 default NULL
xingming varchar 200 default NULL
nianling varchar 200 default NULL
xingbie varchar 200 default NULL
shouji varchar 200 default NULL
zhaopian varchar 200 default NULL

Thesis Contents:

Pick to

Abstract

1 System Overview

1.1 an overview of the

1.2 Significance of the project

1.3 Research content

2 System development environment

2.1 JSP technology introduction

2.2 JAVA introduction

2.3 Access database implementation method

2.4 Two connection modes of the MySQL database

2.5 MySql Database

2.6 SSM framework

3 Demand Analysis

3.1 Technical feasibility: Technical background

3.2 Economic Feasibility

3.3 Operation Feasibility:

3.4 System design rules

3.5 System flow and logic

4. System outline design

4.1 an overview of the

4.2 System Architecture

4.3. Database design

4.3.1 Database Entities

4.3.2 Database design table

4.4 the data table

Chapter 5 detailed system design

5.1 System Function Modules

5.2 Administrator Function Modules

6 System Test

6.1 Purpose of system Test

6.2 System test method

6.3 Test Results

conclusion

Thank you

reference

People like, like, follow, comment, check the homepage to make friends

Clocked articles updated 220/365 days