From 2de946adb8ad519c71cf6024ccd92dab25ba8623 Mon Sep 17 00:00:00 2001 From: songjinsheng Date: Wed, 8 Jun 2022 17:18:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=84=E4=B8=AA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=A8=E6=95=B0=E6=8D=AE=E4=B8=8A=E5=BA=8A=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E5=88=87=E6=8D=A2=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/pom.xml | 28 +- .../controller/yada/SpecialController.java | 302 ++++++++++++++++++ .../yada/SpecialReportController.java | 7 - .../src/main/resources/application-druid.yml | 21 +- .../mapper/generator/GenTableColumnMapper.xml | 4 +- .../mapper/generator/GenTableMapper.xml | 4 +- .../mapper/quartz/SysJobLogMapper.xml | 2 +- .../resources/mapper/quartz/SysJobMapper.xml | 4 +- .../domain_yada/AustraliaMiddleEastVO.java | 15 +- .../ruoyi/system/domain_yada/RegionVGIVO.java | 6 +- .../mapper/system/AorestCoverageMapper.xml | 5 +- .../system/AustraliaMiddleEastMapper.xml | 9 +- .../mapper/system/RegionVGIMapper.xml | 6 +- .../mapper/system/RegionalSystemMapper.xml | 4 +- .../mapper/system/SysConfigMapper.xml | 4 +- .../resources/mapper/system/SysDeptMapper.xml | 4 +- .../mapper/system/SysDictDataMapper.xml | 4 +- .../mapper/system/SysDictTypeMapper.xml | 4 +- .../resources/mapper/system/SysMenuMapper.xml | 12 +- .../mapper/system/SysNoticeMapper.xml | 4 +- .../mapper/system/SysOperLogMapper.xml | 2 +- .../resources/mapper/system/SysPostMapper.xml | 4 +- .../resources/mapper/system/SysRoleMapper.xml | 4 +- .../resources/mapper/system/SysUserMapper.xml | 4 +- .../system/VegetationCoverageMapper.xml | 4 +- 25 files changed, 397 insertions(+), 70 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialController.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialReportController.java diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 4f8dd03b3..5f4c2efef 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -17,7 +17,27 @@ - + + + org.apache.poi + + poi + + 4.0.1 + + + + + + org.apache.poi + + poi-ooxml + + 4.0.1 + + + + org.springframework.boot spring-boot-devtools @@ -42,6 +62,12 @@ knife4j-spring-boot-starter 3.0.3 + + + org.postgresql + postgresql + 42.2.20 + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialController.java new file mode 100644 index 000000000..aee5ccccb --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialController.java @@ -0,0 +1,302 @@ +package com.ruoyi.web.controller.yada; + +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.system.domain_yada.*; +import com.ruoyi.system.service_yada.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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 javax.annotation.Resource; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +@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 value = saveExcel(file); + + return IntoRegion(value); + } + + /** + * 森林覆盖率模板导入 + */ + @RequestMapping(value = "/helpExcelAorest") + private AjaxResult helpExcelAorest(@RequestBody MultipartFile file) { + List value = saveExcelAorest(file); + + return IntoAorestCoverage(value); + } + + /** + *平均植被覆盖度和净初级生产力 + */ + @RequestMapping(value = "/helpExcelnpp") + private AjaxResult helpExcelnpp(@RequestBody MultipartFile file) { + List value = saveExcelnpp(file); + + return IntoVegetation(value); + } + + /** + * 澳大利亚中部地区模板导入 + */ + @RequestMapping(value = "/helpExcelAus") + private AjaxResult helpExcelAus(@RequestBody MultipartFile file) { + List value = saveExcelAus(file); + + return IntoAustralia(value); + } + + /** + * 区域生态系统类型转移 + */ + @RequestMapping(value = "/helpExcelRegion") + private AjaxResult helpExcelRegion(@RequestBody MultipartFile file) { + List value = saveExcelRegion(file); + + return IntoRegional(value); + } + + public AjaxResult IntoRegional(List 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 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 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 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 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 saveExcel(MultipartFile file) { + + try { + List 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 saveExcelAus(MultipartFile file) { + + try { + List 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(Double.parseDouble(row.getCell(0).toString())); + value.setMonth(Double.parseDouble(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 saveExcelAorest(MultipartFile file) { + + try { + List 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 saveExcelnpp(MultipartFile file) { + + try { + List 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 saveExcelRegion(MultipartFile file) { + + try { + List 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; + } + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialReportController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialReportController.java deleted file mode 100644 index 51c3468b7..000000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialReportController.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.ruoyi.web.controller.yada; - -/** - * 专题报告 - */ -public class SpecialReportController { -} diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 9d18a7d5c..31dfb10a3 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -2,14 +2,16 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource - driverClassName: com.mysql.cj.jdbc.Driver +# driverClassName: com.mysql.cj.jdbc.Driver + driver-class-name: org.postgresql.Driver druid: - # 主库数据源 master: -# url: jdbc:mysql://192.168.2.9:3306/nuoyi?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - url: jdbc:mysql://192.168.2.9:3306/nuoyi?AllowPublicKeyRetrieval=True&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai - username: saas - password: XKrs123. + url: jdbc:postgresql://192.168.2.9:5432/yada?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai + username: sjs + password: song5325 +# url: jdbc:mysql://192.168.2.9:3306/nuoyi?AllowPublicKeyRetrieval=True&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai +# username: saas +# password: XKrs123. # 从库数据源 slave: # 从数据源开关/默认关闭 @@ -31,8 +33,9 @@ spring: minEvictableIdleTimeMillis: 300000 # 配置一个连接在池中最大生存的时间,单位是毫秒 maxEvictableIdleTimeMillis: 900000 - # 配置检测连接是否有效 - validationQuery: SELECT 1 FROM DUAL + # 配置检测连接是否有效select * from pg_stat_activity +# validationQuery: SELECT 1 FROM DUAL + validationQuery: SELECT version() testWhileIdle: true testOnBorrow: false testOnReturn: false @@ -55,4 +58,4 @@ spring: merge-sql: true wall: config: - multi-statement-allow: true \ No newline at end of file + multi-statement-allow: true diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml index 0bf0eea90..6ff3ef6f7 100644 --- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml +++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml @@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{dictType}, #{sort}, #{createBy}, - sysdate() + current_timestamp ) @@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dict_type = #{dictType}, sort = #{sort}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where column_id = #{columnId} diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml index a5d014543..e99b74f32 100644 --- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml +++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml @@ -164,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{genPath}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) @@ -187,7 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" options = #{options}, update_by = #{updateBy}, remark = #{remark}, - update_time = sysdate() + update_time = current_timestamp where table_id = #{tableId} diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml index 588d17705..32966a1ca 100644 --- a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml +++ b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml @@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{jobMessage}, #{status}, #{exceptionInfo}, - sysdate() + current_timestamp ) diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml index 69233bdf7..15399c8ec 100644 --- a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml +++ b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml @@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where job_id = #{jobId} @@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/AustraliaMiddleEastVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/AustraliaMiddleEastVO.java index e6e977f40..468819bd1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/AustraliaMiddleEastVO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/AustraliaMiddleEastVO.java @@ -10,7 +10,9 @@ public class AustraliaMiddleEastVO extends SysBaseEntity { private String id; - private LocalDate yearMonth; + private Double yearMonth; + + private Double month; private Double sstAnomalyIndex; @@ -28,11 +30,11 @@ public class AustraliaMiddleEastVO extends SysBaseEntity this.id = id; } - public LocalDate getYearMonth() { + public Double getYearMonth() { return yearMonth; } - public void setYearMonth(LocalDate yearMonth) { + public void setYearMonth(Double yearMonth) { this.yearMonth = yearMonth; } @@ -68,4 +70,11 @@ public class AustraliaMiddleEastVO extends SysBaseEntity this.vaiAnomolies = vaiAnomolies; } + public Double getMonth() { + return month; + } + + public void setMonth(Double month) { + this.month = month; + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/RegionVGIVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/RegionVGIVO.java index c46577ce9..41601576b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/RegionVGIVO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/RegionVGIVO.java @@ -23,7 +23,7 @@ public class RegionVGIVO implements Serializable { private Double grassland; - private Integer particularYear; + private String particularYear; private String createdBy; @@ -85,11 +85,11 @@ public class RegionVGIVO implements Serializable { this.grassland = grassland; } - public Integer getParticularYear() { + public String getParticularYear() { return particularYear; } - public void setParticularYear(Integer particularYear) { + public void setParticularYear(String particularYear) { this.particularYear = particularYear; } diff --git a/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml index ee9470fb8..b8813301a 100644 --- a/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml @@ -5,7 +5,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - @@ -36,7 +35,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -18,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -34,8 +35,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml index b1570e289..d14d1b9e7 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml @@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{configType}, #{createBy}, #{remark}, - sysdate() + current_timestamp ) @@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" config_type = #{configType}, update_by = #{updateBy}, remark = #{remark}, - update_time = sysdate() + update_time = current_timestamp where config_id = #{configId} diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 984f89ccc..6a563e85e 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -109,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{email}, #{status}, #{createBy}, - sysdate() + current_timestamp ) @@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" email = #{email}, status = #{status}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where dept_id = #{deptId} diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml index 75d80a157..f7b5d5d68 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml @@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where dict_code = #{dictCode} @@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml index 2b44b2eee..6d65a7921 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml @@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where dict_id = #{dictId} @@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml index f11402c7f..8b31b47b8 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -28,7 +28,7 @@ - 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 + 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 from sys_menu @@ -49,13 +49,13 @@ diff --git a/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml index 2425ae058..8b73469a3 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml @@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where post_id = #{postId} @@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index a8d3ede58..2a34ceef1 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + current_timestamp ) @@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate() + update_time = current_timestamp where role_id = #{roleId} diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 16a64c2a3..df55eda3d 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -170,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{createBy}, #{remark}, - sysdate() + current_timestamp ) @@ -190,7 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" login_date = #{loginDate}, update_by = #{updateBy}, remark = #{remark}, - update_time = sysdate() + update_time = current_timestamp where user_id = #{userId} diff --git a/ruoyi-system/src/main/resources/mapper/system/VegetationCoverageMapper.xml b/ruoyi-system/src/main/resources/mapper/system/VegetationCoverageMapper.xml index 24e0e6b33..df3dd9245 100644 --- a/ruoyi-system/src/main/resources/mapper/system/VegetationCoverageMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/VegetationCoverageMapper.xml @@ -35,7 +35,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"