Browse Source

自定义表单

大大的豆芽 7 months ago
parent
commit
9963321552

+ 116 - 0
yiqi-admin/src/main/java/com/yiqi/web/controller/system/SysDataGroupController.java

@@ -0,0 +1,116 @@
+package com.yiqi.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import com.yiqi.common.constant.UrlConstants;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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.yiqi.common.annotation.Log;
+import com.yiqi.common.core.controller.BaseController;
+import com.yiqi.common.core.domain.AjaxResult;
+import com.yiqi.common.enums.BusinessType;
+import com.yiqi.system.domain.SysDataGroup;
+import com.yiqi.system.service.ISysDataGroupService;
+import com.yiqi.common.utils.poi.ExcelUtil;
+import com.yiqi.common.core.page.TableDataInfo;
+
+/**
+ * 组合数据Controller
+ *
+ * @author douya
+ * @date 2024-10-29
+ */
+@Api(tags = "管理后台 - 组合数据")
+@RestController
+@RequestMapping(UrlConstants.managerApi + "/system/group")
+public class SysDataGroupController extends BaseController {
+    @Autowired
+    private ISysDataGroupService sysDataGroupService;
+
+
+    //<editor-folder desc="基础函数">
+/**
+ * 查询组合数据列表
+ */
+@PreAuthorize("@ss.hasPermi('system:group:list')")
+@GetMapping("/list")
+    @ApiOperation(value = "查询组合数据列表")
+    public TableDataInfo list(SysDataGroup sysDataGroup) {
+        startPage();
+        List<SysDataGroup> list = sysDataGroupService.selectSysDataGroupList(sysDataGroup);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出组合数据列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:group:export')")
+    @Log(title = "组合数据", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出组合数据列表")
+    public void export(HttpServletResponse response, SysDataGroup sysDataGroup) {
+        List<SysDataGroup> list = sysDataGroupService.selectSysDataGroupList(sysDataGroup);
+        ExcelUtil<SysDataGroup> util = new ExcelUtil<SysDataGroup>(SysDataGroup. class);
+        util.exportExcel(response, list, "组合数据数据");
+    }
+
+    /**
+     * 获取组合数据详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:group:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取组合数据详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Integer id) {
+        return success(sysDataGroupService.selectSysDataGroupById(id));
+    }
+
+    /**
+     * 新增组合数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:group:add')")
+    @Log(title = "组合数据", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增组合数据")
+    public AjaxResult add(@RequestBody SysDataGroup sysDataGroup) {
+        sysDataGroup.setCreateById(getUserId());
+        sysDataGroup.setCreateBy(getUsername());
+        return toAjax(sysDataGroupService.insertSysDataGroup(sysDataGroup));
+    }
+
+    /**
+     * 修改组合数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:group:edit')")
+    @Log(title = "组合数据", businessType = BusinessType.UPDATE)
+    @PostMapping(value = "/{id}")
+    @ApiOperation(value = "修改组合数据")
+    public AjaxResult edit(@RequestBody SysDataGroup sysDataGroup) {
+        sysDataGroup.setUpdateById(getUserId());
+        sysDataGroup.setUpdateBy(getUsername());
+        return toAjax(sysDataGroupService.updateSysDataGroup(sysDataGroup));
+    }
+
+    /**
+     * 删除组合数据
+     */
+    @PreAuthorize("@ss.hasPermi('system:group:remove')")
+    @Log(title = "组合数据", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除组合数据")
+    public AjaxResult remove(@PathVariable Integer[] ids) {
+        return toAjax(sysDataGroupService.deleteSysDataGroupByIds(ids));
+    }
+
+
+    //</editor-folder>
+}

+ 126 - 0
yiqi-admin/src/main/java/com/yiqi/web/controller/system/SysDataGroupInfoController.java

@@ -0,0 +1,126 @@
+package com.yiqi.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import com.yiqi.common.constant.UrlConstants;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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.yiqi.common.annotation.Log;
+import com.yiqi.common.core.controller.BaseController;
+import com.yiqi.common.core.domain.AjaxResult;
+import com.yiqi.common.enums.BusinessType;
+import com.yiqi.system.domain.SysDataGroupInfo;
+import com.yiqi.system.service.ISysDataGroupInfoService;
+import com.yiqi.common.utils.poi.ExcelUtil;
+import com.yiqi.common.core.page.TableDataInfo;
+
+/**
+ * 组合数据详情Controller
+ *
+ * @author douya
+ * @date 2024-10-29
+ */
+@Api(tags = "管理后台 - 组合数据详情")
+@RestController
+@RequestMapping(UrlConstants.managerApi + "/system/groupData")
+public class SysDataGroupInfoController extends BaseController {
+    @Autowired
+    private ISysDataGroupInfoService sysDataGroupInfoService;
+
+
+    //<editor-folder desc="基础函数">
+/**
+ * 查询组合数据详情列表
+ */
+@PreAuthorize("@ss.hasPermi('system:groupData:list')")
+@GetMapping("/list")
+    @ApiOperation(value = "查询组合数据详情列表")
+    public TableDataInfo list(SysDataGroupInfo sysDataGroupInfo) {
+        startPage();
+        List<SysDataGroupInfo> list = sysDataGroupInfoService.selectSysDataGroupInfoList(sysDataGroupInfo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出组合数据详情列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:groupData:export')")
+    @Log(title = "组合数据详情", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出组合数据详情列表")
+    public void export(HttpServletResponse response, SysDataGroupInfo sysDataGroupInfo) {
+        List<SysDataGroupInfo> list = sysDataGroupInfoService.selectSysDataGroupInfoList(sysDataGroupInfo);
+        ExcelUtil<SysDataGroupInfo> util = new ExcelUtil<SysDataGroupInfo>(SysDataGroupInfo. class);
+        util.exportExcel(response, list, "组合数据详情数据");
+    }
+
+    /**
+     * 获取组合数据详情详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:groupData:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取组合数据详情详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Integer id) {
+        return success(sysDataGroupInfoService.selectSysDataGroupInfoById(id));
+    }
+
+    /**
+     * 新增组合数据详情
+     */
+    @PreAuthorize("@ss.hasPermi('system:groupData:add')")
+    @Log(title = "组合数据详情", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增组合数据详情")
+    public AjaxResult add(@RequestBody SysDataGroupInfo sysDataGroupInfo) {
+        sysDataGroupInfo.setCreateById(getUserId());
+        sysDataGroupInfo.setCreateBy(getUsername());
+        return toAjax(sysDataGroupInfoService.insertSysDataGroupInfo(sysDataGroupInfo));
+    }
+
+    /**
+     * 修改组合数据详情
+     */
+    @PreAuthorize("@ss.hasPermi('system:groupData:edit')")
+    @Log(title = "组合数据详情", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改组合数据详情")
+    public AjaxResult edit(@RequestBody SysDataGroupInfo sysDataGroupInfo) {
+        sysDataGroupInfo.setUpdateById(getUserId());
+        sysDataGroupInfo.setUpdateBy(getUsername());
+        return toAjax(sysDataGroupInfoService.updateSysDataGroupInfo(sysDataGroupInfo));
+    }
+
+    /**
+     * 删除组合数据详情
+     */
+    @PreAuthorize("@ss.hasPermi('system:groupData:remove')")
+    @Log(title = "组合数据详情", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除组合数据详情")
+    public AjaxResult remove(@PathVariable Integer[] ids) {
+        return toAjax(sysDataGroupInfoService.deleteSysDataGroupInfoByIds(ids));
+    }
+
+            /**
+             * 修改组合数据详情状态
+             */
+            @PreAuthorize("@ss.hasPermi('system:groupData:edit')")
+            @Log(title = "组合数据详情", businessType = BusinessType.UPDATE)
+            @PostMapping(value = "updateStatus")
+            @ApiOperation(value = "修改组合数据详情状态")
+            public AjaxResult updateSysDataGroupInfoStatus(@RequestBody SysDataGroupInfo sysDataGroupInfo) {
+                return toAjax(sysDataGroupInfoService.updateSysDataGroupInfoStatus(sysDataGroupInfo));
+            }
+
+    //</editor-folder>
+}

+ 4 - 0
yiqi-admin/src/main/resources/application.yml

@@ -69,6 +69,10 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   # 文件上传
+  http:
+    multipart:
+      max-file-size: 500MB
+      location: /www/server/yiqi_v2
   servlet:
     multipart:
       # 单个文件大小

+ 5 - 0
yiqi-api/src/main/resources/application.yml

@@ -64,6 +64,11 @@ spring:
     #    active: @profileActive@
     active: dev
   # jackson时间格式化
+  # 文件上传
+  http:
+    multipart:
+      max-file-size: 500MB
+      location: /www/server/yiqi_v2
   jackson:
     default-property-inclusion: NON_NULL
     time-zone: GMT+8

+ 53 - 0
yiqi-common/src/main/java/com/yiqi/system/domain/SysDataGroup.java

@@ -0,0 +1,53 @@
+package com.yiqi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.yiqi.common.annotation.Excel;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.yiqi.common.core.domain.BaseEntity;
+import lombok.Data;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+
+/**
+ * 组合数据对象 sys_data_group
+ *
+ * @author douya
+ * @date 2024-10-29
+ */
+@ApiModel("组合数据")
+@TableName("sys_data_group")
+@Data
+public class SysDataGroup extends BaseEntity
+        {
+private static final long serialVersionUID=1L;
+
+    /** 组合数据ID */
+        @ApiModelProperty("组合数据ID")
+        @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    /** 数据组名称 */
+            @Excel(name = "数据组名称")
+        @ApiModelProperty("数据组名称")
+    private String name;
+
+    /** 数据提示 */
+            @Excel(name = "数据提示")
+        @ApiModelProperty("数据提示")
+    private String info;
+
+    /** 关键字 */
+            @Excel(name = "关键字")
+        @ApiModelProperty("关键字")
+    private String configName;
+
+    /** 数据组字段以及类型(json数据) */
+            @Excel(name = "数据组字段以及类型", readConverterExp = "j=son数据")
+        @ApiModelProperty("数据组字段以及类型(json数据)")
+    private String fields;
+
+
+        }

+ 53 - 0
yiqi-common/src/main/java/com/yiqi/system/domain/SysDataGroupInfo.java

@@ -0,0 +1,53 @@
+package com.yiqi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.yiqi.common.annotation.Excel;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.yiqi.common.core.domain.BaseEntity;
+import lombok.Data;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+
+/**
+ * 组合数据详情对象 sys_data_group_info
+ *
+ * @author douya
+ * @date 2024-10-29
+ */
+@ApiModel("组合数据详情")
+@TableName("sys_data_group_info")
+@Data
+public class SysDataGroupInfo extends BaseEntity
+        {
+private static final long serialVersionUID=1L;
+
+    /** 组合数据详情ID */
+        @ApiModelProperty("组合数据详情ID")
+        @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    /** 对应的数据组id */
+            @Excel(name = "对应的数据组id")
+        @ApiModelProperty("对应的数据组id")
+    private Integer groupId;
+
+    /** 数据组对应的数据值(json数据) */
+            @Excel(name = "数据组对应的数据值", readConverterExp = "j=son数据")
+        @ApiModelProperty("数据组对应的数据值(json数据)")
+    private String value;
+
+    /** 数据排序 */
+            @Excel(name = "数据排序")
+        @ApiModelProperty("数据排序")
+    private Integer sort;
+
+    /** 状态(1:开启;2:关闭;) */
+            @Excel(name = "状态", readConverterExp = "1=:开启;2:关闭;")
+        @ApiModelProperty("状态(1:开启;2:关闭;)")
+    private Integer status;
+
+
+        }

+ 73 - 0
yiqi-common/src/main/java/com/yiqi/system/service/ISysDataGroupInfoService.java

@@ -0,0 +1,73 @@
+package com.yiqi.system.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yiqi.system.domain.SysDataGroupInfo;
+
+/**
+ * 组合数据详情Service接口
+ *
+ * @author douya
+ * @date 2024-10-29
+ */
+public interface ISysDataGroupInfoService extends IService<SysDataGroupInfo> {
+
+    //<editor-folder desc="基础函数">
+    /**
+     * 查询组合数据详情
+     *
+     * @param id 组合数据详情主键
+     * @return 组合数据详情
+     */
+    public SysDataGroupInfo selectSysDataGroupInfoById(Integer id);
+
+    /**
+     * 查询组合数据详情列表
+     *
+     * @param sysDataGroupInfo 组合数据详情
+     * @return 组合数据详情集合
+     */
+    public List<SysDataGroupInfo> selectSysDataGroupInfoList(SysDataGroupInfo sysDataGroupInfo);
+
+    /**
+     * 新增组合数据详情
+     *
+     * @param sysDataGroupInfo 组合数据详情
+     * @return 结果
+     */
+    public int insertSysDataGroupInfo(SysDataGroupInfo sysDataGroupInfo);
+
+    /**
+     * 修改组合数据详情
+     *
+     * @param sysDataGroupInfo 组合数据详情
+     * @return 结果
+     */
+    public int updateSysDataGroupInfo(SysDataGroupInfo sysDataGroupInfo);
+
+    /**
+     * 批量删除组合数据详情
+     *
+     * @param ids 需要删除的组合数据详情主键集合
+     * @return 结果
+     */
+    public int deleteSysDataGroupInfoByIds(Integer[] ids);
+
+    /**
+     * 删除组合数据详情信息
+     *
+     * @param id 组合数据详情主键
+     * @return 结果
+     */
+    public int deleteSysDataGroupInfoById(Integer id);
+
+
+            /**
+             * 修改组合数据详情状态
+             *
+             * @param sysDataGroupInfo 组合数据详情
+             * @return 结果
+             */
+            public int updateSysDataGroupInfoStatus(SysDataGroupInfo sysDataGroupInfo);
+    //</editor-folder>
+}

+ 66 - 0
yiqi-common/src/main/java/com/yiqi/system/service/ISysDataGroupService.java

@@ -0,0 +1,66 @@
+package com.yiqi.system.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yiqi.system.domain.SysDataGroup;
+
+/**
+ * 组合数据Service接口
+ *
+ * @author douya
+ * @date 2024-10-29
+ */
+public interface ISysDataGroupService extends IService<SysDataGroup> {
+
+    //<editor-folder desc="基础函数">
+    /**
+     * 查询组合数据
+     *
+     * @param id 组合数据主键
+     * @return 组合数据
+     */
+    public SysDataGroup selectSysDataGroupById(Integer id);
+
+    /**
+     * 查询组合数据列表
+     *
+     * @param sysDataGroup 组合数据
+     * @return 组合数据集合
+     */
+    public List<SysDataGroup> selectSysDataGroupList(SysDataGroup sysDataGroup);
+
+    /**
+     * 新增组合数据
+     *
+     * @param sysDataGroup 组合数据
+     * @return 结果
+     */
+    public int insertSysDataGroup(SysDataGroup sysDataGroup);
+
+    /**
+     * 修改组合数据
+     *
+     * @param sysDataGroup 组合数据
+     * @return 结果
+     */
+    public int updateSysDataGroup(SysDataGroup sysDataGroup);
+
+    /**
+     * 批量删除组合数据
+     *
+     * @param ids 需要删除的组合数据主键集合
+     * @return 结果
+     */
+    public int deleteSysDataGroupByIds(Integer[] ids);
+
+    /**
+     * 删除组合数据信息
+     *
+     * @param id 组合数据主键
+     * @return 结果
+     */
+    public int deleteSysDataGroupById(Integer id);
+
+
+    //</editor-folder>
+}

+ 1 - 0
yiqi-core/src/main/java/com/yiqi/app/service/impl/WeAppTokenServiceImpl.java

@@ -74,6 +74,7 @@ public class WeAppTokenServiceImpl implements IWeAppTokenService {
             }
             catch (Exception e)
             {
+                e.printStackTrace();
             }
         }
         return null;

+ 65 - 0
yiqi-system/src/main/java/com/yiqi/system/mapper/SysDataGroupInfoMapper.java

@@ -0,0 +1,65 @@
+package com.yiqi.system.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import com.yiqi.system.domain.SysDataGroupInfo;
+
+/**
+ * 组合数据详情Mapper接口
+ *
+ * @author douya
+ * @date 2024-10-29
+ */
+@Mapper
+public interface SysDataGroupInfoMapper extends BaseMapper<SysDataGroupInfo> {
+    //<editor-folder desc="基础韩素">
+    /**
+     * 查询组合数据详情
+     *
+     * @param id 组合数据详情主键
+     * @return 组合数据详情
+     */
+    public SysDataGroupInfo selectSysDataGroupInfoById(Integer id);
+
+    /**
+     * 查询组合数据详情列表
+     *
+     * @param sysDataGroupInfo 组合数据详情
+     * @return 组合数据详情集合
+     */
+    public List<SysDataGroupInfo> selectSysDataGroupInfoList(SysDataGroupInfo sysDataGroupInfo);
+
+    /**
+     * 新增组合数据详情
+     *
+     * @param sysDataGroupInfo 组合数据详情
+     * @return 结果
+     */
+    public int insertSysDataGroupInfo(SysDataGroupInfo sysDataGroupInfo);
+
+    /**
+     * 修改组合数据详情
+     *
+     * @param sysDataGroupInfo 组合数据详情
+     * @return 结果
+     */
+    public int updateSysDataGroupInfo(SysDataGroupInfo sysDataGroupInfo);
+
+    /**
+     * 删除组合数据详情
+     *
+     * @param id 组合数据详情主键
+     * @return 结果
+     */
+    public int deleteSysDataGroupInfoById(Integer id);
+
+    /**
+     * 批量删除组合数据详情
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysDataGroupInfoByIds(Integer[] ids);
+    //</editor-folder>
+}

+ 65 - 0
yiqi-system/src/main/java/com/yiqi/system/mapper/SysDataGroupMapper.java

@@ -0,0 +1,65 @@
+package com.yiqi.system.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import com.yiqi.system.domain.SysDataGroup;
+
+/**
+ * 组合数据Mapper接口
+ *
+ * @author douya
+ * @date 2024-10-29
+ */
+@Mapper
+public interface SysDataGroupMapper extends BaseMapper<SysDataGroup> {
+    //<editor-folder desc="基础韩素">
+    /**
+     * 查询组合数据
+     *
+     * @param id 组合数据主键
+     * @return 组合数据
+     */
+    public SysDataGroup selectSysDataGroupById(Integer id);
+
+    /**
+     * 查询组合数据列表
+     *
+     * @param sysDataGroup 组合数据
+     * @return 组合数据集合
+     */
+    public List<SysDataGroup> selectSysDataGroupList(SysDataGroup sysDataGroup);
+
+    /**
+     * 新增组合数据
+     *
+     * @param sysDataGroup 组合数据
+     * @return 结果
+     */
+    public int insertSysDataGroup(SysDataGroup sysDataGroup);
+
+    /**
+     * 修改组合数据
+     *
+     * @param sysDataGroup 组合数据
+     * @return 结果
+     */
+    public int updateSysDataGroup(SysDataGroup sysDataGroup);
+
+    /**
+     * 删除组合数据
+     *
+     * @param id 组合数据主键
+     * @return 结果
+     */
+    public int deleteSysDataGroupById(Integer id);
+
+    /**
+     * 批量删除组合数据
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysDataGroupByIds(Integer[] ids);
+    //</editor-folder>
+}

+ 107 - 0
yiqi-system/src/main/java/com/yiqi/system/service/impl/SysDataGroupInfoServiceImpl.java

@@ -0,0 +1,107 @@
+package com.yiqi.system.service.impl;
+
+import java.util.List;
+        import com.yiqi.common.utils.DateUtils;
+import com.yiqi.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yiqi.system.mapper.SysDataGroupInfoMapper;
+import com.yiqi.system.domain.SysDataGroupInfo;
+import com.yiqi.system.service.ISysDataGroupInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * 组合数据详情Service业务层处理
+ *
+ * @author douya
+ * @date 2024-10-29
+ */
+@Service
+public class SysDataGroupInfoServiceImpl extends ServiceImpl<SysDataGroupInfoMapper,SysDataGroupInfo> implements ISysDataGroupInfoService {
+
+    //<editor-folder desc="基础韩素">
+    /**
+     * 查询组合数据详情
+     *
+     * @param id 组合数据详情主键
+     * @return 组合数据详情
+     */
+    @Override
+    public SysDataGroupInfo selectSysDataGroupInfoById(Integer id) {
+        return baseMapper.selectSysDataGroupInfoById(id);
+    }
+
+    /**
+     * 查询组合数据详情列表
+     *
+     * @param sysDataGroupInfo 组合数据详情
+     * @return 组合数据详情
+     */
+    @Override
+    public List<SysDataGroupInfo> selectSysDataGroupInfoList(SysDataGroupInfo sysDataGroupInfo) {
+        return baseMapper.selectSysDataGroupInfoList(sysDataGroupInfo);
+    }
+
+    /**
+     * 新增组合数据详情
+     *
+     * @param sysDataGroupInfo 组合数据详情
+     * @return 结果
+     */
+    @Override
+    public int insertSysDataGroupInfo(SysDataGroupInfo sysDataGroupInfo) {
+                sysDataGroupInfo.setCreateTime(DateUtils.getNowDate());
+            return baseMapper.insertSysDataGroupInfo(sysDataGroupInfo);
+    }
+
+    /**
+     * 修改组合数据详情
+     *
+     * @param sysDataGroupInfo 组合数据详情
+     * @return 结果
+     */
+    @Override
+    public int updateSysDataGroupInfo(SysDataGroupInfo sysDataGroupInfo) {
+                sysDataGroupInfo.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateSysDataGroupInfo(sysDataGroupInfo);
+    }
+
+    /**
+     * 批量删除组合数据详情
+     *
+     * @param ids 需要删除的组合数据详情主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysDataGroupInfoByIds(Integer[] ids) {
+        return baseMapper.deleteSysDataGroupInfoByIds(ids);
+    }
+
+    /**
+     * 删除组合数据详情信息
+     *
+     * @param id 组合数据详情主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysDataGroupInfoById(Integer id) {
+        return baseMapper.deleteSysDataGroupInfoById(id);
+    }
+
+            /**
+             * 修改组合数据详情状态
+             *
+             * @param sysDataGroupInfo 组合数据详情
+             * @return 结果
+             */
+            @Override
+            public int updateSysDataGroupInfoStatus(SysDataGroupInfo sysDataGroupInfo) {
+                        sysDataGroupInfo.setUpdateById(SecurityUtils.getUserId());
+                        sysDataGroupInfo.setUpdateBy(SecurityUtils.getUsername());
+                        sysDataGroupInfo.setUpdateTime(DateUtils.getNowDate());
+                return baseMapper.updateSysDataGroupInfo(sysDataGroupInfo);
+            }
+
+    //</editor-folder>
+
+}

+ 91 - 0
yiqi-system/src/main/java/com/yiqi/system/service/impl/SysDataGroupServiceImpl.java

@@ -0,0 +1,91 @@
+package com.yiqi.system.service.impl;
+
+import java.util.List;
+import com.yiqi.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yiqi.system.mapper.SysDataGroupMapper;
+import com.yiqi.system.domain.SysDataGroup;
+import com.yiqi.system.service.ISysDataGroupService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * 组合数据Service业务层处理
+ *
+ * @author douya
+ * @date 2024-10-29
+ */
+@Service
+public class SysDataGroupServiceImpl extends ServiceImpl<SysDataGroupMapper,SysDataGroup> implements ISysDataGroupService {
+
+    //<editor-folder desc="基础韩素">
+    /**
+     * 查询组合数据
+     *
+     * @param id 组合数据主键
+     * @return 组合数据
+     */
+    @Override
+    public SysDataGroup selectSysDataGroupById(Integer id) {
+        return baseMapper.selectSysDataGroupById(id);
+    }
+
+    /**
+     * 查询组合数据列表
+     *
+     * @param sysDataGroup 组合数据
+     * @return 组合数据
+     */
+    @Override
+    public List<SysDataGroup> selectSysDataGroupList(SysDataGroup sysDataGroup) {
+        return baseMapper.selectSysDataGroupList(sysDataGroup);
+    }
+
+    /**
+     * 新增组合数据
+     *
+     * @param sysDataGroup 组合数据
+     * @return 结果
+     */
+    @Override
+    public int insertSysDataGroup(SysDataGroup sysDataGroup) {
+            return baseMapper.insertSysDataGroup(sysDataGroup);
+    }
+
+    /**
+     * 修改组合数据
+     *
+     * @param sysDataGroup 组合数据
+     * @return 结果
+     */
+    @Override
+    public int updateSysDataGroup(SysDataGroup sysDataGroup) {
+        return baseMapper.updateSysDataGroup(sysDataGroup);
+    }
+
+    /**
+     * 批量删除组合数据
+     *
+     * @param ids 需要删除的组合数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysDataGroupByIds(Integer[] ids) {
+        return baseMapper.deleteSysDataGroupByIds(ids);
+    }
+
+    /**
+     * 删除组合数据信息
+     *
+     * @param id 组合数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysDataGroupById(Integer id) {
+        return baseMapper.deleteSysDataGroupById(id);
+    }
+
+
+    //</editor-folder>
+
+}

+ 157 - 0
yiqi-system/src/main/resources/mapper/system/SysDataGroupInfoMapper.xml

@@ -0,0 +1,157 @@
+<?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.yiqi.system.mapper.SysDataGroupInfoMapper">
+
+    <resultMap type="SysDataGroupInfo" id="SysDataGroupInfoResult">
+        <result property="id" column="id"/>
+        <result property="groupId" column="group_id"/>
+        <result property="value" column="value"/>
+        <result property="sort" column="sort"/>
+        <result property="status" column="status"/>
+        <result property="createById" column="create_by_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateById" column="update_by_id"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+
+    <sql id="selectSysDataGroupInfoVo">
+        select id, group_id, value, sort, status, create_by_id, create_by, create_time, update_by_id, update_by, update_time, remark
+        from sys_data_group_info
+    </sql>
+
+    <select id="selectSysDataGroupInfoList" parameterType="SysDataGroupInfo" resultMap="SysDataGroupInfoResult">
+        <include refid="selectSysDataGroupInfoVo"/>
+        <where>
+            <if test="groupId != null ">
+                and group_id = #{groupId}
+            </if>
+            <if test="value != null  and value != ''">
+                and value = #{value}
+            </if>
+            <if test="sort != null ">
+                and sort = #{sort}
+            </if>
+            <if test="status != null ">
+                and status = #{status}
+            </if>
+        </where>
+    </select>
+
+    <select id="selectSysDataGroupInfoById" parameterType="Integer"
+            resultMap="SysDataGroupInfoResult">
+        <include refid="selectSysDataGroupInfoVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertSysDataGroupInfo" parameterType="SysDataGroupInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_data_group_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="groupId != null">group_id,
+            </if>
+            <if test="value != null">value,
+            </if>
+            <if test="sort != null">sort,
+            </if>
+            <if test="status != null">status,
+            </if>
+            <if test="createById != null">create_by_id,
+            </if>
+            <if test="createBy != null">create_by,
+            </if>
+            <if test="createTime != null">create_time,
+            </if>
+            <if test="updateById != null">update_by_id,
+            </if>
+            <if test="updateBy != null">update_by,
+            </if>
+            <if test="updateTime != null">update_time,
+            </if>
+            <if test="remark != null">remark,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="groupId != null">#{groupId},
+            </if>
+            <if test="value != null">#{value},
+            </if>
+            <if test="sort != null">#{sort},
+            </if>
+            <if test="status != null">#{status},
+            </if>
+            <if test="createById != null">#{createById},
+            </if>
+            <if test="createBy != null">#{createBy},
+            </if>
+            <if test="createTime != null">#{createTime},
+            </if>
+            <if test="updateById != null">#{updateById},
+            </if>
+            <if test="updateBy != null">#{updateBy},
+            </if>
+            <if test="updateTime != null">#{updateTime},
+            </if>
+            <if test="remark != null">#{remark},
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateSysDataGroupInfo" parameterType="SysDataGroupInfo">
+        update sys_data_group_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="groupId != null">group_id =
+                #{groupId},
+            </if>
+            <if test="value != null">value =
+                #{value},
+            </if>
+            <if test="sort != null">sort =
+                #{sort},
+            </if>
+            <if test="status != null">status =
+                #{status},
+            </if>
+            <if test="createById != null">create_by_id =
+                #{createById},
+            </if>
+            <if test="createBy != null">create_by =
+                #{createBy},
+            </if>
+            <if test="createTime != null">create_time =
+                #{createTime},
+            </if>
+            <if test="updateById != null">update_by_id =
+                #{updateById},
+            </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="deleteSysDataGroupInfoById" parameterType="Integer">
+        delete from sys_data_group_info where id = #{id}
+    </delete>
+
+    <delete id="deleteSysDataGroupInfoByIds" parameterType="String">
+        delete from sys_data_group_info where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+
+
+</mapper>

+ 101 - 0
yiqi-system/src/main/resources/mapper/system/SysDataGroupMapper.xml

@@ -0,0 +1,101 @@
+<?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.yiqi.system.mapper.SysDataGroupMapper">
+
+    <resultMap type="SysDataGroup" id="SysDataGroupResult">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="info" column="info"/>
+        <result property="configName" column="config_name"/>
+        <result property="fields" column="fields"/>
+    </resultMap>
+
+    <sql id="selectSysDataGroupVo">
+        select id, name, info, config_name, fields
+        from sys_data_group
+    </sql>
+
+    <select id="selectSysDataGroupList" parameterType="SysDataGroup" resultMap="SysDataGroupResult">
+        <include refid="selectSysDataGroupVo"/>
+        <where>
+            <if test="name != null  and name != ''">
+                and name like concat('%', #{name}, '%')
+            </if>
+            <if test="info != null  and info != ''">
+                and info = #{info}
+            </if>
+            <if test="configName != null  and configName != ''">
+                and config_name like concat('%', #{configName}, '%')
+            </if>
+            <if test="fields != null  and fields != ''">
+                and fields = #{fields}
+            </if>
+        </where>
+    </select>
+
+    <select id="selectSysDataGroupById" parameterType="Integer"
+            resultMap="SysDataGroupResult">
+        <include refid="selectSysDataGroupVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertSysDataGroup" parameterType="SysDataGroup" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_data_group
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">name,
+            </if>
+            <if test="info != null and info != ''">info,
+            </if>
+            <if test="configName != null and configName != ''">config_name,
+            </if>
+            <if test="fields != null">fields,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">#{name},
+            </if>
+            <if test="info != null and info != ''">#{info},
+            </if>
+            <if test="configName != null and configName != ''">#{configName},
+            </if>
+            <if test="fields != null">#{fields},
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateSysDataGroup" parameterType="SysDataGroup">
+        update sys_data_group
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null and name != ''">name =
+                #{name},
+            </if>
+            <if test="info != null and info != ''">info =
+                #{info},
+            </if>
+            <if test="configName != null and configName != ''">config_name =
+                #{configName},
+            </if>
+            <if test="fields != null">fields =
+                #{fields},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysDataGroupById" parameterType="Integer">
+        delete from sys_data_group where id = #{id}
+    </delete>
+
+    <delete id="deleteSysDataGroupByIds" parameterType="String">
+        delete from sys_data_group where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+
+
+</mapper>