Prechádzať zdrojové kódy

[0806] 设备管理、光伏组件、限电配置、通道配置、测点配置页面以及接口代码同步

taosj 3 mesiacov pred
rodič
commit
d83702206a
48 zmenil súbory, kde vykonal 4089 pridanie a 1648 odobranie
  1. 86 0
      forecast-backend-server/src/main/java/com/ufo/project/config/controller/ConfigStationChannelController.java
  2. 86 0
      forecast-backend-server/src/main/java/com/ufo/project/config/controller/ConfigStationDeviceController.java
  3. 86 0
      forecast-backend-server/src/main/java/com/ufo/project/config/controller/ConfigStationPointController.java
  4. 86 0
      forecast-backend-server/src/main/java/com/ufo/project/config/controller/ConfigStationPowerLimitController.java
  5. 86 0
      forecast-backend-server/src/main/java/com/ufo/project/config/controller/ConfigStationPvModuleController.java
  6. 192 0
      forecast-backend-server/src/main/java/com/ufo/project/config/domain/ConfigStationChannel.java
  7. 177 0
      forecast-backend-server/src/main/java/com/ufo/project/config/domain/ConfigStationDevice.java
  8. 207 0
      forecast-backend-server/src/main/java/com/ufo/project/config/domain/ConfigStationPoint.java
  9. 177 0
      forecast-backend-server/src/main/java/com/ufo/project/config/domain/ConfigStationPowerLimit.java
  10. 193 0
      forecast-backend-server/src/main/java/com/ufo/project/config/domain/ConfigStationPvModule.java
  11. 25 0
      forecast-backend-server/src/main/java/com/ufo/project/config/mapper/ConfigStationChannelMapper.java
  12. 25 0
      forecast-backend-server/src/main/java/com/ufo/project/config/mapper/ConfigStationDeviceMapper.java
  13. 25 0
      forecast-backend-server/src/main/java/com/ufo/project/config/mapper/ConfigStationPointMapper.java
  14. 25 0
      forecast-backend-server/src/main/java/com/ufo/project/config/mapper/ConfigStationPowerLimitMapper.java
  15. 25 0
      forecast-backend-server/src/main/java/com/ufo/project/config/mapper/ConfigStationPvModuleMapper.java
  16. 25 0
      forecast-backend-server/src/main/java/com/ufo/project/config/service/IConfigStationChannelService.java
  17. 25 0
      forecast-backend-server/src/main/java/com/ufo/project/config/service/IConfigStationDeviceService.java
  18. 25 0
      forecast-backend-server/src/main/java/com/ufo/project/config/service/IConfigStationPointService.java
  19. 25 0
      forecast-backend-server/src/main/java/com/ufo/project/config/service/IConfigStationPowerLimitService.java
  20. 25 0
      forecast-backend-server/src/main/java/com/ufo/project/config/service/IConfigStationPvModuleService.java
  21. 60 0
      forecast-backend-server/src/main/java/com/ufo/project/config/service/impl/ConfigStationChannelServiceImpl.java
  22. 60 0
      forecast-backend-server/src/main/java/com/ufo/project/config/service/impl/ConfigStationDeviceServiceImpl.java
  23. 60 0
      forecast-backend-server/src/main/java/com/ufo/project/config/service/impl/ConfigStationPointServiceImpl.java
  24. 60 0
      forecast-backend-server/src/main/java/com/ufo/project/config/service/impl/ConfigStationPowerLimitServiceImpl.java
  25. 60 0
      forecast-backend-server/src/main/java/com/ufo/project/config/service/impl/ConfigStationPvModuleServiceImpl.java
  26. 83 0
      forecast-backend-server/src/main/resources/mybatis/config/ConfigStationChannelMapper.xml
  27. 81 0
      forecast-backend-server/src/main/resources/mybatis/config/ConfigStationDeviceMapper.xml
  28. 85 0
      forecast-backend-server/src/main/resources/mybatis/config/ConfigStationPointMapper.xml
  29. 79 0
      forecast-backend-server/src/main/resources/mybatis/config/ConfigStationPowerLimitMapper.xml
  30. 82 0
      forecast-backend-server/src/main/resources/mybatis/config/ConfigStationPvModuleMapper.xml
  31. 56 56
      forecast-backend-server/src/main/resources/mybatis/monitor/SysLogininforMapper.xml
  32. 86 86
      forecast-backend-server/src/main/resources/mybatis/monitor/SysOperLogMapper.xml
  33. 119 119
      forecast-backend-server/src/main/resources/mybatis/system/SysConfigMapper.xml
  34. 158 158
      forecast-backend-server/src/main/resources/mybatis/system/SysDeptMapper.xml
  35. 123 123
      forecast-backend-server/src/main/resources/mybatis/system/SysDictDataMapper.xml
  36. 107 107
      forecast-backend-server/src/main/resources/mybatis/system/SysDictTypeMapper.xml
  37. 93 93
      forecast-backend-server/src/main/resources/mybatis/system/SysJobLogMapper.xml
  38. 113 113
      forecast-backend-server/src/main/resources/mybatis/system/SysJobMapper.xml
  39. 207 207
      forecast-backend-server/src/main/resources/mybatis/system/SysMenuMapper.xml
  40. 91 91
      forecast-backend-server/src/main/resources/mybatis/system/SysNoticeMapper.xml
  41. 124 124
      forecast-backend-server/src/main/resources/mybatis/system/SysPostMapper.xml
  42. 151 151
      forecast-backend-server/src/main/resources/mybatis/system/SysRoleMapper.xml
  43. 220 220
      forecast-backend-server/src/main/resources/mybatis/system/SysUserMapper.xml
  44. 21 0
      forecast-backend-vue/src/api/config/stationChannel.js
  45. 21 0
      forecast-backend-vue/src/api/config/stationDevice.js
  46. 21 0
      forecast-backend-vue/src/api/config/stationModule.js
  47. 21 0
      forecast-backend-vue/src/api/config/stationPoint.js
  48. 21 0
      forecast-backend-vue/src/api/config/stationPowerLimit.js

+ 86 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/controller/ConfigStationChannelController.java

