Ver código fonte

代码提交

hongchuangyanfa 2 anos atrás
pai
commit
09ac45dd9c
22 arquivos alterados com 204 adições e 485 exclusões
  1. 3 0
      blade-ops/blade-swagger/src/main/resources/application-dev.yml
  2. 0 11
      blade-service-api/blade-control-api/pom.xml
  3. 22 3
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/DictInfo.java
  4. 2 1
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java
  5. 38 0
      blade-service/blade-control/pom.xml
  6. 78 0
      blade-service/blade-control/src/main/java/org/springblade/control/controller/CSysController.java
  7. 15 15
      blade-service/blade-control/src/main/java/org/springblade/control/controller/DictInfoController.java
  8. 4 2
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/DictInfoMapper.java
  9. 11 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/DictInfoMapper.xml
  10. 14 5
      blade-service/blade-control/src/main/java/org/springblade/control/service/IDictInfoService.java
  11. 12 7
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/DictInfoServiceImpl.java
  12. 5 5
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java
  13. 0 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  14. 0 127
      src/main/java/org/springblade/control/controller/DictInfoController.java
  15. 0 34
      src/main/java/org/springblade/control/dto/DictInfoDTO.java
  16. 0 64
      src/main/java/org/springblade/control/entity/DictInfo.java
  17. 0 42
      src/main/java/org/springblade/control/mapper/DictInfoMapper.java
  18. 0 32
      src/main/java/org/springblade/control/mapper/DictInfoMapper.xml
  19. 0 41
      src/main/java/org/springblade/control/service/IDictInfoService.java
  20. 0 41
      src/main/java/org/springblade/control/service/impl/DictInfoServiceImpl.java
  21. 0 34
      src/main/java/org/springblade/control/vo/DictInfoVO.java
  22. 0 20
      src/main/java/sql/dictinfo.menu.sql

+ 3 - 0
blade-ops/blade-swagger/src/main/resources/application-dev.yml

@@ -22,3 +22,6 @@ knife4j:
       - name: 档案接口
         uri: 127.0.0.1:8090
         location: /blade-archive/v2/api-docs
+      - name: 内控系统
+        uri: 127.0.0.1:8090
+        location: /blade-control/v2/api-docs

+ 0 - 11
blade-service-api/blade-control-api/pom.xml

@@ -11,17 +11,6 @@
     <artifactId>blade-control-api</artifactId>
     <version>${bladex.project.version}</version>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.springblade</groupId>
-            <artifactId>blade-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springblade</groupId>
-            <artifactId>blade-user-api</artifactId>
-            <version>2.9.1.RELEASE</version>
-        </dependency>
-    </dependencies>
     <packaging>jar</packaging>
 
 

+ 22 - 3
blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/DictInfo.java

@@ -16,10 +16,16 @@
  */
 package org.springblade.control.entity;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 
 import java.io.Serializable;
 
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
 import org.springblade.core.mp.base.BaseEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -32,15 +38,23 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @TableName("c_dict_info")
-@EqualsAndHashCode(callSuper = true)
-public class DictInfo extends BaseEntity {
+public class DictInfo implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
+    /**
+     * 主键
+     */
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty(value = "主键")
+    @TableId(value = "id", type = IdType.ASSIGN_ID)
+    private Long id;
+
     /**
      * 父主键
      */
     private Long parentId;
+
     /**
      * 字典名称
      */
@@ -62,5 +76,10 @@ public class DictInfo extends BaseEntity {
      */
     private String code;
 
-
+    /**
+     * 是否已删除
+     */
+    @TableLogic
+    @ApiModelProperty(value = "是否已删除")
+    private Integer isDeleted;
 }

+ 2 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java

@@ -511,12 +511,13 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
     }
 
 
