Ver código fonte

Merge remote-tracking branch 'origin/master'

huangjn 3 anos atrás
pai
commit
c072b50462
14 arquivos alterados com 503 adições e 1 exclusões
  1. 34 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/ExcelTabDTO.java
  2. 72 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ExcelTab.java
  3. 34 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ExcelTabVO.java
  4. 12 0
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Menu.java
  5. 129 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java
  6. 42 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ExcelTabMapper.java
  7. 30 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ExcelTabMapper.xml
  8. 41 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IExcelTabService.java
  9. 41 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  10. 49 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/wrapper/ExcelTabWrapper.java
  11. 12 0
      blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java
  12. 3 0
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.xml
  13. 1 0
      blade-service/blade-system/src/main/java/org/springblade/system/service/IAuthClientService.java
  14. 3 1
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java

+ 34 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/ExcelTabDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      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.manager.dto;
+
+import org.springblade.manager.entity.ExcelTab;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 清表基础数据表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-05-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ExcelTabDTO extends ExcelTab {
+	private static final long serialVersionUID = 1L;
+
+}

+ 72 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ExcelTab.java

@@ -0,0 +1,72 @@
+/*
+ *      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.manager.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 2022-05-18
+ */
+@Data
+@TableName("m_excel_tab")
+@EqualsAndHashCode(callSuper = true)
+public class ExcelTab extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 父级菜单
+	*/
+		private Long parentId;
+	/**
+	* 文件类型
+	*/
+		private Integer fileType;
+	/**
+	* 名称
+	*/
+		private String name;
+	/**
+	* 祖级
+	*/
+		private String alias;
+	/**
+	* 文件地址
+	*/
+		private String fileUrl;
+	/**
+	* 表数量
+	*/
+		private Integer tabCout;
+	/**
+	* 附件拓展名
+	*/
+		private String extension;
+	/**
+	* 附件大小
+	*/
+		private Long attachSize;
+
+
+}

+ 34 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ExcelTabVO.java

@@ -0,0 +1,34 @@
+/*
+ *      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.manager.vo;
+
+import org.springblade.manager.entity.ExcelTab;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 清表基础数据表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-05-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ExcelTabVO extends ExcelTab {
+	private static final long serialVersionUID = 1L;
+
+}

+ 12 - 0
blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Menu.java

@@ -124,6 +124,18 @@ public class Menu implements Serializable {
 	@ApiModelProperty(value = "是否已删除")
 	private Integer isDeleted;
 
+	/**
+	 * 系统id
+	 */
+	@ApiModelProperty(value = "系统id")
+	private Long sysId;
+
+	/**
+	 * 提示语
+	 */
+	@ApiModelProperty(value = "提示语")
+	private String textInfo;
+
 
 	@Override
 	public boolean equals(Object obj) {

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

@@ -0,0 +1,129 @@
+/*
+ *      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.manager.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.manager.entity.ExcelTab;
+import org.springblade.manager.vo.ExcelTabVO;
+import org.springblade.manager.wrapper.ExcelTabWrapper;
+import org.springblade.manager.service.IExcelTabService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 清表基础数据表 控制器
+ *
+ * @author BladeX
+ * @since 2022-05-18
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/exceltab")
+@Api(value = "清表基础数据表", tags = "清表基础数据表接口")
+public class ExcelTabController extends BladeController {
+
+	private final IExcelTabService excelTabService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入excelTab")
+	public R<ExcelTabVO> detail(ExcelTab excelTab) {
+		ExcelTab detail = excelTabService.getOne(Condition.getQueryWrapper(excelTab));
+		return R.data(ExcelTabWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 清表基础数据表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入excelTab")
+	public R<IPage<ExcelTabVO>> list(ExcelTab excelTab, Query query) {
+		IPage<ExcelTab> pages = excelTabService.page(Condition.getPage(query), Condition.getQueryWrapper(excelTab));
+		return R.data(ExcelTabWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 清表基础数据表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入excelTab")
+	public R<IPage<ExcelTabVO>> page(ExcelTabVO excelTab, Query query) {
+		IPage<ExcelTabVO> pages = excelTabService.selectExcelTabPage(Condition.getPage(query), excelTab);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 清表基础数据表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入excelTab")
+	public R save(@Valid @RequestBody ExcelTab excelTab) {
+		return R.status(excelTabService.save(excelTab));
+	}
+
+	/**
+	 * 修改 清表基础数据表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入excelTab")
+	public R update(@Valid @RequestBody ExcelTab excelTab) {
+		return R.status(excelTabService.updateById(excelTab));
+	}
+
+	/**
+	 * 新增或修改 清表基础数据表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入excelTab")
+	public R submit(@Valid @RequestBody ExcelTab excelTab) {
+		return R.status(excelTabService.saveOrUpdate(excelTab));
+	}
+
+	
+	/**
+	 * 删除 清表基础数据表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(excelTabService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 42 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ExcelTabMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      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.manager.mapper;
+
+import org.springblade.manager.entity.ExcelTab;
+import org.springblade.manager.vo.ExcelTabVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 清表基础数据表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-05-18
+ */
+public interface ExcelTabMapper extends BaseMapper<ExcelTab> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param excelTab
+	 * @return
+	 */
+	List<ExcelTabVO> selectExcelTabPage(IPage page, ExcelTabVO excelTab);
+
+}

