Skip to content

Commit

Permalink
Merge pull request #131 from 201206030/develop_xxy
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
201206030 authored May 28, 2024
2 parents b61dc4d + 48a70c2 commit a486199
Show file tree
Hide file tree
Showing 96 changed files with 2,577 additions and 1,616 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ novel-plus -- 父工程

## 演示视频

https://www.bilibili.com/video/BV1Zo4y187Mi
https://www.bilibili.com/video/BV18e41197xs

## 增值服务

Expand Down
3 changes: 3 additions & 0 deletions doc/sql/20240512.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
update crawl_source
set crawl_rule = replace(crawl_rule, 'ibiquge.net', 'ibiquzw.org')
where id = 16;
535 changes: 321 additions & 214 deletions doc/sql/novel_plus.sql

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion novel-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.java2nb</groupId>
<artifactId>novel-admin</artifactId>
<version>4.3.0-RC1</version>
<version>4.3.0</version>
<packaging>jar</packaging>

<name>novel-admin</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;
Expand Down Expand Up @@ -83,7 +84,7 @@ String detail(@PathVariable("id") Integer id, Model model) {
@ResponseBody
@PostMapping("/save")
@RequiresPermissions("novel:friendLink:add")
public R save(FriendLinkDO friendLink) {
public R save(@Validated FriendLinkDO friendLink) {
if (friendLinkService.save(friendLink) > 0) {
redisTemplate.delete(CacheKey.INDEX_LINK_KEY);
return R.ok();
Expand All @@ -98,7 +99,7 @@ public R save(FriendLinkDO friendLink) {
@ResponseBody
@RequestMapping("/update")
@RequiresPermissions("novel:friendLink:edit")
public R update(FriendLinkDO friendLink) {
public R update(@Validated FriendLinkDO friendLink) {
friendLinkService.update(friendLink);
redisTemplate.delete(CacheKey.INDEX_LINK_KEY);
return R.ok();
Expand Down
308 changes: 160 additions & 148 deletions novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
Original file line number Diff line number Diff line change
@@ -1,163 +1,175 @@
package com.java2nb.novel.domain;

import java.io.Serializable;


import java.math.BigDecimal;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.java2nb.common.jsonserializer.LongToStringSerializer;


import org.hibernate.validator.constraints.URL;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

import java.io.Serializable;
import java.util.Date;


/**
*
*
* @author xiongxy
* @email [email protected]
* @date 2023-04-14 15:12:25
*/
public class FriendLinkDO implements Serializable {
private static final long serialVersionUID = 1L;


//主键
private Integer id;
//链接名
private String linkName;
//链接url
private String linkUrl;
//排序号
private Integer sort;
//是否开启,0:不开启,1:开启
private Integer isOpen;
//创建人id
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long createUserId;
//创建时间
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
//更新者用户id
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long updateUserId;
//更新时间
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;

/**
* 设置:主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:主键
*/
public Integer getId() {
return id;
}
/**
* 设置:链接名
*/
public void setLinkName(String linkName) {
this.linkName = linkName;
}
/**
* 获取:链接名
*/
public String getLinkName() {
return linkName;
}
/**
* 设置:链接url
*/
public void setLinkUrl(String linkUrl) {
this.linkUrl = linkUrl;
}
/**
* 获取:链接url
*/
public String getLinkUrl() {
return linkUrl;
}
/**
* 设置:排序号
*/
public void setSort(Integer sort) {
this.sort = sort;
}
/**
* 获取:排序号
*/
public Integer getSort() {
return sort;
}
/**
* 设置:是否开启,0:不开启,1:开启
*/
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}
/**
* 获取:是否开启,0:不开启,1:开启
*/
public Integer getIsOpen() {
return isOpen;
}
/**
* 设置:创建人id
*/
public void setCreateUserId(Long createUserId) {
this.createUserId = createUserId;
}
/**
* 获取:创建人id
*/
public Long getCreateUserId() {
return createUserId;
}
/**
* 设置:创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置:更新者用户id
*/
public void setUpdateUserId(Long updateUserId) {
this.updateUserId = updateUserId;
}
/**
* 获取:更新者用户id
*/
public Long getUpdateUserId() {
return updateUserId;
}
/**
* 设置:更新时间
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* 获取:更新时间
*/
public Date getUpdateTime() {
return updateTime;
}

private static final long serialVersionUID = 1L;


//主键
private Integer id;
//链接名
private String linkName;
//链接url
@URL
private String linkUrl;
//排序号
private Integer sort;
//是否开启,0:不开启,1:开启
private Integer isOpen;
//创建人id
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long createUserId;
//创建时间
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
//更新者用户id
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long updateUserId;
//更新时间
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;

/**
* 设置:主键
*/
public void setId(Integer id) {
this.id = id;
}

/**
* 获取:主键
*/
public Integer getId() {
return id;
}

/**
* 设置:链接名
*/
public void setLinkName(String linkName) {
this.linkName = linkName;
}

/**
* 获取:链接名
*/
public String getLinkName() {
return linkName;
}

/**
* 设置:链接url
*/
public void setLinkUrl(String linkUrl) {
this.linkUrl = linkUrl;
}

/**
* 获取:链接url
*/
public String getLinkUrl() {
return linkUrl;
}

/**
* 设置:排序号
*/
public void setSort(Integer sort) {
this.sort = sort;
}

/**
* 获取:排序号
*/
public Integer getSort() {
return sort;
}

/**
* 设置:是否开启,0:不开启,1:开启
*/
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}

/**
* 获取:是否开启,0:不开启,1:开启
*/
public Integer getIsOpen() {
return isOpen;
}

/**
* 设置:创建人id
*/
public void setCreateUserId(Long createUserId) {
this.createUserId = createUserId;
}

/**
* 获取:创建人id
*/
public Long getCreateUserId() {
return createUserId;
}

/**
* 设置:创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}

/**
* 获取:创建时间
*/
public Date getCreateTime() {
return createTime;
}

/**
* 设置:更新者用户id
*/
public void setUpdateUserId(Long updateUserId) {
this.updateUserId = updateUserId;
}

/**
* 获取:更新者用户id
*/
public Long getUpdateUserId() {
return updateUserId;
}

/**
* 设置:更新时间
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}

/**
* 获取:更新时间
*/
public Date getUpdateTime() {
return updateTime;
}
}
7 changes: 4 additions & 3 deletions novel-admin/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ spring:
profiles:
active: dev

#上传文件的最大值(10M
#上传文件的最大值(100M
servlet:
multipart:
max-file-size: 10485760

max-file-size: 100MB
max-request-size: 100MB

devtools:
restart:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="col-sm-8">
<input id="linkUrl" name="linkUrl"
class="form-control"
type="text" required>
type="url" required>

</div>
</div>
Expand Down
Loading

0 comments on commit a486199

Please sign in to comment.