Browse Source

学生端接口定义

imti_qq 3 years ago
parent
commit
233e794ad4

+ 3 - 4
pom.xml

@@ -1,7 +1,5 @@
 <?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	
     <groupId>com.admin</groupId>
@@ -217,7 +215,8 @@
         <module>admin-generator</module>
         <module>admin-common</module>
         <module>admin-major</module>
-    </modules>
+    <module>shunt-api</module>
+  </modules>
     <packaging>pom</packaging>
 
 

+ 43 - 0
shunt-api/pom.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>com.admin</groupId>
+    <artifactId>admin</artifactId>
+    <version>3.8.1</version>
+  </parent>
+  <groupId>com.shunt</groupId>
+  <artifactId>shunt-api</artifactId>
+  <version>3.8.1</version>
+  <name>shunt-api</name>
+  <url>http://maven.apache.org</url>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-web</artifactId>
+    </dependency>
+    <dependency>
+        <groupId>com.github.xiaoymin</groupId>
+        <artifactId>knife4j-spring-boot-starter</artifactId>
+        <version>2.0.4</version>
+    </dependency>
+    <dependency>
+        <groupId>org.projectlombok</groupId>
+        <artifactId>lombok</artifactId>
+    </dependency>
+    <dependency>
+	    <groupId>javax.validation</groupId>
+	    <artifactId>validation-api</artifactId>
+  	</dependency>
+  </dependencies>
+</project>

+ 13 - 0
shunt-api/src/main/java/org/shunt/App.java

@@ -0,0 +1,13 @@
+package org.shunt;
+
+/**
+ * Hello world!
+ *
+ */
+public class App 
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "Hello World!" );
+    }
+}

+ 44 - 0
shunt-api/src/main/java/org/shunt/contorller/IndexController.java

@@ -0,0 +1,44 @@
+package org.shunt.contorller;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.shunt.contorller.request.XmoseRequest;
+import org.shunt.contorller.request.XmoseResponse;
+import org.shunt.contorller.response.BannerVO;
+import org.shunt.contorller.response.ScheduleVO;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@RestController
+@Api("学生端首页")
+@RequestMapping("/index")
+public class IndexController {
+
+    @GetMapping("/banner")
+    @ApiOperation(value = "首页Banner接口", notes="首页Banner接口")
+    public XmoseResponse<List<BannerVO>> bannerList(XmoseRequest<?> request) {
+        List<BannerVO> bannerVOList = new ArrayList<BannerVO>();
+        bannerVOList.add(BannerVO.builder().bannerTitle("默认学院图").bannerImageUrl("https://tenfei04.cfp.cn/creative/vcg/nowater800/new/VCG41N1282498891.jpg?x-oss-process=image/format,webp").jumUrl("").jumType(0).build());
+        bannerVOList.add(BannerVO.builder().bannerTitle("特别申请").bannerImageUrl("https://tenfei04.cfp.cn/creative/vcg/nowater800/new/VCG41N1282498891.jpg?x-oss-process=image/format,webp").jumUrl("https://lanhuapp.com/web/#/item/project/stage?tid=b324be1d-148e-4b89-8ac4-62e7e4db2bc5&pid=bc5ad6c1-3c5e-4c3a-b176-1659377fe375").jumType(2).build());
+        bannerVOList.add(BannerVO.builder().bannerTitle("特别申请查询").bannerImageUrl("https://tenfei04.cfp.cn/creative/vcg/nowater800/new/VCG41N1282498891.jpg?x-oss-process=image/format,webp").jumUrl("https://lanhuapp.com/web/#/item/project/stage?tid=b324be1d-148e-4b89-8ac4-62e7e4db2bc5&pid=bc5ad6c1-3c5e-4c3a-b176-1659377fe375").build());
+    	
+        return XmoseResponse.success(bannerVOList);
+    }
+
+    @GetMapping("/schedule")
+    @ApiOperation(value = "日程安排列表", notes="日程安排列表")
+    public XmoseResponse<List<ScheduleVO>> scheduleList(XmoseRequest<?> request) {
+    	List<ScheduleVO> scheduleVOList = new ArrayList<ScheduleVO>();
+    	scheduleVOList.add(ScheduleVO.builder().labelTitle("特别申请").labelStartDate("2022-02-01").labelEndDate("2022-02-28").labelStatus(-1).labeltatusName("已结束").build());
+    	scheduleVOList.add(ScheduleVO.builder().labelTitle("特别申请结果查询").labelStartDate("2022-03-01").labelEndDate("2022-03-31").labelStatus(1).labeltatusName("进行中").build());
+    	scheduleVOList.add(ScheduleVO.builder().labelTitle("志愿填报").labelStartDate("2022-04-01").labelEndDate("2022-04-15").labelStatus(0).labeltatusName("未开始").build());
+    	scheduleVOList.add(ScheduleVO.builder().labelTitle("专业分流结果查询").labelStartDate("2022-04-16").labelEndDate("2022-04-31").labelStatus(0).labeltatusName("未开始").build());
+    	
+       return XmoseResponse.success(scheduleVOList);
+    }
+}