+ 30 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ExcelTabMapper.xml

@@ -0,0 +1,30 @@
+<?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.manager.mapper.ExcelTabMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="excelTabResultMap" type="org.springblade.manager.entity.ExcelTab">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="file_type" property="fileType"/>
+        <result column="name" property="name"/>
+        <result column="alias" property="alias"/>
+        <result column="file_url" property="fileUrl"/>
+        <result column="tab_cout" property="tabCout"/>
+        <result column="extension" property="extension"/>
+        <result column="attach_size" property="attachSize"/>
+    </resultMap>
+
+
+    <select id="selectExcelTabPage" resultMap="excelTabResultMap">
+        select * from m_excel_tab where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IExcelTabService.java

@@ -0,0 +1,41 @@
+/*
+ *      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.manager.service;
+
+import org.springblade.manager.entity.ExcelTab;
+import org.springblade.manager.vo.ExcelTabVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 清表基础数据表 服务类
+ *
+ * @author BladeX
+ * @since 2022-05-18
+ */
+public interface IExcelTabService extends BaseService<ExcelTab> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param excelTab
+	 * @return
+	 */
+	IPage<ExcelTabVO> selectExcelTabPage(IPage<ExcelTabVO> page, ExcelTabVO excelTab);
+
+}

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

@@ -0,0 +1,41 @@
+/*
+ *      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.manager.service.impl;
+
+import org.springblade.manager.entity.ExcelTab;
+import org.springblade.manager.vo.ExcelTabVO;
+import org.springblade.manager.mapper.ExcelTabMapper;
+import org.springblade.manager.service.IExcelTabService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 清表基础数据表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-05-18
+ */
+@Service
+public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTab> implements IExcelTabService {
+
+	@Override
+	public IPage<ExcelTabVO> selectExcelTabPage(IPage<ExcelTabVO> page, ExcelTabVO excelTab) {
+		return page.setRecords(baseMapper.selectExcelTabPage(page, excelTab));
+	}
+
+}

+ 49 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/wrapper/ExcelTabWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      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.manager.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.manager.entity.ExcelTab;
+import org.springblade.manager.vo.ExcelTabVO;
+import java.util.Objects;
+
+/**
+ * 清表基础数据表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2022-05-18
+ */
+public class ExcelTabWrapper extends BaseEntityWrapper<ExcelTab, ExcelTabVO>  {
+
+	public static ExcelTabWrapper build() {
+		return new ExcelTabWrapper();
+ 	}
+
+	@Override
+	public ExcelTabVO entityVO(ExcelTab excelTab) {
+		ExcelTabVO excelTabVO = Objects.requireNonNull(BeanUtil.copy(excelTab, ExcelTabVO.class));
+
+		//User createUser = UserCache.getUser(excelTab.getCreateUser());
+		//User updateUser = UserCache.getUser(excelTab.getUpdateUser());
+		//excelTabVO.setCreateUserName(createUser.getName());
+		//excelTabVO.setUpdateUserName(updateUser.getName());
+
+		return excelTabVO;
+	}
+
+}

+ 12 - 0
blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java

@@ -31,11 +31,13 @@ import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.constant.RoleConstant;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.system.entity.AuthClient;
+import org.springblade.system.entity.Dict;
 import org.springblade.system.service.IAuthClientService;
 import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  *  应用管理控制器
@@ -116,5 +118,15 @@ public class AuthClientController extends BladeController {
 		return R.status(clientService.deleteLogic(Func.toLongList(ids)));
 	}
 
+	/**
+	 * 获取全部系统
+	 */
+	@GetMapping("/getClinetAll")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "获取全部系统", notes = "获取全部系统")
+	public R<List<AuthClient>> getClinetAll() {
+		List<AuthClient> clientInfo = clientService.list();
+		return R.data(clientInfo);
+	}
 
 }

+ 3 - 0
blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.xml

@@ -70,6 +70,9 @@
         <if test="param2.alias!=null and param2.alias!=''">
             and menu.alias like concat(concat('%', #{param2.alias}),'%')
         </if>
+        <if test="param2.sysId!=null and param2.sysId!=''">
+            and menu.sys_id = #{param2.sysId}
+        </if>
         ORDER BY menu.sort
     </select>
 

+ 1 - 0
blade-service/blade-system/src/main/java/org/springblade/system/service/IAuthClientService.java

@@ -26,4 +26,5 @@ import org.springblade.system.entity.AuthClient;
  */
 public interface IAuthClientService extends BaseService<AuthClient> {
 
+
 }

+ 3 - 1
blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java

@@ -69,7 +69,9 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
 		if (Func.isEmpty(Func.toStr(param.get(PARENT_ID)))) {
 			parentId = null;
 		}
-		return baseMapper.lazyList(parentId, param);
+		List<MenuVO> lazyList = baseMapper.lazyList(parentId, param);
+		return lazyList;
+
 	}
 
 	@Override