@@ -0,0 +1,86 @@
+package com.ufo.project.config.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ufo.base.framework.aspectj.lang.annotation.Log;
+import com.ufo.base.framework.aspectj.lang.enums.BusinessType;
+import com.ufo.project.config.domain.ConfigStationChannel;
+import com.ufo.project.config.service.IConfigStationChannelService;
+import com.ufo.base.framework.web.controller.BaseController;
+import com.ufo.base.framework.web.domain.AjaxResult;
+import com.ufo.base.common.utils.poi.ExcelUtil;
+import com.ufo.base.framework.web.page.TableDataInfo;
+
+/**
+ * ????Controller
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+@RestController
+@RequestMapping("/config/stationChannel")
+public class ConfigStationChannelController extends BaseController
+{
+    @Autowired
+    private IConfigStationChannelService configStationChannelService;
+
+    @PreAuthorize("@ss.hasPermi('config:stationChannel:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ConfigStationChannel configStationChannel)
+    {
+        startPage();
+        List<ConfigStationChannel> list = configStationChannelService.selectConfigStationChannelList(configStationChannel);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationChannel:export')")
+    @Log(title = "????", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ConfigStationChannel configStationChannel)
+    {
+        List<ConfigStationChannel> list = configStationChannelService.selectConfigStationChannelList(configStationChannel);
+        ExcelUtil<ConfigStationChannel> util = new ExcelUtil<ConfigStationChannel>(ConfigStationChannel.class);
+        util.exportExcel(response, list, "??????");
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationChannel:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(configStationChannelService.selectConfigStationChannelById(id));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationChannel:add')")
+    @Log(title = "????", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ConfigStationChannel configStationChannel)
+    {
+        return toAjax(configStationChannelService.insertConfigStationChannel(configStationChannel));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationChannel:edit')")
+    @Log(title = "????", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ConfigStationChannel configStationChannel)
+    {
+        return toAjax(configStationChannelService.updateConfigStationChannel(configStationChannel));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationChannel:remove')")
+    @Log(title = "????", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(configStationChannelService.deleteConfigStationChannelByIds(ids));
+    }
+}

+ 86 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/controller/ConfigStationDeviceController.java

@@ -0,0 +1,86 @@
+package com.ufo.project.config.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ufo.base.framework.aspectj.lang.annotation.Log;
+import com.ufo.base.framework.aspectj.lang.enums.BusinessType;
+import com.ufo.project.config.domain.ConfigStationDevice;
+import com.ufo.project.config.service.IConfigStationDeviceService;
+import com.ufo.base.framework.web.controller.BaseController;
+import com.ufo.base.framework.web.domain.AjaxResult;
+import com.ufo.base.common.utils.poi.ExcelUtil;
+import com.ufo.base.framework.web.page.TableDataInfo;
+
+/**
+ * ????Controller
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+@RestController
+@RequestMapping("/config/stationDevice")
+public class ConfigStationDeviceController extends BaseController
+{
+    @Autowired
+    private IConfigStationDeviceService configStationDeviceService;
+
+    @PreAuthorize("@ss.hasPermi('config:stationDevice:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ConfigStationDevice configStationDevice)
+    {
+        startPage();
+        List<ConfigStationDevice> list = configStationDeviceService.selectConfigStationDeviceList(configStationDevice);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationDevice:export')")
+    @Log(title = "????", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ConfigStationDevice configStationDevice)
+    {
+        List<ConfigStationDevice> list = configStationDeviceService.selectConfigStationDeviceList(configStationDevice);
+        ExcelUtil<ConfigStationDevice> util = new ExcelUtil<ConfigStationDevice>(ConfigStationDevice.class);
+        util.exportExcel(response, list, "??????");
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationDevice:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(configStationDeviceService.selectConfigStationDeviceById(id));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationDevice:add')")
+    @Log(title = "????", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ConfigStationDevice configStationDevice)
+    {
+        return toAjax(configStationDeviceService.insertConfigStationDevice(configStationDevice));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationDevice:edit')")
+    @Log(title = "????", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ConfigStationDevice configStationDevice)
+    {
+        return toAjax(configStationDeviceService.updateConfigStationDevice(configStationDevice));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationDevice:remove')")
+    @Log(title = "????", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(configStationDeviceService.deleteConfigStationDeviceByIds(ids));
+    }
+}

+ 86 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/controller/ConfigStationPointController.java

@@ -0,0 +1,86 @@
+package com.ufo.project.config.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ufo.base.framework.aspectj.lang.annotation.Log;
+import com.ufo.base.framework.aspectj.lang.enums.BusinessType;
+import com.ufo.project.config.domain.ConfigStationPoint;
+import com.ufo.project.config.service.IConfigStationPointService;
+import com.ufo.base.framework.web.controller.BaseController;
+import com.ufo.base.framework.web.domain.AjaxResult;
+import com.ufo.base.common.utils.poi.ExcelUtil;
+import com.ufo.base.framework.web.page.TableDataInfo;
+
+/**
+ * ????Controller
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+@RestController
+@RequestMapping("/config/stationPoint")
+public class ConfigStationPointController extends BaseController
+{
+    @Autowired
+    private IConfigStationPointService configStationPointService;
+
+    @PreAuthorize("@ss.hasPermi('config:stationPoint:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ConfigStationPoint configStationPoint)
+    {
+        startPage();
+        List<ConfigStationPoint> list = configStationPointService.selectConfigStationPointList(configStationPoint);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationPoint:export')")
+    @Log(title = "????", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ConfigStationPoint configStationPoint)
+    {
+        List<ConfigStationPoint> list = configStationPointService.selectConfigStationPointList(configStationPoint);
+        ExcelUtil<ConfigStationPoint> util = new ExcelUtil<ConfigStationPoint>(ConfigStationPoint.class);
+        util.exportExcel(response, list, "??????");
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationPoint:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(configStationPointService.selectConfigStationPointById(id));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationPoint:add')")
+    @Log(title = "????", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ConfigStationPoint configStationPoint)
+    {
+        return toAjax(configStationPointService.insertConfigStationPoint(configStationPoint));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationPoint:edit')")
+    @Log(title = "????", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ConfigStationPoint configStationPoint)
+    {
+        return toAjax(configStationPointService.updateConfigStationPoint(configStationPoint));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationPoint:remove')")
+    @Log(title = "????", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(configStationPointService.deleteConfigStationPointByIds(ids));
+    }
+}

+ 86 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/controller/ConfigStationPowerLimitController.java

@@ -0,0 +1,86 @@
+package com.ufo.project.config.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ufo.base.framework.aspectj.lang.annotation.Log;
+import com.ufo.base.framework.aspectj.lang.enums.BusinessType;
+import com.ufo.project.config.domain.ConfigStationPowerLimit;
+import com.ufo.project.config.service.IConfigStationPowerLimitService;
+import com.ufo.base.framework.web.controller.BaseController;
+import com.ufo.base.framework.web.domain.AjaxResult;
+import com.ufo.base.common.utils.poi.ExcelUtil;
+import com.ufo.base.framework.web.page.TableDataInfo;
+
+/**
+ * ????Controller
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+@RestController
+@RequestMapping("/config/stationPowerLimit")
+public class ConfigStationPowerLimitController extends BaseController
+{
+    @Autowired
+    private IConfigStationPowerLimitService configStationPowerLimitService;
+
+    @PreAuthorize("@ss.hasPermi('config:stationPowerLimit:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ConfigStationPowerLimit configStationPowerLimit)
+    {
+        startPage();
+        List<ConfigStationPowerLimit> list = configStationPowerLimitService.selectConfigStationPowerLimitList(configStationPowerLimit);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationPowerLimit:export')")
+    @Log(title = "????", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ConfigStationPowerLimit configStationPowerLimit)
+    {
+        List<ConfigStationPowerLimit> list = configStationPowerLimitService.selectConfigStationPowerLimitList(configStationPowerLimit);
+        ExcelUtil<ConfigStationPowerLimit> util = new ExcelUtil<ConfigStationPowerLimit>(ConfigStationPowerLimit.class);
+        util.exportExcel(response, list, "??????");
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationPowerLimit:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(configStationPowerLimitService.selectConfigStationPowerLimitById(id));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationPowerLimit:add')")
+    @Log(title = "????", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ConfigStationPowerLimit configStationPowerLimit)
+    {
+        return toAjax(configStationPowerLimitService.insertConfigStationPowerLimit(configStationPowerLimit));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationPowerLimit:edit')")
+    @Log(title = "????", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ConfigStationPowerLimit configStationPowerLimit)
+    {
+        return toAjax(configStationPowerLimitService.updateConfigStationPowerLimit(configStationPowerLimit));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationPowerLimit:remove')")
+    @Log(title = "????", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(configStationPowerLimitService.deleteConfigStationPowerLimitByIds(ids));
+    }
+}

+ 86 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/controller/ConfigStationPvModuleController.java

@@ -0,0 +1,86 @@
+package com.ufo.project.config.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ufo.base.framework.aspectj.lang.annotation.Log;
+import com.ufo.base.framework.aspectj.lang.enums.BusinessType;
+import com.ufo.project.config.domain.ConfigStationPvModule;
+import com.ufo.project.config.service.IConfigStationPvModuleService;
+import com.ufo.base.framework.web.controller.BaseController;
+import com.ufo.base.framework.web.domain.AjaxResult;
+import com.ufo.base.common.utils.poi.ExcelUtil;
+import com.ufo.base.framework.web.page.TableDataInfo;
+
+/**
+ * ????Controller
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+@RestController
+@RequestMapping("/config/stationModule")
+public class ConfigStationPvModuleController extends BaseController
+{
+    @Autowired
+    private IConfigStationPvModuleService configStationPvModuleService;
+
+    @PreAuthorize("@ss.hasPermi('config:stationModule:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ConfigStationPvModule configStationPvModule)
+    {
+        startPage();
+        List<ConfigStationPvModule> list = configStationPvModuleService.selectConfigStationPvModuleList(configStationPvModule);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationModule:export')")
+    @Log(title = "????", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ConfigStationPvModule configStationPvModule)
+    {
+        List<ConfigStationPvModule> list = configStationPvModuleService.selectConfigStationPvModuleList(configStationPvModule);
+        ExcelUtil<ConfigStationPvModule> util = new ExcelUtil<ConfigStationPvModule>(ConfigStationPvModule.class);
+        util.exportExcel(response, list, "??????");
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationModule:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(configStationPvModuleService.selectConfigStationPvModuleById(id));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationModule:add')")
+    @Log(title = "????", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ConfigStationPvModule configStationPvModule)
+    {
+        return toAjax(configStationPvModuleService.insertConfigStationPvModule(configStationPvModule));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationModule:edit')")
+    @Log(title = "????", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ConfigStationPvModule configStationPvModule)
+    {
+        return toAjax(configStationPvModuleService.updateConfigStationPvModule(configStationPvModule));
+    }
+
+    @PreAuthorize("@ss.hasPermi('config:stationModule:remove')")
+    @Log(title = "????", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(configStationPvModuleService.deleteConfigStationPvModuleByIds(ids));
+    }
+}

+ 192 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/domain/ConfigStationChannel.java

@@ -0,0 +1,192 @@
+package com.ufo.project.config.domain;
+
+import com.ufo.base.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ufo.base.framework.aspectj.lang.annotation.Excel;
+
+/**
+ * ?????? config_station_channel
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public class ConfigStationChannel extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** ???? */
+    private Long id;
+
+    /** ??ID */
+    @Excel(name = "??ID")
+    private Long stationId;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String stationName;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String channelName;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String protocol;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String host;
+
+    /** ?? */
+    @Excel(name = "??")
+    private Long port;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String collectInterval;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String dataType;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String status;
+
+    /** ?????? */
+    @Excel(name = "??????")
+    private String lastSyncTime;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+
+    public void setStationId(Long stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId() 
+    {
+        return stationId;
+    }
+
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+
+    public void setChannelName(String channelName) 
+    {
+        this.channelName = channelName;
+    }
+
+    public String getChannelName() 
+    {
+        return channelName;
+    }
+
+    public void setProtocol(String protocol) 
+    {
+        this.protocol = protocol;
+    }
+
+    public String getProtocol() 
+    {
+        return protocol;
+    }
+
+    public void setHost(String host) 
+    {
+        this.host = host;
+    }
+
+    public String getHost() 
+    {
+        return host;
+    }
+
+    public void setPort(Long port) 
+    {
+        this.port = port;
+    }
+
+    public Long getPort() 
+    {
+        return port;
+    }
+
+    public void setCollectInterval(String collectInterval) 
+    {
+        this.collectInterval = collectInterval;
+    }
+
+    public String getCollectInterval() 
+    {
+        return collectInterval;
+    }
+
+    public void setDataType(String dataType) 
+    {
+        this.dataType = dataType;
+    }
+
+    public String getDataType() 
+    {
+        return dataType;
+    }
+
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+
+    public void setLastSyncTime(String lastSyncTime) 
+    {
+        this.lastSyncTime = lastSyncTime;
+    }
+
+    public String getLastSyncTime() 
+    {
+        return lastSyncTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("channelName", getChannelName())
+            .append("protocol", getProtocol())
+            .append("host", getHost())
+            .append("port", getPort())
+            .append("collectInterval", getCollectInterval())
+            .append("dataType", getDataType())
+            .append("status", getStatus())
+            .append("lastSyncTime", getLastSyncTime())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 177 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/domain/ConfigStationDevice.java

@@ -0,0 +1,177 @@
+package com.ufo.project.config.domain;
+
+import com.ufo.base.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ufo.base.framework.aspectj.lang.annotation.Excel;
+
+/**
+ * ?????? config_station_device
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public class ConfigStationDevice extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** ???? */
+    private Long id;
+
+    /** ??ID */
+    @Excel(name = "??ID")
+    private Long stationId;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String stationName;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String deviceName;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String deviceType;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String brand;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String model;
+
+    /** ??? */
+    @Excel(name = "???")
+    private String serialNumber;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String status;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String installDate;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+
+    public void setStationId(Long stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId() 
+    {
+        return stationId;
+    }
+
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+
+    public void setDeviceName(String deviceName) 
+    {
+        this.deviceName = deviceName;
+    }
+
+    public String getDeviceName() 
+    {
+        return deviceName;
+    }
+
+    public void setDeviceType(String deviceType) 
+    {
+        this.deviceType = deviceType;
+    }
+
+    public String getDeviceType() 
+    {
+        return deviceType;
+    }
+
+    public void setBrand(String brand) 
+    {
+        this.brand = brand;
+    }
+
+    public String getBrand() 
+    {
+        return brand;
+    }
+
+    public void setModel(String model) 
+    {
+        this.model = model;
+    }
+
+    public String getModel() 
+    {
+        return model;
+    }
+
+    public void setSerialNumber(String serialNumber) 
+    {
+        this.serialNumber = serialNumber;
+    }
+
+    public String getSerialNumber() 
+    {
+        return serialNumber;
+    }
+
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+
+    public void setInstallDate(String installDate) 
+    {
+        this.installDate = installDate;
+    }
+
+    public String getInstallDate() 
+    {
+        return installDate;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("deviceName", getDeviceName())
+            .append("deviceType", getDeviceType())
+            .append("brand", getBrand())
+            .append("model", getModel())
+            .append("serialNumber", getSerialNumber())
+            .append("status", getStatus())
+            .append("installDate", getInstallDate())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 207 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/domain/ConfigStationPoint.java

@@ -0,0 +1,207 @@
+package com.ufo.project.config.domain;
+
+import com.ufo.base.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ufo.base.framework.aspectj.lang.annotation.Excel;
+
+/**
+ * ?????? config_station_point
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public class ConfigStationPoint extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** ???? */
+    private Long id;
+
+    /** ??ID */
+    @Excel(name = "??ID")
+    private Long stationId;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String stationName;
+
+    /** ??ID */
+    @Excel(name = "??ID")
+    private Long deviceId;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String deviceName;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String pointName;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String unit;
+
+    /** ?? */
+    @Excel(name = "??")
+    private Long precisionValue;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String measureRange;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String protocol;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String address;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String collectInterval;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+
+    public void setStationId(Long stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId() 
+    {
+        return stationId;
+    }
+
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+
+    public void setDeviceId(Long deviceId) 
+    {
+        this.deviceId = deviceId;
+    }
+
+    public Long getDeviceId() 
+    {
+        return deviceId;
+    }
+
+    public void setDeviceName(String deviceName) 
+    {
+        this.deviceName = deviceName;
+    }
+
+    public String getDeviceName() 
+    {
+        return deviceName;
+    }
+
+    public void setPointName(String pointName) 
+    {
+        this.pointName = pointName;
+    }
+
+    public String getPointName() 
+    {
+        return pointName;
+    }
+
+    public void setUnit(String unit) 
+    {
+        this.unit = unit;
+    }
+
+    public String getUnit() 
+    {
+        return unit;
+    }
+
+    public void setPrecisionValue(Long precisionValue) 
+    {
+        this.precisionValue = precisionValue;
+    }
+
+    public Long getPrecisionValue() 
+    {
+        return precisionValue;
+    }
+
+    public void setMeasureRange(String measureRange) 
+    {
+        this.measureRange = measureRange;
+    }
+
+    public String getMeasureRange() 
+    {
+        return measureRange;
+    }
+
+    public void setProtocol(String protocol) 
+    {
+        this.protocol = protocol;
+    }
+
+    public String getProtocol() 
+    {
+        return protocol;
+    }
+
+    public void setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+
+    public void setCollectInterval(String collectInterval) 
+    {
+        this.collectInterval = collectInterval;
+    }
+
+    public String getCollectInterval() 
+    {
+        return collectInterval;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("deviceId", getDeviceId())
+            .append("deviceName", getDeviceName())
+            .append("pointName", getPointName())
+            .append("unit", getUnit())
+            .append("precisionValue", getPrecisionValue())
+            .append("measureRange", getMeasureRange())
+            .append("protocol", getProtocol())
+            .append("address", getAddress())
+            .append("collectInterval", getCollectInterval())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 177 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/domain/ConfigStationPowerLimit.java

@@ -0,0 +1,177 @@
+package com.ufo.project.config.domain;
+
+import com.ufo.base.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ufo.base.framework.aspectj.lang.annotation.Excel;
+
+/**
+ * ?????? config_station_power_limit
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public class ConfigStationPowerLimit extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** ???? */
+    private Long id;
+
+    /** ??ID */
+    @Excel(name = "??ID")
+    private Long stationId;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String stationName;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String limitType;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String startDate;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String endDate;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String limitPercent;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String reason;
+
+    /** ??? */
+    @Excel(name = "???")
+    private String approver;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String status;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+
+    public void setStationId(Long stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId() 
+    {
+        return stationId;
+    }
+
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+
+    public void setLimitType(String limitType) 
+    {
+        this.limitType = limitType;
+    }
+
+    public String getLimitType() 
+    {
+        return limitType;
+    }
+
+    public void setStartDate(String startDate) 
+    {
+        this.startDate = startDate;
+    }
+
+    public String getStartDate() 
+    {
+        return startDate;
+    }
+
+    public void setEndDate(String endDate) 
+    {
+        this.endDate = endDate;
+    }
+
+    public String getEndDate() 
+    {
+        return endDate;
+    }
+
+    public void setLimitPercent(String limitPercent) 
+    {
+        this.limitPercent = limitPercent;
+    }
+
+    public String getLimitPercent() 
+    {
+        return limitPercent;
+    }
+
+    public void setReason(String reason) 
+    {
+        this.reason = reason;
+    }
+
+    public String getReason() 
+    {
+        return reason;
+    }
+
+    public void setApprover(String approver) 
+    {
+        this.approver = approver;
+    }
+
+    public String getApprover() 
+    {
+        return approver;
+    }
+
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("limitType", getLimitType())
+            .append("startDate", getStartDate())
+            .append("endDate", getEndDate())
+            .append("limitPercent", getLimitPercent())
+            .append("reason", getReason())
+            .append("approver", getApprover())
+            .append("status", getStatus())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 193 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/domain/ConfigStationPvModule.java

@@ -0,0 +1,193 @@
+package com.ufo.project.config.domain;
+
+import com.ufo.base.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ufo.base.framework.aspectj.lang.annotation.Excel;
+import java.math.BigDecimal;
+
+/**
+ * ?????? config_station_pv_module
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public class ConfigStationPvModule extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** ???? */
+    private Long id;
+
+    /** ??ID */
+    @Excel(name = "??ID")
+    private Long stationId;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String stationName;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String model;
+
+    /** ?? */
+    @Excel(name = "??")
+    private String brand;
+
+    /** ????(W) */
+    @Excel(name = "????(W)")
+    private BigDecimal ratedPower;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String moduleType;
+
+    /** ?? */
+    @Excel(name = "??")
+    private Long moduleCount;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String conversionEfficiency;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String temperatureCoefficient;
+
+    /** ???? */
+    @Excel(name = "????")
+    private String installDate;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+
+    public void setStationId(Long stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId() 
+    {
+        return stationId;
+    }
+
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+
+    public void setModel(String model) 
+    {
+        this.model = model;
+    }
+
+    public String getModel() 
+    {
+        return model;
+    }
+
+    public void setBrand(String brand) 
+    {
+        this.brand = brand;
+    }
+
+    public String getBrand() 
+    {
+        return brand;
+    }
+
+    public void setRatedPower(BigDecimal ratedPower) 
+    {
+        this.ratedPower = ratedPower;
+    }
+
+    public BigDecimal getRatedPower() 
+    {
+        return ratedPower;
+    }
+
+    public void setModuleType(String moduleType) 
+    {
+        this.moduleType = moduleType;
+    }
+
+    public String getModuleType() 
+    {
+        return moduleType;
+    }
+
+    public void setModuleCount(Long moduleCount) 
+    {
+        this.moduleCount = moduleCount;
+    }
+
+    public Long getModuleCount() 
+    {
+        return moduleCount;
+    }
+
+    public void setConversionEfficiency(String conversionEfficiency) 
+    {
+        this.conversionEfficiency = conversionEfficiency;
+    }
+
+    public String getConversionEfficiency() 
+    {
+        return conversionEfficiency;
+    }
+
+    public void setTemperatureCoefficient(String temperatureCoefficient) 
+    {
+        this.temperatureCoefficient = temperatureCoefficient;
+    }
+
+    public String getTemperatureCoefficient() 
+    {
+        return temperatureCoefficient;
+    }
+
+    public void setInstallDate(String installDate) 
+    {
+        this.installDate = installDate;
+    }
+
+    public String getInstallDate() 
+    {
+        return installDate;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("model", getModel())
+            .append("brand", getBrand())
+            .append("ratedPower", getRatedPower())
+            .append("moduleType", getModuleType())
+            .append("moduleCount", getModuleCount())
+            .append("conversionEfficiency", getConversionEfficiency())
+            .append("temperatureCoefficient", getTemperatureCoefficient())
+            .append("installDate", getInstallDate())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 25 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/mapper/ConfigStationChannelMapper.java

@@ -0,0 +1,25 @@
+package com.ufo.project.config.mapper;
+
+import java.util.List;
+import com.ufo.project.config.domain.ConfigStationChannel;
+
+/**
+ * ????Mapper??
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public interface ConfigStationChannelMapper
+{
+    public ConfigStationChannel selectConfigStationChannelById(Long id);
+
+    public List<ConfigStationChannel> selectConfigStationChannelList(ConfigStationChannel configStationChannel);
+
+    public int insertConfigStationChannel(ConfigStationChannel configStationChannel);
+
+    public int updateConfigStationChannel(ConfigStationChannel configStationChannel);
+
+    public int deleteConfigStationChannelById(Long id);
+
+    public int deleteConfigStationChannelByIds(Long[] ids);
+}

+ 25 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/mapper/ConfigStationDeviceMapper.java

@@ -0,0 +1,25 @@
+package com.ufo.project.config.mapper;
+
+import java.util.List;
+import com.ufo.project.config.domain.ConfigStationDevice;
+
+/**
+ * ????Mapper??
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public interface ConfigStationDeviceMapper
+{
+    public ConfigStationDevice selectConfigStationDeviceById(Long id);
+
+    public List<ConfigStationDevice> selectConfigStationDeviceList(ConfigStationDevice configStationDevice);
+
+    public int insertConfigStationDevice(ConfigStationDevice configStationDevice);
+
+    public int updateConfigStationDevice(ConfigStationDevice configStationDevice);
+
+    public int deleteConfigStationDeviceById(Long id);
+
+    public int deleteConfigStationDeviceByIds(Long[] ids);
+}

+ 25 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/mapper/ConfigStationPointMapper.java

@@ -0,0 +1,25 @@
+package com.ufo.project.config.mapper;
+
+import java.util.List;
+import com.ufo.project.config.domain.ConfigStationPoint;
+
+/**
+ * ????Mapper??
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public interface ConfigStationPointMapper
+{
+    public ConfigStationPoint selectConfigStationPointById(Long id);
+
+    public List<ConfigStationPoint> selectConfigStationPointList(ConfigStationPoint configStationPoint);
+
+    public int insertConfigStationPoint(ConfigStationPoint configStationPoint);
+
+    public int updateConfigStationPoint(ConfigStationPoint configStationPoint);
+
+    public int deleteConfigStationPointById(Long id);
+
+    public int deleteConfigStationPointByIds(Long[] ids);
+}

+ 25 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/mapper/ConfigStationPowerLimitMapper.java

@@ -0,0 +1,25 @@
+package com.ufo.project.config.mapper;
+
+import java.util.List;
+import com.ufo.project.config.domain.ConfigStationPowerLimit;
+
+/**
+ * ????Mapper??
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public interface ConfigStationPowerLimitMapper
+{
+    public ConfigStationPowerLimit selectConfigStationPowerLimitById(Long id);
+
+    public List<ConfigStationPowerLimit> selectConfigStationPowerLimitList(ConfigStationPowerLimit configStationPowerLimit);
+
+    public int insertConfigStationPowerLimit(ConfigStationPowerLimit configStationPowerLimit);
+
+    public int updateConfigStationPowerLimit(ConfigStationPowerLimit configStationPowerLimit);
+
+    public int deleteConfigStationPowerLimitById(Long id);
+
+    public int deleteConfigStationPowerLimitByIds(Long[] ids);
+}

+ 25 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/mapper/ConfigStationPvModuleMapper.java

@@ -0,0 +1,25 @@
+package com.ufo.project.config.mapper;
+
+import java.util.List;
+import com.ufo.project.config.domain.ConfigStationPvModule;
+
+/**
+ * ????Mapper??
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public interface ConfigStationPvModuleMapper
+{
+    public ConfigStationPvModule selectConfigStationPvModuleById(Long id);
+
+    public List<ConfigStationPvModule> selectConfigStationPvModuleList(ConfigStationPvModule configStationPvModule);
+
+    public int insertConfigStationPvModule(ConfigStationPvModule configStationPvModule);
+
+    public int updateConfigStationPvModule(ConfigStationPvModule configStationPvModule);
+
+    public int deleteConfigStationPvModuleById(Long id);
+
+    public int deleteConfigStationPvModuleByIds(Long[] ids);
+}

+ 25 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/service/IConfigStationChannelService.java

@@ -0,0 +1,25 @@
+package com.ufo.project.config.service;
+
+import java.util.List;
+import com.ufo.project.config.domain.ConfigStationChannel;
+
+/**
+ * ????Service??
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public interface IConfigStationChannelService
+{
+    public ConfigStationChannel selectConfigStationChannelById(Long id);
+
+    public List<ConfigStationChannel> selectConfigStationChannelList(ConfigStationChannel configStationChannel);
+
+    public int insertConfigStationChannel(ConfigStationChannel configStationChannel);
+
+    public int updateConfigStationChannel(ConfigStationChannel configStationChannel);
+
+    public int deleteConfigStationChannelByIds(Long[] ids);
+
+    public int deleteConfigStationChannelById(Long id);
+}

+ 25 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/service/IConfigStationDeviceService.java

@@ -0,0 +1,25 @@
+package com.ufo.project.config.service;
+
+import java.util.List;
+import com.ufo.project.config.domain.ConfigStationDevice;
+
+/**
+ * ????Service??
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public interface IConfigStationDeviceService
+{
+    public ConfigStationDevice selectConfigStationDeviceById(Long id);
+
+    public List<ConfigStationDevice> selectConfigStationDeviceList(ConfigStationDevice configStationDevice);
+
+    public int insertConfigStationDevice(ConfigStationDevice configStationDevice);
+
+    public int updateConfigStationDevice(ConfigStationDevice configStationDevice);
+
+    public int deleteConfigStationDeviceByIds(Long[] ids);
+
+    public int deleteConfigStationDeviceById(Long id);
+}

+ 25 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/service/IConfigStationPointService.java

@@ -0,0 +1,25 @@
+package com.ufo.project.config.service;
+
+import java.util.List;
+import com.ufo.project.config.domain.ConfigStationPoint;
+
+/**
+ * ????Service??
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public interface IConfigStationPointService
+{
+    public ConfigStationPoint selectConfigStationPointById(Long id);
+
+    public List<ConfigStationPoint> selectConfigStationPointList(ConfigStationPoint configStationPoint);
+
+    public int insertConfigStationPoint(ConfigStationPoint configStationPoint);
+
+    public int updateConfigStationPoint(ConfigStationPoint configStationPoint);
+
+    public int deleteConfigStationPointByIds(Long[] ids);
+
+    public int deleteConfigStationPointById(Long id);
+}

+ 25 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/service/IConfigStationPowerLimitService.java

@@ -0,0 +1,25 @@
+package com.ufo.project.config.service;
+
+import java.util.List;
+import com.ufo.project.config.domain.ConfigStationPowerLimit;
+
+/**
+ * ????Service??
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public interface IConfigStationPowerLimitService
+{
+    public ConfigStationPowerLimit selectConfigStationPowerLimitById(Long id);
+
+    public List<ConfigStationPowerLimit> selectConfigStationPowerLimitList(ConfigStationPowerLimit configStationPowerLimit);
+
+    public int insertConfigStationPowerLimit(ConfigStationPowerLimit configStationPowerLimit);
+
+    public int updateConfigStationPowerLimit(ConfigStationPowerLimit configStationPowerLimit);
+
+    public int deleteConfigStationPowerLimitByIds(Long[] ids);
+
+    public int deleteConfigStationPowerLimitById(Long id);
+}

+ 25 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/service/IConfigStationPvModuleService.java

@@ -0,0 +1,25 @@
+package com.ufo.project.config.service;
+
+import java.util.List;
+import com.ufo.project.config.domain.ConfigStationPvModule;
+
+/**
+ * ????Service??
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+public interface IConfigStationPvModuleService
+{
+    public ConfigStationPvModule selectConfigStationPvModuleById(Long id);
+
+    public List<ConfigStationPvModule> selectConfigStationPvModuleList(ConfigStationPvModule configStationPvModule);
+
+    public int insertConfigStationPvModule(ConfigStationPvModule configStationPvModule);
+
+    public int updateConfigStationPvModule(ConfigStationPvModule configStationPvModule);
+
+    public int deleteConfigStationPvModuleByIds(Long[] ids);
+
+    public int deleteConfigStationPvModuleById(Long id);
+}

+ 60 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/service/impl/ConfigStationChannelServiceImpl.java

@@ -0,0 +1,60 @@
+package com.ufo.project.config.service.impl;
+
+import java.util.List;
+import com.ufo.base.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ufo.project.config.mapper.ConfigStationChannelMapper;
+import com.ufo.project.config.domain.ConfigStationChannel;
+import com.ufo.project.config.service.IConfigStationChannelService;
+
+/**
+ * ????Service?????
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+@Service
+public class ConfigStationChannelServiceImpl implements IConfigStationChannelService
+{
+    @Autowired
+    private ConfigStationChannelMapper configStationChannelMapper;
+
+    @Override
+    public ConfigStationChannel selectConfigStationChannelById(Long id)
+    {
+        return configStationChannelMapper.selectConfigStationChannelById(id);
+    }
+
+    @Override
+    public List<ConfigStationChannel> selectConfigStationChannelList(ConfigStationChannel configStationChannel)
+    {
+        return configStationChannelMapper.selectConfigStationChannelList(configStationChannel);
+    }
+
+    @Override
+    public int insertConfigStationChannel(ConfigStationChannel configStationChannel)
+    {
+        configStationChannel.setCreateTime(DateUtils.getNowDate());
+        return configStationChannelMapper.insertConfigStationChannel(configStationChannel);
+    }
+
+    @Override
+    public int updateConfigStationChannel(ConfigStationChannel configStationChannel)
+    {
+        configStationChannel.setUpdateTime(DateUtils.getNowDate());
+        return configStationChannelMapper.updateConfigStationChannel(configStationChannel);
+    }
+
+    @Override
+    public int deleteConfigStationChannelByIds(Long[] ids)
+    {
+        return configStationChannelMapper.deleteConfigStationChannelByIds(ids);
+    }
+
+    @Override
+    public int deleteConfigStationChannelById(Long id)
+    {
+        return configStationChannelMapper.deleteConfigStationChannelById(id);
+    }
+}

+ 60 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/service/impl/ConfigStationDeviceServiceImpl.java

@@ -0,0 +1,60 @@
+package com.ufo.project.config.service.impl;
+
+import java.util.List;
+import com.ufo.base.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ufo.project.config.mapper.ConfigStationDeviceMapper;
+import com.ufo.project.config.domain.ConfigStationDevice;
+import com.ufo.project.config.service.IConfigStationDeviceService;
+
+/**
+ * ????Service?????
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+@Service
+public class ConfigStationDeviceServiceImpl implements IConfigStationDeviceService
+{
+    @Autowired
+    private ConfigStationDeviceMapper configStationDeviceMapper;
+
+    @Override
+    public ConfigStationDevice selectConfigStationDeviceById(Long id)
+    {
+        return configStationDeviceMapper.selectConfigStationDeviceById(id);
+    }
+
+    @Override
+    public List<ConfigStationDevice> selectConfigStationDeviceList(ConfigStationDevice configStationDevice)
+    {
+        return configStationDeviceMapper.selectConfigStationDeviceList(configStationDevice);
+    }
+
+    @Override
+    public int insertConfigStationDevice(ConfigStationDevice configStationDevice)
+    {
+        configStationDevice.setCreateTime(DateUtils.getNowDate());
+        return configStationDeviceMapper.insertConfigStationDevice(configStationDevice);
+    }
+
+    @Override
+    public int updateConfigStationDevice(ConfigStationDevice configStationDevice)
+    {
+        configStationDevice.setUpdateTime(DateUtils.getNowDate());
+        return configStationDeviceMapper.updateConfigStationDevice(configStationDevice);
+    }
+
+    @Override
+    public int deleteConfigStationDeviceByIds(Long[] ids)
+    {
+        return configStationDeviceMapper.deleteConfigStationDeviceByIds(ids);
+    }
+
+    @Override
+    public int deleteConfigStationDeviceById(Long id)
+    {
+        return configStationDeviceMapper.deleteConfigStationDeviceById(id);
+    }
+}

+ 60 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/service/impl/ConfigStationPointServiceImpl.java

@@ -0,0 +1,60 @@
+package com.ufo.project.config.service.impl;
+
+import java.util.List;
+import com.ufo.base.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ufo.project.config.mapper.ConfigStationPointMapper;
+import com.ufo.project.config.domain.ConfigStationPoint;
+import com.ufo.project.config.service.IConfigStationPointService;
+
+/**
+ * ????Service?????
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+@Service
+public class ConfigStationPointServiceImpl implements IConfigStationPointService
+{
+    @Autowired
+    private ConfigStationPointMapper configStationPointMapper;
+
+    @Override
+    public ConfigStationPoint selectConfigStationPointById(Long id)
+    {
+        return configStationPointMapper.selectConfigStationPointById(id);
+    }
+
+    @Override
+    public List<ConfigStationPoint> selectConfigStationPointList(ConfigStationPoint configStationPoint)
+    {
+        return configStationPointMapper.selectConfigStationPointList(configStationPoint);
+    }
+
+    @Override
+    public int insertConfigStationPoint(ConfigStationPoint configStationPoint)
+    {
+        configStationPoint.setCreateTime(DateUtils.getNowDate());
+        return configStationPointMapper.insertConfigStationPoint(configStationPoint);
+    }
+
+    @Override
+    public int updateConfigStationPoint(ConfigStationPoint configStationPoint)
+    {
+        configStationPoint.setUpdateTime(DateUtils.getNowDate());
+        return configStationPointMapper.updateConfigStationPoint(configStationPoint);
+    }
+
+    @Override
+    public int deleteConfigStationPointByIds(Long[] ids)
+    {
+        return configStationPointMapper.deleteConfigStationPointByIds(ids);
+    }
+
+    @Override
+    public int deleteConfigStationPointById(Long id)
+    {
+        return configStationPointMapper.deleteConfigStationPointById(id);
+    }
+}

+ 60 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/service/impl/ConfigStationPowerLimitServiceImpl.java

@@ -0,0 +1,60 @@
+package com.ufo.project.config.service.impl;
+
+import java.util.List;
+import com.ufo.base.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ufo.project.config.mapper.ConfigStationPowerLimitMapper;
+import com.ufo.project.config.domain.ConfigStationPowerLimit;
+import com.ufo.project.config.service.IConfigStationPowerLimitService;
+
+/**
+ * ????Service?????
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+@Service
+public class ConfigStationPowerLimitServiceImpl implements IConfigStationPowerLimitService
+{
+    @Autowired
+    private ConfigStationPowerLimitMapper configStationPowerLimitMapper;
+
+    @Override
+    public ConfigStationPowerLimit selectConfigStationPowerLimitById(Long id)
+    {
+        return configStationPowerLimitMapper.selectConfigStationPowerLimitById(id);
+    }
+
+    @Override
+    public List<ConfigStationPowerLimit> selectConfigStationPowerLimitList(ConfigStationPowerLimit configStationPowerLimit)
+    {
+        return configStationPowerLimitMapper.selectConfigStationPowerLimitList(configStationPowerLimit);
+    }
+
+    @Override
+    public int insertConfigStationPowerLimit(ConfigStationPowerLimit configStationPowerLimit)
+    {
+        configStationPowerLimit.setCreateTime(DateUtils.getNowDate());
+        return configStationPowerLimitMapper.insertConfigStationPowerLimit(configStationPowerLimit);
+    }
+
+    @Override
+    public int updateConfigStationPowerLimit(ConfigStationPowerLimit configStationPowerLimit)
+    {
+        configStationPowerLimit.setUpdateTime(DateUtils.getNowDate());
+        return configStationPowerLimitMapper.updateConfigStationPowerLimit(configStationPowerLimit);
+    }
+
+    @Override
+    public int deleteConfigStationPowerLimitByIds(Long[] ids)
+    {
+        return configStationPowerLimitMapper.deleteConfigStationPowerLimitByIds(ids);
+    }
+
+    @Override
+    public int deleteConfigStationPowerLimitById(Long id)
+    {
+        return configStationPowerLimitMapper.deleteConfigStationPowerLimitById(id);
+    }
+}

+ 60 - 0
forecast-backend-server/src/main/java/com/ufo/project/config/service/impl/ConfigStationPvModuleServiceImpl.java

@@ -0,0 +1,60 @@
+package com.ufo.project.config.service.impl;
+
+import java.util.List;
+import com.ufo.base.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ufo.project.config.mapper.ConfigStationPvModuleMapper;
+import com.ufo.project.config.domain.ConfigStationPvModule;
+import com.ufo.project.config.service.IConfigStationPvModuleService;
+
+/**
+ * ????Service?????
+ *
+ * @author ufo
+ * @date 2026-07-21
+ */
+@Service
+public class ConfigStationPvModuleServiceImpl implements IConfigStationPvModuleService
+{
+    @Autowired
+    private ConfigStationPvModuleMapper configStationPvModuleMapper;
+
+    @Override
+    public ConfigStationPvModule selectConfigStationPvModuleById(Long id)
+    {
+        return configStationPvModuleMapper.selectConfigStationPvModuleById(id);
+    }
+
+    @Override
+    public List<ConfigStationPvModule> selectConfigStationPvModuleList(ConfigStationPvModule configStationPvModule)
+    {
+        return configStationPvModuleMapper.selectConfigStationPvModuleList(configStationPvModule);
+    }
+
+    @Override
+    public int insertConfigStationPvModule(ConfigStationPvModule configStationPvModule)
+    {
+        configStationPvModule.setCreateTime(DateUtils.getNowDate());
+        return configStationPvModuleMapper.insertConfigStationPvModule(configStationPvModule);
+    }
+
+    @Override
+    public int updateConfigStationPvModule(ConfigStationPvModule configStationPvModule)
+    {
+        configStationPvModule.setUpdateTime(DateUtils.getNowDate());
+        return configStationPvModuleMapper.updateConfigStationPvModule(configStationPvModule);
+    }
+
+    @Override
+    public int deleteConfigStationPvModuleByIds(Long[] ids)
+    {
+        return configStationPvModuleMapper.deleteConfigStationPvModuleByIds(ids);
+    }
+
+    @Override
+    public int deleteConfigStationPvModuleById(Long id)
+    {
+        return configStationPvModuleMapper.deleteConfigStationPvModuleById(id);
+    }
+}

+ 83 - 0
forecast-backend-server/src/main/resources/mybatis/config/ConfigStationChannelMapper.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.project.config.mapper.ConfigStationChannelMapper">
+
+    <resultMap type="ConfigStationChannel" id="ConfigStationChannelResult">
+        <result property="id" column="id" />
+        <result property="stationId" column="station_id" />
+        <result property="stationName" column="station_name" />
+        <result property="channelName" column="channel_name" />
+        <result property="protocol" column="protocol" />
+        <result property="host" column="host" />
+        <result property="port" column="port" />
+        <result property="collectInterval" column="collect_interval" />
+        <result property="dataType" column="data_type" />
+        <result property="status" column="status" />
+        <result property="lastSyncTime" column="last_sync_time" />
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="remark" column="remark" />
+    </resultMap>
+
+    <sql id="selectConfigStationChannelVo">
+        select t.id, t.station_id, s.station_name, t.channel_name, t.protocol, t.host, t.port, t.collect_interval, t.data_type, t.status, t.last_sync_time, t.create_by, t.create_time, t.update_by, t.update_time, t.remark from config_station_channel t left join config_station s on s.id = t.station_id
+    </sql>
+
+    <select id="selectConfigStationChannelList" parameterType="ConfigStationChannel" resultMap="ConfigStationChannelResult">
+        <include refid="selectConfigStationChannelVo"/>
+        <where>
+            <if test="stationId != null"> and t.station_id = #{stationId}</if>
+            <if test="channelName != null and channelName != ''"> and t.channel_name like concat('%', #{channelName}, '%')</if>
+            <if test="protocol != null"> and t.protocol = #{protocol}</if>
+            <if test="host != null and host != ''"> and t.host like concat('%', #{host}, '%')</if>
+            <if test="port != null"> and t.port = #{port}</if>
+            <if test="dataType != null and dataType != ''"> and t.data_type like concat('%', #{dataType}, '%')</if>
+            <if test="status != null"> and t.status = #{status}</if>
+        </where>
+        order by t.id desc
+    </select>
+
+    <select id="selectConfigStationChannelById" parameterType="Long" resultMap="ConfigStationChannelResult">
+        <include refid="selectConfigStationChannelVo"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertConfigStationChannel" parameterType="ConfigStationChannel" useGeneratedKeys="true" keyProperty="id">
+        insert into config_station_channel (station_id, channel_name, protocol, host, port, collect_interval, data_type, status, last_sync_time, create_by, create_time, update_by, update_time, remark)
+        values (#{stationId}, #{channelName}, #{protocol}, #{host}, #{port}, #{collectInterval}, #{dataType}, #{status}, #{lastSyncTime}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark})
+    </insert>
+
+    <update id="updateConfigStationChannel" parameterType="ConfigStationChannel">
+        update config_station_channel
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="channelName != null">channel_name = #{channelName},</if>
+            <if test="protocol != null">protocol = #{protocol},</if>
+            <if test="host != null">host = #{host},</if>
+            <if test="port != null">port = #{port},</if>
+            <if test="collectInterval != null">collect_interval = #{collectInterval},</if>
+            <if test="dataType != null">data_type = #{dataType},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="lastSyncTime != null">last_sync_time = #{lastSyncTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigStationChannelById" parameterType="Long">
+        delete from config_station_channel where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigStationChannelByIds" parameterType="Long">
+        delete from config_station_channel where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 81 - 0
forecast-backend-server/src/main/resources/mybatis/config/ConfigStationDeviceMapper.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.project.config.mapper.ConfigStationDeviceMapper">
+
+    <resultMap type="ConfigStationDevice" id="ConfigStationDeviceResult">
+        <result property="id" column="id" />
+        <result property="stationId" column="station_id" />
+        <result property="stationName" column="station_name" />
+        <result property="deviceName" column="device_name" />
+        <result property="deviceType" column="device_type" />
+        <result property="brand" column="brand" />
+        <result property="model" column="model" />
+        <result property="serialNumber" column="serial_number" />
+        <result property="status" column="status" />
+        <result property="installDate" column="install_date" />
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="remark" column="remark" />
+    </resultMap>
+
+    <sql id="selectConfigStationDeviceVo">
+        select t.id, t.station_id, s.station_name, t.device_name, t.device_type, t.brand, t.model, t.serial_number, t.status, t.install_date, t.create_by, t.create_time, t.update_by, t.update_time, t.remark from config_station_device t left join config_station s on s.id = t.station_id
+    </sql>
+
+    <select id="selectConfigStationDeviceList" parameterType="ConfigStationDevice" resultMap="ConfigStationDeviceResult">
+        <include refid="selectConfigStationDeviceVo"/>
+        <where>
+            <if test="stationId != null"> and t.station_id = #{stationId}</if>
+            <if test="deviceName != null and deviceName != ''"> and t.device_name like concat('%', #{deviceName}, '%')</if>
+            <if test="deviceType != null"> and t.device_type = #{deviceType}</if>
+            <if test="brand != null and brand != ''"> and t.brand like concat('%', #{brand}, '%')</if>
+            <if test="model != null and model != ''"> and t.model like concat('%', #{model}, '%')</if>
+            <if test="serialNumber != null and serialNumber != ''"> and t.serial_number like concat('%', #{serialNumber}, '%')</if>
+            <if test="status != null"> and t.status = #{status}</if>
+        </where>
+        order by t.id desc
+    </select>
+
+    <select id="selectConfigStationDeviceById" parameterType="Long" resultMap="ConfigStationDeviceResult">
+        <include refid="selectConfigStationDeviceVo"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertConfigStationDevice" parameterType="ConfigStationDevice" useGeneratedKeys="true" keyProperty="id">
+        insert into config_station_device (station_id, device_name, device_type, brand, model, serial_number, status, install_date, create_by, create_time, update_by, update_time, remark)
+        values (#{stationId}, #{deviceName}, #{deviceType}, #{brand}, #{model}, #{serialNumber}, #{status}, #{installDate}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark})
+    </insert>
+
+    <update id="updateConfigStationDevice" parameterType="ConfigStationDevice">
+        update config_station_device
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="deviceName != null">device_name = #{deviceName},</if>
+            <if test="deviceType != null">device_type = #{deviceType},</if>
+            <if test="brand != null">brand = #{brand},</if>
+            <if test="model != null">model = #{model},</if>
+            <if test="serialNumber != null">serial_number = #{serialNumber},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="installDate != null">install_date = #{installDate},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigStationDeviceById" parameterType="Long">
+        delete from config_station_device where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigStationDeviceByIds" parameterType="Long">
+        delete from config_station_device where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 85 - 0
forecast-backend-server/src/main/resources/mybatis/config/ConfigStationPointMapper.xml

@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.project.config.mapper.ConfigStationPointMapper">
+
+    <resultMap type="ConfigStationPoint" id="ConfigStationPointResult">
+        <result property="id" column="id" />
+        <result property="stationId" column="station_id" />
+        <result property="stationName" column="station_name" />
+        <result property="deviceId" column="device_id" />
+        <result property="deviceName" column="device_name" />
+        <result property="pointName" column="point_name" />
+        <result property="unit" column="unit" />
+        <result property="precisionValue" column="precision_value" />
+        <result property="measureRange" column="measure_range" />
+        <result property="protocol" column="protocol" />
+        <result property="address" column="address" />
+        <result property="collectInterval" column="collect_interval" />
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="remark" column="remark" />
+    </resultMap>
+
+    <sql id="selectConfigStationPointVo">
+        select t.id, t.station_id, s.station_name, t.device_id, t.device_name, t.point_name, t.unit, t.precision_value, t.measure_range, t.protocol, t.address, t.collect_interval, t.create_by, t.create_time, t.update_by, t.update_time, t.remark from config_station_point t left join config_station s on s.id = t.station_id
+    </sql>
+
+    <select id="selectConfigStationPointList" parameterType="ConfigStationPoint" resultMap="ConfigStationPointResult">
+        <include refid="selectConfigStationPointVo"/>
+        <where>
+            <if test="stationId != null"> and t.station_id = #{stationId}</if>
+            <if test="deviceId != null"> and t.device_id = #{deviceId}</if>
+            <if test="deviceName != null and deviceName != ''"> and t.device_name like concat('%', #{deviceName}, '%')</if>
+            <if test="pointName != null and pointName != ''"> and t.point_name like concat('%', #{pointName}, '%')</if>
+            <if test="precisionValue != null"> and t.precision_value = #{precisionValue}</if>
+            <if test="protocol != null"> and t.protocol = #{protocol}</if>
+            <if test="address != null and address != ''"> and t.address like concat('%', #{address}, '%')</if>
+        </where>
+        order by t.id desc
+    </select>
+
+    <select id="selectConfigStationPointById" parameterType="Long" resultMap="ConfigStationPointResult">
+        <include refid="selectConfigStationPointVo"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertConfigStationPoint" parameterType="ConfigStationPoint" useGeneratedKeys="true" keyProperty="id">
+        insert into config_station_point (station_id, device_id, device_name, point_name, unit, precision_value, measure_range, protocol, address, collect_interval, create_by, create_time, update_by, update_time, remark)
+        values (#{stationId}, #{deviceId}, #{deviceName}, #{pointName}, #{unit}, #{precisionValue}, #{measureRange}, #{protocol}, #{address}, #{collectInterval}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark})
+    </insert>
+
+    <update id="updateConfigStationPoint" parameterType="ConfigStationPoint">
+        update config_station_point
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="deviceId != null">device_id = #{deviceId},</if>
+            <if test="deviceName != null">device_name = #{deviceName},</if>
+            <if test="pointName != null">point_name = #{pointName},</if>
+            <if test="unit != null">unit = #{unit},</if>
+            <if test="precisionValue != null">precision_value = #{precisionValue},</if>
+            <if test="measureRange != null">measure_range = #{measureRange},</if>
+            <if test="protocol != null">protocol = #{protocol},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="collectInterval != null">collect_interval = #{collectInterval},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigStationPointById" parameterType="Long">
+        delete from config_station_point where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigStationPointByIds" parameterType="Long">
+        delete from config_station_point where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 79 - 0
forecast-backend-server/src/main/resources/mybatis/config/ConfigStationPowerLimitMapper.xml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.project.config.mapper.ConfigStationPowerLimitMapper">
+
+    <resultMap type="ConfigStationPowerLimit" id="ConfigStationPowerLimitResult">
+        <result property="id" column="id" />
+        <result property="stationId" column="station_id" />
+        <result property="stationName" column="station_name" />
+        <result property="limitType" column="limit_type" />
+        <result property="startDate" column="start_date" />
+        <result property="endDate" column="end_date" />
+        <result property="limitPercent" column="limit_percent" />
+        <result property="reason" column="reason" />
+        <result property="approver" column="approver" />
+        <result property="status" column="status" />
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="remark" column="remark" />
+    </resultMap>
+
+    <sql id="selectConfigStationPowerLimitVo">
+        select t.id, t.station_id, s.station_name, t.limit_type, t.start_date, t.end_date, t.limit_percent, t.reason, t.approver, t.status, t.create_by, t.create_time, t.update_by, t.update_time, t.remark from config_station_power_limit t left join config_station s on s.id = t.station_id
+    </sql>
+
+    <select id="selectConfigStationPowerLimitList" parameterType="ConfigStationPowerLimit" resultMap="ConfigStationPowerLimitResult">
+        <include refid="selectConfigStationPowerLimitVo"/>
+        <where>
+            <if test="stationId != null"> and t.station_id = #{stationId}</if>
+            <if test="limitType != null"> and t.limit_type = #{limitType}</if>
+            <if test="reason != null and reason != ''"> and t.reason like concat('%', #{reason}, '%')</if>
+            <if test="approver != null and approver != ''"> and t.approver like concat('%', #{approver}, '%')</if>
+            <if test="status != null"> and t.status = #{status}</if>
+        </where>
+        order by t.id desc
+    </select>
+
+    <select id="selectConfigStationPowerLimitById" parameterType="Long" resultMap="ConfigStationPowerLimitResult">
+        <include refid="selectConfigStationPowerLimitVo"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertConfigStationPowerLimit" parameterType="ConfigStationPowerLimit" useGeneratedKeys="true" keyProperty="id">
+        insert into config_station_power_limit (station_id, limit_type, start_date, end_date, limit_percent, reason, approver, status, create_by, create_time, update_by, update_time, remark)
+        values (#{stationId}, #{limitType}, #{startDate}, #{endDate}, #{limitPercent}, #{reason}, #{approver}, #{status}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark})
+    </insert>
+
+    <update id="updateConfigStationPowerLimit" parameterType="ConfigStationPowerLimit">
+        update config_station_power_limit
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="limitType != null">limit_type = #{limitType},</if>
+            <if test="startDate != null">start_date = #{startDate},</if>
+            <if test="endDate != null">end_date = #{endDate},</if>
+            <if test="limitPercent != null">limit_percent = #{limitPercent},</if>
+            <if test="reason != null">reason = #{reason},</if>
+            <if test="approver != null">approver = #{approver},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigStationPowerLimitById" parameterType="Long">
+        delete from config_station_power_limit where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigStationPowerLimitByIds" parameterType="Long">
+        delete from config_station_power_limit where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 82 - 0
forecast-backend-server/src/main/resources/mybatis/config/ConfigStationPvModuleMapper.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.project.config.mapper.ConfigStationPvModuleMapper">
+
+    <resultMap type="ConfigStationPvModule" id="ConfigStationPvModuleResult">
+        <result property="id" column="id" />
+        <result property="stationId" column="station_id" />
+        <result property="stationName" column="station_name" />
+        <result property="model" column="model" />
+        <result property="brand" column="brand" />
+        <result property="ratedPower" column="rated_power" />
+        <result property="moduleType" column="module_type" />
+        <result property="moduleCount" column="module_count" />
+        <result property="conversionEfficiency" column="conversion_efficiency" />
+        <result property="temperatureCoefficient" column="temperature_coefficient" />
+        <result property="installDate" column="install_date" />
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="remark" column="remark" />
+    </resultMap>
+
+    <sql id="selectConfigStationPvModuleVo">
+        select t.id, t.station_id, s.station_name, t.model, t.brand, t.rated_power, t.module_type, t.module_count, t.conversion_efficiency, t.temperature_coefficient, t.install_date, t.create_by, t.create_time, t.update_by, t.update_time, t.remark from config_station_pv_module t left join config_station s on s.id = t.station_id
+    </sql>
+
+    <select id="selectConfigStationPvModuleList" parameterType="ConfigStationPvModule" resultMap="ConfigStationPvModuleResult">
+        <include refid="selectConfigStationPvModuleVo"/>
+        <where>
+            <if test="stationId != null"> and t.station_id = #{stationId}</if>
+            <if test="model != null and model != ''"> and t.model like concat('%', #{model}, '%')</if>
+            <if test="brand != null and brand != ''"> and t.brand like concat('%', #{brand}, '%')</if>
+            <if test="ratedPower != null"> and t.rated_power = #{ratedPower}</if>
+            <if test="moduleType != null"> and t.module_type = #{moduleType}</if>
+            <if test="moduleCount != null"> and t.module_count = #{moduleCount}</if>
+        </where>
+        order by t.id desc
+    </select>
+
+    <select id="selectConfigStationPvModuleById" parameterType="Long" resultMap="ConfigStationPvModuleResult">
+        <include refid="selectConfigStationPvModuleVo"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertConfigStationPvModule" parameterType="ConfigStationPvModule" useGeneratedKeys="true" keyProperty="id">
+        insert into config_station_pv_module (station_id, model, brand, rated_power, module_type, module_count, conversion_efficiency, temperature_coefficient, install_date, create_by, create_time, update_by, update_time, remark)
+        values (#{stationId}, #{model}, #{brand}, #{ratedPower}, #{moduleType}, #{moduleCount}, #{conversionEfficiency}, #{temperatureCoefficient}, #{installDate}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark})
+    </insert>
+
+    <update id="updateConfigStationPvModule" parameterType="ConfigStationPvModule">
+        update config_station_pv_module
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="model != null">model = #{model},</if>
+            <if test="brand != null">brand = #{brand},</if>
+            <if test="ratedPower != null">rated_power = #{ratedPower},</if>
+            <if test="moduleType != null">module_type = #{moduleType},</if>
+            <if test="moduleCount != null">module_count = #{moduleCount},</if>
+            <if test="conversionEfficiency != null">conversion_efficiency = #{conversionEfficiency},</if>
+            <if test="temperatureCoefficient != null">temperature_coefficient = #{temperatureCoefficient},</if>
+            <if test="installDate != null">install_date = #{installDate},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigStationPvModuleById" parameterType="Long">
+        delete from config_station_pv_module where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigStationPvModuleByIds" parameterType="Long">
+        delete from config_station_pv_module where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 56 - 56
forecast-backend-server/src/main/resources/mybatis/monitor/SysLogininforMapper.xml

@@ -1,57 +1,57 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.monitor.mapper.SysLogininforMapper">
-
-	<resultMap type="SysLogininfor" id="SysLogininforResult">
-		<id     property="infoId"        column="info_id"           />
-		<result property="userName"      column="user_name"         />
-		<result property="status"        column="status"            />
-		<result property="ipaddr"        column="ipaddr"            />
-		<result property="loginLocation" column="login_location"    />
-		<result property="browser"       column="browser"           />
-		<result property="os"            column="os"                />
-		<result property="msg"           column="msg"               />
-		<result property="loginTime"     column="login_time"        />
-	</resultMap>
-
-	<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)
-	</insert>
-	
-	<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
-		select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
-		<where>
-			<if test="ipaddr != null and ipaddr != ''">
-				AND ipaddr like concat('%', #{ipaddr}, '%')
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-			<if test="userName != null and userName != ''">
-				AND user_name like concat('%', #{userName}, '%')
-			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				AND login_time &gt;= #{params.beginTime}
-			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				AND login_time &lt;= #{params.endTime}
-			</if>
-		</where>
-		order by info_id desc
-	</select>
-	
-	<delete id="deleteLogininforByIds" parameterType="Long">
- 		delete from sys_logininfor where info_id in
- 		<foreach collection="array" item="infoId" open="(" separator="," close=")">
- 			#{infoId}
-        </foreach> 
- 	</delete>
-    
-    <update id="cleanLogininfor">
-        truncate table sys_logininfor
-    </update>
-    
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.monitor.mapper.SysLogininforMapper">
+
+	<resultMap type="SysLogininfor" id="SysLogininforResult">
+		<id     property="infoId"        column="info_id"           />
+		<result property="userName"      column="user_name"         />
+		<result property="status"        column="status"            />
+		<result property="ipaddr"        column="ipaddr"            />
+		<result property="loginLocation" column="login_location"    />
+		<result property="browser"       column="browser"           />
+		<result property="os"            column="os"                />
+		<result property="msg"           column="msg"               />
+		<result property="loginTime"     column="login_time"        />
+	</resultMap>
+
+	<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)
+	</insert>
+	
+	<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
+		select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
+		<where>
+			<if test="ipaddr != null and ipaddr != ''">
+				AND ipaddr like concat('%', #{ipaddr}, '%')
+			</if>
+			<if test="status != null and status != ''">
+				AND status = #{status}
+			</if>
+			<if test="userName != null and userName != ''">
+				AND user_name like concat('%', #{userName}, '%')
+			</if>
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+				AND login_time &gt;= #{params.beginTime}
+			</if>
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+				AND login_time &lt;= #{params.endTime}
+			</if>
+		</where>
+		order by info_id desc
+	</select>
+	
+	<delete id="deleteLogininforByIds" parameterType="Long">
+ 		delete from sys_logininfor where info_id in
+ 		<foreach collection="array" item="infoId" open="(" separator="," close=")">
+ 			#{infoId}
+        </foreach> 
+ 	</delete>
+    
+    <update id="cleanLogininfor">
+        truncate table sys_logininfor
+    </update>
+    
 </mapper> 

+ 86 - 86
forecast-backend-server/src/main/resources/mybatis/monitor/SysOperLogMapper.xml

@@ -1,87 +1,87 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.monitor.mapper.SysOperLogMapper">
-
-	<resultMap type="SysOperLog" id="SysOperLogResult">
-		<id     property="operId"         column="oper_id"        />
-		<result property="title"          column="title"          />
-		<result property="businessType"   column="business_type"  />
-		<result property="method"         column="method"         />
-		<result property="requestMethod"  column="request_method" />
-		<result property="operatorType"   column="operator_type"  />
-		<result property="operName"       column="oper_name"      />
-		<result property="deptName"       column="dept_name"      />
-		<result property="operUrl"        column="oper_url"       />
-		<result property="operIp"         column="oper_ip"        />
-		<result property="operLocation"   column="oper_location"  />
-		<result property="operParam"      column="oper_param"     />
-		<result property="jsonResult"     column="json_result"    />
-		<result property="status"         column="status"         />
-		<result property="errorMsg"       column="error_msg"      />
-		<result property="operTime"       column="oper_time"      />
-		<result property="costTime"       column="cost_time"      />
-	</resultMap>
-
-	<sql id="selectOperLogVo">
-        select oper_id, 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, cost_time
-        from sys_oper_log
-    </sql>
-    
-	<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, cost_time, oper_time)
-        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, CURRENT_TIMESTAMP)
-	</insert>
-	
-	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
-		<include refid="selectOperLogVo"/>
-		<where>
-			<if test="operIp != null and operIp != ''">
-				AND oper_ip like concat('%', #{operIp}, '%')
-			</if>
-			<if test="title != null and title != ''">
-				AND title like concat('%', #{title}, '%')
-			</if>
-			<if test="businessType != null">
-				AND business_type = #{businessType}
-			</if>
-			<if test="businessTypes != null and businessTypes.length > 0">
-			    AND business_type in
-			    <foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
-		 			#{businessType}
-		        </foreach> 
-			</if>
-			<if test="status != null">
-				AND status = #{status}
-			</if>
-			<if test="operName != null and operName != ''">
-				AND oper_name like concat('%', #{operName}, '%')
-			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				AND oper_time &gt;= #{params.beginTime}
-			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				AND oper_time &lt;= #{params.endTime}
-			</if>
-		</where>
-		order by oper_id desc
-	</select>
-	
-	<delete id="deleteOperLogByIds" parameterType="Long">
- 		delete from sys_oper_log where oper_id in
- 		<foreach collection="array" item="operId" open="(" separator="," close=")">
- 			#{operId}
-        </foreach> 
- 	</delete>
- 	
- 	<select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult">
-		<include refid="selectOperLogVo"/>
-		where oper_id = #{operId}
-	</select>
-	
-	<update id="cleanOperLog">
-        truncate table sys_oper_log
-    </update>
-
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.monitor.mapper.SysOperLogMapper">
+
+	<resultMap type="SysOperLog" id="SysOperLogResult">
+		<id     property="operId"         column="oper_id"        />
+		<result property="title"          column="title"          />
+		<result property="businessType"   column="business_type"  />
+		<result property="method"         column="method"         />
+		<result property="requestMethod"  column="request_method" />
+		<result property="operatorType"   column="operator_type"  />
+		<result property="operName"       column="oper_name"      />
+		<result property="deptName"       column="dept_name"      />
+		<result property="operUrl"        column="oper_url"       />
+		<result property="operIp"         column="oper_ip"        />
+		<result property="operLocation"   column="oper_location"  />
+		<result property="operParam"      column="oper_param"     />
+		<result property="jsonResult"     column="json_result"    />
+		<result property="status"         column="status"         />
+		<result property="errorMsg"       column="error_msg"      />
+		<result property="operTime"       column="oper_time"      />
+		<result property="costTime"       column="cost_time"      />
+	</resultMap>
+
+	<sql id="selectOperLogVo">
+        select oper_id, 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, cost_time
+        from sys_oper_log
+    </sql>
+    
+	<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, cost_time, oper_time)
+        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, CURRENT_TIMESTAMP)
+	</insert>
+	
+	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
+		<include refid="selectOperLogVo"/>
+		<where>
+			<if test="operIp != null and operIp != ''">
+				AND oper_ip like concat('%', #{operIp}, '%')
+			</if>
+			<if test="title != null and title != ''">
+				AND title like concat('%', #{title}, '%')
+			</if>
+			<if test="businessType != null">
+				AND business_type = #{businessType}
+			</if>
+			<if test="businessTypes != null and businessTypes.length > 0">
+			    AND business_type in
+			    <foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
+		 			#{businessType}
+		        </foreach> 
+			</if>
+			<if test="status != null">
+				AND status = #{status}
+			</if>
+			<if test="operName != null and operName != ''">
+				AND oper_name like concat('%', #{operName}, '%')
+			</if>
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+				AND oper_time &gt;= #{params.beginTime}
+			</if>
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+				AND oper_time &lt;= #{params.endTime}
+			</if>
+		</where>
+		order by oper_id desc
+	</select>
+	
+	<delete id="deleteOperLogByIds" parameterType="Long">
+ 		delete from sys_oper_log where oper_id in
+ 		<foreach collection="array" item="operId" open="(" separator="," close=")">
+ 			#{operId}
+        </foreach> 
+ 	</delete>
+ 	
+ 	<select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult">
+		<include refid="selectOperLogVo"/>
+		where oper_id = #{operId}
+	</select>
+	
+	<update id="cleanOperLog">
+        truncate table sys_oper_log
+    </update>
+
 </mapper> 

+ 119 - 119
forecast-backend-server/src/main/resources/mybatis/system/SysConfigMapper.xml

@@ -1,120 +1,120 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.system.mapper.SysConfigMapper">
-    
-    <resultMap type="SysConfig" id="SysConfigResult">
-    	<id     property="configId"      column="config_id"      />
-        <result property="configName"    column="config_name"    />
-        <result property="configKey"     column="config_key"     />
-        <result property="configValue"   column="config_value"   />
-        <result property="configType"    column="config_type"    />
-        <result property="createBy"      column="create_by"      />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"      column="update_by"      />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-    
-    <sql id="selectConfigVo">
-        select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark 
-		from sys_config
-    </sql>
-    
-    <!-- 查询条件 -->
-	<sql id="sqlwhereSearch">
-		<where>
-			<if test="configId !=null">
-				and config_id = #{configId}
-			</if>
-			<if test="configKey !=null and configKey != ''">
-				and config_key = #{configKey}
-			</if>
-		</where>
-	</sql>
-    
-    <select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult">
-        <include refid="selectConfigVo"/>
-        <include refid="sqlwhereSearch"/>
-    </select>
-    
-    <select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
-        <include refid="selectConfigVo"/>
-        <where>
-			<if test="configName != null and configName != ''">
-				AND config_name like concat('%', #{configName}, '%')
-			</if>
-			<if test="configType != null and configType != ''">
-				AND config_type = #{configType}
-			</if>
-			<if test="configKey != null and configKey != ''">
-				AND config_key like concat('%', #{configKey}, '%')
-			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and to_char(create_time,'YYMMDD') &gt;= to_char(#{params.beginTime},'YYMMDD')
-			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				and to_char(create_time,'YYMMDD') &lt;= to_char(#{params.endTime},'YYMMDD')
-			</if>
-		</where>
-        <if test="orderByColumn != null and orderByColumn != ''">
-            ORDER BY ${orderByColumn} ${isAsc}
-        </if>
-    </select>
-    
-    <select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult">
-        <include refid="selectConfigVo"/>
-        where config_id = #{configId}
-    </select>
-    
-    <select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
-        <include refid="selectConfigVo"/>
-        where config_key = #{configKey} limit 1
-    </select>
-    
-    <insert id="insertConfig" parameterType="SysConfig">
-        insert into sys_config (
-			<if test="configName != null and configName != '' ">config_name,</if>
-			<if test="configKey != null and configKey != '' ">config_key,</if>
-			<if test="configValue != null and configValue != '' ">config_value,</if>
-			<if test="configType != null and configType != '' ">config_type,</if>
-			<if test="createBy != null and createBy != ''">create_by,</if>
-			<if test="remark != null and remark != ''">remark,</if>
- 			create_time
-        )values(
-			<if test="configName != null and configName != ''">#{configName},</if>
-			<if test="configKey != null and configKey != ''">#{configKey},</if>
-			<if test="configValue != null and configValue != ''">#{configValue},</if>
-			<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
-		)
-    </insert>
-	 
-    <update id="updateConfig" parameterType="SysConfig">
-        update sys_config 
-        <set>
-            <if test="configName != null and configName != ''">config_name = #{configName},</if>
-            <if test="configKey != null and configKey != ''">config_key = #{configKey},</if>
-            <if test="configValue != null and configValue != ''">config_value = #{configValue},</if>
-            <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
-        </set>
-        where config_id = #{configId}
-    </update>
-	
-    <delete id="deleteConfigById" parameterType="Long">
-        delete from sys_config where config_id = #{configId}
-    </delete>
-    
-    <delete id="deleteConfigByIds" parameterType="Long">
-        delete from sys_config where config_id in 
-        <foreach item="configId" collection="array" open="(" separator="," close=")">
-        	#{configId}
-        </foreach>
-    </delete>
-    
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.system.mapper.SysConfigMapper">
+    
+    <resultMap type="SysConfig" id="SysConfigResult">
+    	<id     property="configId"      column="config_id"      />
+        <result property="configName"    column="config_name"    />
+        <result property="configKey"     column="config_key"     />
+        <result property="configValue"   column="config_value"   />
+        <result property="configType"    column="config_type"    />
+        <result property="createBy"      column="create_by"      />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"      column="update_by"      />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+    
+    <sql id="selectConfigVo">
+        select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark 
+		from sys_config
+    </sql>
+    
+    <!-- 查询条件 -->
+	<sql id="sqlwhereSearch">
+		<where>
+			<if test="configId !=null">
+				and config_id = #{configId}
+			</if>
+			<if test="configKey !=null and configKey != ''">
+				and config_key = #{configKey}
+			</if>
+		</where>
+	</sql>
+    
+    <select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult">
+        <include refid="selectConfigVo"/>
+        <include refid="sqlwhereSearch"/>
+    </select>
+    
+    <select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
+        <include refid="selectConfigVo"/>
+        <where>
+			<if test="configName != null and configName != ''">
+				AND config_name like concat('%', #{configName}, '%')
+			</if>
+			<if test="configType != null and configType != ''">
+				AND config_type = #{configType}
+			</if>
+			<if test="configKey != null and configKey != ''">
+				AND config_key like concat('%', #{configKey}, '%')
+			</if>
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+				and to_char(create_time,'YYMMDD') &gt;= to_char(#{params.beginTime},'YYMMDD')
+			</if>
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+				and to_char(create_time,'YYMMDD') &lt;= to_char(#{params.endTime},'YYMMDD')
+			</if>
+		</where>
+        <if test="orderByColumn != null and orderByColumn != ''">
+            ORDER BY ${orderByColumn} ${isAsc}
+        </if>
+    </select>
+    
+    <select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult">
+        <include refid="selectConfigVo"/>
+        where config_id = #{configId}
+    </select>
+    
+    <select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
+        <include refid="selectConfigVo"/>
+        where config_key = #{configKey} limit 1
+    </select>
+    
+    <insert id="insertConfig" parameterType="SysConfig">
+        insert into sys_config (
+			<if test="configName != null and configName != '' ">config_name,</if>
+			<if test="configKey != null and configKey != '' ">config_key,</if>
+			<if test="configValue != null and configValue != '' ">config_value,</if>
+			<if test="configType != null and configType != '' ">config_type,</if>
+			<if test="createBy != null and createBy != ''">create_by,</if>
+			<if test="remark != null and remark != ''">remark,</if>
+ 			create_time
+        )values(
+			<if test="configName != null and configName != ''">#{configName},</if>
+			<if test="configKey != null and configKey != ''">#{configKey},</if>
+			<if test="configValue != null and configValue != ''">#{configValue},</if>
+			<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
+		)
+    </insert>
+	 
+    <update id="updateConfig" parameterType="SysConfig">
+        update sys_config 
+        <set>
+            <if test="configName != null and configName != ''">config_name = #{configName},</if>
+            <if test="configKey != null and configKey != ''">config_key = #{configKey},</if>
+            <if test="configValue != null and configValue != ''">config_value = #{configValue},</if>
+            <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
+        </set>
+        where config_id = #{configId}
+    </update>
+	
+    <delete id="deleteConfigById" parameterType="Long">
+        delete from sys_config where config_id = #{configId}
+    </delete>
+    
+    <delete id="deleteConfigByIds" parameterType="Long">
+        delete from sys_config where config_id in 
+        <foreach item="configId" collection="array" open="(" separator="," close=")">
+        	#{configId}
+        </foreach>
+    </delete>
+    
 </mapper>

+ 158 - 158
forecast-backend-server/src/main/resources/mybatis/system/SysDeptMapper.xml

@@ -1,159 +1,159 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.system.mapper.SysDeptMapper">
-
-	<resultMap type="SysDept" id="SysDeptResult">
-		<id     property="deptId"     column="dept_id"     />
-		<result property="parentId"   column="parent_id"   />
-		<result property="ancestors"  column="ancestors"   />
-		<result property="deptName"   column="dept_name"   />
-		<result property="orderNum"   column="order_num"   />
-		<result property="leader"     column="leader"      />
-		<result property="phone"      column="phone"       />
-		<result property="email"      column="email"       />
-		<result property="status"     column="status"      />
-		<result property="delFlag"    column="del_flag"    />
-		<result property="parentName" column="parent_name" />
-		<result property="createBy"   column="create_by"   />
-		<result property="createTime" column="create_time" />
-		<result property="updateBy"   column="update_by"   />
-		<result property="updateTime" column="update_time" />
-	</resultMap>
-	
-	<sql id="selectDeptVo">
-        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time 
-        from sys_dept d
-    </sql>
-    
-	<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
-        <include refid="selectDeptVo"/>
-        where d.del_flag = '0'
-		<if test="deptId != null and deptId != 0">
-			AND dept_id = #{deptId}
-		</if>
-        <if test="parentId != null and parentId != 0">
-			AND parent_id = #{parentId}
-		</if>
-		<if test="deptName != null and deptName != ''">
-			AND dept_name like concat('%', #{deptName}, '%')
-		</if>
-		<if test="status != null and status != ''">
-			AND status = #{status}
-		</if>
-		<!-- 数据范围过滤 -->
-		${params.dataScope}
-		order by d.parent_id, d.order_num
-    </select>
-    
-    <select id="selectDeptListByRoleId" resultType="Long">
-		select d.dept_id
-		from sys_dept d
-            left join sys_role_dept rd on d.dept_id = rd.dept_id
-        where rd.role_id = #{roleId}
-            <if test="deptCheckStrictly">
-              and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
-            </if>
-		order by d.parent_id, d.order_num
-	</select>
-    
-    <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
-		select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,
-			(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
-		from sys_dept d
-		where d.dept_id = #{deptId}
-	</select>
-    
-    <select id="checkDeptExistUser" parameterType="Long" resultType="int">
-		select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
-	</select>
-	
-	<select id="hasChildByDeptId" parameterType="Long" resultType="int">
-		select count(1) from sys_dept
-		where del_flag = '0' and parent_id = #{deptId} limit 1
-	</select>
-	
-	<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
-		select * from sys_dept where position(',' || #{deptId} || ',' in ',' || ancestors || ',') > 0
-	</select>
-	
-	<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
-		select count(*) from sys_dept where status = '0' and del_flag = '0' and position(',' || #{deptId} || ',' in ',' || ancestors || ',') > 0
-	</select>
-	
-	<select id="checkDeptNameUnique" resultMap="SysDeptResult">
-	    <include refid="selectDeptVo"/>
-		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
-	</select>
-    
-    <insert id="insertDept" parameterType="SysDept">
- 		insert into sys_dept(
- 			<if test="deptId != null and deptId != 0">dept_id,</if>
- 			<if test="parentId != null and parentId != 0">parent_id,</if>
- 			<if test="deptName != null and deptName != ''">dept_name,</if>
- 			<if test="ancestors != null and ancestors != ''">ancestors,</if>
- 			<if test="orderNum != null">order_num,</if>
- 			<if test="leader != null and leader != ''">leader,</if>
- 			<if test="phone != null and phone != ''">phone,</if>
- 			<if test="email != null and email != ''">email,</if>
- 			<if test="status != null">status,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
- 			create_time
- 		)values(
- 			<if test="deptId != null and deptId != 0">#{deptId},</if>
- 			<if test="parentId != null and parentId != 0">#{parentId},</if>
- 			<if test="deptName != null and deptName != ''">#{deptName},</if>
- 			<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
- 			<if test="orderNum != null">#{orderNum},</if>
- 			<if test="leader != null and leader != ''">#{leader},</if>
- 			<if test="phone != null and phone != ''">#{phone},</if>
- 			<if test="email != null and email != ''">#{email},</if>
- 			<if test="status != null">#{status},</if>
- 			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			CURRENT_TIMESTAMP
- 		)
-	</insert>
-	
-	<update id="updateDept" parameterType="SysDept">
- 		update sys_dept
- 		<set>
- 			<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
- 			<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
- 			<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
- 			<if test="orderNum != null">order_num = #{orderNum},</if>
- 			<if test="leader != null">leader = #{leader},</if>
- 			<if test="phone != null">phone = #{phone},</if>
- 			<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
- 		</set>
- 		where dept_id = #{deptId}
-	</update>
-	
-	<update id="updateDeptChildren" parameterType="java.util.List">
-	    update sys_dept set ancestors =
-	    <foreach collection="depts" item="item" index="index"
-	        separator=" " open="case dept_id" close="end">
-	        when #{item.deptId} then #{item.ancestors}
-	    </foreach>
-	    where dept_id in
-	    <foreach collection="depts" item="item" index="index"
-	        separator="," open="(" close=")">
-	        #{item.deptId}
-	    </foreach>
-	</update>
-	 
-	<update id="updateDeptStatusNormal" parameterType="Long">
- 	    update sys_dept set status = '0' where dept_id in 
- 	    <foreach collection="array" item="deptId" open="(" separator="," close=")">
-        	#{deptId}
-        </foreach>
-	</update>
-	
-	<delete id="deleteDeptById" parameterType="Long">
-		update sys_dept set del_flag = '2' where dept_id = #{deptId}
-	</delete>
-
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.system.mapper.SysDeptMapper">
+
+	<resultMap type="SysDept" id="SysDeptResult">
+		<id     property="deptId"     column="dept_id"     />
+		<result property="parentId"   column="parent_id"   />
+		<result property="ancestors"  column="ancestors"   />
+		<result property="deptName"   column="dept_name"   />
+		<result property="orderNum"   column="order_num"   />
+		<result property="leader"     column="leader"      />
+		<result property="phone"      column="phone"       />
+		<result property="email"      column="email"       />
+		<result property="status"     column="status"      />
+		<result property="delFlag"    column="del_flag"    />
+		<result property="parentName" column="parent_name" />
+		<result property="createBy"   column="create_by"   />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy"   column="update_by"   />
+		<result property="updateTime" column="update_time" />
+	</resultMap>
+	
+	<sql id="selectDeptVo">
+        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time 
+        from sys_dept d
+    </sql>
+    
+	<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
+        <include refid="selectDeptVo"/>
+        where d.del_flag = '0'
+		<if test="deptId != null and deptId != 0">
+			AND dept_id = #{deptId}
+		</if>
+        <if test="parentId != null and parentId != 0">
+			AND parent_id = #{parentId}
+		</if>
+		<if test="deptName != null and deptName != ''">
+			AND dept_name like concat('%', #{deptName}, '%')
+		</if>
+		<if test="status != null and status != ''">
+			AND status = #{status}
+		</if>
+		<!-- 数据范围过滤 -->
+		${params.dataScope}
+		order by d.parent_id, d.order_num
+    </select>
+    
+    <select id="selectDeptListByRoleId" resultType="Long">
+		select d.dept_id
+		from sys_dept d
+            left join sys_role_dept rd on d.dept_id = rd.dept_id
+        where rd.role_id = #{roleId}
+            <if test="deptCheckStrictly">
+              and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
+            </if>
+		order by d.parent_id, d.order_num
+	</select>
+    
+    <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
+		select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,
+			(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
+		from sys_dept d
+		where d.dept_id = #{deptId}
+	</select>
+    
+    <select id="checkDeptExistUser" parameterType="Long" resultType="int">
+		select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
+	</select>
+	
+	<select id="hasChildByDeptId" parameterType="Long" resultType="int">
+		select count(1) from sys_dept
+		where del_flag = '0' and parent_id = #{deptId} limit 1
+	</select>
+	
+	<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
+		select * from sys_dept where position(',' || #{deptId} || ',' in ',' || ancestors || ',') > 0
+	</select>
+	
+	<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
+		select count(*) from sys_dept where status = '0' and del_flag = '0' and position(',' || #{deptId} || ',' in ',' || ancestors || ',') > 0
+	</select>
+	
+	<select id="checkDeptNameUnique" resultMap="SysDeptResult">
+	    <include refid="selectDeptVo"/>
+		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
+	</select>
+    
+    <insert id="insertDept" parameterType="SysDept">
+ 		insert into sys_dept(
+ 			<if test="deptId != null and deptId != 0">dept_id,</if>
+ 			<if test="parentId != null and parentId != 0">parent_id,</if>
+ 			<if test="deptName != null and deptName != ''">dept_name,</if>
+ 			<if test="ancestors != null and ancestors != ''">ancestors,</if>
+ 			<if test="orderNum != null">order_num,</if>
+ 			<if test="leader != null and leader != ''">leader,</if>
+ 			<if test="phone != null and phone != ''">phone,</if>
+ 			<if test="email != null and email != ''">email,</if>
+ 			<if test="status != null">status,</if>
+ 			<if test="createBy != null and createBy != ''">create_by,</if>
+ 			create_time
+ 		)values(
+ 			<if test="deptId != null and deptId != 0">#{deptId},</if>
+ 			<if test="parentId != null and parentId != 0">#{parentId},</if>
+ 			<if test="deptName != null and deptName != ''">#{deptName},</if>
+ 			<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
+ 			<if test="orderNum != null">#{orderNum},</if>
+ 			<if test="leader != null and leader != ''">#{leader},</if>
+ 			<if test="phone != null and phone != ''">#{phone},</if>
+ 			<if test="email != null and email != ''">#{email},</if>
+ 			<if test="status != null">#{status},</if>
+ 			<if test="createBy != null and createBy != ''">#{createBy},</if>
+ 			CURRENT_TIMESTAMP
+ 		)
+	</insert>
+	
+	<update id="updateDept" parameterType="SysDept">
+ 		update sys_dept
+ 		<set>
+ 			<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
+ 			<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
+ 			<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
+ 			<if test="orderNum != null">order_num = #{orderNum},</if>
+ 			<if test="leader != null">leader = #{leader},</if>
+ 			<if test="phone != null">phone = #{phone},</if>
+ 			<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
+ 		</set>
+ 		where dept_id = #{deptId}
+	</update>
+	
+	<update id="updateDeptChildren" parameterType="java.util.List">
+	    update sys_dept set ancestors =
+	    <foreach collection="depts" item="item" index="index"
+	        separator=" " open="case dept_id" close="end">
+	        when #{item.deptId} then #{item.ancestors}
+	    </foreach>
+	    where dept_id in
+	    <foreach collection="depts" item="item" index="index"
+	        separator="," open="(" close=")">
+	        #{item.deptId}
+	    </foreach>
+	</update>
+	 
+	<update id="updateDeptStatusNormal" parameterType="Long">
+ 	    update sys_dept set status = '0' where dept_id in 
+ 	    <foreach collection="array" item="deptId" open="(" separator="," close=")">
+        	#{deptId}
+        </foreach>
+	</update>
+	
+	<delete id="deleteDeptById" parameterType="Long">
+		update sys_dept set del_flag = '2' where dept_id = #{deptId}
+	</delete>
+
 </mapper> 

+ 123 - 123
forecast-backend-server/src/main/resources/mybatis/system/SysDictDataMapper.xml

@@ -1,124 +1,124 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.system.mapper.SysDictDataMapper">
-	
-	<resultMap type="SysDictData" id="SysDictDataResult">
-		<id     property="dictCode"   column="dict_code"   />
-		<result property="dictSort"   column="dict_sort"   />
-		<result property="dictLabel"  column="dict_label"  />
-		<result property="dictValue"  column="dict_value"  />
-		<result property="dictType"   column="dict_type"   />
-		<result property="cssClass"   column="css_class"   />
-		<result property="listClass"  column="list_class"  />
-		<result property="isDefault"  column="is_default"  />
-		<result property="status"     column="status"      />
-		<result property="createBy"   column="create_by"   />
-		<result property="createTime" column="create_time" />
-		<result property="updateBy"   column="update_by"   />
-		<result property="updateTime" column="update_time" />
-	</resultMap>
-	
-	<sql id="selectDictDataVo">
-        select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark 
-		from sys_dict_data
-    </sql>
-
-	<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
-	    <include refid="selectDictDataVo"/>
-		<where>
-		    <if test="dictType != null and dictType != ''">
-				AND dict_type = #{dictType}
-			</if>
-			<if test="dictLabel != null and dictLabel != ''">
-				AND dict_label like concat('%', #{dictLabel}, '%')
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-		</where>
-		order by dict_sort asc
-	</select>
-	
-	<select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
-		<include refid="selectDictDataVo"/>
-		where status = '0' and dict_type = #{dictType} order by dict_sort asc
-	</select>
-	
-	<select id="selectDictLabel" resultType="String">
-		select dict_label from sys_dict_data
-		where dict_type = #{dictType} and dict_value = #{dictValue}
-	</select>
-	
-	<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
-		<include refid="selectDictDataVo"/>
-		where dict_code = #{dictCode}
-	</select>
-	
-	<select id="countDictDataByType" resultType="Integer">
-	    select count(1) from sys_dict_data where dict_type=#{dictType}  
-	</select>
-	
-	<delete id="deleteDictDataById" parameterType="Long">
- 		delete from sys_dict_data where dict_code = #{dictCode}
- 	</delete>
- 	
- 	<delete id="deleteDictDataByIds" parameterType="Long">
- 		delete from sys_dict_data where dict_code in
- 		<foreach collection="array" item="dictCode" open="(" separator="," close=")">
- 			#{dictCode}
-        </foreach> 
- 	</delete>
-	
-	<update id="updateDictData" parameterType="SysDictData">
- 		update sys_dict_data
- 		<set>
- 			<if test="dictSort != null">dict_sort = #{dictSort},</if>
- 			<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
- 			<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
- 			<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
- 			<if test="cssClass != null">css_class = #{cssClass},</if>
- 			<if test="listClass != null">list_class = #{listClass},</if>
- 			<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
- 			<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
- 		</set>
- 		where dict_code = #{dictCode}
-	</update>
-	
-	<update id="updateDictDataType" parameterType="String">
- 		update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
-	</update>
- 	
- 	<insert id="insertDictData" parameterType="SysDictData">
- 		insert into sys_dict_data(
- 			<if test="dictSort != null">dict_sort,</if>
- 			<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
- 			<if test="dictValue != null and dictValue != ''">dict_value,</if>
- 			<if test="dictType != null and dictType != ''">dict_type,</if>
- 			<if test="cssClass != null and cssClass != ''">css_class,</if>
- 			<if test="listClass != null and listClass != ''">list_class,</if>
- 			<if test="isDefault != null and isDefault != ''">is_default,</if>
- 			<if test="status != null">status,</if>
- 			<if test="remark != null and remark != ''">remark,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
- 			create_time
- 		)values(
- 		    <if test="dictSort != null">#{dictSort},</if>
- 		    <if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
- 			<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
- 			<if test="dictType != null and dictType != ''">#{dictType},</if>
- 			<if test="cssClass != null and cssClass != ''">#{cssClass},</if>
- 			<if test="listClass != null and listClass != ''">#{listClass},</if>
- 			<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
- 			<if test="status != null">#{status},</if>
- 			<if test="remark != null and remark != ''">#{remark},</if>
- 			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			CURRENT_TIMESTAMP
- 		)
-	</insert>
-	
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.system.mapper.SysDictDataMapper">
+	
+	<resultMap type="SysDictData" id="SysDictDataResult">
+		<id     property="dictCode"   column="dict_code"   />
+		<result property="dictSort"   column="dict_sort"   />
+		<result property="dictLabel"  column="dict_label"  />
+		<result property="dictValue"  column="dict_value"  />
+		<result property="dictType"   column="dict_type"   />
+		<result property="cssClass"   column="css_class"   />
+		<result property="listClass"  column="list_class"  />
+		<result property="isDefault"  column="is_default"  />
+		<result property="status"     column="status"      />
+		<result property="createBy"   column="create_by"   />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy"   column="update_by"   />
+		<result property="updateTime" column="update_time" />
+	</resultMap>
+	
+	<sql id="selectDictDataVo">
+        select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark 
+		from sys_dict_data
+    </sql>
+
+	<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
+	    <include refid="selectDictDataVo"/>
+		<where>
+		    <if test="dictType != null and dictType != ''">
+				AND dict_type = #{dictType}
+			</if>
+			<if test="dictLabel != null and dictLabel != ''">
+				AND dict_label like concat('%', #{dictLabel}, '%')
+			</if>
+			<if test="status != null and status != ''">
+				AND status = #{status}
+			</if>
+		</where>
+		order by dict_sort asc
+	</select>
+	
+	<select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
+		<include refid="selectDictDataVo"/>
+		where status = '0' and dict_type = #{dictType} order by dict_sort asc
+	</select>
+	
+	<select id="selectDictLabel" resultType="String">
+		select dict_label from sys_dict_data
+		where dict_type = #{dictType} and dict_value = #{dictValue}
+	</select>
+	
+	<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
+		<include refid="selectDictDataVo"/>
+		where dict_code = #{dictCode}
+	</select>
+	
+	<select id="countDictDataByType" resultType="Integer">
+	    select count(1) from sys_dict_data where dict_type=#{dictType}  
+	</select>
+	
+	<delete id="deleteDictDataById" parameterType="Long">
+ 		delete from sys_dict_data where dict_code = #{dictCode}
+ 	</delete>
+ 	
+ 	<delete id="deleteDictDataByIds" parameterType="Long">
+ 		delete from sys_dict_data where dict_code in
+ 		<foreach collection="array" item="dictCode" open="(" separator="," close=")">
+ 			#{dictCode}
+        </foreach> 
+ 	</delete>
+	
+	<update id="updateDictData" parameterType="SysDictData">
+ 		update sys_dict_data
+ 		<set>
+ 			<if test="dictSort != null">dict_sort = #{dictSort},</if>
+ 			<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
+ 			<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
+ 			<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
+ 			<if test="cssClass != null">css_class = #{cssClass},</if>
+ 			<if test="listClass != null">list_class = #{listClass},</if>
+ 			<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
+ 			<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
+ 		</set>
+ 		where dict_code = #{dictCode}
+	</update>
+	
+	<update id="updateDictDataType" parameterType="String">
+ 		update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
+	</update>
+ 	
+ 	<insert id="insertDictData" parameterType="SysDictData">
+ 		insert into sys_dict_data(
+ 			<if test="dictSort != null">dict_sort,</if>
+ 			<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
+ 			<if test="dictValue != null and dictValue != ''">dict_value,</if>
+ 			<if test="dictType != null and dictType != ''">dict_type,</if>
+ 			<if test="cssClass != null and cssClass != ''">css_class,</if>
+ 			<if test="listClass != null and listClass != ''">list_class,</if>
+ 			<if test="isDefault != null and isDefault != ''">is_default,</if>
+ 			<if test="status != null">status,</if>
+ 			<if test="remark != null and remark != ''">remark,</if>
+ 			<if test="createBy != null and createBy != ''">create_by,</if>
+ 			create_time
+ 		)values(
+ 		    <if test="dictSort != null">#{dictSort},</if>
+ 		    <if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
+ 			<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
+ 			<if test="dictType != null and dictType != ''">#{dictType},</if>
+ 			<if test="cssClass != null and cssClass != ''">#{cssClass},</if>
+ 			<if test="listClass != null and listClass != ''">#{listClass},</if>
+ 			<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
+ 			<if test="status != null">#{status},</if>
+ 			<if test="remark != null and remark != ''">#{remark},</if>
+ 			<if test="createBy != null and createBy != ''">#{createBy},</if>
+ 			CURRENT_TIMESTAMP
+ 		)
+	</insert>
+	
 </mapper> 

+ 107 - 107
forecast-backend-server/src/main/resources/mybatis/system/SysDictTypeMapper.xml

@@ -1,108 +1,108 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.system.mapper.SysDictTypeMapper">
-
-	<resultMap type="SysDictType" id="SysDictTypeResult">
-		<id     property="dictId"     column="dict_id"     />
-		<result property="dictName"   column="dict_name"   />
-		<result property="dictType"   column="dict_type"   />
-		<result property="status"     column="status"      />
-		<result property="createBy"   column="create_by"   />
-		<result property="createTime" column="create_time" />
-		<result property="updateBy"   column="update_by"   />
-		<result property="updateTime" column="update_time" />
-	</resultMap>
-	
-	<sql id="selectDictTypeVo">
-        select dict_id, dict_name, dict_type, status, create_by, create_time, remark 
-		from sys_dict_type
-    </sql>
-
-	<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
-	    <include refid="selectDictTypeVo"/>
-		<where>
-		    <if test="dictName != null and dictName != ''">
-				AND dict_name like concat('%', #{dictName}, '%')
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-			<if test="dictType != null and dictType != ''">
-				AND dict_type like concat('%', #{dictType}, '%')
-			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and to_char(create_time,'YYMMDD') &gt;= to_char(#{params.beginTime},'YYMMDD')
-			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				and to_char(create_time,'YYMMDD') &lt;= to_char(#{params.endTime},'YYMMDD')
-			</if>
-	    </where>
-		<if test="orderByColumn != null and orderByColumn != ''">
-			ORDER BY ${orderByColumn} ${isAsc}
-		</if>
-	</select>
-	
-	<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
-		<include refid="selectDictTypeVo"/>
-	</select>
-	
-	<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
-		<include refid="selectDictTypeVo"/>
-		where dict_id = #{dictId}
-	</select>
-	
-	<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
-		<include refid="selectDictTypeVo"/>
-		where dict_type = #{dictType}
-	</select>
-	
-	<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
-		<include refid="selectDictTypeVo"/>
-		where dict_type = #{dictType} limit 1
-	</select>
-	
-	<delete id="deleteDictTypeById" parameterType="Long">
- 		delete from sys_dict_type where dict_id = #{dictId}
- 	</delete>
- 	
- 	<delete id="deleteDictTypeByIds" parameterType="Long">
- 		delete from sys_dict_type where dict_id in
- 		<foreach collection="array" item="dictId" open="(" separator="," close=")">
- 			#{dictId}
-        </foreach> 
- 	</delete>
-
- 	<update id="updateDictType" parameterType="SysDictType">
- 		update sys_dict_type
- 		<set>
- 			<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
- 			<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
- 			<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
- 		</set>
- 		where dict_id = #{dictId}
-	</update>
- 	
- 	<insert id="insertDictType" parameterType="SysDictType">
- 		insert into sys_dict_type(
- 			<if test="dictName != null and dictName != ''">dict_name,</if>
- 			<if test="dictType != null and dictType != ''">dict_type,</if>
- 			<if test="status != null">status,</if>
- 			<if test="remark != null and remark != ''">remark,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
- 			create_time
- 		)values(
- 			<if test="dictName != null and dictName != ''">#{dictName},</if>
- 			<if test="dictType != null and dictType != ''">#{dictType},</if>
- 			<if test="status != null">#{status},</if>
- 			<if test="remark != null and remark != ''">#{remark},</if>
- 			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			CURRENT_TIMESTAMP
- 		)
-	</insert>
-	
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.system.mapper.SysDictTypeMapper">
+
+	<resultMap type="SysDictType" id="SysDictTypeResult">
+		<id     property="dictId"     column="dict_id"     />
+		<result property="dictName"   column="dict_name"   />
+		<result property="dictType"   column="dict_type"   />
+		<result property="status"     column="status"      />
+		<result property="createBy"   column="create_by"   />
+		<result property="createTime" column="create_time" />
+		<result property="updateBy"   column="update_by"   />
+		<result property="updateTime" column="update_time" />
+	</resultMap>
+	
+	<sql id="selectDictTypeVo">
+        select dict_id, dict_name, dict_type, status, create_by, create_time, remark 
+		from sys_dict_type
+    </sql>
+
+	<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
+	    <include refid="selectDictTypeVo"/>
+		<where>
+		    <if test="dictName != null and dictName != ''">
+				AND dict_name like concat('%', #{dictName}, '%')
+			</if>
+			<if test="status != null and status != ''">
+				AND status = #{status}
+			</if>
+			<if test="dictType != null and dictType != ''">
+				AND dict_type like concat('%', #{dictType}, '%')
+			</if>
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+				and to_char(create_time,'YYMMDD') &gt;= to_char(#{params.beginTime},'YYMMDD')
+			</if>
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+				and to_char(create_time,'YYMMDD') &lt;= to_char(#{params.endTime},'YYMMDD')
+			</if>
+	    </where>
+		<if test="orderByColumn != null and orderByColumn != ''">
+			ORDER BY ${orderByColumn} ${isAsc}
+		</if>
+	</select>
+	
+	<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
+		<include refid="selectDictTypeVo"/>
+	</select>
+	
+	<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
+		<include refid="selectDictTypeVo"/>
+		where dict_id = #{dictId}
+	</select>
+	
+	<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
+		<include refid="selectDictTypeVo"/>
+		where dict_type = #{dictType}
+	</select>
+	
+	<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
+		<include refid="selectDictTypeVo"/>
+		where dict_type = #{dictType} limit 1
+	</select>
+	
+	<delete id="deleteDictTypeById" parameterType="Long">
+ 		delete from sys_dict_type where dict_id = #{dictId}
+ 	</delete>
+ 	
+ 	<delete id="deleteDictTypeByIds" parameterType="Long">
+ 		delete from sys_dict_type where dict_id in
+ 		<foreach collection="array" item="dictId" open="(" separator="," close=")">
+ 			#{dictId}
+        </foreach> 
+ 	</delete>
+
+ 	<update id="updateDictType" parameterType="SysDictType">
+ 		update sys_dict_type
+ 		<set>
+ 			<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
+ 			<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
+ 			<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
+ 		</set>
+ 		where dict_id = #{dictId}
+	</update>
+ 	
+ 	<insert id="insertDictType" parameterType="SysDictType">
+ 		insert into sys_dict_type(
+ 			<if test="dictName != null and dictName != ''">dict_name,</if>
+ 			<if test="dictType != null and dictType != ''">dict_type,</if>
+ 			<if test="status != null">status,</if>
+ 			<if test="remark != null and remark != ''">remark,</if>
+ 			<if test="createBy != null and createBy != ''">create_by,</if>
+ 			create_time
+ 		)values(
+ 			<if test="dictName != null and dictName != ''">#{dictName},</if>
+ 			<if test="dictType != null and dictType != ''">#{dictType},</if>
+ 			<if test="status != null">#{status},</if>
+ 			<if test="remark != null and remark != ''">#{remark},</if>
+ 			<if test="createBy != null and createBy != ''">#{createBy},</if>
+ 			CURRENT_TIMESTAMP
+ 		)
+	</insert>
+	
 </mapper> 

+ 93 - 93
forecast-backend-server/src/main/resources/mybatis/system/SysJobLogMapper.xml

@@ -1,94 +1,94 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.monitor.mapper.SysJobLogMapper">
-
-	<resultMap type="SysJobLog" id="SysJobLogResult">
-		<id     property="jobLogId"       column="job_log_id"      />
-		<result property="jobName"        column="job_name"        />
-		<result property="jobGroup"       column="job_group"       />
-		<result property="invokeTarget"   column="invoke_target"   />
-		<result property="jobMessage"     column="job_message"     />
-		<result property="status"         column="status"          />
-		<result property="exceptionInfo"  column="exception_info"  />
-		<result property="createTime"     column="create_time"     />
-	</resultMap>
-	
-	<sql id="selectJobLogVo">
-        select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time 
-		from sys_job_log
-    </sql>
-	
-	<select id="selectJobLogList" parameterType="SysJobLog" resultMap="SysJobLogResult">
-		<include refid="selectJobLogVo"/>
-		<where>
-			<if test="jobName != null and jobName != ''">
-				AND job_name like concat('%', #{jobName}, '%')
-			</if>
-			<if test="jobGroup != null and jobGroup != ''">
-				AND job_group = #{jobGroup}
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-			<if test="invokeTarget != null and invokeTarget != ''">
-				AND invoke_target like concat('%', #{invokeTarget}, '%')
-			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and to_char(create_time,'YYMMDD') &gt;= to_char(#{params.beginTime},'YYMMDD')
-			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				and to_char(create_time,'YYMMDD') &lt;= to_char(#{params.endTime},'YYMMDD')
-			</if>
-		</where>
-		order by create_time desc
-	</select>
-	
-	<select id="selectJobLogAll" resultMap="SysJobLogResult">
-		<include refid="selectJobLogVo"/>
-	</select>
-	
-	<select id="selectJobLogById" parameterType="Long" resultMap="SysJobLogResult">
-		<include refid="selectJobLogVo"/>
-		where job_log_id = #{jobLogId}
-	</select>
-	
-	<delete id="deleteJobLogById" parameterType="Long">
- 		delete from sys_job_log where job_log_id = #{jobLogId}
- 	</delete>
- 	
- 	<delete id="deleteJobLogByIds" parameterType="Long">
- 		delete from sys_job_log where job_log_id in
- 		<foreach collection="array" item="jobLogId" open="(" separator="," close=")">
- 			#{jobLogId}
-        </foreach> 
- 	</delete>
- 	
- 	<update id="cleanJobLog">
-        truncate table sys_job_log
-    </update>
- 	
- 	<insert id="insertJobLog" parameterType="SysJobLog">
- 		insert into sys_job_log(
- 			<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
- 			<if test="jobName != null and jobName != ''">job_name,</if>
- 			<if test="jobGroup != null and jobGroup != ''">job_group,</if>
- 			<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if>
- 			<if test="jobMessage != null and jobMessage != ''">job_message,</if>
- 			<if test="status != null and status != ''">status,</if>
- 			<if test="exceptionInfo != null and exceptionInfo != ''">exception_info,</if>
- 			create_time
- 		)values(
- 			<if test="jobLogId != null and jobLogId != 0">#{jobLogId},</if>
- 			<if test="jobName != null and jobName != ''">#{jobName},</if>
- 			<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
- 			<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if>
- 			<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
- 		)
-	</insert>
-
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.monitor.mapper.SysJobLogMapper">
+
+	<resultMap type="SysJobLog" id="SysJobLogResult">
+		<id     property="jobLogId"       column="job_log_id"      />
+		<result property="jobName"        column="job_name"        />
+		<result property="jobGroup"       column="job_group"       />
+		<result property="invokeTarget"   column="invoke_target"   />
+		<result property="jobMessage"     column="job_message"     />
+		<result property="status"         column="status"          />
+		<result property="exceptionInfo"  column="exception_info"  />
+		<result property="createTime"     column="create_time"     />
+	</resultMap>
+	
+	<sql id="selectJobLogVo">
+        select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time 
+		from sys_job_log
+    </sql>
+	
+	<select id="selectJobLogList" parameterType="SysJobLog" resultMap="SysJobLogResult">
+		<include refid="selectJobLogVo"/>
+		<where>
+			<if test="jobName != null and jobName != ''">
+				AND job_name like concat('%', #{jobName}, '%')
+			</if>
+			<if test="jobGroup != null and jobGroup != ''">
+				AND job_group = #{jobGroup}
+			</if>
+			<if test="status != null and status != ''">
+				AND status = #{status}
+			</if>
+			<if test="invokeTarget != null and invokeTarget != ''">
+				AND invoke_target like concat('%', #{invokeTarget}, '%')
+			</if>
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+				and to_char(create_time,'YYMMDD') &gt;= to_char(#{params.beginTime},'YYMMDD')
+			</if>
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+				and to_char(create_time,'YYMMDD') &lt;= to_char(#{params.endTime},'YYMMDD')
+			</if>
+		</where>
+		order by create_time desc
+	</select>
+	
+	<select id="selectJobLogAll" resultMap="SysJobLogResult">
+		<include refid="selectJobLogVo"/>
+	</select>
+	
+	<select id="selectJobLogById" parameterType="Long" resultMap="SysJobLogResult">
+		<include refid="selectJobLogVo"/>
+		where job_log_id = #{jobLogId}
+	</select>
+	
+	<delete id="deleteJobLogById" parameterType="Long">
+ 		delete from sys_job_log where job_log_id = #{jobLogId}
+ 	</delete>
+ 	
+ 	<delete id="deleteJobLogByIds" parameterType="Long">
+ 		delete from sys_job_log where job_log_id in
+ 		<foreach collection="array" item="jobLogId" open="(" separator="," close=")">
+ 			#{jobLogId}
+        </foreach> 
+ 	</delete>
+ 	
+ 	<update id="cleanJobLog">
+        truncate table sys_job_log
+    </update>
+ 	
+ 	<insert id="insertJobLog" parameterType="SysJobLog">
+ 		insert into sys_job_log(
+ 			<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
+ 			<if test="jobName != null and jobName != ''">job_name,</if>
+ 			<if test="jobGroup != null and jobGroup != ''">job_group,</if>
+ 			<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if>
+ 			<if test="jobMessage != null and jobMessage != ''">job_message,</if>
+ 			<if test="status != null and status != ''">status,</if>
+ 			<if test="exceptionInfo != null and exceptionInfo != ''">exception_info,</if>
+ 			create_time
+ 		)values(
+ 			<if test="jobLogId != null and jobLogId != 0">#{jobLogId},</if>
+ 			<if test="jobName != null and jobName != ''">#{jobName},</if>
+ 			<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
+ 			<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if>
+ 			<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
+ 		)
+	</insert>
+
 </mapper> 

+ 113 - 113
forecast-backend-server/src/main/resources/mybatis/system/SysJobMapper.xml

@@ -1,114 +1,114 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.monitor.mapper.SysJobMapper">
-
-	<resultMap type="SysJob" id="SysJobResult">
-		<id     property="jobId"          column="job_id"          />
-		<result property="jobName"        column="job_name"        />
-		<result property="jobGroup"       column="job_group"       />
-		<result property="invokeTarget"   column="invoke_target"   />
-		<result property="cronExpression" column="cron_expression" />
-		<result property="misfirePolicy"  column="misfire_policy"  />
-		<result property="concurrent"     column="concurrent"      />
-		<result property="status"         column="status"          />
-		<result property="createBy"       column="create_by"       />
-		<result property="createTime"     column="create_time"     />
-		<result property="updateBy"       column="update_by"       />
-		<result property="updateTime"     column="update_time"     />
-		<result property="remark"         column="remark"          />
-	</resultMap>
-	
-	<sql id="selectJobVo">
-        select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark 
-		from sys_job
-    </sql>
-	
-	<select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult">
-		<include refid="selectJobVo"/>
-		<where>
-			<if test="jobName != null and jobName != ''">
-				AND job_name like concat('%', #{jobName}, '%')
-			</if>
-			<if test="jobGroup != null and jobGroup != ''">
-				AND job_group = #{jobGroup}
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-			<if test="invokeTarget != null and invokeTarget != ''">
-				AND invoke_target like concat('%', #{invokeTarget}, '%')
-			</if>
-		</where>
-		<if test="orderByColumn != null and orderByColumn != ''">
-			ORDER BY ${orderByColumn} ${isAsc}
-		</if>
-	</select>
-	
-	<select id="selectJobAll" resultMap="SysJobResult">
-		<include refid="selectJobVo"/>
-	</select>
-	
-	<select id="selectJobById" parameterType="Long" resultMap="SysJobResult">
-		<include refid="selectJobVo"/>
-		where job_id = #{jobId}
-	</select>
-	
-	<delete id="deleteJobById" parameterType="Long">
- 		delete from sys_job where job_id = #{jobId}
- 	</delete>
- 	
- 	<delete id="deleteJobByIds" parameterType="Long">
- 		delete from sys_job where job_id in
- 		<foreach collection="array" item="jobId" open="(" separator="," close=")">
- 			#{jobId}
-        </foreach> 
- 	</delete>
- 	
- 	<update id="updateJob" parameterType="SysJob">
- 		update sys_job
- 		<set>
- 			<if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
- 			<if test="jobGroup != null and jobGroup != ''">job_group = #{jobGroup},</if>
- 			<if test="invokeTarget != null and invokeTarget != ''">invoke_target = #{invokeTarget},</if>
- 			<if test="cronExpression != null and cronExpression != ''">cron_expression = #{cronExpression},</if>
- 			<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy = #{misfirePolicy},</if>
- 			<if test="concurrent != null and concurrent != ''">concurrent = #{concurrent},</if>
- 			<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
- 		</set>
- 		where job_id = #{jobId}
-	</update>
- 	
- 	<insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId">
- 		insert into sys_job(
- 			<if test="jobId != null and jobId != 0">job_id,</if>
- 			<if test="jobName != null and jobName != ''">job_name,</if>
- 			<if test="jobGroup != null and jobGroup != ''">job_group,</if>
- 			<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if>
- 			<if test="cronExpression != null and cronExpression != ''">cron_expression,</if>
- 			<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy,</if>
- 			<if test="concurrent != null and concurrent != ''">concurrent,</if>
- 			<if test="status != null and status != ''">status,</if>
- 			<if test="remark != null and remark != ''">remark,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
- 			create_time
- 		)values(
- 			<if test="jobId != null and jobId != 0">#{jobId},</if>
- 			<if test="jobName != null and jobName != ''">#{jobName},</if>
- 			<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
- 			<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if>
- 			<if test="cronExpression != null and cronExpression != ''">#{cronExpression},</if>
- 			<if test="misfirePolicy != null and misfirePolicy != ''">#{misfirePolicy},</if>
- 			<if test="concurrent != null and concurrent != ''">#{concurrent},</if>
- 			<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
- 		)
-	</insert>
-
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.monitor.mapper.SysJobMapper">
+
+	<resultMap type="SysJob" id="SysJobResult">
+		<id     property="jobId"          column="job_id"          />
+		<result property="jobName"        column="job_name"        />
+		<result property="jobGroup"       column="job_group"       />
+		<result property="invokeTarget"   column="invoke_target"   />
+		<result property="cronExpression" column="cron_expression" />
+		<result property="misfirePolicy"  column="misfire_policy"  />
+		<result property="concurrent"     column="concurrent"      />
+		<result property="status"         column="status"          />
+		<result property="createBy"       column="create_by"       />
+		<result property="createTime"     column="create_time"     />
+		<result property="updateBy"       column="update_by"       />
+		<result property="updateTime"     column="update_time"     />
+		<result property="remark"         column="remark"          />
+	</resultMap>
+	
+	<sql id="selectJobVo">
+        select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark 
+		from sys_job
+    </sql>
+	
+	<select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult">
+		<include refid="selectJobVo"/>
+		<where>
+			<if test="jobName != null and jobName != ''">
+				AND job_name like concat('%', #{jobName}, '%')
+			</if>
+			<if test="jobGroup != null and jobGroup != ''">
+				AND job_group = #{jobGroup}
+			</if>
+			<if test="status != null and status != ''">
+				AND status = #{status}
+			</if>
+			<if test="invokeTarget != null and invokeTarget != ''">
+				AND invoke_target like concat('%', #{invokeTarget}, '%')
+			</if>
+		</where>
+		<if test="orderByColumn != null and orderByColumn != ''">
+			ORDER BY ${orderByColumn} ${isAsc}
+		</if>
+	</select>
+	
+	<select id="selectJobAll" resultMap="SysJobResult">
+		<include refid="selectJobVo"/>
+	</select>
+	
+	<select id="selectJobById" parameterType="Long" resultMap="SysJobResult">
+		<include refid="selectJobVo"/>
+		where job_id = #{jobId}
+	</select>
+	
+	<delete id="deleteJobById" parameterType="Long">
+ 		delete from sys_job where job_id = #{jobId}
+ 	</delete>
+ 	
+ 	<delete id="deleteJobByIds" parameterType="Long">
+ 		delete from sys_job where job_id in
+ 		<foreach collection="array" item="jobId" open="(" separator="," close=")">
+ 			#{jobId}
+        </foreach> 
+ 	</delete>
+ 	
+ 	<update id="updateJob" parameterType="SysJob">
+ 		update sys_job
+ 		<set>
+ 			<if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
+ 			<if test="jobGroup != null and jobGroup != ''">job_group = #{jobGroup},</if>
+ 			<if test="invokeTarget != null and invokeTarget != ''">invoke_target = #{invokeTarget},</if>
+ 			<if test="cronExpression != null and cronExpression != ''">cron_expression = #{cronExpression},</if>
+ 			<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy = #{misfirePolicy},</if>
+ 			<if test="concurrent != null and concurrent != ''">concurrent = #{concurrent},</if>
+ 			<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
+ 		</set>
+ 		where job_id = #{jobId}
+	</update>
+ 	
+ 	<insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId">
+ 		insert into sys_job(
+ 			<if test="jobId != null and jobId != 0">job_id,</if>
+ 			<if test="jobName != null and jobName != ''">job_name,</if>
+ 			<if test="jobGroup != null and jobGroup != ''">job_group,</if>
+ 			<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if>
+ 			<if test="cronExpression != null and cronExpression != ''">cron_expression,</if>
+ 			<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy,</if>
+ 			<if test="concurrent != null and concurrent != ''">concurrent,</if>
+ 			<if test="status != null and status != ''">status,</if>
+ 			<if test="remark != null and remark != ''">remark,</if>
+ 			<if test="createBy != null and createBy != ''">create_by,</if>
+ 			create_time
+ 		)values(
+ 			<if test="jobId != null and jobId != 0">#{jobId},</if>
+ 			<if test="jobName != null and jobName != ''">#{jobName},</if>
+ 			<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
+ 			<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if>
+ 			<if test="cronExpression != null and cronExpression != ''">#{cronExpression},</if>
+ 			<if test="misfirePolicy != null and misfirePolicy != ''">#{misfirePolicy},</if>
+ 			<if test="concurrent != null and concurrent != ''">#{concurrent},</if>
+ 			<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
+ 		)
+	</insert>
+
 </mapper> 

+ 207 - 207
forecast-backend-server/src/main/resources/mybatis/system/SysMenuMapper.xml

@@ -1,208 +1,208 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-		PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-		"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.system.mapper.SysMenuMapper">
-
-	<resultMap type="SysMenu" id="SysMenuResult">
-		<id     property="menuId"         column="menu_id"        />
-		<result property="menuName"       column="menu_name"      />
-		<result property="parentName"     column="parent_name"    />
-		<result property="parentId"       column="parent_id"      />
-		<result property="orderNum"       column="order_num"      />
-		<result property="path"           column="path"           />
-		<result property="component"      column="component"      />
-		<result property="query"          column="query"          />
-		<result property="isFrame"        column="is_frame"       />
-		<result property="isCache"        column="is_cache"       />
-		<result property="menuType"       column="menu_type"      />
-		<result property="visible"        column="visible"        />
-		<result property="status"         column="status"         />
-		<result property="perms"          column="perms"          />
-		<result property="icon"           column="icon"           />
-		<result property="createBy"       column="create_by"      />
-		<result property="createTime"     column="create_time"    />
-		<result property="updateTime"     column="update_time"    />
-		<result property="updateBy"       column="update_by"      />
-		<result property="remark"         column="remark"         />
-	</resultMap>
-
-	<sql id="selectMenuVo">
-        select menu_id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, COALESCE(perms,'') as perms, icon, create_time 
-		from sys_menu
-    </sql>
-    
-    <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
-		<include refid="selectMenuVo"/>
-		<where>
-			<if test="menuName != null and menuName != ''">
-				AND menu_name like concat('%', #{menuName}, '%')
-			</if>
-			<if test="visible != null and visible != ''">
-				AND visible = #{visible}
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-		</where>
-		order by parent_id, order_num
-	</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, COALESCE(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, COALESCE(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
-		left join sys_role ro on ur.role_id = ro.role_id
-		where ur.user_id = #{params.userId}
-		<if test="menuName != null and menuName != ''">
-            AND m.menu_name like concat('%', #{menuName}, '%')
-		</if>
-		<if test="visible != null and visible != ''">
-            AND m.visible = #{visible}
-		</if>
-		<if test="status != null and status != ''">
-            AND m.status = #{status}
-		</if>
-		order by m.parent_id, m.order_num
-	</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, COALESCE(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
-			 left join sys_role ro on ur.role_id = ro.role_id
-			 left join sys_user u on ur.user_id = u.user_id
-		where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = '0'  AND ro.status = '0'
-		order by m.parent_id, m.order_num
-	</select>
-	
-	<select id="selectMenuListByRoleId" resultType="Long">
-		select m.menu_id
-		from sys_menu m
-            left join sys_role_menu rm on m.menu_id = rm.menu_id
-        where rm.role_id = #{roleId}
-            <if test="menuCheckStrictly">
-                AND NOT EXISTS (
-                SELECT 1
-                FROM sys_menu m2
-                INNER JOIN sys_role_menu rm2 ON m2.menu_id = rm2.menu_id
-                WHERE rm2.role_id = #{roleId}
-                AND m2.parent_id = m.menu_id
-                )
-            </if>
-		order by m.parent_id, m.order_num
-	</select>
-	
-	<select id="selectMenuPerms" resultType="String">
-		select distinct m.perms
-		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
-	</select>
-
-	<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
-		select distinct m.perms
-		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
-			 left join sys_role r on r.role_id = ur.role_id
-		where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
-	</select>
-	
-	<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
-		select distinct m.perms
-		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-		where m.status = '0' and rm.role_id = #{roleId}
-	</select>
-	
-	<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
-		<include refid="selectMenuVo"/>
-		where menu_id = #{menuId}
-	</select>
-	
-	<select id="hasChildByMenuId" resultType="Integer">
-	    select count(1) from sys_menu where parent_id = #{menuId}  
-	</select>
-	
-	<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
-		<include refid="selectMenuVo"/>
-		where menu_name=#{menuName} and parent_id = #{parentId} limit 1
-	</select>
-	
-	<update id="updateMenu" parameterType="SysMenu">
-		update sys_menu
-		<set>
-			<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
-			<if test="parentId != null">parent_id = #{parentId},</if>
-			<if test="orderNum != null">order_num = #{orderNum},</if>
-			<if test="path != null and path != ''">path = #{path},</if>
-			<if test="component != null">component = #{component},</if>
-			<if test="query != null">query = #{query},</if>
-			<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
-			<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
-			<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
-			<if test="visible != null">visible = #{visible},</if>
-			<if test="status != null">status = #{status},</if>
-			<if test="perms !=null">perms = #{perms},</if>
-			<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
-		</set>
-		where menu_id = #{menuId}
-	</update>
-
-	<insert id="insertMenu" parameterType="SysMenu">
-		insert into sys_menu(
-		<if test="menuId != null and menuId != 0">menu_id,</if>
-		<if test="parentId != null and parentId != 0">parent_id,</if>
-		<if test="menuName != null and menuName != ''">menu_name,</if>
-		<if test="orderNum != null">order_num,</if>
-		<if test="path != null and path != ''">path,</if>
-		<if test="component != null and component != ''">component,</if>
-		<if test="query != null and query != ''">query,</if>
-		<if test="isFrame != null and isFrame != ''">is_frame,</if>
-		<if test="isCache != null and isCache != ''">is_cache,</if>
-		<if test="menuType != null and menuType != ''">menu_type,</if>
-		<if test="visible != null">visible,</if>
-		<if test="status != null">status,</if>
-		<if test="perms !=null and perms != ''">perms,</if>
-		<if test="icon != null and icon != ''">icon,</if>
-		<if test="remark != null and remark != ''">remark,</if>
-		<if test="createBy != null and createBy != ''">create_by,</if>
-		create_time
-		)values(
-		<if test="menuId != null and menuId != 0">#{menuId},</if>
-		<if test="parentId != null and parentId != 0">#{parentId},</if>
-		<if test="menuName != null and menuName != ''">#{menuName},</if>
-		<if test="orderNum != null">#{orderNum},</if>
-		<if test="path != null and path != ''">#{path},</if>
-		<if test="component != null and component != ''">#{component},</if>
-		<if test="query != null and query != ''">#{query},</if>
-		<if test="isFrame != null and isFrame != ''">#{isFrame},</if>
-		<if test="isCache != null and isCache != ''">#{isCache},</if>
-		<if test="menuType != null and menuType != ''">#{menuType},</if>
-		<if test="visible != null">#{visible},</if>
-		<if test="status != null">#{status},</if>
-		<if test="perms !=null and perms != ''">#{perms},</if>
-		<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
-		)
-	</insert>
-	
-	<delete id="deleteMenuById" parameterType="Long">
-	    delete from sys_menu where menu_id = #{menuId}
-	</delete>
-
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+		PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+		"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.system.mapper.SysMenuMapper">
+
+	<resultMap type="SysMenu" id="SysMenuResult">
+		<id     property="menuId"         column="menu_id"        />
+		<result property="menuName"       column="menu_name"      />
+		<result property="parentName"     column="parent_name"    />
+		<result property="parentId"       column="parent_id"      />
+		<result property="orderNum"       column="order_num"      />
+		<result property="path"           column="path"           />
+		<result property="component"      column="component"      />
+		<result property="query"          column="query"          />
+		<result property="isFrame"        column="is_frame"       />
+		<result property="isCache"        column="is_cache"       />
+		<result property="menuType"       column="menu_type"      />
+		<result property="visible"        column="visible"        />
+		<result property="status"         column="status"         />
+		<result property="perms"          column="perms"          />
+		<result property="icon"           column="icon"           />
+		<result property="createBy"       column="create_by"      />
+		<result property="createTime"     column="create_time"    />
+		<result property="updateTime"     column="update_time"    />
+		<result property="updateBy"       column="update_by"      />
+		<result property="remark"         column="remark"         />
+	</resultMap>
+
+	<sql id="selectMenuVo">
+        select menu_id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, COALESCE(perms,'') as perms, icon, create_time 
+		from sys_menu
+    </sql>
+    
+    <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
+		<include refid="selectMenuVo"/>
+		<where>
+			<if test="menuName != null and menuName != ''">
+				AND menu_name like concat('%', #{menuName}, '%')
+			</if>
+			<if test="visible != null and visible != ''">
+				AND visible = #{visible}
+			</if>
+			<if test="status != null and status != ''">
+				AND status = #{status}
+			</if>
+		</where>
+		order by parent_id, order_num
+	</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, COALESCE(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, COALESCE(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
+		left join sys_role ro on ur.role_id = ro.role_id
+		where ur.user_id = #{params.userId}
+		<if test="menuName != null and menuName != ''">
+            AND m.menu_name like concat('%', #{menuName}, '%')
+		</if>
+		<if test="visible != null and visible != ''">
+            AND m.visible = #{visible}
+		</if>
+		<if test="status != null and status != ''">
+            AND m.status = #{status}
+		</if>
+		order by m.parent_id, m.order_num
+	</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, COALESCE(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
+			 left join sys_role ro on ur.role_id = ro.role_id
+			 left join sys_user u on ur.user_id = u.user_id
+		where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = '0'  AND ro.status = '0'
+		order by m.parent_id, m.order_num
+	</select>
+	
+	<select id="selectMenuListByRoleId" resultType="Long">
+		select m.menu_id
+		from sys_menu m
+            left join sys_role_menu rm on m.menu_id = rm.menu_id
+        where rm.role_id = #{roleId}
+            <if test="menuCheckStrictly">
+                AND NOT EXISTS (
+                SELECT 1
+                FROM sys_menu m2
+                INNER JOIN sys_role_menu rm2 ON m2.menu_id = rm2.menu_id
+                WHERE rm2.role_id = #{roleId}
+                AND m2.parent_id = m.menu_id
+                )
+            </if>
+		order by m.parent_id, m.order_num
+	</select>
+	
+	<select id="selectMenuPerms" resultType="String">
+		select distinct m.perms
+		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
+	</select>
+
+	<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
+		select distinct m.perms
+		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
+			 left join sys_role r on r.role_id = ur.role_id
+		where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
+	</select>
+	
+	<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
+		select distinct m.perms
+		from sys_menu m
+			 left join sys_role_menu rm on m.menu_id = rm.menu_id
+		where m.status = '0' and rm.role_id = #{roleId}
+	</select>
+	
+	<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
+		<include refid="selectMenuVo"/>
+		where menu_id = #{menuId}
+	</select>
+	
+	<select id="hasChildByMenuId" resultType="Integer">
+	    select count(1) from sys_menu where parent_id = #{menuId}  
+	</select>
+	
+	<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
+		<include refid="selectMenuVo"/>
+		where menu_name=#{menuName} and parent_id = #{parentId} limit 1
+	</select>
+	
+	<update id="updateMenu" parameterType="SysMenu">
+		update sys_menu
+		<set>
+			<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
+			<if test="parentId != null">parent_id = #{parentId},</if>
+			<if test="orderNum != null">order_num = #{orderNum},</if>
+			<if test="path != null and path != ''">path = #{path},</if>
+			<if test="component != null">component = #{component},</if>
+			<if test="query != null">query = #{query},</if>
+			<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
+			<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
+			<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
+			<if test="visible != null">visible = #{visible},</if>
+			<if test="status != null">status = #{status},</if>
+			<if test="perms !=null">perms = #{perms},</if>
+			<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
+		</set>
+		where menu_id = #{menuId}
+	</update>
+
+	<insert id="insertMenu" parameterType="SysMenu">
+		insert into sys_menu(
+		<if test="menuId != null and menuId != 0">menu_id,</if>
+		<if test="parentId != null and parentId != 0">parent_id,</if>
+		<if test="menuName != null and menuName != ''">menu_name,</if>
+		<if test="orderNum != null">order_num,</if>
+		<if test="path != null and path != ''">path,</if>
+		<if test="component != null and component != ''">component,</if>
+		<if test="query != null and query != ''">query,</if>
+		<if test="isFrame != null and isFrame != ''">is_frame,</if>
+		<if test="isCache != null and isCache != ''">is_cache,</if>
+		<if test="menuType != null and menuType != ''">menu_type,</if>
+		<if test="visible != null">visible,</if>
+		<if test="status != null">status,</if>
+		<if test="perms !=null and perms != ''">perms,</if>
+		<if test="icon != null and icon != ''">icon,</if>
+		<if test="remark != null and remark != ''">remark,</if>
+		<if test="createBy != null and createBy != ''">create_by,</if>
+		create_time
+		)values(
+		<if test="menuId != null and menuId != 0">#{menuId},</if>
+		<if test="parentId != null and parentId != 0">#{parentId},</if>
+		<if test="menuName != null and menuName != ''">#{menuName},</if>
+		<if test="orderNum != null">#{orderNum},</if>
+		<if test="path != null and path != ''">#{path},</if>
+		<if test="component != null and component != ''">#{component},</if>
+		<if test="query != null and query != ''">#{query},</if>
+		<if test="isFrame != null and isFrame != ''">#{isFrame},</if>
+		<if test="isCache != null and isCache != ''">#{isCache},</if>
+		<if test="menuType != null and menuType != ''">#{menuType},</if>
+		<if test="visible != null">#{visible},</if>
+		<if test="status != null">#{status},</if>
+		<if test="perms !=null and perms != ''">#{perms},</if>
+		<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
+		)
+	</insert>
+	
+	<delete id="deleteMenuById" parameterType="Long">
+	    delete from sys_menu where menu_id = #{menuId}
+	</delete>
+
 </mapper> 

+ 91 - 91
forecast-backend-server/src/main/resources/mybatis/system/SysNoticeMapper.xml

@@ -1,92 +1,92 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.system.mapper.SysNoticeMapper">
-    
-    <resultMap type="SysNotice" id="SysNoticeResult">
-        <result property="noticeId"       column="notice_id"       />
-        <result property="noticeTitle"    column="notice_title"    />
-        <result property="noticeType"     column="notice_type"     />
-        <result property="noticeContent"  column="notice_content"  />
-        <result property="status"         column="status"          />
-        <result property="createBy"       column="create_by"       />
-        <result property="createTime"     column="create_time"     />
-        <result property="updateBy"       column="update_by"       />
-        <result property="updateTime"     column="update_time"     />
-        <result property="remark"         column="remark"          />
-    </resultMap>
-    
-    <sql id="selectNoticeVo">
-        select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark 
-		from sys_notice
-    </sql>
-    
-    <select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
-        <include refid="selectNoticeVo"/>
-        where notice_id = #{noticeId}
-    </select>
-    
-    <select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
-        <include refid="selectNoticeVo"/>
-        <where>
-			<if test="noticeTitle != null and noticeTitle != ''">
-				AND notice_title like concat('%', #{noticeTitle}, '%')
-			</if>
-			<if test="noticeType != null and noticeType != ''">
-				AND notice_type = #{noticeType}
-			</if>
-			<if test="createBy != null and createBy != ''">
-				AND create_by like concat('%', #{createBy}, '%')
-			</if>
-		</where>
-        <if test="orderByColumn != null and orderByColumn != ''">
-            ORDER BY ${orderByColumn} ${isAsc}
-        </if>
-    </select>
-    
-    <insert id="insertNotice" parameterType="SysNotice">
-        insert into sys_notice (
-			<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
-			<if test="noticeType != null and noticeType != '' ">notice_type, </if>
-			<if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
-			<if test="status != null and status != '' ">status, </if>
-			<if test="remark != null and remark != ''">remark,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
- 			create_time
- 		)values(
-			<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
-			<if test="noticeType != null and noticeType != ''">#{noticeType}, </if>
-			<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if>
-			<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
-		)
-    </insert>
-	 
-    <update id="updateNotice" parameterType="SysNotice">
-        update sys_notice 
-        <set>
-            <if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
-            <if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
-            <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
-        </set>
-        where notice_id = #{noticeId}
-    </update>
-	
-    <delete id="deleteNoticeById" parameterType="Long">
-        delete from sys_notice where notice_id = #{noticeId}
-    </delete>
-    
-    <delete id="deleteNoticeByIds" parameterType="Long">
-        delete from sys_notice where notice_id in 
-        <foreach item="noticeId" collection="array" open="(" separator="," close=")">
-            #{noticeId}
-        </foreach>
-    </delete>
-    
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.system.mapper.SysNoticeMapper">
+    
+    <resultMap type="SysNotice" id="SysNoticeResult">
+        <result property="noticeId"       column="notice_id"       />
+        <result property="noticeTitle"    column="notice_title"    />
+        <result property="noticeType"     column="notice_type"     />
+        <result property="noticeContent"  column="notice_content"  />
+        <result property="status"         column="status"          />
+        <result property="createBy"       column="create_by"       />
+        <result property="createTime"     column="create_time"     />
+        <result property="updateBy"       column="update_by"       />
+        <result property="updateTime"     column="update_time"     />
+        <result property="remark"         column="remark"          />
+    </resultMap>
+    
+    <sql id="selectNoticeVo">
+        select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark 
+		from sys_notice
+    </sql>
+    
+    <select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
+        <include refid="selectNoticeVo"/>
+        where notice_id = #{noticeId}
+    </select>
+    
+    <select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
+        <include refid="selectNoticeVo"/>
+        <where>
+			<if test="noticeTitle != null and noticeTitle != ''">
+				AND notice_title like concat('%', #{noticeTitle}, '%')
+			</if>
+			<if test="noticeType != null and noticeType != ''">
+				AND notice_type = #{noticeType}
+			</if>
+			<if test="createBy != null and createBy != ''">
+				AND create_by like concat('%', #{createBy}, '%')
+			</if>
+		</where>
+        <if test="orderByColumn != null and orderByColumn != ''">
+            ORDER BY ${orderByColumn} ${isAsc}
+        </if>
+    </select>
+    
+    <insert id="insertNotice" parameterType="SysNotice">
+        insert into sys_notice (
+			<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
+			<if test="noticeType != null and noticeType != '' ">notice_type, </if>
+			<if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
+			<if test="status != null and status != '' ">status, </if>
+			<if test="remark != null and remark != ''">remark,</if>
+ 			<if test="createBy != null and createBy != ''">create_by,</if>
+ 			create_time
+ 		)values(
+			<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
+			<if test="noticeType != null and noticeType != ''">#{noticeType}, </if>
+			<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if>
+			<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
+		)
+    </insert>
+	 
+    <update id="updateNotice" parameterType="SysNotice">
+        update sys_notice 
+        <set>
+            <if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
+            <if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
+            <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
+        </set>
+        where notice_id = #{noticeId}
+    </update>
+	
+    <delete id="deleteNoticeById" parameterType="Long">
+        delete from sys_notice where notice_id = #{noticeId}
+    </delete>
+    
+    <delete id="deleteNoticeByIds" parameterType="Long">
+        delete from sys_notice where notice_id in 
+        <foreach item="noticeId" collection="array" open="(" separator="," close=")">
+            #{noticeId}
+        </foreach>
+    </delete>
+    
 </mapper>

+ 124 - 124
forecast-backend-server/src/main/resources/mybatis/system/SysPostMapper.xml

@@ -1,125 +1,125 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.system.mapper.SysPostMapper">
-
-	<resultMap type="SysPost" id="SysPostResult">
-		<id     property="postId"        column="post_id"       />
-		<result property="postCode"      column="post_code"     />
-		<result property="postName"      column="post_name"     />
-		<result property="postSort"      column="post_sort"     />
-		<result property="status"        column="status"        />
-		<result property="createBy"      column="create_by"     />
-		<result property="createTime"    column="create_time"   />
-		<result property="updateBy"      column="update_by"     />
-		<result property="updateTime"    column="update_time"   />
-		<result property="remark"        column="remark"        />
-	</resultMap>
-	
-	<sql id="selectPostVo">
-        select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark 
-		from sys_post
-    </sql>
-	
-	<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
-	    <include refid="selectPostVo"/>
-		<where>
-			<if test="postCode != null and postCode != ''">
-				AND post_code like concat('%', #{postCode}, '%')
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-			<if test="postName != null and postName != ''">
-				AND post_name like concat('%', #{postName}, '%')
-			</if>
-		</where>
-		<if test="orderByColumn != null and orderByColumn != ''">
-			ORDER BY ${orderByColumn} ${isAsc}
-		</if>
-	</select>
-	
-	<select id="selectPostAll" resultMap="SysPostResult">
-		<include refid="selectPostVo"/>
-	</select>
-	
-	<select id="selectPostById" parameterType="Long" resultMap="SysPostResult">
-		<include refid="selectPostVo"/>
-		where post_id = #{postId}
-	</select>
-	
-	<select id="selectPostListByUserId" parameterType="Long" resultType="Long">
-		select p.post_id
-        from sys_post p
-	        left join sys_user_post up on up.post_id = p.post_id
-	        left join sys_user u on u.user_id = up.user_id
-	    where u.user_id = #{userId}
-	</select>
-	
-	<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
-		select p.post_id, p.post_name, p.post_code
-		from sys_post p
-			 left join sys_user_post up on up.post_id = p.post_id
-			 left join sys_user u on u.user_id = up.user_id
-		where u.user_name = #{userName}
-	</select>
-	
-	<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
-		<include refid="selectPostVo"/>
-		 where post_name=#{postName} limit 1
-	</select>
-	
-	<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
-		<include refid="selectPostVo"/>
-		 where post_code=#{postCode} limit 1
-	</select>
-	
-	<update id="updatePost" parameterType="SysPost">
- 		update sys_post
- 		<set>
- 			<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
- 			<if test="postName != null and postName != ''">post_name = #{postName},</if>
- 			<if test="postSort != null">post_sort = #{postSort},</if>
- 			<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
- 		</set>
- 		where post_id = #{postId}
-	</update>
- 	
- 	<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
- 		insert into sys_post(
- 			<if test="postId != null and postId != 0">post_id,</if>
- 			<if test="postCode != null and postCode != ''">post_code,</if>
- 			<if test="postName != null and postName != ''">post_name,</if>
- 			<if test="postSort != null">post_sort,</if>
- 			<if test="status != null and status != ''">status,</if>
- 			<if test="remark != null and remark != ''">remark,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
- 			create_time
- 		)values(
- 			<if test="postId != null and postId != 0">#{postId},</if>
- 			<if test="postCode != null and postCode != ''">#{postCode},</if>
- 			<if test="postName != null and postName != ''">#{postName},</if>
- 			<if test="postSort != null">#{postSort},</if>
- 			<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
- 		)
-	</insert>
-	
-	<delete id="deletePostById" parameterType="Long">
-		delete from sys_post where post_id = #{postId}
-	</delete>
-	
-	<delete id="deletePostByIds" parameterType="Long">
- 		delete from sys_post where post_id in
- 		<foreach collection="array" item="postId" open="(" separator="," close=")">
- 			#{postId}
-        </foreach> 
- 	</delete>
-
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.system.mapper.SysPostMapper">
+
+	<resultMap type="SysPost" id="SysPostResult">
+		<id     property="postId"        column="post_id"       />
+		<result property="postCode"      column="post_code"     />
+		<result property="postName"      column="post_name"     />
+		<result property="postSort"      column="post_sort"     />
+		<result property="status"        column="status"        />
+		<result property="createBy"      column="create_by"     />
+		<result property="createTime"    column="create_time"   />
+		<result property="updateBy"      column="update_by"     />
+		<result property="updateTime"    column="update_time"   />
+		<result property="remark"        column="remark"        />
+	</resultMap>
+	
+	<sql id="selectPostVo">
+        select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark 
+		from sys_post
+    </sql>
+	
+	<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
+	    <include refid="selectPostVo"/>
+		<where>
+			<if test="postCode != null and postCode != ''">
+				AND post_code like concat('%', #{postCode}, '%')
+			</if>
+			<if test="status != null and status != ''">
+				AND status = #{status}
+			</if>
+			<if test="postName != null and postName != ''">
+				AND post_name like concat('%', #{postName}, '%')
+			</if>
+		</where>
+		<if test="orderByColumn != null and orderByColumn != ''">
+			ORDER BY ${orderByColumn} ${isAsc}
+		</if>
+	</select>
+	
+	<select id="selectPostAll" resultMap="SysPostResult">
+		<include refid="selectPostVo"/>
+	</select>
+	
+	<select id="selectPostById" parameterType="Long" resultMap="SysPostResult">
+		<include refid="selectPostVo"/>
+		where post_id = #{postId}
+	</select>
+	
+	<select id="selectPostListByUserId" parameterType="Long" resultType="Long">
+		select p.post_id
+        from sys_post p
+	        left join sys_user_post up on up.post_id = p.post_id
+	        left join sys_user u on u.user_id = up.user_id
+	    where u.user_id = #{userId}
+	</select>
+	
+	<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
+		select p.post_id, p.post_name, p.post_code
+		from sys_post p
+			 left join sys_user_post up on up.post_id = p.post_id
+			 left join sys_user u on u.user_id = up.user_id
+		where u.user_name = #{userName}
+	</select>
+	
+	<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
+		<include refid="selectPostVo"/>
+		 where post_name=#{postName} limit 1
+	</select>
+	
+	<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
+		<include refid="selectPostVo"/>
+		 where post_code=#{postCode} limit 1
+	</select>
+	
+	<update id="updatePost" parameterType="SysPost">
+ 		update sys_post
+ 		<set>
+ 			<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
+ 			<if test="postName != null and postName != ''">post_name = #{postName},</if>
+ 			<if test="postSort != null">post_sort = #{postSort},</if>
+ 			<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
+ 		</set>
+ 		where post_id = #{postId}
+	</update>
+ 	
+ 	<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
+ 		insert into sys_post(
+ 			<if test="postId != null and postId != 0">post_id,</if>
+ 			<if test="postCode != null and postCode != ''">post_code,</if>
+ 			<if test="postName != null and postName != ''">post_name,</if>
+ 			<if test="postSort != null">post_sort,</if>
+ 			<if test="status != null and status != ''">status,</if>
+ 			<if test="remark != null and remark != ''">remark,</if>
+ 			<if test="createBy != null and createBy != ''">create_by,</if>
+ 			create_time
+ 		)values(
+ 			<if test="postId != null and postId != 0">#{postId},</if>
+ 			<if test="postCode != null and postCode != ''">#{postCode},</if>
+ 			<if test="postName != null and postName != ''">#{postName},</if>
+ 			<if test="postSort != null">#{postSort},</if>
+ 			<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
+ 		)
+	</insert>
+	
+	<delete id="deletePostById" parameterType="Long">
+		delete from sys_post where post_id = #{postId}
+	</delete>
+	
+	<delete id="deletePostByIds" parameterType="Long">
+ 		delete from sys_post where post_id in
+ 		<foreach collection="array" item="postId" open="(" separator="," close=")">
+ 			#{postId}
+        </foreach> 
+ 	</delete>
+
 </mapper> 

+ 151 - 151
forecast-backend-server/src/main/resources/mybatis/system/SysRoleMapper.xml

@@ -1,152 +1,152 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.system.mapper.SysRoleMapper">
-
-	<resultMap type="SysRole" id="SysRoleResult">
-		<id     property="roleId"             column="role_id"               />
-		<result property="roleName"           column="role_name"             />
-		<result property="roleKey"            column="role_key"              />
-		<result property="roleSort"           column="role_sort"             />
-		<result property="dataScope"          column="data_scope"            />
-		<result property="menuCheckStrictly"  column="menu_check_strictly"   />
-		<result property="deptCheckStrictly"  column="dept_check_strictly"   />
-		<result property="status"             column="status"                />
-		<result property="delFlag"            column="del_flag"              />
-		<result property="createBy"           column="create_by"             />
-		<result property="createTime"         column="create_time"           />
-		<result property="updateBy"           column="update_by"             />
-		<result property="updateTime"         column="update_time"           />
-		<result property="remark"             column="remark"                />
-	</resultMap>
-	
-	<sql id="selectRoleVo">
-	    select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
-            r.status, r.del_flag, r.create_time, r.remark 
-        from sys_role r
-	        left join sys_user_role ur on ur.role_id = r.role_id
-	        left join sys_user u on u.user_id = ur.user_id
-	        left join sys_dept d on u.dept_id = d.dept_id
-    </sql>
-    
-    <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
-		<include refid="selectRoleVo"/>
-		where r.del_flag = '0'
-		<if test="roleId != null and roleId != 0">
-			AND r.role_id = #{roleId}
-		</if>
-		<if test="roleName != null and roleName != ''">
-			AND r.role_name like concat('%', #{roleName}, '%')
-		</if>
-		<if test="status != null and status != ''">
-			AND r.status = #{status}
-		</if>
-		<if test="roleKey != null and roleKey != ''">
-			AND r.role_key like concat('%', #{roleKey}, '%')
-		</if>
-		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-			and to_char(r.create_time,'YYMMDD') &gt;= to_char(#{params.beginTime},'YYMMDD')
-		</if>
-		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-			and to_char(r.create_time,'YYMMDD') &lt;= to_char(#{params.endTime},'YYMMDD')
-		</if>
-		<!-- 数据范围过滤 -->
-		${params.dataScope}
-		order by r.role_sort
-	</select>
-    
-	<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
-		<include refid="selectRoleVo"/>
-		WHERE r.del_flag = '0' and ur.user_id = #{userId}
-	</select>
-	
-	<select id="selectRoleAll" resultMap="SysRoleResult">
-		<include refid="selectRoleVo"/>
-	</select>
-	
-	<select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
-		select r.role_id
-        from sys_role r
-	        left join sys_user_role ur on ur.role_id = r.role_id
-	        left join sys_user u on u.user_id = ur.user_id
-	    where u.user_id = #{userId}
-	</select>
-	
-	<select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult">
-		<include refid="selectRoleVo"/>
-		where r.role_id = #{roleId}
-	</select>
-	
-	<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
-		<include refid="selectRoleVo"/>
-		WHERE r.del_flag = '0' and u.user_name = #{userName}
-	</select>
-	
-	<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
-		<include refid="selectRoleVo"/>
-		 where r.role_name=#{roleName} and r.del_flag = '0' limit 1
-	</select>
-	
-	<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
-		<include refid="selectRoleVo"/>
-		 where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
-	</select>
-	
- 	<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
- 		insert into sys_role(
- 			<if test="roleId != null and roleId != 0">role_id,</if>
- 			<if test="roleName != null and roleName != ''">role_name,</if>
- 			<if test="roleKey != null and roleKey != ''">role_key,</if>
- 			<if test="roleSort != null">role_sort,</if>
- 			<if test="dataScope != null and dataScope != ''">data_scope,</if>
- 			<if test="menuCheckStrictly != null">menu_check_strictly,</if>
- 			<if test="deptCheckStrictly != null">dept_check_strictly,</if>
- 			<if test="status != null and status != ''">status,</if>
- 			<if test="remark != null and remark != ''">remark,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
- 			create_time
- 		)values(
- 			<if test="roleId != null and roleId != 0">#{roleId},</if>
- 			<if test="roleName != null and roleName != ''">#{roleName},</if>
- 			<if test="roleKey != null and roleKey != ''">#{roleKey},</if>
- 			<if test="roleSort != null">#{roleSort},</if>
- 			<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
- 			<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
- 			<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
- 			<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
- 		)
-	</insert>
-	
-	<update id="updateRole" parameterType="SysRole">
- 		update sys_role
- 		<set>
- 			<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
- 			<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
- 			<if test="roleSort != null">role_sort = #{roleSort},</if>
- 			<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
- 			<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
- 			<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>
- 			<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
- 		</set>
- 		where role_id = #{roleId}
-	</update>
-	
-	<delete id="deleteRoleById" parameterType="Long">
- 		update sys_role set del_flag = '2' where role_id = #{roleId}
- 	</delete>
- 	
- 	<delete id="deleteRoleByIds" parameterType="Long">
- 	    update sys_role set del_flag = '2' where role_id in
- 		<foreach collection="array" item="roleId" open="(" separator="," close=")">
- 			#{roleId}
-        </foreach> 
- 	</delete>
- 	
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.system.mapper.SysRoleMapper">
+
+	<resultMap type="SysRole" id="SysRoleResult">
+		<id     property="roleId"             column="role_id"               />
+		<result property="roleName"           column="role_name"             />
+		<result property="roleKey"            column="role_key"              />
+		<result property="roleSort"           column="role_sort"             />
+		<result property="dataScope"          column="data_scope"            />
+		<result property="menuCheckStrictly"  column="menu_check_strictly"   />
+		<result property="deptCheckStrictly"  column="dept_check_strictly"   />
+		<result property="status"             column="status"                />
+		<result property="delFlag"            column="del_flag"              />
+		<result property="createBy"           column="create_by"             />
+		<result property="createTime"         column="create_time"           />
+		<result property="updateBy"           column="update_by"             />
+		<result property="updateTime"         column="update_time"           />
+		<result property="remark"             column="remark"                />
+	</resultMap>
+	
+	<sql id="selectRoleVo">
+	    select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
+            r.status, r.del_flag, r.create_time, r.remark 
+        from sys_role r
+	        left join sys_user_role ur on ur.role_id = r.role_id
+	        left join sys_user u on u.user_id = ur.user_id
+	        left join sys_dept d on u.dept_id = d.dept_id
+    </sql>
+    
+    <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
+		<include refid="selectRoleVo"/>
+		where r.del_flag = '0'
+		<if test="roleId != null and roleId != 0">
+			AND r.role_id = #{roleId}
+		</if>
+		<if test="roleName != null and roleName != ''">
+			AND r.role_name like concat('%', #{roleName}, '%')
+		</if>
+		<if test="status != null and status != ''">
+			AND r.status = #{status}
+		</if>
+		<if test="roleKey != null and roleKey != ''">
+			AND r.role_key like concat('%', #{roleKey}, '%')
+		</if>
+		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+			and to_char(r.create_time,'YYMMDD') &gt;= to_char(#{params.beginTime},'YYMMDD')
+		</if>
+		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+			and to_char(r.create_time,'YYMMDD') &lt;= to_char(#{params.endTime},'YYMMDD')
+		</if>
+		<!-- 数据范围过滤 -->
+		${params.dataScope}
+		order by r.role_sort
+	</select>
+    
+	<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
+		<include refid="selectRoleVo"/>
+		WHERE r.del_flag = '0' and ur.user_id = #{userId}
+	</select>
+	
+	<select id="selectRoleAll" resultMap="SysRoleResult">
+		<include refid="selectRoleVo"/>
+	</select>
+	
+	<select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
+		select r.role_id
+        from sys_role r
+	        left join sys_user_role ur on ur.role_id = r.role_id
+	        left join sys_user u on u.user_id = ur.user_id
+	    where u.user_id = #{userId}
+	</select>
+	
+	<select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult">
+		<include refid="selectRoleVo"/>
+		where r.role_id = #{roleId}
+	</select>
+	
+	<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
+		<include refid="selectRoleVo"/>
+		WHERE r.del_flag = '0' and u.user_name = #{userName}
+	</select>
+	
+	<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
+		<include refid="selectRoleVo"/>
+		 where r.role_name=#{roleName} and r.del_flag = '0' limit 1
+	</select>
+	
+	<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
+		<include refid="selectRoleVo"/>
+		 where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
+	</select>
+	
+ 	<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
+ 		insert into sys_role(
+ 			<if test="roleId != null and roleId != 0">role_id,</if>
+ 			<if test="roleName != null and roleName != ''">role_name,</if>
+ 			<if test="roleKey != null and roleKey != ''">role_key,</if>
+ 			<if test="roleSort != null">role_sort,</if>
+ 			<if test="dataScope != null and dataScope != ''">data_scope,</if>
+ 			<if test="menuCheckStrictly != null">menu_check_strictly,</if>
+ 			<if test="deptCheckStrictly != null">dept_check_strictly,</if>
+ 			<if test="status != null and status != ''">status,</if>
+ 			<if test="remark != null and remark != ''">remark,</if>
+ 			<if test="createBy != null and createBy != ''">create_by,</if>
+ 			create_time
+ 		)values(
+ 			<if test="roleId != null and roleId != 0">#{roleId},</if>
+ 			<if test="roleName != null and roleName != ''">#{roleName},</if>
+ 			<if test="roleKey != null and roleKey != ''">#{roleKey},</if>
+ 			<if test="roleSort != null">#{roleSort},</if>
+ 			<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
+ 			<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
+ 			<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
+ 			<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
+ 		)
+	</insert>
+	
+	<update id="updateRole" parameterType="SysRole">
+ 		update sys_role
+ 		<set>
+ 			<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
+ 			<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
+ 			<if test="roleSort != null">role_sort = #{roleSort},</if>
+ 			<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
+ 			<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
+ 			<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>
+ 			<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
+ 		</set>
+ 		where role_id = #{roleId}
+	</update>
+	
+	<delete id="deleteRoleById" parameterType="Long">
+ 		update sys_role set del_flag = '2' where role_id = #{roleId}
+ 	</delete>
+ 	
+ 	<delete id="deleteRoleByIds" parameterType="Long">
+ 	    update sys_role set del_flag = '2' where role_id in
+ 		<foreach collection="array" item="roleId" open="(" separator="," close=")">
+ 			#{roleId}
+        </foreach> 
+ 	</delete>
+ 	
 </mapper> 

+ 220 - 220
forecast-backend-server/src/main/resources/mybatis/system/SysUserMapper.xml

@@ -1,221 +1,221 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ufo.module.system.mapper.SysUserMapper">
-
-    <resultMap type="SysUser" id="SysUserResult">
-        <id     property="userId"       column="user_id"      />
-        <result property="deptId"       column="dept_id"      />
-        <result property="userName"     column="user_name"    />
-        <result property="nickName"     column="nick_name"    />
-        <result property="email"        column="email"        />
-        <result property="phonenumber"  column="phonenumber"  />
-        <result property="sex"          column="sex"          />
-        <result property="avatar"       column="avatar"       />
-        <result property="password"     column="password"     />
-        <result property="status"       column="status"       />
-        <result property="delFlag"      column="del_flag"     />
-        <result property="loginIp"      column="login_ip"     />
-        <result property="loginDate"    column="login_date"   />
-        <result property="createBy"     column="create_by"    />
-        <result property="createTime"   column="create_time"  />
-        <result property="updateBy"     column="update_by"    />
-        <result property="updateTime"   column="update_time"  />
-        <result property="remark"       column="remark"       />
-        <association property="dept"    javaType="SysDept"         resultMap="deptResult" />
-        <collection  property="roles"   javaType="java.util.List"  resultMap="RoleResult" />
-    </resultMap>
-	
-    <resultMap id="deptResult" type="SysDept">
-        <id     property="deptId"    column="dept_id"     />
-        <result property="parentId"  column="parent_id"   />
-        <result property="deptName"  column="dept_name"   />
-        <result property="ancestors" column="ancestors"   />
-        <result property="orderNum"  column="order_num"   />
-        <result property="leader"    column="leader"      />
-        <result property="status"    column="dept_status" />
-    </resultMap>
-	
-    <resultMap id="RoleResult" type="SysRole">
-        <id     property="roleId"       column="role_id"        />
-        <result property="roleName"     column="role_name"      />
-        <result property="roleKey"      column="role_key"       />
-        <result property="roleSort"     column="role_sort"      />
-        <result property="dataScope"    column="data_scope"     />
-        <result property="status"       column="role_status"    />
-    </resultMap>
-	
-	<sql id="selectUserVo">
-        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, 
-        d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
-        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
-        from sys_user u
-		    left join sys_dept d on u.dept_id = d.dept_id
-		    left join sys_user_role ur on u.user_id = ur.user_id
-		    left join sys_role r on r.role_id = ur.role_id
-    </sql>
-    
-    <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
-		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
-		left join sys_dept d on u.dept_id = d.dept_id
-		where u.del_flag = '0'
-		<if test="userId != null and userId != 0">
-			AND u.user_id = #{userId}
-		</if>
-		<if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
-		</if>
-		<if test="status != null and status != ''">
-			AND u.status = #{status}
-		</if>
-		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
-		</if>
-		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-			AND to_char(u.create_time,'YYMMDD') &gt;= to_char(#{params.beginTime},'YYMMDD')
-		</if>
-		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-			AND to_char(u.create_time,'YYMMDD') &lt;= to_char(#{params.endTime},'YYMMDD')
-		</if>
-		<if test="deptId != null and deptId != 0">
-			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE position(',' || #{deptId} || ',' in ',' || ancestors || ',') > 0 ))
-		</if>
-		<!-- 数据范围过滤 -->
-		${params.dataScope}
-	</select>
-	
-	<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
-	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
-	    from sys_user u
-			 left join sys_dept d on u.dept_id = d.dept_id
-			 left join sys_user_role ur on u.user_id = ur.user_id
-			 left join sys_role r on r.role_id = ur.role_id
-	    where u.del_flag = '0' and r.role_id = #{roleId}
-	    <if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
-		</if>
-		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
-		</if>
-		<!-- 数据范围过滤 -->
-		${params.dataScope}
-	</select>
-	
-	<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
-	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
-	    from sys_user u
-			 left join sys_dept d on u.dept_id = d.dept_id
-			 left join sys_user_role ur on u.user_id = ur.user_id
-			 left join sys_role r on r.role_id = ur.role_id
-	    where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
-	    and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
-	    <if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
-		</if>
-		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
-		</if>
-		<!-- 数据范围过滤 -->
-		${params.dataScope}
-	</select>
-	
-	<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
-	    <include refid="selectUserVo"/>
-		where u.user_name = #{userName} and u.del_flag = '0'
-	</select>
-	
-	<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
-		<include refid="selectUserVo"/>
-		where u.user_id = #{userId}
-	</select>
-	
-	<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
-	</select>
-	
-	<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
-	</select>
-	
-	<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
-	</select>
-	
-	<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
- 		insert into sys_user(
- 			<if test="userId != null and userId != 0">user_id,</if>
- 			<if test="deptId != null and deptId != 0">dept_id,</if>
- 			<if test="userName != null and userName != ''">user_name,</if>
- 			<if test="nickName != null and nickName != ''">nick_name,</if>
- 			<if test="email != null and email != ''">email,</if>
- 			<if test="avatar != null and avatar != ''">avatar,</if>
- 			<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
- 			<if test="sex != null and sex != ''">sex,</if>
- 			<if test="password != null and password != ''">password,</if>
- 			<if test="status != null and status != ''">status,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
- 			<if test="remark != null and remark != ''">remark,</if>
- 			create_time
- 		)values(
- 			<if test="userId != null and userId != ''">#{userId},</if>
- 			<if test="deptId != null and deptId != ''">#{deptId},</if>
- 			<if test="userName != null and userName != ''">#{userName},</if>
- 			<if test="nickName != null and nickName != ''">#{nickName},</if>
- 			<if test="email != null and email != ''">#{email},</if>
- 			<if test="avatar != null and avatar != ''">#{avatar},</if>
- 			<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
- 			<if test="sex != null and sex != ''">#{sex},</if>
- 			<if test="password != null and password != ''">#{password},</if>
- 			<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
- 		)
-	</insert>
-	
-	<update id="updateUser" parameterType="SysUser">
- 		update sys_user
- 		<set>
- 			<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
- 			<if test="userName != null and userName != ''">user_name = #{userName},</if>
- 			<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
- 			<if test="email != null ">email = #{email},</if>
- 			<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
- 			<if test="sex != null and sex != ''">sex = #{sex},</if>
- 			<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
- 			<if test="password != null and password != ''">password = #{password},</if>
- 			<if test="status != null and status != ''">status = #{status},</if>
- 			<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
- 			<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
- 		</set>
- 		where user_id = #{userId}
-	</update>
-	
-	<update id="updateUserStatus" parameterType="SysUser">
- 		update sys_user set status = #{status} where user_id = #{userId}
-	</update>
-	
-	<update id="updateUserAvatar" parameterType="SysUser">
- 		update sys_user set avatar = #{avatar} where user_name = #{userName}
-	</update>
-	
-	<update id="resetUserPwd" parameterType="SysUser">
- 		update sys_user set password = #{password} where user_name = #{userName}
-	</update>
-	
-	<delete id="deleteUserById" parameterType="Long">
- 		update sys_user set del_flag = '2' where user_id = #{userId}
- 	</delete>
- 	
- 	<delete id="deleteUserByIds" parameterType="Long">
- 		update sys_user set del_flag = '2' where user_id in
- 		<foreach collection="array" item="userId" open="(" separator="," close=")">
- 			#{userId}
-        </foreach> 
- 	</delete>
-	
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ufo.module.system.mapper.SysUserMapper">
+
+    <resultMap type="SysUser" id="SysUserResult">
+        <id     property="userId"       column="user_id"      />
+        <result property="deptId"       column="dept_id"      />
+        <result property="userName"     column="user_name"    />
+        <result property="nickName"     column="nick_name"    />
+        <result property="email"        column="email"        />
+        <result property="phonenumber"  column="phonenumber"  />
+        <result property="sex"          column="sex"          />
+        <result property="avatar"       column="avatar"       />
+        <result property="password"     column="password"     />
+        <result property="status"       column="status"       />
+        <result property="delFlag"      column="del_flag"     />
+        <result property="loginIp"      column="login_ip"     />
+        <result property="loginDate"    column="login_date"   />
+        <result property="createBy"     column="create_by"    />
+        <result property="createTime"   column="create_time"  />
+        <result property="updateBy"     column="update_by"    />
+        <result property="updateTime"   column="update_time"  />
+        <result property="remark"       column="remark"       />
+        <association property="dept"    javaType="SysDept"         resultMap="deptResult" />
+        <collection  property="roles"   javaType="java.util.List"  resultMap="RoleResult" />
+    </resultMap>
+	
+    <resultMap id="deptResult" type="SysDept">
+        <id     property="deptId"    column="dept_id"     />
+        <result property="parentId"  column="parent_id"   />
+        <result property="deptName"  column="dept_name"   />
+        <result property="ancestors" column="ancestors"   />
+        <result property="orderNum"  column="order_num"   />
+        <result property="leader"    column="leader"      />
+        <result property="status"    column="dept_status" />
+    </resultMap>
+	
+    <resultMap id="RoleResult" type="SysRole">
+        <id     property="roleId"       column="role_id"        />
+        <result property="roleName"     column="role_name"      />
+        <result property="roleKey"      column="role_key"       />
+        <result property="roleSort"     column="role_sort"      />
+        <result property="dataScope"    column="data_scope"     />
+        <result property="status"       column="role_status"    />
+    </resultMap>
+	
+	<sql id="selectUserVo">
+        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, 
+        d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
+        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
+        from sys_user u
+		    left join sys_dept d on u.dept_id = d.dept_id
+		    left join sys_user_role ur on u.user_id = ur.user_id
+		    left join sys_role r on r.role_id = ur.role_id
+    </sql>
+    
+    <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
+		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
+		left join sys_dept d on u.dept_id = d.dept_id
+		where u.del_flag = '0'
+		<if test="userId != null and userId != 0">
+			AND u.user_id = #{userId}
+		</if>
+		<if test="userName != null and userName != ''">
+			AND u.user_name like concat('%', #{userName}, '%')
+		</if>
+		<if test="status != null and status != ''">
+			AND u.status = #{status}
+		</if>
+		<if test="phonenumber != null and phonenumber != ''">
+			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+		</if>
+		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+			AND to_char(u.create_time,'YYMMDD') &gt;= to_char(#{params.beginTime},'YYMMDD')
+		</if>
+		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+			AND to_char(u.create_time,'YYMMDD') &lt;= to_char(#{params.endTime},'YYMMDD')
+		</if>
+		<if test="deptId != null and deptId != 0">
+			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE position(',' || #{deptId} || ',' in ',' || ancestors || ',') > 0 ))
+		</if>
+		<!-- 数据范围过滤 -->
+		${params.dataScope}
+	</select>
+	
+	<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
+	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
+	    from sys_user u
+			 left join sys_dept d on u.dept_id = d.dept_id
+			 left join sys_user_role ur on u.user_id = ur.user_id
+			 left join sys_role r on r.role_id = ur.role_id
+	    where u.del_flag = '0' and r.role_id = #{roleId}
+	    <if test="userName != null and userName != ''">
+			AND u.user_name like concat('%', #{userName}, '%')
+		</if>
+		<if test="phonenumber != null and phonenumber != ''">
+			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+		</if>
+		<!-- 数据范围过滤 -->
+		${params.dataScope}
+	</select>
+	
+	<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
+	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
+	    from sys_user u
+			 left join sys_dept d on u.dept_id = d.dept_id
+			 left join sys_user_role ur on u.user_id = ur.user_id
+			 left join sys_role r on r.role_id = ur.role_id
+	    where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
+	    and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
+	    <if test="userName != null and userName != ''">
+			AND u.user_name like concat('%', #{userName}, '%')
+		</if>
+		<if test="phonenumber != null and phonenumber != ''">
+			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+		</if>
+		<!-- 数据范围过滤 -->
+		${params.dataScope}
+	</select>
+	
+	<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
+	    <include refid="selectUserVo"/>
+		where u.user_name = #{userName} and u.del_flag = '0'
+	</select>
+	
+	<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
+		<include refid="selectUserVo"/>
+		where u.user_id = #{userId}
+	</select>
+	
+	<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
+		select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
+	</select>
+	
+	<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
+		select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
+	</select>
+	
+	<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
+		select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
+	</select>
+	
+	<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
+ 		insert into sys_user(
+ 			<if test="userId != null and userId != 0">user_id,</if>
+ 			<if test="deptId != null and deptId != 0">dept_id,</if>
+ 			<if test="userName != null and userName != ''">user_name,</if>
+ 			<if test="nickName != null and nickName != ''">nick_name,</if>
+ 			<if test="email != null and email != ''">email,</if>
+ 			<if test="avatar != null and avatar != ''">avatar,</if>
+ 			<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
+ 			<if test="sex != null and sex != ''">sex,</if>
+ 			<if test="password != null and password != ''">password,</if>
+ 			<if test="status != null and status != ''">status,</if>
+ 			<if test="createBy != null and createBy != ''">create_by,</if>
+ 			<if test="remark != null and remark != ''">remark,</if>
+ 			create_time
+ 		)values(
+ 			<if test="userId != null and userId != ''">#{userId},</if>
+ 			<if test="deptId != null and deptId != ''">#{deptId},</if>
+ 			<if test="userName != null and userName != ''">#{userName},</if>
+ 			<if test="nickName != null and nickName != ''">#{nickName},</if>
+ 			<if test="email != null and email != ''">#{email},</if>
+ 			<if test="avatar != null and avatar != ''">#{avatar},</if>
+ 			<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
+ 			<if test="sex != null and sex != ''">#{sex},</if>
+ 			<if test="password != null and password != ''">#{password},</if>
+ 			<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
+ 		)
+	</insert>
+	
+	<update id="updateUser" parameterType="SysUser">
+ 		update sys_user
+ 		<set>
+ 			<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
+ 			<if test="userName != null and userName != ''">user_name = #{userName},</if>
+ 			<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
+ 			<if test="email != null ">email = #{email},</if>
+ 			<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
+ 			<if test="sex != null and sex != ''">sex = #{sex},</if>
+ 			<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
+ 			<if test="password != null and password != ''">password = #{password},</if>
+ 			<if test="status != null and status != ''">status = #{status},</if>
+ 			<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
+ 			<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
+ 		</set>
+ 		where user_id = #{userId}
+	</update>
+	
+	<update id="updateUserStatus" parameterType="SysUser">
+ 		update sys_user set status = #{status} where user_id = #{userId}
+	</update>
+	
+	<update id="updateUserAvatar" parameterType="SysUser">
+ 		update sys_user set avatar = #{avatar} where user_name = #{userName}
+	</update>
+	
+	<update id="resetUserPwd" parameterType="SysUser">
+ 		update sys_user set password = #{password} where user_name = #{userName}
+	</update>
+	
+	<delete id="deleteUserById" parameterType="Long">
+ 		update sys_user set del_flag = '2' where user_id = #{userId}
+ 	</delete>
+ 	
+ 	<delete id="deleteUserByIds" parameterType="Long">
+ 		update sys_user set del_flag = '2' where user_id in
+ 		<foreach collection="array" item="userId" open="(" separator="," close=")">
+ 			#{userId}
+        </foreach> 
+ 	</delete>
+	
 </mapper> 

+ 21 - 0
forecast-backend-vue/src/api/config/stationChannel.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+
+export function listStationChannel(query) {
+  return request({ url: '/config/stationChannel/list', method: 'get', params: query })
+}
+
+export function getStationChannel(id) {
+  return request({ url: '/config/stationChannel/' + id, method: 'get' })
+}
+
+export function addStationChannel(data) {
+  return request({ url: '/config/stationChannel', method: 'post', data })
+}
+
+export function updateStationChannel(data) {
+  return request({ url: '/config/stationChannel', method: 'put', data })
+}
+
+export function delStationChannel(id) {
+  return request({ url: '/config/stationChannel/' + id, method: 'delete' })
+}

+ 21 - 0
forecast-backend-vue/src/api/config/stationDevice.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+
+export function listStationDevice(query) {
+  return request({ url: '/config/stationDevice/list', method: 'get', params: query })
+}
+
+export function getStationDevice(id) {
+  return request({ url: '/config/stationDevice/' + id, method: 'get' })
+}
+
+export function addStationDevice(data) {
+  return request({ url: '/config/stationDevice', method: 'post', data })
+}
+
+export function updateStationDevice(data) {
+  return request({ url: '/config/stationDevice', method: 'put', data })
+}
+
+export function delStationDevice(id) {
+  return request({ url: '/config/stationDevice/' + id, method: 'delete' })
+}

+ 21 - 0
forecast-backend-vue/src/api/config/stationModule.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+
+export function listStationModule(query) {
+  return request({ url: '/config/stationModule/list', method: 'get', params: query })
+}
+
+export function getStationModule(id) {
+  return request({ url: '/config/stationModule/' + id, method: 'get' })
+}
+
+export function addStationModule(data) {
+  return request({ url: '/config/stationModule', method: 'post', data })
+}
+
+export function updateStationModule(data) {
+  return request({ url: '/config/stationModule', method: 'put', data })
+}
+
+export function delStationModule(id) {
+  return request({ url: '/config/stationModule/' + id, method: 'delete' })
+}

+ 21 - 0
forecast-backend-vue/src/api/config/stationPoint.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+
+export function listStationPoint(query) {
+  return request({ url: '/config/stationPoint/list', method: 'get', params: query })
+}
+
+export function getStationPoint(id) {
+  return request({ url: '/config/stationPoint/' + id, method: 'get' })
+}
+
+export function addStationPoint(data) {
+  return request({ url: '/config/stationPoint', method: 'post', data })
+}
+
+export function updateStationPoint(data) {
+  return request({ url: '/config/stationPoint', method: 'put', data })
+}
+
+export function delStationPoint(id) {
+  return request({ url: '/config/stationPoint/' + id, method: 'delete' })
+}

+ 21 - 0
forecast-backend-vue/src/api/config/stationPowerLimit.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+
+export function listStationPowerLimit(query) {
+  return request({ url: '/config/stationPowerLimit/list', method: 'get', params: query })
+}
+
+export function getStationPowerLimit(id) {
+  return request({ url: '/config/stationPowerLimit/' + id, method: 'get' })
+}
+
+export function addStationPowerLimit(data) {
+  return request({ url: '/config/stationPowerLimit', method: 'post', data })
+}
+
+export function updateStationPowerLimit(data) {
+  return request({ url: '/config/stationPowerLimit', method: 'put', data })
+}
+
+export function delStationPowerLimit(id) {
+  return request({ url: '/config/stationPowerLimit/' + id, method: 'delete' })
+}