book单表
parent
11871c4b02
commit
a5f16646d4
|
@ -52,6 +52,7 @@
|
||||||
<artifactId>muyu-common-security</artifactId>
|
<artifactId>muyu-common-security</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -88,6 +88,12 @@
|
||||||
<version>${swagger.fox.version}</version>
|
<version>${swagger.fox.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.csp</groupId>
|
||||||
|
<artifactId>sentinel-core</artifactId>
|
||||||
|
<version>1.8.7</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -28,7 +28,7 @@ spring:
|
||||||
eager: true
|
eager: true
|
||||||
transport:
|
transport:
|
||||||
# 控制台地址
|
# 控制台地址
|
||||||
dashboard: 43.142.100.73:8718
|
dashboard: 43.142.100.73:8719
|
||||||
# nacos配置持久化
|
# nacos配置持久化
|
||||||
datasource:
|
datasource:
|
||||||
ds1:
|
ds1:
|
||||||
|
|
|
@ -78,6 +78,16 @@
|
||||||
<artifactId>muyu-common-swagger</artifactId>
|
<artifactId>muyu-common-swagger</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- sentinel流量监控-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.csp</groupId>
|
||||||
|
<artifactId>sentinel-core</artifactId>
|
||||||
|
<version>1.8.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.csp</groupId>
|
||||||
|
<artifactId>sentinel-annotation-aspectj</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -2,6 +2,10 @@ package com.muyu.system.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.alibaba.csp.sentinel.Entry;
|
||||||
|
import com.alibaba.csp.sentinel.SphU;
|
||||||
|
import com.alibaba.csp.sentinel.slots.block.BlockException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
@ -42,7 +46,6 @@ public class BookInfoController extends BaseController
|
||||||
public Result<TableDataInfo<BookInfo>> list(BookInfo bookInfo)
|
public Result<TableDataInfo<BookInfo>> list(BookInfo bookInfo)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
|
|
||||||
List<BookInfo> list = bookInfoService.selectBookInfoList(bookInfo);
|
List<BookInfo> list = bookInfoService.selectBookInfoList(bookInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.muyu.system.service.impl;
|
package com.muyu.system.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.csp.sentinel.EntryType;
|
||||||
|
import com.alibaba.csp.sentinel.annotation.SentinelResource;
|
||||||
import com.muyu.common.core.utils.DateUtils;
|
import com.muyu.common.core.utils.DateUtils;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.system.domain.BookInfo;
|
import com.muyu.system.domain.BookInfo;
|
||||||
|
@ -40,6 +42,7 @@ public class BookInfoServiceImpl implements IBookInfoService {
|
||||||
* @return bookInfo
|
* @return bookInfo
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@SentinelResource(value = "selectBookInfoList", entryType = EntryType.IN)
|
||||||
public List<BookInfo> selectBookInfoList(BookInfo bookInfo) {
|
public List<BookInfo> selectBookInfoList(BookInfo bookInfo) {
|
||||||
bookInfo.setCreateBy(SecurityUtils.getUsername());
|
bookInfo.setCreateBy(SecurityUtils.getUsername());
|
||||||
return bookInfoMapper.selectBookInfoList(bookInfo);
|
return bookInfoMapper.selectBookInfoList(bookInfo);
|
||||||
|
|
|
@ -30,10 +30,12 @@
|
||||||
<if test="author != null and author != ''"> and author = #{author}</if>
|
<if test="author != null and author != ''"> and author = #{author}</if>
|
||||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||||
<if test="images != null and images != ''"> and images = #{images}</if>
|
<if test="images != null and images != ''"> and images = #{images}</if>
|
||||||
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
<if test="createBy != null and createBy != '' and createBy != 'admin'"> and create_by = #{createBy}</if>
|
||||||
<if test="remak != null and remak != ''"> and remak = #{remak}</if>
|
<if test="remak != null and remak != ''"> and remak = #{remak}</if>
|
||||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||||
<if test="grounding != null and grounding != ''"> and grounding = #{grounding}</if>
|
<if test="grounding != null and grounding != ''"> and grounding = #{grounding}</if>
|
||||||
|
<if test="beginTime != null "> and grounding > #{beginTime}</if>
|
||||||
|
<if test="endTime != null "> and grounding lt; #{endTime}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue