Compare commits
15 Commits
master
...
c424d5cd89
Author | SHA1 | Date | |
---|---|---|---|
c424d5cd89 | |||
9b784c99ed | |||
5041f3f92f | |||
f4caf10bd3 | |||
bb6fb94038 | |||
7cfae514ea | |||
d262ec6b72 | |||
a51c6872d8 | |||
afa068f477 | |||
c6fa415356 | |||
6006a9f18c | |||
1722abfae7 | |||
57db36e015 | |||
43e3d8cfea | |||
598860d544 |
8
pom.xml
8
pom.xml
@ -18,13 +18,13 @@
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>11</java.version>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
<druid.version>1.2.11</druid.version>
|
||||
<druid.version>1.2.8</druid.version>
|
||||
<bitwalker.version>1.21</bitwalker.version>
|
||||
<swagger.version>3.0.0</swagger.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<mybatis-spring-boot.version>2.2.2</mybatis-spring-boot.version>
|
||||
<pagehelper.boot.version>1.4.2</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.83</fastjson.version>
|
||||
<pagehelper.boot.version>1.4.1</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.80</fastjson.version>
|
||||
<oshi.version>6.1.6</oshi.version>
|
||||
<commons.io.version>2.11.0</commons.io.version>
|
||||
<commons.fileupload.version>1.4</commons.fileupload.version>
|
||||
@ -42,7 +42,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>2.5.14</version>
|
||||
<version>2.5.13</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -17,27 +17,7 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
|
||||
<groupId>org.apache.poi</groupId>
|
||||
|
||||
<artifactId>poi</artifactId>
|
||||
|
||||
<version>4.0.1</version>
|
||||
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
<groupId>org.apache.poi</groupId>
|
||||
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
|
||||
<version>4.0.1</version>
|
||||
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
@ -54,19 +34,7 @@
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>1.6.6</version>
|
||||
</dependency>
|
||||
<!-- knife4j -->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
<!-- postgresql驱动包-->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.2.20</version>
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
|
@ -18,18 +18,15 @@ public class RuoYiApplication
|
||||
{
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
System.out.println();
|
||||
System.out.println(" --->>>启动成功!<<<---");
|
||||
// System.out.println("(♥◠‿◠)ノ゙ ლ(´ڡ`ლ)゙ \n" +
|
||||
// " .-------. ____ __ \n" +
|
||||
// " | _ _ \\ \\ \\ / / \n" +
|
||||
// " | ( ' ) | \\ _. / ' \n" +
|
||||
// " |(_ o _) / _( )_ .' \n" +
|
||||
// " | (_,_).' __ ___(_ o _)' \n" +
|
||||
// " | |\\ \\ | || |(_,_)' \n" +
|
||||
// " | | \\ `' /| `-' / \n" +
|
||||
// " | | \\ / \\ / \n" +
|
||||
// " ''-' `'-' `-..-' ");
|
||||
System.out.println("(♥◠‿◠)ノ゙ 我们一起学喵叫 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ 喵 \\ \\ / / \n" +
|
||||
" | ( ' ) | 喵 \\ _. / ' \n" +
|
||||
" |(_ o _) / 喵 _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.web.controller.common;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.FastByteArrayOutputStream;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.google.code.kaptcha.Producer;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.sign.Base64;
|
||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
|
||||
/**
|
||||
* 验证码操作处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
public class CaptchaController
|
||||
{
|
||||
@Resource(name = "captchaProducer")
|
||||
private Producer captchaProducer;
|
||||
|
||||
@Resource(name = "captchaProducerMath")
|
||||
private Producer captchaProducerMath;
|
||||
|
||||
@Resource
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Resource
|
||||
private ISysConfigService configService;
|
||||
/**
|
||||
* 生成验证码
|
||||
*/
|
||||
@GetMapping("/captchaImage")
|
||||
public AjaxResult getCode(HttpServletResponse response) throws IOException
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
boolean captchaOnOff = configService.selectCaptchaOnOff();
|
||||
ajax.put("captchaOnOff", captchaOnOff);
|
||||
if (!captchaOnOff)
|
||||
{
|
||||
return ajax;
|
||||
}
|
||||
|
||||
// 保存验证码信息
|
||||
String uuid = IdUtils.simpleUUID();
|
||||
String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
|
||||
|
||||
String capStr = null, code = null;
|
||||
BufferedImage image = null;
|
||||
|
||||
// 生成验证码
|
||||
String captchaType = RuoYiConfig.getCaptchaType();
|
||||
if ("math".equals(captchaType))
|
||||
{
|
||||
String capText = captchaProducerMath.createText();
|
||||
capStr = capText.substring(0, capText.lastIndexOf("@"));
|
||||
code = capText.substring(capText.lastIndexOf("@") + 1);
|
||||
image = captchaProducerMath.createImage(capStr);
|
||||
}
|
||||
else if ("char".equals(captchaType))
|
||||
{
|
||||
capStr = code = captchaProducer.createText();
|
||||
image = captchaProducer.createImage(capStr);
|
||||
}
|
||||
|
||||
redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||
// 转换流信息写出
|
||||
FastByteArrayOutputStream os = new FastByteArrayOutputStream();
|
||||
try
|
||||
{
|
||||
ImageIO.write(image, "jpg", os);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
|
||||
ajax.put("uuid", uuid);
|
||||
ajax.put("img", Base64.encode(os.toByteArray()));
|
||||
return ajax;
|
||||
}
|
||||
}
|
@ -12,11 +12,9 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.framework.web.service.SysLoginService;
|
||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
|
||||
/**
|
||||
@ -36,9 +34,6 @@ public class SysLoginController
|
||||
@Autowired
|
||||
private SysPermissionService permissionService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
@ -50,7 +45,8 @@ public class SysLoginController
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
// 生成令牌
|
||||
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode());
|
||||
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
||||
loginBody.getUuid());
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
return ajax;
|
||||
}
|
||||
@ -63,8 +59,7 @@ public class SysLoginController
|
||||
@GetMapping("getInfo")
|
||||
public AjaxResult getInfo()
|
||||
{
|
||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||
SysUser user = loginUser.getUser();
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// 角色集合
|
||||
Set<String> roles = permissionService.getRolePermission(user);
|
||||
// 权限集合
|
||||
@ -84,10 +79,8 @@ public class SysLoginController
|
||||
@GetMapping("getRouters")
|
||||
public AjaxResult getRouters()
|
||||
{
|
||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||
// 用户信息
|
||||
SysUser user = loginUser.getUser();
|
||||
List<SysMenu> menus = menuService.selectMenuTreeByUserId(user.getUserId());
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
||||
return AjaxResult.success(menuService.buildMenus(menus));
|
||||
}
|
||||
}
|
||||
|
@ -28,10 +28,10 @@ public class SysRegisterController extends BaseController
|
||||
@PostMapping("/register")
|
||||
public AjaxResult register(@RequestBody RegisterBody user)
|
||||
{
|
||||
// if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
|
||||
// {
|
||||
// return error("当前系统没有开启注册功能!");
|
||||
// }
|
||||
if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
|
||||
{
|
||||
return error("当前系统没有开启注册功能!");
|
||||
}
|
||||
String msg = registerService.register(user);
|
||||
return StringUtils.isEmpty(msg) ? success() : error(msg);
|
||||
}
|
||||
|
@ -1,53 +1,40 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.system.domain_yada.*;
|
||||
import com.ruoyi.system.domain_yada.AorestCoverageVO;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.service_yada.IAorestCoverageService;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.ThematicMapService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.xml.crypto.Data;
|
||||
import java.io.InputStream;
|
||||
import java.security.Guard;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 森林覆盖率
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Aorest", produces = "application/json;charset=UTF-8")
|
||||
@Api(tags = "森林覆盖率")
|
||||
public class AorestCoverageController {
|
||||
@Resource
|
||||
private IAorestCoverageService service;
|
||||
|
||||
@Resource
|
||||
private ThematicMapService thematicMapService;
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* 需要查询的字段参数
|
||||
* @return 参数类
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/selectAorestCoverage",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult selectAorestCoverage()
|
||||
@RequestMapping(value = "/selectAorestCoverage",method = {RequestMethod.POST})
|
||||
public AjaxResult selectAorestCoverage(HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
List<AorestCoverageVO> eastVOSList= service.selectAorestCoverage();
|
||||
return AjaxResult.success(eastVOSList);
|
||||
@ -55,12 +42,10 @@ public class AorestCoverageController {
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
* @param ID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/DelAorestCoverage",method = {RequestMethod.DELETE})
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@RequestMapping(value = "/DelAorestCoverage",method = {RequestMethod.POST})
|
||||
public AjaxResult DelAorestCoverage(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = service.DelAorestCoverage(ID);
|
||||
@ -74,99 +59,17 @@ public class AorestCoverageController {
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
* @param eastVOS
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/IntoAorestCoverage",method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
public AjaxResult IntoAorestCoverage(@RequestBody AorestCoverageVO eastVOS)
|
||||
public AjaxResult IntoAorestCoverage(AorestCoverageVO eastVOS)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = service.IntoAorestCoverage(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
catch (Exception E){
|
||||
E.getMessage();
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
* @return 状态码
|
||||
*/
|
||||
@RequestMapping(value = "/IntoUpLoad",method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "上传文件",httpMethod = "POST")
|
||||
public AjaxResult IntoUpload(@RequestBody MultipartFile file)
|
||||
{
|
||||
UploadFile upload=new UploadFile();
|
||||
|
||||
ThematicMapDomain domain=new ThematicMapDomain();
|
||||
|
||||
UploadFile value= null;
|
||||
try {
|
||||
value = uploadFile(file,upload);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
int NUM = service.IntoUpload(value);
|
||||
domain.setPictureCode(value.getFileId());
|
||||
|
||||
int NUM = service.IntoAorestCoverage(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文件查询
|
||||
* @param response 头
|
||||
* @param request 客户端请求
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/selectUpload",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "文件查询",httpMethod = "GET")
|
||||
public AjaxResult selectUpload(HttpServletResponse response, HttpServletRequest request,@RequestBody UploadFile upload)
|
||||
{
|
||||
List<UploadFile> eastVOSList= service.selectUpload(upload.getFileId(),upload.getFileName());
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public UploadFile uploadFile(MultipartFile file,UploadFile upload) throws Exception
|
||||
{
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
upload.setFileId(String.valueOf(System.currentTimeMillis()));
|
||||
upload.setFileName(file.getOriginalFilename());
|
||||
upload.setFilePath(fileName);
|
||||
upload.setFileSize(String.valueOf(file.getSize()));
|
||||
upload.setCreateTime(LocalDateTime.now());
|
||||
return upload;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/Dictionary")
|
||||
@ApiOperation(value = "字典查询",httpMethod = "POST")
|
||||
public AjaxResult Dictionary(@RequestBody Dictionary dic)
|
||||
{
|
||||
List<Dictionary> diclist=service.selectDic(dic.getCodingType(),dic.getCodingType1(), dic.getCodingType2());
|
||||
return AjaxResult.success(diclist);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -3,12 +3,8 @@ package com.ruoyi.web.controller.yada;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -16,15 +12,15 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 澳大利亚中东部地区
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Australia", produces = "application/json;charset=UTF-8")
|
||||
@Api(tags = "澳大利亚中东部地区")
|
||||
public class AustraliaMiddleEastController
|
||||
{
|
||||
@Resource
|
||||
@ -32,24 +28,23 @@ public class AustraliaMiddleEastController
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @return 实体类
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
@RequestMapping(value = "/SelectAustralia",method = {RequestMethod.GET})
|
||||
public AjaxResult SelectAustralia(@RequestBody AustraliaMiddleEastVO eastVO )
|
||||
@RequestMapping(value = "/SelectAustralia",method = {RequestMethod.POST})
|
||||
public AjaxResult SelectAustralia(HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
List<AustraliaMiddleEastVO> eastVOSList= australiaMiddleEastService.selectAustralia(eastVO.getYearMonth(),eastVO.getMonth());
|
||||
List<AustraliaMiddleEastVO> eastVOSList= australiaMiddleEastService.selectAustralia();
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
* @param ID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/DelAustralia",method = {RequestMethod.DELETE})
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@RequestMapping(value = "/DelAustralia",method = {RequestMethod.POST})
|
||||
public AjaxResult DelAustralia(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = australiaMiddleEastService.DelAustralia(ID);
|
||||
@ -63,14 +58,12 @@ public class AustraliaMiddleEastController
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
* @param eastVOS
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/IntoAustralia",method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
public AjaxResult IntoAustralia(@RequestBody AustraliaMiddleEastVO eastVOS)
|
||||
public AjaxResult IntoAustralia(AustraliaMiddleEastVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = australiaMiddleEastService.IntoAustralia(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
|
@ -5,12 +5,8 @@ import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.GlobalTypeVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.IGlobalTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -18,41 +14,38 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*全球各类型占比
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitor/clobal")
|
||||
@Api(tags = "全球各类型占比")
|
||||
public class GlobalTypeController {
|
||||
@Resource
|
||||
private IGlobalTypeService typeService;
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @param response 响应头
|
||||
* @param request 客户端请求
|
||||
* @return 参数类
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/selectGlobalType",method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "POST")
|
||||
public AjaxResult selectGlobalType(HttpServletResponse response, HttpServletRequest request,@RequestBody GlobalTypeVO TypeVO)
|
||||
public AjaxResult selectGlobalType(HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
List<GlobalTypeVO> eastVOSList= typeService.selectGlobalType(TypeVO.getTypeName(),TypeVO.getParticularYear());
|
||||
List<GlobalTypeVO> eastVOSList= typeService.selectGlobalType();
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
* @param ID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/DelGlobalType",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
@RequestMapping(value = "/DelGlobalType",method = {RequestMethod.POST})
|
||||
public AjaxResult DelGlobalType(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = typeService.DelGlobalType(ID);
|
||||
@ -66,14 +59,12 @@ public class GlobalTypeController {
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
* @param eastVOS
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoGlobalType",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoGlobalType(@RequestBody GlobalTypeVO eastVOS)
|
||||
public AjaxResult IntoGlobalType(GlobalTypeVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = typeService.IntoGlobalType(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
|
@ -5,12 +5,8 @@ import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.OceanTemperatureVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.IOceanTemperatureService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -18,13 +14,13 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 海洋表面温度监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:13
|
||||
*/
|
||||
@Api(tags = "海洋表面温度监测")
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Ocean", produces = "application/json;charset=UTF-8")
|
||||
public class OceanTemperatureController {
|
||||
@ -33,25 +29,23 @@ public class OceanTemperatureController {
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @return 参数类
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/selectOcean",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult selectOcean(@RequestBody OceanTemperatureVO temperatureVO)
|
||||
@RequestMapping(value = "/selectOcean",method = {RequestMethod.POST})
|
||||
public AjaxResult selectOcean(HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
List<OceanTemperatureVO> eastVOSList= temperatureService.selectOcean(temperatureVO.getStartDate());
|
||||
List<OceanTemperatureVO> eastVOSList= temperatureService.selectOcean();
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
* @param ID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/DelOcean",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
|
||||
@RequestMapping(value = "/DelOcean",method = {RequestMethod.POST})
|
||||
public AjaxResult DelOcean(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = temperatureService.DelOcean(ID);
|
||||
@ -65,14 +59,12 @@ public class OceanTemperatureController {
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
* @param eastVOS
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoAustralia",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoOcean(@RequestBody OceanTemperatureVO eastVOS)
|
||||
public AjaxResult IntoOcean(OceanTemperatureVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = temperatureService.IntoOcean(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
|
@ -3,12 +3,8 @@ package com.ruoyi.web.controller.yada;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.service_yada.IRegionVGIService;
|
||||
import com.ruoyi.system.domain_yada.RegionVGIVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
@ -17,13 +13,13 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 各区域VGI
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:08
|
||||
*/
|
||||
@Api(tags = "各区域VGI")
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/orderMng", produces = "application/json;charset=UTF-8")
|
||||
public class RegionVGIController
|
||||
@ -32,11 +28,12 @@ public class RegionVGIController
|
||||
private IRegionVGIService regionVGIService;
|
||||
/**
|
||||
* 查询方法
|
||||
* @return 参数类
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/SelectRegion",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult SelectRegion()
|
||||
@RequestMapping(value = "/SelectRegion",method = {RequestMethod.POST})
|
||||
public AjaxResult SelectRegion(HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
List<RegionVGIVO> vgivost= regionVGIService.selectRegion();
|
||||
return AjaxResult.success(vgivost);
|
||||
@ -44,12 +41,10 @@ public class RegionVGIController
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
* @param ID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/DelRegion",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
@RequestMapping(value = "/DelRegion",method = {RequestMethod.POST})
|
||||
public AjaxResult DelRegion(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = regionVGIService.DelRegion(ID);
|
||||
@ -63,14 +58,12 @@ public class RegionVGIController
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param vgivo 新增实体类
|
||||
* @return 状态码
|
||||
* @param vgivo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoRegion",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoRegion(@RequestBody RegionVGIVO vgivo)
|
||||
public AjaxResult IntoRegion(RegionVGIVO vgivo)
|
||||
{
|
||||
vgivo.setCreatedTime(LocalDateTime.now());
|
||||
int NUM = regionVGIService.IntoRegion(vgivo);
|
||||
if (NUM>0)
|
||||
{
|
||||
|
@ -6,19 +6,22 @@ import com.ruoyi.system.domain_yada.RegionVGIVO;
|
||||
import com.ruoyi.system.domain_yada.RegionalSystemVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.IRegionalSystemService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 区域生态系统
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 9:12
|
||||
*/
|
||||
@Api(tags = "区域生态系统")
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Regional", produces = "application/json;charset=UTF-8")
|
||||
public class RegionalSystemController {
|
||||
@ -27,25 +30,24 @@ public class RegionalSystemController {
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @return 参数类
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/selectRegional",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult selectRegional(@RequestParam("region") String region)
|
||||
@RequestMapping(value = "/selectRegional",method = {RequestMethod.POST})
|
||||
public AjaxResult selectRegional(HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
List<RegionalSystemVO> eastVOSList= systemService.selectRegional(region);
|
||||
List<RegionalSystemVO> eastVOSList= systemService.selectRegional();
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
* @param ID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/DelRegional",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
public AjaxResult DelRegional(@RequestParam("ID") String ID)
|
||||
@RequestMapping(value = "/DelRegional",method = {RequestMethod.POST})
|
||||
public AjaxResult DelRegional(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = systemService.DelRegional(ID);
|
||||
if (NUM>0)
|
||||
@ -58,14 +60,12 @@ public class RegionalSystemController {
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
* @param eastVOS
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoRegional",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoRegional(@RequestBody RegionalSystemVO eastVOS)
|
||||
public AjaxResult IntoRegional(RegionalSystemVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = systemService.IntoRegional(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
|
@ -1,330 +0,0 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.file.WeatherUtils;
|
||||
import com.ruoyi.system.domain_yada.*;
|
||||
import com.ruoyi.system.service_yada.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import jdk.jfr.Frequency;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import springfox.documentation.spring.web.json.Json;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "/Special")
|
||||
@Api(tags = "模板导入")
|
||||
public class SpecialController {
|
||||
|
||||
@Resource
|
||||
private IRegionVGIService regionVGIService;
|
||||
|
||||
@Resource
|
||||
private IAustraliaMiddleEastService australiaMiddleEastService;
|
||||
|
||||
@Resource
|
||||
private IAorestCoverageService service;
|
||||
|
||||
@Resource
|
||||
private IVegetationCoverageService coverageService;
|
||||
|
||||
@Resource
|
||||
private IRegionalSystemService systemService;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
@RequestMapping(value = "/helpSaveExcel")
|
||||
private AjaxResult helpSaveExcel(@RequestBody MultipartFile file) {
|
||||
List<RegionVGIVO> value = saveExcel(file);
|
||||
|
||||
return IntoRegion(value);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/helpWeatherClass",method = {RequestMethod.GET})
|
||||
public AjaxResult helpWeatherClass(String city,String type)
|
||||
{
|
||||
String url="https://restapi.amap.com/v3/weather/weatherInfo";
|
||||
Map<String,String> map=new HashMap<>();
|
||||
map.put("key","37087f0a3007dc67d37859553cd02d33");
|
||||
map.put("city",city);
|
||||
if (type!=null){ map.put("extensions",type);}
|
||||
map.put("output","json");
|
||||
String value= WeatherUtils.httpRequest(url,map);
|
||||
WeatherUtilsVO vo = JSON.parseObject(value,WeatherUtilsVO.class);
|
||||
// String value2=vo.getForecasts().substring(1,vo.getForecasts().length()-1);
|
||||
// System.out.println(value2);
|
||||
// vo.setForecast(JSON.parseObject(value2,ForecastVo.class));
|
||||
// JSONObject userJson=JSONObject.parseObject(value);
|
||||
// WeatherUtilsVO utilsValue= JSON.toJavaObject(userJson,WeatherUtilsVO.class);
|
||||
|
||||
return AjaxResult.success(vo);
|
||||
} /**
|
||||
* 森林覆盖率模板导入
|
||||
*/
|
||||
@RequestMapping(value = "/helpExcelAorest")
|
||||
private AjaxResult helpExcelAorest(@RequestBody MultipartFile file) {
|
||||
List<AorestCoverageVO> value = saveExcelAorest(file);
|
||||
|
||||
return IntoAorestCoverage(value);
|
||||
}
|
||||
|
||||
/**
|
||||
*平均植被覆盖度和净初级生产力
|
||||
*/
|
||||
@RequestMapping(value = "/helpExcelnpp")
|
||||
private AjaxResult helpExcelnpp(@RequestBody MultipartFile file) {
|
||||
List<VegetationCoverageVO> value = saveExcelnpp(file);
|
||||
|
||||
return IntoVegetation(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 澳大利亚中部地区模板导入
|
||||
*/
|
||||
@RequestMapping(value = "/helpExcelAus")
|
||||
private AjaxResult helpExcelAus(@RequestBody MultipartFile file) {
|
||||
List<AustraliaMiddleEastVO> value = saveExcelAus(file);
|
||||
|
||||
return IntoAustralia(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 区域生态系统类型转移
|
||||
*/
|
||||
@RequestMapping(value = "/helpExcelRegion")
|
||||
private AjaxResult helpExcelRegion(@RequestBody MultipartFile file) {
|
||||
List<RegionalSystemVO> value = saveExcelRegion(file);
|
||||
|
||||
return IntoRegional(value);
|
||||
}
|
||||
|
||||
public AjaxResult IntoRegional(List<RegionalSystemVO> eastVOS)
|
||||
{
|
||||
try {
|
||||
for (int i = 0; i < eastVOS.size(); i++) {
|
||||
eastVOS.get(i).setCreateTime(LocalDateTime.now());
|
||||
systemService.IntoRegional(eastVOS.get(i));
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
catch (Exception E){
|
||||
E.getMessage();
|
||||
return AjaxResult.error(E.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public AjaxResult IntoAustralia(List<AustraliaMiddleEastVO> eastVOS) {
|
||||
|
||||
for (int i = 0; i < eastVOS.size(); i++) {
|
||||
eastVOS.get(i).setCreateTime(LocalDateTime.now());
|
||||
australiaMiddleEastService.IntoAustralia(eastVOS.get(i));
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
public AjaxResult IntoRegion(List<RegionVGIVO> vgivo) {
|
||||
for (int i = 0; i < vgivo.size(); i++) {
|
||||
vgivo.get(i).setCreatedTime(LocalDateTime.now());
|
||||
|
||||
regionVGIService.IntoRegion(vgivo.get(i));
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
|
||||
}
|
||||
|
||||
public AjaxResult IntoAorestCoverage(List<AorestCoverageVO> eastVOS)
|
||||
{
|
||||
try {
|
||||
for (int i = 0; i < eastVOS.size(); i++) {
|
||||
eastVOS.get(i).setCreateTime(LocalDateTime.now());
|
||||
service.IntoAorestCoverage(eastVOS.get(i));
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
catch (Exception E){
|
||||
E.getMessage();
|
||||
return AjaxResult.error(E.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public AjaxResult IntoVegetation(List<VegetationCoverageVO> eastVOS)
|
||||
{
|
||||
try {
|
||||
for (int i = 0; i < eastVOS.size(); i++) {
|
||||
eastVOS.get(i).setCreateTime(LocalDateTime.now());
|
||||
coverageService.IntoVegetation(eastVOS.get(i));
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
catch (Exception E){
|
||||
E.getMessage();
|
||||
return AjaxResult.error(E.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private List<RegionVGIVO> saveExcel(MultipartFile file) {
|
||||
|
||||
try {
|
||||
List<RegionVGIVO> Value = new ArrayList<>();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook book;
|
||||
Sheet sheet;
|
||||
book = new XSSFWorkbook(inputStream);
|
||||
sheet = book.getSheetAt(0);
|
||||
for (int i = 1; i < sheet.getLastRowNum() + 1; i++) {
|
||||
RegionVGIVO value = new RegionVGIVO();
|
||||
Row row = sheet.getRow(i);
|
||||
value.setCreatedTime(LocalDateTime.now());
|
||||
value.setRegion(row.getCell(0).toString());
|
||||
value.setRegionEn(row.getCell(1).toString());
|
||||
value.setForest(Double.parseDouble(row.getCell(2).toString()));
|
||||
value.setGrassland(Double.parseDouble(row.getCell(3).toString()));
|
||||
value.setParticularYear(row.getCell(4).toString());
|
||||
Value.add(value);
|
||||
}
|
||||
return Value;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private List<AustraliaMiddleEastVO> saveExcelAus(MultipartFile file) {
|
||||
|
||||
try {
|
||||
List<AustraliaMiddleEastVO> Value = new ArrayList<>();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook book;
|
||||
Sheet sheet;
|
||||
book = new XSSFWorkbook(inputStream);
|
||||
sheet = book.getSheetAt(0);
|
||||
for (int i = 1; i < sheet.getLastRowNum() + 1; i++) {
|
||||
AustraliaMiddleEastVO value = new AustraliaMiddleEastVO();
|
||||
Row row = sheet.getRow(i);
|
||||
value.setYearMonth(row.getCell(0).toString());
|
||||
value.setMonth(row.getCell(1).toString());
|
||||
value.setSstAnomalyIndex(Double.parseDouble(row.getCell(2).toString()));
|
||||
value.setTemperatureAnomolies(Double.parseDouble(row.getCell(3).toString()));
|
||||
value.setPrecipitationAnomolies(Double.parseDouble(row.getCell(4).toString()));
|
||||
value.setVaiAnomolies(Double.parseDouble(row.getCell(5).toString()));
|
||||
Value.add(value);
|
||||
}
|
||||
return Value;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private List<AorestCoverageVO> saveExcelAorest(MultipartFile file) {
|
||||
|
||||
try {
|
||||
List<AorestCoverageVO> Value = new ArrayList<>();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook book;
|
||||
Sheet sheet;
|
||||
book = new XSSFWorkbook(inputStream);
|
||||
sheet = book.getSheetAt(0);
|
||||
for (int i = 1; i < sheet.getLastRowNum() + 1; i++) {
|
||||
AorestCoverageVO value = new AorestCoverageVO();
|
||||
Row row = sheet.getRow(i);
|
||||
value.setRegion(row.getCell(0).toString());
|
||||
value.setRegionEn(row.getCell(1).toString());
|
||||
value.setProtectedLands(Double.parseDouble(row.getCell(2).toString()));
|
||||
value.setNonProtectedLands(Double.parseDouble(row.getCell(3).toString()));
|
||||
value.setMountain(Double.parseDouble(row.getCell(4).toString()));
|
||||
value.setNonMountain(Double.parseDouble(row.getCell(5).toString()));
|
||||
value.setCreateTime(LocalDateTime.now());
|
||||
Value.add(value);
|
||||
}
|
||||
return Value;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private List<VegetationCoverageVO> saveExcelnpp(MultipartFile file) {
|
||||
|
||||
try {
|
||||
List<VegetationCoverageVO> Value = new ArrayList<>();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook book;
|
||||
Sheet sheet;
|
||||
book = new XSSFWorkbook(inputStream);
|
||||
sheet = book.getSheetAt(0);
|
||||
for (int i = 1; i < sheet.getLastRowNum() + 1; i++) {
|
||||
VegetationCoverageVO value = new VegetationCoverageVO();
|
||||
Row row = sheet.getRow(i);
|
||||
value.setRegion(row.getCell(0).toString());
|
||||
value.setRegionEn(row.getCell(1).toString());
|
||||
value.setProtectedLands(Double.parseDouble(row.getCell(4).toString()));
|
||||
value.setNonProtectedLands(Double.parseDouble(row.getCell(5).toString()));
|
||||
value.setMountain(Double.parseDouble(row.getCell(2).toString()));
|
||||
value.setNonMountain(Double.parseDouble(row.getCell(3).toString()));
|
||||
value.setCreateTime(LocalDateTime.now());
|
||||
Value.add(value);
|
||||
}
|
||||
return Value;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private List<RegionalSystemVO> saveExcelRegion(MultipartFile file) {
|
||||
|
||||
try {
|
||||
List<RegionalSystemVO> Value = new ArrayList<>();
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook book;
|
||||
Sheet sheet;
|
||||
book = new XSSFWorkbook(inputStream);
|
||||
sheet = book.getSheetAt(0);
|
||||
for (int i = 1; i < sheet.getLastRowNum() + 1; i++) {
|
||||
RegionalSystemVO value = new RegionalSystemVO();
|
||||
Row row = sheet.getRow(i);
|
||||
value.setRegion(row.getCell(0).toString());
|
||||
value.setRegionEn(row.getCell(1).toString());
|
||||
value.setTypeConversion(row.getCell(2).toString());
|
||||
value.setTypeconversionEn(row.getCell(3).toString());
|
||||
value.setProportionOfChangedAreas(Double.parseDouble(row.getCell(4).toString()));
|
||||
value.setCreateTime(LocalDateTime.now());
|
||||
Value.add(value);
|
||||
}
|
||||
return Value;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
/**
|
||||
* 专题报告
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 11:10
|
||||
*/
|
||||
public class SpecialReportController {
|
||||
}
|
@ -1,32 +1,25 @@
|
||||
package com.ruoyi.web.controller.yada;
|
||||
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.system.domain_yada.ThematicMapDomain;
|
||||
import com.ruoyi.system.service_yada.ThematicMapService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 专题图模块
|
||||
* @author taco chen
|
||||
* 中国城市监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 10:55
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/thematic-map")
|
||||
@Api(tags = "专题图模块")
|
||||
public class ThematicMapController {
|
||||
|
||||
@Resource
|
||||
@ -34,32 +27,23 @@ public class ThematicMapController {
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @param response 响应头
|
||||
* @return 参数类
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取所有专题图")
|
||||
@ApiImplicitParams({})
|
||||
@ApiResponses({
|
||||
@ApiResponse(code =200,message = "请求成功"),
|
||||
@ApiResponse(code =401,message = "没有认证"),
|
||||
@ApiResponse(code =403,message = "权限不足"),
|
||||
@ApiResponse(code =404,message = "未找到")
|
||||
})
|
||||
@RequestMapping(value = "/get/all",method = {RequestMethod.POST})
|
||||
public AjaxResult selectAllThematicMap(HttpServletResponse response,@RequestBody ThematicMapDomain thematicMapDomain)
|
||||
@RequestMapping(value = "/get/all",method = {RequestMethod.GET})
|
||||
public AjaxResult selectAllThematicMap(HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
List<ThematicMapDomain> res= thematicMapService.selectAll(thematicMapDomain.getPictureType(),
|
||||
thematicMapDomain.getPictureTypeOne(),thematicMapDomain.getPictureTypeTwo());
|
||||
List<ThematicMapDomain> res= thematicMapService.selectAll();
|
||||
return AjaxResult.success(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param id id
|
||||
* @return 状态码
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/delete",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "long", paramType = "path", dataTypeClass = long.class)
|
||||
public AjaxResult deleteThematicMap(@Param("id") Long id)
|
||||
{
|
||||
int num = thematicMapService.deleteById(id);
|
||||
@ -71,22 +55,16 @@ public class ThematicMapController {
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param thematicMapDomain 新增实体类
|
||||
* @return 状态码
|
||||
* @param thematicMapDomain
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/add",method = {RequestMethod.POST})
|
||||
public AjaxResult saveThematicMap(@RequestBody ThematicMapDomain thematicMapDomain)
|
||||
public AjaxResult saveThematicMap(ThematicMapDomain thematicMapDomain)
|
||||
{
|
||||
|
||||
|
||||
thematicMapDomain.setCreatedTime(LocalDateTime.now());
|
||||
int num = thematicMapService.save(thematicMapDomain);
|
||||
if (num>0) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -5,12 +5,8 @@ import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.UrbanVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.IUrbanService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -18,13 +14,13 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 中国城市监测
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 10:55
|
||||
*/
|
||||
@Api(tags = "中国城市监测")
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Urban", produces = "application/json;charset=UTF-8")
|
||||
public class UrbanController {
|
||||
@ -33,25 +29,23 @@ public class UrbanController {
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @param response 响应头
|
||||
* @param request 客户端请求
|
||||
* @return 参数类
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/selectUrban",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult selectUrban(HttpServletResponse response, HttpServletRequest request,@RequestBody UrbanVO urbanVO)
|
||||
@RequestMapping(value = "/selectUrban",method = {RequestMethod.POST})
|
||||
public AjaxResult selectUrban(HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
List<UrbanVO> eastVOSList= urbanService.selectUrban(urbanVO.getName(),urbanVO.getParticularYear());
|
||||
List<UrbanVO> eastVOSList= urbanService.selectUrban();
|
||||
return AjaxResult.success(eastVOSList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
* @param ID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/DelUrban",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@RequestMapping(value = "/DelUrban",method = {RequestMethod.POST})
|
||||
public AjaxResult DelUrban(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = urbanService.DelUrban(ID);
|
||||
@ -65,15 +59,12 @@ public class UrbanController {
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
* @param eastVOS
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoUrban",method = {RequestMethod.POST})
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "long", paramType = "path", dataTypeClass = long.class)
|
||||
public AjaxResult IntoUrban(@RequestBody UrbanVO eastVOS)
|
||||
public AjaxResult IntoUrban(UrbanVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = urbanService.IntoUrban(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
|
@ -5,12 +5,8 @@ import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.VegetationCoverageVO;
|
||||
import com.ruoyi.system.service_yada.IAustraliaMiddleEastService;
|
||||
import com.ruoyi.system.service_yada.IVegetationCoverageService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -18,13 +14,13 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 平均植被覆盖度和净初级生产力
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/11 10:56
|
||||
*/
|
||||
@Api(tags = "平均植被覆盖度和净初级生产力")
|
||||
@RestController
|
||||
@RequestMapping(value = "/business-service/api/Vegetation", produces = "application/json;charset=UTF-8")
|
||||
public class VegetationCoverageController {
|
||||
@ -33,11 +29,12 @@ public class VegetationCoverageController {
|
||||
|
||||
/**
|
||||
* 查询方法
|
||||
* @return 参数类
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/selectVegetation",method = {RequestMethod.GET})
|
||||
@ApiOperation(value = "查询方法",httpMethod = "GET")
|
||||
public AjaxResult selectVegetation()
|
||||
@RequestMapping(value = "/selectVegetation",method = {RequestMethod.POST})
|
||||
public AjaxResult selectVegetation(HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
List<VegetationCoverageVO> eastVOSList= coverageService.selectVegetation();
|
||||
return AjaxResult.success(eastVOSList);
|
||||
@ -45,12 +42,10 @@ public class VegetationCoverageController {
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param ID id
|
||||
* @return 状态码
|
||||
* @param ID
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/DelVegetation",method = {RequestMethod.DELETE})
|
||||
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "long", paramType = "path", dataTypeClass = long.class)
|
||||
@RequestMapping(value = "/DelVegetation",method = {RequestMethod.POST})
|
||||
public AjaxResult DelVegetation(@Param("ID") String ID)
|
||||
{
|
||||
int NUM = coverageService.DelVegetation(ID);
|
||||
@ -64,14 +59,12 @@ public class VegetationCoverageController {
|
||||
|
||||
/**
|
||||
* 新增方法
|
||||
* @param eastVOS 新增实体类
|
||||
* @return 状态码
|
||||
* @param eastVOS
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增方法",httpMethod = "POST")
|
||||
@RequestMapping(value = "/IntoVegetation",method = {RequestMethod.POST})
|
||||
public AjaxResult IntoVegetation(@RequestBody VegetationCoverageVO eastVOS)
|
||||
public AjaxResult IntoVegetation(VegetationCoverageVO eastVOS)
|
||||
{
|
||||
eastVOS.setCreateTime(LocalDateTime.now());
|
||||
int NUM = coverageService.IntoVegetation(eastVOS);
|
||||
if (NUM>0)
|
||||
{
|
||||
|
@ -1 +0,0 @@
|
||||
com.ruoyi.framework.web.service.CaptchaRedisService
|
@ -2,24 +2,20 @@
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||
driver-class-name: org.postgresql.Driver
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
#url: jdbc:postgresql://47.243.79.66:5432/yada?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
#url: jdbc:postgresql://192.168.2.9:5432/yada?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
# username: postgres
|
||||
# password: postgres
|
||||
url: jdbc:postgresql://118.195.242.28:5432/yada?AllowPublicKeyRetrieval=True&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: gty
|
||||
password: 308525
|
||||
url: jdbc:mysql://192.168.2.9:3306/nuoyi?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: saas
|
||||
password: XKrs123.
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
@ -34,13 +30,12 @@ spring:
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||
maxEvictableIdleTimeMillis: 900000
|
||||
# 配置检测连接是否有效select * from pg_stat_activity
|
||||
# validationQuery: SELECT 1 FROM DUAL
|
||||
validationQuery: SELECT version()
|
||||
# 配置检测连接是否有效
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
webStatFilter:
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
statViewServlet:
|
||||
enabled: true
|
||||
@ -59,4 +54,4 @@ spring:
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
multi-statement-allow: true
|
@ -3,13 +3,13 @@ ruoyi:
|
||||
# 名称
|
||||
name: RuoYi
|
||||
# 版本
|
||||
version: 3.4.0
|
||||
version: 3.8.2
|
||||
# 版权年份
|
||||
copyrightYear: 2021
|
||||
copyrightYear: 2022
|
||||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: /home/gty/ruoyi/uploadPath
|
||||
profile: D:/ruoyi/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数组计算 char 字符验证
|
||||
@ -19,17 +19,19 @@ ruoyi:
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8080
|
||||
#port: 6061
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
tomcat:
|
||||
# tomcat的URI编码
|
||||
uri-encoding: UTF-8
|
||||
# tomcat最大线程数,默认为200
|
||||
max-threads: 800
|
||||
# Tomcat启动初始化的线程数,默认值25
|
||||
min-spare-threads: 30
|
||||
# 连接数满后的排队数,默认为100
|
||||
accept-count: 1000
|
||||
threads:
|
||||
# tomcat最大线程数,默认为200
|
||||
max: 800
|
||||
# Tomcat启动初始化的线程数,默认值10
|
||||
min-spare: 100
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
@ -39,19 +41,22 @@ logging:
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
# config:
|
||||
# activate:
|
||||
# on-profile: druid
|
||||
profiles:
|
||||
active: druid
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: druid
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 10MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 20MB
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 10MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 20MB
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
@ -64,9 +69,9 @@ spring:
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
database: 3
|
||||
# 密码
|
||||
password: '*&jkjusWETO(^ses%i'
|
||||
password: sdust2020
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
@ -82,28 +87,27 @@ spring:
|
||||
|
||||
# token配置
|
||||
token:
|
||||
# 令牌自定义标识
|
||||
header: Authorization
|
||||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 300
|
||||
|
||||
# 令牌自定义标识
|
||||
header: Authorization
|
||||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 30
|
||||
|
||||
# MyBatis配置
|
||||
mybatis:
|
||||
# 搜索指定包别名
|
||||
typeAliasesPackage: com.ruoyi.**.domain
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
# 搜索指定包别名
|
||||
typeAliasesPackage: com.ruoyi.**.domain,com.ruoyi.**.domain_yada
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml,classpath*:mapper_yada/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
reasonable: true
|
||||
supportMethodsArguments: true
|
||||
params: count=countSql
|
||||
params: count=countSql
|
||||
|
||||
# Swagger配置
|
||||
swagger:
|
||||
@ -112,27 +116,12 @@ swagger:
|
||||
# 请求前缀
|
||||
pathMapping: /dev-api
|
||||
|
||||
# 滑块验证码
|
||||
aj:
|
||||
captcha:
|
||||
cache-type: redis
|
||||
# blockPuzzle 滑块 clickWord 文字点选 default默认两者都实例化
|
||||
type: blockPuzzle
|
||||
# 右下角显示字
|
||||
water-mark: ruoyi.vip
|
||||
# 校验滑动拼图允许误差偏移量(默认5像素)
|
||||
slip-offset: 5
|
||||
# aes加密坐标开启或者禁用(true|false)
|
||||
aes-status: true
|
||||
# 滑动干扰项(0/1/2)
|
||||
interference-options: 2
|
||||
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice/*
|
||||
excludes: /system/notice
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
|
@ -1,6 +1,24 @@
|
||||
_
|
||||
( )
|
||||
| |/') _ __ ___
|
||||
(`\/')| , < ( '__)/',__)
|
||||
> < | |\`\ | | \__, \
|
||||
(_/\_)(_) (_)(_) (____/
|
||||
Application Version: ${ruoyi.version}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// _ooOoo_ //
|
||||
// o6666666o //
|
||||
// 88" . "88 //
|
||||
// (| ^_^ |) //
|
||||
// O\ = /O //
|
||||
// ____/`---'\____ //
|
||||
// .' \\| |// `. //
|
||||
// / \\||| : |||// \ //
|
||||
// / _||||| -:- |||||- \ //
|
||||
// | | \\\ - /// | | //
|
||||
// | \_| ''\---/'' | | //
|
||||
// \ .-\__ `-` ___/-. / //
|
||||
// ___`. .' /--.--\ `. . ___ //
|
||||
// ."" '< `.___\_<|>_/___.' >'"". //
|
||||
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
|
||||
// \ \ `-. \_ __\ /__ _/ .-` / / //
|
||||
// ========`-.____`-.___\_____/___.-`____.-'======== //
|
||||
// `=---=' //
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
||||
// 佛祖保佑 永不宕机 永无BUG //
|
||||
////////////////////////////////////////////////////////////////////
|
@ -1,66 +0,0 @@
|
||||
package com.ruoyi.common.utils.file;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/10 9:17
|
||||
*/
|
||||
public class WeatherUtils
|
||||
{
|
||||
|
||||
|
||||
public static String httpRequest(String requestUrl,Map params) {
|
||||
//buffer用于接受返回的字符
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
try {
|
||||
//建立URL,把请求地址给补全,其中urlencode()方法用于把params里的参数给取出来
|
||||
URL url = new URL(requestUrl+"?"+urlencode(params));
|
||||
//打开http连接
|
||||
HttpURLConnection httpUrlConn = (HttpURLConnection) url.openConnection();
|
||||
httpUrlConn.setDoInput(true);
|
||||
httpUrlConn.setRequestMethod("GET");
|
||||
httpUrlConn.connect();
|
||||
|
||||
//获得输入
|
||||
InputStream inputStream = httpUrlConn.getInputStream();
|
||||
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8");
|
||||
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
|
||||
|
||||
//将bufferReader的值给放到buffer里
|
||||
String str = null;
|
||||
while ((str = bufferedReader.readLine()) != null) {
|
||||
buffer.append(str);
|
||||
}
|
||||
//关闭bufferReader和输入流
|
||||
bufferedReader.close();
|
||||
inputStreamReader.close();
|
||||
inputStream.close();
|
||||
inputStream = null;
|
||||
//断开连接
|
||||
httpUrlConn.disconnect();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//返回字符串
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
public static String urlencode(Map<String,Object>data) {
|
||||
//将map里的参数变成像 showapi_appid=###&showapi_sign=###&的样子
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Map.Entry i : data.entrySet()) {
|
||||
try {
|
||||
sb.append(i.getKey()).append("=").append(URLEncoder.encode(i.getValue()+"","UTF-8")).append("&");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -35,25 +35,17 @@
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 滑块验证码-->
|
||||
<dependency>
|
||||
<groupId>com.github.anji-plus</groupId>
|
||||
<artifactId>captcha-spring-boot-starter</artifactId>
|
||||
<version>1.2.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 验证码 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.github.penggle</groupId>-->
|
||||
<!-- <artifactId>kaptcha</artifactId>-->
|
||||
<!-- <exclusions>-->
|
||||
<!-- <exclusion>-->
|
||||
<!-- <artifactId>javax.servlet-api</artifactId>-->
|
||||
<!-- <groupId>javax.servlet</groupId>-->
|
||||
<!-- </exclusion>-->
|
||||
<!-- </exclusions>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.github.penggle</groupId>
|
||||
<artifactId>kaptcha</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<groupId>javax.servlet</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- 获取系统信息 -->
|
||||
<dependency>
|
||||
|
@ -0,0 +1,83 @@
|
||||
package com.ruoyi.framework.config;
|
||||
|
||||
import java.util.Properties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import com.google.code.kaptcha.impl.DefaultKaptcha;
|
||||
import com.google.code.kaptcha.util.Config;
|
||||
import static com.google.code.kaptcha.Constants.*;
|
||||
|
||||
/**
|
||||
* 验证码配置
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Configuration
|
||||
public class CaptchaConfig
|
||||
{
|
||||
@Bean(name = "captchaProducer")
|
||||
public DefaultKaptcha getKaptchaBean()
|
||||
{
|
||||
DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
|
||||
Properties properties = new Properties();
|
||||
// 是否有边框 默认为true 我们可以自己设置yes,no
|
||||
properties.setProperty(KAPTCHA_BORDER, "yes");
|
||||
// 验证码文本字符颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "black");
|
||||
// 验证码图片宽度 默认为200
|
||||
properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160");
|
||||
// 验证码图片高度 默认为50
|
||||
properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60");
|
||||
// 验证码文本字符大小 默认为40
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "38");
|
||||
// KAPTCHA_SESSION_KEY
|
||||
properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCode");
|
||||
// 验证码文本字符长度 默认为5
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "4");
|
||||
// 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
|
||||
// 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
|
||||
properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
|
||||
Config config = new Config(properties);
|
||||
defaultKaptcha.setConfig(config);
|
||||
return defaultKaptcha;
|
||||
}
|
||||
|
||||
@Bean(name = "captchaProducerMath")
|
||||
public DefaultKaptcha getKaptchaBeanMath()
|
||||
{
|
||||
DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
|
||||
Properties properties = new Properties();
|
||||
// 是否有边框 默认为true 我们可以自己设置yes,no
|
||||
properties.setProperty(KAPTCHA_BORDER, "yes");
|
||||
// 边框颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_BORDER_COLOR, "105,179,90");
|
||||
// 验证码文本字符颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "blue");
|
||||
// 验证码图片宽度 默认为200
|
||||
properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160");
|
||||
// 验证码图片高度 默认为50
|
||||
properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60");
|
||||
// 验证码文本字符大小 默认为40
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "35");
|
||||
// KAPTCHA_SESSION_KEY
|
||||
properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath");
|
||||
// 验证码文本生成器
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "com.ruoyi.framework.config.KaptchaTextCreator");
|
||||
// 验证码文本字符间距 默认为2
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_SPACE, "3");
|
||||
// 验证码文本字符长度 默认为5
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "6");
|
||||
// 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
|
||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
|
||||
// 验证码噪点颜色 默认为Color.BLACK
|
||||
properties.setProperty(KAPTCHA_NOISE_COLOR, "white");
|
||||
// 干扰实现类
|
||||
properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.impl.NoNoise");
|
||||
// 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
|
||||
properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
|
||||
Config config = new Config(properties);
|
||||
defaultKaptcha.setConfig(config);
|
||||
return defaultKaptcha;
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package com.ruoyi.framework.config;
|
||||
|
||||
import java.util.Random;
|
||||
import com.google.code.kaptcha.text.impl.DefaultTextCreator;
|
||||
|
||||
/**
|
||||
* 验证码文本生成器
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class KaptchaTextCreator extends DefaultTextCreator
|
||||
{
|
||||
private static final String[] CNUMBERS = "0,1,2,3,4,5,6,7,8,9,10".split(",");
|
||||
|
||||
@Override
|
||||
public String getText()
|
||||
{
|
||||
Integer result = 0;
|
||||
Random random = new Random();
|
||||
int x = random.nextInt(10);
|
||||
int y = random.nextInt(10);
|
||||
StringBuilder suChinese = new StringBuilder();
|
||||
int randomoperands = (int) Math.round(Math.random() * 2);
|
||||
if (randomoperands == 0)
|
||||
{
|
||||
result = x * y;
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
suChinese.append("*");
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
}
|
||||
else if (randomoperands == 1)
|
||||
{
|
||||
if (!(x == 0) && y % x == 0)
|
||||
{
|
||||
result = y / x;
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
suChinese.append("/");
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = x + y;
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
suChinese.append("+");
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
}
|
||||
}
|
||||
else if (randomoperands == 2)
|
||||
{
|
||||
if (x >= y)
|
||||
{
|
||||
result = x - y;
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
suChinese.append("-");
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = y - x;
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
suChinese.append("-");
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = x + y;
|
||||
suChinese.append(CNUMBERS[x]);
|
||||
suChinese.append("+");
|
||||
suChinese.append(CNUMBERS[y]);
|
||||
}
|
||||
suChinese.append("=?@" + result);
|
||||
return suChinese.toString();
|
||||
}
|
||||
}
|
@ -97,8 +97,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
// 过滤请求
|
||||
.authorizeRequests()
|
||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||
// .antMatchers("/login", "/register", "/captchaImage").anonymous()
|
||||
.antMatchers("/login", "/register", "/captcha/get", "/captcha/check").permitAll()
|
||||
.antMatchers("/login", "/register", "/captchaImage").anonymous()
|
||||
.antMatchers(
|
||||
HttpMethod.GET,
|
||||
"/",
|
||||
@ -111,7 +110,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
.antMatchers("/swagger-ui.html").anonymous()
|
||||
.antMatchers("/swagger-resources/**").anonymous()
|
||||
.antMatchers("/webjars/**").anonymous()
|
||||
.antMatchers("/login", "/captcha/get", "/captcha/check").permitAll()
|
||||
.antMatchers("/*/api-docs").anonymous()
|
||||
.antMatchers("/druid/**").anonymous()
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
|
@ -1,53 +0,0 @@
|
||||
package com.ruoyi.framework.web.service;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import com.anji.captcha.service.CaptchaCacheService;
|
||||
|
||||
/**
|
||||
* 自定义redis验证码缓存实现类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class CaptchaRedisService implements CaptchaCacheService
|
||||
{
|
||||
@Autowired
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
|
||||
@Override
|
||||
public void set(String key, String value, long expiresInSeconds)
|
||||
{
|
||||
stringRedisTemplate.opsForValue().set(key, value, expiresInSeconds, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean exists(String key)
|
||||
{
|
||||
return stringRedisTemplate.hasKey(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String key)
|
||||
{
|
||||
stringRedisTemplate.delete(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String get(String key)
|
||||
{
|
||||
return stringRedisTemplate.opsForValue().get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long increment(String key, long val)
|
||||
{
|
||||
return stringRedisTemplate.opsForValue().increment(key, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String type()
|
||||
{
|
||||
return "redis";
|
||||
}
|
||||
}
|
@ -2,32 +2,32 @@ package com.ruoyi.framework.web.service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.anji.captcha.model.common.ResponseModel;
|
||||
import com.anji.captcha.model.vo.CaptchaVO;
|
||||
import com.anji.captcha.service.CaptchaService;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.exception.user.CaptchaException;
|
||||
import com.ruoyi.common.exception.user.CaptchaExpireException;
|
||||
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.ip.IpUtils;
|
||||
import com.ruoyi.framework.manager.AsyncManager;
|
||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
||||
/**
|
||||
* 登录校验方法
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component
|
||||
@ -39,31 +39,31 @@ public class SysLoginService
|
||||
@Resource
|
||||
private AuthenticationManager authenticationManager;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@Autowired
|
||||
@Lazy
|
||||
private CaptchaService captchaService;
|
||||
private ISysConfigService configService;
|
||||
|
||||
/**
|
||||
* 登录验证
|
||||
*
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param password 密码
|
||||
* @param code 验证码
|
||||
* @param uuid 唯一标识
|
||||
* @return 结果
|
||||
*/
|
||||
public String login(String username, String password, String code)
|
||||
public String login(String username, String password, String code, String uuid)
|
||||
{
|
||||
CaptchaVO captchaVO = new CaptchaVO();
|
||||
captchaVO.setCaptchaVerification(code);
|
||||
ResponseModel response = captchaService.verification(captchaVO);
|
||||
if (!response.isSuccess())
|
||||
boolean captchaOnOff = configService.selectCaptchaOnOff();
|
||||
// 验证码开关
|
||||
if (captchaOnOff)
|
||||
{
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL,
|
||||
MessageUtils.message("user.jcaptcha.error")));
|
||||
throw new CaptchaException();
|
||||
validateCaptcha(username, code, uuid);
|
||||
}
|
||||
// 用户验证
|
||||
Authentication authentication = null;
|
||||
@ -88,10 +88,36 @@ public class SysLoginService
|
||||
}
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
|
||||
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
||||
recordLoginInfo(loginUser.getUserId());
|
||||
// 生成token
|
||||
return tokenService.createToken(loginUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验验证码
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param code 验证码
|
||||
* @param uuid 唯一标识
|
||||
* @return 结果
|
||||
*/
|
||||
public void validateCaptcha(String username, String code, String uuid)
|
||||
{
|
||||
String verifyKey = Constants.CAPTCHA_CODE_KEY + StringUtils.nvl(uuid, "");
|
||||
String captcha = redisCache.getCacheObject(verifyKey);
|
||||
redisCache.deleteObject(verifyKey);
|
||||
if (captcha == null)
|
||||
{
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
|
||||
throw new CaptchaExpireException();
|
||||
}
|
||||
if (!code.equalsIgnoreCase(captcha))
|
||||
{
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
|
||||
throw new CaptchaException();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录登录信息
|
||||
*
|
||||
@ -105,4 +131,4 @@ public class SysLoginService
|
||||
sysUser.setLoginDate(DateUtils.getNowDate());
|
||||
userService.updateUserProfile(sysUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,12 +41,12 @@ public class SysRegisterService
|
||||
{
|
||||
String msg = "", username = registerBody.getUsername(), password = registerBody.getPassword();
|
||||
|
||||
// boolean captchaOnOff = configService.selectCaptchaOnOff();
|
||||
// // 验证码开关
|
||||
// if (captchaOnOff)
|
||||
// {
|
||||
// validateCaptcha(username, registerBody.getCode(), registerBody.getUuid());
|
||||
// }
|
||||
boolean captchaOnOff = configService.selectCaptchaOnOff();
|
||||
// 验证码开关
|
||||
if (captchaOnOff)
|
||||
{
|
||||
validateCaptcha(username, registerBody.getCode(), registerBody.getUuid());
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(username))
|
||||
{
|
||||
@ -56,16 +56,16 @@ public class SysRegisterService
|
||||
{
|
||||
msg = "用户密码不能为空";
|
||||
}
|
||||
// else if (username.length() < UserConstants.USERNAME_MIN_LENGTH
|
||||
// || username.length() > UserConstants.USERNAME_MAX_LENGTH)
|
||||
// {
|
||||
// msg = "账户长度必须在2到20个字符之间";
|
||||
// }
|
||||
// else if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
|
||||
// || password.length() > UserConstants.PASSWORD_MAX_LENGTH)
|
||||
// {
|
||||
// msg = "密码长度必须在5到20个字符之间";
|
||||
// }
|
||||
else if (username.length() < UserConstants.USERNAME_MIN_LENGTH
|
||||
|| username.length() > UserConstants.USERNAME_MAX_LENGTH)
|
||||
{
|
||||
msg = "账户长度必须在2到20个字符之间";
|
||||
}
|
||||
else if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
|
||||
|| password.length() > UserConstants.PASSWORD_MAX_LENGTH)
|
||||
{
|
||||
msg = "密码长度必须在5到20个字符之间";
|
||||
}
|
||||
else if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(username)))
|
||||
{
|
||||
msg = "保存用户'" + username + "'失败,注册账号已存在";
|
||||
@ -89,6 +89,7 @@ public class SysRegisterService
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验验证码
|
||||
*
|
||||
|
@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
dict_type = #{dictType},
|
||||
sort = #{sort},
|
||||
update_by = #{updateBy},
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where column_id = #{columnId}
|
||||
</update>
|
||||
|
@ -164,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="genPath != null and genPath != ''">#{genPath},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -187,7 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="options != null and options != ''">options = #{options},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where table_id = #{tableId}
|
||||
</update>
|
||||
|
@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status !=null">status = #{status},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where job_id = #{jobId}
|
||||
</update>
|
||||
@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
@ -10,9 +10,7 @@ public class AustraliaMiddleEastVO extends SysBaseEntity
|
||||
{
|
||||
private String id;
|
||||
|
||||
private String yearMonth;
|
||||
|
||||
private String month;
|
||||
private LocalDate yearMonth;
|
||||
|
||||
private Double sstAnomalyIndex;
|
||||
|
||||
@ -22,6 +20,10 @@ public class AustraliaMiddleEastVO extends SysBaseEntity
|
||||
|
||||
private Double vaiAnomolies;
|
||||
|
||||
private String createdBy;
|
||||
|
||||
private LocalDate createdTime;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
@ -30,11 +32,11 @@ public class AustraliaMiddleEastVO extends SysBaseEntity
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getYearMonth() {
|
||||
public LocalDate getYearMonth() {
|
||||
return yearMonth;
|
||||
}
|
||||
|
||||
public void setYearMonth(String yearMonth) {
|
||||
public void setYearMonth(LocalDate yearMonth) {
|
||||
this.yearMonth = yearMonth;
|
||||
}
|
||||
|
||||
@ -70,11 +72,19 @@ public class AustraliaMiddleEastVO extends SysBaseEntity
|
||||
this.vaiAnomolies = vaiAnomolies;
|
||||
}
|
||||
|
||||
public String getMonth() {
|
||||
return month;
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setMonth(String month) {
|
||||
this.month = month;
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public LocalDate getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setCreatedTime(LocalDate createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
}
|
||||
|
@ -1,110 +0,0 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/10 10:04
|
||||
*/
|
||||
public class CastsVo
|
||||
{
|
||||
private String date;
|
||||
|
||||
private String week;
|
||||
|
||||
private String dayweather;
|
||||
|
||||
private String nightweather;
|
||||
|
||||
private String daytemp;
|
||||
|
||||
private String nighttemp;
|
||||
|
||||
private String daywind;
|
||||
|
||||
private String nightwind;
|
||||
|
||||
private String daypower;
|
||||
|
||||
private String nightpower;
|
||||
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(String date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public String getWeek() {
|
||||
return week;
|
||||
}
|
||||
|
||||
public void setWeek(String week) {
|
||||
this.week = week;
|
||||
}
|
||||
|
||||
public String getDayweather() {
|
||||
return dayweather;
|
||||
}
|
||||
|
||||
public void setDayweather(String dayweather) {
|
||||
this.dayweather = dayweather;
|
||||
}
|
||||
|
||||
public String getNightweather() {
|
||||
return nightweather;
|
||||
}
|
||||
|
||||
public void setNightweather(String nightweather) {
|
||||
this.nightweather = nightweather;
|
||||
}
|
||||
|
||||
public String getDaytemp() {
|
||||
return daytemp;
|
||||
}
|
||||
|
||||
public void setDaytemp(String daytemp) {
|
||||
this.daytemp = daytemp;
|
||||
}
|
||||
|
||||
public String getNighttemp() {
|
||||
return nighttemp;
|
||||
}
|
||||
|
||||
public void setNighttemp(String nighttemp) {
|
||||
this.nighttemp = nighttemp;
|
||||
}
|
||||
|
||||
public String getDaywind() {
|
||||
return daywind;
|
||||
}
|
||||
|
||||
public void setDaywind(String daywind) {
|
||||
this.daywind = daywind;
|
||||
}
|
||||
|
||||
public String getNightwind() {
|
||||
return nightwind;
|
||||
}
|
||||
|
||||
public void setNightwind(String nightwind) {
|
||||
this.nightwind = nightwind;
|
||||
}
|
||||
|
||||
public String getDaypower() {
|
||||
return daypower;
|
||||
}
|
||||
|
||||
public void setDaypower(String daypower) {
|
||||
this.daypower = daypower;
|
||||
}
|
||||
|
||||
public String getNightpower() {
|
||||
return nightpower;
|
||||
}
|
||||
|
||||
public void setNightpower(String nightpower) {
|
||||
this.nightpower = nightpower;
|
||||
}
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/30 8:50
|
||||
*/
|
||||
//字典表
|
||||
public class Dictionary extends SysBaseEntity
|
||||
{
|
||||
private String codingType;
|
||||
|
||||
private String codingType1;
|
||||
|
||||
private String codingType2;
|
||||
|
||||
private String dictionary;
|
||||
|
||||
private String name;
|
||||
|
||||
private String nameEn;
|
||||
|
||||
public String getCodingType1() {
|
||||
return codingType1;
|
||||
}
|
||||
|
||||
public void setCodingType1(String codingType1) {
|
||||
this.codingType1 = codingType1;
|
||||
}
|
||||
|
||||
public String getCodingType2() {
|
||||
return codingType2;
|
||||
}
|
||||
|
||||
public void setCodingType2(String codingType2) {
|
||||
this.codingType2 = codingType2;
|
||||
}
|
||||
|
||||
public String getCodingType() {
|
||||
return codingType;
|
||||
}
|
||||
|
||||
public void setCodingType(String codingType) {
|
||||
this.codingType = codingType;
|
||||
}
|
||||
|
||||
public String getDictionary() {
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public void setDictionary(String dictionary) {
|
||||
this.dictionary = dictionary;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNameEn() {
|
||||
return nameEn;
|
||||
}
|
||||
|
||||
public void setNameEn(String nameEn) {
|
||||
this.nameEn = nameEn;
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/10 10:02
|
||||
*/
|
||||
public class ForecastVo {
|
||||
|
||||
private String city;
|
||||
|
||||
private String adcode;
|
||||
|
||||
private String province;
|
||||
|
||||
private String reporttime;
|
||||
|
||||
private List<CastsVo> casts;
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getAdcode() {
|
||||
return adcode;
|
||||
}
|
||||
|
||||
public void setAdcode(String adcode) {
|
||||
this.adcode = adcode;
|
||||
}
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getReporttime() {
|
||||
return reporttime;
|
||||
}
|
||||
|
||||
public void setReporttime(String reporttime) {
|
||||
this.reporttime = reporttime;
|
||||
}
|
||||
|
||||
public List<CastsVo> getCasts() {
|
||||
return casts;
|
||||
}
|
||||
|
||||
public void setCasts(List<CastsVo> casts) {
|
||||
this.casts = casts;
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ public class GlobalTypeVO extends SysBaseEntity {
|
||||
|
||||
private Double areaProportion;
|
||||
|
||||
private Double area;
|
||||
private String area;
|
||||
|
||||
private int particularYear;
|
||||
|
||||
@ -51,11 +51,11 @@ public class GlobalTypeVO extends SysBaseEntity {
|
||||
this.areaProportion = areaProportion;
|
||||
}
|
||||
|
||||
public Double getArea() {
|
||||
public String getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(Double area) {
|
||||
public void setArea(String area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
|
@ -1,110 +0,0 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/10 9:57
|
||||
*/
|
||||
public class LivesVo
|
||||
{
|
||||
/**
|
||||
* 省份名
|
||||
*/
|
||||
private String province;
|
||||
/**
|
||||
* 城市名
|
||||
*/
|
||||
private String city;
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
private String adcode;
|
||||
/**
|
||||
*天气现象
|
||||
*/
|
||||
private String weather;
|
||||
|
||||
private String temperature;
|
||||
|
||||
private String winddirection;
|
||||
|
||||
private String windpower;
|
||||
|
||||
private String humidity;
|
||||
|
||||
private LocalDateTime reporttime;
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getAdcode() {
|
||||
return adcode;
|
||||
}
|
||||
|
||||
public void setAdcode(String adcode) {
|
||||
this.adcode = adcode;
|
||||
}
|
||||
|
||||
public String getWeather() {
|
||||
return weather;
|
||||
}
|
||||
|
||||
public void setWeather(String weather) {
|
||||
this.weather = weather;
|
||||
}
|
||||
|
||||
public String getTemperature() {
|
||||
return temperature;
|
||||
}
|
||||
|
||||
public void setTemperature(String temperature) {
|
||||
this.temperature = temperature;
|
||||
}
|
||||
|
||||
public String getWinddirection() {
|
||||
return winddirection;
|
||||
}
|
||||
|
||||
public void setWinddirection(String winddirection) {
|
||||
this.winddirection = winddirection;
|
||||
}
|
||||
|
||||
public String getWindpower() {
|
||||
return windpower;
|
||||
}
|
||||
|
||||
public void setWindpower(String windpower) {
|
||||
this.windpower = windpower;
|
||||
}
|
||||
|
||||
public String getHumidity() {
|
||||
return humidity;
|
||||
}
|
||||
|
||||
public void setHumidity(String humidity) {
|
||||
this.humidity = humidity;
|
||||
}
|
||||
|
||||
public LocalDateTime getReporttime() {
|
||||
return reporttime;
|
||||
}
|
||||
|
||||
public void setReporttime(LocalDateTime reporttime) {
|
||||
this.reporttime = reporttime;
|
||||
}
|
||||
|
||||
}
|
@ -2,7 +2,6 @@ package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
@ -23,11 +22,11 @@ public class RegionVGIVO implements Serializable {
|
||||
|
||||
private Double grassland;
|
||||
|
||||
private String particularYear;
|
||||
private Integer particularYear;
|
||||
|
||||
private String createdBy;
|
||||
|
||||
private LocalDateTime createdTime;
|
||||
private LocalDate createdTime;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
@ -85,11 +84,11 @@ public class RegionVGIVO implements Serializable {
|
||||
this.grassland = grassland;
|
||||
}
|
||||
|
||||
public String getParticularYear() {
|
||||
public Integer getParticularYear() {
|
||||
return particularYear;
|
||||
}
|
||||
|
||||
public void setParticularYear(String particularYear) {
|
||||
public void setParticularYear(Integer particularYear) {
|
||||
this.particularYear = particularYear;
|
||||
}
|
||||
|
||||
@ -101,11 +100,11 @@ public class RegionVGIVO implements Serializable {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedTime() {
|
||||
public LocalDate getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setCreatedTime(LocalDateTime createdTime) {
|
||||
public void setCreatedTime(LocalDate createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
|
@ -11,12 +11,6 @@ public class ThematicMapDomain extends SysBaseEntity {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String pictureCode;
|
||||
|
||||
private String pictureTypeOne;
|
||||
|
||||
private String pictureTypeTwo;
|
||||
|
||||
private String pictureZh;
|
||||
|
||||
private String pictureEn;
|
||||
@ -35,31 +29,6 @@ public class ThematicMapDomain extends SysBaseEntity {
|
||||
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
public String getPictureCode() {
|
||||
return pictureCode;
|
||||
}
|
||||
|
||||
public void setPictureCode(String pictureCode) {
|
||||
this.pictureCode = pictureCode;
|
||||
}
|
||||
|
||||
public String getPictureTypeOne() {
|
||||
return pictureTypeOne;
|
||||
}
|
||||
|
||||
public void setPictureTypeOne(String pictureTypeOne) {
|
||||
this.pictureTypeOne = pictureTypeOne;
|
||||
}
|
||||
|
||||
public String getPictureTypeTwo() {
|
||||
return pictureTypeTwo;
|
||||
}
|
||||
|
||||
public void setPictureTypeTwo(String pictureTypeTwo) {
|
||||
this.pictureTypeTwo = pictureTypeTwo;
|
||||
}
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
@ -120,22 +89,41 @@ public class ThematicMapDomain extends SysBaseEntity {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> 5041f3f92f8e9599661b1a5a5fea0032355755ed
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> 5041f3f92f8e9599661b1a5a5fea0032355755ed
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
>>>>>>> 5041f3f92f8e9599661b1a5a5fea0032355755ed
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> 5041f3f92f8e9599661b1a5a5fea0032355755ed
|
||||
public LocalDateTime getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> 5041f3f92f8e9599661b1a5a5fea0032355755ed
|
||||
public void setCreatedTime(LocalDateTime createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
@ -1,60 +0,0 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/5/24 14:24
|
||||
*/
|
||||
public class UploadFile extends SysBaseEntity
|
||||
{
|
||||
private String id;
|
||||
|
||||
private String fileId;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private String filePath;
|
||||
|
||||
private String fileSize;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getFileId() {
|
||||
return fileId;
|
||||
}
|
||||
|
||||
public void setFileId(String fileId) {
|
||||
this.fileId = fileId;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getFilePath() {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public void setFilePath(String filePath) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
public String getFileSize() {
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public void setFileSize(String fileSize) {
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/10 9:53
|
||||
*/
|
||||
public class WeatherUtilsVO {
|
||||
/**
|
||||
* 接口返回状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 返回结果数量
|
||||
*/
|
||||
private String count;
|
||||
|
||||
private String info;
|
||||
|
||||
private String infocode;
|
||||
/**
|
||||
* 实时天气预报
|
||||
*/
|
||||
private List<LivesVo> lives;
|
||||
/**
|
||||
* 预报天气
|
||||
*/
|
||||
private List<ForecastVo> forecasts;
|
||||
|
||||
// /**
|
||||
// * 预报天气
|
||||
// */
|
||||
// private String forecasts;
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(String count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getInfocode() {
|
||||
return infocode;
|
||||
}
|
||||
|
||||
public void setInfocode(String infocode) {
|
||||
this.infocode = infocode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<ForecastVo> getForecasts() {
|
||||
return forecasts;
|
||||
}
|
||||
|
||||
public void setForecasts(List<ForecastVo> forecasts) {
|
||||
this.forecasts = forecasts;
|
||||
}
|
||||
|
||||
public List<LivesVo> getLives() {
|
||||
return lives;
|
||||
}
|
||||
|
||||
public void setLives(List<LivesVo> lives) {
|
||||
this.lives = lives;
|
||||
}
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.AorestCoverageVO;
|
||||
import com.ruoyi.system.domain_yada.Dictionary;
|
||||
import com.ruoyi.system.domain_yada.UploadFile;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -13,17 +11,9 @@ import java.util.List;
|
||||
*/
|
||||
public interface AorestCoverageMapper {
|
||||
|
||||
List<AorestCoverageVO> selectAorestCoverage(/*@Param("region") String region,
|
||||
@Param("particularYear") String particularYear*/);
|
||||
List<AorestCoverageVO> selectAorestCoverage();
|
||||
|
||||
Integer DelAorestCoverage(@Param("id") String id);
|
||||
|
||||
Integer IntoAorestCoverage(AorestCoverageVO eastVO);
|
||||
|
||||
Integer IntoUpload(UploadFile file);
|
||||
|
||||
List<UploadFile> selectUpload(@Param("fileId") String fileId,@Param("fileName") String fileName);
|
||||
|
||||
List<Dictionary> selectDic(@Param("codingType") String codingType,@Param("codingType1") String codingType1,
|
||||
@Param("codingType2") String codingType2);
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface AustraliaMiddleEastMapper {
|
||||
|
||||
List<AustraliaMiddleEastVO> selectAustralia(@Param("yearMonth") String yearMonth,
|
||||
@Param("month") String month);
|
||||
List<AustraliaMiddleEastVO> selectAustralia();
|
||||
|
||||
Integer DelAustralia(@Param("id") String id);
|
||||
|
||||
|
@ -11,7 +11,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface GlobalTypeMapper {
|
||||
|
||||
List<GlobalTypeVO> selectGlobalType(@Param("typeName") String typeName, @Param("particularYear") Integer particularYear);
|
||||
List<GlobalTypeVO> selectGlobalType();
|
||||
|
||||
Integer DelGlobalType(@Param("id") String id);
|
||||
|
||||
|
@ -4,7 +4,6 @@ import com.ruoyi.system.domain_yada.OceanTemperatureVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -14,7 +13,7 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface OceanTemperatureMapper {
|
||||
|
||||
List<OceanTemperatureVO> selectOcean(@Param("startDate") LocalDate startDate);
|
||||
List<OceanTemperatureVO> selectOcean();
|
||||
|
||||
Integer DelOcean(@Param("id") String id);
|
||||
|
||||
|
@ -11,8 +11,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface RegionVGIMapper {
|
||||
|
||||
List<RegionVGIVO> selectRegion(/*@Param("typeName") String typeName,
|
||||
@Param("particularYear") String particularYear*/);
|
||||
List<RegionVGIVO> selectRegion();
|
||||
|
||||
Integer DelRegion(@Param("id") String id);
|
||||
|
||||
|
@ -3,7 +3,6 @@ package com.ruoyi.system.mapper_yada;
|
||||
import com.ruoyi.system.domain_yada.RegionalSystemVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -12,7 +11,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface RegionalSystemMapper {
|
||||
|
||||
List<RegionalSystemVO> selectRegional(@Param("region") String region);
|
||||
List<RegionalSystemVO> selectRegional();
|
||||
|
||||
Integer DelRegional(@Param("id") String id);
|
||||
|
||||
|
@ -2,10 +2,8 @@ package com.ruoyi.system.mapper_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.ThematicMapDomain;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -17,9 +15,7 @@ public interface ThematicMapMapper {
|
||||
* 获取所有专题图
|
||||
* @return
|
||||
*/
|
||||
List<ThematicMapDomain> selectAllThematicMap(@Param("pictureType") String pictureType,
|
||||
@Param("pictureTypeOne") String pictureTypeOne,
|
||||
@Param("pictureTypeTwo") String pictureTypeTwo);
|
||||
List<ThematicMapDomain> selectAllThematicMap();
|
||||
|
||||
/**
|
||||
* 删除专题图根据编号
|
||||
|
@ -12,8 +12,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface UrbanMapper {
|
||||
|
||||
List<UrbanVO> selectUrban(@Param("name") String name,
|
||||
@Param("particularYear") String particularYear);
|
||||
List<UrbanVO> selectUrban();
|
||||
|
||||
Integer DelUrban(@Param("id") String id);
|
||||
|
||||
|
@ -11,8 +11,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface VegetationCoverageMapper {
|
||||
|
||||
List<VegetationCoverageVO> selectVegetation(/*@Param("region") String region,
|
||||
@Param("particularYear") String particularYear*/);
|
||||
List<VegetationCoverageVO> selectVegetation();
|
||||
|
||||
Integer DelVegetation(@Param("id") String id);
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.system.domain_yada.AorestCoverageVO;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.Dictionary;
|
||||
import com.ruoyi.system.domain_yada.UploadFile;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -16,16 +13,9 @@ import java.util.List;
|
||||
*/
|
||||
public interface IAorestCoverageService {
|
||||
|
||||
public List<AorestCoverageVO> selectAorestCoverage(/*String region,String particularYear*/);
|
||||
public List<AorestCoverageVO> selectAorestCoverage();
|
||||
|
||||
public Integer DelAorestCoverage(String id);
|
||||
public Integer DelAorestCoverage(@Param("id") String id);
|
||||
|
||||
public Integer IntoAorestCoverage(AorestCoverageVO eastVO);
|
||||
|
||||
public Integer IntoUpload(UploadFile file);
|
||||
|
||||
public List<UploadFile> selectUpload(String fileId,String fileName);
|
||||
|
||||
List<Dictionary> selectDic(String codingType,String codingType1,
|
||||
String codingType2);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface IAustraliaMiddleEastService
|
||||
{
|
||||
public List<AustraliaMiddleEastVO> selectAustralia(String yearMonth,String month);
|
||||
public List<AustraliaMiddleEastVO> selectAustralia();
|
||||
|
||||
public Integer DelAustralia(@Param("id") String id);
|
||||
|
||||
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface IGlobalTypeService {
|
||||
|
||||
public List<GlobalTypeVO> selectGlobalType(String typeName, Integer particularYear);
|
||||
public List<GlobalTypeVO> selectGlobalType();
|
||||
|
||||
public Integer DelGlobalType(String id);
|
||||
|
||||
|
@ -4,7 +4,6 @@ import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.OceanTemperatureVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -14,7 +13,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface IOceanTemperatureService {
|
||||
|
||||
public List<OceanTemperatureVO> selectOcean(LocalDate startDate);
|
||||
public List<OceanTemperatureVO> selectOcean();
|
||||
|
||||
public Integer DelOcean(@Param("id") String id);
|
||||
|
||||
|
@ -15,7 +15,7 @@ public interface IRegionVGIService {
|
||||
* 查询
|
||||
* @return
|
||||
*/
|
||||
public List<RegionVGIVO> selectRegion(/*String typeName,String particularYear*/);
|
||||
public List<RegionVGIVO> selectRegion();
|
||||
|
||||
/**
|
||||
* 删除
|
||||
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface IRegionalSystemService {
|
||||
|
||||
public List<RegionalSystemVO> selectRegional(String region);
|
||||
public List<RegionalSystemVO> selectRegional();
|
||||
|
||||
public Integer DelRegional(@Param("id") String id);
|
||||
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface IUrbanService {
|
||||
|
||||
public List<UrbanVO> selectUrban(String name, String particularYear);
|
||||
public List<UrbanVO> selectUrban();
|
||||
|
||||
public Integer DelUrban(@Param("id") String id);
|
||||
|
||||
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface IVegetationCoverageService {
|
||||
|
||||
public List<VegetationCoverageVO> selectVegetation(/*String region,String particularYear*/);
|
||||
public List<VegetationCoverageVO> selectVegetation();
|
||||
|
||||
public Integer DelVegetation(String id);
|
||||
|
||||
|
@ -2,7 +2,6 @@ package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.ThematicMapDomain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -17,7 +16,7 @@ public interface ThematicMapService {
|
||||
* 获取全部专题图
|
||||
* @return
|
||||
*/
|
||||
List<ThematicMapDomain> selectAll(String pictureType,String pictureTypeOne, String pictureTypeTwo);
|
||||
List<ThematicMapDomain> selectAll();
|
||||
|
||||
/**
|
||||
* 删除专题图根据编号
|
||||
|
@ -2,12 +2,9 @@ package com.ruoyi.system.service_yada.impl;
|
||||
|
||||
import com.ruoyi.system.domain_yada.AorestCoverageVO;
|
||||
import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO;
|
||||
import com.ruoyi.system.domain_yada.Dictionary;
|
||||
import com.ruoyi.system.domain_yada.UploadFile;
|
||||
import com.ruoyi.system.mapper_yada.AorestCoverageMapper;
|
||||
import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper;
|
||||
import com.ruoyi.system.service_yada.IAorestCoverageService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -26,8 +23,8 @@ public class AorestCoverageServiceimpl implements IAorestCoverageService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<AorestCoverageVO> selectAorestCoverage(/*String region,String particularYear*/) {
|
||||
return coverageMapper.selectAorestCoverage(/*region,particularYear*/);
|
||||
public List<AorestCoverageVO> selectAorestCoverage() {
|
||||
return coverageMapper.selectAorestCoverage();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -37,22 +34,6 @@ public class AorestCoverageServiceimpl implements IAorestCoverageService {
|
||||
|
||||
@Override
|
||||
public Integer IntoAorestCoverage(AorestCoverageVO eastVO) {
|
||||
return coverageMapper.IntoAorestCoverage(eastVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer IntoUpload(UploadFile file) {
|
||||
return coverageMapper.IntoUpload(file);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UploadFile> selectUpload(String fileId, String fileName) {
|
||||
return coverageMapper.selectUpload(fileId,fileName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Dictionary> selectDic(String codingType,String codingType1,
|
||||
String codingType2) {
|
||||
return coverageMapper.selectDic(codingType,codingType1,codingType2);
|
||||
return IntoAorestCoverage(eastVO);
|
||||
}
|
||||
}
|
||||
|
@ -21,9 +21,9 @@ public class AustraliaMiddleEastServiceimpl implements IAustraliaMiddleEastServi
|
||||
private AustraliaMiddleEastMapper australiaMiddleEastMapper;
|
||||
|
||||
@Override
|
||||
public List<AustraliaMiddleEastVO> selectAustralia(String yearMonth,String month)
|
||||
public List<AustraliaMiddleEastVO> selectAustralia()
|
||||
{
|
||||
return australiaMiddleEastMapper.selectAustralia(yearMonth,month);
|
||||
return australiaMiddleEastMapper.selectAustralia();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,8 +5,6 @@ import com.ruoyi.system.domain_yada.GlobalTypeVO;
|
||||
import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper;
|
||||
import com.ruoyi.system.mapper_yada.GlobalTypeMapper;
|
||||
import com.ruoyi.system.service_yada.IGlobalTypeService;
|
||||
import org.apache.commons.compress.archivers.dump.DumpArchiveEntry;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -26,8 +24,8 @@ public class GlobalTypeServiceimpl implements IGlobalTypeService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<GlobalTypeVO> selectGlobalType(String typeName, Integer particularYear) {
|
||||
return typeMapper.selectGlobalType(typeName, particularYear);
|
||||
public List<GlobalTypeVO> selectGlobalType() {
|
||||
return typeMapper.selectGlobalType();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -25,8 +24,8 @@ public class OceanTemperatureServiceimpl implements IOceanTemperatureService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<OceanTemperatureVO> selectOcean(LocalDate startDate) {
|
||||
return oceanMapper.selectOcean(startDate);
|
||||
public List<OceanTemperatureVO> selectOcean() {
|
||||
return oceanMapper.selectOcean();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3,7 +3,6 @@ package com.ruoyi.system.service_yada.impl;
|
||||
import com.ruoyi.system.mapper_yada.RegionVGIMapper;
|
||||
import com.ruoyi.system.service_yada.IRegionVGIService;
|
||||
import com.ruoyi.system.domain_yada.RegionVGIVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -22,8 +21,8 @@ public class RegionVGIServiceimpl implements IRegionVGIService {
|
||||
private RegionVGIMapper vgiMapper;
|
||||
|
||||
@Override
|
||||
public List<RegionVGIVO> selectRegion(/*String typeName,String particularYear*/) {
|
||||
return vgiMapper.selectRegion(/*typeName,particularYear*/);
|
||||
public List<RegionVGIVO> selectRegion() {
|
||||
return vgiMapper.selectRegion();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,7 +5,6 @@ import com.ruoyi.system.domain_yada.RegionalSystemVO;
|
||||
import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper;
|
||||
import com.ruoyi.system.mapper_yada.RegionalSystemMapper;
|
||||
import com.ruoyi.system.service_yada.IRegionalSystemService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -25,8 +24,8 @@ public class RegionalSystemServiceimpl implements IRegionalSystemService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<RegionalSystemVO> selectRegional(String region) {
|
||||
return Regional.selectRegional(region);
|
||||
public List<RegionalSystemVO> selectRegional() {
|
||||
return Regional.selectRegional();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3,11 +3,9 @@ package com.ruoyi.system.service_yada.impl;
|
||||
import com.ruoyi.system.domain_yada.ThematicMapDomain;
|
||||
import com.ruoyi.system.mapper_yada.ThematicMapMapper;
|
||||
import com.ruoyi.system.service_yada.ThematicMapService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -25,8 +23,8 @@ public class ThematicMapServiceImpl implements ThematicMapService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ThematicMapDomain> selectAll(String pictureType,String pictureTypeOne, String pictureTypeTwo){
|
||||
return thematicMapMapper.selectAllThematicMap(pictureType,pictureTypeOne,pictureTypeTwo);
|
||||
public List<ThematicMapDomain> selectAll(){
|
||||
return thematicMapMapper.selectAllThematicMap();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,7 +4,6 @@ import com.ruoyi.system.domain_yada.UrbanVO;
|
||||
import com.ruoyi.system.mapper_yada.AorestCoverageMapper;
|
||||
import com.ruoyi.system.mapper_yada.UrbanMapper;
|
||||
import com.ruoyi.system.service_yada.IUrbanService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -24,8 +23,8 @@ public class UrbanServiceimpl implements IUrbanService {
|
||||
|
||||
@Override
|
||||
|
||||
public List<UrbanVO> selectUrban(String name, String particularYear) {
|
||||
return urbanMapper.selectUrban(name,particularYear);
|
||||
public List<UrbanVO> selectUrban() {
|
||||
return urbanMapper.selectUrban();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,7 +5,6 @@ import com.ruoyi.system.domain_yada.VegetationCoverageVO;
|
||||
import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper;
|
||||
import com.ruoyi.system.mapper_yada.VegetationCoverageMapper;
|
||||
import com.ruoyi.system.service_yada.IVegetationCoverageService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -26,8 +25,8 @@ public class VegetationCoverageServiceimpl implements IVegetationCoverageService
|
||||
|
||||
|
||||
@Override
|
||||
public List<VegetationCoverageVO> selectVegetation(/*String region,String particularYear*/) {
|
||||
return coverageMapper.selectVegetation(/*region,particularYear*/);
|
||||
public List<VegetationCoverageVO> selectVegetation() {
|
||||
return coverageMapper.selectVegetation();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,6 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<mapper namespace="com.ruoyi.system.mapper_yada.AorestCoverageMapper">
|
||||
|
||||
<resultMap id="RM_AorestCoverage" type="com.ruoyi.system.domain_yada.AorestCoverageVO">
|
||||
|
||||
<result property="id" column="id"/>
|
||||
<result property="particularYear" column="particular_year"/>
|
||||
<result property="region" column="region"/>
|
||||
@ -24,14 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<select id="selectAorestCoverage" resultMap="RM_AorestCoverage">
|
||||
SELECT <include refid="columns"/> FROM forest_coverage
|
||||
<!-- WHERE 1=1-->
|
||||
<!-- <if test="particularYear!= null and particularYear !=''">-->
|
||||
<!-- AND particular_year = #{particularYear}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="region!= null and region !=''">-->
|
||||
<!-- AND region = #{typeName}-->
|
||||
<!-- </if>-->
|
||||
SELECT <include refid="columns"/> FROM forest_coverage;
|
||||
</select>
|
||||
|
||||
<delete id="DelAorestCoverage">
|
||||
@ -42,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="IntoAorestCoverage">
|
||||
<![CDATA[
|
||||
INSERT INTO forest_coverage (
|
||||
id ,
|
||||
particular_year ,
|
||||
region ,
|
||||
region_en ,
|
||||
@ -49,98 +44,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
non_protected_lands ,
|
||||
mountain,
|
||||
non_mountain,
|
||||
created_by,
|
||||
created_by ,
|
||||
created_time
|
||||
) VALUES (
|
||||
#{id,jdbcType=VARCHAR},
|
||||
#{particularYear,jdbcType=VARCHAR},
|
||||
#{region,jdbcType=VARCHAR},
|
||||
#{regionEn,jdbcType=VARCHAR},
|
||||
#{protectedLands,jdbcType=DOUBLE},
|
||||
#{nonProtectedLands,jdbcType=DOUBLE},
|
||||
#{nonProtectedLand,jdbcType=DOUBLE},
|
||||
#{mountain,jdbcType=DOUBLE},
|
||||
#{nonMountain,jdbcType=DOUBLE},
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}
|
||||
#{createTime,jdbcType=DATE}
|
||||
)
|
||||
]]>
|
||||
</insert>
|
||||
|
||||
<resultMap id="RM_Upload" type="com.ruoyi.system.domain_yada.UploadFile">
|
||||
<result property="id" column="id"/>
|
||||
<result property="fileId" column="file_id"/>
|
||||
<result property="fileName" column="file_name"/>
|
||||
<result property="fileSize" column="file_size"/>
|
||||
<result property="filePath" column="file_path"/>
|
||||
<result property="createBy" column="created_by"/>
|
||||
<result property="createTime" column="created_time"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="IntoUpload">
|
||||
<![CDATA[
|
||||
INSERT INTO sys_file_info (
|
||||
id ,
|
||||
file_id ,
|
||||
file_name ,
|
||||
file_size ,
|
||||
file_path ,
|
||||
created_by,
|
||||
created_time
|
||||
) VALUES (
|
||||
#{id,jdbcType=VARCHAR},
|
||||
#{fileId,jdbcType=VARCHAR},
|
||||
#{fileName,jdbcType=VARCHAR},
|
||||
#{fileSize,jdbcType=VARCHAR},
|
||||
#{filePath,jdbcType=VARCHAR},
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
]]>
|
||||
</insert>
|
||||
|
||||
<select id="selectUpload" resultMap="RM_Upload">
|
||||
SELECT file_id,file_name,file_size,file_path,created_by,created_time FROM sys_file_info
|
||||
WHERE 1=1
|
||||
<if test="fileId!= null and fileId !=''">
|
||||
AND fileId = #{fileId}
|
||||
</if>
|
||||
<if test="fileName!= null and fileName !=''">
|
||||
AND file_name = #{fileName}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<resultMap id="RM_Dictionary" type="com.ruoyi.system.domain_yada.Dictionary">
|
||||
<result property="codingType" column="coding_type"/>
|
||||
<result property="codingType1" column="codingType1"/>
|
||||
<result property="codingType2" column="codingType2"/>
|
||||
<result property="dictionary" column="dictionary"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="nameEn" column="name_en"/>
|
||||
<result property="createBy" column="created_by"/>
|
||||
<result property="createTime" column="created_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="columnsdic">
|
||||
<![CDATA[
|
||||
coding_type,dictionary,name,name_En,created_by,created_time
|
||||
]]>
|
||||
</sql>
|
||||
|
||||
<select id="selectDic" resultMap="RM_Dictionary">
|
||||
select <include refid="columnsdic"/> from dictionary
|
||||
where dictionary in
|
||||
(SELECT A.dictionary FROM dictionary a
|
||||
join (select dictionary from dictionary
|
||||
where 1=1
|
||||
<if test="codingType!= null and codingType !=''">
|
||||
AND coding_type = #{codingType}
|
||||
</if>
|
||||
<if test="codingType1!= null and codingType1 !=''">
|
||||
AND dictionary = #{codingType1}
|
||||
</if>
|
||||
) b on a.coding_type=b.dictionary
|
||||
<if test="codingType2!= null and codingType2 !=''">
|
||||
AND a.dictionary = #{codingType2}
|
||||
</if>
|
||||
)
|
||||
</select>
|
||||
</mapper>
|
@ -5,33 +5,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<mapper namespace="com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper">
|
||||
<resultMap id="RM_AustraliaMiddleEast" type="com.ruoyi.system.domain_yada.AustraliaMiddleEastVO">
|
||||
|
||||
<result property="yearMonth" column="particular_month"/>
|
||||
<result property="month" column="month"/>
|
||||
<result property="yearMonth" column="year_month"/>
|
||||
<result property="id" column="ID"/>
|
||||
<result property="sstAnomalyIndex" column="sst_anomaly_index"/>
|
||||
<result property="temperatureAnomolies" column="temperature_anomolies"/>
|
||||
<result property="precipitationAnomolies" column="precipitation_anomolies"/>
|
||||
<result property="vaiAnomolies" column="vai_anomolies"/>
|
||||
<result property="createBy" column="created_by"/>
|
||||
<result property="createTime" column="created_time"/>
|
||||
<result property="createdBy" column="created_by"/>
|
||||
<result property="createdTime" column="created_time"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="columns">
|
||||
<![CDATA[
|
||||
ID,particular_month,sst_anomaly_index,temperature_anomolies,precipitation_anomolies,vai_anomolies,created_by,created_time,month
|
||||
ID,year_month,sst_anomaly_index,temperature_anomolies,precipitation_anomolies,vai_anomolies,created_by,created_time
|
||||
]]>
|
||||
</sql>
|
||||
|
||||
<select id="selectAustralia" resultMap="RM_AustraliaMiddleEast">
|
||||
SELECT <include refid="columns"/> FROM central_and_eastern_australia
|
||||
WHERE 1=1
|
||||
<if test="yearMonth!= null and yearMonth !=''">
|
||||
AND particular_month = #{yearMonth}
|
||||
</if>
|
||||
<if test="month!= null and month !=''">
|
||||
AND month = #{month}
|
||||
</if>
|
||||
SELECT <include refid="columns"/> FROM central_and_eastern_australia;
|
||||
</select>
|
||||
|
||||
<delete id="DelAustralia">
|
||||
@ -42,8 +34,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="IntoAustralia">
|
||||
<![CDATA[
|
||||
INSERT INTO central_and_eastern_australia (
|
||||
particular_month ,
|
||||
month,
|
||||
ID ,
|
||||
year_month ,
|
||||
sst_anomaly_index ,
|
||||
temperature_anomolies ,
|
||||
precipitation_anomolies ,
|
||||
@ -51,14 +43,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
created_by ,
|
||||
created_time
|
||||
) VALUES (
|
||||
#{yearMonth,jdbcType=VARCHAR},
|
||||
#{month,jdbcType=VARCHAR},
|
||||
#{id,jdbcType=VARCHAR},
|
||||
#{yearMonth,jdbcType=DATE},
|
||||
#{sstAnomalyIndex,jdbcType=DOUBLE},
|
||||
#{temperatureAnomolies,jdbcType=DOUBLE},
|
||||
#{precipitationAnomolies,jdbcType=DOUBLE},
|
||||
#{vaiAnomolies,jdbcType=DOUBLE},
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
#{createdTime,jdbcType=DATE}
|
||||
)
|
||||
]]>
|
||||
</insert>
|
||||
|
@ -21,15 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
id,particular_year,type_name,type_name_en,area_proportion,area,created_by,created_time
|
||||
]]>
|
||||
</sql>
|
||||
|
||||
<select id="selectGlobalType" resultMap="RM_GlobalType">
|
||||
SELECT <include refid="columns"/> FROM proportion_of_global_types
|
||||
WHERE 1=1
|
||||
<if test="particularYear!= null and particularYear !=''">
|
||||
AND particular_year = #{particularYear}
|
||||
</if>
|
||||
<if test="typeName!= null and typeName !=''">
|
||||
AND type_name = #{typeName}
|
||||
</if>
|
||||
SELECT <include refid="columns"/> FROM proportion_of_global_types;
|
||||
</select>
|
||||
|
||||
<delete id="DelGlobalType">
|
||||
|
@ -23,11 +23,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectOcean" resultMap="RM_Ocean">
|
||||
SELECT <include refid="columns"/> FROM sea_surface_temperature_anomaly
|
||||
WHERE 1=1
|
||||
<if test="startDate!= null and startDate !=''">
|
||||
AND startDate > #{startDate}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<delete id="DelOcean">
|
||||
|
@ -25,16 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<select id="selectRegion" resultMap="RM_RegionVGI">
|
||||
SELECT <include refid="columns"/> FROM region_vgi
|
||||
where particular_year='2020.0'
|
||||
|
||||
<!-- WHERE 1=1-->
|
||||
<!-- <if test="particularYear!= null and particularYear !=''">-->
|
||||
<!-- AND particular_year = #{particularYear}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="typeName!= null and typeName !=''">-->
|
||||
<!-- AND type_name = #{typeName}-->
|
||||
<!-- </if>-->
|
||||
SELECT <include refid="columns"/> FROM region_vgi;
|
||||
</select>
|
||||
|
||||
<delete id="DelRegion">
|
||||
@ -59,9 +50,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
) VALUES (
|
||||
#{id,jdbcType=VARCHAR},
|
||||
#{region,jdbcType=VARCHAR},
|
||||
#{regionEn,jdbcType=VARCHAR},
|
||||
#{typeName,jdbcType=VARCHAR},
|
||||
#{typeNameEn,jdbcType=TIMESTAMP},
|
||||
#{region_en,jdbcType=VARCHAR},
|
||||
#{type_name,jdbcType=VARCHAR},
|
||||
#{type_name_en,jdbcType=TIMESTAMP},
|
||||
#{forest,jdbcType=DOUBLE},
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
#{createdTime,jdbcType=DATE},
|
||||
|
@ -19,16 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="columns">
|
||||
<![CDATA[
|
||||
id,region,region_en,type_conversion,type_conversion_en,proportion_of_changed_areas,particular_year,created_by,created_time
|
||||
id,region,region_en,type_conversion,type_conversion_en,proportion_of_changed_areas,particular_year,createBy,createTime
|
||||
]]>
|
||||
</sql>
|
||||
|
||||
<select id="selectRegional" resultMap="RM_Regional">
|
||||
SELECT <include refid="columns"/> FROM proportion_of_ecosystem_type_transfer
|
||||
WHERE 1=1
|
||||
<if test="region!= null and region !=''">
|
||||
AND region = #{region}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="DelRegional">
|
||||
@ -39,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="IntoRegional">
|
||||
<![CDATA[
|
||||
INSERT INTO proportion_of_ecosystem_type_transfer (
|
||||
id ,
|
||||
region ,
|
||||
region_en ,
|
||||
type_conversion ,
|
||||
@ -48,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
created_by ,
|
||||
created_time
|
||||
) VALUES (
|
||||
#{id,jdbcType=VARCHAR},
|
||||
#{region,jdbcType=VARCHAR},
|
||||
#{regionEn,jdbcType=VARCHAR},
|
||||
#{typeConversion,jdbcType=VARCHAR},
|
||||
@ -55,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{proportionOfChangedAreas,jdbcType=DOUBLE},
|
||||
#{particularYear,jdbcType=VARCHAR},
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}
|
||||
#{createTime,jdbcType=DATE}
|
||||
)
|
||||
]]>
|
||||
</insert>
|
||||
|
@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="configType != null and configType != ''">#{configType},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="configType != null and configType != ''">config_type = #{configType},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where config_id = #{configId}
|
||||
</update>
|
||||
|
@ -109,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="email != null">email = #{email},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dept_id = #{deptId}
|
||||
</update>
|
||||
|
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dict_code = #{dictCode}
|
||||
</update>
|
||||
@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dict_id = #{dictId}
|
||||
</update>
|
||||
@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<insert id="insertLogininfor" parameterType="SysLogininfor">
|
||||
insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
|
||||
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, current_timestamp)
|
||||
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
|
||||
</insert>
|
||||
|
||||
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
|
||||
|
@ -28,7 +28,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMenuVo">
|
||||
select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, nullif(perms,'') as perms, icon, create_time
|
||||
select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
|
||||
from sys_menu
|
||||
</sql>
|
||||
|
||||
@ -49,13 +49,13 @@
|
||||
</select>
|
||||
|
||||
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, nullif(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, nullif (m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
@ -74,7 +74,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, nullif(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
@ -143,7 +143,7 @@
|
||||
<if test="icon !=null and icon != ''">icon = #{icon},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where menu_id = #{menuId}
|
||||
</update>
|
||||
@ -184,7 +184,7 @@
|
||||
<if test="icon != null and icon != ''">#{icon},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null and status != ''">#{status}, </if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="noticeContent != null">notice_content = #{noticeContent}, </if>
|
||||
<if test="status != null and status != ''">status = #{status}, </if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where notice_id = #{noticeId}
|
||||
</update>
|
||||
|
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<insert id="insertOperlog" parameterType="SysOperLog">
|
||||
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time)
|
||||
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, current_timestamp)
|
||||
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate())
|
||||
</insert>
|
||||
|
||||
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
|
||||
|
@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where post_id = #{postId}
|
||||
</update>
|
||||
@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where role_id = #{roleId}
|
||||
</update>
|
||||
|
@ -170,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
current_timestamp
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -190,7 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = current_timestamp
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
@ -6,14 +6,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<resultMap id="RM_ThematicMap" type="com.ruoyi.system.domain_yada.ThematicMapDomain">
|
||||
<result property="id" column="id"/>
|
||||
<result property="pictureZh" column="picture_zh"/>
|
||||
<result property="pictureCode" column="picture_code"/>
|
||||
<result property="pictureTypeOne" column="picture_type_one"/>
|
||||
<result property="pictureTypeTwo" column="picture_type_two"/>
|
||||
<result property="pictureEn" column="picture_en"/>
|
||||
<result property="pictureName" column="picture_name"/>
|
||||
<result property="pictureType" column="picture_type"/>
|
||||
<result property="pictureTime" column="picture_time"/>
|
||||
<result property="picturePath" column="picture_path"/>
|
||||
<result property="pictureTime" column="picture_time"/>
|
||||
<result property="remarks" column="remarks"/>
|
||||
<result property="createdBy" column="created_by"/>
|
||||
<result property="createdTime" column="created_time"/>
|
||||
@ -21,22 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="columns">
|
||||
<![CDATA[
|
||||
id,picture_zh,picture_code,picture_type_one,picture_type_two,picture_en,picture_name,picture_type,picture_time,picture_path,picture_time,remarks,created_by,created_time
|
||||
id,picture_zh,picture_en,picture_name,picture_type,picture_time,picture_path,picture_time,remarks,created_by,created_time
|
||||
]]>
|
||||
</sql>
|
||||
|
||||
<select id="selectAllThematicMap" resultMap="RM_ThematicMap">
|
||||
SELECT <include refid="columns"/> FROM thematic_map
|
||||
WHERE 1=1
|
||||
<if test="pictureType!= null and pictureType !=''">
|
||||
AND picture_type = #{pictureType}
|
||||
</if>
|
||||
<if test="pictureTypeOne!= null and pictureTypeOne !=''">
|
||||
AND picture_type_one = #{pictureTypeOne}
|
||||
</if>
|
||||
<if test="pictureTypeTwo!= null and pictureTypeTwo !=''">
|
||||
AND picture_type_two = #{pictureTypeTwo}
|
||||
</if>
|
||||
SELECT <include refid="columns"/> FROM thematic_map;
|
||||
</select>
|
||||
|
||||
<delete id="deleteThematicMap">
|
||||
@ -52,9 +40,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
picture_en ,
|
||||
picture_name ,
|
||||
picture_type ,
|
||||
picture_type_one,
|
||||
picture_type_two,
|
||||
picture_code,
|
||||
picture_time ,
|
||||
picture_path,
|
||||
remarks,
|
||||
@ -66,9 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{pictureEn,jdbcType=VARCHAR}},
|
||||
#{pictureName,jdbcType=VARCHAR}},
|
||||
#{pictureType,jdbcType=VARCHAR}},
|
||||
#{pictureTypeOne,jdbcType=VARCHAR}},
|
||||
#{pictureTypeTwo,jdbcType=VARCHAR}},
|
||||
#{pictureCode,jdbcType=VARCHAR}},
|
||||
#{pictureTime,jdbcType=TIMESTAMP},
|
||||
#{picturePath,jdbcType=VARCHAR},
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
|
@ -23,13 +23,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectUrban" resultMap="RM_Urban">
|
||||
SELECT <include refid="columns"/> FROM urban_agglomeration_china
|
||||
WHERE 1=1
|
||||
<if test="particularYear!= null and particularYear !=''">
|
||||
AND particular_year = #{particularYear}
|
||||
</if>
|
||||
<if test="name!= null and name !=''">
|
||||
AND name = #{name}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="DelUrban">
|
||||
|
@ -25,13 +25,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectVegetation" resultMap="RM_Vegetation">
|
||||
SELECT <include refid="columns"/> FROM fvc_npp
|
||||
<!-- WHERE 1=1-->
|
||||
<!-- <if test="particularYear!= null and particularYear !=''">-->
|
||||
<!-- AND particular_year = #{particularYear}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="region != null and region !=''">-->
|
||||
<!-- AND region = #{region}-->
|
||||
<!-- </if>-->
|
||||
</select>
|
||||
|
||||
<delete id="DelVegetation">
|
||||
@ -42,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="IntoVegetation">
|
||||
<![CDATA[
|
||||
INSERT INTO fvc_npp (
|
||||
id ,
|
||||
particular_year ,
|
||||
region ,
|
||||
region_en ,
|
||||
@ -52,11 +46,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
created_by ,
|
||||
created_time
|
||||
) VALUES (
|
||||
#{id,jdbcType=VARCHAR},
|
||||
#{particularYear,jdbcType=VARCHAR},
|
||||
#{region,jdbcType=VARCHAR},
|
||||
#{regionEn,jdbcType=VARCHAR},
|
||||
#{protectedLands,jdbcType=DOUBLE},
|
||||
#{nonProtectedLands,jdbcType=DOUBLE},
|
||||
#{nonProtectedLand,jdbcType=DOUBLE},
|
||||
#{mountain,jdbcType=DOUBLE},
|
||||
#{nonMountain,jdbcType=DOUBLE},
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
|
@ -8,8 +8,7 @@ export default {
|
||||
components: { iFrame },
|
||||
data() {
|
||||
return {
|
||||
// url: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html"
|
||||
url: process.env.VUE_APP_BASE_API + "/doc.html"
|
||||
url: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html"
|
||||
};
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user