Jelajahi Sumber

新增系统配置页面及维护功能

chengpan 3 tahun lalu
induk
melakukan
53f6652771

+ 130 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/opt/SysInfoConfigController.java

@@ -0,0 +1,130 @@
+package com.ruoyi.web.controller.opt;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.opt.domain.SysInfoConfig;
+import com.ruoyi.opt.service.ISysInfoConfigService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 系统配置Controller
+ * 
+ * @author chengpan
+ * @date 2022-09-05
+ */
+@Controller
+@RequestMapping("/opt/config")
+public class SysInfoConfigController extends BaseController
+{
+    private String prefix = "opt/config";
+
+    @Autowired
+    private ISysInfoConfigService sysInfoConfigService;
+
+    @RequiresPermissions("opt:config:view")
+    @GetMapping()
+    public String config()
+    {
+        return prefix + "/config";
+    }
+
+    /**
+     * 查询系统配置列表
+     */
+    @RequiresPermissions("opt:config:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysInfoConfig sysInfoConfig)
+    {
+        startPage();
+        List<SysInfoConfig> list = sysInfoConfigService.selectSysInfoConfigList(sysInfoConfig);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出系统配置列表
+     */
+    @RequiresPermissions("opt:config:export")
+    @Log(title = "系统配置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysInfoConfig sysInfoConfig)
+    {
+        List<SysInfoConfig> list = sysInfoConfigService.selectSysInfoConfigList(sysInfoConfig);
+        ExcelUtil<SysInfoConfig> util = new ExcelUtil<SysInfoConfig>(SysInfoConfig.class);
+        return util.exportExcel(list, "系统配置数据");
+    }
+
+    /**
+     * 新增系统配置
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存系统配置
+     */
+    @RequiresPermissions("opt:config:add")
+    @Log(title = "系统配置", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(SysInfoConfig sysInfoConfig)
+    {
+        sysInfoConfig.setCreateBy(getLoginName());
+        sysInfoConfig.setUpdateBy(getLoginName());
+        return toAjax(sysInfoConfigService.insertSysInfoConfig(sysInfoConfig));
+    }
+
+    /**
+     * 修改系统配置
+     */
+    @RequiresPermissions("opt:config:edit")
+    @GetMapping("/edit/{confId}")
+    public String edit(@PathVariable("confId") Long confId, ModelMap mmap)
+    {
+        SysInfoConfig sysInfoConfig = sysInfoConfigService.selectSysInfoConfigByConfId(confId);
+        mmap.put("sysInfoConfig", sysInfoConfig);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存系统配置
+     */
+    @RequiresPermissions("opt:config:edit")
+    @Log(title = "系统配置", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(SysInfoConfig sysInfoConfig)
+    {
+        sysInfoConfig.setUpdateBy(getLoginName());
+        return toAjax(sysInfoConfigService.updateSysInfoConfig(sysInfoConfig));
+    }
+
+    /**
+     * 删除系统配置
+     */
+    @RequiresPermissions("opt:config:remove")
+    @Log(title = "系统配置", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(sysInfoConfigService.deleteSysInfoConfigByConfIds(ids));
+    }
+}

+ 87 - 0
ruoyi-admin/src/main/resources/templates/opt/config/add.html

@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增系统配置')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-config-add">
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">系统类型:</label>
+                <div class="col-sm-8">
+                    <select name="sysTpCd" class="form-control m-b" th:with="type=${@dict.getType('sys_tp_cd')}">
+                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                    </select>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">接口请求类型:</label>
+                <div class="col-sm-8">
+                    <select name="methTpCd" class="form-control m-b" th:with="type=${@dict.getType('meth_tp_cd')}">
+                        <option value="">--请选择--</option>
+                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                    </select>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">接口请求地址:</label>
+                <div class="col-sm-8">
+                    <input name="methUrl" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">APPID:</label>
+                <div class="col-sm-8">
+                    <input name="appId" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">APPKEY:</label>
+                <div class="col-sm-8">
+                    <input name="appKey" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">收款开户行:</label>
+                <div class="col-sm-8">
+                    <input name="skKhh" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">收款账户名称:</label>
+                <div class="col-sm-8">
+                    <input name="skAccountNm" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">收款账号:</label>
+                <div class="col-sm-8">
+                    <input name="skAccount" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">状态:</label>
+                <div class="col-sm-8">
+                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
+                        <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
+                        <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "opt/config"
+        $("#form-config-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-config-add').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 160 - 0
ruoyi-admin/src/main/resources/templates/opt/config/config.html

@@ -0,0 +1,160 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('系统配置列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <label>系统类型:</label>
+                                <select name="sysTpCd" th:with="type=${@dict.getType('sys_tp_cd')}">
+                                    <option value="">所有</option>
+                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                                </select>
+                            </li>
+                            <li>
+                                <label>接口请求地址:</label>
+                                <input type="text" name="methUrl"/>
+                            </li>
+                            <li>
+                                <label>APPID:</label>
+                                <input type="text" name="appId"/>
+                            </li>
+                            <li>
+                                <label>收款开户行:</label>
+                                <input type="text" name="skKhh"/>
+                            </li>
+                            <li>
+                                <label>收款账户名称:</label>
+                                <input type="text" name="skAccountNm"/>
+                            </li>
+                            <li>
+                                <label>收款账号:</label>
+                                <input type="text" name="skAccount"/>
+                            </li>
+                            <li>
+                                <label>状态:</label>
+                                <select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
+                                    <option value="">所有</option>
+                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                                </select>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="opt:config:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="opt:config:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="opt:config:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="opt:config:export">
+                    <i class="fa fa-download"></i> 导出
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('opt:config:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('opt:config:remove')}]];
+        var sysTpCdDatas = [[${@dict.getType('sys_tp_cd')}]];
+        var methTpCdDatas = [[${@dict.getType('meth_tp_cd')}]];
+        var statusDatas = [[${@dict.getType('sys_normal_disable')}]];
+        var prefix = ctx + "opt/config";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "系统配置",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field: 'confId',
+                    title: '配置ID',
+                    visible: false
+                },
+                {
+                    field: 'sysTpCd',
+                    title: '系统类型',
+                    formatter: function(value, row, index) {
+                       return $.table.selectDictLabel(sysTpCdDatas, value);
+                    }
+                },
+                {
+                    field: 'methTpCd',
+                    title: '接口请求类型',
+                    formatter: function(value, row, index) {
+                       return $.table.selectDictLabel(methTpCdDatas, value);
+                    }
+                },
+                {
+                    field: 'methUrl',
+                    title: '接口请求地址'
+                },
+                {
+                    field: 'appId',
+                    title: 'APPID'
+                },
+                {
+                    field: 'appKey',
+                    title: 'APPKEY'
+                },
+                {
+                    field: 'skKhh',
+                    title: '收款开户行'
+                },
+                {
+                    field: 'skAccountNm',
+                    title: '收款账户名称'
+                },
+                {
+                    field: 'skAccount',
+                    title: '收款账号'
+                },
+                {
+                    field: 'status',
+                    title: '状态',
+                    formatter: function(value, row, index) {
+                       return $.table.selectDictLabel(statusDatas, value);
+                    }
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.confId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.confId + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+</html>

+ 88 - 0
ruoyi-admin/src/main/resources/templates/opt/config/edit.html

@@ -0,0 +1,88 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改系统配置')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-config-edit" th:object="${sysInfoConfig}">
+            <input name="confId" th:field="*{confId}" type="hidden">
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">系统类型:</label>
+                <div class="col-sm-8">
+                    <select name="sysTpCd" class="form-control m-b" th:with="type=${@dict.getType('sys_tp_cd')}">
+                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sysTpCd}"></option>
+                    </select>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">接口请求类型:</label>
+                <div class="col-sm-8">
+                    <select name="methTpCd" class="form-control m-b" th:with="type=${@dict.getType('meth_tp_cd')}">
+                        <option value="">--请选择--</option>
+                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{methTpCd}"></option>
+                    </select>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">接口请求地址:</label>
+                <div class="col-sm-8">
+                    <input name="methUrl" th:field="*{methUrl}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">APPID:</label>
+                <div class="col-sm-8">
+                    <input name="appId" th:field="*{appId}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">APPKEY:</label>
+                <div class="col-sm-8">
+                    <input name="appKey" th:field="*{appKey}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">收款开户行:</label>
+                <div class="col-sm-8">
+                    <input name="skKhh" th:field="*{skKhh}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">收款账户名称:</label>
+                <div class="col-sm-8">
+                    <input name="skAccountNm" th:field="*{skAccountNm}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">收款账号:</label>
+                <div class="col-sm-8">
+                    <input name="skAccount" th:field="*{skAccount}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">状态:</label>
+                <div class="col-sm-8">
+                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
+                        <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
+                        <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "opt/config";
+        $("#form-config-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-config-edit').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 167 - 0
ruoyi-system/src/main/java/com/ruoyi/opt/domain/SysInfoConfig.java

@@ -0,0 +1,167 @@
+package com.ruoyi.opt.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 系统配置对象 sys_info_config
+ * 
+ * @author chengpan
+ * @date 2022-09-05
+ */
+public class SysInfoConfig extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 配置ID */
+    private Long confId;
+
+    /** 系统类型 */
+    @Excel(name = "系统类型")
+    private String sysTpCd;
+
+    /** 接口请求类型 */
+    @Excel(name = "接口请求类型")
+    private String methTpCd;
+
+    /** 接口请求地址 */
+    @Excel(name = "接口请求地址")
+    private String methUrl;
+
+    /** APPID */
+    @Excel(name = "APPID")
+    private String appId;
+
+    /** APPKEY */
+    @Excel(name = "APPKEY")
+    private String appKey;
+
+    /** 收款开户行 */
+    @Excel(name = "收款开户行")
+    private String skKhh;
+
+    /** 收款账户名称 */
+    @Excel(name = "收款账户名称")
+    private String skAccountNm;
+
+    /** 收款账号 */
+    @Excel(name = "收款账号")
+    private String skAccount;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private String status;
+
+    public void setConfId(Long confId) 
+    {
+        this.confId = confId;
+    }
+
+    public Long getConfId() 
+    {
+        return confId;
+    }
+    public void setSysTpCd(String sysTpCd) 
+    {
+        this.sysTpCd = sysTpCd;
+    }
+
+    public String getSysTpCd() 
+    {
+        return sysTpCd;
+    }
+    public void setMethTpCd(String methTpCd) 
+    {
+        this.methTpCd = methTpCd;
+    }
+
+    public String getMethTpCd() 
+    {
+        return methTpCd;
+    }
+    public void setMethUrl(String methUrl) 
+    {
+        this.methUrl = methUrl;
+    }
+
+    public String getMethUrl() 
+    {
+        return methUrl;
+    }
+    public void setAppId(String appId) 
+    {
+        this.appId = appId;
+    }
+
+    public String getAppId() 
+    {
+        return appId;
+    }
+    public void setAppKey(String appKey) 
+    {
+        this.appKey = appKey;
+    }
+
+    public String getAppKey() 
+    {
+        return appKey;
+    }
+    public void setSkKhh(String skKhh) 
+    {
+        this.skKhh = skKhh;
+    }
+
+    public String getSkKhh() 
+    {
+        return skKhh;
+    }
+    public void setSkAccountNm(String skAccountNm) 
+    {
+        this.skAccountNm = skAccountNm;
+    }
+
+    public String getSkAccountNm() 
+    {
+        return skAccountNm;
+    }
+    public void setSkAccount(String skAccount) 
+    {
+        this.skAccount = skAccount;
+    }
+
+    public String getSkAccount() 
+    {
+        return skAccount;
+    }
+    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("confId", getConfId())
+            .append("sysTpCd", getSysTpCd())
+            .append("methTpCd", getMethTpCd())
+            .append("methUrl", getMethUrl())
+            .append("appId", getAppId())
+            .append("appKey", getAppKey())
+            .append("skKhh", getSkKhh())
+            .append("skAccountNm", getSkAccountNm())
+            .append("skAccount", getSkAccount())
+            .append("status", getStatus())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/opt/mapper/SysInfoConfigMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.opt.mapper;
+
+import java.util.List;
+import com.ruoyi.opt.domain.SysInfoConfig;
+
+/**
+ * 系统配置Mapper接口
+ * 
+ * @author chengpan
+ * @date 2022-09-05
+ */
+public interface SysInfoConfigMapper 
+{
+    /**
+     * 查询系统配置
+     * 
+     * @param confId 系统配置主键
+     * @return 系统配置
+     */
+    public SysInfoConfig selectSysInfoConfigByConfId(Long confId);
+
+    /**
+     * 查询系统配置列表
+     * 
+     * @param sysInfoConfig 系统配置
+     * @return 系统配置集合
+     */
+    public List<SysInfoConfig> selectSysInfoConfigList(SysInfoConfig sysInfoConfig);
+
+    /**
+     * 新增系统配置
+     * 
+     * @param sysInfoConfig 系统配置
+     * @return 结果
+     */
+    public int insertSysInfoConfig(SysInfoConfig sysInfoConfig);
+
+    /**
+     * 修改系统配置
+     * 
+     * @param sysInfoConfig 系统配置
+     * @return 结果
+     */
+    public int updateSysInfoConfig(SysInfoConfig sysInfoConfig);
+
+    /**
+     * 删除系统配置
+     * 
+     * @param confId 系统配置主键
+     * @return 结果
+     */
+    public int deleteSysInfoConfigByConfId(Long confId);
+
+    /**
+     * 批量删除系统配置
+     * 
+     * @param confIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysInfoConfigByConfIds(String[] confIds);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/opt/service/ISysInfoConfigService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.opt.service;
+
+import java.util.List;
+import com.ruoyi.opt.domain.SysInfoConfig;
+
+/**
+ * 系统配置Service接口
+ * 
+ * @author chengpan
+ * @date 2022-09-05
+ */
+public interface ISysInfoConfigService 
+{
+    /**
+     * 查询系统配置
+     * 
+     * @param confId 系统配置主键
+     * @return 系统配置
+     */
+    public SysInfoConfig selectSysInfoConfigByConfId(Long confId);
+
+    /**
+     * 查询系统配置列表
+     * 
+     * @param sysInfoConfig 系统配置
+     * @return 系统配置集合
+     */
+    public List<SysInfoConfig> selectSysInfoConfigList(SysInfoConfig sysInfoConfig);
+
+    /**
+     * 新增系统配置
+     * 
+     * @param sysInfoConfig 系统配置
+     * @return 结果
+     */
+    public int insertSysInfoConfig(SysInfoConfig sysInfoConfig);
+
+    /**
+     * 修改系统配置
+     * 
+     * @param sysInfoConfig 系统配置
+     * @return 结果
+     */
+    public int updateSysInfoConfig(SysInfoConfig sysInfoConfig);
+
+    /**
+     * 批量删除系统配置
+     * 
+     * @param confIds 需要删除的系统配置主键集合
+     * @return 结果
+     */
+    public int deleteSysInfoConfigByConfIds(String confIds);
+
+    /**
+     * 删除系统配置信息
+     * 
+     * @param confId 系统配置主键
+     * @return 结果
+     */
+    public int deleteSysInfoConfigByConfId(Long confId);
+}

+ 98 - 0
ruoyi-system/src/main/java/com/ruoyi/opt/service/impl/SysInfoConfigServiceImpl.java

@@ -0,0 +1,98 @@
+package com.ruoyi.opt.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.opt.mapper.SysInfoConfigMapper;
+import com.ruoyi.opt.domain.SysInfoConfig;
+import com.ruoyi.opt.service.ISysInfoConfigService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 系统配置Service业务层处理
+ * 
+ * @author chengpan
+ * @date 2022-09-05
+ */
+@Service
+public class SysInfoConfigServiceImpl implements ISysInfoConfigService 
+{
+    @Autowired
+    private SysInfoConfigMapper sysInfoConfigMapper;
+
+    /**
+     * 查询系统配置
+     * 
+     * @param confId 系统配置主键
+     * @return 系统配置
+     */
+    @Override
+    public SysInfoConfig selectSysInfoConfigByConfId(Long confId)
+    {
+        return sysInfoConfigMapper.selectSysInfoConfigByConfId(confId);
+    }
+
+    /**
+     * 查询系统配置列表
+     * 
+     * @param sysInfoConfig 系统配置
+     * @return 系统配置
+     */
+    @Override
+    public List<SysInfoConfig> selectSysInfoConfigList(SysInfoConfig sysInfoConfig)
+    {
+        return sysInfoConfigMapper.selectSysInfoConfigList(sysInfoConfig);
+    }
+
+    /**
+     * 新增系统配置
+     * 
+     * @param sysInfoConfig 系统配置
+     * @return 结果
+     */
+    @Override
+    public int insertSysInfoConfig(SysInfoConfig sysInfoConfig)
+    {
+        sysInfoConfig.setCreateTime(DateUtils.getNowDate());
+        sysInfoConfig.setUpdateTime(DateUtils.getNowDate());
+        return sysInfoConfigMapper.insertSysInfoConfig(sysInfoConfig);
+    }
+
+    /**
+     * 修改系统配置
+     * 
+     * @param sysInfoConfig 系统配置
+     * @return 结果
+     */
+    @Override
+    public int updateSysInfoConfig(SysInfoConfig sysInfoConfig)
+    {
+        sysInfoConfig.setUpdateTime(DateUtils.getNowDate());
+        return sysInfoConfigMapper.updateSysInfoConfig(sysInfoConfig);
+    }
+
+    /**
+     * 批量删除系统配置
+     * 
+     * @param confIds 需要删除的系统配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysInfoConfigByConfIds(String confIds)
+    {
+        return sysInfoConfigMapper.deleteSysInfoConfigByConfIds(Convert.toStrArray(confIds));
+    }
+
+    /**
+     * 删除系统配置信息
+     * 
+     * @param confId 系统配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysInfoConfigByConfId(Long confId)
+    {
+        return sysInfoConfigMapper.deleteSysInfoConfigByConfId(confId);
+    }
+}

+ 111 - 0
ruoyi-system/src/main/resources/mapper/opt/SysInfoConfigMapper.xml

@@ -0,0 +1,111 @@
+<?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.ruoyi.opt.mapper.SysInfoConfigMapper">
+    
+    <resultMap type="SysInfoConfig" id="SysInfoConfigResult">
+        <result property="confId"    column="conf_id"    />
+        <result property="sysTpCd"    column="sys_tp_cd"    />
+        <result property="methTpCd"    column="meth_tp_cd"    />
+        <result property="methUrl"    column="meth_url"    />
+        <result property="appId"    column="app_id"    />
+        <result property="appKey"    column="app_key"    />
+        <result property="skKhh"    column="sk_khh"    />
+        <result property="skAccountNm"    column="sk_account_nm"    />
+        <result property="skAccount"    column="sk_account"    />
+        <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="selectSysInfoConfigVo">
+        select conf_id, sys_tp_cd, meth_tp_cd, meth_url, app_id, app_key, sk_khh, sk_account_nm, sk_account, status, create_by, create_time, update_by, update_time from sys_info_config
+    </sql>
+
+    <select id="selectSysInfoConfigList" parameterType="SysInfoConfig" resultMap="SysInfoConfigResult">
+        <include refid="selectSysInfoConfigVo"/>
+        <where>  
+            <if test="sysTpCd != null  and sysTpCd != ''"> and sys_tp_cd = #{sysTpCd}</if>
+            <if test="methUrl != null  and methUrl != ''"> and meth_url like concat('%', #{methUrl}, '%')</if>
+            <if test="appId != null  and appId != ''"> and app_id like concat('%', #{appId}, '%')</if>
+            <if test="skKhh != null  and skKhh != ''"> and sk_khh like concat('%', #{skKhh}, '%')</if>
+            <if test="skAccountNm != null  and skAccountNm != ''"> and sk_account_nm like concat('%', #{skAccountNm}, '%')</if>
+            <if test="skAccount != null  and skAccount != ''"> and sk_account like concat('%', #{skAccount}, '%')</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+        </where>
+    </select>
+    
+    <select id="selectSysInfoConfigByConfId" parameterType="Long" resultMap="SysInfoConfigResult">
+        <include refid="selectSysInfoConfigVo"/>
+        where conf_id = #{confId}
+    </select>
+        
+    <insert id="insertSysInfoConfig" parameterType="SysInfoConfig" useGeneratedKeys="true" keyProperty="confId">
+        insert into sys_info_config
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="sysTpCd != null">sys_tp_cd,</if>
+            <if test="methTpCd != null">meth_tp_cd,</if>
+            <if test="methUrl != null">meth_url,</if>
+            <if test="appId != null">app_id,</if>
+            <if test="appKey != null">app_key,</if>
+            <if test="skKhh != null">sk_khh,</if>
+            <if test="skAccountNm != null">sk_account_nm,</if>
+            <if test="skAccount != null">sk_account,</if>
+            <if test="status != null">status,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="sysTpCd != null">#{sysTpCd},</if>
+            <if test="methTpCd != null">#{methTpCd},</if>
+            <if test="methUrl != null">#{methUrl},</if>
+            <if test="appId != null">#{appId},</if>
+            <if test="appKey != null">#{appKey},</if>
+            <if test="skKhh != null">#{skKhh},</if>
+            <if test="skAccountNm != null">#{skAccountNm},</if>
+            <if test="skAccount != null">#{skAccount},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysInfoConfig" parameterType="SysInfoConfig">
+        update sys_info_config
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="sysTpCd != null">sys_tp_cd = #{sysTpCd},</if>
+            <if test="methTpCd != null">meth_tp_cd = #{methTpCd},</if>
+            <if test="methUrl != null">meth_url = #{methUrl},</if>
+            <if test="appId != null">app_id = #{appId},</if>
+            <if test="appKey != null">app_key = #{appKey},</if>
+            <if test="skKhh != null">sk_khh = #{skKhh},</if>
+            <if test="skAccountNm != null">sk_account_nm = #{skAccountNm},</if>
+            <if test="skAccount != null">sk_account = #{skAccount},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where conf_id = #{confId}
+    </update>
+
+    <delete id="deleteSysInfoConfigByConfId" parameterType="Long">
+        delete from sys_info_config where conf_id = #{confId}
+    </delete>
+
+    <delete id="deleteSysInfoConfigByConfIds" parameterType="String">
+        delete from sys_info_config where conf_id in 
+        <foreach item="confId" collection="array" open="(" separator="," close=")">
+            #{confId}
+        </foreach>
+    </delete>
+
+</mapper>