master
chenhaodong 2023-04-25 23:43:45 +08:00
parent 08619ea2c1
commit 313506db24
49 changed files with 51 additions and 602 deletions

View File

@ -1,4 +0,0 @@
FROM frolvlad/alpine-oraclejdk8:slim
volume /tmp
COPY target/exam-api.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]

View File

@ -33,6 +33,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.aspectj</groupId> <groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId> <artifactId>aspectjweaver</artifactId>

View File

@ -37,9 +37,9 @@ public class ExamApplication implements WebMvcConfigurer {
log.info("\n----------------------------------------------------------\n\t" + log.info("\n----------------------------------------------------------\n\t" +
"系统启动成功,访问路径如下:\n\t" + "系统启动成功,访问路径如下:\n\t" +
"本地路径: \t\thttp://localhost:" + port + path + "/\n\t" + "本地路径: \t\thttp://127.0.0.1:" + port + path + "/\n\t" +
"网络地址: \thttp://" + ip + ":" + port + path + "/\n\t" + "网络地址: \thttp://" + ip + ":" + port + path + "/\n\t" +
//"API文档: \t\thttp://" + ip + ":" + port + path + "/doc.html\n" + "API文档: \t\thttp://" + ip + ":" + port + path + "/doc.html\n" +
"----------------------------------------------------------"); "----------------------------------------------------------");
} }

View File

@ -1,26 +0,0 @@
package com.yx.exam.ability.upload.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
*
*/
@Data
@Configuration
@ConfigurationProperties(prefix = "conf.upload")
public class UploadConfig {
/**
* 访
*/
private String url;
/**
*
*/
private String dir;
}

View File

@ -1,57 +0,0 @@
package com.yx.exam.ability.upload.controller;
import com.yx.exam.ability.Constant;
import com.yx.exam.ability.upload.dto.UploadReqDTO;
import com.yx.exam.ability.upload.dto.UploadRespDTO;
import com.yx.exam.ability.upload.service.UploadService;
import com.yx.exam.core.api.ApiRest;
import com.yx.exam.core.api.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
* @author chenhaodong
*/
@Log4j2
@Api(tags = {"文件上传"})
@RestController
public class UploadController extends BaseController {
@Autowired
private UploadService uploadService;
/**
*
* @param reqDTO
* @return
*/
@PostMapping("/common/api/file/upload")
@ApiOperation(value = "文件上传", notes = "此接口较为特殊参数都通过表单方式提交而非JSON")
public ApiRest<UploadRespDTO> upload(@ModelAttribute UploadReqDTO reqDTO) {
// 上传并返回URL
UploadRespDTO respDTO = uploadService.upload(reqDTO);
return super.success(respDTO);
}
/**
*
* @param request
* @param response
*/
@GetMapping(Constant.FILE_PREFIX+"**")
@ApiOperation(value = "文件下载", notes = "文件下载")
public void download(HttpServletRequest request, HttpServletResponse response) {
uploadService.download(request, response);
}
}

View File

@ -1,22 +0,0 @@
package com.yx.exam.ability.upload.dto;
import com.yx.exam.core.api.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
/**
*
* @author chenhaodong
* @date 2019-12-26 17:54
*/
@Data
@ApiModel(value="文件上传参数", description="文件上传参数")
public class UploadReqDTO extends BaseDTO {
@ApiModelProperty(value = "上传文件内容", required=true)
private MultipartFile file;
}

View File

@ -1,23 +0,0 @@
package com.yx.exam.ability.upload.dto;
import com.yx.exam.core.api.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* @author chenhaodong
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="文件上传响应", description="文件上传响应")
public class UploadRespDTO extends BaseDTO {
@ApiModelProperty(value = "上传后的完整的URL地址", required=true)
private String url;
}

View File