+ 33 - 0
shunt-api/src/main/java/org/shunt/contorller/LoginController.java

@@ -0,0 +1,33 @@
+package org.shunt.contorller;
+
+import java.util.List;
+
+import org.shunt.contorller.request.XmoseRequest;
+import org.shunt.contorller.request.XmoseResponse;
+import org.shunt.contorller.response.BannerVO;
+import org.shunt.contorller.response.ScheduleVO;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@RestController
+@Api("企微集成")
+@RequestMapping("/qywechat")
+public class LoginController {
+
+    @GetMapping("/login")
+    @ApiOperation(value = "企微登录", notes="企微登录")
+    public XmoseResponse<List<BannerVO>> login(XmoseRequest<?> request) {
+        return XmoseResponse.success(null);
+    }
+
+    @GetMapping("/callback")
+    @ApiOperation(value = "企微回调", notes="企微回调")
+    public XmoseResponse<List<ScheduleVO>> callback(XmoseRequest<?> request) {
+  
+    	 return XmoseResponse.success(null);
+    }
+}

+ 62 - 0
shunt-api/src/main/java/org/shunt/contorller/ShuntController.java

@@ -0,0 +1,62 @@
+package org.shunt.contorller;
+
+import org.shunt.contorller.request.XmoseRequest;
+import org.shunt.contorller.request.XmoseResponse;
+import org.shunt.contorller.response.ShuntQuotaVO;
+import org.shunt.contorller.response.StudentScoreVO;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@RestController
+@Api("专业分流")
+@RequestMapping("/shunt")
+public class ShuntController {
+
+    @GetMapping("/quota")
+    @ApiOperation(value = "专业分流名额", notes="专业分流名额")
+    public XmoseResponse<ShuntQuotaVO> bannerList(XmoseRequest<?> request) {
+    	
+        return XmoseResponse.success(ShuntQuotaVO.builder().build());
+    }
+
+    @GetMapping("/score")
+    @ApiOperation(value = "本人成绩", notes="本人成绩")
+    public XmoseResponse<StudentScoreVO> getScore(XmoseRequest<?> request) {
+    	
+       return XmoseResponse.success(StudentScoreVO.builder().build());
+    }
+    @GetMapping("/view-special-apply")
+    @ApiOperation(value = "浏览特别申请", notes="查浏览特别申请")
+    public XmoseResponse<StudentScoreVO>viewSpecialApply(XmoseRequest<?> request) {
+    	
+       return XmoseResponse.success(StudentScoreVO.builder().build());
+    }
+    
+    @GetMapping("/get-special-apply")
+    @ApiOperation(value = "查询特别申请结果", notes="查询特别申请结果")
+    public XmoseResponse<StudentScoreVO>getSpecialApply(XmoseRequest<?> request) {
+    	
+       return XmoseResponse.success(StudentScoreVO.builder().build());
+    }
+    
+    @PostMapping("/special-apply")
+    @ApiOperation(value = "特别申请", notes="特别申请")
+    public XmoseResponse<?> specialApply(XmoseRequest<?> request) {
+    	
+       return XmoseResponse.success();
+    }
+    
+    
+    @PostMapping("/upload")
+    @ApiOperation(value = "上传文件", notes="上传文件")
+    public XmoseResponse<?> upload(XmoseRequest<?> request) {
+    	
+       return XmoseResponse.success();
+    }
+    
+}

+ 38 - 0
shunt-api/src/main/java/org/shunt/contorller/request/XmoseRequest.java

