Compare commits
10 Commits
d9897564e5
...
1d35056c2d
| Author | SHA1 | Date |
|---|---|---|
|
|
1d35056c2d | |
|
|
0febcd63de | |
|
|
2a4332f21d | |
|
|
9835cdff05 | |
|
|
26aa254333 | |
|
|
5d1a1be906 | |
|
|
094fdd7bf2 | |
|
|
5e0a02fdcc | |
|
|
fcc1f76293 | |
|
|
c91c036ee3 |
4424
db/nyzy_jeecg_db.sql
4424
db/nyzy_jeecg_db.sql
File diff suppressed because one or more lines are too long
8
pom.xml
8
pom.xml
|
|
@ -2,11 +2,11 @@
|
|||
<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>
|
||||
<groupId>com.nyzy</groupId>
|
||||
<artifactId>nyzy</artifactId>
|
||||
<groupId>com.ndsbw</groupId>
|
||||
<artifactId>ndsbw</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<name>nyzy</name>
|
||||
<description>吉林省农业资源薪资平台</description>
|
||||
<name>ndsbw</name>
|
||||
<description>吉林省农业资源信息平台</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,173 @@
|
|||
package com.nd.blFwl.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nd.blFwl.entity.BlFwl;
|
||||
import com.nd.blFwl.service.IBlFwlService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
|
||||
/**
|
||||
* @Description: 网站访问量
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="网站访问量")
|
||||
@RestController
|
||||
@RequestMapping("/blFwl/blFwl")
|
||||
@Slf4j
|
||||
public class BlFwlController extends JeecgController<BlFwl, IBlFwlService> {
|
||||
@Autowired
|
||||
private IBlFwlService blFwlService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param blFwl
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站访问量-分页列表查询")
|
||||
@ApiOperation(value="网站访问量-分页列表查询", notes="网站访问量-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryPageList(BlFwl blFwl,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<BlFwl> queryWrapper = QueryGenerator.initQueryWrapper(blFwl, req.getParameterMap());
|
||||
Page<BlFwl> page = new Page<BlFwl>(pageNo, pageSize);
|
||||
IPage<BlFwl> pageList = blFwlService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param blFwl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站访问量-添加")
|
||||
@ApiOperation(value="网站访问量-添加", notes="网站访问量-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody BlFwl blFwl) {
|
||||
blFwl.setFwsj(new Date());
|
||||
blFwlService.save(blFwl);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param blFwl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站访问量-编辑")
|
||||
@ApiOperation(value="网站访问量-编辑", notes="网站访问量-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody BlFwl blFwl) {
|
||||
blFwlService.updateById(blFwl);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站访问量-通过id删除")
|
||||
@ApiOperation(value="网站访问量-通过id删除", notes="网站访问量-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
blFwlService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站访问量-批量删除")
|
||||
@ApiOperation(value="网站访问量-批量删除", notes="网站访问量-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.blFwlService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站访问量-通过id查询")
|
||||
@ApiOperation(value="网站访问量-通过id查询", notes="网站访问量-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
BlFwl blFwl = blFwlService.getById(id);
|
||||
if(blFwl==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(blFwl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param blFwl
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, BlFwl blFwl) {
|
||||
return super.exportXls(request, blFwl, BlFwl.class, "网站访问量");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, BlFwl.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.nd.blFwl.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 网站访问量
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_fwl")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="bl_fwl对象", description="网站访问量")
|
||||
public class BlFwl implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**ip*/
|
||||
@Excel(name = "ip", width = 15)
|
||||
@ApiModelProperty(value = "ip")
|
||||
private java.lang.String ipAddress;
|
||||
/**访问时间*/
|
||||
@Excel(name = "访问时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "访问时间")
|
||||
private java.util.Date fwsj;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nd.blFwl.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nd.blFwl.entity.BlFwl;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 网站访问量
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BlFwlMapper extends BaseMapper<BlFwl> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +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.nd.blFwl.mapper.BlFwlMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nd.blFwl.service;
|
||||
|
||||
import com.nd.blFwl.entity.BlFwl;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 网站访问量
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBlFwlService extends IService<BlFwl> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nd.blFwl.service.impl;
|
||||
|
||||
import com.nd.blFwl.entity.BlFwl;
|
||||
import com.nd.blFwl.mapper.BlFwlMapper;
|
||||
import com.nd.blFwl.service.IBlFwlService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 网站访问量
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BlFwlServiceImpl extends ServiceImpl<BlFwlMapper, BlFwl> implements IBlFwlService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
package com.nd.gateway.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nd.gateway.entity.TqdGatewayConfig;
|
||||
import com.nd.gateway.service.ITqdGatewayConfigService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
|
||||
/**
|
||||
* @Description: 网站配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2022-07-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="网站配置")
|
||||
@RestController
|
||||
@RequestMapping("/gateway/tqdGatewayConfig")
|
||||
@Slf4j
|
||||
public class TqdGatewayConfigController extends JeecgController<TqdGatewayConfig, ITqdGatewayConfigService> {
|
||||
@Autowired
|
||||
private ITqdGatewayConfigService tqdGatewayConfigService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tqdGatewayConfig
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站配置-分页列表查询")
|
||||
@ApiOperation(value="网站配置-分页列表查询", notes="网站配置-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryPageList(TqdGatewayConfig tqdGatewayConfig,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TqdGatewayConfig> queryWrapper = QueryGenerator.initQueryWrapper(tqdGatewayConfig, req.getParameterMap());
|
||||
Page<TqdGatewayConfig> page = new Page<TqdGatewayConfig>(pageNo, pageSize);
|
||||
IPage<TqdGatewayConfig> pageList = tqdGatewayConfigService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tqdGatewayConfig
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站配置-添加")
|
||||
@ApiOperation(value="网站配置-添加", notes="网站配置-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody TqdGatewayConfig tqdGatewayConfig) {
|
||||
tqdGatewayConfigService.save(tqdGatewayConfig);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tqdGatewayConfig
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站配置-编辑")
|
||||
@ApiOperation(value="网站配置-编辑", notes="网站配置-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody TqdGatewayConfig tqdGatewayConfig) {
|
||||
tqdGatewayConfigService.updateById(tqdGatewayConfig);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站配置-通过id删除")
|
||||
@ApiOperation(value="网站配置-通过id删除", notes="网站配置-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tqdGatewayConfigService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站配置-批量删除")
|
||||
@ApiOperation(value="网站配置-批量删除", notes="网站配置-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tqdGatewayConfigService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "网站配置-通过id查询")
|
||||
@ApiOperation(value="网站配置-通过id查询", notes="网站配置-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TqdGatewayConfig tqdGatewayConfig = tqdGatewayConfigService.getById(id);
|
||||
if(tqdGatewayConfig==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tqdGatewayConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tqdGatewayConfig
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TqdGatewayConfig tqdGatewayConfig) {
|
||||
return super.exportXls(request, tqdGatewayConfig, TqdGatewayConfig.class, "网站配置");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TqdGatewayConfig.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -126,12 +126,21 @@ public class GatewayArticle implements Serializable {
|
|||
@ApiModelProperty(value = "附件-英文版")
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
private java.lang.String filesen;
|
||||
/**文章内容文件*/
|
||||
@Excel(name = "文章内容文件", width = 15)
|
||||
@ApiModelProperty(value = "文章内容文件")
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
private java.lang.String contentFile;
|
||||
/**是否发布(Y:是N:否)*/
|
||||
@Excel(name = "是否发布(Y:是N:否)", width = 15)
|
||||
@ApiModelProperty(value = "是否发布")
|
||||
@TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
private java.lang.String isRelease;
|
||||
|
||||
/**是否是轮播(Y:是N:否)*/
|
||||
// @Excel(name = "是否是轮播(Y:是N:否)", width = 15)
|
||||
// @ApiModelProperty(value = "是否是轮播")
|
||||
// @TableField(updateStrategy= FieldStrategy.IGNORED)
|
||||
// private String isBanner;
|
||||
/**
|
||||
* 父级栏目对象
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,89 @@
|
|||
package com.nd.gateway.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 网站配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2022-07-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tqd_gateway_config")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tqd_gateway_config对象", description="网站配置")
|
||||
public class TqdGatewayConfig implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**简介图片*/
|
||||
@Excel(name = "简介图片", width = 15)
|
||||
@ApiModelProperty(value = "简介图片")
|
||||
private java.lang.String jjPic;
|
||||
/**简介介绍*/
|
||||
@Excel(name = "简介介绍", width = 15)
|
||||
@ApiModelProperty(value = "简介介绍")
|
||||
private java.lang.String jjContent;
|
||||
/**联系电话*/
|
||||
@Excel(name = "联系电话", width = 15)
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private java.lang.String tel;
|
||||
/**电子邮箱*/
|
||||
@Excel(name = "电子邮箱", width = 15)
|
||||
@ApiModelProperty(value = "电子邮箱")
|
||||
private java.lang.String dzyx;
|
||||
/**联系我们图片*/
|
||||
@Excel(name = "联系我们图片", width = 15)
|
||||
@ApiModelProperty(value = "联系我们图片")
|
||||
private java.lang.String lxwmPic;
|
||||
/**地址定位图片*/
|
||||
@Excel(name = "地址定位图片", width = 15)
|
||||
@ApiModelProperty(value = "地址定位图片")
|
||||
private java.lang.String dzdwPic;
|
||||
/**地址*/
|
||||
@Excel(name = "地址", width = 15)
|
||||
@ApiModelProperty(value = "地址")
|
||||
private java.lang.String address;
|
||||
/**座机*/
|
||||
@Excel(name = "座机", width = 15)
|
||||
@ApiModelProperty(value = "座机")
|
||||
private java.lang.String zuoji;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nd.gateway.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nd.gateway.entity.TqdGatewayConfig;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 网站配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2022-07-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TqdGatewayConfigMapper extends BaseMapper<TqdGatewayConfig> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +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.nd.gateway.mapper.TqdGatewayConfigMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nd.gateway.service;
|
||||
|
||||
import com.nd.gateway.entity.TqdGatewayConfig;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 网站配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2022-07-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITqdGatewayConfigService extends IService<TqdGatewayConfig> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nd.gateway.service.impl;
|
||||
|
||||
import com.nd.gateway.entity.TqdGatewayConfig;
|
||||
import com.nd.gateway.mapper.TqdGatewayConfigMapper;
|
||||
import com.nd.gateway.service.ITqdGatewayConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 网站配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2022-07-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TqdGatewayConfigServiceImpl extends ServiceImpl<TqdGatewayConfigMapper, TqdGatewayConfig> implements ITqdGatewayConfigService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,365 @@
|
|||
package org.jeecg.common.system.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 响应头文件类型集合
|
||||
* @author binzec
|
||||
*/
|
||||
public final class MimeUtils {
|
||||
|
||||
/**
|
||||
* KV对,K-mimeType,V-extension
|
||||
*/
|
||||
private static final Map<String, String> mimeTypeToExtensionMap = new HashMap<String, String>();
|
||||
/**
|
||||
* KV对,K-extension,V-mimeType
|
||||
*/
|
||||
private static final Map<String, String> extensionToMimeTypeMap = new HashMap<String, String>();
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
public static void add(String mimeType, String extension) {
|
||||
if (!mimeTypeToExtensionMap.containsKey(mimeType)) {
|
||||
mimeTypeToExtensionMap.put(mimeType, extension);
|
||||
}
|
||||
extensionToMimeTypeMap.put(extension, mimeType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据extension获取mimeType
|
||||
*/
|
||||
public static String getByExtension(String extension) {
|
||||
if (extension == null || extension.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return extensionToMimeTypeMap.get(extension);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据mimeType获取extension
|
||||
*/
|
||||
public static String getByMimeType(String mimeType) {
|
||||
if (mimeType == null || mimeType.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return mimeTypeToExtensionMap.get(mimeType);
|
||||
}
|
||||
|
||||
/**
|
||||
* mimeType重复的,默认加载第一个
|
||||
*/
|
||||
static {
|
||||
add("application/andrew-inset", "ez");
|
||||
add("application/dsptype", "tsp");
|
||||
add("application/json", "json");
|
||||
add("application/futuresplash", "spl");
|
||||
add("application/hta", "hta");
|
||||
add("application/mac-binhex40", "hqx");
|
||||
add("application/mac-compactpro", "cpt");
|
||||
add("application/mathematica", "nb");
|
||||
add("application/msaccess", "mdb");
|
||||
add("application/oda", "oda");
|
||||
add("application/ogg", "ogg");
|
||||
add("application/pdf", "pdf");
|
||||
add("application/pgp-keys", "key");
|
||||
add("application/pgp-signature", "pgp");
|
||||
add("application/pics-rules", "prf");
|
||||
add("application/rar", "rar");
|
||||
add("application/rdf+xml", "rdf");
|
||||
add("application/rss+xml", "rss");
|
||||
add("application/zip", "zip");
|
||||
add("application/vnd.android.package-archive", "apk");
|
||||
add("application/vnd.cinderella", "cdy");
|
||||
add("application/vnd.ms-pki.stl", "stl");
|
||||
add("application/vnd.oasis.opendocument.database", "odb");
|
||||
add("application/vnd.oasis.opendocument.formula", "odf");
|
||||
add("application/vnd.oasis.opendocument.graphics", "odg");
|
||||
add("application/vnd.oasis.opendocument.graphics-template", "otg");
|
||||
add("application/vnd.oasis.opendocument.image", "odi");
|
||||
add("application/vnd.oasis.opendocument.spreadsheet", "ods");
|
||||
add("application/vnd.oasis.opendocument.spreadsheet-template", "ots");
|
||||
add("application/vnd.oasis.opendocument.text", "odt");
|
||||
add("application/vnd.oasis.opendocument.text-master", "odm");
|
||||
add("application/vnd.oasis.opendocument.text-template", "ott");
|
||||
add("application/vnd.oasis.opendocument.text-web", "oth");
|
||||
add("application/vnd.google-earth.kml+xml", "kml");
|
||||
add("application/vnd.google-earth.kmz", "kmz");
|
||||
add("application/msword", "doc");
|
||||
add("application/msword", "dot");
|
||||
add("application/vnd.openxmlformats-officedocument.wordprocessingml.document", "docx");
|
||||
add("application/vnd.openxmlformats-officedocument.wordprocessingml.template", "dotx");
|
||||
add("application/vnd.ms-excel", "xls");
|
||||
add("application/vnd.ms-excel", "xlt");
|
||||
add("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlsx");
|
||||
add("application/vnd.openxmlformats-officedocument.spreadsheetml.template", "xltx");
|
||||
add("application/vnd.ms-powerpoint", "ppt");
|
||||
add("application/vnd.ms-powerpoint", "pot");
|
||||
add("application/vnd.ms-powerpoint", "pps");
|
||||
add("application/vnd.openxmlformats-officedocument.presentationml.presentation", "pptx");
|
||||
add("application/vnd.openxmlformats-officedocument.presentationml.template", "potx");
|
||||
add("application/vnd.openxmlformats-officedocument.presentationml.slideshow", "ppsx");
|
||||
add("application/vnd.rim.cod", "cod");
|
||||
add("application/vnd.smaf", "mmf");
|
||||
add("application/vnd.stardivision.calc", "sdc");
|
||||
add("application/vnd.stardivision.draw", "sda");
|
||||
add("application/vnd.stardivision.impress", "sdd");
|
||||
add("application/vnd.stardivision.impress", "sdp");
|
||||
add("application/vnd.stardivision.math", "smf");
|
||||
add("application/vnd.stardivision.writer", "sdw");
|
||||
add("application/vnd.stardivision.writer", "vor");
|
||||
add("application/vnd.stardivision.writer-global", "sgl");
|
||||
add("application/vnd.sun.xml.calc", "sxc");
|
||||
add("application/vnd.sun.xml.calc.template", "stc");
|
||||
add("application/vnd.sun.xml.draw", "sxd");
|
||||
add("application/vnd.sun.xml.draw.template", "std");
|
||||
add("application/vnd.sun.xml.impress", "sxi");
|
||||
add("application/vnd.sun.xml.impress.template", "sti");
|
||||
add("application/vnd.sun.xml.math", "sxm");
|
||||
add("application/vnd.sun.xml.writer", "sxw");
|
||||
add("application/vnd.sun.xml.writer.global", "sxg");
|
||||
add("application/vnd.sun.xml.writer.template", "stw");
|
||||
add("application/vnd.visio", "vsd");
|
||||
add("application/x-abiword", "abw");
|
||||
add("application/x-apple-diskimage", "dmg");
|
||||
add("application/x-bcpio", "bcpio");
|
||||
add("application/x-bittorrent", "torrent");
|
||||
add("application/x-cdf", "cdf");
|
||||
add("application/x-cdlink", "vcd");
|
||||
add("application/x-chess-pgn", "pgn");
|
||||
add("application/x-cpio", "cpio");
|
||||
add("application/x-debian-package", "deb");
|
||||
add("application/x-debian-package", "udeb");
|
||||
add("application/x-director", "dcr");
|
||||
add("application/x-director", "dir");
|
||||
add("application/x-director", "dxr");
|
||||
add("application/x-dms", "dms");
|
||||
add("application/x-doom", "wad");
|
||||
add("application/x-dvi", "dvi");
|
||||
add("application/x-flac", "flac");
|
||||
add("application/x-font", "pfa");
|
||||
add("application/x-font", "pfb");
|
||||
add("application/x-font", "gsf");
|
||||
add("application/x-font", "pcf");
|
||||
add("application/x-font", "pcf.Z");
|
||||
add("application/x-freemind", "mm");
|
||||
add("application/x-futuresplash", "spl");
|
||||
add("application/x-gnumeric", "gnumeric");
|
||||
add("application/x-go-sgf", "sgf");
|
||||
add("application/x-graphing-calculator", "gcf");
|
||||
add("application/x-gtar", "gtar");
|
||||
add("application/x-gtar", "tgz");
|
||||
add("application/x-gtar", "taz");
|
||||
add("application/x-hdf", "hdf");
|
||||
add("application/x-ica", "ica");
|
||||
add("application/x-internet-signup", "ins");
|
||||
add("application/x-internet-signup", "isp");
|
||||
add("application/x-iphone", "iii");
|
||||
add("application/x-iso9660-image", "iso");
|
||||
add("application/x-jmol", "jmz");
|
||||
add("application/x-kchart", "chrt");
|
||||
add("application/x-killustrator", "kil");
|
||||
add("application/x-koan", "skp");
|
||||
add("application/x-koan", "skd");
|
||||
add("application/x-koan", "skt");
|
||||
add("application/x-koan", "skm");
|
||||
add("application/x-kpresenter", "kpr");
|
||||
add("application/x-kpresenter", "kpt");
|
||||
add("application/x-kspread", "ksp");
|
||||
add("application/x-kword", "kwd");
|
||||
add("application/x-kword", "kwt");
|
||||
add("application/x-latex", "latex");
|
||||
add("application/x-lha", "lha");
|
||||
add("application/x-lzh", "lzh");
|
||||
add("application/x-lzx", "lzx");
|
||||
add("application/x-maker", "frm");
|
||||
add("application/x-maker", "maker");
|
||||
add("application/x-maker", "frame");
|
||||
add("application/x-maker", "fb");
|
||||
add("application/x-maker", "book");
|
||||
add("application/x-maker", "fbdoc");
|
||||
add("application/x-mif", "mif");
|
||||
add("application/x-ms-wmd", "wmd");
|
||||
add("application/x-ms-wmz", "wmz");
|
||||
add("application/x-msi", "msi");
|
||||
add("application/x-ns-proxy-autoconfig", "pac");
|
||||
add("application/x-nwc", "nwc");
|
||||
add("application/x-object", "o");
|
||||
add("application/x-oz-application", "oza");
|
||||
add("application/x-pkcs12", "p12");
|
||||
add("application/x-pkcs12", "pfx");
|
||||
add("application/x-pkcs7-certreqresp", "p7r");
|
||||
add("application/x-pkcs7-crl", "crl");
|
||||
add("application/x-quicktimeplayer", "qtl");
|
||||
add("application/x-shar", "shar");
|
||||
add("application/x-shockwave-flash", "swf");
|
||||
add("application/x-stuffit", "sit");
|
||||
add("application/x-sv4cpio", "sv4cpio");
|
||||
add("application/x-sv4crc", "sv4crc");
|
||||
add("application/x-tar", "tar");
|
||||
add("application/x-texinfo", "texinfo");
|
||||
add("application/x-texinfo", "texi");
|
||||
add("application/x-troff", "t");
|
||||
add("application/x-troff", "roff");
|
||||
add("application/x-troff-man", "man");
|
||||
add("application/x-ustar", "ustar");
|
||||
add("application/x-wais-source", "src");
|
||||
add("application/x-wingz", "wz");
|
||||
add("application/x-webarchive", "webarchive");
|
||||
add("application/x-webarchive-xml", "webarchivexml");
|
||||
add("application/x-x509-ca-cert", "crt");
|
||||
add("application/x-x509-user-cert", "crt");
|
||||
add("application/x-xcf", "xcf");
|
||||
add("application/x-xfig", "fig");
|
||||
add("application/xhtml+xml", "xhtml");
|
||||
add("audio/3gpp", "3gpp");
|
||||
add("audio/amr", "amr");
|
||||
add("audio/basic", "snd");
|
||||
add("audio/midi", "mid");
|
||||
add("audio/midi", "midi");
|
||||
add("audio/midi", "kar");
|
||||
add("audio/midi", "xmf");
|
||||
add("audio/mobile-xmf", "mxmf");
|
||||
add("audio/mpeg", "mpga");
|
||||
add("audio/mpeg", "mpega");
|
||||
add("audio/mpeg", "mp2");
|
||||
add("audio/mpeg", "mp3");
|
||||
add("audio/mpeg", "m4a");
|
||||
add("audio/mpegurl", "m3u");
|
||||
add("audio/prs.sid", "sid");
|
||||
add("audio/x-aiff", "aif");
|
||||
add("audio/x-aiff", "aiff");
|
||||
add("audio/x-aiff", "aifc");
|
||||
add("audio/x-gsm", "gsm");
|
||||
add("audio/x-mpegurl", "m3u");
|
||||
add("audio/x-ms-wma", "wma");
|
||||
add("audio/x-ms-wax", "wax");
|
||||
add("audio/x-pn-realaudio", "ra");
|
||||
add("audio/x-pn-realaudio", "rm");
|
||||
add("audio/x-pn-realaudio", "ram");
|
||||
add("audio/x-realaudio", "ra");
|
||||
add("audio/x-scpls", "pls");
|
||||
add("audio/x-sd2", "sd2");
|
||||
add("audio/x-wav", "wav");
|
||||
add("image/bmp", "bmp");
|
||||
add("image/gif", "gif");
|
||||
add("image/ico", "cur");
|
||||
add("image/ico", "ico");
|
||||
add("image/ief", "ief");
|
||||
add("image/jpeg", "jpeg");
|
||||
add("image/jpeg", "jpg");
|
||||
add("image/jpeg", "jpe");
|
||||
add("image/pcx", "pcx");
|
||||
add("image/png", "png");
|
||||
add("image/svg+xml", "svg");
|
||||
add("image/svg+xml", "svgz");
|
||||
add("image/tiff", "tiff");
|
||||
add("image/tiff", "tif");
|
||||
add("image/vnd.djvu", "djvu");
|
||||
add("image/vnd.djvu", "djv");
|
||||
add("image/vnd.wap.wbmp", "wbmp");
|
||||
add("image/x-cmu-raster", "ras");
|
||||
add("image/x-coreldraw", "cdr");
|
||||
add("image/x-coreldrawpattern", "pat");
|
||||
add("image/x-coreldrawtemplate", "cdt");
|
||||
add("image/x-corelphotopaint", "cpt");
|
||||
add("image/x-icon", "ico");
|
||||
add("image/x-jg", "art");
|
||||
add("image/x-jng", "jng");
|
||||
add("image/x-ms-bmp", "bmp");
|
||||
add("image/x-photoshop", "psd");
|
||||
add("image/x-portable-anymap", "pnm");
|
||||
add("image/x-portable-bitmap", "pbm");
|
||||
add("image/x-portable-graymap", "pgm");
|
||||
add("image/x-portable-pixmap", "ppm");
|
||||
add("image/x-rgb", "rgb");
|
||||
add("image/x-xbitmap", "xbm");
|
||||
add("image/x-xpixmap", "xpm");
|
||||
add("image/x-xwindowdump", "xwd");
|
||||
add("model/iges", "igs");
|
||||
add("model/iges", "iges");
|
||||
add("model/mesh", "msh");
|
||||
add("model/mesh", "mesh");
|
||||
add("model/mesh", "silo");
|
||||
add("text/calendar", "ics");
|
||||
add("text/calendar", "icz");
|
||||
add("text/comma-separated-values", "csv");
|
||||
add("text/css", "css");
|
||||
add("text/html", "htm");
|
||||
add("text/html", "html");
|
||||
add("text/h323", "323");
|
||||
add("text/iuls", "uls");
|
||||
add("text/mathml", "mml");
|
||||
add("text/plain", "txt");
|
||||
add("text/plain", "asc");
|
||||
add("text/plain", "text");
|
||||
add("text/plain", "diff");
|
||||
add("text/plain", "po");
|
||||
add("text/richtext", "rtx");
|
||||
add("text/rtf", "rtf");
|
||||
add("text/texmacs", "ts");
|
||||
add("text/text", "phps");
|
||||
add("text/tab-separated-values", "tsv");
|
||||
add("text/xml", "xml");
|
||||
add("text/x-bibtex", "bib");
|
||||
add("text/x-boo", "boo");
|
||||
add("text/x-c++hdr", "h++");
|
||||
add("text/x-c++hdr", "hpp");
|
||||
add("text/x-c++hdr", "hxx");
|
||||
add("text/x-c++hdr", "hh");
|
||||
add("text/x-c++src", "c++");
|
||||
add("text/x-c++src", "cpp");
|
||||
add("text/x-c++src", "cxx");
|
||||
add("text/x-chdr", "h");
|
||||
add("text/x-component", "htc");
|
||||
add("text/x-csh", "csh");
|
||||
add("text/x-csrc", "c");
|
||||
add("text/x-dsrc", "d");
|
||||
add("text/x-haskell", "hs");
|
||||
add("text/x-java", "java");
|
||||
add("text/x-literate-haskell", "lhs");
|
||||
add("text/x-moc", "moc");
|
||||
add("text/x-pascal", "p");
|
||||
add("text/x-pascal", "pas");
|
||||
add("text/x-pcs-gcd", "gcd");
|
||||
add("text/x-setext", "etx");
|
||||
add("text/x-tcl", "tcl");
|
||||
add("text/x-tex", "tex");
|
||||
add("text/x-tex", "ltx");
|
||||
add("text/x-tex", "sty");
|
||||
add("text/x-tex", "cls");
|
||||
add("text/x-vcalendar", "vcs");
|
||||
add("text/x-vcard", "vcf");
|
||||
add("video/3gpp", "3gpp");
|
||||
add("video/3gpp", "3gp");
|
||||
add("video/3gpp", "3g2");
|
||||
add("video/dl", "dl");
|
||||
add("video/dv", "dif");
|
||||
add("video/dv", "dv");
|
||||
add("video/fli", "fli");
|
||||
add("video/m4v", "m4v");
|
||||
add("video/mpeg", "mpeg");
|
||||
add("video/mpeg", "mpg");
|
||||
add("video/mpeg", "mpe");
|
||||
add("video/mp4", "mp4");
|
||||
add("video/mpeg", "VOB");
|
||||
add("video/quicktime", "qt");
|
||||
add("video/quicktime", "mov");
|
||||
add("video/vnd.mpegurl", "mxu");
|
||||
add("video/x-la-asf", "lsf");
|
||||
add("video/x-la-asf", "lsx");
|
||||
add("video/x-mng", "mng");
|
||||
add("video/x-ms-asf", "asf");
|
||||
add("video/x-ms-asf", "asx");
|
||||
add("video/x-ms-wm", "wm");
|
||||
add("video/x-ms-wmv", "wmv");
|
||||
add("video/x-ms-wmx", "wmx");
|
||||
add("video/x-ms-wvx", "wvx");
|
||||
add("video/x-msvideo", "avi");
|
||||
add("video/x-sgi-movie", "movie");
|
||||
add("x-conference/x-cooltalk", "ice");
|
||||
add("x-epoc/x-sisx-app", "sisx");
|
||||
}
|
||||
}
|
||||
|
|
@ -90,6 +90,7 @@ public class ShiroConfig {
|
|||
filterChainDefinitionMap.put("/sys/user/passwordChange", "anon");//用户更改密码
|
||||
filterChainDefinitionMap.put("/auth/2step-code", "anon");//登录验证码
|
||||
filterChainDefinitionMap.put("/sys/common/static/**", "anon");//图片预览 &下载文件不限制token
|
||||
filterChainDefinitionMap.put("/sys/common/autoViweStatic/**", "anon");//图片预览 &下载文件不限制token
|
||||
filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览
|
||||
//filterChainDefinitionMap.put("/sys/common/view/**", "anon");//图片预览不限制token
|
||||
//filterChainDefinitionMap.put("/sys/common/download/**", "anon");//文件下载不限制token
|
||||
|
|
@ -139,7 +140,10 @@ public class ShiroConfig {
|
|||
filterChainDefinitionMap.put("/gateway/**/delete", "jwt");//禁止可修改的免登陆
|
||||
filterChainDefinitionMap.put("/gateway/**/deleteBatch", "jwt");//禁止可修改的免登陆
|
||||
//前台免登陆
|
||||
filterChainDefinitionMap.put("/gateway/**/", "anon");//前台免登陆
|
||||
// filterChainDefinitionMap.put("/gateway/**/", "anon");//前台免登陆
|
||||
filterChainDefinitionMap.put("/gateway/**", "anon");//前台免登陆
|
||||
filterChainDefinitionMap.put("/sys/dict/getDictItems/**", "anon");//字典查询
|
||||
|
||||
|
||||
//性能监控 TODO 存在安全漏洞
|
||||
//filterChainDefinitionMap.put("/actuator/**", "anon");
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import org.apache.commons.lang.StringUtils;
|
|||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.util.MimeUtils;
|
||||
import org.jeecg.common.util.CommonUtils;
|
||||
import org.jeecg.common.util.RestUtil;
|
||||
import org.jeecg.common.util.TokenUtils;
|
||||
|
|
@ -268,6 +269,74 @@ public class CommonController {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @功能:根据文件扩展名来决定下载与否
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/autoViweStatic/**")
|
||||
public void pdfPreview(HttpServletRequest request, HttpServletResponse response) {
|
||||
// ISO-8859-1 ==> UTF-8 进行编码转换
|
||||
String imgPath = extractPathFromPattern(request);
|
||||
if(oConvertUtils.isEmpty(imgPath) || imgPath=="null"){
|
||||
return;
|
||||
}
|
||||
// 其余处理略
|
||||
InputStream inputStream = null;
|
||||
OutputStream outputStream = null;
|
||||
try {
|
||||
imgPath = imgPath.replace("..", "");
|
||||
if (imgPath.endsWith(",")) {
|
||||
imgPath = imgPath.substring(0, imgPath.length() - 1);
|
||||
}
|
||||
String filePath = uploadpath + File.separator + imgPath;
|
||||
File file = new File(filePath);
|
||||
if(!file.exists()){
|
||||
response.setStatus(404);
|
||||
throw new RuntimeException("文件不存在..");
|
||||
}
|
||||
String lastName= "pdf";
|
||||
if(StringUtils.lastIndexOf(filePath,".") != -1){
|
||||
lastName = StringUtils.substring(filePath,StringUtils.lastIndexOf(filePath,".") +1);
|
||||
lastName = lastName.toLowerCase();
|
||||
}
|
||||
|
||||
response.setContentType(MimeUtils.getByExtension(lastName) + ";charset=UTF-8");
|
||||
response.addHeader("Content-Disposition", "inline;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
|
||||
inputStream = new BufferedInputStream(new FileInputStream(filePath));
|
||||
outputStream = response.getOutputStream();
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = inputStream.read(buf)) > 0) {
|
||||
outputStream.write(buf, 0, len);
|
||||
}
|
||||
response.flushBuffer();
|
||||
} catch (IOException e) {
|
||||
log.error("预览文件失败" + e.getMessage());
|
||||
response.setStatus(404);
|
||||
//e.printStackTrace();
|
||||
} catch (RuntimeException e) {
|
||||
log.error("预览文件失败" + e.getMessage());
|
||||
response.setStatus(404);
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// /**
|
||||
// * 下载文件
|
||||
// * 请求地址:http://localhost:8080/common/download/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
server:
|
||||
port: 8890
|
||||
port: 8891
|
||||
tomcat:
|
||||
max-swallow-size: -1
|
||||
error:
|
||||
|
|
@ -7,23 +7,27 @@ server:
|
|||
include-stacktrace: ALWAYS
|
||||
include-message: ALWAYS
|
||||
servlet:
|
||||
context-path: /gjc
|
||||
context-path: /nyzy
|
||||
compression:
|
||||
enabled: true
|
||||
min-response-size: 1024
|
||||
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: metrics,httptrace
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: metrics,httptrace
|
||||
|
||||
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
max-request-size: 10MB
|
||||
multipart:
|
||||
enabled: true
|
||||
# 上传的文件大小
|
||||
max-file-size: 500MB
|
||||
# 表单大小
|
||||
max-request-size: 500MB
|
||||
mail:
|
||||
host: smtp.exmail.qq.com
|
||||
username: xiuzhiming@surfbird.cn
|
||||
|
|
@ -131,7 +135,7 @@ spring:
|
|||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/ndgjc_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://127.0.0.1:3306/nyzy_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: admin
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
|
@ -167,7 +171,7 @@ mybatis-plus:
|
|||
table-underline: true
|
||||
configuration:
|
||||
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# 返回类型为Map,显示null对应的字段
|
||||
call-setters-on-nulls: true
|
||||
#jeecg专用配置
|
||||
|
|
@ -230,7 +234,7 @@ jeecg :
|
|||
port: 30007
|
||||
logPath: logs/jeecg/job/jobhandler/
|
||||
logRetentionDays: 30
|
||||
#自定义路由配置 yml nacos database
|
||||
#自定义路由配置 yml nacos database
|
||||
route:
|
||||
config:
|
||||
data-id: jeecg-gateway-router
|
||||
|
|
@ -248,7 +252,8 @@ cas:
|
|||
#Mybatis输出sql日志
|
||||
logging:
|
||||
level:
|
||||
org.jeecg.modules.system.mapper : info
|
||||
org.jeecg.modules.system.mapper : debug
|
||||
com.nd : debug
|
||||
#enable swagger
|
||||
swagger:
|
||||
enable: true
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
server:
|
||||
port: 8890
|
||||
port: 8891
|
||||
tomcat:
|
||||
max-swallow-size: -1
|
||||
error:
|
||||
|
|
@ -7,7 +7,7 @@ server:
|
|||
include-stacktrace: ALWAYS
|
||||
include-message: ALWAYS
|
||||
servlet:
|
||||
context-path: /gjc
|
||||
context-path: /nyzy
|
||||
compression:
|
||||
enabled: true
|
||||
min-response-size: 1024
|
||||
|
|
@ -22,8 +22,11 @@ management:
|
|||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
max-request-size: 10MB
|
||||
enabled: true
|
||||
# 上传的文件大小
|
||||
max-file-size: 500MB
|
||||
# 表单大小
|
||||
max-request-size: 500MB
|
||||
mail:
|
||||
host: smtp.163.com
|
||||
username: jeecgos@163.com
|
||||
|
|
@ -131,7 +134,7 @@ spring:
|
|||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/ndgjc_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://127.0.0.1:3306/nyzy_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: root
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
|
@ -173,12 +176,12 @@ mybatis-plus:
|
|||
#jeecg专用配置
|
||||
jeecg :
|
||||
# 本地:local\Minio:minio\阿里云:alioss
|
||||
uploadType: alioss
|
||||
uploadType: local
|
||||
path :
|
||||
#文件上传根目录 设置
|
||||
upload: D://opt//gjc//upFiles
|
||||
upload: D://opt//nyzy//upFiles
|
||||
#webapp文件路径
|
||||
webapp: D://opt//gjc//webapp
|
||||
webapp: D://opt//nyzy//webapp
|
||||
shiro:
|
||||
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/api/getUserInfo
|
||||
#阿里云oss存储配置
|
||||
|
|
@ -248,7 +251,8 @@ cas:
|
|||
#Mybatis输出sql日志
|
||||
logging:
|
||||
level:
|
||||
org.jeecg.modules.system.mapper : debug
|
||||
org.jeecg.modules.system.mapper : info
|
||||
com.nd : info
|
||||
#enable swagger
|
||||
swagger:
|
||||
enable: false
|
||||
|
|
|
|||
|
|
@ -131,9 +131,9 @@ spring:
|
|||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3307/ndgjc_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://127.0.0.1:3307/nyzy_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: root
|
||||
password: admin
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 多数据源配置
|
||||
#multi-datasource1:
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ spring:
|
|||
application:
|
||||
name: jeecg-system
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
#mysql
|
||||
diver_name=com.mysql.cj.jdbc.Driver
|
||||
url=jdbc:mysql://127.0.0.1:3307/ndgjc_jeecg_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
url=jdbc:mysql://127.0.0.1:3306/nyzy_jeecg_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
username=root
|
||||
password=root
|
||||
database_name=ndgjc_jeecg_db
|
||||
password=admin
|
||||
database_name=nyzy_jeecg_db
|
||||
|
||||
#oracle
|
||||
#diver_name=oracle.jdbc.driver.OracleDriver
|
||||
|
|
|
|||
Loading…
Reference in New Issue