@ -1,30 +0,0 @@
package com.yx.exam.ability.upload.service;
import com.yx.exam.ability.upload.dto.UploadReqDTO;
import com.yx.exam.ability.upload.dto.UploadRespDTO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* OSS
* @author chenhaodong
* @date 2019-07-12 16:45
*/
public interface UploadService {
/**
*
* @param reqDTO
* @return
*/
UploadRespDTO upload(UploadReqDTO reqDTO);
/**
*
* @param request
* @param response
*/
void download(HttpServletRequest request, HttpServletResponse response);
}

View File

@ -1,121 +0,0 @@
package com.yx.exam.ability.upload.service.impl;
import com.yx.exam.ability.Constant;
import com.yx.exam.ability.upload.config.UploadConfig;
import com.yx.exam.ability.upload.dto.UploadReqDTO;
import com.yx.exam.ability.upload.dto.UploadRespDTO;
import com.yx.exam.ability.upload.service.UploadService;
import com.yx.exam.ability.upload.utils.FileUtils;
import com.yx.exam.core.exception.ServiceException;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
* @author chenhaodong
* @date 2019-07-30 21:02
*/
@Log4j2
@Service
public class UploadServiceImpl implements UploadService {
@Autowired
private UploadConfig conf;
@Override
public UploadRespDTO upload(UploadReqDTO reqDTO) {
// 文件内容
MultipartFile file = reqDTO.getFile();
// 上传文件夹
String fileDir = conf.getDir();
// 真实物理地址
String fullPath;
try {
// 新文件
String filePath = FileUtils.processPath(file);
// 文件保存地址
fullPath = fileDir + filePath;
// 创建文件夹
FileUtils.checkDir(fullPath);
// 上传文件
FileCopyUtils.copy(file.getInputStream(), new FileOutputStream(fullPath));
return this.generateResult(filePath);
} catch (IOException e) {
e.printStackTrace();
throw new ServiceException("文件上传失败:"+e.getMessage());
}
}
@Override
public void download(HttpServletRequest request, HttpServletResponse response) {
// 获取真实的文件路径
String filePath = this.getRealPath(request.getRequestURI());
System.out.println("++++完整路径为:"+filePath);
try {
FileUtils.writeRange(request, response, filePath);
} catch (IOException e) {
response.setStatus(404);
log.error("预览文件失败" + e.getMessage());
}
}
/**
*
* @param fileName
* @return
*/
private UploadRespDTO generateResult(String fileName) {
//获取加速域名
String domain = conf.getUrl();
// 返回结果
return new UploadRespDTO(domain + fileName);
}
/**
*
* @param uri
* @return
*/
public String getRealPath(String uri){
String regx = Constant.FILE_PREFIX+"(.*)";
// 查找全部变量
Pattern pattern = Pattern.compile(regx);
Matcher m = pattern.matcher(uri);
if (m.find()) {
String str = m.group(1);
return conf.getDir() + str;
}
return null;
}
}

View File