@@ -0,0 +1,38 @@
+package org.shunt.contorller.request;
+
+import java.io.Serializable;
+
+import javax.validation.Valid;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+/** 
+* @ClassName: XmoseRequest 
+* @Description: 请求协议包装基类 
+* @author caogang
+* @date 2021年5月19日 上午9:54:50 
+* 
+* @param <T> 
+*/
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@JsonIgnoreProperties(ignoreUnknown = true)
+@ApiModel("协议请求体")
+public class XmoseRequest<T> implements Serializable {
+	private static final long serialVersionUID = -692195163465409100L;
+
+	@ApiModelProperty(value = "请求requestUid,时间戳")
+	private String requestUid;
+	
+	@ApiModelProperty(value = "请求体")
+	@Valid
+	private T data;
+}

+ 77 - 0
shunt-api/src/main/java/org/shunt/contorller/request/XmoseResponse.java

@@ -0,0 +1,77 @@
+package org.shunt.contorller.request;
+
+import java.io.Serializable;
+
+import javax.validation.Valid;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+/** 
+* @ClassName: XmoseResponse 
+* @Description: API响应包装基类 
+* @author caogang
+* @date 2021年5月19日 上午9:55:57 
+* 
+* @param <T> 
+*/
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@JsonIgnoreProperties(ignoreUnknown = true)
+@ApiModel("协议响应体")
+public class XmoseResponse <T> implements Serializable {
+	private static final long serialVersionUID = -692195163465409100L;
+
+
+	public final static Integer CODE_SUCCESS = 200;// 成功时状态码
+	public final static Integer CODE_TOKEN_EXPIRED = 201;// token超时
+	public final static Integer CODE_TOKEN_EMPTY = 202;// token为空
+	public final static Integer CODE_TOKEN_INVALID = 203;// token非法
+	
+	public final static Integer CODE_CONFIG = 402;// 业务数据配置缺失时错误码
+	public final static Integer CODE_FORBIDDEN = 403;// 超出服务范围时,禁止提供服务(熔断,高并发限流)时,错误码
+	public final static Integer CODE_INTERNEL = 500;// 未定义的系统异常(Exception)时,错误码
+	public final static Integer CODE_UNAUTHORIZED = 401;// 业务未授权时进行访问,401(权限校验)
+	public final static Integer CODE_UNSUPPORTED = 402;// 方法参数错误
+	
+	public final static String MSG = "ok";
+	public final static String MSG_INVALID_TOKEN = "非法token";// 非法token
+	public final static String MSG_INVALID_TOKEN_CODE = "非法token状态码";// 非法token状态码
+	public final static String MSG_BUSI = "系统忙";// 系统忙
+	
+	
+	@ApiModelProperty(value = "请求requestUid,时间戳")
+	private String responseUid;
+	
+	@ApiModelProperty(value = "响应编码")
+	private Integer code = CODE_SUCCESS;
+	
+	@ApiModelProperty(value = "响应信息")
+	private String msg = MSG;
+	
+	@ApiModelProperty(value = "请求体")
+	@Valid
+	private T data;
+
+	public XmoseResponse(Integer code, String msg, T data) {
+		super();
+		this.code = code;
+		this.msg = msg;
+		this.data = data;
+	}
+
+	public static <T> XmoseResponse<T> success() {
+		return new XmoseResponse<T>(CODE_SUCCESS, MSG, null);
+	}
+	public static <T> XmoseResponse<T> success(T data) {
+		return new XmoseResponse<T>(CODE_SUCCESS, MSG, data);
+	}
+	public static <T> XmoseResponse<T> fail(Integer code, String msg) {
+		return new XmoseResponse<T>(code, msg, null);
+	}
+}

+ 27 - 0
shunt-api/src/main/java/org/shunt/contorller/response/BannerVO.java

@@ -0,0 +1,27 @@
+package org.shunt.contorller.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@JsonIgnoreProperties(ignoreUnknown = true)
+@ApiModel("BannerVO")
+public class BannerVO {
+	@ApiModelProperty(value = "BannerTitle")
+	private String  bannerTitle;
+	@ApiModelProperty(value = "Banner图片连接")
+	private String  bannerImageUrl;
+	@ApiModelProperty(value = "Banner跳转地址")
+	private String  jumUrl;
+	@ApiModelProperty(value = "Banner跳转类型:0-无跳转,1-内部跳转体质,2-http跳转地址",dataType="Integer",example="0")
+	private Integer jumType;
+}

+ 29 - 0
shunt-api/src/main/java/org/shunt/contorller/response/MajorShuntCountVO.java

@@ -0,0 +1,29 @@
+package org.shunt.contorller.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@JsonIgnoreProperties(ignoreUnknown = true)
+@ApiModel("专业分流统计")
+public class MajorShuntCountVO {
+	@ApiModelProperty(value = "专业ID")
+	private Integer  majorId;
+	@ApiModelProperty(value = "专业名称")
+	private String  majorName;
+	@ApiModelProperty(value = "专业排名")
+	private String  majorRank;
+	@ApiModelProperty(value = "第一志愿报名学生人数")
+	private Integer  sinUpStudentsNum;
+	@ApiModelProperty(value = "专业学生总配合")
+	private Integer  totalStudentsNum;
+}

+ 29 - 0
shunt-api/src/main/java/org/shunt/contorller/response/ScheduleVO.java

@@ -0,0 +1,29 @@
+package org.shunt.contorller.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@JsonIgnoreProperties(ignoreUnknown = true)
+@ApiModel("日程安排")
+public class ScheduleVO {
+	@ApiModelProperty(value = "日程Title")
+	private String  labelTitle;
+	@ApiModelProperty(value = "日程开始日期")
+	private String  labelStartDate;
+	@ApiModelProperty(value = "日程结束日期")
+	private String  labelEndDate;
+	@ApiModelProperty(value = "日程状态:-1:已结束,0-未开始,1-进行中",dataType="Integer",example="1")
+	private Integer labelStatus;
+	@ApiModelProperty(value = "日程状态名称:已结束,未开始,进行中",dataType="String",example="进行中")
+	private String  labeltatusName;
+}

+ 30 - 0
shunt-api/src/main/java/org/shunt/contorller/response/ShuntQuotaVO.java

@@ -0,0 +1,30 @@
+package org.shunt.contorller.response;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@JsonIgnoreProperties(ignoreUnknown = true)
+@ApiModel("专业分流名额")
+public class ShuntQuotaVO {
+	@ApiModelProperty(value = "学生总数")
+	private Integer  totalStudents;
+	@ApiModelProperty(value = "学生报名数")
+	private Integer  sinUpStudents;
+	@ApiModelProperty(value = "未报名学生数")
+	private Integer  unSinUpStudents;
+	
+	@ApiModelProperty(value = "专业分流统计",dataType="String")
+	private List<MajorShuntCountVO>  majorShuntCountVOList;
+}

+ 47 - 0
shunt-api/src/main/java/org/shunt/contorller/response/StudentScoreVO.java

@@ -0,0 +1,47 @@
+package org.shunt.contorller.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@JsonIgnoreProperties(ignoreUnknown = true)
+@ApiModel("学生成绩点")
+public class StudentScoreVO {
+	@ApiModelProperty(value = "学生ID")
+	private Integer  studentId;
+	@ApiModelProperty(value = "学生姓名")
+	private String  studentName;
+	@ApiModelProperty(value = "学生性别:1-男,2-女")
+	private Integer  genderId;
+	@ApiModelProperty(value = "学生性别")
+	private String  genderName;
+	@ApiModelProperty(value = "学生学号")
+	private String  studentNO;
+	@ApiModelProperty(value = "学生电话")
+	private String  mobileNo;
+	@ApiModelProperty(value = "学生邮箱")
+	private String  studentEmail;
+	@ApiModelProperty(value = "专业ID")
+	private Integer  majorId;
+	@ApiModelProperty(value = "专业名称")
+	private String  majorName;
+	@ApiModelProperty(value = "学生班级ID")
+	private Integer  gradeId;
+	@ApiModelProperty(value = "学生班级名称")
+	private String  gradeName;
+	@ApiModelProperty(value = "学生平均成绩点")
+	private Float  avgScore;
+	@ApiModelProperty(value = "学生平均成绩点排名")
+	private Integer  avgScoreRank;
+	@ApiModelProperty(value = "学生平均成绩点总数")
+	private Integer  avgScoreMaxRank;
+}

+ 84 - 0
shunt-api/src/main/resources/application.yml

