Skip to content

Commit 07e111c

Browse files
committed
更新
1 parent 2d4ce4e commit 07e111c

24 files changed

+1085
-21
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>bbs</groupId>
44
<artifactId>bbs</artifactId>
5-
<version>6.8</version>
5+
<version>6.9</version>
66
<packaging>war</packaging>
77
<name>bbs</name>
88
<description/>

src/main/java/cms/bean/question/Question.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ public class Question implements Serializable{
8787
/** 查看总数 **/
8888
private Long viewTotal = 0L;
8989

90+
/** 投票主题Id **/
91+
@Column(length=32)
92+
private String voteThemeId;
93+
9094
/** 用户名称 **/
9195
@Column(length=30)
9296
private String userName;
@@ -347,6 +351,16 @@ public String getMarkdownContent() {
347351
public void setMarkdownContent(String markdownContent) {
348352
this.markdownContent = markdownContent;
349353
}
354+
355+
356+
public String getVoteThemeId() {
357+
return voteThemeId;
358+
}
359+
360+
361+
public void setVoteThemeId(String voteThemeId) {
362+
this.voteThemeId = voteThemeId;
363+
}
350364

351365

352366
}

src/main/java/cms/bean/setting/SystemSetting.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,13 @@ public class SystemSetting implements Serializable{
214214
private Integer allowMentionMaxNumber = 30;
215215
/** 每用户每24小时内发送短信次数 **/
216216
private Integer userSentSmsCount = 10;
217+
218+
219+
/** 话题发起投票选项数量 空值为不限制 0为不允许发起投票 **/
220+
private Integer topicMaxVoteOptions = 0;
221+
/** 问答发起投票选项数量 空值为不限制 0为不允许发起投票 **/
222+
private Integer questionMaxVoteOptions = 0;
223+
217224
/** 话题编辑器标签 json **/
218225
@Lob
219226
private String topicEditorTag;
@@ -867,6 +874,22 @@ public void setAllowLoginAccountTypeCodeList(List<Integer> allowLoginAccountType
867874
this.allowLoginAccountTypeCodeList = allowLoginAccountTypeCodeList;
868875
}
869876

877+
public Integer getTopicMaxVoteOptions() {
878+
return topicMaxVoteOptions;
879+
}
880+
881+
public void setTopicMaxVoteOptions(Integer topicMaxVoteOptions) {
882+
this.topicMaxVoteOptions = topicMaxVoteOptions;
883+
}
884+
885+
public Integer getQuestionMaxVoteOptions() {
886+
return questionMaxVoteOptions;
887+
}
888+
889+
public void setQuestionMaxVoteOptions(Integer questionMaxVoteOptions) {
890+
this.questionMaxVoteOptions = questionMaxVoteOptions;
891+
}
892+
870893

871894

872895

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package cms.bean.template;
2+
3+
import java.io.Serializable;
4+
import java.util.LinkedHashMap;
5+
import java.util.Map;
6+
7+
/**
8+
* 版块---话题相关--话题精华
9+
*
10+
*/
11+
public class Forum_TopicRelated_TopicEssence implements Serializable{
12+
private static final long serialVersionUID = 5919976916881666241L;
13+
14+
/** 版块---话题相关--话题精华Id **/
15+
private String topicEssence_id;
16+
17+
/** 排序 **/
18+
private Integer topicEssence_sort;
19+
20+
/** 每页显示记录数 **/
21+
private Integer topicEssence_maxResult;
22+
/** 页码显示总数 **/
23+
private Integer topicEssence_pageCount;
24+
25+
public String getTopicEssence_id() {
26+
return topicEssence_id;
27+
}
28+
public void setTopicEssence_id(String topicEssence_id) {
29+
this.topicEssence_id = topicEssence_id;
30+
}
31+
public Integer getTopicEssence_sort() {
32+
return topicEssence_sort;
33+
}
34+
public void setTopicEssence_sort(Integer topicEssence_sort) {
35+
this.topicEssence_sort = topicEssence_sort;
36+
}
37+
public Integer getTopicEssence_maxResult() {
38+
return topicEssence_maxResult;
39+
}
40+
public void setTopicEssence_maxResult(Integer topicEssence_maxResult) {
41+
this.topicEssence_maxResult = topicEssence_maxResult;
42+
}
43+
public Integer getTopicEssence_pageCount() {
44+
return topicEssence_pageCount;
45+
}
46+
public void setTopicEssence_pageCount(Integer topicEssence_pageCount) {
47+
this.topicEssence_pageCount = topicEssence_pageCount;
48+
}
49+
50+
51+
52+
}

src/main/java/cms/bean/topic/Topic.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ public class Topic implements Serializable{
129129
/** 发红包Id **/
130130
@Column(length=32)
131131
private String giveRedEnvelopeId;
132+
/** 投票主题Id **/
133+
@Column(length=32)
134+
private String voteThemeId;
132135

133136
/** 是否为员工 true:员工 false:会员 **/
134137
private Boolean isStaff = false;
@@ -354,5 +357,11 @@ public String getTagIdGroup() {
354357
public void setTagIdGroup(String tagIdGroup) {
355358
this.tagIdGroup = tagIdGroup;
356359
}
360+
public String getVoteThemeId() {
361+
return voteThemeId;
362+
}
363+
public void setVoteThemeId(String voteThemeId) {
364+
this.voteThemeId = voteThemeId;
365+
}
357366

358367
}

src/main/java/cms/utils/Verification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class Verification {
3838
private static Pattern ZIP = Pattern.compile("^[0-9]{6}$");
3939

4040
/** 邮箱 **/
41-
private static Pattern EMAIL = Pattern.compile("^([a-zA-Z0-9]+[_|\\_|\\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\\_|\\.]?)*[a-zA-Z0-9]+\\.[a-zA-Z]{2,3}$");
41+
private static Pattern EMAIL = Pattern.compile("^(?=.{1,64}@)[A-Za-z0-9_-]+(\\.[A-Za-z0-9_-]+)*@[^-][A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$");
4242

4343
/** 座机 **/
4444
private static Pattern PHONE = Pattern.compile("1([\\d]{10})|((\\+[0-9]{2,4})?\\(?[0-9]+\\)?-?)?[0-9]{7,8}");

src/main/java/cms/web/action/TextFilterManage.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,10 @@ public Object[] filterHtml(HttpServletRequest request,String html,String item,Ed
751751
* @param html 富文本内容
752752
* @param item 项目
753753
* @param url
754+
* @param prettyPrint 是否重新格式化
754755
* @return
755756
*/
756-
public String processFilePath(String html,String item,String url){
757+
public String processFilePath(String html,String item,String url,boolean prettyPrint){
757758
if(!StringUtils.isBlank(html)){
758759
Document doc = Jsoup.parseBodyFragment(html);
759760

@@ -810,6 +811,7 @@ public String processFilePath(String html,String item,String url){
810811
}
811812
}
812813
}
814+
doc.outputSettings().prettyPrint(prettyPrint);
813815
html = doc.body().html();
814816
}
815817
return html;

src/main/java/cms/web/action/common/HomeManageAction.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4870,13 +4870,12 @@ public String likeList(ModelMap model,PageForm pageForm,
48704870
for(Like like : qr.getResultlist()){
48714871

48724872
if(like.getModule().equals(10) || like.getModule().equals(20) || like.getModule().equals(30)){
4873-
Topic topic = topicManage.queryTopicCache(like.getTopicId());//查询缓存
4874-
if(topic != null){
4875-
like.setTopicTitle(topic.getTitle());
4876-
}
4877-
48784873
if(like.getModule().equals(10)){//10:话题
4879-
like.setSummary(topic.getSummary());
4874+
Topic topic = topicManage.queryTopicCache(like.getTopicId());//查询缓存
4875+
if(topic != null){
4876+
like.setTopicTitle(topic.getTitle());
4877+
like.setSummary(topic.getSummary());
4878+
}
48804879
}else if(like.getModule().equals(20)){//20:评论
48814880
Comment comment = commentManage.query_cache_findByCommentId(like.getCommentId());//查询缓存
48824881
if(comment != null && comment.getStatus().equals(20)){

src/main/java/cms/web/action/fileSystem/FileManage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public String processRichTextFilePath(String html,String item){
109109
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
110110

111111
if(html != null && !"".equals(html.trim())){
112-
return textFilterManage.processFilePath(html, item, this.fileServerAddress(request));
112+
return textFilterManage.processFilePath(html, item, this.fileServerAddress(request),true);
113113
}
114114

115115
return html;

src/main/java/cms/web/action/forumCode/ForumCodeManage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public List<ForumCodeNode> forumCodeNodeList(String dirName){
6060
childNode.add(new ForumCodeNode(1014,"删除评论","topicRelated_deleteComment_",Arrays.asList(new String[]{"集合"})));
6161
childNode.add(new ForumCodeNode(1015,"删除评论回复","topicRelated_deleteReply_",Arrays.asList(new String[]{"集合"})));
6262
childNode.add(new ForumCodeNode(1016,"热门话题","topicRelated_hotTopic_",Arrays.asList(new String[]{"集合"})));
63+
childNode.add(new ForumCodeNode(1017,"话题精华列表","topicRelated_topicEssence_",Arrays.asList(new String[]{"分页"})));
6364
forumCodeNodeList.add(new ForumCodeNode(100,"话题",childNode));//添加一级节点
6465

6566
//问答

0 commit comments

Comments
 (0)