完成登录接口的实现
This commit is contained in:
parent
6178b11b43
commit
00e418047c
34
pom.xml
34
pom.xml
@ -8,9 +8,12 @@
|
||||
<name>zooSystem</name>
|
||||
<description>zooSystem</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<java.version>17</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
|
||||
<spring-boot.version>2.7.6</spring-boot.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
@ -61,31 +64,28 @@
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<!-- 打包插件 -->
|
||||
<build>
|
||||
<finalName>zoo</finalName>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<version>2.7.6</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>com.ZooSystemApplication</mainClass>
|
||||
<skip>true</skip>
|
||||
<!-- 指定该Main Class为全局的唯一入口 -->
|
||||
<mainClass>com.com.zoo.ZooSystemApplication</mainClass>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>repackage</id>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
<goal>repackage</goal><!--可以把依赖的包都打包到生成的Jar包中-->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package zoo;
|
||||
package com.zoo;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.generator.FastAutoGenerator;
|
||||
@ -12,7 +12,7 @@ public class CodeGenerator {
|
||||
String url = "jdbc:mysql://localhost:3306/zoo";
|
||||
String username = "root";
|
||||
String password = "83363083a";
|
||||
String moduleName = "zoo";
|
||||
String moduleName = "com/zoo";
|
||||
String table = "account,admin,animal,keeper,veterinary";
|
||||
String mapperLocation = "C:\\Users\\16058\\IdeaProjects\\zooSystem\\src\\main\\resources\\mapper\\";
|
||||
FastAutoGenerator.create(url, username, password)
|
@ -1,4 +1,4 @@
|
||||
package zoo.ThreadTest;
|
||||
package com.zoo.ThreadTest;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.FutureTask;
|
@ -1,4 +1,4 @@
|
||||
package zoo.ThreadTest;
|
||||
package com.zoo.ThreadTest;
|
||||
|
||||
import java.util.concurrent.*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package zoo.ThreadTest;
|
||||
package com.zoo.ThreadTest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
@ -1,4 +1,4 @@
|
||||
package zoo;
|
||||
package com.zoo;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
@ -1,4 +1,4 @@
|
||||
package zoo.common;
|
||||
package com.zoo.common;
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
@ -1,4 +1,4 @@
|
||||
package zoo.common;
|
||||
package com.zoo.common;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package zoo.config;
|
||||
package com.zoo.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -1,4 +1,4 @@
|
||||
package zoo.config;
|
||||
package com.zoo.config;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
@ -1,6 +1,6 @@
|
||||
package zoo.config;
|
||||
package com.zoo.config;
|
||||
|
||||
import com.demo.zoo.common.JacksonObjectMapper;
|
||||
import com.zoo.common.JacksonObjectMapper;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
@ -1,4 +1,4 @@
|
||||
package zoo.controller;
|
||||
package com.zoo.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.stereotype.Controller;
|
@ -1,4 +1,4 @@
|
||||
package zoo.controller;
|
||||
package com.zoo.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.stereotype.Controller;
|
@ -1,4 +1,4 @@
|
||||
package zoo.controller;
|
||||
package com.zoo.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.stereotype.Controller;
|
@ -1,4 +1,4 @@
|
||||
package zoo.controller;
|
||||
package com.zoo.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.stereotype.Controller;
|
@ -1,21 +1,20 @@
|
||||
package zoo.controller;
|
||||
package com.zoo.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.demo.zoo.common.R;
|
||||
import com.demo.zoo.dto.AdminDto;
|
||||
import com.demo.zoo.dto.KeeperDto;
|
||||
import com.demo.zoo.dto.VeterinaryDto;
|
||||
import com.demo.zoo.entity.Account;
|
||||
import com.demo.zoo.entity.Admin;
|
||||
import com.demo.zoo.entity.Keeper;
|
||||
import com.demo.zoo.entity.Veterinary;
|
||||
import com.demo.zoo.service.IAccountService;
|
||||
import com.demo.zoo.service.IAdminService;
|
||||
import com.demo.zoo.service.IKeeperService;
|
||||
import com.demo.zoo.service.IVeterinaryService;
|
||||
import com.zoo.common.R;
|
||||
import com.zoo.dto.AdminDto;
|
||||
import com.zoo.dto.KeeperDto;
|
||||
import com.zoo.dto.VeterinaryDto;
|
||||
import com.zoo.entity.Account;
|
||||
import com.zoo.entity.Admin;
|
||||
import com.zoo.entity.Keeper;
|
||||
import com.zoo.entity.Veterinary;
|
||||
import com.zoo.service.IAccountService;
|
||||
import com.zoo.service.IAdminService;
|
||||
import com.zoo.service.IKeeperService;
|
||||
import com.zoo.service.IVeterinaryService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
@ -1,4 +1,4 @@
|
||||
package zoo.controller;
|
||||
package com.zoo.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.stereotype.Controller;
|
@ -1,6 +1,6 @@
|
||||
package zoo.dto;
|
||||
package com.zoo.dto;
|
||||
|
||||
import zoo.entity.Admin;
|
||||
import com.zoo.entity.Admin;
|
||||
|
||||
|
||||
public class AdminDto extends Admin {
|
@ -1,6 +1,6 @@
|
||||
package zoo.dto;
|
||||
package com.zoo.dto;
|
||||
|
||||
import zoo.entity.Keeper;
|
||||
import com.zoo.entity.Keeper;
|
||||
|
||||
public class KeeperDto extends Keeper {
|
||||
private Integer permissions;
|
@ -1,6 +1,6 @@
|
||||
package zoo.dto;
|
||||
package com.zoo.dto;
|
||||
|
||||
import zoo.entity.Veterinary;
|
||||
import com.zoo.entity.Veterinary;
|
||||
|
||||
public class VeterinaryDto extends Veterinary {
|
||||
private Integer permissions;
|
@ -1,4 +1,4 @@
|
||||
package zoo.entity;
|
||||
package com.zoo.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package zoo.entity;
|
||||
package com.zoo.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package zoo.entity;
|
||||
package com.zoo.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package zoo.entity;
|
||||
package com.zoo.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package zoo.entity;
|
||||
package com.zoo.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package zoo.mapper;
|
||||
package com.zoo.mapper;
|
||||
|
||||
import com.demo.zoo.entity.Account;
|
||||
import com.zoo.entity.Account;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
@ -1,6 +1,6 @@
|
||||
package zoo.mapper;
|
||||
package com.zoo.mapper;
|
||||
|
||||
import com.demo.zoo.entity.Admin;
|
||||
import com.zoo.entity.Admin;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
@ -1,6 +1,6 @@
|
||||
package zoo.mapper;
|
||||
package com.zoo.mapper;
|
||||
|
||||
import com.demo.zoo.entity.Animal;
|
||||
import com.zoo.entity.Animal;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
@ -1,6 +1,6 @@
|
||||
package zoo.mapper;
|
||||
package com.zoo.mapper;
|
||||
|
||||
import com.demo.zoo.entity.Keeper;
|
||||
import com.zoo.entity.Keeper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
@ -1,6 +1,6 @@
|
||||
package zoo.mapper;
|
||||
package com.zoo.mapper;
|
||||
|
||||
import com.demo.zoo.entity.Veterinary;
|
||||
import com.zoo.entity.Veterinary;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
@ -1,10 +1,8 @@
|
||||
package zoo.service;
|
||||
package com.zoo.service;
|
||||
|
||||
import com.demo.zoo.entity.Account;
|
||||
import com.zoo.entity.Account;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
@ -1,10 +1,8 @@
|
||||
package zoo.service;
|
||||
package com.zoo.service;
|
||||
|
||||
import com.demo.zoo.entity.Admin;
|
||||
import com.zoo.entity.Admin;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
@ -1,6 +1,6 @@
|
||||
package zoo.service;
|
||||
package com.zoo.service;
|
||||
|
||||
import com.demo.zoo.entity.Animal;
|
||||
import com.zoo.entity.Animal;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
@ -1,11 +1,8 @@
|
||||
package zoo.service;
|
||||
package com.zoo.service;
|
||||
|
||||
import com.demo.zoo.entity.Admin;
|
||||
import com.demo.zoo.entity.Keeper;
|
||||
import com.zoo.entity.Keeper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
@ -1,11 +1,8 @@
|
||||
package zoo.service;
|
||||
package com.zoo.service;
|
||||
|
||||
import com.demo.zoo.entity.Admin;
|
||||
import com.demo.zoo.entity.Veterinary;
|
||||
import com.zoo.entity.Veterinary;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
@ -1,8 +1,8 @@
|
||||
package zoo.service.impl;
|
||||
package com.zoo.service.impl;
|
||||
|
||||
import com.demo.zoo.entity.Account;
|
||||
import com.demo.zoo.mapper.AccountMapper;
|
||||
import zoo.service.IAccountService;
|
||||
import com.zoo.entity.Account;
|
||||
import com.zoo.mapper.AccountMapper;
|
||||
import com.zoo.service.IAccountService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,10 +1,9 @@
|
||||
package zoo.service.impl;
|
||||
package com.zoo.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.demo.zoo.entity.Admin;
|
||||
import com.demo.zoo.entity.Keeper;
|
||||
import com.demo.zoo.mapper.AdminMapper;
|
||||
import zoo.service.IAdminService;
|
||||
import com.zoo.entity.Admin;
|
||||
import com.zoo.mapper.AdminMapper;
|
||||
import com.zoo.service.IAdminService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package zoo.service.impl;
|
||||
package com.zoo.service.impl;
|
||||
|
||||
import com.demo.zoo.entity.Animal;
|
||||
import com.demo.zoo.mapper.AnimalMapper;
|
||||
import zoo.service.IAnimalService;
|
||||
import com.zoo.entity.Animal;
|
||||
import com.zoo.mapper.AnimalMapper;
|
||||
import com.zoo.service.IAnimalService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,10 +1,9 @@
|
||||
package zoo.service.impl;
|
||||
package com.zoo.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.demo.zoo.entity.Keeper;
|
||||
import com.demo.zoo.entity.Veterinary;
|
||||
import com.demo.zoo.mapper.KeeperMapper;
|
||||
import zoo.service.IKeeperService;
|
||||
import com.zoo.entity.Keeper;
|
||||
import com.zoo.mapper.KeeperMapper;
|
||||
import com.zoo.service.IKeeperService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package zoo.service.impl;
|
||||
package com.zoo.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.demo.zoo.entity.Veterinary;
|
||||
import com.demo.zoo.mapper.VeterinaryMapper;
|
||||
import zoo.service.IVeterinaryService;
|
||||
import com.zoo.entity.Veterinary;
|
||||
import com.zoo.mapper.VeterinaryMapper;
|
||||
import com.zoo.service.IVeterinaryService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zoo.mapper.AdminMapper">
|
||||
<mapper namespace="com.com.zoo.mapper.AdminMapper">
|
||||
|
||||
</mapper>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zoo.mapper.AnimalMapper">
|
||||
<mapper namespace="com.com.zoo.mapper.AnimalMapper">
|
||||
|
||||
</mapper>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zoo.mapper.KeeperMapper">
|
||||
<mapper namespace="com.com.zoo.mapper.KeeperMapper">
|
||||
|
||||
</mapper>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zoo.mapper.VeterinaryMapper">
|
||||
<mapper namespace="com.com.zoo.mapper.VeterinaryMapper">
|
||||
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user