@@ -0,0 +1,84 @@
+admin:
+  # 名称
+  name: shunt-api
+  # 版本
+  version: 1.0
+  # 版权年份
+  copyrightYear: 2022
+  # 实例演示开关
+  demoEnabled: true
+  # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
+  profile: /opt/uploadPath
+  # 获取ip地址开关
+  addressEnabled: false
+
+# 开发环境配置
+server:
+  # 服务器的HTTP端口,默认为8080
+  port: 8081
+  servlet:
+    # 应用的访问路径
+    context-path: /
+  tomcat:
+    # tomcat的URI编码
+    uri-encoding: UTF-8
+    # 连接数满后的排队数,默认为100
+    accept-count: 1000
+    threads:
+      # tomcat最大线程数,默认为200
+      max: 800
+      # Tomcat启动初始化的线程数,默认值10
+      min-spare: 100
+
+# 日志配置
+logging:
+  level:
+    org.shunt: debug
+    org.springframework: warn
+
+# Spring配置
+spring:
+  # 文件上传
+  servlet:
+     multipart:
+       # 单个文件大小
+       max-file-size:  15MB
+       # 设置总上传的文件大小
+       max-request-size:  50MB
+  # 服务模块
+  devtools:
+    restart:
+      # 热部署开关
+      enabled: true
+ 
+# token配置
+token:
+    # 令牌自定义标识
+    header: Authorization
+    # 令牌密钥
+    secret: abcdefghijklmnopqrstuvwxyz
+    # 令牌有效期(默认30分钟)
+    expireTime: 60
+  
+# MyBatis配置
+mybatis:
+    # 搜索指定包别名
+    typeAliasesPackage: com.admin.**.domain
+    # 配置mapper的扫描,找到所有的mapper.xml映射文件
+    mapperLocations: classpath*:mapper/mapper/*.xml
+    # 加载全局的配置文件
+    configLocation: classpath:mybatis/mybatis-config.xml
+
+# PageHelper分页插件
+pagehelper: 
+  helperDialect: mysql
+  supportMethodsArguments: true
+  params: count=countSql 
+
+# Swagger配置
+swagger:
+  # 是否开启swagger
+  enabled: true
+  # 请求前缀
+  pathMapping: /dev-api
+

+ 93 - 0
shunt-api/src/main/resources/logback.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <!-- 日志存放路径 -->
+	<property name="log.path" value="/home/ruoyi/logs" />
+    <!-- 日志输出格式 -->
+	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
+
+	<!-- 控制台输出 -->
+	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+	</appender>
+	
+	<!-- 系统日志输出 -->
+	<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/sys-info.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+			<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 日志最大的历史 60天 -->
+			<maxHistory>60</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+		<filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>INFO</level>
+            <!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+            <!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+	</appender>
+	
+	<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/sys-error.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 日志最大的历史 60天 -->
+			<maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>ERROR</level>
+			<!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+			<!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+	
+	<!-- 用户访问日志输出  -->
+    <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/sys-user.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 按天回滚 daily -->
+            <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <!-- 日志最大的历史 60天 -->
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+	
+	<!-- 系统模块日志级别控制  -->
+	<logger name="com.admin" level="info" />
+	<!-- Spring日志级别控制  -->
+	<logger name="org.springframework" level="warn" />
+
+	<root level="info">
+		<appender-ref ref="console" />
+	</root>
+	
+	<!--系统操作日志-->
+    <root level="info">
+        <appender-ref ref="file_info" />
+        <appender-ref ref="file_error" />
+    </root>
+	
+	<!--系统用户操作日志-->
+    <logger name="sys-user" level="info">
+        <appender-ref ref="sys-user"/>
+    </logger>
+</configuration> 

+ 107 - 0
shunt-api/src/main/resources/mapper/ScheduleArrangeMapper.xml

@@ -0,0 +1,107 @@
+<?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.admin.major.mapper.ScheduleArrangeMapper">
+    
+    <resultMap type="ScheduleArrange" id="ScheduleArrangeResult">
+        <result property="orginId"    column="orgin_id"    />
+        <result property="scheduleId"    column="schedule_id"    />
+        <result property="scheduleName"    column="schedule_name"    />
+        <result property="year"    column="year"    />
+        <result property="startDate"    column="start_date"    />
+        <result property="endDate"    column="end_date"    />
+        <result property="status"    column="status"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="updateUserId"    column="update_user_id"    />
+        <result property="createUserId"    column="create_user_id"    />
+        <result property="collegeId"    column="college_id"    />
+    </resultMap>
+
+    <sql id="selectScheduleArrangeVo">
+        select orgin_id, schedule_id, schedule_name, year, start_date, end_date, status, create_time, update_time, update_user_id, create_user_id, college_id from m_schedule_arrange
+    </sql>
+
+    <select id="selectScheduleArrangeList" parameterType="ScheduleArrange" resultMap="ScheduleArrangeResult">
+        <include refid="selectScheduleArrangeVo"/>
+        <where>  
+            <if test="orginId != null  and orginId != ''"> and orgin_id = #{orginId}</if>
+            <if test="scheduleId != null "> and schedule_id = #{scheduleId}</if>
+            <if test="scheduleName != null  and scheduleName != ''"> and schedule_name like concat('%', #{scheduleName}, '%')</if>
+            <if test="year != null  and year != ''"> and year = #{year}</if>
+            <if test="startDate != null "> and start_date = #{startDate}</if>
+            <if test="endDate != null "> and end_date = #{endDate}</if>
+            <if test="status != null "> and status = #{status}</if>
+            <if test="updateUserId != null  and updateUserId != ''"> and update_user_id = #{updateUserId}</if>
+            <if test="createUserId != null  and createUserId != ''"> and create_user_id = #{createUserId}</if>
+            <if test="collegeId != null "> and college_id = #{collegeId}</if>
+        </where>
+    </select>
+    
+    <select id="selectScheduleArrangeByOrginId" parameterType="String" resultMap="ScheduleArrangeResult">
+        <include refid="selectScheduleArrangeVo"/>
+        where orgin_id = #{orginId}
+    </select>
+        
+    <insert id="insertScheduleArrange" parameterType="ScheduleArrange">
+        insert into m_schedule_arrange
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orginId != null">orgin_id,</if>
+            <if test="scheduleId != null">schedule_id,</if>
+            <if test="scheduleName != null">schedule_name,</if>
+            <if test="year != null">year,</if>
+            <if test="startDate != null">start_date,</if>
+            <if test="endDate != null">end_date,</if>
+            <if test="status != null">status,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="updateUserId != null">update_user_id,</if>
+            <if test="createUserId != null">create_user_id,</if>
+            <if test="collegeId != null">college_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="orginId != null">#{orginId},</if>
+            <if test="scheduleId != null">#{scheduleId},</if>
+            <if test="scheduleName != null">#{scheduleName},</if>
+            <if test="year != null">#{year},</if>
+            <if test="startDate != null">#{startDate},</if>
+            <if test="endDate != null">#{endDate},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="updateUserId != null">#{updateUserId},</if>
+            <if test="createUserId != null">#{createUserId},</if>
+            <if test="collegeId != null">#{collegeId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateScheduleArrange" parameterType="ScheduleArrange">
+        update m_schedule_arrange
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="scheduleId != null">schedule_id = #{scheduleId},</if>
+            <if test="scheduleName != null">schedule_name = #{scheduleName},</if>
+            <if test="year != null">year = #{year},</if>
+            <if test="startDate != null">start_date = #{startDate},</if>
+            <if test="endDate != null">end_date = #{endDate},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="updateUserId != null">update_user_id = #{updateUserId},</if>
+            <if test="createUserId != null">create_user_id = #{createUserId},</if>
+            <if test="collegeId != null">college_id = #{collegeId},</if>
+        </trim>
+        where orgin_id = #{orginId}
+    </update>
+
+    <delete id="deleteScheduleArrangeByOrginId" parameterType="String">
+        delete from m_schedule_arrange where orgin_id = #{orginId}
+    </delete>
+
+    <delete id="deleteScheduleArrangeByOrginIds" parameterType="String">
+        delete from m_schedule_arrange where orgin_id in 
+        <foreach item="orginId" collection="array" open="(" separator="," close=")">
+            #{orginId}
+        </foreach>
+    </delete>
+</mapper>

+ 20 - 0
shunt-api/src/main/resources/mybatis/mybatis-config.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <!-- 全局参数 -->
+    <settings>
+        <!-- 使全局的映射器启用或禁用缓存 -->
+        <setting name="cacheEnabled"             value="true"   />
+        <!-- 允许JDBC 支持自动生成主键 -->
+        <setting name="useGeneratedKeys"         value="true"   />
+        <!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
+        <setting name="defaultExecutorType"      value="SIMPLE" />
+		<!-- 指定 MyBatis 所用日志的具体实现 -->
+        <setting name="logImpl"                  value="SLF4J"  />
+        <!-- 使用驼峰命名法转换字段 -->
+		<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
+	</settings>
+	
+</configuration>