update 统一代码间隔符
This commit is contained in:
parent
fc8c96399f
commit
26fc652d33
@ -30,7 +30,7 @@ public interface BaseMapperPlus<T> extends BaseMapper<T> {
|
|||||||
/**
|
/**
|
||||||
* 根据 ID 查询
|
* 根据 ID 查询
|
||||||
*/
|
*/
|
||||||
default <V> V selectVoById(Serializable id, Class<V> voClass){
|
default <V> V selectVoById(Serializable id, Class<V> voClass) {
|
||||||
T obj = this.selectById(id);
|
T obj = this.selectById(id);
|
||||||
if (ObjectUtil.isNull(obj)) {
|
if (ObjectUtil.isNull(obj)) {
|
||||||
return null;
|
return null;
|
||||||
@ -41,7 +41,7 @@ public interface BaseMapperPlus<T> extends BaseMapper<T> {
|
|||||||
/**
|
/**
|
||||||
* 查询(根据ID 批量查询)
|
* 查询(根据ID 批量查询)
|
||||||
*/
|
*/
|
||||||
default <V> List<V> selectVoBatchIds(Collection<? extends Serializable> idList, Class<V> voClass){
|
default <V> List<V> selectVoBatchIds(Collection<? extends Serializable> idList, Class<V> voClass) {
|
||||||
List<T> list = this.selectBatchIds(idList);
|
List<T> list = this.selectBatchIds(idList);
|
||||||
if (CollUtil.isEmpty(list)) {
|
if (CollUtil.isEmpty(list)) {
|
||||||
return CollUtil.newArrayList();
|
return CollUtil.newArrayList();
|
||||||
@ -52,7 +52,7 @@ public interface BaseMapperPlus<T> extends BaseMapper<T> {
|
|||||||
/**
|
/**
|
||||||
* 查询(根据 columnMap 条件)
|
* 查询(根据 columnMap 条件)
|
||||||
*/
|
*/
|
||||||
default <V> List<V> selectVoByMap(Map<String, Object> map, Class<V> voClass){
|
default <V> List<V> selectVoByMap(Map<String, Object> map, Class<V> voClass) {
|
||||||
List<T> list = this.selectByMap(map);
|
List<T> list = this.selectByMap(map);
|
||||||
if (CollUtil.isEmpty(list)) {
|
if (CollUtil.isEmpty(list)) {
|
||||||
return CollUtil.newArrayList();
|
return CollUtil.newArrayList();
|
||||||
|
@ -30,7 +30,7 @@ public class TestI18nController {
|
|||||||
/**
|
/**
|
||||||
* 通过code获取国际化内容
|
* 通过code获取国际化内容
|
||||||
* code为 messages.properties 中的 key
|
* code为 messages.properties 中的 key
|
||||||
*
|
* <p>
|
||||||
* 测试使用 user.register.success
|
* 测试使用 user.register.success
|
||||||
*/
|
*/
|
||||||
@ApiOperation("通过code获取国际化内容")
|
@ApiOperation("通过code获取国际化内容")
|
||||||
@ -42,7 +42,7 @@ public class TestI18nController {
|
|||||||
/**
|
/**
|
||||||
* Validator 校验国际化
|
* Validator 校验国际化
|
||||||
* 不传值 分别查看异常返回
|
* 不传值 分别查看异常返回
|
||||||
*
|
* <p>
|
||||||
* 测试使用 not.null
|
* 测试使用 not.null
|
||||||
*/
|
*/
|
||||||
@ApiOperation("Validator 校验国际化")
|
@ApiOperation("Validator 校验国际化")
|
||||||
@ -54,7 +54,7 @@ public class TestI18nController {
|
|||||||
/**
|
/**
|
||||||
* Bean 校验国际化
|
* Bean 校验国际化
|
||||||
* 不传值 分别查看异常返回
|
* 不传值 分别查看异常返回
|
||||||
*
|
* <p>
|
||||||
* 测试使用 not.null
|
* 测试使用 not.null
|
||||||
*/
|
*/
|
||||||
@ApiOperation("Bean 校验国际化")
|
@ApiOperation("Bean 校验国际化")
|
||||||
|
@ -18,7 +18,7 @@ import lombok.experimental.Accessors;
|
|||||||
@TableName("test_demo")
|
@TableName("test_demo")
|
||||||
public class TestDemo extends BaseEntity {
|
public class TestDemo extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID=1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,7 +21,7 @@ import lombok.experimental.Accessors;
|
|||||||
@TableName("test_tree")
|
@TableName("test_tree")
|
||||||
public class TestTree extends TreeEntity {
|
public class TestTree extends TreeEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID=1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,42 +27,42 @@ public class TestDemoBo extends BaseEntity {
|
|||||||
* 主键
|
* 主键
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("主键")
|
@ApiModelProperty("主键")
|
||||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("部门id")
|
@ApiModelProperty("部门id")
|
||||||
@NotNull(message = "部门id不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("用户id")
|
@ApiModelProperty("用户id")
|
||||||
@NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotNull(message = "用户id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序号
|
* 排序号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("排序号")
|
@ApiModelProperty("排序号")
|
||||||
@NotNull(message = "排序号不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotNull(message = "排序号不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private Long orderNum;
|
private Long orderNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* key键
|
* key键
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("key键")
|
@ApiModelProperty("key键")
|
||||||
@NotBlank(message = "key键不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotBlank(message = "key键不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private String testKey;
|
private String testKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 值
|
* 值
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("值")
|
@ApiModelProperty("值")
|
||||||
@NotBlank(message = "值不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotBlank(message = "值不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,28 +27,28 @@ public class TestTreeBo extends TreeEntity {
|
|||||||
* 主键
|
* 主键
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("主键")
|
@ApiModelProperty("主键")
|
||||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("部门id")
|
@ApiModelProperty("部门id")
|
||||||
@NotNull(message = "部门id不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("用户id")
|
@ApiModelProperty("用户id")
|
||||||
@NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotNull(message = "用户id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 树节点名
|
* 树节点名
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("树节点名")
|
@ApiModelProperty("树节点名")
|
||||||
@NotBlank(message = "树节点名不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotBlank(message = "树节点名不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private String treeName;
|
private String treeName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ import lombok.Data;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 测试单表视图对象 test_demo
|
* 测试单表视图对象 test_demo
|
||||||
*
|
*
|
||||||
|
@ -9,7 +9,6 @@ import lombok.Data;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 测试树表视图对象 test_tree
|
* 测试树表视图对象 test_tree
|
||||||
*
|
*
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.ruoyi.demo.service;
|
package com.ruoyi.demo.service;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.ruoyi.demo.domain.TestDemo;
|
|
||||||
import com.ruoyi.demo.domain.vo.TestDemoVo;
|
|
||||||
import com.ruoyi.demo.domain.bo.TestDemoBo;
|
|
||||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.demo.domain.TestDemo;
|
||||||
|
import com.ruoyi.demo.domain.bo.TestDemoBo;
|
||||||
|
import com.ruoyi.demo.domain.vo.TestDemoVo;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -20,6 +20,7 @@ public interface ITestDemoService extends IServicePlus<TestDemo, TestDemoVo> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询单个
|
* 查询单个
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
TestDemoVo queryById(Long id);
|
TestDemoVo queryById(Long id);
|
||||||
@ -41,6 +42,7 @@ public interface ITestDemoService extends IServicePlus<TestDemo, TestDemoVo> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据新增业务对象插入测试单表
|
* 根据新增业务对象插入测试单表
|
||||||
|
*
|
||||||
* @param bo 测试单表新增业务对象
|
* @param bo 测试单表新增业务对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -48,6 +50,7 @@ public interface ITestDemoService extends IServicePlus<TestDemo, TestDemoVo> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据编辑业务对象修改测试单表
|
* 根据编辑业务对象修改测试单表
|
||||||
|
*
|
||||||
* @param bo 测试单表编辑业务对象
|
* @param bo 测试单表编辑业务对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -55,6 +58,7 @@ public interface ITestDemoService extends IServicePlus<TestDemo, TestDemoVo> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验并删除数据
|
* 校验并删除数据
|
||||||
|
*
|
||||||
* @param ids 主键集合
|
* @param ids 主键集合
|
||||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||||
* @return
|
* @return
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.ruoyi.demo.service;
|
package com.ruoyi.demo.service;
|
||||||
|
|
||||||
import com.ruoyi.demo.domain.TestTree;
|
|
||||||
import com.ruoyi.demo.domain.vo.TestTreeVo;
|
|
||||||
import com.ruoyi.demo.domain.bo.TestTreeBo;
|
|
||||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||||
|
import com.ruoyi.demo.domain.TestTree;
|
||||||
|
import com.ruoyi.demo.domain.bo.TestTreeBo;
|
||||||
|
import com.ruoyi.demo.domain.vo.TestTreeVo;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -17,6 +17,7 @@ import java.util.List;
|
|||||||
public interface ITestTreeService extends IServicePlus<TestTree, TestTreeVo> {
|
public interface ITestTreeService extends IServicePlus<TestTree, TestTreeVo> {
|
||||||
/**
|
/**
|
||||||
* 查询单个
|
* 查询单个
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
TestTreeVo queryById(Long id);
|
TestTreeVo queryById(Long id);
|
||||||
@ -28,6 +29,7 @@ public interface ITestTreeService extends IServicePlus<TestTree, TestTreeVo> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据新增业务对象插入测试树表
|
* 根据新增业务对象插入测试树表
|
||||||
|
*
|
||||||
* @param bo 测试树表新增业务对象
|
* @param bo 测试树表新增业务对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -35,6 +37,7 @@ public interface ITestTreeService extends IServicePlus<TestTree, TestTreeVo> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据编辑业务对象修改测试树表
|
* 根据编辑业务对象修改测试树表
|
||||||
|
*
|
||||||
* @param bo 测试树表编辑业务对象
|
* @param bo 测试树表编辑业务对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -42,6 +45,7 @@ public interface ITestTreeService extends IServicePlus<TestTree, TestTreeVo> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验并删除数据
|
* 校验并删除数据
|
||||||
|
*
|
||||||
* @param ids 主键集合
|
* @param ids 主键集合
|
||||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||||
* @return
|
* @return
|
||||||
|
@ -31,7 +31,7 @@ public class TestTreeServiceImpl extends ServicePlusImpl<TestTreeMapper, TestTre
|
|||||||
return getVoById(id);
|
return getVoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @DS("slave") // 切换从库查询
|
// @DS("slave") // 切换从库查询
|
||||||
@Override
|
@Override
|
||||||
public List<TestTreeVo> queryList(TestTreeBo bo) {
|
public List<TestTreeVo> queryList(TestTreeBo bo) {
|
||||||
LambdaQueryWrapper<TestTree> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<TestTree> lqw = buildQueryWrapper(bo);
|
||||||
|
@ -13,7 +13,7 @@ public class MonitorAdminApplication {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(MonitorAdminApplication.class, args);
|
SpringApplication.run(MonitorAdminApplication.class, args);
|
||||||
System.out.println("Admin 监控启动成功" );
|
System.out.println("Admin 监控启动成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,11 +21,10 @@ public class DruidConfig {
|
|||||||
/**
|
/**
|
||||||
* 去除监控页面底部的广告
|
* 去除监控页面底部的广告
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnProperty(name = "spring.datasource.druid.statViewServlet.enabled", havingValue = "true")
|
@ConditionalOnProperty(name = "spring.datasource.druid.statViewServlet.enabled", havingValue = "true")
|
||||||
public FilterRegistrationBean removeDruidFilterRegistrationBean(DruidStatProperties properties)
|
public FilterRegistrationBean removeDruidFilterRegistrationBean(DruidStatProperties properties) {
|
||||||
{
|
|
||||||
// 获取web监控页面的参数
|
// 获取web监控页面的参数
|
||||||
DruidStatProperties.StatViewServlet config = properties.getStatViewServlet();
|
DruidStatProperties.StatViewServlet config = properties.getStatViewServlet();
|
||||||
// 提取common.js的配置路径
|
// 提取common.js的配置路径
|
||||||
@ -33,16 +32,14 @@ public class DruidConfig {
|
|||||||
String commonJsPattern = pattern.replaceAll("\\*", "js/common.js");
|
String commonJsPattern = pattern.replaceAll("\\*", "js/common.js");
|
||||||
final String filePath = "support/http/resources/js/common.js";
|
final String filePath = "support/http/resources/js/common.js";
|
||||||
// 创建filter进行过滤
|
// 创建filter进行过滤
|
||||||
Filter filter = new Filter()
|
Filter filter = new Filter() {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public void init(javax.servlet.FilterConfig filterConfig) throws ServletException
|
public void init(javax.servlet.FilterConfig filterConfig) throws ServletException {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
||||||
throws IOException, ServletException
|
throws IOException, ServletException {
|
||||||
{
|
|
||||||
chain.doFilter(request, response);
|
chain.doFilter(request, response);
|
||||||
// 重置缓冲区,响应头不会被重置
|
// 重置缓冲区,响应头不会被重置
|
||||||
// response.resetBuffer();
|
// response.resetBuffer();
|
||||||
@ -53,9 +50,9 @@ public class DruidConfig {
|
|||||||
text = text.replaceAll("powered.*?shrek.wang</a>", "");
|
text = text.replaceAll("powered.*?shrek.wang</a>", "");
|
||||||
response.getWriter().write(text);
|
response.getWriter().write(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy()
|
public void destroy() {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
|
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
|
||||||
|
@ -426,9 +426,8 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String innerLinkReplaceEach(String path)
|
public String innerLinkReplaceEach(String path) {
|
||||||
{
|
return StringUtils.replaceEach(path, new String[]{Constants.HTTP, Constants.HTTPS},
|
||||||
return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS },
|
new String[]{"", ""});
|
||||||
new String[] { "", "" });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user