-    @Scheduled(cron = "0 */2 * * * ?")
+    @Scheduled(cron = "0 */5 * * * ?")
     public void SignInfo() {
         //执行代码
         logger.debug("扫描开始");
         List<TaskBatch> maps = taskBatchService.getBaseMapper().selectList(Wrappers.<TaskBatch>lambdaQuery().eq(TaskBatch::getIsDeleted, 0));
         if (maps != null && maps.size() >= 1) {
+
             for (TaskBatch dataInfo : maps) {
                 String jsonData = dataInfo.getJsonData();
                 List<TaskApprovalVO> list = JSONArray.parseArray(jsonData, TaskApprovalVO.class);

+ 38 - 0
blade-service/blade-control/pom.xml

@@ -30,5 +30,43 @@
             <artifactId>blade-control-api</artifactId>
             <version>${bladex.project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-user-api</artifactId>
+            <version>2.9.1.RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <configuration>
+                    <username>${docker.username}</username>
+                    <password>${docker.password}</password>
+                    <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+                    <tag>${project.version}</tag>
+                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                    <buildArgs>
+                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${java.version}</source>
+                    <target>${java.version}</target>
+                    <encoding>${project.build.sourceEncoding}</encoding>
+                    <compilerArguments>
+                        <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar:${java.home}/lib/jsse.jar
+                        </bootclasspath>
+                    </compilerArguments>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 78 - 0
blade-service/blade-control/src/main/java/org/springblade/control/controller/CSysController.java

@@ -0,0 +1,78 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.*;
+import lombok.AllArgsConstructor;
+
+import org.springblade.control.service.IDictInfoService;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.manager.entity.ExctabCell;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springblade.system.user.vo.UserVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 参数信息表 控制器
+ *
+ * @author BladeX
+ * @since 2023-06-05
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/sysinfo")
+@Api(value = "系统信息", tags = "系统信息接口")
+public class CSysController extends BladeController {
+
+  // 用户fen
+  private final IUserClient userClient;
+
+  //参数信息表
+  private final IDictInfoService dictInfoService;
+
+  /**
+   * 新增或修改 参数信息表
+   */
+  @PostMapping("/saveUser")
+  @ApiOperationSupport(order = 1)
+  @ApiOperation(value = "新增或修改", notes = "传入dictInfo")
+  public R submit(@Valid @RequestBody User user) {
+    return userClient.saveUser(user);
+  }
+
+
+  /**
+   * 分页 用户查询
+   */
+  @GetMapping("/selectUserlist")
+  @ApiOperationSupport(order = 2)
+  @ApiOperation(value = "用户分页查询", notes = "传入user")
+  public R<IPage<UserVO>> selectUserlist(UserVO user, Query query) {
+    IPage<UserVO> pages = dictInfoService.selectUserTabPage(Condition.getPage(query), user);
+    return R.data(pages);
+  }
+
+
+}

+ 15 - 15
blade-service/blade-control/src/main/java/org/springblade/control/controller/DictInfoController.java

@@ -58,7 +58,7 @@ public class DictInfoController extends BladeController {
      * 新增或修改 参数信息表
      */
     @PostMapping("/submit")
-    @ApiOperationSupport(order = 6)
+    @ApiOperationSupport(order = 1)
     @ApiOperation(value = "新增或修改", notes = "传入dictInfo")
     public R submit(@Valid @RequestBody DictInfo dictInfo) {
         return R.status(dictInfoService.saveOrUpdate(dictInfo));
@@ -69,21 +69,21 @@ public class DictInfoController extends BladeController {
      * 删除 参数信息表
      */
     @PostMapping("/remove")
-    @ApiOperationSupport(order = 7)
+    @ApiOperationSupport(order = 2)
     @ApiOperation(value = "逻辑删除", notes = "传入ids")
     public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-        return R.status(dictInfoService.deleteLogic(Func.toLongList(ids)));
+        return R.status(dictInfoService.removeBatchByIds(Func.toLongList(ids)));
     }
 
 
     /**
      * 获取字典
      */
-    @GetMapping("/dictionary")
-    @ApiOperationSupport(order = 8)
-    @ApiOperation(value = "获取字典", notes = "获取字典")
-    public R<List<DictBiz>> dictionary(String code) {
-        List<DictBiz> tree = dictInfoService.getList(code, "notRoot");
+    @GetMapping("/get-dict-info")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "参数信息列表", notes = "参数信息列表")
+    public R<List<DictInfo>> getDictInfo(String code) {
+        List<DictInfo> tree = dictInfoService.getDictInfo(code, "notRoot");
         return R.data(tree);
     }
 
@@ -93,10 +93,10 @@ public class DictInfoController extends BladeController {
     @GetMapping("/parent-list")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"),
-            @ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string")
+            @ApiImplicitParam(name = "type", value = "类型", paramType = "query", dataType = "Integer")
     })
-    @ApiOperationSupport(order = 3)
-    @ApiOperation(value = "列表", notes = "传入dict")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "顶级列表", notes = "顶级列表")
     public R<IPage<DictInfoVO>> parentList(@ApiIgnore @RequestParam Map<String, Object> dict, Query query) {
         return R.data(dictInfoService.parentList(dict, query));
     }
@@ -107,11 +107,11 @@ public class DictInfoController extends BladeController {
     @GetMapping("/child-list")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"),
-            @ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string"),
-            @ApiImplicitParam(name = "parentId", value = "字典名称", paramType = "query", dataType = "string")
+            @ApiImplicitParam(name = "parentId", value = "字典名称", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "type", value = "类型", paramType = "query", dataType = "Integer")
     })
-    @ApiOperationSupport(order = 4)
-    @ApiOperation(value = "列表", notes = "传入dict")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "子列表", notes = "子列表")
     public R<List<DictInfoVO>> childList(@ApiIgnore @RequestParam Map<String, Object> dict, @RequestParam(required = false, defaultValue = "-1") Long parentId) {
         return R.data(dictInfoService.childList(dict, parentId));
     }

+ 4 - 2
blade-service/blade-control/src/main/java/org/springblade/control/mapper/DictInfoMapper.java

@@ -21,7 +21,7 @@ import org.springblade.control.entity.DictInfo;
 import org.springblade.control.vo.DictInfoVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.system.entity.DictBiz;
+import org.springblade.system.user.vo.UserVO;
 
 import java.util.List;
 
@@ -48,5 +48,7 @@ public interface DictInfoMapper extends BaseMapper<DictInfo> {
      * @param code 字典编号
      * @return
      */
-    List<DictBiz> getList(@Param("code") String code, @Param("notRoot") String notRoot);
+    List<DictInfo> getDictInfo(@Param("code") String code, @Param("notRoot") String notRoot);
+
+    List<UserVO> selectUserTabPage(IPage page, @Param("excelTab") UserVO userinfo);
 }

+ 11 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/DictInfoMapper.xml

@@ -21,4 +21,15 @@
         where is_deleted = 0
     </select>
 
+    <select id="getDictInfo" resultMap="dictInfoResultMap">
+        select *
+        from c_dict_info
+        where is_deleted = 0
+    </select>
+
+    <select id="selectUserTabPage" resultMap="dictInfoResultMap">
+        select *
+        from blade_user
+        where is_deleted = 0
+    </select>
 </mapper>

+ 14 - 5
blade-service/blade-control/src/main/java/org/springblade/control/service/IDictInfoService.java

@@ -16,13 +16,12 @@
  */
 package org.springblade.control.service;
 
+import com.baomidou.mybatisplus.extension.service.IService;
 import org.springblade.control.entity.DictInfo;
 import org.springblade.control.vo.DictInfoVO;
-import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.core.mp.support.Query;
-import org.springblade.system.entity.DictBiz;
-import org.springblade.system.vo.DictBizVO;
+import org.springblade.system.user.vo.UserVO;
 
 import java.util.List;
 import java.util.Map;
@@ -33,7 +32,7 @@ import java.util.Map;
  * @author BladeX
  * @since 2023-06-05
  */
-public interface IDictInfoService extends BaseService<DictInfo> {
+public interface IDictInfoService extends IService<DictInfo> {
 
     /**
      * 自定义分页
@@ -51,7 +50,7 @@ public interface IDictInfoService extends BaseService<DictInfo> {
      * @param code 字典编号
      * @return
      */
-    List<DictBiz> getList(String code, String notRoot);
+    List<DictInfo> getDictInfo(String code, String notRoot);
 
 
     /**
@@ -71,4 +70,14 @@ public interface IDictInfoService extends BaseService<DictInfo> {
      * @return
      */
     List<DictInfoVO> childList(Map<String, Object> dict, Long parentId);
+
+
+    /**
+     * 自定义分页
+     *
+     * @param page
+     * @param userVO
+     * @return
+     */
+    IPage<UserVO> selectUserTabPage(IPage<UserVO> page, UserVO userVO);
 }

+ 12 - 7
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/DictInfoServiceImpl.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.control.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springblade.common.constant.CommonConstant;
 import org.springblade.control.entity.DictInfo;
 import org.springblade.control.vo.DictInfoVO;
@@ -27,6 +28,7 @@ import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.system.cache.DictBizCache;
 import org.springblade.system.entity.DictBiz;
+import org.springblade.system.user.vo.UserVO;
 import org.springblade.system.vo.DictBizVO;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -42,7 +44,7 @@ import java.util.Map;
  * @since 2023-06-05
  */
 @Service
-public class DictInfoServiceImpl extends BaseServiceImpl<DictInfoMapper, DictInfo> implements IDictInfoService {
+public class DictInfoServiceImpl extends ServiceImpl<DictInfoMapper, DictInfo> implements IDictInfoService {
 
     @Override
     public IPage<DictInfoVO> selectDictInfoPage(IPage<DictInfoVO> page, DictInfoVO dictInfo) {
@@ -50,13 +52,13 @@ public class DictInfoServiceImpl extends BaseServiceImpl<DictInfoMapper, DictInf
     }
 
     @Override
-    public List<DictBiz> getList(String code, String notRoot) {
-        return baseMapper.getList(code, notRoot);
+    public List<DictInfo> getDictInfo(String code, String notRoot) {
+        return baseMapper.getDictInfo(code, notRoot);
     }
 
     @Override
     public IPage<DictInfoVO> parentList(Map<String, Object> dict, Query query) {
-        IPage<DictInfo> page = this.page(Condition.getPage(query), Condition.getQueryWrapper(dict, DictInfo.class).lambda().eq(DictInfo::getParentId, CommonConstant.TOP_PARENT_ID).orderByAsc(DictInfo::getSort));
+        IPage<DictInfo> page = this.page(Condition.getPage(query), Condition.getQueryWrapper(dict, DictInfo.class).lambda().eq(DictInfo::getParentId, CommonConstant.TOP_PARENT_ID).eq(DictInfo::getType, Integer.parseInt(dict.get("type") + "")).orderByAsc(DictInfo::getSort));
         return DictInfoWrapper.build().pageVO(page);
     }
 
@@ -65,9 +67,12 @@ public class DictInfoServiceImpl extends BaseServiceImpl<DictInfoMapper, DictInf
         if (parentId < 0) {
             return new ArrayList<>();
         }
-        dict.remove("parentId");
-        DictBiz parentDict = DictBizCache.getById(parentId);
-        List<DictInfo> list = this.list(Condition.getQueryWrapper(dict, DictInfo.class).lambda().ne(DictInfo::getId, parentId).eq(DictInfo::getCode, parentDict.getCode()).orderByAsc(DictInfo::getSort));
+        List<DictInfo> list = this.list(Condition.getQueryWrapper(dict, DictInfo.class).lambda().ne(DictInfo::getId, parentId).eq(DictInfo::getType, Integer.parseInt(dict.get("type") + "")).orderByAsc(DictInfo::getSort));
         return DictInfoWrapper.build().listNodeVO(list);
     }
+
+    @Override
+    public IPage<UserVO> selectUserTabPage(IPage<UserVO> page, UserVO userVO) {
+        return page.setRecords(baseMapper.selectUserTabPage(page, userVO));
+    }
 }

+ 5 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -1587,19 +1587,19 @@ public class ExcelTabController extends BladeController {
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         if (maps.size() >= 1) {
             Map<String, Object> stringObjectMap = maps.get(0);
-            Object pdfUrl = stringObjectMap.get("pdf_url");
+            String pdfUrl = stringObjectMap.get("pdf_url") + "";
             if (stringObjectMap.get("e_visa_pdf_url") != null) {
                 //优先使用电签的pdf
-                pdfUrl = stringObjectMap.get("e_visa_pdf_url");
+                pdfUrl = stringObjectMap.get("e_visa_pdf_url") + "";
             }
 
             if (stringObjectMap.get("pdf_trial_url") != null || stringObjectMap.get("pdf_trial_url_position") != null) {
                 //合并试验关联文件、试验工程部位信息的pdf
-                pdfUrl = this.mergePdfShow(pdfUrl, stringObjectMap);
+                pdfUrl = this.mergePdfShow(pdfUrl, stringObjectMap) + "";
             }
 
-            if (StringUtils.isEmpty(pdfUrl + "")) {
-                return R.fail(300, "无数据");
+            if (StringUtils.isEmpty(pdfUrl) || pdfUrl.equals("null")) {
+                return R.fail("获取PDF失败");
             } else {
                 return R.data(pdfUrl);
             }

+ 0 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -1599,7 +1599,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     @Override
     public void getBussPdfs(String nodeId, String classify, String contractId, String projectId) throws Exception {
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        //String file_path = "/Users/hongchuangyanfa/Desktop/";
         // 获取有权限的节点信息
         List<AppWbsTreeContractVO> wbsTreeContractList = wbsTreeContractService.searchNodeAllTable(nodeId, classify, contractId, projectId);
         List<String> data = new ArrayList<>();

+ 0 - 127
src/main/java/org/springblade/control/controller/DictInfoController.java

@@ -1,127 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.control.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.bind.annotation.RequestParam;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.control.entity.DictInfo;
-import org.springblade.control.vo.DictInfoVO;
-import org.springblade.control.service.IDictInfoService;
-import org.springblade.core.boot.ctrl.BladeController;
-
-/**
- * 参数信息表 控制器
- *
- * @author BladeX
- * @since 2023-06-05
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping("/dictinfo")
-@Api(value = "参数信息表", tags = "参数信息表接口")
-public class DictInfoController extends BladeController {
-
-	private final IDictInfoService dictInfoService;
-
-	/**
-	 * 详情
-	 */
-	@GetMapping("/detail")
-	@ApiOperationSupport(order = 1)
-	@ApiOperation(value = "详情", notes = "传入dictInfo")
-	public R<DictInfo> detail(DictInfo dictInfo) {
-		DictInfo detail = dictInfoService.getOne(Condition.getQueryWrapper(dictInfo));
-		return R.data(detail);
-	}
-
-	/**
-	 * 分页 参数信息表
-	 */
-	@GetMapping("/list")
-	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "分页", notes = "传入dictInfo")
-	public R<IPage<DictInfo>> list(DictInfo dictInfo, Query query) {
-		IPage<DictInfo> pages = dictInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(dictInfo));
-		return R.data(pages);
-	}
-
-	/**
-	 * 自定义分页 参数信息表
-	 */
-	@GetMapping("/page")
-	@ApiOperationSupport(order = 3)
-	@ApiOperation(value = "分页", notes = "传入dictInfo")
-	public R<IPage<DictInfoVO>> page(DictInfoVO dictInfo, Query query) {
-		IPage<DictInfoVO> pages = dictInfoService.selectDictInfoPage(Condition.getPage(query), dictInfo);
-		return R.data(pages);
-	}
-
-	/**
-	 * 新增 参数信息表
-	 */
-	@PostMapping("/save")
-	@ApiOperationSupport(order = 4)
-	@ApiOperation(value = "新增", notes = "传入dictInfo")
-	public R save(@Valid @RequestBody DictInfo dictInfo) {
-		return R.status(dictInfoService.save(dictInfo));
-	}
-
-	/**
-	 * 修改 参数信息表
-	 */
-	@PostMapping("/update")
-	@ApiOperationSupport(order = 5)
-	@ApiOperation(value = "修改", notes = "传入dictInfo")
-	public R update(@Valid @RequestBody DictInfo dictInfo) {
-		return R.status(dictInfoService.updateById(dictInfo));
-	}
-
-	/**
-	 * 新增或修改 参数信息表
-	 */
-	@PostMapping("/submit")
-	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "新增或修改", notes = "传入dictInfo")
-	public R submit(@Valid @RequestBody DictInfo dictInfo) {
-		return R.status(dictInfoService.saveOrUpdate(dictInfo));
-	}
-
-	
-	/**
-	 * 删除 参数信息表
-	 */
-	@PostMapping("/remove")
-	@ApiOperationSupport(order = 7)
-	@ApiOperation(value = "逻辑删除", notes = "传入ids")
-	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		return R.status(dictInfoService.deleteLogic(Func.toLongList(ids)));
-	}
-
-	
-}

+ 0 - 34
src/main/java/org/springblade/control/dto/DictInfoDTO.java

@@ -1,34 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.control.dto;
-
-import org.springblade.control.entity.DictInfo;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 参数信息表数据传输对象实体类
- *
- * @author BladeX
- * @since 2023-06-05
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DictInfoDTO extends DictInfo {
-	private static final long serialVersionUID = 1L;
-
-}

+ 0 - 64
src/main/java/org/springblade/control/entity/DictInfo.java

@@ -1,64 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.control.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-import org.springblade.core.mp.base.BaseEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 参数信息表实体类
- *
- * @author BladeX
- * @since 2023-06-05
- */
-@Data
-@TableName("c_dict_info")
-@EqualsAndHashCode(callSuper = true)
-public class DictInfo extends BaseEntity {
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-	* 父主键
-	*/
-		private Long parentId;
-	/**
-	* 字典名称
-	*/
-		private String dictName;
-	/**
-	* 字典值
-	*/
-		private String dictValue;
-	/**
-	* 排序
-	*/
-		private Integer sort;
-	/**
-	* 参数类型
-	*/
-		private Integer type;
-	/**
-	* 自定义码
-	*/
-		private String code;
-
-
-}

+ 0 - 42
src/main/java/org/springblade/control/mapper/DictInfoMapper.java

@@ -1,42 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.control.mapper;
-
-import org.springblade.control.entity.DictInfo;
-import org.springblade.control.vo.DictInfoVO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import java.util.List;
-
-/**
- * 参数信息表 Mapper 接口
- *
- * @author BladeX
- * @since 2023-06-05
- */
-public interface DictInfoMapper extends BaseMapper<DictInfo> {
-
-	/**
-	 * 自定义分页
-	 *
-	 * @param page
-	 * @param dictInfo
-	 * @return
-	 */
-	List<DictInfoVO> selectDictInfoPage(IPage page, DictInfoVO dictInfo);
-
-}

+ 0 - 32
src/main/java/org/springblade/control/mapper/DictInfoMapper.xml

@@ -1,32 +0,0 @@
-<?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="org.springblade.control.mapper.DictInfoMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="dictInfoResultMap" type="org.springblade.control.entity.DictInfo">
-        <result column="id" property="id"/>
-        <result column="is_deleted" property="isDeleted"/>
-        <result column="parent_id" property="parentId"/>
-        <result column="dict_name" property="dictName"/>
-        <result column="dict_value" property="dictValue"/>
-        <result column="sort" property="sort"/>
-        <result column="type" property="type"/>
-        <result column="code" property="code"/>
-    </resultMap>
-
-
-    <select id="selectDictInfoPage" resultMap="dictInfoResultMap">
-        select *
-        from c_dict_info
-        where is_deleted = 0
-    </select>
-
-    <select id="getList" resultMap="dictInfoResultMap">
-        select * from c_dict_info where code = #{code}
-        <if test="notRoot != null and notRoot != ''">
-            and parent_id > 0
-        </if>
-        and is_deleted = 0
-        order by sort
-    </select>
-</mapper>

+ 0 - 41
src/main/java/org/springblade/control/service/IDictInfoService.java

@@ -1,41 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.control.service;
-
-import org.springblade.control.entity.DictInfo;
-import org.springblade.control.vo.DictInfoVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 参数信息表 服务类
- *
- * @author BladeX
- * @since 2023-06-05
- */
-public interface IDictInfoService extends BaseService<DictInfo> {
-
-	/**
-	 * 自定义分页
-	 *
-	 * @param page
-	 * @param dictInfo
-	 * @return
-	 */
-	IPage<DictInfoVO> selectDictInfoPage(IPage<DictInfoVO> page, DictInfoVO dictInfo);
-
-}

+ 0 - 41
src/main/java/org/springblade/control/service/impl/DictInfoServiceImpl.java

@@ -1,41 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.control.service.impl;
-
-import org.springblade.control.entity.DictInfo;
-import org.springblade.control.vo.DictInfoVO;
-import org.springblade.control.mapper.DictInfoMapper;
-import org.springblade.control.service.IDictInfoService;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-/**
- * 参数信息表 服务实现类
- *
- * @author BladeX
- * @since 2023-06-05
- */
-@Service
-public class DictInfoServiceImpl extends BaseServiceImpl<DictInfoMapper, DictInfo> implements IDictInfoService {
-
-	@Override
-	public IPage<DictInfoVO> selectDictInfoPage(IPage<DictInfoVO> page, DictInfoVO dictInfo) {
-		return page.setRecords(baseMapper.selectDictInfoPage(page, dictInfo));
-	}
-
-}

+ 0 - 34
src/main/java/org/springblade/control/vo/DictInfoVO.java

@@ -1,34 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.control.vo;
-
-import org.springblade.control.entity.DictInfo;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 参数信息表视图实体类
- *
- * @author BladeX
- * @since 2023-06-05
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DictInfoVO extends DictInfo {
-	private static final long serialVersionUID = 1L;
-
-}

+ 0 - 20
src/main/java/sql/dictinfo.menu.sql

@@ -1,20 +0,0 @@
-INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`,
-                         `is_open`, `remark`, `is_deleted`)
-VALUES ('1665658060720152578', 1123598815738675201, 'dictinfo', '参数信息表', 'menu', '/control/dictinfo', NULL, 1, 1, 0, 1,
-        NULL, 0);
-INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`,
-                         `is_open`, `remark`, `is_deleted`)
-VALUES ('1665658060720152579', '1665658060720152578', 'dictinfo_add', '新增', 'add', '/control/dictinfo/add', 'plus', 1,
-        2, 1, 1, NULL, 0);
-INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`,
-                         `is_open`, `remark`, `is_deleted`)
-VALUES ('1665658060720152580', '1665658060720152578', 'dictinfo_edit', '修改', 'edit', '/control/dictinfo/edit', 'form',
-        2, 2, 2, 1, NULL, 0);
-INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`,
-                         `is_open`, `remark`, `is_deleted`)
-VALUES ('1665658060720152581', '1665658060720152578', 'dictinfo_delete', '删除', 'delete',
-        '/api/blade-control/dictinfo/remove', 'delete', 3, 2, 3, 1, NULL, 0);
-INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`,
-                         `is_open`, `remark`, `is_deleted`)
-VALUES ('1665658060720152582', '1665658060720152578', 'dictinfo_view', '查看', 'view', '/control/dictinfo/view',
-        'file-text', 4, 2, 2, 1, NULL, 0);