commit ddea9e47eed3d2003af8e7483afdf8da2be80011 Author: Unique-Jerry <10902054+unique-jerry@user.noreply.gitee.com> Date: Thu Oct 12 20:42:51 2023 +0800 初始化仓库 diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..471a460 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..63e9001 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..132404b --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..eb4aeb6 --- /dev/null +++ b/pom.xml @@ -0,0 +1,73 @@ + + +4.0.0 + + + org.example + AiInterviewer + 1.0-SNAPSHOT + + + + spring-boot-starter-parent + org.springframework.boot + 2.6.6 + + + + + 8 + 8 + + + + + + com.alibaba + fastjson + 1.2.76 + + + org.projectlombok + lombok + 1.18.24 + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter + + + com.baomidou + mybatis-plus-boot-starter + 3.4.3 + + + org.springframework.boot + spring-boot-starter-test + + + mysql + mysql-connector-java + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.4.5 + + + + +jar + + \ No newline at end of file diff --git a/src/main/java/com/yzdx/AiInterviewer/AiInterviewerApplication.java b/src/main/java/com/yzdx/AiInterviewer/AiInterviewerApplication.java new file mode 100644 index 0000000..ccf728c --- /dev/null +++ b/src/main/java/com/yzdx/AiInterviewer/AiInterviewerApplication.java @@ -0,0 +1,12 @@ +package com.yzdx.AiInterviewer; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class AiInterviewerApplication { + public static void main(String[] args) { + + SpringApplication.run(AiInterviewerApplication.class,args); + } +} diff --git a/src/main/java/com/yzdx/AiInterviewer/utiles/MD5Util.java b/src/main/java/com/yzdx/AiInterviewer/utiles/MD5Util.java new file mode 100644 index 0000000..437e97c --- /dev/null +++ b/src/main/java/com/yzdx/AiInterviewer/utiles/MD5Util.java @@ -0,0 +1,26 @@ +package com.yzdx.AiInterviewer.utiles; + +import org.springframework.util.DigestUtils; + +import java.util.UUID; + +public class MD5Util { + + public static String getSalt(){ + String salt= UUID.randomUUID().toString().toUpperCase(); + + return salt; + } + + + public static String GetMD5Password(String password, String salt){ + + for (int i = 0; i < 3; i++) { + + password= DigestUtils.md5DigestAsHex((salt+password+salt).getBytes()).toUpperCase(); + + } + return password; + } + +} diff --git a/src/main/java/com/yzdx/AiInterviewer/utiles/RandomCodeUtil.java b/src/main/java/com/yzdx/AiInterviewer/utiles/RandomCodeUtil.java new file mode 100644 index 0000000..fe13e98 --- /dev/null +++ b/src/main/java/com/yzdx/AiInterviewer/utiles/RandomCodeUtil.java @@ -0,0 +1,21 @@ +package com.yzdx.AiInterviewer.utiles; + +import java.util.Random; + +public class RandomCodeUtil { + /** + * 生成的验证码 + * @param index 生成验证码的长度 + * @return + */ + public static String random(Integer index){ + String code = ""; + Random rd=new Random(); + for (int i = 0; i < index; i++) { + int r = rd.nextInt(10); //每次随机出一个数字(0-9) + code = code + r; //把每次随机出的数字拼在一起 + } + System.out.println(code); + return code; + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties new file mode 100644 index 0000000..289335d --- /dev/null +++ b/src/main/resources/application.properties @@ -0,0 +1,13 @@ +spring.datasource.url=jdbc:mysql://localhost:3306/shop?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai +spring.datasource.username=root +spring.datasource.password=root +mybatis.mapper-locations=classpath:mapper/*.xml +user.address.max-count=20 +# ��������ͻ��˲���ӦΪnull������ +spring.jackson.default-property-inclusion=NON_NULL + +##server.servlet.context-path=/store +spring.servlet.multipart.maxFileSize=10MB +spring.servlet.multipart.maxRequestSize=10MB + +server.port=80 \ No newline at end of file diff --git a/target/classes/application.properties b/target/classes/application.properties new file mode 100644 index 0000000..289335d --- /dev/null +++ b/target/classes/application.properties @@ -0,0 +1,13 @@ +spring.datasource.url=jdbc:mysql://localhost:3306/shop?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai +spring.datasource.username=root +spring.datasource.password=root +mybatis.mapper-locations=classpath:mapper/*.xml +user.address.max-count=20 +# ��������ͻ��˲���ӦΪnull������ +spring.jackson.default-property-inclusion=NON_NULL + +##server.servlet.context-path=/store +spring.servlet.multipart.maxFileSize=10MB +spring.servlet.multipart.maxRequestSize=10MB + +server.port=80 \ No newline at end of file diff --git a/target/classes/com/yzdx/AiInterviewer/AiInterviewerApplication.class b/target/classes/com/yzdx/AiInterviewer/AiInterviewerApplication.class new file mode 100644 index 0000000..ccbcbd5 Binary files /dev/null and b/target/classes/com/yzdx/AiInterviewer/AiInterviewerApplication.class differ