parent
5e48f8de66
commit
c41e1453c0
@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="demo" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="demo" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,19 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
wrapperVersion=3.3.2
|
||||
distributionType=only-script
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
|
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.4.2</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>demo</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>demo</name>
|
||||
<description>demo</description>
|
||||
<url/>
|
||||
<licenses>
|
||||
<license/>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer/>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection/>
|
||||
<developerConnection/>
|
||||
<tag/>
|
||||
<url/>
|
||||
</scm>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<!-- Apache Commons FileUpload -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>commons-fileupload</groupId>-->
|
||||
<!-- <artifactId>commons-fileupload</artifactId>-->
|
||||
<!-- <version>1.4</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web-services</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>3.0.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter-test</artifactId>
|
||||
<version>3.0.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.auth0</groupId>
|
||||
<artifactId>java-jwt</artifactId>
|
||||
<version>4.4.0</version>
|
||||
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>tomcat-jdbc</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
package com.example.demo;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class Demo4Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Demo4Application.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.example.demo.config;
|
||||
|
||||
import com.example.demo.pojo.Result;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import jakarta.servlet.*;
|
||||
import jakarta.servlet.annotation.WebFilter;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
//重点
|
||||
@WebFilter({"/user/*","/api","/upload","/borrow","/api/rank"})
|
||||
public class MyFilter implements Filter{
|
||||
|
||||
List<String> exclude;
|
||||
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {
|
||||
System.out.println("初始化MyFilter==========================");
|
||||
exclude = new ArrayList<>();
|
||||
exclude.add("/user/login");
|
||||
exclude.add("/user/register");
|
||||
}
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||
HttpServletResponse response = (HttpServletResponse) servletResponse;
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
String requestURI = request.getRequestURI();
|
||||
if (exclude.contains(requestURI) ||
|
||||
requestURI.endsWith(".html") ||
|
||||
requestURI.endsWith(".js") ||
|
||||
requestURI.endsWith(".css") ||
|
||||
requestURI.endsWith(".png") ||
|
||||
requestURI.endsWith(".jpg") ||
|
||||
requestURI.endsWith(".jpeg")
|
||||
) {
|
||||
// 在排除列表中,继续过滤链
|
||||
filterChain.doFilter(servletRequest,servletResponse);
|
||||
return;
|
||||
}
|
||||
|
||||
boolean loginflag = request.getSession().getAttribute("username") != null;
|
||||
if(loginflag){
|
||||
//登陆成功
|
||||
//这就代码就是放行
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
}else{
|
||||
//登陆失败,打回请求
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
response.getWriter().write(mapper.writeValueAsString(Result.error("未登录")));
|
||||
}
|
||||
|
||||
System.out.println("filter==========================");
|
||||
}
|
||||
@Override
|
||||
public void destroy() {
|
||||
System.out.println("销毁filter==========================");
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.example.demo.controller;
|
||||
|
||||
import com.example.demo.mapper.UserMapper;
|
||||
import com.example.demo.pojo.Article;
|
||||
import com.example.demo.pojo.Result;
|
||||
import com.example.demo.service.ArticleService;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
@RequestMapping("/api")
|
||||
public class ArticleController {
|
||||
|
||||
|
||||
@Autowired
|
||||
ArticleService articleService;
|
||||
|
||||
@Autowired
|
||||
UserMapper userMapper;
|
||||
|
||||
@PostMapping("/add")
|
||||
public Result<Article> addarticle(@RequestBody Article article, HttpSession session) throws JsonProcessingException {
|
||||
System.out.println("Received article: " + article); // 添加此行以调试
|
||||
int admin = userMapper.findByUserName(String.valueOf(session.getAttribute("username"))).getAdmin();
|
||||
if (admin == 1) {
|
||||
articleService.addarticle(article);
|
||||
return Result.success(article);
|
||||
}
|
||||
else{
|
||||
return Result.error("权限不够。。。");
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/select")
|
||||
public Result selectarticle(HttpServletRequest request) {
|
||||
List<Article> articles = articleService.selectarticle();
|
||||
System.out.println(request.getRequestURL());
|
||||
return Result.success(articles);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//根据书籍名字搜索单个书籍信息
|
||||
@GetMapping("/selectone")
|
||||
public Result<Article> selectone(String title){
|
||||
Article article= articleService.selectonearticle(title);
|
||||
return Result.success(article);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.example.demo.controller;
|
||||
|
||||
import com.example.demo.mapper.BorrowMapper;
|
||||
import com.example.demo.pojo.Article;
|
||||
import com.example.demo.pojo.Borrow;
|
||||
import com.example.demo.pojo.Result;
|
||||
import com.example.demo.service.ArticleService;
|
||||
import com.example.demo.service.BorrowService;
|
||||
|
||||
import com.example.demo.service.UserService;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
@RequestMapping("/borrow")
|
||||
public class BorrowController {
|
||||
@Autowired
|
||||
private BorrowService borrowService;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private ArticleService articleService;
|
||||
@Autowired
|
||||
private BorrowMapper borrowMapper;
|
||||
|
||||
|
||||
//租借书
|
||||
@PostMapping("/borrowbook")
|
||||
public Result borrowbook(String title, HttpSession session) {
|
||||
Borrow borrow = new Borrow();
|
||||
borrow.setTitle(title);
|
||||
borrow.setBorrower((String) session.getAttribute("username"));
|
||||
borrow.setBorrow_time(LocalDateTime.now());
|
||||
Article article = articleService.selectonearticle(title);
|
||||
float money = article.getMoney();
|
||||
float balance = userService.findmoney(session.getAttribute("username"));
|
||||
if (balance >= money) {
|
||||
borrowService.borrow(borrow);
|
||||
userService.deduct(money,session.getAttribute("username"));
|
||||
return Result.success(borrow);
|
||||
}
|
||||
else{
|
||||
return Result.error("余额不足!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//还书
|
||||
@PostMapping("/returnbook")
|
||||
public Result returnbook(String title, HttpSession session){
|
||||
Borrow borrow=new Borrow();
|
||||
borrow.setTitle(title);
|
||||
borrow.setBorrower((String) session.getAttribute("username"));
|
||||
borrow.setReturn_time(LocalDateTime.now());
|
||||
borrowService.returnbook(borrow);
|
||||
borrowMapper.fine();
|
||||
return Result.success(borrow);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.example.demo.controller;
|
||||
|
||||
import com.example.demo.pojo.ArticleRentRankDTO;
|
||||
import com.example.demo.service.BorrowRankService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/rank")
|
||||
public class BorrowRankController {
|
||||
|
||||
@Autowired
|
||||
private BorrowRankService borrowRankService;
|
||||
|
||||
/**
|
||||
* 本周热租榜单接口
|
||||
*/
|
||||
@GetMapping("/weekly")
|
||||
public List<ArticleRentRankDTO> weeklyRank() {
|
||||
return borrowRankService.getWeeklyRank();
|
||||
}
|
||||
|
||||
/**
|
||||
* 本月热租榜单接口
|
||||
*/
|
||||
@GetMapping("/monthly")
|
||||
public List<ArticleRentRankDTO> monthlyRank() {
|
||||
return borrowRankService.getMonthlyRank();
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.example.demo.mapper;
|
||||
|
||||
|
||||
import com.example.demo.pojo.Article;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ArticleMapper {
|
||||
|
||||
@Insert("INSERT INTO article (title, content, url, state)\n" +
|
||||
"VALUES \n" +
|
||||
"(#{title}, #{content}, #{url},#{state})")
|
||||
@Options(useGeneratedKeys = true, keyColumn = "id", keyProperty = "id")
|
||||
Long addarticle(Article article);
|
||||
|
||||
|
||||
//查询所有书籍所有信息
|
||||
@Select("SELECT * FROM article")
|
||||
List<Article> selectarticle();
|
||||
|
||||
//查询
|
||||
|
||||
//管理员删除书籍
|
||||
@Delete("DELETE FROM article WHERE id = #{id}")
|
||||
Integer deleteArticle(Long id);
|
||||
|
||||
//查询单本书
|
||||
@Select("SELECT * from article where title=#{title}")
|
||||
Article selectonearticle(String title);
|
||||
|
||||
|
||||
@Select("SELECT a.* " +
|
||||
"FROM article a " +
|
||||
"INNER JOIN borrow b ON a.title = b.title " +
|
||||
"INNER JOIN user u ON b.borrower = u.username " +
|
||||
"WHERE u.username = #{username} " +
|
||||
"AND b.borrow_time IS NOT NULL " +
|
||||
"AND b.return_time IS NULL")
|
||||
List<Article> findBorrowedBooksByUsername(String username);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.example.demo.mapper;
|
||||
|
||||
|
||||
import com.example.demo.pojo.User;
|
||||
import com.example.demo.pojo.info;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
@Mapper
|
||||
public interface UserMapper {
|
||||
@Select("select * from user where username=#{username}")
|
||||
User findByUserName(String username);
|
||||
|
||||
@Insert("insert into user(username,password,vip,create_time,update_time,admin,balance)" +
|
||||
" values(#{username},#{password},#{vip},now(),now(),#{admin},#{balance})")
|
||||
void add(String username,String password,int vip,int admin,float balance);
|
||||
|
||||
@Select("SELECT password FROM user WHERE username=#{username}")
|
||||
String login(String username);
|
||||
|
||||
|
||||
@Select("select username,pic from user where username=#{username}")
|
||||
info getinfo( String username);
|
||||
|
||||
|
||||
//充钱
|
||||
@Update("UPDATE user\n" +
|
||||
"SET balance=balance+#{money1}\n" +
|
||||
"WHERE username=#{username};")
|
||||
void recharge(float money1,String username);
|
||||
|
||||
|
||||
//查询余额
|
||||
@Select("select balance from user where username=#{username}")
|
||||
float findbalance(Object username);
|
||||
|
||||
//更新VIP余额
|
||||
@Update("UPDATE `user`\n" +
|
||||
"SET `vip` = CASE\n" +
|
||||
" WHEN `balance` >= 10 AND `balance` < 30 THEN '1'\n" +
|
||||
" WHEN `balance` >= 30 AND `balance` < 100 THEN '2'\n" +
|
||||
" WHEN `balance` >= 100 AND `balance` < 300 THEN '3'\n" +
|
||||
" WHEN `balance` >= 300 AND `balance` < 500 THEN '4'\n" +
|
||||
" WHEN `balance` >= 500 THEN '5'\n" +
|
||||
" ELSE `vip` -- 不满足条件的记录保持原有vip值\n" +
|
||||
"END\n" +
|
||||
"WHERE `username` = #{username};")
|
||||
void updateVIP( float balance,String username);
|
||||
|
||||
@Select("select vip from user where username=#{username}")
|
||||
int findVIP(String username);
|
||||
|
||||
//扣钱
|
||||
@Update("UPDATE user\n" +
|
||||
"SET balance=balance-#{money1}\n" +
|
||||
"WHERE username=#{username};")
|
||||
void deduct(float money1,String username);
|
||||
|
||||
//管理员删除书
|
||||
@Delete("DELETE FROM article WHERE title=#{title}")
|
||||
void deletebook(String title);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.example.demo.pojo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Article {
|
||||
private int id;
|
||||
private String title;
|
||||
private String content;
|
||||
private String url;
|
||||
private String state;
|
||||
private float money;
|
||||
private int number;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.example.demo.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ArticleRentRankDTO {
|
||||
private String title; // 物品名称
|
||||
private String url; // 封面图片
|
||||
private Float money; // 租借价格
|
||||
private Integer number; // 租借次数
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.example.demo.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class Borrow {
|
||||
private String title;
|
||||
private String borrower;
|
||||
private LocalDateTime borrow_time;
|
||||
private LocalDateTime return_time;
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.example.demo.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@Data
|
||||
public class User {
|
||||
private Integer id;
|
||||
private String username;
|
||||
private String password;
|
||||
private String vip;
|
||||
private String userPic;
|
||||
private LocalDateTime createTime;
|
||||
private LocalDateTime updateTime;
|
||||
private Integer admin;
|
||||
private float balance;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.example.demo.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class info {
|
||||
private String username;
|
||||
private String pic;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.example.demo.service;
|
||||
|
||||
import com.example.demo.pojo.Article;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ArticleService {
|
||||
Long addarticle(Article article);
|
||||
|
||||
List<Article> selectarticle();
|
||||
|
||||
List<Article> getUserBorrowedBooks(String username);
|
||||
|
||||
boolean deletearticle(Long id);
|
||||
|
||||
Article selectonearticle(String title);
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
package com.example.demo.service;
|
||||
|
||||
import com.example.demo.mapper.BorrowRankMapper;
|
||||
import com.example.demo.pojo.ArticleRentRankDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BorrowRankService {
|
||||
|
||||
@Autowired // 改用Spring的@Autowired注解
|
||||
private BorrowRankMapper borrowRankMapper;
|
||||
|
||||
/**
|
||||
* 获取本周热租榜单
|
||||
*/
|
||||
public List<ArticleRentRankDTO> getWeeklyRank() {
|
||||
return borrowRankMapper.listWeeklyRank();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本月热租榜单
|
||||
*/
|
||||
public List<ArticleRentRankDTO> getMonthlyRank() {
|
||||
return borrowRankMapper.listMonthlyRank();
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.example.demo.service;
|
||||
|
||||
import com.example.demo.mapper.BorrowMapper;
|
||||
import com.example.demo.pojo.Borrow;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
public interface BorrowService {
|
||||
|
||||
|
||||
void borrow(Borrow borrow);
|
||||
|
||||
void returnbook(Borrow borrow);
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.example.demo.service;
|
||||
|
||||
import com.example.demo.pojo.User;
|
||||
import com.example.demo.pojo.info;
|
||||
|
||||
public interface UserService {
|
||||
User findByUserName(String username);
|
||||
|
||||
void register(String username, String password);
|
||||
|
||||
void login(String username, String password);
|
||||
|
||||
info getinfo(String username);
|
||||
|
||||
void recharge(float money, String username);
|
||||
|
||||
float findmoney(Object username);
|
||||
|
||||
void deduct(float money, Object username);
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.example.demo.service.impl;
|
||||
|
||||
import com.example.demo.mapper.ArticleMapper;
|
||||
import com.example.demo.pojo.Article;
|
||||
import com.example.demo.service.ArticleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ArticleServiceImpl implements ArticleService {
|
||||
|
||||
|
||||
@Autowired
|
||||
ArticleMapper articleMapper;
|
||||
@Override
|
||||
public Long addarticle(Article article) {
|
||||
|
||||
return articleMapper.addarticle(article);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Article> selectarticle() {
|
||||
return articleMapper.selectarticle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deletearticle(Long id) {
|
||||
final Integer integer = articleMapper.deleteArticle((long) Math.toIntExact(id));
|
||||
return integer == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Article selectonearticle(String title) {
|
||||
return articleMapper.selectonearticle(title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Article> getUserBorrowedBooks(String username) {
|
||||
// 可添加参数校验(如用户名非空)
|
||||
if (username == null || username.trim().isEmpty()) {
|
||||
throw new IllegalArgumentException("用户名不能为空");
|
||||
}
|
||||
return articleMapper.findBorrowedBooksByUsername(username);
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.example.demo.service.impl;
|
||||
|
||||
|
||||
import com.example.demo.mapper.UserMapper;
|
||||
import com.example.demo.pojo.User;
|
||||
import com.example.demo.pojo.info;
|
||||
import com.example.demo.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UserServiceImpl implements UserService {
|
||||
|
||||
@Autowired
|
||||
private UserMapper userMapper;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public User findByUserName(String username) {
|
||||
User u=userMapper.findByUserName(username);
|
||||
return u;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(String username, String password) {
|
||||
userMapper.add(username,password,0,0,0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void login(String username, String password) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public info getinfo(String username) {
|
||||
return userMapper.getinfo(username);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recharge(float money, String username) {
|
||||
userMapper.recharge(money,username);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float findmoney(Object username) {
|
||||
return userMapper.findbalance(username);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deduct(float money,Object name) {
|
||||
userMapper.deduct(money, (String) name);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.example.demo.utils;
|
||||
|
||||
import com.auth0.jwt.JWT;
|
||||
import com.auth0.jwt.algorithms.Algorithm;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
public class JwtUtil {
|
||||
|
||||
private static final String KEY = "itheima";
|
||||
|
||||
//接收业务数据,生成token并返回
|
||||
public static String genToken(Map<String, Object> claims) {
|
||||
return JWT.create()
|
||||
.withClaim("claims", claims)
|
||||
.withExpiresAt(new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 12))
|
||||
.sign(Algorithm.HMAC256(KEY));
|
||||
}
|
||||
|
||||
//接收token,验证token,并返回业务数据
|
||||
public static Map<String, Object> parseToken(String token) {
|
||||
return JWT.require(Algorithm.HMAC256(KEY))
|
||||
.build()
|
||||
.verify(token)
|
||||
.getClaim("claims")
|
||||
.asMap();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
file.upload-dir=D:\\uploads\\files
|
||||
# MySQL ?????
|
||||
|
||||
#spring.datasource.url= jdbc:mysql://124.220.45.50:3306/big_event
|
||||
#spring.datasource.username= big_event
|
||||
#spring.datasource.password= 3cjBiCj3ZBafn3kP
|
||||
|
||||
#spring.datasource.url= jdbc:mysql://127.0.0.1:3306/big_event
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=hsp
|
||||
|
||||
|
||||
spring.datasource.url= jdbc:mysql://127.0.0.1:3306/big_event1
|
||||
spring.datasource.username= root
|
||||
spring.datasource.password= hsp
|
||||
|
||||
|
||||
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
server.port=8877
|
||||
spring.servlet.multipart.max-file-size=5MB
|
||||
spring.servlet.multipart.max-request-size=5MB
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.example.demo;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class Demo4ApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
file.upload-dir=D:\\uploads\\files
|
||||
# MySQL ?????
|
||||
|
||||
#spring.datasource.url= jdbc:mysql://124.220.45.50:3306/big_event
|
||||
#spring.datasource.username= big_event
|
||||
#spring.datasource.password= 3cjBiCj3ZBafn3kP
|
||||
|
||||
#spring.datasource.url= jdbc:mysql://127.0.0.1:3306/big_event
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=hsp
|
||||
|
||||
|
||||
spring.datasource.url= jdbc:mysql://127.0.0.1:3306/big_event1
|
||||
spring.datasource.username= root
|
||||
spring.datasource.password= hsp
|
||||
|
||||
|
||||
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
server.port=8877
|
||||
spring.servlet.multipart.max-file-size=5MB
|
||||
spring.servlet.multipart.max-request-size=5MB
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,43 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : mysql
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50710 (5.7.10)
|
||||
Source Host : 127.0.0.1:3306
|
||||
Source Schema : big_event1
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50710 (5.7.10)
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 25/07/2025 16:15:25
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for article
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `article`;
|
||||
CREATE TABLE `article` (
|
||||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`title` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文章标题',
|
||||
`content` varchar(10000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文章内容',
|
||||
`url` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章封面',
|
||||
`state` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '草稿' COMMENT '文章状态: 如果是被租走,就显示租的人名字',
|
||||
`category_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '文章分类ID',
|
||||
`create_user` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '创建人ID',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`money` float NOT NULL COMMENT '租借书籍价格',
|
||||
`number` int(11) NOT NULL COMMENT '被租数量',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `fk_article_category`(`category_id`) USING BTREE,
|
||||
INDEX `fk_article_user`(`create_user`) USING BTREE,
|
||||
CONSTRAINT `fk_article_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
|
||||
CONSTRAINT `fk_article_user` FOREIGN KEY (`create_user`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 58 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
@ -0,0 +1,31 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : mysql
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50710 (5.7.10)
|
||||
Source Host : 127.0.0.1:3306
|
||||
Source Schema : big_event1
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50710 (5.7.10)
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 25/07/2025 16:15:36
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for borrow
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `borrow`;
|
||||
CREATE TABLE `borrow` (
|
||||
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`borrower` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`borrow_time` datetime NULL DEFAULT NULL,
|
||||
`return_time` datetime NULL DEFAULT NULL
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
Binary file not shown.
Loading…
Reference in new issue