Skip to content

Commit c3baf00

Browse files
committed
更新
1 parent 8b4a8cb commit c3baf00

File tree

104 files changed

+4526
-530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+4526
-530
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.1</version>
5+
<version>6.2</version>
66
<packaging>war</packaging>
77
<name>bbs</name>
88
<description/>

src/main/java/cms/bean/ErrorView.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ public enum ErrorView {
158158
_833("呢称不能和其他用户名相同"),
159159
_834("用户类型不能为空"),
160160
_835("用户类型错误"),
161+
_836("呢称不能和其他账号相同"),
162+
_837("呢称不能和员工账号相同"),
163+
_838("呢称不能和员工呢称相同"),
161164
_850("手机验证码错误"),
162165
_851("手机号不能为空"),
163166
_852("手机验证码不能为空"),

src/main/java/cms/bean/message/RemindEntity.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ public class RemindEntity implements Serializable{
106106
protected Long friendQuestionAnswerId;
107107
/** 对方的问题回复Id **/
108108
protected Long friendQuestionReplyId;
109-
109+
/** 内容摘要 **/
110+
@Transient
111+
protected String summary;
110112

111113
public String getId() {
112114
return id;
@@ -264,6 +266,12 @@ public String getSenderAccount() {
264266
public void setSenderAccount(String senderAccount) {
265267
this.senderAccount = senderAccount;
266268
}
269+
public String getSummary() {
270+
return summary;
271+
}
272+
public void setSummary(String summary) {
273+
this.summary = summary;
274+
}
267275

268276

269277
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package cms.bean.staff;
2+
3+
import java.io.Serializable;
4+
5+
/**
6+
* 权限菜单
7+
* @author Gao
8+
*
9+
*/
10+
public class PermissionMenu implements Serializable{
11+
private static final long serialVersionUID = 1721622201354849134L;
12+
13+
/** 名称 **/
14+
private String name;
15+
/** URL **/
16+
private String url;
17+
/** 请求类型 **/
18+
private String methods;
19+
20+
public String getName() {
21+
return name;
22+
}
23+
public void setName(String name) {
24+
this.name = name;
25+
}
26+
public String getUrl() {
27+
return url;
28+
}
29+
public void setUrl(String url) {
30+
this.url = url;
31+
}
32+
public String getMethods() {
33+
return methods;
34+
}
35+
public void setMethods(String methods) {
36+
this.methods = methods;
37+
}
38+
39+
40+
}

src/main/java/cms/bean/staff/SysUsers.java

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ public class SysUsers implements UserDetails ,java.io.Serializable{
6161
/** 安全摘要 **/
6262
@Column(length=32)
6363
private String securityDigest;
64+
/** 呢称 **/
65+
@Column(length=50)
66+
private String nickname;
67+
/** 头像路径 不写入数据库**/
68+
@Transient
69+
private String avatarPath;
70+
/** 头像名称 **/
71+
@Column(length=50)
72+
private String avatarName;
6473

6574
/** 当前登录用户权限是否拥有本权限 **/
6675
@Transient
@@ -92,7 +101,7 @@ public class SysUsers implements UserDetails ,java.io.Serializable{
92101

93102

94103
public SysUsers(){}
95-
public SysUsers(String userId, String userAccount, String fullName,
104+
public SysUsers(String userId, String userAccount, String fullName,String nickname,String avatarName,
96105
String userPassword, String userDesc, boolean enabled,boolean issys,String securityDigest,
97106
String userDuty, boolean accountNonExpired,
98107
boolean credentialsNonExpired, boolean accountNonLocked, Collection<GrantedAuthority> authorities) {
@@ -103,6 +112,8 @@ public SysUsers(String userId, String userAccount, String fullName,
103112
this.userId = userId;
104113
this.userAccount = userAccount;
105114
this.fullName = fullName;
115+
this.nickname = nickname;
116+
this.avatarName = avatarName;
106117
this.userPassword = userPassword;
107118
this.userDesc = userDesc;
108119
this.issys = issys;
@@ -320,13 +331,33 @@ public void setAccountNonLocked(boolean accountNonLocked) {
320331
public void setCredentialsNonExpired(boolean credentialsNonExpired) {
321332
this.credentialsNonExpired = credentialsNonExpired;
322333
}
323-
334+
public String getNickname() {
335+
return nickname;
336+
}
337+
public void setNickname(String nickname) {
338+
this.nickname = nickname;
339+
}
324340
public String getSecurityDigest() {
325341
return securityDigest;
326342
}
327343
public void setSecurityDigest(String securityDigest) {
328344
this.securityDigest = securityDigest;
329345
}
346+
public String getAvatarPath() {
347+
if(this.avatarPath == null || "".equals(this.avatarPath.trim())){
348+
this.avatarPath = "file/staffAvatar/";
349+
}
350+
return avatarPath;
351+
}
352+
public void setAvatarPath(String avatarPath) {
353+
this.avatarPath = avatarPath;
354+
}
355+
public String getAvatarName() {
356+
return avatarName;
357+
}
358+
public void setAvatarName(String avatarName) {
359+
this.avatarName = avatarName;
360+
}
330361
private static SortedSet<GrantedAuthority> sortAuthorities(Collection<GrantedAuthority> authorities) {
331362
Assert.notNull(authorities, "Cannot pass a null GrantedAuthority collection");
332363
// Ensure array iteration order is predictable (as per UserDetails.getAuthorities() contract and SEC-717)

src/main/java/cms/bean/user/UserDynamicEntity.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ public class UserDynamicEntity implements Serializable{
6060
/** 回复Id -1表示默认空值 **/
6161
protected Long replyId = -1L;
6262

63+
64+
/** 是否使用Markdown **/
65+
@Transient
66+
protected Boolean isMarkdown;
6367
/** 话题标题 **/
6468
@Transient
6569
protected String topicTitle;
@@ -379,5 +383,13 @@ public String getAccount() {
379383
public void setAccount(String account) {
380384
this.account = account;
381385
}
386+
387+
public Boolean getIsMarkdown() {
388+
return isMarkdown;
389+
}
390+
391+
public void setIsMarkdown(Boolean isMarkdown) {
392+
this.isMarkdown = isMarkdown;
393+
}
382394

383395
}

src/main/java/cms/service/message/RemindService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ public interface RemindService extends DAO<Remind>{
2424
* @param unreadRemindIdList 提醒设Id集合
2525
*/
2626
public Integer updateRemindStatus(Long userId,List<String> unreadRemindIdList);
27+
/**
28+
* 设置全部提醒状态为已读
29+
* @param userId 用户Id
30+
*/
31+
public Integer updateAllRemindStatus(Long userId);
2732
/**
2833
* 软删除提醒
2934
* @param userId 用户Id

src/main/java/cms/service/message/SystemNotifyService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ public interface SystemNotifyService extends DAO<SystemNotify>{
5555
* @param subscriptionSystemNotifyIdList 订阅系统通知Id集合
5656
*/
5757
public Integer updateSubscriptionSystemNotifyStatus(Long userId,List<String> subscriptionSystemNotifyIdList);
58+
/**
59+
* 设置全部订阅系统通知状态为已读
60+
* @param userId 用户Id
61+
*/
62+
public Integer updateAllSubscriptionSystemNotifyStatus(Long userId);
5863
/**
5964
* 根据用户Id查询最早的未读系统通知Id
6065
* @param userId 用户Id

src/main/java/cms/service/message/impl/RemindServiceBean.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,38 @@ public Integer updateRemindStatus(Long userId,List<String> unreadRemindIdList){
7272
return i;
7373

7474

75+
}
76+
77+
/**
78+
* 设置全部提醒状态为已读
79+
* @param userId 用户Id
80+
*/
81+
public Integer updateAllRemindStatus(Long userId){
82+
int i = 0;
83+
Long time = new Date().getTime();
84+
85+
//表编号
86+
int tableNumber = remindConfig.userIdRemainder(userId);
87+
if(tableNumber == 0){//默认对象
88+
Query query = em.createQuery("update Remind o set o.status=:status, o.readTimeFormat=:readTimeFormat where o.receiverUserId=:receiverUserId and o.status <:status2")
89+
.setParameter("status", 20)
90+
.setParameter("readTimeFormat", time)
91+
.setParameter("receiverUserId", userId)
92+
.setParameter("status2", 20);
93+
i += query.executeUpdate();
94+
95+
}else{//带下划线对象
96+
Query query = em.createQuery("update Remind_"+tableNumber+" o set o.status=:status, o.readTimeFormat=:readTimeFormat where o.receiverUserId=:receiverUserId and o.status <:status2")
97+
.setParameter("status", 20)
98+
.setParameter("readTimeFormat", time)
99+
.setParameter("receiverUserId", userId)
100+
.setParameter("status2", 20);
101+
i += query.executeUpdate();
102+
}
103+
104+
return i;
105+
106+
75107
}
76108
/**
77109
* 软删除提醒

src/main/java/cms/service/message/impl/SystemNotifyServiceBean.java

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,34 @@ public Integer updateSubscriptionSystemNotifyStatus(Long userId,List<String> sub
284284
return i;
285285
}
286286

287-
287+
/**
288+
* 设置全部订阅系统通知状态为已读
289+
* @param userId 用户Id
290+
*/
291+
public Integer updateAllSubscriptionSystemNotifyStatus(Long userId){
292+
int i = 0;
293+
Date time = new Date();
294+
//表编号
295+
int tableNumber = subscriptionSystemNotifyConfig.userIdRemainder(userId);
296+
if(tableNumber == 0){//默认对象
297+
Query query = em.createQuery("update SubscriptionSystemNotify o set o.status=:status, o.readTime=:readTime where o.userId=:userId and o.status <:status2")
298+
.setParameter("status", 20)
299+
.setParameter("readTime", time)
300+
.setParameter("userId", userId)
301+
.setParameter("status2", 20);
302+
i += query.executeUpdate();
303+
304+
}else{//带下划线对象
305+
Query query = em.createQuery("update SubscriptionSystemNotify_"+tableNumber+" o set o.status=:status, o.readTime=:readTime where o.userId=:userId and o.status <:status2")
306+
.setParameter("status", 20)
307+
.setParameter("readTime", time)
308+
.setParameter("userId", userId)
309+
.setParameter("status2", 20);
310+
i += query.executeUpdate();
311+
}
312+
313+
return i;
314+
}
288315

289316
/**
290317
* 根据用户Id查询最早的未读系统通知Id

0 commit comments

Comments
 (0)