新增 批量添加目录下书签数量 数量可以自定义
This commit is contained in:
@ -6,6 +6,7 @@ import com.ruoyi.bookmark.service.ISqBookmarkService;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.sun.org.apache.bcel.internal.generic.NEW;
|
||||
import org.junit.Test;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.Authentication;
|
||||
@ -155,6 +156,19 @@ public class SqMenuController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 批量更新书签的数量
|
||||
// */
|
||||
//
|
||||
// @RequestMapping("/bookmarkcount")
|
||||
// public void bookmarkcount()
|
||||
// {
|
||||
//
|
||||
// Long[] menuIds={1L,2L,3L};
|
||||
//
|
||||
// sqMenuService.updateCountAdd(menuIds,5);
|
||||
// logger.info("执行完毕");
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.ruoyi.web.test.controller;
|
||||
|
||||
|
||||
import com.ruoyi.bookmark.mapper.SqMenuMapper;
|
||||
import com.ruoyi.bookmark.service.impl.SqMenuServiceImpl;
|
||||
import com.ruoyi.web.controller.yunbookmark.SqBookmarkController;
|
||||
import org.assertj.core.api.Assertions;
|
||||
import org.junit.Before;
|
||||
@ -24,6 +26,8 @@ public class SqBookmarkTest extends BaseSpringBootTest{
|
||||
|
||||
@Autowired
|
||||
private SqBookmarkController sqBookmarkController;
|
||||
@Autowired
|
||||
private SqMenuMapper sqMenuMapper;
|
||||
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@ -32,14 +36,23 @@ public class SqBookmarkTest extends BaseSpringBootTest{
|
||||
mockMvc = MockMvcBuilders.standaloneSetup(sqBookmarkController).build();
|
||||
logger.info("setup().........");
|
||||
}
|
||||
// @Test
|
||||
// public void demo() throws Exception {
|
||||
// MvcResult mvcResult = mockMvc.perform(MockMvcRequestBuilders.get("/bookmark/bookmark/2"))
|
||||
// .andExpect(MockMvcResultMatchers.status().isOk())
|
||||
// .andDo(MockMvcResultHandlers.print())
|
||||
// .andReturn();
|
||||
//
|
||||
// logger.info(mvcResult.getResponse().getContentAsString());
|
||||
//
|
||||
// }
|
||||
@Test
|
||||
public void demo() throws Exception {
|
||||
MvcResult mvcResult = mockMvc.perform(MockMvcRequestBuilders.get("/bookmark/bookmark/2"))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk())
|
||||
.andDo(MockMvcResultHandlers.print())
|
||||
.andReturn();
|
||||
Long[] menuIds={1L,4L,6L};
|
||||
sqMenuMapper.updateCountAdd(menuIds,5);
|
||||
|
||||
logger.info("执行完毕");
|
||||
|
||||
logger.info(mvcResult.getResponse().getContentAsString());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,16 +6,16 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/dqsj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://localhost:3306/dqsj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
|
||||
username: root
|
||||
password: root
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
@ -35,7 +35,7 @@ spring:
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
webStatFilter:
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
statViewServlet:
|
||||
enabled: true
|
||||
@ -43,8 +43,8 @@ spring:
|
||||
allow:
|
||||
url-pattern: /druid/*
|
||||
# 控制台管理用户名和密码
|
||||
login-username:
|
||||
login-password:
|
||||
login-username:
|
||||
login-password:
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
@ -54,4 +54,4 @@ spring:
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
multi-statement-allow: true
|
||||
|
Reference in New Issue
Block a user