@ -1,188 +0,0 @@
package com.yx.exam.ability.upload.utils;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.yx.exam.core.utils.DateUtils;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.Date;
/**
*
* @author chenhaodong
*/
public class FileUtils {
/**
*
*/
private static final String SUFFIX_SPLIT = ".";
/**
* 线线
* @param request
* @param response
* @param filePath
* @throws IOException
*/
public static void writeRange(HttpServletRequest request,
HttpServletResponse response, String filePath) throws IOException {
// 读取文件
File file = new File(filePath);
//只读模式
RandomAccessFile randomFile = new RandomAccessFile(file, "r");
long contentLength = randomFile.length();
String range = request.getHeader("Range");
int start = 0, end = 0;
if (range != null && range.startsWith("bytes=")) {
String[] values = range.split("=")[1].split("-");
start = Integer.parseInt(values[0]);
if (values.length > 1) {
end = Integer.parseInt(values[1]);
}
}
int requestSize;
if (end != 0 && end > start) {
requestSize = end - start + 1;
} else {
requestSize = Integer.MAX_VALUE;
}
byte[] buffer = new byte[128];
response.setContentType(MediaUtils.getContentType(filePath));
response.setHeader("Accept-Ranges", "bytes");
response.setHeader("ETag", file.getName());
response.setHeader("Last-Modified", new Date().toString());
//第一次请求只返回content length来让客户端请求多次实际数据
if (range == null) {
response.setHeader("Content-length", contentLength + "");
} else {
//以后的多次以断点续传的方式来返回视频数据
response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT);
long requestStart = 0, requestEnd = 0;
String[] ranges = range.split("=");
if (ranges.length > 1) {
String[] rangeData = ranges[1].split("-");
requestStart = Integer.parseInt(rangeData[0]);
if (rangeData.length > 1) {
requestEnd = Integer.parseInt(rangeData[1]);
}
}
long length;
if (requestEnd > 0) {
length = requestEnd - requestStart + 1;
response.setHeader("Content-length", "" + length);
response.setHeader("Content-Range", "bytes " + requestStart + "-" + requestEnd + "/" + contentLength);
} else {
length = contentLength - requestStart;
response.setHeader("Content-length", "" + length);
response.setHeader("Content-Range", "bytes " + requestStart + "-" + (contentLength - 1) + "/" + contentLength);
}
}
ServletOutputStream out = response.getOutputStream();
int needSize = requestSize;
randomFile.seek(start);
while (needSize > 0) {
int len = randomFile.read(buffer);
if (needSize < buffer.length) {
out.write(buffer, 0, needSize);
} else {
out.write(buffer, 0, len);
if (len < buffer.length) {
break;
}
}
needSize -= buffer.length;
}
randomFile.close();
out.close();
}
/**
*
* @param fileName
* @return
*/
public static String renameFile(String fileName) {
//没有后缀名不处理
if (!fileName.contains(SUFFIX_SPLIT)) {
return fileName;
}
//文件后缀
String suffix = fileName.substring(fileName.lastIndexOf("."));
//以系统时间命名
return IdWorker.getIdStr() + suffix;
}
/**
* 2021/01/01/xxx.jpg
* @param file
* @return
*/
public static String processPath(MultipartFile file){
// 创建OSSClient实例。
String fileName = file.getOriginalFilename();
// 需要重命名
fileName = renameFile(fileName);
//获得上传的文件夹
String dir = DateUtils.formatDate(new Date(), "yyyy/MM/dd/");
return new StringBuffer(dir).append(fileName).toString();
}
/**
* 2021/01/01/xxx.jpg
* @param fileName
* @return
*/
public static String processPath(String fileName){
// 需要重命名
fileName = renameFile(fileName);
//获得上传的文件夹
String dir = DateUtils.formatDate(new Date(), "yyyy/MM/dd/");
return new StringBuffer(dir).append(fileName).toString();
}
/**
*
* @param fileName
* @return
*/
public static void checkDir(String fileName){
int index = fileName.lastIndexOf("/");
if(index == -1){
return;
}
File file = new File(fileName.substring(0,index));
if(!file.exists()){
file.mkdirs();
}
}
}

View File

@ -1,47 +0,0 @@
package com.yx.exam.ability.upload.utils;
import org.apache.commons.lang3.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
*
* @author chenhaodong
* @date 2019-11-14 16:21
*/
public class MediaUtils {
public static final Map<String, String> MEDIA_MAP = new HashMap(){
{
//本来是pdf的
put(".pdf", "application/pdf");
//视频
put(".mp4", "video,video/mp4");
}
};
/**
*
* @param filePath
* @return
*/
public static String getContentType(String filePath){
if(!StringUtils.isBlank(filePath)
&& filePath.indexOf(".")!=-1) {
// 后缀转换成小写
String suffix = filePath.substring(filePath.lastIndexOf(".")).toLowerCase();
if (MEDIA_MAP.containsKey(suffix)) {
return MEDIA_MAP.get(suffix);
}
}
return "application/octet-stream";
}
}

View File

@ -44,7 +44,10 @@ public class QueryInterceptor extends PaginationInterceptor implements Intercept
public Object intercept(Invocation invocation) throws Throwable { public Object intercept(Invocation invocation) throws Throwable {
StatementHandler statementHandler = (StatementHandler) invocation.getTarget(); StatementHandler statementHandler = (StatementHandler) invocation.getTarget();
//通过MetaObject优雅访问对象的属性这里是访问statementHandler的属性
MetaObject metaObject = MetaObject.forObject(statementHandler, SystemMetaObject.DEFAULT_OBJECT_FACTORY, SystemMetaObject.DEFAULT_OBJECT_WRAPPER_FACTORY, new DefaultReflectorFactory()); MetaObject metaObject = MetaObject.forObject(statementHandler, SystemMetaObject.DEFAULT_OBJECT_FACTORY, SystemMetaObject.DEFAULT_OBJECT_WRAPPER_FACTORY, new DefaultReflectorFactory());
//先拦截到RoutingStatementHandler里面有个StatementHandler类型的delegate变量其实现类是BaseStatementHandler然后就到BaseStatementHandler的成员变量mappedStatement
MappedStatement mappedStatement = (MappedStatement) metaObject.getValue("delegate.mappedStatement"); MappedStatement mappedStatement = (MappedStatement) metaObject.getValue("delegate.mappedStatement");
//sql语句类型 //sql语句类型

View File

@ -34,7 +34,7 @@ public class SwaggerConfig {
public Docket examApi() { public Docket examApi() {
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo()) .apiInfo(apiInfo())
.groupName("考试模块接口") .groupName("系统模块接口")
.select() .select()
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.paths(PathSelectors.ant("/exam/api/**")) .paths(PathSelectors.ant("/exam/api/**"))
@ -45,9 +45,9 @@ public class SwaggerConfig {
private ApiInfo apiInfo() { private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("考试系统接口") return new ApiInfoBuilder().title("系统接口")
.description("考试系统接口") .description("系统接口")
.contact(new Contact("Van", "https://exam.yfhl.net", "18365918@qq.com")) .contact(new Contact("Van", "https://exam.yfhl.net", "755141280@qq.com"))
.version("1.0.0") .version("1.0.0")
.build(); .build();
} }

View File

@ -1,14 +0,0 @@
package com.yx.exam.core.enums;
/**
*
* @author chenhaodong
*/
public interface JoinType {
/**
*
*/
Integer REPO_JOIN = 1;
}

View File

@ -1,18 +0,0 @@
package com.yx.exam.core.enums;
/**
*
* @author chenhaodong
*/
public interface OpenType {
/**
*
*/
Integer OPEN = 1;
/**
*
*/
Integer DEPT_OPEN = 2;
}

View File

@ -3,7 +3,7 @@ package com.yx.exam.modules;
/** /**
* *
* @author bool * @author chd
*/ */
public class Constant { public class Constant {

View File

@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-17 09:12 * @since 2020-04-17 09:12
*/ */
@Api(tags={"通用配置"}) @Api(tags={"通用配置"})

View File

@ -11,7 +11,7 @@ import java.io.Serializable;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-17 09:12 * @since 2020-04-17 09:12
*/ */
@Data @Data

View File

@ -12,7 +12,7 @@ import lombok.Data;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-17 09:12 * @since 2020-04-17 09:12
*/ */
@Data @Data

View File

@ -8,7 +8,7 @@ import com.yx.exam.modules.config.entity.SysConfig;
* Mapper * Mapper
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-17 09:12 * @since 2020-04-17 09:12
*/ */
public interface SysConfigMapper extends BaseMapper<SysConfig> { public interface SysConfigMapper extends BaseMapper<SysConfig> {

View File

@ -9,7 +9,7 @@ import com.yx.exam.modules.config.entity.SysConfig;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-17 09:12 * @since 2020-04-17 09:12
*/ */
public interface SysConfigService extends IService<SysConfig> { public interface SysConfigService extends IService<SysConfig> {

View File

@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-17 09:12 * @since 2020-04-17 09:12
*/ */
@Service @Service

View File

@ -29,7 +29,7 @@ import java.util.List;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-09-02 17:25 * @since 2020-09-02 17:25
*/ */
@Api(tags={"部门信息"}) @Api(tags={"部门信息"})

View File

@ -11,7 +11,7 @@ import java.io.Serializable;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-09-02 17:25 * @since 2020-09-02 17:25
*/ */
@Data @Data

View File

@ -11,7 +11,7 @@ import java.io.Serializable;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-03-14 10:37 * @since 2020-03-14 10:37
*/ */
@Data @Data

View File

@ -12,7 +12,7 @@ import java.util.List;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-09-02 17:25 * @since 2020-09-02 17:25
*/ */
@Data @Data

View File

@ -12,7 +12,7 @@ import lombok.Data;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-09-02 17:25 * @since 2020-09-02 17:25
*/ */
@Data @Data

View File

@ -13,7 +13,7 @@ import org.apache.ibatis.annotations.Param;
* Mapper * Mapper
* </p> * </p>
* *
* @author * @author chd
* @since 2020-09-02 17:25 * @since 2020-09-02 17:25
*/ */
public interface SysDepartMapper extends BaseMapper<SysDepart> { public interface SysDepartMapper extends BaseMapper<SysDepart> {

View File

@ -14,7 +14,7 @@ import java.util.List;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-09-02 17:25 * @since 2020-09-02 17:25
*/ */
public interface SysDepartService extends IService<SysDepart> { public interface SysDepartService extends IService<SysDepart> {

View File

@ -25,7 +25,7 @@ import java.util.Map;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-09-02 17:25 * @since 2020-09-02 17:25
*/ */
@Service @Service

View File

@ -25,7 +25,7 @@ import javax.annotation.Resource;
* *
* </p> * </p>
* *
* @author mawuhui * @author chenhaodong
* @since 2022-11-24 * @since 2022-11-24
*/ */
@RestController @RestController

View File

@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param;
* Mapper * Mapper
* </p> * </p>
* *
* @author * @author chd
* @since 2020-08-22 13:46 * @since 2020-08-22 13:46
*/ */
@Mapper @Mapper

View File

@ -7,7 +7,7 @@ import org.apache.shiro.SecurityUtils;
/** /**
* *
* @author bool * @author chd
*/ */
public class UserUtils { public class UserUtils {

View File

@ -24,7 +24,7 @@ import java.util.List;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-13 16:57 * @since 2020-04-13 16:57
*/ */
@Api(tags = {"管理用户"}) @Api(tags = {"管理用户"})

View File

@ -26,7 +26,7 @@ import java.util.List;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-13 16:57 * @since 2020-04-13 16:57
*/ */
@Api(tags = {"管理用户"}) @Api(tags = {"管理用户"})
@ -50,11 +50,11 @@ public class SysUserController extends BaseController {
} }
/** /**
* *
* @return * @return
*/ */
@CrossOrigin @CrossOrigin
@ApiOperation(value = "用户登") @ApiOperation(value = "用户登")
@RequestMapping(value = "/logout", method = {RequestMethod.POST}) @RequestMapping(value = "/logout", method = {RequestMethod.POST})
public ApiRest logout(HttpServletRequest request) { public ApiRest logout(HttpServletRequest request) {
String token = request.getHeader("token"); String token = request.getHeader("token");
@ -152,7 +152,7 @@ public class SysUserController extends BaseController {
* *
* @return * @return
*/ */
@ApiOperation(value = "学员注册") @ApiOperation(value = "用户注册")
@RequestMapping(value = "/reg", method = {RequestMethod.POST}) @RequestMapping(value = "/reg", method = {RequestMethod.POST})
public ApiRest<SysUserLoginDTO> reg(@RequestBody SysUserDTO reqDTO) { public ApiRest<SysUserLoginDTO> reg(@RequestBody SysUserDTO reqDTO) {
SysUserLoginDTO respDTO = baseService.reg(reqDTO); SysUserLoginDTO respDTO = baseService.reg(reqDTO);

View File

@ -14,7 +14,7 @@ import java.util.Date;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-13 16:57 * @since 2020-04-13 16:57
*/ */
@Data @Data

View File

@ -11,7 +11,7 @@ import com.yx.exam.modules.user.entity.SysRole;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-13 16:57 * @since 2020-04-13 16:57
*/ */
public interface SysRoleService extends IService<SysRole> { public interface SysRoleService extends IService<SysRole> {

View File

@ -13,7 +13,7 @@ import java.util.List;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-13 16:57 * @since 2020-04-13 16:57
*/ */
public interface SysUserRoleService extends IService<SysUserRole> { public interface SysUserRoleService extends IService<SysUserRole> {

View File

@ -15,7 +15,7 @@ import java.util.List;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-13 16:57 * @since 2020-04-13 16:57
*/ */
public interface SysUserService extends IService<SysUser> { public interface SysUserService extends IService<SysUser> {

View File

@ -23,7 +23,7 @@ import java.util.List;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-13 16:57 * @since 2020-04-13 16:57
*/ */
@Service @Service

View File

@ -40,7 +40,7 @@ import java.util.List;
* *
* </p> * </p>
* *
* @author * @author chd
* @since 2020-04-13 16:57 * @since 2020-04-13 16:57
*/ */
@Service @Service

View File

@ -1,6 +1,6 @@
spring: spring:
application: application:
name: yf-exam-lite name: chdbs
profiles: profiles:
active: dev active: dev
main: main:

View File

@ -1,5 +1,5 @@
{ {
"name": "yf-exam-lite", "name": "chdbs",
"version": "1.0.0", "version": "1.0.0",
"description": "陈昊东毕设", "description": "陈昊东毕设",
"author": "haodongchen@aliyun.com", "author": "haodongchen@aliyun.com",

View File

@ -0,0 +1,6 @@
import { post } from '@/utils/request'
export function sjkctj() {
return post('/tongji/api/sjxxtj', {})
}

View File

@ -17,7 +17,6 @@ import './permission' // permission control
import './utils/error-log' // error log import './utils/error-log' // error log
import * as filters from './filters' import * as filters from './filters'
// Element UI // Element UI
Vue.use(Element, { Vue.use(Element, {
size: Cookies.get('size') || 'medium' // set element-ui default size size: Cookies.get('size') || 'medium' // set element-ui default size

View File

@ -166,15 +166,6 @@ export const asyncRoutes = [
} }
}, },
/*{
path: 'bysxxgl',
component: () => import('@/views/sys/bysxxgl'),
name: 'SysBysxxgl',
meta: {
title: '毕业生信息管理',
icon: 'admin'
}
},*/
{ {
path: 'bookgl', path: 'bookgl',
component: () => import('@/views/sys/bookgl'), component: () => import('@/views/sys/bookgl'),
@ -228,8 +219,7 @@ export const asyncRoutes = [
title: '留言管理', title: '留言管理',
icon: 'admin' icon: 'admin'
} }
} },
] ]

View File

@ -31,7 +31,7 @@
<div>权限控制基于Shiro和JWT开发的权限控制功能</div> <div>权限控制基于Shiro和JWT开发的权限控制功能</div>
<div>基础功能系统配置用户管理部门管理角色管理等</div> <div>基础功能系统配置用户管理部门管理角色管理等</div>
<div>图书管理图书的信息管理借还流程的完善</div> <div>图书管理图书的信息管理借还流程的完善</div>
<div>人员权限暂时设置管理员与教师和学生三个角色</div> <div>人员权限暂时设置管理员和学生两个角色</div>
</div> </div>
</div> </div>

View File

@ -73,7 +73,7 @@
<el-table-column align="center" label="操作"> <el-table-column align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a style="color: #1890ff" @click="handleUpdate(scope.row)"> <a style="color: #1890ff" @click="handleUpdate(scope.row)">
<el-button link type="primary" size="small" <el-button link type="primary" size="small" v-if="0===scope.row.bState"
>借书 >借书
</el-button> </el-button>
</a> </a>