班级表增删改查 全局格式化代码
parent
8f4cc5e9f3
commit
2cb1520b9e
18
README.md
18
README.md
|
@ -18,11 +18,17 @@
|
|||
* 权限认证使用Jwt,支持多终端认证系统。
|
||||
* 支持加载动态权限菜单,多方式轻松权限控制。
|
||||
* 高效率开发,使用代码生成器可以一键生成前后端代码。
|
||||
* 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[RuoYi-Vue3](https://github.com/yangzongzhuan/RuoYi-Vue3),保持同步更新。
|
||||
* 提供了单应用版本[RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast),Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。
|
||||
* 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
|
||||
*
|
||||
提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev)
|
||||
)版本[RuoYi-Vue3](https://github.com/yangzongzhuan/RuoYi-Vue3),保持同步更新。
|
||||
* 提供了单应用版本[RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast)
|
||||
,Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。
|
||||
* 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi)
|
||||
,微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
|
||||
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
|
||||
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
||||
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link)
|
||||
,腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
||||
|
||||
|
||||
## 内置功能
|
||||
|
||||
|
@ -90,7 +96,7 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
## 若依前后端分离交流群
|
||||
|
||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) [](https://jq.qq.com/?_wv=1027&k=SpyH2875) [](https://jq.qq.com/?_wv=1027&k=tKEt51dz) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=0vBbSb0ztbBgVtn3kJS-Q4HUNYwip89G&authKey=8irq5PhutrZmWIvsUsklBxhj57l%2F1nOZqjzigkXZVoZE451GG4JHPOqW7AW6cf0T&noverify=0&group_code=143961921) 点击按钮入群。
|
||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) [](https://jq.qq.com/?_wv=1027&k=SpyH2875) [](https://jq.qq.com/?_wv=1027&k=tKEt51dz) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=0vBbSb0ztbBgVtn3kJS-Q4HUNYwip89G&authKey=8irq5PhutrZmWIvsUsklBxhj57l%2F1nOZqjzigkXZVoZE451GG4JHPOqW7AW6cf0T&noverify=0&group_code=143961921)
|
||||
点击按钮入群。
|
||||
|
|
7
pom.xml
7
pom.xml
|
@ -177,13 +177,18 @@
|
|||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 自定义项目-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-custom</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<modules>
|
||||
<module>ruoyi-application</module>
|
||||
<module>ruoyi-basic</module>
|
||||
<module>ruoyi-custom</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|||
* @author ruoyi
|
||||
*/
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||
@MapperScan("com.ruoyi.*.mapper")
|
||||
public class RuoYiApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
package com.ruoyi.web.controller.custom;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.Result;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.custom.domain.SysClass;
|
||||
import com.ruoyi.custom.domain.req.SysClassEditReq;
|
||||
import com.ruoyi.custom.domain.req.SysClassQueryReq;
|
||||
import com.ruoyi.custom.domain.req.SysClassSaveReq;
|
||||
import com.ruoyi.custom.service.SysClassService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班级管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Api(tags = "班级管理")
|
||||
@RestController
|
||||
@RequestMapping("/custom/class")
|
||||
public class SysClassController extends BaseController {
|
||||
@Autowired
|
||||
private SysClassService sysClassService;
|
||||
|
||||
/**
|
||||
* 查询班级管理列表
|
||||
*/
|
||||
@ApiOperation("获取班级管理列表")
|
||||
@PreAuthorize("@ss.hasPermi('custom:class:list')")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<SysClass>> list(SysClassQueryReq sysClassQueryReq) {
|
||||
startPage();
|
||||
List<SysClass> list = sysClassService.list(SysClass.queryBuild(sysClassQueryReq));
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出班级管理列表
|
||||
*/
|
||||
@ApiOperation("导出班级管理列表")
|
||||
@PreAuthorize("@ss.hasPermi('custom:class:export')")
|
||||
@Log(title = "班级管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysClass sysClass) {
|
||||
List<SysClass> list = sysClassService.list(sysClass);
|
||||
ExcelUtil<SysClass> util = new ExcelUtil<SysClass>(SysClass.class);
|
||||
util.exportExcel(response, list, "班级管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级管理详细信息
|
||||
*/
|
||||
@ApiOperation("获取班级管理详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('custom:class:query')")
|
||||
@GetMapping(value = "/{classId}")
|
||||
@ApiImplicitParam(name = "classId", value = "classId", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<SysClass> getInfo(@PathVariable("classId") Long classId) {
|
||||
return Result.success(sysClassService.getById(classId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班级管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('custom:class:add')")
|
||||
@Log(title = "班级管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增班级管理")
|
||||
public Result<String> add(@RequestBody SysClassSaveReq sysClassSaveReq) {
|
||||
return toAjax(sysClassService.save(SysClass.saveBuild(sysClassSaveReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班级管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('custom:class:edit')")
|
||||
@Log(title = "班级管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{classId}")
|
||||
@ApiOperation("修改班级管理")
|
||||
public Result<String> edit(@PathVariable Long classId, @RequestBody SysClassEditReq sysClassEditReq) {
|
||||
return toAjax(sysClassService.updateById(SysClass.editBuild(classId, sysClassEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班级管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('custom:class:remove')")
|
||||
@Log(title = "班级管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{classIds}")
|
||||
@ApiOperation("删除班级管理")
|
||||
@ApiImplicitParam(name = "classId", value = "classId", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> classIds) {
|
||||
return toAjax(sysClassService.removeBatchByIds(classIds));
|
||||
}
|
||||
}
|
|
@ -39,7 +39,6 @@ public class SysLoginController {
|
|||
* 登录方法
|
||||
*
|
||||
* @param loginBody 登录信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<module>ruoyi-framework</module>
|
||||
<module>ruoyi-system</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>ruoyi-custom</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -199,6 +199,7 @@ public @interface Excel {
|
|||
|
||||
/**
|
||||
* 类类型枚举构造器
|
||||
*
|
||||
* @param value 枚举类型值
|
||||
*/
|
||||
ColumnType(int value) {
|
||||
|
@ -207,6 +208,7 @@ public @interface Excel {
|
|||
|
||||
/**
|
||||
* 获取列枚举类型
|
||||
*
|
||||
* @return 枚举值
|
||||
*/
|
||||
public int value() {
|
||||
|
|
|
@ -12,7 +12,6 @@ import com.ruoyi.common.utils.PageUtils;
|
|||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.sql.SqlUtil;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
|
@ -115,7 +114,6 @@ public class BaseController {
|
|||
* 响应返回结果
|
||||
*
|
||||
* @param rows 影响行数
|
||||
*
|
||||
* @return 操作结果
|
||||
*/
|
||||
protected Result<String> toAjax(int rows) {
|
||||
|
@ -126,7 +124,6 @@ public class BaseController {
|
|||
* 响应返回结果
|
||||
*
|
||||
* @param result 结果
|
||||
*
|
||||
* @return 操作结果
|
||||
*/
|
||||
protected Result<String> toAjax(boolean result) {
|
||||
|
|
|
@ -88,6 +88,7 @@ public class BaseEntity implements Serializable {
|
|||
|
||||
/**
|
||||
* 开始时间
|
||||
*
|
||||
* @param key 属性名称
|
||||
* @return 结果数据
|
||||
*/
|
||||
|
@ -99,6 +100,7 @@ public class BaseEntity implements Serializable {
|
|||
|
||||
/**
|
||||
* 开始时间
|
||||
*
|
||||
* @param key 属性名称
|
||||
* @return 结果数据
|
||||
*/
|
||||
|
@ -110,6 +112,7 @@ public class BaseEntity implements Serializable {
|
|||
|
||||
/**
|
||||
* 获取区间数据
|
||||
*
|
||||
* @param key 属性名称
|
||||
* @return 结果数据
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.ruoyi.common.core.domain.entity;
|
|||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
@ -145,6 +144,7 @@ public class SysRole extends BaseEntity {
|
|||
public boolean isDeptCheckStrictly() {
|
||||
return deptCheckStrictly;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
@ -9,7 +9,6 @@ import com.ruoyi.common.xss.Xss;
|
|||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
@ -180,6 +179,7 @@ public class SysUser extends BaseEntity {
|
|||
public String getPhonenumber() {
|
||||
return phonenumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
@ -7,7 +7,10 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|||
import org.springframework.data.redis.core.ValueOperations;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +51,6 @@ public class RedisCache {
|
|||
*
|
||||
* @param key Redis键
|
||||
* @param timeout 超时时间
|
||||
*
|
||||
* @return true=设置成功;false=设置失败
|
||||
*/
|
||||
public boolean expire(final String key, final long timeout) {
|
||||
|
@ -61,7 +63,6 @@ public class RedisCache {
|
|||
* @param key Redis键
|
||||
* @param timeout 超时时间
|
||||
* @param unit 时间单位
|
||||
*
|
||||
* @return true=设置成功;false=设置失败
|
||||
*/
|
||||
public boolean expire(final String key, final long timeout, final TimeUnit unit) {
|
||||
|
@ -72,7 +73,6 @@ public class RedisCache {
|
|||
* 获取有效时间
|
||||
*
|
||||
* @param key Redis键
|
||||
*
|
||||
* @return 有效时间
|
||||
*/
|
||||
public long getExpire(final String key) {
|
||||
|
@ -83,7 +83,6 @@ public class RedisCache {
|
|||
* 判断 key是否存在
|
||||
*
|
||||
* @param key 键
|
||||
*
|
||||
* @return true 存在 false不存在
|
||||
*/
|
||||
public Boolean hasKey(String key) {
|
||||
|
@ -94,7 +93,6 @@ public class RedisCache {
|
|||
* 获得缓存的基本对象。
|
||||
*
|
||||
* @param key 缓存键值
|
||||
*
|
||||
* @return 缓存键值对应的数据
|
||||
*/
|
||||
public <T> T getCacheObject(final String key) {
|
||||
|
@ -115,7 +113,6 @@ public class RedisCache {
|
|||
* 删除集合对象
|
||||
*
|
||||
* @param collection 多个对象
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean deleteObject(final Collection collection) {
|
||||
|
@ -127,7 +124,6 @@ public class RedisCache {
|
|||
*
|
||||
* @param key 缓存的键值
|
||||
* @param dataList 待缓存的List数据
|
||||
*
|
||||
* @return 缓存的对象
|
||||
*/
|
||||
public <T> long setCacheList(final String key, final List<T> dataList) {
|
||||
|
@ -139,7 +135,6 @@ public class RedisCache {
|
|||
* 获得缓存的list对象
|
||||
*
|
||||
* @param key 缓存的键值
|
||||
*
|
||||
* @return 缓存键值对应的数据
|
||||
*/
|
||||
public <T> List<T> getCacheList(final String key) {
|
||||
|
@ -151,7 +146,6 @@ public class RedisCache {
|
|||
*
|
||||
* @param key 缓存键值
|
||||
* @param dataSet 缓存的数据
|
||||
*
|
||||
* @return 缓存数据的对象
|
||||
*/
|
||||
public <T> BoundSetOperations<String, T> setCacheSet(final String key, final Set<T> dataSet) {
|
||||
|
@ -166,7 +160,6 @@ public class RedisCache {
|
|||
* 获得缓存的set
|
||||
*
|
||||
* @param key
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public <T> Set<T> getCacheSet(final String key) {
|
||||
|
@ -189,7 +182,6 @@ public class RedisCache {
|
|||
* 获得缓存的Map
|
||||
*
|
||||
* @param key
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public <T> Map<String, T> getCacheMap(final String key) {
|
||||
|
@ -212,7 +204,6 @@ public class RedisCache {
|
|||
*
|
||||
* @param key Redis键
|
||||
* @param hKey Hash键
|
||||
*
|
||||
* @return Hash中的对象
|
||||
*/
|
||||
public <T> T getCacheMapValue(final String key, final String hKey) {
|
||||
|
@ -225,7 +216,6 @@ public class RedisCache {
|
|||
*
|
||||
* @param key Redis键
|
||||
* @param hKeys Hash键集合
|
||||
*
|
||||
* @return Hash对象集合
|
||||
*/
|
||||
public <T> List<T> getMultiCacheMapValue(final String key, final Collection<Object> hKeys) {
|
||||
|
@ -237,7 +227,6 @@ public class RedisCache {
|
|||
*
|
||||
* @param key Redis键
|
||||
* @param hKey Hash键
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
public boolean deleteCacheMapValue(final String key, final String hKey) {
|
||||
|
@ -248,7 +237,6 @@ public class RedisCache {
|
|||
* 获得缓存的基本对象列表
|
||||
*
|
||||
* @param pattern 字符串前缀
|
||||
*
|
||||
* @return 对象列表
|
||||
*/
|
||||
public Collection<String> keys(final String pattern) {
|
||||
|
|
|
@ -41,7 +41,6 @@ public class CharsetKit {
|
|||
* 转换为Charset对象
|
||||
*
|
||||
* @param charset 字符集,为空则返回默认字符集
|
||||
*
|
||||
* @return Charset
|
||||
*/
|
||||
public static Charset charset(String charset) {
|
||||
|
@ -54,7 +53,6 @@ public class CharsetKit {
|
|||
* @param source 字符串
|
||||
* @param srcCharset 源字符集,默认ISO-8859-1
|
||||
* @param destCharset 目标字符集,默认UTF-8
|
||||
*
|
||||
* @return 转换后的字符集
|
||||
*/
|
||||
public static String convert(String source, String srcCharset, String destCharset) {
|
||||
|
@ -67,7 +65,6 @@ public class CharsetKit {
|
|||
* @param source 字符串
|
||||
* @param srcCharset 源字符集,默认ISO-8859-1
|
||||
* @param destCharset 目标字符集,默认UTF-8
|
||||
*
|
||||
* @return 转换后的字符集
|
||||
*/
|
||||
public static String convert(String source, Charset srcCharset, Charset destCharset) {
|
||||
|
|
|
@ -23,7 +23,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static String toStr(Object value, String defaultValue) {
|
||||
|
@ -42,7 +41,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static String toStr(Object value) {
|
||||
|
@ -56,7 +54,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Character toChar(Object value, Character defaultValue) {
|
||||
|
@ -77,7 +74,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Character toChar(Object value) {
|
||||
|
@ -91,7 +87,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Byte toByte(Object value, Byte defaultValue) {
|
||||
|
@ -121,7 +116,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Byte toByte(Object value) {
|
||||
|
@ -135,7 +129,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Short toShort(Object value, Short defaultValue) {
|
||||
|
@ -165,7 +158,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Short toShort(Object value) {
|
||||
|
@ -179,7 +171,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Number toNumber(Object value, Number defaultValue) {
|
||||
|
@ -206,7 +197,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Number toNumber(Object value) {
|
||||
|
@ -220,7 +210,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Integer toInt(Object value, Integer defaultValue) {
|
||||
|
@ -250,7 +239,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Integer toInt(Object value) {
|
||||
|
@ -261,7 +249,6 @@ public class Convert {
|
|||
* 转换为Integer数组<br>
|
||||
*
|
||||
* @param str 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Integer[] toIntArray(String str) {
|
||||
|
@ -272,7 +259,6 @@ public class Convert {
|
|||
* 转换为Long数组<br>
|
||||
*
|
||||
* @param str 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Long[] toLongArray(String str) {
|
||||
|
@ -284,7 +270,6 @@ public class Convert {
|
|||
*
|
||||
* @param split 分隔符
|
||||
* @param split 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Integer[] toIntArray(String split, String str) {
|
||||
|
@ -305,7 +290,6 @@ public class Convert {
|
|||
*
|
||||
* @param split 分隔符
|
||||
* @param str 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Long[] toLongArray(String split, String str) {
|
||||
|
@ -325,7 +309,6 @@ public class Convert {
|
|||
* 转换为String数组<br>
|
||||
*
|
||||
* @param str 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static String[] toStrArray(String str) {
|
||||
|
@ -337,7 +320,6 @@ public class Convert {
|
|||
*
|
||||
* @param split 分隔符
|
||||
* @param split 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static String[] toStrArray(String split, String str) {
|
||||
|
@ -351,7 +333,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Long toLong(Object value, Long defaultValue) {
|
||||
|
@ -382,7 +363,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Long toLong(Object value) {
|
||||
|
@ -396,7 +376,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Double toDouble(Object value, Double defaultValue) {
|
||||
|
@ -427,7 +406,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Double toDouble(Object value) {
|
||||
|
@ -441,7 +419,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Float toFloat(Object value, Float defaultValue) {
|
||||
|
@ -471,7 +448,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Float toFloat(Object value) {
|
||||
|
@ -485,7 +461,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Boolean toBool(Object value, Boolean defaultValue) {
|
||||
|
@ -521,7 +496,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static Boolean toBool(Object value) {
|
||||
|
@ -535,7 +509,6 @@ public class Convert {
|
|||
* @param clazz Enum的Class
|
||||
* @param value 值
|
||||
* @param defaultValue 默认值
|
||||
*
|
||||
* @return Enum
|
||||
*/
|
||||
public static <E extends Enum<E>> E toEnum(Class<E> clazz, Object value, E defaultValue) {
|
||||
|
@ -564,7 +537,6 @@ public class Convert {
|
|||
*
|
||||
* @param clazz Enum的Class
|
||||
* @param value 值
|
||||
*
|
||||
* @return Enum
|
||||
*/
|
||||
public static <E extends Enum<E>> E toEnum(Class<E> clazz, Object value) {
|
||||
|
@ -578,7 +550,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static BigInteger toBigInteger(Object value, BigInteger defaultValue) {
|
||||
|
@ -608,7 +579,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static BigInteger toBigInteger(Object value) {
|
||||
|
@ -622,7 +592,6 @@ public class Convert {
|
|||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static BigDecimal toBigDecimal(Object value, BigDecimal defaultValue) {
|
||||
|
@ -658,7 +627,6 @@ public class Convert {
|
|||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static BigDecimal toBigDecimal(Object value) {
|
||||
|
@ -670,7 +638,6 @@ public class Convert {
|
|||
* 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
|
||||
*
|
||||
* @param obj 对象
|
||||
*
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String utf8Str(Object obj) {
|
||||
|
@ -683,7 +650,6 @@ public class Convert {
|
|||
*
|
||||
* @param obj 对象
|
||||
* @param charsetName 字符集
|
||||
*
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String str(Object obj, String charsetName) {
|
||||
|
@ -696,7 +662,6 @@ public class Convert {
|
|||
*
|
||||
* @param obj 对象
|
||||
* @param charset 字符集
|
||||
*
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String str(Object obj, Charset charset) {
|
||||
|
@ -722,7 +687,6 @@ public class Convert {
|
|||
*
|
||||
* @param bytes byte数组
|
||||
* @param charset 字符集
|
||||
*
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String str(byte[] bytes, String charset) {
|
||||
|
@ -734,7 +698,6 @@ public class Convert {
|
|||
*
|
||||
* @param data 字符串
|
||||
* @param charset 字符集,如果此字段为空,则解码的结果取决于平台
|
||||
*
|
||||
* @return 解码后的字符串
|
||||
*/
|
||||
public static String str(byte[] data, Charset charset) {
|
||||
|
@ -753,7 +716,6 @@ public class Convert {
|
|||
*
|
||||
* @param data 数据
|
||||
* @param charset 字符集,如果为空使用当前系统字符集
|
||||
*
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String str(ByteBuffer data, String charset) {
|
||||
|
@ -769,7 +731,6 @@ public class Convert {
|
|||
*
|
||||
* @param data 数据
|
||||
* @param charset 字符集,如果为空使用当前系统字符集
|
||||
*
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String str(ByteBuffer data, Charset charset) {
|
||||
|
@ -785,7 +746,6 @@ public class Convert {
|
|||
* 半角转全角
|
||||
*
|
||||
* @param input String.
|
||||
*
|
||||
* @return 全角字符串.
|
||||
*/
|
||||
public static String toSBC(String input) {
|
||||
|
@ -797,7 +757,6 @@ public class Convert {
|
|||
*
|
||||
* @param input String
|
||||
* @param notConvertSet 不替换的字符集合
|
||||
*
|
||||
* @return 全角字符串.
|
||||
*/
|
||||
public static String toSBC(String input, Set<Character> notConvertSet) {
|
||||
|
@ -822,7 +781,6 @@ public class Convert {
|
|||
* 全角转半角
|
||||
*
|
||||
* @param input String.
|
||||
*
|
||||
* @return 半角字符串
|
||||
*/
|
||||
public static String toDBC(String input) {
|
||||
|
@ -834,7 +792,6 @@ public class Convert {
|
|||
*
|
||||
* @param text 文本
|
||||
* @param notConvertSet 不替换的字符集合
|
||||
*
|
||||
* @return 替换后的字符
|
||||
*/
|
||||
public static String toDBC(String text, Set<Character> notConvertSet) {
|
||||
|
@ -860,7 +817,6 @@ public class Convert {
|
|||
* 数字金额大写转换 先写个完整的然后将如零拾替换成零
|
||||
*
|
||||
* @param n 数字
|
||||
*
|
||||
* @return 中文大写数字
|
||||
*/
|
||||
public static String digitUppercase(double n) {
|
||||
|
|
|
@ -24,7 +24,6 @@ public class StrFormatter {
|
|||
*
|
||||
* @param strPattern 字符串模板
|
||||
* @param argArray 参数列表
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static String format(final String strPattern, final Object... argArray) {
|
||||
|
|
|
@ -26,7 +26,6 @@ public class Arith {
|
|||
*
|
||||
* @param v1 被加数
|
||||
* @param v2 加数
|
||||
*
|
||||
* @return 两个参数的和
|
||||
*/
|
||||
public static double add(double v1, double v2) {
|
||||
|
@ -40,7 +39,6 @@ public class Arith {
|
|||
*
|
||||
* @param v1 被减数
|
||||
* @param v2 减数
|
||||
*
|
||||
* @return 两个参数的差
|
||||
*/
|
||||
public static double sub(double v1, double v2) {
|
||||
|
@ -54,7 +52,6 @@ public class Arith {
|
|||
*
|
||||
* @param v1 被乘数
|
||||
* @param v2 乘数
|
||||
*
|
||||
* @return 两个参数的积
|
||||
*/
|
||||
public static double mul(double v1, double v2) {
|
||||
|
@ -69,7 +66,6 @@ public class Arith {
|
|||
*
|
||||
* @param v1 被除数
|
||||
* @param v2 除数
|
||||
*
|
||||
* @return 两个参数的商
|
||||
*/
|
||||
public static double div(double v1, double v2) {
|
||||
|
@ -83,7 +79,6 @@ public class Arith {
|
|||
* @param v1 被除数
|
||||
* @param v2 除数
|
||||
* @param scale 表示表示需要精确到小数点以后几位。
|
||||
*
|
||||
* @return 两个参数的商
|
||||
*/
|
||||
public static double div(double v1, double v2, int scale) {
|
||||
|
@ -104,7 +99,6 @@ public class Arith {
|
|||
*
|
||||
* @param v 需要四舍五入的数字
|
||||
* @param scale 小数点后保留几位
|
||||
*
|
||||
* @return 四舍五入后的结果
|
||||
*/
|
||||
public static double round(double v, int scale) {
|
||||
|
|
|
@ -125,7 +125,6 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
|||
*
|
||||
* @param endDate 最后时间
|
||||
* @param startTime 开始时间
|
||||
*
|
||||
* @return 时间差(天/小时/分钟)
|
||||
*/
|
||||
public static String timeDistance(Date endDate, Date startTime) {
|
||||
|
|
|
@ -34,7 +34,6 @@ public class DictUtils {
|
|||
* 获取字典缓存
|
||||
*
|
||||
* @param key 参数键
|
||||
*
|
||||
* @return dictDatas 字典数据列表
|
||||
*/
|
||||
public static List<SysDictData> getDictCache(String key) {
|
||||
|
@ -50,7 +49,6 @@ public class DictUtils {
|
|||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典值
|
||||
*
|
||||
* @return 字典标签
|
||||
*/
|
||||
public static String getDictLabel(String dictType, String dictValue) {
|
||||
|
@ -62,7 +60,6 @@ public class DictUtils {
|
|||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictLabel 字典标签
|
||||
*
|
||||
* @return 字典值
|
||||
*/
|
||||
public static String getDictValue(String dictType, String dictLabel) {
|
||||
|
@ -75,7 +72,6 @@ public class DictUtils {
|
|||
* @param dictType 字典类型
|
||||
* @param dictValue 字典值
|
||||
* @param separator 分隔符
|
||||
*
|
||||
* @return 字典标签
|
||||
*/
|
||||
public static String getDictLabel(String dictType, String dictValue, String separator) {
|
||||
|
@ -109,7 +105,6 @@ public class DictUtils {
|
|||
* @param dictType 字典类型
|
||||
* @param dictLabel 字典标签
|
||||
* @param separator 分隔符
|
||||
*
|
||||
* @return 字典值
|
||||
*/
|
||||
public static String getDictValue(String dictType, String dictLabel, String separator) {
|
||||
|
@ -156,7 +151,6 @@ public class DictUtils {
|
|||
* 设置cache key
|
||||
*
|
||||
* @param configKey 参数键
|
||||
*
|
||||
* @return 缓存键key
|
||||
*/
|
||||
public static String getCacheKey(String configKey) {
|
||||
|
|
|
@ -15,7 +15,6 @@ public class MessageUtils {
|
|||
*
|
||||
* @param code 消息键
|
||||
* @param args 参数
|
||||
*
|
||||
* @return 获取国际化翻译值
|
||||
*/
|
||||
public static String message(String code, Object... args) {
|
||||
|
|
|
@ -17,6 +17,7 @@ public class ObjUtils {
|
|||
* Array: 如果长度为零,则认为为空。
|
||||
* Collection: 如果元素为零,则认为为空。
|
||||
* Map: 如果键值映射为零,则认为为空。
|
||||
*
|
||||
* @param o 对象
|
||||
* @return 如果对象具有受支持的类型并且为空或null,则为true,否则为false
|
||||
*/
|
||||
|
@ -26,6 +27,7 @@ public class ObjUtils {
|
|||
|
||||
/**
|
||||
* 判断long类型不为0
|
||||
*
|
||||
* @param val 值
|
||||
* @return 返回值不为0
|
||||
*/
|
||||
|
@ -35,22 +37,27 @@ public class ObjUtils {
|
|||
|
||||
/**
|
||||
* 判断Integer类型不为0
|
||||
*
|
||||
* @param val 值
|
||||
* @return 返回值不为0
|
||||
*/
|
||||
public static boolean notNull(Integer val) {
|
||||
return ObjectUtils.isNotEmpty(val) && val != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断BigDecimal类型不为0
|
||||
*
|
||||
* @param val 值
|
||||
* @return 返回值不为0
|
||||
*/
|
||||
public static boolean notNull(BigDecimal val) {
|
||||
return ObjectUtils.isNotEmpty(val) && val.doubleValue() == 0.00;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断BigDecimal类型不为0
|
||||
*
|
||||
* @param val 值
|
||||
* @return 返回值不为0
|
||||
*/
|
||||
|
|
|
@ -68,7 +68,6 @@ public class SecurityUtils {
|
|||
* 生成BCryptPasswordEncoder密码
|
||||
*
|
||||
* @param password 密码
|
||||
*
|
||||
* @return 加密字符串
|
||||
*/
|
||||
public static String encryptPassword(String password) {
|
||||
|
@ -81,7 +80,6 @@ public class SecurityUtils {
|
|||
*
|
||||
* @param rawPassword 真实密码
|
||||
* @param encodedPassword 加密后字符
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static boolean matchesPassword(String rawPassword, String encodedPassword) {
|
||||
|
@ -93,7 +91,6 @@ public class SecurityUtils {
|
|||
* 是否为管理员
|
||||
*
|
||||
* @param userId 用户ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static boolean isAdmin(Long userId) {
|
||||
|
|
|
@ -70,7 +70,6 @@ public class ServletUtils {
|
|||
* 获得所有请求参数
|
||||
*
|
||||
* @param request 请求对象{@link ServletRequest}
|
||||
*
|
||||
* @return Map
|
||||
*/
|
||||
public static Map<String, String[]> getParams(ServletRequest request) {
|
||||
|
@ -82,7 +81,6 @@ public class ServletUtils {
|
|||
* 获得所有请求参数
|
||||
*
|
||||
* @param request 请求对象{@link ServletRequest}
|
||||
*
|
||||
* @return Map
|
||||
*/
|
||||
public static Map<String, String> getParamMap(ServletRequest request) {
|
||||
|
@ -165,7 +163,6 @@ public class ServletUtils {
|
|||
* 内容编码
|
||||
*
|
||||
* @param str 内容
|
||||
*
|
||||
* @return 编码后的内容
|
||||
*/
|
||||
public static String urlEncode(String str) {
|
||||
|
@ -180,7 +177,6 @@ public class ServletUtils {
|
|||
* 内容解码
|
||||
*
|
||||
* @param str 内容
|
||||
*
|
||||
* @return 解码后的内容
|
||||
*/
|
||||
public static String urlDecode(String str) {
|
||||
|
|
|
@ -26,7 +26,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* 获取参数不为空值
|
||||
*
|
||||
* @param value defaultValue 要判断的value
|
||||
*
|
||||
* @return value 返回值
|
||||
*/
|
||||
public static <T> T nvl(T value, T defaultValue) {
|
||||
|
@ -37,7 +36,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* * 判断一个Collection是否为空, 包含List,Set,Queue
|
||||
*
|
||||
* @param coll 要判断的Collection
|
||||
*
|
||||
* @return true:为空 false:非空
|
||||
*/
|
||||
public static boolean isEmpty(Collection<?> coll) {
|
||||
|
@ -48,7 +46,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* * 判断一个Collection是否非空,包含List,Set,Queue
|
||||
*
|
||||
* @param coll 要判断的Collection
|
||||
*
|
||||
* @return true:非空 false:空
|
||||
*/
|
||||
public static boolean isNotEmpty(Collection<?> coll) {
|
||||
|
@ -69,7 +66,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* * 判断一个对象数组是否非空
|
||||
*
|
||||
* @param objects 要判断的对象数组
|
||||
*
|
||||
* @return true:非空 false:空
|
||||
*/
|
||||
public static boolean isNotEmpty(Object[] objects) {
|
||||
|
@ -80,7 +76,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* * 判断一个Map是否为空
|
||||
*
|
||||
* @param map 要判断的Map
|
||||
*
|
||||
* @return true:为空 false:非空
|
||||
*/
|
||||
public static boolean isEmpty(Map<?, ?> map) {
|
||||
|
@ -91,7 +86,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* * 判断一个Map是否为空
|
||||
*
|
||||
* @param map 要判断的Map
|
||||
*
|
||||
* @return true:非空 false:空
|
||||
*/
|
||||
public static boolean isNotEmpty(Map<?, ?> map) {
|
||||
|
@ -102,7 +96,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* * 判断一个字符串是否为空串
|
||||
*
|
||||
* @param str String
|
||||
*
|
||||
* @return true:为空 false:非空
|
||||
*/
|
||||
public static boolean isEmpty(String str) {
|
||||
|
@ -113,7 +106,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* * 判断一个字符串是否为非空串
|
||||
*
|
||||
* @param str String
|
||||
*
|
||||
* @return true:非空串 false:空串
|
||||
*/
|
||||
public static boolean isNotEmpty(String str) {
|
||||
|
@ -124,7 +116,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* * 判断一个对象是否为空
|
||||
*
|
||||
* @param object Object
|
||||
*
|
||||
* @return true:为空 false:非空
|
||||
*/
|
||||
public static boolean isNull(Object object) {
|
||||
|
@ -135,7 +126,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* * 判断一个对象是否非空
|
||||
*
|
||||
* @param object Object
|
||||
*
|
||||
* @return true:非空 false:空
|
||||
*/
|
||||
public static boolean isNotNull(Object object) {
|
||||
|
@ -146,7 +136,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* * 判断一个对象是否是数组类型(Java基本型别的数组)
|
||||
*
|
||||
* @param object 对象
|
||||
*
|
||||
* @return true:是数组 false:不是数组
|
||||
*/
|
||||
public static boolean isArray(Object object) {
|
||||
|
@ -165,7 +154,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
*
|
||||
* @param str 字符串
|
||||
* @param start 开始
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static String substring(final String str, int start) {
|
||||
|
@ -193,7 +181,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* @param str 字符串
|
||||
* @param start 开始
|
||||
* @param end 结束
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static String substring(final String str, int start, int end) {
|
||||
|
@ -237,7 +224,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
*
|
||||
* @param template 文本模板,被替换的部分用 {} 表示
|
||||
* @param params 参数值
|
||||
*
|
||||
* @return 格式化后的文本
|
||||
*/
|
||||
public static String format(String template, Object... params) {
|
||||
|
@ -251,7 +237,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* 是否为http(s)://开头
|
||||
*
|
||||
* @param link 链接
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static boolean ishttp(String link) {
|
||||
|
@ -263,7 +248,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
*
|
||||
* @param str 字符串
|
||||
* @param sep 分隔符
|
||||
*
|
||||
* @return set集合
|
||||
*/
|
||||
public static final Set<String> str2Set(String str, String sep) {
|
||||
|
@ -277,7 +261,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* @param sep 分隔符
|
||||
* @param filterBlank 过滤纯空白
|
||||
* @param trim 去掉首尾空白
|
||||
*
|
||||
* @return list集合
|
||||
*/
|
||||
public static final List<String> str2List(String str, String sep, boolean filterBlank, boolean trim) {
|
||||
|
@ -309,7 +292,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
*
|
||||
* @param collection 给定的集合
|
||||
* @param array 给定的数组
|
||||
*
|
||||
* @return boolean 结果
|
||||
*/
|
||||
public static boolean containsAny(Collection<String> collection, String... array) {
|
||||
|
@ -330,7 +312,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
*
|
||||
* @param cs 指定字符串
|
||||
* @param searchCharSequences 需要检查的字符串数组
|
||||
*
|
||||
* @return 是否包含任意一个字符串
|
||||
*/
|
||||
public static boolean containsAnyIgnoreCase(CharSequence cs, CharSequence... searchCharSequences) {
|
||||
|
@ -389,7 +370,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
*
|
||||
* @param str 验证字符串
|
||||
* @param strs 字符串组
|
||||
*
|
||||
* @return 包含返回true
|
||||
*/
|
||||
public static boolean inStringIgnoreCase(String str, String... strs) {
|
||||
|
@ -407,7 +387,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
|
||||
*
|
||||
* @param name 转换前的下划线大写方式命名的字符串
|
||||
*
|
||||
* @return 转换后的驼峰式命名的字符串
|
||||
*/
|
||||
public static String convertToCamelCase(String name) {
|
||||
|
@ -468,7 +447,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
*
|
||||
* @param str 指定字符串
|
||||
* @param strs 需要检查的字符串数组
|
||||
*
|
||||
* @return 是否匹配
|
||||
*/
|
||||
public static boolean matches(String str, List<String> strs) {
|
||||
|
@ -491,7 +469,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
*
|
||||
* @param pattern 匹配规则
|
||||
* @param url 需要匹配的url
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean isMatch(String pattern, String url) {
|
||||
|
@ -509,7 +486,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
*
|
||||
* @param num 数字对象
|
||||
* @param size 字符串指定长度
|
||||
*
|
||||
* @return 返回数字的字符串格式,该字符串为指定长度。
|
||||
*/
|
||||
public static final String padl(final Number num, final int size) {
|
||||
|
@ -522,7 +498,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
* @param s 原始字符串
|
||||
* @param size 字符串指定长度
|
||||
* @param c 用于补齐的字符
|
||||
*
|
||||
* @return 返回指定长度的字符串,由原字符串左补齐或截取得到。
|
||||
*/
|
||||
public static final String padl(final String s, final int size, final char c) {
|
||||
|
|
|
@ -45,7 +45,6 @@ public class BeanUtils extends org.springframework.beans.BeanUtils {
|
|||
* 获取对象的setter方法。
|
||||
*
|
||||
* @param obj 对象
|
||||
*
|
||||
* @return 对象的setter方法列表
|
||||
*/
|
||||
public static List<Method> getSetterMethods(Object obj) {
|
||||
|
@ -71,7 +70,6 @@ public class BeanUtils extends org.springframework.beans.BeanUtils {
|
|||
* 获取对象的getter方法。
|
||||
*
|
||||
* @param obj 对象
|
||||
*
|
||||
* @return 对象的getter方法列表
|
||||
*/
|
||||
|
||||
|
@ -97,7 +95,6 @@ public class BeanUtils extends org.springframework.beans.BeanUtils {
|
|||
*
|
||||
* @param m1 方法名1
|
||||
* @param m2 方法名2
|
||||
*
|
||||
* @return 属性名一样返回true,否则返回false
|
||||
*/
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ public class FileTypeUtils {
|
|||
* 例如: ruoyi.txt, 返回: txt
|
||||
*
|
||||
* @param file 文件名
|
||||
*
|
||||
* @return 后缀(不含".")
|
||||
*/
|
||||
public static String getFileType(File file) {
|
||||
|
@ -32,7 +31,6 @@ public class FileTypeUtils {
|
|||
* 例如: ruoyi.txt, 返回: txt
|
||||
*
|
||||
* @param fileName 文件名
|
||||
*
|
||||
* @return 后缀(不含".")
|
||||
*/
|
||||
public static String getFileType(String fileName) {
|
||||
|
@ -47,7 +45,6 @@ public class FileTypeUtils {
|
|||
* 获取文件类型
|
||||
*
|
||||
* @param photoByte 文件字节码
|
||||
*
|
||||
* @return 后缀(不含".")
|
||||
*/
|
||||
public static String getFileExtendName(byte[] photoByte) {
|
||||
|
|
|
@ -49,9 +49,7 @@ public class FileUploadUtils {
|
|||
* 以默认配置进行文件上传
|
||||
*
|
||||
* @param file 上传的文件
|
||||
*
|
||||
* @return 文件名称
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public static final String upload(MultipartFile file) throws IOException {
|
||||
|
@ -67,9 +65,7 @@ public class FileUploadUtils {
|
|||
*
|
||||
* @param baseDir 相对应用的基目录
|
||||
* @param file 上传的文件
|
||||
*
|
||||
* @return 文件名称
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public static final String upload(String baseDir, MultipartFile file) throws IOException {
|
||||
|
@ -86,9 +82,7 @@ public class FileUploadUtils {
|
|||
* @param baseDir 相对应用的基目录
|
||||
* @param file 上传的文件
|
||||
* @param allowedExtension 上传文件类型
|
||||
*
|
||||
* @return 返回上传成功的文件名
|
||||
*
|
||||
* @throws FileSizeLimitExceededException 如果超出最大大小
|
||||
* @throws FileNameLengthLimitExceededException 文件名太长
|
||||
* @throws IOException 比如读写文件出错时
|
||||
|
@ -140,9 +134,7 @@ public class FileUploadUtils {
|
|||
* 文件大小校验
|
||||
*
|
||||
* @param file 上传的文件
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws FileSizeLimitExceededException 如果超出最大大小
|
||||
* @throws InvalidExtensionException
|
||||
*/
|
||||
|
@ -179,7 +171,6 @@ public class FileUploadUtils {
|
|||
*
|
||||
* @param extension
|
||||
* @param allowedExtension
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static final boolean isAllowedExtension(String extension, String[] allowedExtension) {
|
||||
|
@ -195,7 +186,6 @@ public class FileUploadUtils {
|
|||
* 获取文件名的后缀
|
||||
*
|
||||
* @param file 表单文件
|
||||
*
|
||||
* @return 后缀名
|
||||
*/
|
||||
public static final String getExtension(MultipartFile file) {
|
||||
|
|
|
@ -27,7 +27,6 @@ public class FileUtils {
|
|||
*
|
||||
* @param filePath 文件路径
|
||||
* @param os 输出流
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static void writeBytes(String filePath, OutputStream os) throws IOException {
|
||||
|
@ -55,9 +54,7 @@ public class FileUtils {
|
|||
* 写数据到文件中
|
||||
*
|
||||
* @param data 数据
|
||||
*
|
||||
* @return 目标文件
|
||||
*
|
||||
* @throws IOException IO异常
|
||||
*/
|
||||
public static String writeImportBytes(byte[] data) throws IOException {
|
||||
|
@ -69,9 +66,7 @@ public class FileUtils {
|
|||
*
|
||||
* @param data 数据
|
||||
* @param uploadDir 目标文件
|
||||
*
|
||||
* @return 目标文件
|
||||
*
|
||||
* @throws IOException IO异常
|
||||
*/
|
||||
public static String writeBytes(byte[] data, String uploadDir) throws IOException {
|
||||
|
@ -93,7 +88,6 @@ public class FileUtils {
|
|||
* 删除文件
|
||||
*
|
||||
* @param filePath 文件
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean deleteFile(String filePath) {
|
||||
|
@ -110,7 +104,6 @@ public class FileUtils {
|
|||
* 文件名称验证
|
||||
*
|
||||
* @param filename 文件名称
|
||||
*
|
||||
* @return true 正常 false 非法
|
||||
*/
|
||||
public static boolean isValidFilename(String filename) {
|
||||
|
@ -121,7 +114,6 @@ public class FileUtils {
|
|||
* 检查文件是否可下载
|
||||
*
|
||||
* @param resource 需要下载的文件
|
||||
*
|
||||
* @return true 正常 false 非法
|
||||
*/
|
||||
public static boolean checkAllowDownload(String resource) {
|
||||
|
@ -144,7 +136,6 @@ public class FileUtils {
|
|||
*
|
||||
* @param request 请求对象
|
||||
* @param fileName 文件名
|
||||
*
|
||||
* @return 编码后的文件名
|
||||
*/
|
||||
public static String setFileDownloadHeader(HttpServletRequest request, String fileName) throws UnsupportedEncodingException {
|
||||
|
@ -193,7 +184,6 @@ public class FileUtils {
|
|||
* 百分号编码工具方法
|
||||
*
|
||||
* @param s 需要百分号编码的字符串
|
||||
*
|
||||
* @return 百分号编码后的字符串
|
||||
*/
|
||||
public static String percentEncode(String s) throws UnsupportedEncodingException {
|
||||
|
@ -205,7 +195,6 @@ public class FileUtils {
|
|||
* 获取图像后缀
|
||||
*
|
||||
* @param photoByte 图像数据
|
||||
*
|
||||
* @return 后缀名
|
||||
*/
|
||||
public static String getFileExtendName(byte[] photoByte) {
|
||||
|
@ -227,7 +216,6 @@ public class FileUtils {
|
|||
* 获取文件名称 /profile/upload/2022/04/16/ruoyi.png -- ruoyi.png
|
||||
*
|
||||
* @param fileName 路径名称
|
||||
*
|
||||
* @return 没有文件路径的名称
|
||||
*/
|
||||
public static String getName(String fileName) {
|
||||
|
@ -244,7 +232,6 @@ public class FileUtils {
|
|||
* 获取不带后缀文件名称 /profile/upload/2022/04/16/ruoyi.png -- ruoyi
|
||||
*
|
||||
* @param fileName 路径名称
|
||||
*
|
||||
* @return 没有文件路径和后缀的名称
|
||||
*/
|
||||
public static String getNameNotSuffix(String fileName) {
|
||||
|
|
|
@ -49,7 +49,6 @@ public class ImageUtils {
|
|||
* 读取文件为字节数据
|
||||
*
|
||||
* @param url 地址
|
||||
*
|
||||
* @return 字节数据
|
||||
*/
|
||||
public static byte[] readFile(String url) {
|
||||
|
|
|
@ -29,7 +29,6 @@ public class EscapeUtil {
|
|||
* 转义文本中的HTML字符为安全的字符
|
||||
*
|
||||
* @param text 被转义的文本
|
||||
*
|
||||
* @return 转义后的文本
|
||||
*/
|
||||
public static String escape(String text) {
|
||||
|
@ -40,7 +39,6 @@ public class EscapeUtil {
|
|||
* 还原被转义的HTML特殊字符
|
||||
*
|
||||
* @param content 包含转义符的HTML内容
|
||||
*
|
||||
* @return 转换后的字符串
|
||||
*/
|
||||
public static String unescape(String content) {
|
||||
|
@ -51,7 +49,6 @@ public class EscapeUtil {
|
|||
* 清除所有HTML标签,但是不删除标签内的内容
|
||||
*
|
||||
* @param content 文本
|
||||
*
|
||||
* @return 清除标签后的文本
|
||||
*/
|
||||
public static String clean(String content) {
|
||||
|
@ -62,7 +59,6 @@ public class EscapeUtil {
|
|||
* Escape编码
|
||||
*
|
||||
* @param text 被编码的文本
|
||||
*
|
||||
* @return 编码后的字符
|
||||
*/
|
||||
private static String encode(String text) {
|
||||
|
@ -96,7 +92,6 @@ public class EscapeUtil {
|
|||
* Escape解码
|
||||
*
|
||||
* @param content 被转义的内容
|
||||
*
|
||||
* @return 解码后的字符串
|
||||
*/
|
||||
public static String decode(String content) {
|
||||
|
|
|
@ -197,7 +197,6 @@ public final class HTMLFilter {
|
|||
* given a user submitted input String, filter out any invalid or restricted html.
|
||||
*
|
||||
* @param input text (i.e. submitted by a user) than may contain html
|
||||
*
|
||||
* @return "clean" version of input, with only valid, whitelisted html elements allowed
|
||||
*/
|
||||
public String filter(final String input) {
|
||||
|
|
|
@ -26,7 +26,6 @@ public class HttpUtils {
|
|||
* 向指定 URL 发送GET方法的请求
|
||||
*
|
||||
* @param url 发送请求的 URL
|
||||
*
|
||||
* @return 所代表远程资源的响应结果
|
||||
*/
|
||||
public static String sendGet(String url) {
|
||||
|
@ -38,7 +37,6 @@ public class HttpUtils {
|
|||
*
|
||||
* @param url 发送请求的 URL
|
||||
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
|
||||
*
|
||||
* @return 所代表远程资源的响应结果
|
||||
*/
|
||||
public static String sendGet(String url, String param) {
|
||||
|
@ -51,7 +49,6 @@ public class HttpUtils {
|
|||
* @param url 发送请求的 URL
|
||||
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
|
||||
* @param contentType 编码类型
|
||||
*
|
||||
* @return 所代表远程资源的响应结果
|
||||
*/
|
||||
public static String sendGet(String url, String param, String contentType) {
|
||||
|
@ -97,7 +94,6 @@ public class HttpUtils {
|
|||
*
|
||||
* @param url 发送请求的 URL
|
||||
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
|
||||
*
|
||||
* @return 所代表远程资源的响应结果
|
||||
*/
|
||||
public static String sendPost(String url, String param) {
|
||||
|
|
|
@ -33,7 +33,6 @@ public class IpUtils {
|
|||
* 获取客户端IP
|
||||
*
|
||||
* @param request 请求对象
|
||||
*
|
||||
* @return IP地址
|
||||
*/
|
||||
public static String getIpAddr(HttpServletRequest request) {
|
||||
|
@ -65,7 +64,6 @@ public class IpUtils {
|
|||
* 检查是否为内部IP地址
|
||||
*
|
||||
* @param ip IP地址
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static boolean internalIp(String ip) {
|
||||
|
@ -77,7 +75,6 @@ public class IpUtils {
|
|||
* 检查是否为内部IP地址
|
||||
*
|
||||
* @param addr byte地址
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
private static boolean internalIp(byte[] addr) {
|
||||
|
@ -116,7 +113,6 @@ public class IpUtils {
|
|||
* 将IPv4地址转换成字节
|
||||
*
|
||||
* @param text IPv4地址
|
||||
*
|
||||
* @return byte 字节
|
||||
*/
|
||||
public static byte[] textToNumericFormatV4(String text) {
|
||||
|
@ -217,7 +213,6 @@ public class IpUtils {
|
|||
* 从多级反向代理中获得第一个非unknown IP地址
|
||||
*
|
||||
* @param ip 获得的IP地址
|
||||
*
|
||||
* @return 第一个非unknown IP地址
|
||||
*/
|
||||
public static String getMultistageReverseProxyIp(String ip) {
|
||||
|
@ -238,7 +233,6 @@ public class IpUtils {
|
|||
* 检测给定字符串是否为未知,多用于检测HTTP请求相关
|
||||
*
|
||||
* @param checkString 被检测的字符串
|
||||
*
|
||||
* @return 是否未知
|
||||
*/
|
||||
public static boolean isUnknown(String checkString) {
|
||||
|
@ -309,7 +303,6 @@ public class IpUtils {
|
|||
*
|
||||
* @param filter 过滤IP列表,支持后缀'*'通配,支持网段如:`10.10.10.1-10.10.10.99`
|
||||
* @param ip 校验IP地址
|
||||
*
|
||||
* @return boolean 结果
|
||||
*/
|
||||
public static boolean isMatchedIp(String filter, String ip) {
|
||||
|
|
|
@ -16,7 +16,6 @@ public interface ExcelHandlerAdapter {
|
|||
* @param args excel注解args参数组
|
||||
* @param cell 单元格对象
|
||||
* @param wb 工作簿对象
|
||||
*
|
||||
* @return 处理后的值
|
||||
*/
|
||||
Object format(Object value, String[] args, Cell cell, Workbook wb);
|
||||
|
|
|
@ -31,7 +31,10 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
|
@ -154,7 +157,6 @@ public class ExcelUtil<T> {
|
|||
* @param propertyValue 参数值
|
||||
* @param converterExp 翻译注解
|
||||
* @param separator 分隔符
|
||||
*
|
||||
* @return 解析后值
|
||||
*/
|
||||
public static String convertByExp(String propertyValue, String converterExp, String separator) {
|
||||
|
@ -184,7 +186,6 @@ public class ExcelUtil<T> {
|
|||
* @param propertyValue 参数值
|
||||
* @param converterExp 翻译注解
|
||||
* @param separator 分隔符
|
||||
*
|
||||
* @return 解析后值
|
||||
*/
|
||||
public static String reverseByExp(String propertyValue, String converterExp, String separator) {
|
||||
|
@ -214,7 +215,6 @@ public class ExcelUtil<T> {
|
|||
* @param dictValue 字典值
|
||||
* @param dictType 字典类型
|
||||
* @param separator 分隔符
|
||||
*
|
||||
* @return 字典标签
|
||||
*/
|
||||
public static String convertDictByExp(String dictValue, String dictType, String separator) {
|
||||
|
@ -227,7 +227,6 @@ public class ExcelUtil<T> {
|
|||
* @param dictLabel 字典标签
|
||||
* @param dictType 字典类型
|
||||
* @param separator 分隔符
|
||||
*
|
||||
* @return 字典值
|
||||
*/
|
||||
public static String reverseDictByExp(String dictLabel, String dictType, String separator) {
|
||||
|
@ -239,7 +238,6 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param sheet 当前sheet对象
|
||||
* @param workbook 工作簿对象
|
||||
*
|
||||
* @return Map key:图片单元格索引(1_1)String,value:图片流PictureData
|
||||
*/
|
||||
public static Map<String, PictureData> getSheetPictures03(HSSFSheet sheet, HSSFWorkbook workbook) {
|
||||
|
@ -267,7 +265,6 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param sheet 当前sheet对象
|
||||
* @param workbook 工作簿对象
|
||||
*
|
||||
* @return Map key:图片单元格索引(1_1)String,value:图片流PictureData
|
||||
*/
|
||||
public static Map<String, PictureData> getSheetPictures07(XSSFSheet sheet, XSSFWorkbook workbook) {
|
||||
|
@ -294,7 +291,6 @@ public class ExcelUtil<T> {
|
|||
* 隐藏Excel中列属性
|
||||
*
|
||||
* @param fields 列属性名 示例[单个"name"/多个"id","name"]
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void hideColumn(String... fields) {
|
||||
|
@ -364,7 +360,6 @@ public class ExcelUtil<T> {
|
|||
* 对excel表单默认第一个索引名转换成list
|
||||
*
|
||||
* @param is 输入流
|
||||
*
|
||||
* @return 转换后集合
|
||||
*/
|
||||
public List<T> importExcel(InputStream is) {
|
||||
|
@ -385,7 +380,6 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param is 输入流
|
||||
* @param titleNum 标题占用行数
|
||||
*
|
||||
* @return 转换后集合
|
||||
*/
|
||||
public List<T> importExcel(InputStream is, int titleNum) throws Exception {
|
||||
|
@ -398,7 +392,6 @@ public class ExcelUtil<T> {
|
|||
* @param sheetName 表格索引名
|
||||
* @param titleNum 标题占用行数
|
||||
* @param is 输入流
|
||||
*
|
||||
* @return 转换后集合
|
||||
*/
|
||||
public List<T> importExcel(String sheetName, InputStream is, int titleNum) throws Exception {
|
||||
|
@ -526,7 +519,6 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param list 导出数据集合
|
||||
* @param sheetName 工作表的名称
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public Result<String> exportExcel(List<T> list, String sheetName) {
|
||||
|
@ -539,7 +531,6 @@ public class ExcelUtil<T> {
|
|||
* @param list 导出数据集合
|
||||
* @param sheetName 工作表的名称
|
||||
* @param title 标题
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public Result<String> exportExcel(List<T> list, String sheetName, String title) {
|
||||
|
@ -553,7 +544,6 @@ public class ExcelUtil<T> {
|
|||
* @param response 返回数据
|
||||
* @param list 导出数据集合
|
||||
* @param sheetName 工作表的名称
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public void exportExcel(HttpServletResponse response, List<T> list, String sheetName) {
|
||||
|
@ -567,7 +557,6 @@ public class ExcelUtil<T> {
|
|||
* @param list 导出数据集合
|
||||
* @param sheetName 工作表的名称
|
||||
* @param title 标题
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public void exportExcel(HttpServletResponse response, List<T> list, String sheetName, String title) {
|
||||
|
@ -581,7 +570,6 @@ public class ExcelUtil<T> {
|
|||
* 对list数据源将其里面的数据导入到excel表单
|
||||
*
|
||||
* @param sheetName 工作表的名称
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public Result<String> importTemplateExcel(String sheetName) {
|
||||
|
@ -593,7 +581,6 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param sheetName 工作表的名称
|
||||
* @param title 标题
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public Result<String> importTemplateExcel(String sheetName, String title) {
|
||||
|
@ -605,7 +592,6 @@ public class ExcelUtil<T> {
|
|||
* 对list数据源将其里面的数据导入到excel表单
|
||||
*
|
||||
* @param sheetName 工作表的名称
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public void importTemplateExcel(HttpServletResponse response, String sheetName) {
|
||||
|
@ -617,7 +603,6 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param sheetName 工作表的名称
|
||||
* @param title 标题
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public void importTemplateExcel(HttpServletResponse response, String sheetName, String title) {
|
||||
|
@ -758,7 +743,6 @@ public class ExcelUtil<T> {
|
|||
* 创建表格样式
|
||||
*
|
||||
* @param wb 工作薄对象
|
||||
*
|
||||
* @return 样式列表
|
||||
*/
|
||||
private Map<String, CellStyle> createStyles(Workbook wb) {
|
||||
|
@ -811,7 +795,6 @@ public class ExcelUtil<T> {
|
|||
* 根据Excel注解创建表格头样式
|
||||
*
|
||||
* @param wb 工作薄对象
|
||||
*
|
||||
* @return 自定义样式列表
|
||||
*/
|
||||
private Map<String, CellStyle> annotationHeaderStyles(Workbook wb, Map<String, CellStyle> styles) {
|
||||
|
@ -842,7 +825,6 @@ public class ExcelUtil<T> {
|
|||
* 根据Excel注解创建表格列样式
|
||||
*
|
||||
* @param wb 工作薄对象
|
||||
*
|
||||
* @return 自定义样式列表
|
||||
*/
|
||||
private Map<String, CellStyle> annotationDataStyles(Workbook wb) {
|
||||
|
@ -1095,7 +1077,6 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param value 数据值
|
||||
* @param excel 数据注解
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String dataFormatHandlerAdapter(Object value, Excel excel, Cell cell) {
|
||||
|
@ -1174,9 +1155,7 @@ public class ExcelUtil<T> {
|
|||
* @param vo 实体对象
|
||||
* @param field 字段
|
||||
* @param excel 注解
|
||||
*
|
||||
* @return 最终的属性值
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
private Object getTargetValue(T vo, Field field, Excel excel) throws Exception {
|
||||
|
@ -1200,9 +1179,7 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param o
|
||||
* @param name
|
||||
*
|
||||
* @return value
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
private Object getValue(Object o, String name) throws Exception {
|
||||
|
@ -1308,7 +1285,6 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param row 获取的行
|
||||
* @param column 获取单元格列号
|
||||
*
|
||||
* @return 单元格值
|
||||
*/
|
||||
public Object getCellValue(Row row, int column) {
|
||||
|
@ -1349,7 +1325,6 @@ public class ExcelUtil<T> {
|
|||
* 判断是否是空行
|
||||
*
|
||||
* @param row 判断的行
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean isRowEmpty(Row row) {
|
||||
|
@ -1370,7 +1345,6 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param dateFormat 日期格式
|
||||
* @param val 被格式化的日期对象
|
||||
*
|
||||
* @return 格式化后的日期字符
|
||||
*/
|
||||
public String parseDateToStr(String dateFormat, Object val) {
|
||||
|
@ -1422,7 +1396,6 @@ public class ExcelUtil<T> {
|
|||
*
|
||||
* @param name 名称
|
||||
* @param pojoClass 类对象
|
||||
*
|
||||
* @return 子列表方法
|
||||
*/
|
||||
public Method getSubMethod(String name, Class<?> pojoClass) {
|
||||
|
|
|
@ -66,7 +66,6 @@ public final class Base64 {
|
|||
* Encodes hex octects into Base64
|
||||
*
|
||||
* @param binaryData Array containing binaryData
|
||||
*
|
||||
* @return Encoded Base64 array
|
||||
*/
|
||||
public static String encode(byte[] binaryData) {
|
||||
|
@ -139,7 +138,6 @@ public final class Base64 {
|
|||
* Decodes Base64 data into octects
|
||||
*
|
||||
* @param encoded string containing Base64 data
|
||||
*
|
||||
* @return Array containind decoded data.
|
||||
*/
|
||||
public static byte[] decode(String encoded) {
|
||||
|
@ -235,7 +233,6 @@ public final class Base64 {
|
|||
* remove WhiteSpace from MIME containing encoded Base64 data.
|
||||
*
|
||||
* @param data the byte array of base64 data (with WS)
|
||||
*
|
||||
* @return the new length
|
||||
*/
|
||||
private static int removeWhiteSpace(char[] data) {
|
||||
|
|
|
@ -28,9 +28,7 @@ public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationC
|
|||
* 获取对象
|
||||
*
|
||||
* @param name
|
||||
*
|
||||
* @return Object 一个以所给名字注册的bean的实例
|
||||
*
|
||||
* @throws org.springframework.beans.BeansException
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -42,9 +40,7 @@ public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationC
|
|||
* 获取类型为requiredType的对象
|
||||
*
|
||||
* @param clz
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws org.springframework.beans.BeansException
|
||||
*/
|
||||
public static <T> T getBean(Class<T> clz) throws BeansException {
|
||||
|
@ -56,7 +52,6 @@ public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationC
|
|||
* 如果BeanFactory包含一个与所给名称匹配的bean定义,则返回true
|
||||
*
|
||||
* @param name
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static boolean containsBean(String name) {
|
||||
|
@ -67,9 +62,7 @@ public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationC
|
|||
* 判断以给定名字注册的bean定义是一个singleton还是一个prototype。 如果与给定名字相应的bean定义没有被找到,将会抛出一个异常(NoSuchBeanDefinitionException)
|
||||
*
|
||||
* @param name
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
|
||||
*/
|
||||
public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException {
|
||||
|
@ -78,9 +71,7 @@ public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationC
|
|||
|
||||
/**
|
||||
* @param name
|
||||
*
|
||||
* @return Class 注册对象的类型
|
||||
*
|
||||
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
|
||||
*/
|
||||
public static Class<?> getType(String name) throws NoSuchBeanDefinitionException {
|
||||
|
@ -91,9 +82,7 @@ public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationC
|
|||
* 如果给定的bean名字在bean定义中有别名,则返回这些别名
|
||||
*
|
||||
* @param name
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
|
||||
*/
|
||||
public static String[] getAliases(String name) throws NoSuchBeanDefinitionException {
|
||||
|
@ -104,7 +93,6 @@ public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationC
|
|||
* 获取aop代理对象
|
||||
*
|
||||
* @param invoker
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -135,7 +123,6 @@ public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationC
|
|||
* 获取配置文件中的值
|
||||
*
|
||||
* @param key 配置文件的key
|
||||
*
|
||||
* @return 当前的配置文件的值
|
||||
*/
|
||||
public static String getRequiredProperty(String key) {
|
||||
|
|
|
@ -48,7 +48,6 @@ public class Seq {
|
|||
*
|
||||
* @param atomicInt 序列数
|
||||
* @param length 数值长度
|
||||
*
|
||||
* @return 序列值
|
||||
*/
|
||||
public static String getId(AtomicInteger atomicInt, int length) {
|
||||
|
|
|
@ -76,7 +76,6 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
* 获取类型 4(伪随机生成的)UUID 的静态工厂。 使用加密的强伪随机数生成器生成该 UUID。
|
||||
*
|
||||
* @param isSecure 是否使用{@link SecureRandom}如果是可以获得更安全的随机码,否则可以得到更好的性能
|
||||
*
|
||||
* @return 随机生成的 {@code UUID}
|
||||
*/
|
||||
public static UUID randomUUID(boolean isSecure) {
|
||||
|
@ -95,7 +94,6 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
* 根据指定的字节数组获取类型 3(基于名称的)UUID 的静态工厂。
|
||||
*
|
||||
* @param name 用于构造 UUID 的字节数组。
|
||||
*
|
||||
* @return 根据指定数组生成的 {@code UUID}
|
||||
*/
|
||||
public static UUID nameUUIDFromBytes(byte[] name) {
|
||||
|
@ -117,9 +115,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
* 根据 {@link #toString()} 方法中描述的字符串标准表示形式创建{@code UUID}。
|
||||
*
|
||||
* @param name 指定 {@code UUID} 字符串
|
||||
*
|
||||
* @return 具有指定值的 {@code UUID}
|
||||
*
|
||||
* @throws IllegalArgumentException 如果 name 与 {@link #toString} 中描述的字符串表示形式不符抛出此异常
|
||||
*/
|
||||
public static UUID fromString(String name) {
|
||||
|
@ -149,7 +145,6 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
*
|
||||
* @param val 值
|
||||
* @param digits 位
|
||||
*
|
||||
* @return 值
|
||||
*/
|
||||
private static String digits(long val, int digits) {
|
||||
|
@ -268,7 +263,6 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
* UnsupportedOperationException。
|
||||
*
|
||||
* @return 此 {@code UUID} 的时钟序列
|
||||
*
|
||||
* @throws UnsupportedOperationException 如果此 UUID 的 version 不为 1
|
||||
*/
|
||||
public int clockSequence() throws UnsupportedOperationException {
|
||||
|
@ -286,7 +280,6 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
* 如果此 UUID 不是基于时间的 UUID,则此方法抛出 UnsupportedOperationException。
|
||||
*
|
||||
* @return 此 {@code UUID} 的节点值
|
||||
*
|
||||
* @throws UnsupportedOperationException 如果此 UUID 的 version 不为 1
|
||||
*/
|
||||
public long node() throws UnsupportedOperationException {
|
||||
|
@ -316,7 +309,6 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
* </blockquote>
|
||||
*
|
||||
* @return 此{@code UUID} 的字符串表现形式
|
||||
*
|
||||
* @see #toString(boolean)
|
||||
*/
|
||||
@Override
|
||||
|
@ -346,7 +338,6 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
* </blockquote>
|
||||
*
|
||||
* @param isSimple 是否简单模式,简单模式为不带'-'的UUID字符串
|
||||
*
|
||||
* @return 此{@code UUID} 的字符串表现形式
|
||||
*/
|
||||
public String toString(boolean isSimple) {
|
||||
|
@ -399,7 +390,6 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
* 当且仅当参数不为 {@code null}、而是一个 UUID 对象、具有与此 UUID 相同的 varriant、包含相同的值(每一位均相同)时,结果才为 {@code true}。
|
||||
*
|
||||
* @param obj 要与之比较的对象
|
||||
*
|
||||
* @return 如果对象相同,则返回 {@code true};否则返回 {@code false}
|
||||
*/
|
||||
@Override
|
||||
|
@ -418,7 +408,6 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
|||
* 如果两个 UUID 不同,且第一个 UUID 的最高有效字段大于第二个 UUID 的对应字段,则第一个 UUID 大于第二个 UUID。
|
||||
*
|
||||
* @param val 与此 UUID 比较的 UUID
|
||||
*
|
||||
* @return 在此 UUID 小于、等于或大于 val 时,分别返回 -1、0 或 1。
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -2,19 +2,29 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>ruoyi-basic</artifactId>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.8.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-custom</artifactId>
|
||||
|
||||
<description>
|
||||
custom自定义模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,93 @@
|
|||
package com.ruoyi.custom.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.custom.domain.req.SysClassEditReq;
|
||||
import com.ruoyi.custom.domain.req.SysClassQueryReq;
|
||||
import com.ruoyi.custom.domain.req.SysClassSaveReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 班级管理对象 sys_class
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("sys_class")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "SysClass", description = "班级管理")
|
||||
public class SysClass extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@TableId(value = "class_id", type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "班级ID", value = "班级ID")
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@Excel(name = "班级名称")
|
||||
@ApiModelProperty(name = "班级名称", value = "班级名称", required = true)
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
@ApiModelProperty(name = "状态(0正常 1停用)", value = "状态(0正常 1停用)", required = true)
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static SysClass queryBuild(SysClassQueryReq sysClassQueryReq) {
|
||||
return SysClass.builder()
|
||||
.className(sysClassQueryReq.getClassName())
|
||||
.status(sysClassQueryReq.getStatus())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static SysClass saveBuild(SysClassSaveReq sysClassSaveReq) {
|
||||
return SysClass.builder()
|
||||
.className(sysClassSaveReq.getClassName())
|
||||
.status(sysClassSaveReq.getStatus())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static SysClass editBuild(Long classId, SysClassEditReq sysClassEditReq) {
|
||||
return SysClass.builder()
|
||||
.classId(classId)
|
||||
.className(sysClassEditReq.getClassName())
|
||||
.status(sysClassEditReq.getStatus())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.ruoyi.custom.domain.req;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 班级管理对象 sys_class
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "SysClassEditReq", description = "班级管理")
|
||||
public class SysClassEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@ApiModelProperty(name = "班级名称", value = "班级名称", required = true)
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
@ApiModelProperty(name = "状态(0正常 1停用)", value = "状态(0正常 1停用)", required = true)
|
||||
private String status;
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.ruoyi.custom.domain.req;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 班级管理对象 sys_class
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "SysClassQueryReq", description = "班级管理")
|
||||
public class SysClassQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
@ApiModelProperty(name = "状态(0正常 1停用)", value = "状态(0正常 1停用)")
|
||||
private String status;
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.ruoyi.custom.domain.req;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 班级管理对象 sys_class
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "SysClassSaveReq", description = "班级管理")
|
||||
public class SysClassSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
|
||||
@ApiModelProperty(name = "班级ID", value = "班级ID")
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
|
||||
@ApiModelProperty(name = "班级名称", value = "班级名称", required = true)
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
|
||||
@ApiModelProperty(name = "状态(0正常 1停用)", value = "状态(0正常 1停用)", required = true)
|
||||
private String status;
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.ruoyi.custom.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.custom.domain.SysClass;
|
||||
|
||||
/**
|
||||
* 班级管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
public interface SysClassMapper extends BaseMapper<SysClass> {
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.ruoyi.custom.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.custom.domain.SysClass;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班级管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
public interface SysClassService extends IService<SysClass> {
|
||||
/**
|
||||
* 查询班级管理列表
|
||||
*
|
||||
* @param sysClass 班级管理
|
||||
* @return 班级管理集合
|
||||
*/
|
||||
public List<SysClass> list(SysClass sysClass);
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.ruoyi.custom.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.utils.ObjUtils;
|
||||
import com.ruoyi.custom.domain.SysClass;
|
||||
import com.ruoyi.custom.mapper.SysClassMapper;
|
||||
import com.ruoyi.custom.service.SysClassService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班级管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SysClassServiceImpl extends ServiceImpl<SysClassMapper, SysClass> implements SysClassService {
|
||||
|
||||
/**
|
||||
* 查询班级管理列表
|
||||
*
|
||||
* @param sysClass 班级管理
|
||||
* @return 班级管理
|
||||
*/
|
||||
@Override
|
||||
public List<SysClass> list(SysClass sysClass) {
|
||||
LambdaQueryWrapper<SysClass> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
if (ObjUtils.notNull(sysClass.getClassName())) {
|
||||
queryWrapper.like(SysClass::getClassName, sysClass.getClassName());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(sysClass.getStatus())) {
|
||||
queryWrapper.eq(SysClass::getStatus, sysClass.getStatus());
|
||||
}
|
||||
|
||||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.custom.mapper.SysClassMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.custom.domain.SysClass" id="SysClassResult">
|
||||
<result property="classId" column="class_id"/>
|
||||
<result property="className" column="class_name"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysClassVo">
|
||||
select class_id,
|
||||
class_name,
|
||||
status,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark
|
||||
from sys_class
|
||||
</sql>
|
||||
</mapper>
|
|
@ -59,6 +59,12 @@
|
|||
<artifactId>ruoyi-system</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 自定义模块 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-custom</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -124,7 +124,6 @@ public class LogAspect {
|
|||
*
|
||||
* @param log 日志
|
||||
* @param operLog 操作日志
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void getControllerMethodDescription(JoinPoint joinPoint, Log log, SysOperLog operLog, Object jsonResult) throws Exception {
|
||||
|
@ -149,7 +148,6 @@ public class LogAspect {
|
|||
* 获取请求的参数,放到log中
|
||||
*
|
||||
* @param operLog 操作日志
|
||||
*
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
private void setRequestValue(JoinPoint joinPoint, SysOperLog operLog, String[] excludeParamNames) throws Exception {
|
||||
|
@ -194,7 +192,6 @@ public class LogAspect {
|
|||
* 判断是否需要过滤的对象。
|
||||
*
|
||||
* @param o 对象信息。
|
||||
*
|
||||
* @return 如果是需要过滤的对象,则返回true;否则返回false。
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
|
|
@ -67,7 +67,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
* 解决 无法直接注入 AuthenticationManager
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@Bean
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.ruoyi.framework.config.mybatisplus;
|
|||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
|
|
@ -42,9 +42,7 @@ public abstract class RepeatSubmitInterceptor implements HandlerInterceptor {
|
|||
*
|
||||
* @param request 请求信息
|
||||
* @param annotation 防重复注解参数
|
||||
*
|
||||
* @return 结果
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract boolean isRepeatSubmit(HttpServletRequest request, RepeatSubmit annotation);
|
||||
|
|
|
@ -32,7 +32,6 @@ public class AsyncFactory {
|
|||
* @param status 状态
|
||||
* @param message 消息
|
||||
* @param args 列表
|
||||
*
|
||||
* @return 任务task
|
||||
*/
|
||||
public static TimerTask recordLogininfor(final String username, final String status, final String message,
|
||||
|
@ -79,7 +78,6 @@ public class AsyncFactory {
|
|||
* 操作日志记录
|
||||
*
|
||||
* @param operLog 操作日志信息
|
||||
*
|
||||
* @return 任务task
|
||||
*/
|
||||
public static TimerTask recordOper(final SysOperLog operLog) {
|
||||
|
|
|
@ -190,7 +190,6 @@ public class Server {
|
|||
* 字节转换
|
||||
*
|
||||
* @param size 字节大小
|
||||
*
|
||||
* @return 转换后值
|
||||
*/
|
||||
public String convertFileSize(long size) {
|
||||
|
|
|
@ -35,7 +35,6 @@ public class PermissionService {
|
|||
* 验证用户是否具备某权限
|
||||
*
|
||||
* @param permission 权限字符串
|
||||
*
|
||||
* @return 用户是否具备某权限
|
||||
*/
|
||||
public boolean hasPermi(String permission) {
|
||||
|
@ -54,7 +53,6 @@ public class PermissionService {
|
|||
* 验证用户是否不具备某权限,与 hasPermi逻辑相反
|
||||
*
|
||||
* @param permission 权限字符串
|
||||
*
|
||||
* @return 用户是否不具备某权限
|
||||
*/
|
||||
public boolean lacksPermi(String permission) {
|
||||
|
@ -65,7 +63,6 @@ public class PermissionService {
|
|||
* 验证用户是否具有以下任意一个权限
|
||||
*
|
||||
* @param permissions 以 PERMISSION_DELIMETER 为分隔符的权限列表
|
||||
*
|
||||
* @return 用户是否具有以下任意一个权限
|
||||
*/
|
||||
public boolean hasAnyPermi(String permissions) {
|
||||
|
@ -90,7 +87,6 @@ public class PermissionService {
|
|||
* 判断用户是否拥有某个角色
|
||||
*
|
||||
* @param role 角色字符串
|
||||
*
|
||||
* @return 用户是否具备某角色
|
||||
*/
|
||||
public boolean hasRole(String role) {
|
||||
|
@ -114,7 +110,6 @@ public class PermissionService {
|
|||
* 验证用户是否不具备某角色,与 isRole逻辑相反。
|
||||
*
|
||||
* @param role 角色名称
|
||||
*
|
||||
* @return 用户是否不具备某角色
|
||||
*/
|
||||
public boolean lacksRole(String role) {
|
||||
|
@ -125,7 +120,6 @@ public class PermissionService {
|
|||
* 验证用户是否具有以下任意一个角色
|
||||
*
|
||||
* @param roles 以 ROLE_NAMES_DELIMETER 为分隔符的角色列表
|
||||
*
|
||||
* @return 用户是否具有以下任意一个角色
|
||||
*/
|
||||
public boolean hasAnyRoles(String roles) {
|
||||
|
@ -149,7 +143,6 @@ public class PermissionService {
|
|||
*
|
||||
* @param permissions 权限列表
|
||||
* @param permission 权限字符串
|
||||
*
|
||||
* @return 用户是否具备某权限
|
||||
*/
|
||||
private boolean hasPermissions(Set<String> permissions, String permission) {
|
||||
|
|
|
@ -55,7 +55,6 @@ public class SysLoginService {
|
|||
* @param password 密码
|
||||
* @param code 验证码
|
||||
* @param uuid 唯一标识
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public String login(String username, String password, String code, String uuid) {
|
||||
|
@ -94,7 +93,6 @@ public class SysLoginService {
|
|||
* @param username 用户名
|
||||
* @param code 验证码
|
||||
* @param uuid 唯一标识
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public void validateCaptcha(String username, String code, String uuid) {
|
||||
|
|
|
@ -38,7 +38,6 @@ public class SysPasswordService {
|
|||
* 登录账户密码错误次数缓存键名
|
||||
*
|
||||
* @param username 用户名
|
||||
*
|
||||
* @return 缓存键key
|
||||
*/
|
||||
private String getCacheKey(String username) {
|
||||
|
|
|
@ -29,7 +29,6 @@ public class SysPermissionService {
|
|||
* 获取角色数据权限
|
||||
*
|
||||
* @param user 用户信息
|
||||
*
|
||||
* @return 角色权限信息
|
||||
*/
|
||||
public Set<String> getRolePermission(SysUser user) {
|
||||
|
@ -47,7 +46,6 @@ public class SysPermissionService {
|
|||
* 获取菜单数据权限
|
||||
*
|
||||
* @param user 用户信息
|
||||
*
|
||||
* @return 菜单权限信息
|
||||
*/
|
||||
public Set<String> getMenuPermission(SysUser user) {
|
||||
|
|
|
@ -79,7 +79,6 @@ public class SysRegisterService {
|
|||
* @param username 用户名
|
||||
* @param code 验证码
|
||||
* @param uuid 唯一标识
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public void validateCaptcha(String username, String code, String uuid) {
|
||||
|
|
|
@ -93,7 +93,6 @@ public class TokenService {
|
|||
* 创建令牌
|
||||
*
|
||||
* @param loginUser 用户信息
|
||||
*
|
||||
* @return 令牌
|
||||
*/
|
||||
public String createToken(LoginUser loginUser) {
|
||||
|
@ -111,7 +110,6 @@ public class TokenService {
|
|||
* 验证令牌有效期,相差不足20分钟,自动刷新缓存
|
||||
*
|
||||
* @param loginUser
|
||||
*
|
||||
* @return 令牌
|
||||
*/
|
||||
public void verifyToken(LoginUser loginUser) {
|
||||
|
@ -153,7 +151,6 @@ public class TokenService {
|
|||
* 从数据声明生成令牌
|
||||
*
|
||||
* @param claims 数据声明
|
||||
*
|
||||
* @return 令牌
|
||||
*/
|
||||
private String createToken(Map<String, Object> claims) {
|
||||
|
@ -167,7 +164,6 @@ public class TokenService {
|
|||
* 从令牌中获取数据声明
|
||||
*
|
||||
* @param token 令牌
|
||||
*
|
||||
* @return 数据声明
|
||||
*/
|
||||
private Claims parseToken(String token) {
|
||||
|
@ -181,7 +177,6 @@ public class TokenService {
|
|||
* 从令牌中获取用户名
|
||||
*
|
||||
* @param token 令牌
|
||||
*
|
||||
* @return 用户名
|
||||
*/
|
||||
public String getUsernameFromToken(String token) {
|
||||
|
@ -193,7 +188,6 @@ public class TokenService {
|
|||
* 获取请求token
|
||||
*
|
||||
* @param request
|
||||
*
|
||||
* @return token
|
||||
*/
|
||||
private String getToken(HttpServletRequest request) {
|
||||
|
|
|
@ -14,7 +14,6 @@ public interface GenTableColumnMapper {
|
|||
* 根据表名称查询列信息
|
||||
*
|
||||
* @param tableName 表名称
|
||||
*
|
||||
* @return 列信息
|
||||
*/
|
||||
public List<GenTableColumn> selectDbTableColumnsByName(String tableName);
|
||||
|
@ -23,7 +22,6 @@ public interface GenTableColumnMapper {
|
|||
* 查询业务字段列表
|
||||
*
|
||||
* @param tableId 业务字段编号
|
||||
*
|
||||
* @return 业务字段集合
|
||||
*/
|
||||
public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId);
|
||||
|
@ -32,7 +30,6 @@ public interface GenTableColumnMapper {
|
|||
* 新增业务字段
|
||||
*
|
||||
* @param genTableColumn 业务字段信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGenTableColumn(GenTableColumn genTableColumn);
|
||||
|
@ -41,7 +38,6 @@ public interface GenTableColumnMapper {
|
|||
* 修改业务字段
|
||||
*
|
||||
* @param genTableColumn 业务字段信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGenTableColumn(GenTableColumn genTableColumn);
|
||||
|
@ -50,7 +46,6 @@ public interface GenTableColumnMapper {
|
|||
* 删除业务字段
|
||||
*
|
||||
* @param genTableColumns 列数据
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGenTableColumns(List<GenTableColumn> genTableColumns);
|
||||
|
@ -59,7 +54,6 @@ public interface GenTableColumnMapper {
|
|||
* 批量删除业务字段
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGenTableColumnByIds(Long[] ids);
|
||||
|
|
|
@ -14,7 +14,6 @@ public interface GenTableMapper {
|
|||
* 查询业务列表
|
||||
*
|
||||
* @param genTable 业务信息
|
||||
*
|
||||
* @return 业务集合
|
||||
*/
|
||||
public List<GenTable> selectGenTableList(GenTable genTable);
|
||||
|
@ -23,7 +22,6 @@ public interface GenTableMapper {
|
|||
* 查询据库列表
|
||||
*
|
||||
* @param genTable 业务信息
|
||||
*
|
||||
* @return 数据库表集合
|
||||
*/
|
||||
public List<GenTable> selectDbTableList(GenTable genTable);
|
||||
|
@ -32,7 +30,6 @@ public interface GenTableMapper {
|
|||
* 查询据库列表
|
||||
*
|
||||
* @param tableNames 表名称组
|
||||
*
|
||||
* @return 数据库表集合
|
||||
*/
|
||||
public List<GenTable> selectDbTableListByNames(String[] tableNames);
|
||||
|
@ -48,7 +45,6 @@ public interface GenTableMapper {
|
|||
* 查询表ID业务信息
|
||||
*
|
||||
* @param id 业务ID
|
||||
*
|
||||
* @return 业务信息
|
||||
*/
|
||||
public GenTable selectGenTableById(Long id);
|
||||
|
@ -57,7 +53,6 @@ public interface GenTableMapper {
|
|||
* 查询表名称业务信息
|
||||
*
|
||||
* @param tableName 表名称
|
||||
*
|
||||
* @return 业务信息
|
||||
*/
|
||||
public GenTable selectGenTableByName(String tableName);
|
||||
|
@ -66,7 +61,6 @@ public interface GenTableMapper {
|
|||
* 新增业务
|
||||
*
|
||||
* @param genTable 业务信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGenTable(GenTable genTable);
|
||||
|
@ -75,7 +69,6 @@ public interface GenTableMapper {
|
|||
* 修改业务
|
||||
*
|
||||
* @param genTable 业务信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGenTable(GenTable genTable);
|
||||
|
@ -84,7 +77,6 @@ public interface GenTableMapper {
|
|||
* 批量删除业务
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGenTableByIds(Long[] ids);
|
||||
|
|
|
@ -14,7 +14,6 @@ public interface GenTableColumnService {
|
|||
* 查询业务字段列表
|
||||
*
|
||||
* @param tableId 业务字段编号
|
||||
*
|
||||
* @return 业务字段集合
|
||||
*/
|
||||
public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId);
|
||||
|
@ -23,7 +22,6 @@ public interface GenTableColumnService {
|
|||
* 新增业务字段
|
||||
*
|
||||
* @param genTableColumn 业务字段信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGenTableColumn(GenTableColumn genTableColumn);
|
||||
|
@ -32,7 +30,6 @@ public interface GenTableColumnService {
|
|||
* 修改业务字段
|
||||
*
|
||||
* @param genTableColumn 业务字段信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGenTableColumn(GenTableColumn genTableColumn);
|
||||
|
@ -41,7 +38,6 @@ public interface GenTableColumnService {
|
|||
* 删除业务字段信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGenTableColumnByIds(String ids);
|
||||
|
|
|
@ -15,7 +15,6 @@ public interface GenTableService {
|
|||
* 查询业务列表
|
||||
*
|
||||
* @param genTable 业务信息
|
||||
*
|
||||
* @return 业务集合
|
||||
*/
|
||||
public List<GenTable> selectGenTableList(GenTable genTable);
|
||||
|
@ -24,7 +23,6 @@ public interface GenTableService {
|
|||
* 查询据库列表
|
||||
*
|
||||
* @param genTable 业务信息
|
||||
*
|
||||
* @return 数据库表集合
|
||||
*/
|
||||
public List<GenTable> selectDbTableList(GenTable genTable);
|
||||
|
@ -33,7 +31,6 @@ public interface GenTableService {
|
|||
* 查询据库列表
|
||||
*
|
||||
* @param tableNames 表名称组
|
||||
*
|
||||
* @return 数据库表集合
|
||||
*/
|
||||
public List<GenTable> selectDbTableListByNames(String[] tableNames);
|
||||
|
@ -49,7 +46,6 @@ public interface GenTableService {
|
|||
* 查询业务信息
|
||||
*
|
||||
* @param id 业务ID
|
||||
*
|
||||
* @return 业务信息
|
||||
*/
|
||||
public GenTable selectGenTableById(Long id);
|
||||
|
@ -58,7 +54,6 @@ public interface GenTableService {
|
|||
* 修改业务
|
||||
*
|
||||
* @param genTable 业务信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public void updateGenTable(GenTable genTable);
|
||||
|
@ -67,7 +62,6 @@ public interface GenTableService {
|
|||
* 删除业务信息
|
||||
*
|
||||
* @param tableIds 需要删除的表数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public void deleteGenTableByIds(Long[] tableIds);
|
||||
|
@ -83,7 +77,6 @@ public interface GenTableService {
|
|||
* 预览代码
|
||||
*
|
||||
* @param tableId 表编号
|
||||
*
|
||||
* @return 预览数据列表
|
||||
*/
|
||||
public Map<String, String> previewCode(Long tableId);
|
||||
|
@ -92,7 +85,6 @@ public interface GenTableService {
|
|||
* 生成代码(下载方式)
|
||||
*
|
||||
* @param tableName 表名称
|
||||
*
|
||||
* @return 数据
|
||||
*/
|
||||
public byte[] downloadCode(String tableName);
|
||||
|
@ -101,7 +93,6 @@ public interface GenTableService {
|
|||
* 生成代码(自定义路径)
|
||||
*
|
||||
* @param tableName 表名称
|
||||
*
|
||||
* @return 数据
|
||||
*/
|
||||
public void generatorCode(String tableName);
|
||||
|
@ -117,7 +108,6 @@ public interface GenTableService {
|
|||
* 批量生成代码(下载方式)
|
||||
*
|
||||
* @param tableNames 表数组
|
||||
*
|
||||
* @return 数据
|
||||
*/
|
||||
public byte[] downloadCode(String[] tableNames);
|
||||
|
|
|
@ -23,7 +23,6 @@ public class GenTableColumnServiceImpl implements GenTableColumnService {
|
|||
* 查询业务字段列表
|
||||
*
|
||||
* @param tableId 业务字段编号
|
||||
*
|
||||
* @return 业务字段集合
|
||||
*/
|
||||
@Override
|
||||
|
@ -35,7 +34,6 @@ public class GenTableColumnServiceImpl implements GenTableColumnService {
|
|||
* 新增业务字段
|
||||
*
|
||||
* @param genTableColumn 业务字段信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
@ -47,7 +45,6 @@ public class GenTableColumnServiceImpl implements GenTableColumnService {
|
|||
* 修改业务字段
|
||||
*
|
||||
* @param genTableColumn 业务字段信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
@ -59,7 +56,6 @@ public class GenTableColumnServiceImpl implements GenTableColumnService {
|
|||
* 删除业务字段对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -59,7 +59,6 @@ public class GenTableServiceImpl implements GenTableService {
|
|||
*
|
||||
* @param table 业务表信息
|
||||
* @param template 模板文件路径
|
||||
*
|
||||
* @return 生成地址
|
||||
*/
|
||||
public static String getGenPath(GenTable table, String template) {
|
||||
|
@ -74,7 +73,6 @@ public class GenTableServiceImpl implements GenTableService {
|
|||
* 查询业务信息
|
||||
*
|
||||
* @param id 业务ID
|
||||
*
|
||||
* @return 业务信息
|
||||
*/
|
||||
@Override
|
||||
|
@ -88,7 +86,6 @@ public class GenTableServiceImpl implements GenTableService {
|
|||
* 查询业务列表
|
||||
*
|
||||
* @param genTable 业务信息
|
||||
*
|
||||
* @return 业务集合
|
||||
*/
|
||||
@Override
|
||||
|
@ -100,7 +97,6 @@ public class GenTableServiceImpl implements GenTableService {
|
|||
* 查询据库列表
|
||||
*
|
||||
* @param genTable 业务信息
|
||||
*
|
||||
* @return 数据库表集合
|
||||
*/
|
||||
@Override
|
||||
|
@ -112,7 +108,6 @@ public class GenTableServiceImpl implements GenTableService {
|
|||
* 查询据库列表
|
||||
*
|
||||
* @param tableNames 表名称组
|
||||
*
|
||||
* @return 数据库表集合
|
||||
*/
|
||||
@Override
|
||||
|
@ -134,7 +129,6 @@ public class GenTableServiceImpl implements GenTableService {
|
|||
* 修改业务
|
||||
*
|
||||
* @param genTable 业务信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
@ -154,7 +148,6 @@ public class GenTableServiceImpl implements GenTableService {
|
|||
* 删除业务对象
|
||||
*
|
||||
* @param tableIds 需要删除的数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
@ -196,7 +189,6 @@ public class GenTableServiceImpl implements GenTableService {
|
|||
* 预览代码
|
||||
*
|
||||
* @param tableId 表编号
|
||||
*
|
||||
* @return 预览数据列表
|
||||
*/
|
||||
@Override
|
||||
|
@ -226,7 +218,6 @@ public class GenTableServiceImpl implements GenTableService {
|
|||
* 生成代码(下载方式)
|
||||
*
|
||||
* @param tableName 表名称
|
||||
*
|
||||
* @return 数据
|
||||
*/
|
||||
@Override
|
||||
|
@ -323,7 +314,6 @@ public class GenTableServiceImpl implements GenTableService {
|
|||
* 批量生成代码(下载方式)
|
||||
*
|
||||
* @param tableNames 表数组
|
||||
*
|
||||
* @return 数据
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -116,7 +116,6 @@ public class GenUtils {
|
|||
*
|
||||
* @param arr 数组
|
||||
* @param targetValue 值
|
||||
*
|
||||
* @return 是否包含
|
||||
*/
|
||||
public static boolean arraysContains(String[] arr, String targetValue) {
|
||||
|
@ -127,7 +126,6 @@ public class GenUtils {
|
|||
* 获取模块名
|
||||
*
|
||||
* @param packageName 包名
|
||||
*
|
||||
* @return 模块名
|
||||
*/
|
||||
public static String getModuleName(String packageName) {
|
||||
|
@ -140,7 +138,6 @@ public class GenUtils {
|
|||
* 获取业务名
|
||||
*
|
||||
* @param tableName 表名
|
||||
*
|
||||
* @return 业务名
|
||||
*/
|
||||
public static String getBusinessName(String tableName) {
|
||||
|
@ -153,7 +150,6 @@ public class GenUtils {
|
|||
* 表名转换成Java类名
|
||||
*
|
||||
* @param tableName 表名称
|
||||
*
|
||||
* @return 类名
|
||||
*/
|
||||
public static String convertClassName(String tableName) {
|
||||
|
@ -171,7 +167,6 @@ public class GenUtils {
|
|||
*
|
||||
* @param replacementm 替换值
|
||||
* @param searchList 替换列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String replaceFirst(String replacementm, String[] searchList) {
|
||||
|
@ -189,7 +184,6 @@ public class GenUtils {
|
|||
* 关键字替换
|
||||
*
|
||||
* @param text 需要被替换的名字
|
||||
*
|
||||
* @return 替换后的名字
|
||||
*/
|
||||
public static String replaceText(String text) {
|
||||
|
@ -200,7 +194,6 @@ public class GenUtils {
|
|||
* 获取数据库类型字段
|
||||
*
|
||||
* @param columnType 列类型
|
||||
*
|
||||
* @return 截取后的列类型
|
||||
*/
|
||||
public static String getDbType(String columnType) {
|
||||
|
@ -215,7 +208,6 @@ public class GenUtils {
|
|||
* 获取字段长度
|
||||
*
|
||||
* @param columnType 列类型
|
||||
*
|
||||
* @return 截取后的列类型
|
||||
*/
|
||||
public static Integer getColumnLength(String columnType) {
|
||||
|
|
|
@ -183,7 +183,6 @@ public class VelocityUtils {
|
|||
* 获取包前缀
|
||||
*
|
||||
* @param packageName 包名称
|
||||
*
|
||||
* @return 包前缀名称
|
||||
*/
|
||||
public static String getPackagePrefix(String packageName) {
|
||||
|
@ -195,7 +194,6 @@ public class VelocityUtils {
|
|||
* 根据列类型获取导入包
|
||||
*
|
||||
* @param genTable 业务表对象
|
||||
*
|
||||
* @return 返回需要导入的包列表
|
||||
*/
|
||||
public static HashSet<String> getImportList(GenTable genTable) {
|
||||
|
@ -216,7 +214,6 @@ public class VelocityUtils {
|
|||
* 根据列类型获取字典组
|
||||
*
|
||||
* @param genTable 业务表对象
|
||||
*
|
||||
* @return 返回字典组
|
||||
*/
|
||||
public static String getDicts(GenTable genTable) {
|
||||
|
@ -247,7 +244,6 @@ public class VelocityUtils {
|
|||
*
|
||||
* @param moduleName 模块名称
|
||||
* @param businessName 业务名称
|
||||
*
|
||||
* @return 返回权限前缀
|
||||
*/
|
||||
public static String getPermissionPrefix(String moduleName, String businessName) {
|
||||
|
@ -258,7 +254,6 @@ public class VelocityUtils {
|
|||
* 获取上级菜单ID字段
|
||||
*
|
||||
* @param paramsObj 生成其他选项
|
||||
*
|
||||
* @return 上级菜单ID字段
|
||||
*/
|
||||
public static String getParentMenuId(JSONObject paramsObj) {
|
||||
|
@ -273,7 +268,6 @@ public class VelocityUtils {
|
|||
* 获取树编码
|
||||
*
|
||||
* @param paramsObj 生成其他选项
|
||||
*
|
||||
* @return 树编码
|
||||
*/
|
||||
public static String getTreecode(JSONObject paramsObj) {
|
||||
|
@ -287,7 +281,6 @@ public class VelocityUtils {
|
|||
* 获取树父编码
|
||||
*
|
||||
* @param paramsObj 生成其他选项
|
||||
*
|
||||
* @return 树父编码
|
||||
*/
|
||||
public static String getTreeParentCode(JSONObject paramsObj) {
|
||||
|
@ -301,7 +294,6 @@ public class VelocityUtils {
|
|||
* 获取树名称
|
||||
*
|
||||
* @param paramsObj 生成其他选项
|
||||
*
|
||||
* @return 树名称
|
||||
*/
|
||||
public static String getTreeName(JSONObject paramsObj) {
|
||||
|
@ -315,7 +307,6 @@ public class VelocityUtils {
|
|||
* 获取需要在哪一列上面显示展开按钮
|
||||
*
|
||||
* @param genTable 业务表对象
|
||||
*
|
||||
* @return 展开按钮列序号
|
||||
*/
|
||||
public static int getExpandColumn(GenTable genTable) {
|
||||
|
|
|
@ -75,7 +75,8 @@
|
|||
order by ordinal_position
|
||||
</select>
|
||||
|
||||
<insert id="insertGenTableColumn" parameterType="com.ruoyi.generator.domain.GenTableColumn" useGeneratedKeys="true" keyProperty="columnId">
|
||||
<insert id="insertGenTableColumn" parameterType="com.ruoyi.generator.domain.GenTableColumn" useGeneratedKeys="true"
|
||||
keyProperty="columnId">
|
||||
insert into gen_table_column (
|
||||
<if test="tableId != null and tableId != ''">table_id,</if>
|
||||
<if test="columnName != null and columnName != ''">column_name,</if>
|
||||
|
|
|
@ -249,7 +249,8 @@
|
|||
order by c.sort
|
||||
</select>
|
||||
|
||||
<insert id="insertGenTable" parameterType="com.ruoyi.generator.domain.GenTable" useGeneratedKeys="true" keyProperty="tableId">
|
||||
<insert id="insertGenTable" parameterType="com.ruoyi.generator.domain.GenTable" useGeneratedKeys="true"
|
||||
keyProperty="tableId">
|
||||
insert into gen_table (
|
||||
<if test="tableName != null">table_name,</if>
|
||||
<if test="tableComment != null and tableComment != ''">table_comment,</if>
|
||||
|
|
|
@ -104,7 +104,8 @@ public class ${ClassName}Controller extends BaseController {
|
|||
@PutMapping("/{${pkColumn.javaField}}")
|
||||
@ApiOperation("修改${functionName}")
|
||||
public Result<String> edit(@PathVariable ${pkColumn.javaType} ${pkColumn.javaField}, @RequestBody ${ClassName}EditReq ${className}EditReq) {
|
||||
return toAjax(${className}Service.updateById(${ClassName}.editBuild(${pkColumn.javaField},${className}EditReq)));
|
||||
return toAjax(${className}Service.updateById(${ClassName}.editBuild(${pkColumn.javaField}, ${className}EditReq)))
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package ${packageName}.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ${packageName}.domain.${ClassName};
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package ${packageName}.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import ${packageName}.domain.${ClassName};
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
|
|
@ -67,7 +67,8 @@ public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${C
|
|||
}
|
||||
#elseif($queryType == "BETWEEN")
|
||||
if (ObjUtils.notChildNull(${className}.getBetween("$JavaField"))){
|
||||
queryWrapper.between(${ClassName}::get$JavaField, ${className}.getBeginParam("$JavaField"),${className}.getEndParam("$JavaField"));
|
||||
queryWrapper.between(${ClassName}::get$JavaField, ${className}.
|
||||
getBeginParam("$JavaField"),${className}.getEndParam("$JavaField"));
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
|
|
@ -76,7 +76,8 @@
|
|||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -85,7 +86,8 @@
|
|||
icon="el-icon-sort"
|
||||
size="mini"
|
||||
@click="toggleExpandAll"
|
||||
>展开/折叠</el-button>
|
||||
>展开/折叠
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
@ -123,7 +125,8 @@
|
|||
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
||||
<template slot-scope="scope">
|
||||
#if($column.htmlType == "checkbox")
|
||||
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
||||
<dict-tag :options="dict.type.${column.dictType}"
|
||||
:value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
||||
#else
|
||||
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
|
||||
#end
|
||||
|
@ -145,21 +148,24 @@
|
|||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -180,7 +186,8 @@
|
|||
#set($dictType=$column.dictType)
|
||||
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
||||
<el-form-item label="${comment}" prop="${treeParentCode}">
|
||||
<treeselect v-model="form.${treeParentCode}" :options="${businessName}Options" :normalizer="normalizer" placeholder="请选择${comment}" />
|
||||
<treeselect v-model="form.${treeParentCode}" :options="${businessName}Options"
|
||||
:normalizer="normalizer" placeholder="请选择${comment}"/>
|
||||
</el-form-item>
|
||||
#elseif($column.htmlType == "input")
|
||||
<el-form-item label="${comment}" prop="${field}">
|
||||
|
@ -247,7 +254,8 @@
|
|||
#else
|
||||
:label="dict.value"
|
||||
#end
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{dict.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
#elseif($column.htmlType == "radio" && $dictType)
|
||||
|
@ -283,7 +291,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
|
||||
import {get${BusinessName}, list${BusinessName}} from "@/api/";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
|
@ -341,7 +349,9 @@ export default {
|
|||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
$column.javaField: [
|
||||
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
|
||||
{
|
||||
required: true, message: "$comment不能为空", trigger: #if($column.htmlType ==
|
||||
"select" || $column.htmlType == "radio")"change"#else"blur"#end }
|
||||
]#if($foreach.count != $columns.size()),#end
|
||||
#end
|
||||
#end
|
||||
|
@ -468,22 +478,54 @@ export default {
|
|||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.#[[$]]#refs["form"].validate(valid => {
|
||||
this.
|
||||
#
|
||||
[[$]]
|
||||
#refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
#foreach($column in $columns)
|
||||
#if($column.htmlType == "checkbox")
|
||||
this.form.$column.javaField = this.form.${column.javaField}.join(",");
|
||||
this.form.$column.javaField = this.form.$
|
||||
{
|
||||
column.javaField
|
||||
}
|
||||
.
|
||||
join(",");
|
||||
#end
|
||||
#end
|
||||
if (this.form.${pkColumn.javaField} != null) {
|
||||
update${BusinessName}(this.form).then(response => {
|
||||
this.#[[$modal]]#.msgSuccess("修改成功");
|
||||
if (this.form.${
|
||||
pkColumn.javaField
|
||||
}
|
||||
!=
|
||||
null
|
||||
)
|
||||
{
|
||||
update$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(this.form).then(response => {
|
||||
this.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
add${BusinessName}(this.form).then(response => {
|
||||
this.#[[$modal]]#.msgSuccess("新增成功");
|
||||
}
|
||||
else
|
||||
{
|
||||
add$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(this.form).then(response => {
|
||||
this.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
@ -493,12 +535,36 @@ export default {
|
|||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() {
|
||||
return del${BusinessName}(row.${pkColumn.javaField});
|
||||
this.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
confirm('是否确认删除${functionName}编号为"' + row.$
|
||||
{
|
||||
pkColumn.javaField
|
||||
}
|
||||
+'"的数据项?'
|
||||
).
|
||||
then(function () {
|
||||
return del$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(row.$
|
||||
{
|
||||
pkColumn.javaField
|
||||
}
|
||||
)
|
||||
;
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.#[[$modal]]#.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
this.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -76,7 +76,8 @@
|
|||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -87,7 +88,8 @@
|
|||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -98,7 +100,8 @@
|
|||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -108,7 +111,8 @@
|
|||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['${moduleName}:${businessName}:export']"
|
||||
>导出</el-button>
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
@ -141,7 +145,8 @@
|
|||
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
||||
<template slot-scope="scope">
|
||||
#if($column.htmlType == "checkbox")
|
||||
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
||||
<dict-tag :options="dict.type.${column.dictType}"
|
||||
:value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
||||
#else
|
||||
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
|
||||
#end
|
||||
|
@ -159,14 +164,16 @@
|
|||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -258,7 +265,8 @@
|
|||
#else
|
||||
:label="dict.value"
|
||||
#end
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{dict.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
#elseif($column.htmlType == "radio" && $dictType)
|
||||
|
@ -294,7 +302,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
|
||||
import {get${BusinessName}, list${BusinessName}} from "@/api/";
|
||||
|
||||
export default {
|
||||
name: "${BusinessName}",
|
||||
|
@ -351,7 +359,9 @@ export default {
|
|||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
$column.javaField: [
|
||||
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
|
||||
{
|
||||
required: true, message: "$comment不能为空", trigger: #if($column.htmlType ==
|
||||
"select" || $column.htmlType == "radio")"change"#else"blur"#end }
|
||||
]#if($foreach.count != $columns.size()),#end
|
||||
#end
|
||||
#end
|
||||
|
@ -449,22 +459,54 @@ export default {
|
|||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.#[[$]]#refs["form"].validate(valid => {
|
||||
this.
|
||||
#
|
||||
[[$]]
|
||||
#refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
#foreach($column in $columns)
|
||||
#if($column.htmlType == "checkbox")
|
||||
this.form.$column.javaField = this.form.${column.javaField}.join(",");
|
||||
this.form.$column.javaField = this.form.$
|
||||
{
|
||||
column.javaField
|
||||
}
|
||||
.
|
||||
join(",");
|
||||
#end
|
||||
#end
|
||||
if (this.form.${pkColumn.javaField} != null) {
|
||||
update${BusinessName}(this.form).then(response => {
|
||||
this.#[[$modal]]#.msgSuccess("修改成功");
|
||||
if (this.form.${
|
||||
pkColumn.javaField
|
||||
}
|
||||
!=
|
||||
null
|
||||
)
|
||||
{
|
||||
update$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(this.form).then(response => {
|
||||
this.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
add${BusinessName}(this.form).then(response => {
|
||||
this.#[[$modal]]#.msgSuccess("新增成功");
|
||||
}
|
||||
else
|
||||
{
|
||||
add$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(this.form).then(response => {
|
||||
this.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
@ -474,13 +516,31 @@ export default {
|
|||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ${pkColumn.javaField}s = row.${pkColumn.javaField} || this.ids;
|
||||
this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?').then(function() {
|
||||
return del${BusinessName}(${pkColumn.javaField}s);
|
||||
const ${pkColumn.javaField}s = row.$
|
||||
{
|
||||
pkColumn.javaField
|
||||
}
|
||||
||
|
||||
this.ids;
|
||||
this.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?').then(function () {
|
||||
return del$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(${pkColumn.javaField}s);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.#[[$modal]]#.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
this.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
|
|
@ -74,7 +74,8 @@
|
|||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -82,7 +83,8 @@
|
|||
plain
|
||||
icon="Sort"
|
||||
@click="toggleExpandAll"
|
||||
>展开/折叠</el-button>
|
||||
>展开/折叠
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
@ -120,7 +122,8 @@
|
|||
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
||||
<template #default="scope">
|
||||
#if($column.htmlType == "checkbox")
|
||||
<dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
||||
<dict-tag :options="${column.dictType}"
|
||||
:value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
||||
#else
|
||||
<dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/>
|
||||
#end
|
||||
|
@ -136,9 +139,15 @@
|
|||
#end
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']">新增</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:edit']">修改
|
||||
</el-button>
|
||||
<el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:add']">新增
|
||||
</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:remove']">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -233,7 +242,8 @@
|
|||
#else
|
||||
:label="dict.value"
|
||||
#end
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{dict.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
#elseif($column.htmlType == "radio" && $dictType)
|
||||
|
@ -271,7 +281,7 @@
|
|||
</template>
|
||||
|
||||
<script setup name="${BusinessName}">
|
||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
|
||||
import {get${BusinessName}, list${BusinessName}} from "@/api/";
|
||||
|
||||
const {proxy} = getCurrentInstance();
|
||||
#if(${dicts} != '')
|
||||
|
@ -313,7 +323,9 @@ const data = reactive({
|
|||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
$column.javaField: [
|
||||
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
|
||||
{
|
||||
required: true, message: "$comment不能为空", trigger: #if($column.htmlType ==
|
||||
"select" || $column.htmlType == "radio")"change"#else"blur"#end }
|
||||
]#if($foreach.count != $columns.size()),#end
|
||||
#end
|
||||
#end
|
||||
|
@ -436,22 +448,54 @@ async function handleUpdate(row) {
|
|||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => {
|
||||
proxy.
|
||||
#
|
||||
[[$]]
|
||||
#refs["${businessName}Ref"].validate(valid => {
|
||||
if (valid) {
|
||||
#foreach($column in $columns)
|
||||
#if($column.htmlType == "checkbox")
|
||||
form.value.$column.javaField = form.value.${column.javaField}.join(",");
|
||||
form.value.$column.javaField = form.value.$
|
||||
{
|
||||
column.javaField
|
||||
}
|
||||
.
|
||||
join(",");
|
||||
#end
|
||||
#end
|
||||
if (form.value.${pkColumn.javaField} != null) {
|
||||
update${BusinessName}(form.value).then(response => {
|
||||
proxy.#[[$modal]]#.msgSuccess("修改成功");
|
||||
if (form.value.${
|
||||
pkColumn.javaField
|
||||
}
|
||||
!=
|
||||
null
|
||||
)
|
||||
{
|
||||
update$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(form.value).then(response => {
|
||||
proxy.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
add${BusinessName}(form.value).then(response => {
|
||||
proxy.#[[$modal]]#.msgSuccess("新增成功");
|
||||
}
|
||||
else
|
||||
{
|
||||
add$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(form.value).then(response => {
|
||||
proxy.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
|
@ -462,12 +506,36 @@ function submitForm() {
|
|||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() {
|
||||
return del${BusinessName}(row.${pkColumn.javaField});
|
||||
proxy.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
confirm('是否确认删除${functionName}编号为"' + row.$
|
||||
{
|
||||
pkColumn.javaField
|
||||
}
|
||||
+'"的数据项?'
|
||||
).
|
||||
then(function () {
|
||||
return del$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(row.$
|
||||
{
|
||||
pkColumn.javaField
|
||||
}
|
||||
)
|
||||
;
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.#[[$modal]]#.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
proxy.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
|
||||
getList();
|
||||
|
|
|
@ -74,7 +74,8 @@
|
|||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -84,7 +85,8 @@
|
|||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -94,7 +96,8 @@
|
|||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -103,7 +106,8 @@
|
|||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['${moduleName}:${businessName}:export']"
|
||||
>导出</el-button>
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
@ -136,7 +140,8 @@
|
|||
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
||||
<template #default="scope">
|
||||
#if($column.htmlType == "checkbox")
|
||||
<dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
||||
<dict-tag :options="${column.dictType}"
|
||||
:value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
||||
#else
|
||||
<dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/>
|
||||
#end
|
||||
|
@ -148,8 +153,12 @@
|
|||
#end
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:edit']">修改
|
||||
</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:remove']">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -241,7 +250,8 @@
|
|||
#else
|
||||
:label="dict.value"
|
||||
#end
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{dict.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
#elseif($column.htmlType == "radio" && $dictType)
|
||||
|
@ -279,7 +289,7 @@
|
|||
</template>
|
||||
|
||||
<script setup name="${BusinessName}">
|
||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
|
||||
import {get${BusinessName}, list${BusinessName}} from "@/api/";
|
||||
|
||||
const {proxy} = getCurrentInstance();
|
||||
#if(${dicts} != '')
|
||||
|
@ -324,7 +334,9 @@ const data = reactive({
|
|||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
$column.javaField: [
|
||||
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
|
||||
{
|
||||
required: true, message: "$comment不能为空", trigger: #if($column.htmlType ==
|
||||
"select" || $column.htmlType == "radio")"change"#else"blur"#end }
|
||||
]#if($foreach.count != $columns.size()),#end
|
||||
#end
|
||||
#end
|
||||
|
@ -428,22 +440,54 @@ function handleUpdate(row) {
|
|||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => {
|
||||
proxy.
|
||||
#
|
||||
[[$]]
|
||||
#refs["${businessName}Ref"].validate(valid => {
|
||||
if (valid) {
|
||||
#foreach($column in $columns)
|
||||
#if($column.htmlType == "checkbox")
|
||||
form.value.$column.javaField = form.value.${column.javaField}.join(",");
|
||||
form.value.$column.javaField = form.value.$
|
||||
{
|
||||
column.javaField
|
||||
}
|
||||
.
|
||||
join(",");
|
||||
#end
|
||||
#end
|
||||
if (form.value.${pkColumn.javaField} != null) {
|
||||
update${BusinessName}(form.value).then(response => {
|
||||
proxy.#[[$modal]]#.msgSuccess("修改成功");
|
||||
if (form.value.${
|
||||
pkColumn.javaField
|
||||
}
|
||||
!=
|
||||
null
|
||||
)
|
||||
{
|
||||
update$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(form.value).then(response => {
|
||||
proxy.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
add${BusinessName}(form.value).then(response => {
|
||||
proxy.#[[$modal]]#.msgSuccess("新增成功");
|
||||
}
|
||||
else
|
||||
{
|
||||
add$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(form.value).then(response => {
|
||||
proxy.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
|
@ -454,13 +498,47 @@ function submitForm() {
|
|||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value;
|
||||
proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + _${pkColumn.javaField}s + '"的数据项?').then(function() {
|
||||
return del${BusinessName}(_${pkColumn.javaField}s);
|
||||
const _$
|
||||
{
|
||||
pkColumn.javaField
|
||||
}
|
||||
s = row.$
|
||||
{
|
||||
pkColumn.javaField
|
||||
}
|
||||
||
|
||||
ids.value;
|
||||
proxy.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
confirm('是否确认删除${functionName}编号为"' + _$
|
||||
{
|
||||
pkColumn.javaField
|
||||
}
|
||||
s + '"的数据项?'
|
||||
).
|
||||
then(function () {
|
||||
return del$
|
||||
{
|
||||
BusinessName
|
||||
}
|
||||
(_$
|
||||
{
|
||||
pkColumn.javaField
|
||||
}
|
||||
s
|
||||
)
|
||||
;
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.#[[$modal]]#.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
proxy.
|
||||
#
|
||||
[[$modal]]
|
||||
#.
|
||||
msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
|
|
|
@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="select${ClassName}Vo">
|
||||
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}
|
||||
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end
|
||||
from ${tableName}
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
|
@ -10,7 +10,6 @@ import com.ruoyi.common.exception.job.TaskException;
|
|||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.quartz.domain.SysJob;
|
||||
import com.ruoyi.quartz.domain.SysJobLog;
|
||||
import com.ruoyi.quartz.service.SysJobService;
|
||||
import com.ruoyi.quartz.util.CronUtils;
|
||||
import com.ruoyi.quartz.util.ScheduleUtils;
|
||||
|
|
|
@ -14,7 +14,6 @@ public interface SysJobLogMapper {
|
|||
* 获取quartz调度器日志的计划任务
|
||||
*
|
||||
* @param jobLog 调度日志信息
|
||||
*
|
||||
* @return 调度任务日志集合
|
||||
*/
|
||||
public List<SysJobLog> selectJobLogList(SysJobLog jobLog);
|
||||
|
@ -30,7 +29,6 @@ public interface SysJobLogMapper {
|
|||
* 通过调度任务日志ID查询调度信息
|
||||
*
|
||||
* @param jobLogId 调度任务日志ID
|
||||
*
|
||||
* @return 调度任务日志对象信息
|
||||
*/
|
||||
public SysJobLog selectJobLogById(Long jobLogId);
|
||||
|
@ -39,7 +37,6 @@ public interface SysJobLogMapper {
|
|||
* 新增任务日志
|
||||
*
|
||||
* @param jobLog 调度日志信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertJobLog(SysJobLog jobLog);
|
||||
|
@ -48,7 +45,6 @@ public interface SysJobLogMapper {
|
|||
* 批量删除调度日志信息
|
||||
*
|
||||
* @param logIds 需要删除的数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobLogByIds(Long[] logIds);
|
||||
|
@ -57,7 +53,6 @@ public interface SysJobLogMapper {
|
|||
* 删除任务日志
|
||||
*
|
||||
* @param jobId 调度日志ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobLogById(Long jobId);
|
||||
|
|
|
@ -14,7 +14,6 @@ public interface SysJobMapper {
|
|||
* 查询调度任务日志集合
|
||||
*
|
||||
* @param job 调度信息
|
||||
*
|
||||
* @return 操作日志集合
|
||||
*/
|
||||
public List<SysJob> selectJobList(SysJob job);
|
||||
|
@ -30,7 +29,6 @@ public interface SysJobMapper {
|
|||
* 通过调度ID查询调度任务信息
|
||||
*
|
||||
* @param jobId 调度ID
|
||||
*
|
||||
* @return 角色对象信息
|
||||
*/
|
||||
public SysJob selectJobById(Long jobId);
|
||||
|
@ -39,7 +37,6 @@ public interface SysJobMapper {
|
|||
* 通过调度ID删除调度任务信息
|
||||
*
|
||||
* @param jobId 调度ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobById(Long jobId);
|
||||
|
@ -48,7 +45,6 @@ public interface SysJobMapper {
|
|||
* 批量删除调度任务信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobByIds(Long[] ids);
|
||||
|
@ -57,7 +53,6 @@ public interface SysJobMapper {
|
|||
* 修改调度任务信息
|
||||
*
|
||||
* @param job 调度任务信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateJob(SysJob job);
|
||||
|
@ -66,7 +61,6 @@ public interface SysJobMapper {
|
|||
* 新增调度任务信息
|
||||
*
|
||||
* @param job 调度任务信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertJob(SysJob job);
|
||||
|
|
|
@ -14,7 +14,6 @@ public interface SysJobLogService {
|
|||
* 获取quartz调度器日志的计划任务
|
||||
*
|
||||
* @param jobLog 调度日志信息
|
||||
*
|
||||
* @return 调度任务日志集合
|
||||
*/
|
||||
public List<SysJobLog> selectJobLogList(SysJobLog jobLog);
|
||||
|
@ -23,7 +22,6 @@ public interface SysJobLogService {
|
|||
* 通过调度任务日志ID查询调度信息
|
||||
*
|
||||
* @param jobLogId 调度任务日志ID
|
||||
*
|
||||
* @return 调度任务日志对象信息
|
||||
*/
|
||||
public SysJobLog selectJobLogById(Long jobLogId);
|
||||
|
@ -39,7 +37,6 @@ public interface SysJobLogService {
|
|||
* 批量删除调度日志信息
|
||||
*
|
||||
* @param logIds 需要删除的日志ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobLogByIds(Long[] logIds);
|
||||
|
@ -48,7 +45,6 @@ public interface SysJobLogService {
|
|||
* 删除任务日志
|
||||
*
|
||||
* @param jobId 调度日志ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobLogById(Long jobId);
|
||||
|
|
|
@ -16,7 +16,6 @@ public interface SysJobService {
|
|||
* 获取quartz调度器的计划任务
|
||||
*
|
||||
* @param job 调度信息
|
||||
*
|
||||
* @return 调度任务集合
|
||||
*/
|
||||
public List<SysJob> selectJobList(SysJob job);
|
||||
|
@ -25,7 +24,6 @@ public interface SysJobService {
|
|||
* 通过调度任务ID查询调度信息
|
||||
*
|
||||
* @param jobId 调度任务ID
|
||||
*
|
||||
* @return 调度任务对象信息
|
||||
*/
|
||||
public SysJob selectJobById(Long jobId);
|
||||
|
@ -34,7 +32,6 @@ public interface SysJobService {
|
|||
* 暂停任务
|
||||
*
|
||||
* @param job 调度信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int pauseJob(SysJob job) throws SchedulerException;
|
||||
|
@ -43,7 +40,6 @@ public interface SysJobService {
|
|||
* 恢复任务
|
||||
*
|
||||
* @param job 调度信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int resumeJob(SysJob job) throws SchedulerException;
|
||||
|
@ -52,7 +48,6 @@ public interface SysJobService {
|
|||
* 删除任务后,所对应的trigger也将被删除
|
||||
*
|
||||
* @param job 调度信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJob(SysJob job) throws SchedulerException;
|
||||
|
@ -61,7 +56,6 @@ public interface SysJobService {
|
|||
* 批量删除调度信息
|
||||
*
|
||||
* @param jobIds 需要删除的任务ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public void deleteJobByIds(Long[] jobIds) throws SchedulerException;
|
||||
|
@ -70,7 +64,6 @@ public interface SysJobService {
|
|||
* 任务调度状态修改
|
||||
*
|
||||
* @param job 调度信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int changeStatus(SysJob job) throws SchedulerException;
|
||||
|
@ -79,7 +72,6 @@ public interface SysJobService {
|
|||
* 立即运行任务
|
||||
*
|
||||
* @param job 调度信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean run(SysJob job) throws SchedulerException;
|
||||
|
@ -88,7 +80,6 @@ public interface SysJobService {
|
|||
* 新增任务
|
||||
*
|
||||
* @param job 调度信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertJob(SysJob job) throws SchedulerException, TaskException;
|
||||
|
@ -97,7 +88,6 @@ public interface SysJobService {
|
|||
* 更新任务
|
||||
*
|
||||
* @param job 调度信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateJob(SysJob job) throws SchedulerException, TaskException;
|
||||
|
@ -106,7 +96,6 @@ public interface SysJobService {
|
|||
* 校验cron表达式是否有效
|
||||
*
|
||||
* @param cronExpression 表达式
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean checkCronExpressionIsValid(String cronExpression);
|
||||
|
|
|
@ -22,7 +22,6 @@ public class SysJobLogServiceImpl implements SysJobLogService {
|
|||
* 获取quartz调度器日志的计划任务
|
||||
*
|
||||
* @param jobLog 调度日志信息
|
||||
*
|
||||
* @return 调度任务日志集合
|
||||
*/
|
||||
@Override
|
||||
|
@ -34,7 +33,6 @@ public class SysJobLogServiceImpl implements SysJobLogService {
|
|||
* 通过调度任务日志ID查询调度信息
|
||||
*
|
||||
* @param jobLogId 调度任务日志ID
|
||||
*
|
||||
* @return 调度任务日志对象信息
|
||||
*/
|
||||
@Override
|
||||
|
@ -56,7 +54,6 @@ public class SysJobLogServiceImpl implements SysJobLogService {
|
|||
* 批量删除调度日志信息
|
||||
*
|
||||
* @param logIds 需要删除的数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,6 @@ public class SysJobServiceImpl implements SysJobService {
|
|||
* 获取quartz调度器的计划任务列表
|
||||
*
|
||||
* @param job 调度信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
@ -59,7 +58,6 @@ public class SysJobServiceImpl implements SysJobService {
|
|||
* 通过调度任务ID查询调度信息
|
||||
*
|
||||
* @param jobId 调度任务ID
|
||||
*
|
||||
* @return 调度任务对象信息
|
||||
*/
|
||||
@Override
|
||||
|
@ -124,7 +122,6 @@ public class SysJobServiceImpl implements SysJobService {
|
|||
* 批量删除调度信息
|
||||
*
|
||||
* @param jobIds 需要删除的任务ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
@ -230,7 +227,6 @@ public class SysJobServiceImpl implements SysJobService {
|
|||
* 校验cron表达式是否有效
|
||||
*
|
||||
* @param cronExpression 表达式
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -91,7 +91,6 @@ public abstract class AbstractQuartzJob implements Job {
|
|||
*
|
||||
* @param context 工作执行上下文对象
|
||||
* @param sysJob 系统计划任务
|
||||
*
|
||||
* @throws Exception 执行过程中的异常
|
||||
*/
|
||||
protected abstract void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception;
|
||||
|
|
|
@ -15,7 +15,6 @@ public class CronUtils {
|
|||
* 返回一个布尔值代表一个给定的Cron表达式的有效性
|
||||
*
|
||||
* @param cronExpression Cron表达式
|
||||
*
|
||||
* @return boolean 表达式是否有效
|
||||
*/
|
||||
public static boolean isValid(String cronExpression) {
|
||||
|
@ -26,7 +25,6 @@ public class CronUtils {
|
|||
* 返回一个字符串值,表示该消息无效Cron表达式给出有效性
|
||||
*
|
||||
* @param cronExpression Cron表达式
|
||||
*
|
||||
* @return String 无效时返回表达式错误描述,如果有效返回null
|
||||
*/
|
||||
public static String getInvalidMessage(String cronExpression) {
|
||||
|
@ -42,7 +40,6 @@ public class CronUtils {
|
|||
* 返回下一个执行时间根据给定的Cron表达式
|
||||
*
|
||||
* @param cronExpression Cron表达式
|
||||
*
|
||||
* @return Date 下次Cron表达式执行时间
|
||||
*/
|
||||
public static Date getNextExecution(String cronExpression) {
|
||||
|
|
|
@ -58,7 +58,6 @@ public class JobInvokeUtil {
|
|||
* 校验是否为为class包名
|
||||
*
|
||||
* @param invokeTarget 名称
|
||||
*
|
||||
* @return true是 false否
|
||||
*/
|
||||
public static boolean isValidClassName(String invokeTarget) {
|
||||
|
@ -69,7 +68,6 @@ public class JobInvokeUtil {
|
|||
* 获取bean名称
|
||||
*
|
||||
* @param invokeTarget 目标字符串
|
||||
*
|
||||
* @return bean名称
|
||||
*/
|
||||
public static String getBeanName(String invokeTarget) {
|
||||
|
@ -81,7 +79,6 @@ public class JobInvokeUtil {
|
|||
* 获取bean方法
|
||||
*
|
||||
* @param invokeTarget 目标字符串
|
||||
*
|
||||
* @return method方法
|
||||
*/
|
||||
public static String getMethodName(String invokeTarget) {
|
||||
|
@ -93,7 +90,6 @@ public class JobInvokeUtil {
|
|||
* 获取method方法参数相关列表
|
||||
*
|
||||
* @param invokeTarget 目标字符串
|
||||
*
|
||||
* @return method方法相关参数列表
|
||||
*/
|
||||
public static List<Object[]> getMethodParams(String invokeTarget) {
|
||||
|
@ -133,7 +129,6 @@ public class JobInvokeUtil {
|
|||
* 获取参数类型
|
||||
*
|
||||
* @param methodParams 参数相关列表
|
||||
*
|
||||
* @return 参数类型列表
|
||||
*/
|
||||
public static Class<?>[] getMethodParamsType(List<Object[]> methodParams) {
|
||||
|
@ -150,7 +145,6 @@ public class JobInvokeUtil {
|
|||
* 获取参数值
|
||||
*
|
||||
* @param methodParams 参数相关列表
|
||||
*
|
||||
* @return 参数值列表
|
||||
*/
|
||||
public static Object[] getMethodParamsValue(List<Object[]> methodParams) {
|
||||
|
|
|
@ -19,7 +19,6 @@ public class ScheduleUtils {
|
|||
* 得到quartz任务类
|
||||
*
|
||||
* @param sysJob 执行计划
|
||||
*
|
||||
* @return 具体执行任务类
|
||||
*/
|
||||
private static Class<? extends Job> getQuartzJobClass(SysJob sysJob) {
|
||||
|
@ -104,7 +103,6 @@ public class ScheduleUtils {
|
|||
* 检查包名是否为白名单配置
|
||||
*
|
||||
* @param invokeTarget 目标字符串
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static boolean whiteList(String invokeTarget) {
|
||||
|
|
|
@ -14,7 +14,6 @@ public interface SysConfigMapper {
|
|||
* 查询参数配置信息
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
*
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
public SysConfig selectConfig(SysConfig config);
|
||||
|
@ -23,7 +22,6 @@ public interface SysConfigMapper {
|
|||
* 通过ID查询配置
|
||||
*
|
||||
* @param configId 参数ID
|
||||
*
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
public SysConfig selectConfigById(Long configId);
|
||||
|
@ -32,7 +30,6 @@ public interface SysConfigMapper {
|
|||
* 查询参数配置列表
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
*
|
||||
* @return 参数配置集合
|
||||
*/
|
||||
public List<SysConfig> selectConfigList(SysConfig config);
|
||||
|
@ -41,7 +38,6 @@ public interface SysConfigMapper {
|
|||
* 根据键名查询参数配置信息
|
||||
*
|
||||
* @param configKey 参数键名
|
||||
*
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
public SysConfig checkConfigKeyUnique(String configKey);
|
||||
|
@ -50,7 +46,6 @@ public interface SysConfigMapper {
|
|||
* 新增参数配置
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertConfig(SysConfig config);
|
||||
|
@ -59,7 +54,6 @@ public interface SysConfigMapper {
|
|||
* 修改参数配置
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateConfig(SysConfig config);
|
||||
|
@ -68,7 +62,6 @@ public interface SysConfigMapper {
|
|||
* 删除参数配置
|
||||
*
|
||||
* @param configId 参数ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteConfigById(Long configId);
|
||||
|
@ -77,7 +70,6 @@ public interface SysConfigMapper {
|
|||
* 批量删除参数信息
|
||||
*
|
||||
* @param configIds 需要删除的参数ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteConfigByIds(Long[] configIds);
|
||||
|
|
|
@ -15,7 +15,6 @@ public interface SysDeptMapper {
|
|||
* 查询部门管理数据
|
||||
*
|
||||
* @param dept 部门信息
|
||||
*
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
public List<SysDept> selectDeptList(SysDept dept);
|
||||
|
@ -25,7 +24,6 @@ public interface SysDeptMapper {
|
|||
*
|
||||
* @param roleId 角色ID
|
||||
* @param deptCheckStrictly 部门树选择项是否关联显示
|
||||
*
|
||||
* @return 选中部门列表
|
||||
*/
|
||||
public List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
|
||||
|
@ -34,7 +32,6 @@ public interface SysDeptMapper {
|
|||
* 根据部门ID查询信息
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
*
|
||||
* @return 部门信息
|
||||
*/
|
||||
public SysDept selectDeptById(Long deptId);
|
||||
|
@ -43,7 +40,6 @@ public interface SysDeptMapper {
|
|||
* 根据ID查询所有子部门
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
*
|
||||
* @return 部门列表
|
||||
*/
|
||||
public List<SysDept> selectChildrenDeptById(Long deptId);
|
||||
|
@ -52,7 +48,6 @@ public interface SysDeptMapper {
|
|||
* 根据ID查询所有子部门(正常状态)
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
*
|
||||
* @return 子部门数
|
||||
*/
|
||||
public int selectNormalChildrenDeptById(Long deptId);
|
||||
|
@ -61,7 +56,6 @@ public interface SysDeptMapper {
|
|||
* 是否存在子节点
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int hasChildByDeptId(Long deptId);
|
||||
|
@ -70,7 +64,6 @@ public interface SysDeptMapper {
|
|||
* 查询部门是否存在用户
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int checkDeptExistUser(Long deptId);
|
||||
|
@ -80,7 +73,6 @@ public interface SysDeptMapper {
|
|||
*
|
||||
* @param deptName 部门名称
|
||||
* @param parentId 父部门ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
|
||||
|
@ -89,7 +81,6 @@ public interface SysDeptMapper {
|
|||
* 新增部门信息
|
||||
*
|
||||
* @param dept 部门信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDept(SysDept dept);
|
||||
|
@ -98,7 +89,6 @@ public interface SysDeptMapper {
|
|||
* 修改部门信息
|
||||
*
|
||||
* @param dept 部门信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDept(SysDept dept);
|
||||
|
@ -114,7 +104,6 @@ public interface SysDeptMapper {
|
|||
* 修改子元素关系
|
||||
*
|
||||
* @param depts 子元素
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeptChildren(@Param("depts") List<SysDept> depts);
|
||||
|
@ -123,7 +112,6 @@ public interface SysDeptMapper {
|
|||
* 删除部门管理信息
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeptById(Long deptId);
|
||||
|
|
|
@ -15,7 +15,6 @@ public interface SysDictDataMapper {
|
|||
* 根据条件分页查询字典数据
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
*
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataList(SysDictData dictData);
|
||||
|
@ -24,7 +23,6 @@ public interface SysDictDataMapper {
|
|||
* 根据字典类型查询字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
*
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataByType(String dictType);
|
||||
|
@ -34,7 +32,6 @@ public interface SysDictDataMapper {
|
|||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典键值
|
||||
*
|
||||
* @return 字典标签
|
||||
*/
|
||||
public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue);
|
||||
|
@ -43,7 +40,6 @@ public interface SysDictDataMapper {
|
|||
* 根据字典数据ID查询信息
|
||||
*
|
||||
* @param dictCode 字典数据ID
|
||||
*
|
||||
* @return 字典数据
|
||||
*/
|
||||
public SysDictData selectDictDataById(Long dictCode);
|
||||
|
@ -52,7 +48,6 @@ public interface SysDictDataMapper {
|
|||
* 查询字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
*
|
||||
* @return 字典数据
|
||||
*/
|
||||
public int countDictDataByType(String dictType);
|
||||
|
@ -61,7 +56,6 @@ public interface SysDictDataMapper {
|
|||
* 通过字典ID删除字典数据信息
|
||||
*
|
||||
* @param dictCode 字典数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictDataById(Long dictCode);
|
||||
|
@ -70,7 +64,6 @@ public interface SysDictDataMapper {
|
|||
* 批量删除字典数据信息
|
||||
*
|
||||
* @param dictCodes 需要删除的字典数据ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictDataByIds(Long[] dictCodes);
|
||||
|
@ -79,7 +72,6 @@ public interface SysDictDataMapper {
|
|||
* 新增字典数据信息
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictData(SysDictData dictData);
|
||||
|
@ -88,7 +80,6 @@ public interface SysDictDataMapper {
|
|||
* 修改字典数据信息
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictData(SysDictData dictData);
|
||||
|
@ -98,7 +89,6 @@ public interface SysDictDataMapper {
|
|||
*
|
||||
* @param oldDictType 旧字典类型
|
||||
* @param newDictType 新旧字典类型
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
|
||||
|
|
|
@ -14,7 +14,6 @@ public interface SysDictTypeMapper {
|
|||
* 根据条件分页查询字典类型
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
*
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
|
@ -30,7 +29,6 @@ public interface SysDictTypeMapper {
|
|||
* 根据字典类型ID查询信息
|
||||
*
|
||||
* @param dictId 字典类型ID
|
||||
*
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeById(Long dictId);
|
||||
|
@ -39,7 +37,6 @@ public interface SysDictTypeMapper {
|
|||
* 根据字典类型查询信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
*
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeByType(String dictType);
|
||||
|
@ -48,7 +45,6 @@ public interface SysDictTypeMapper {
|
|||
* 通过字典ID删除字典信息
|
||||
*
|
||||
* @param dictId 字典ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictTypeById(Long dictId);
|
||||
|
@ -57,7 +53,6 @@ public interface SysDictTypeMapper {
|
|||
* 批量删除字典类型信息
|
||||
*
|
||||
* @param dictIds 需要删除的字典ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictTypeByIds(Long[] dictIds);
|
||||
|
@ -66,7 +61,6 @@ public interface SysDictTypeMapper {
|
|||
* 新增字典类型信息
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictType(SysDictType dictType);
|
||||
|
@ -75,7 +69,6 @@ public interface SysDictTypeMapper {
|
|||
* 修改字典类型信息
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictType(SysDictType dictType);
|
||||
|
@ -84,7 +77,6 @@ public interface SysDictTypeMapper {
|
|||
* 校验字典类型称是否唯一
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public SysDictType checkDictTypeUnique(String dictType);
|
||||
|
|
|
@ -21,7 +21,6 @@ public interface SysLogininforMapper {
|
|||
* 查询系统登录日志集合
|
||||
*
|
||||
* @param logininfor 访问日志对象
|
||||
*
|
||||
* @return 登录记录集合
|
||||
*/
|
||||
public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
|
||||
|
@ -30,7 +29,6 @@ public interface SysLogininforMapper {
|
|||
* 批量删除系统登录日志
|
||||
*
|
||||
* @param infoIds 需要删除的登录日志ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLogininforByIds(Long[] infoIds);
|
||||
|
|
|
@ -15,7 +15,6 @@ public interface SysMenuMapper {
|
|||
* 查询系统菜单列表
|
||||
*
|
||||
* @param menu 菜单信息
|
||||
*
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<SysMenu> selectMenuList(SysMenu menu);
|
||||
|
@ -31,7 +30,6 @@ public interface SysMenuMapper {
|
|||
* 根据用户查询系统菜单列表
|
||||
*
|
||||
* @param menu 菜单信息
|
||||
*
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<SysMenu> selectMenuListByUserId(SysMenu menu);
|
||||
|
@ -40,7 +38,6 @@ public interface SysMenuMapper {
|
|||
* 根据角色ID查询权限
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
*
|
||||
* @return 权限列表
|
||||
*/
|
||||
public List<String> selectMenuPermsByRoleId(Long roleId);
|
||||
|
@ -49,7 +46,6 @@ public interface SysMenuMapper {
|
|||
* 根据用户ID查询权限
|
||||
*
|
||||
* @param userId 用户ID
|
||||
*
|
||||
* @return 权限列表
|
||||
*/
|
||||
public List<String> selectMenuPermsByUserId(Long userId);
|
||||
|
@ -65,7 +61,6 @@ public interface SysMenuMapper {
|
|||
* 根据用户ID查询菜单
|
||||
*
|
||||
* @param userId 用户ID
|
||||
*
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<SysMenu> selectMenuTreeByUserId(Long userId);
|
||||
|
@ -75,7 +70,6 @@ public interface SysMenuMapper {
|
|||
*
|
||||
* @param roleId 角色ID
|
||||
* @param menuCheckStrictly 菜单树选择项是否关联显示
|
||||
*
|
||||
* @return 选中菜单列表
|
||||
*/
|
||||
public List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
|
||||
|
@ -84,7 +78,6 @@ public interface SysMenuMapper {
|
|||
* 根据菜单ID查询信息
|
||||
*
|
||||
* @param menuId 菜单ID
|
||||
*
|
||||
* @return 菜单信息
|
||||
*/
|
||||
public SysMenu selectMenuById(Long menuId);
|
||||
|
@ -93,7 +86,6 @@ public interface SysMenuMapper {
|
|||
* 是否存在菜单子节点
|
||||
*
|
||||
* @param menuId 菜单ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int hasChildByMenuId(Long menuId);
|
||||
|
@ -102,7 +94,6 @@ public interface SysMenuMapper {
|
|||
* 新增菜单信息
|
||||
*
|
||||
* @param menu 菜单信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMenu(SysMenu menu);
|
||||
|
@ -111,7 +102,6 @@ public interface SysMenuMapper {
|
|||
* 修改菜单信息
|
||||
*
|
||||
* @param menu 菜单信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMenu(SysMenu menu);
|
||||
|
@ -120,7 +110,6 @@ public interface SysMenuMapper {
|
|||
* 删除菜单管理信息
|
||||
*
|
||||
* @param menuId 菜单ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMenuById(Long menuId);
|
||||
|
@ -130,7 +119,6 @@ public interface SysMenuMapper {
|
|||
*
|
||||
* @param menuName 菜单名称
|
||||
* @param parentId 父菜单ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId);
|
||||
|
|
|
@ -14,7 +14,6 @@ public interface SysNoticeMapper {
|
|||
* 查询公告信息
|
||||
*
|
||||
* @param noticeId 公告ID
|
||||
*
|
||||
* @return 公告信息
|
||||
*/
|
||||
public SysNotice selectNoticeById(Long noticeId);
|
||||
|
@ -23,7 +22,6 @@ public interface SysNoticeMapper {
|
|||
* 查询公告列表
|
||||
*
|
||||
* @param notice 公告信息
|
||||
*
|
||||
* @return 公告集合
|
||||
*/
|
||||
public List<SysNotice> selectNoticeList(SysNotice notice);
|
||||
|
@ -32,7 +30,6 @@ public interface SysNoticeMapper {
|
|||
* 新增公告
|
||||
*
|
||||
* @param notice 公告信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNotice(SysNotice notice);
|
||||
|
@ -41,7 +38,6 @@ public interface SysNoticeMapper {
|
|||
* 修改公告
|
||||
*
|
||||
* @param notice 公告信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNotice(SysNotice notice);
|
||||
|
@ -50,7 +46,6 @@ public interface SysNoticeMapper {
|
|||
* 批量删除公告
|
||||
*
|
||||
* @param noticeId 公告ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNoticeById(Long noticeId);
|
||||
|
@ -59,7 +54,6 @@ public interface SysNoticeMapper {
|
|||
* 批量删除公告信息
|
||||
*
|
||||
* @param noticeIds 需要删除的公告ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNoticeByIds(Long[] noticeIds);
|
||||
|
|
|
@ -21,7 +21,6 @@ public interface SysOperLogMapper {
|
|||
* 查询系统操作日志集合
|
||||
*
|
||||
* @param operLog 操作日志对象
|
||||
*
|
||||
* @return 操作日志集合
|
||||
*/
|
||||
public List<SysOperLog> selectOperLogList(SysOperLog operLog);
|
||||
|
@ -30,7 +29,6 @@ public interface SysOperLogMapper {
|
|||
* 批量删除系统操作日志
|
||||
*
|
||||
* @param operIds 需要删除的操作日志ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOperLogByIds(Long[] operIds);
|
||||
|
@ -39,7 +37,6 @@ public interface SysOperLogMapper {
|
|||
* 查询操作日志详细
|
||||
*
|
||||
* @param operId 操作ID
|
||||
*
|
||||
* @return 操作日志对象
|
||||
*/
|
||||
public SysOperLog selectOperLogById(Long operId);
|
||||
|
|
|
@ -14,7 +14,6 @@ public interface SysPostMapper {
|
|||
* 查询岗位数据集合
|
||||
*
|
||||
* @param post 岗位信息
|
||||
*
|
||||
* @return 岗位数据集合
|
||||
*/
|
||||
public List<SysPost> selectPostList(SysPost post);
|
||||
|
@ -30,7 +29,6 @@ public interface SysPostMapper {
|
|||
* 通过岗位ID查询岗位信息
|
||||
*
|
||||
* @param postId 岗位ID
|
||||
*
|
||||
* @return 角色对象信息
|
||||
*/
|
||||
public SysPost selectPostById(Long postId);
|
||||
|
@ -39,7 +37,6 @@ public interface SysPostMapper {
|
|||
* 根据用户ID获取岗位选择框列表
|
||||
*
|
||||
* @param userId 用户ID
|
||||
*
|
||||
* @return 选中岗位ID列表
|
||||
*/
|
||||
public List<Long> selectPostListByUserId(Long userId);
|
||||
|
@ -48,7 +45,6 @@ public interface SysPostMapper {
|
|||
* 查询用户所属岗位组
|
||||
*
|
||||
* @param userName 用户名
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public List<SysPost> selectPostsByUserName(String userName);
|
||||
|
@ -57,7 +53,6 @@ public interface SysPostMapper {
|
|||
* 删除岗位信息
|
||||
*
|
||||
* @param postId 岗位ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePostById(Long postId);
|
||||
|
@ -66,7 +61,6 @@ public interface SysPostMapper {
|
|||
* 批量删除岗位信息
|
||||
*
|
||||
* @param postIds 需要删除的岗位ID
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePostByIds(Long[] postIds);
|
||||
|
@ -75,7 +69,6 @@ public interface SysPostMapper {
|
|||
* 修改岗位信息
|
||||
*
|
||||
* @param post 岗位信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePost(SysPost post);
|
||||
|
@ -84,7 +77,6 @@ public interface SysPostMapper {
|
|||
* 新增岗位信息
|
||||
*
|
||||
* @param post 岗位信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPost(SysPost post);
|
||||
|
@ -93,7 +85,6 @@ public interface SysPostMapper {
|
|||
* 校验岗位名称
|
||||
*
|
||||
* @param postName 岗位名称
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public SysPost checkPostNameUnique(String postName);
|
||||
|
@ -102,7 +93,6 @@ public interface SysPostMapper {
|
|||
* 校验岗位编码
|
||||
*
|
||||
* @param postCode 岗位编码
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public SysPost checkPostCodeUnique(String postCode);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue