mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-06-12 22:41:06 +08:00
mgt update
This commit is contained in:
@@ -87,7 +87,7 @@ public class RealmAuthenticationProvider extends AbstractAuthenticationProvider
|
||||
authTypeValid(loginCredential.getAuthType());
|
||||
|
||||
Institutions inst = (Institutions)WebContext.getAttribute(WebConstants.CURRENT_INST);
|
||||
if(inst.getCaptcha().equalsIgnoreCase("YES")) {
|
||||
if(inst.getCaptchaSupport().equalsIgnoreCase("YES")) {
|
||||
captchaValid(loginCredential.getCaptcha(),loginCredential.getAuthType());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,268 +0,0 @@
|
||||
/*
|
||||
* Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.maxkey.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
||||
|
||||
/**
|
||||
* .
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "MXK_HISTORY_LOGS")
|
||||
public class HistoryLogs extends JpaBaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 6560201093784960493L;
|
||||
@Id
|
||||
@Column
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "snowflakeid")
|
||||
String id;
|
||||
@Column
|
||||
String serviceName;
|
||||
@Column
|
||||
String message;
|
||||
@Column
|
||||
String content;
|
||||
@Column
|
||||
String messageType;
|
||||
@Column
|
||||
String operateType;
|
||||
@Column
|
||||
String username;
|
||||
@Column
|
||||
String code;
|
||||
@Column
|
||||
String createdBy;
|
||||
@Column
|
||||
String createdDate;
|
||||
@Column
|
||||
String modifiedBy;
|
||||
@Column
|
||||
String modifiedDate;
|
||||
@Column
|
||||
private String instId;
|
||||
|
||||
private String instName;
|
||||
String startDate;
|
||||
String endDate;
|
||||
|
||||
public HistoryLogs() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* HistoryLogs.
|
||||
* @param serviceName String
|
||||
* @param code String
|
||||
* @param message String
|
||||
* @param content String
|
||||
* @param messageType String
|
||||
* @param operateType String
|
||||
* @param createdBy String
|
||||
* @param username String
|
||||
* @param cname String
|
||||
*/
|
||||
public HistoryLogs(String serviceName, String code,
|
||||
String message, String content,
|
||||
String messageType,String operateType,
|
||||
String createdBy, String username, String cname) {
|
||||
super();
|
||||
this.serviceName = serviceName;
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.content = content;
|
||||
this.messageType = messageType;
|
||||
this.operateType = operateType;
|
||||
this.createdBy = createdBy;
|
||||
this.username = username;
|
||||
|
||||
}
|
||||
|
||||
public String getServiceName() {
|
||||
return serviceName;
|
||||
}
|
||||
|
||||
public void setServiceName(String serviceName) {
|
||||
this.serviceName = serviceName;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getMessageType() {
|
||||
return messageType;
|
||||
}
|
||||
|
||||
public void setMessageType(String messageType) {
|
||||
this.messageType = messageType;
|
||||
}
|
||||
|
||||
public String getOperateType() {
|
||||
return operateType;
|
||||
}
|
||||
|
||||
public void setOperateType(String operateType) {
|
||||
this.operateType = operateType;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedDate() {
|
||||
return createdDate;
|
||||
}
|
||||
|
||||
public void setCreatedDate(String createdDate) {
|
||||
this.createdDate = createdDate;
|
||||
}
|
||||
|
||||
public String getModifiedBy() {
|
||||
return modifiedBy;
|
||||
}
|
||||
|
||||
public void setModifiedBy(String modifiedBy) {
|
||||
this.modifiedBy = modifiedBy;
|
||||
}
|
||||
|
||||
public String getModifiedDate() {
|
||||
return modifiedDate;
|
||||
}
|
||||
|
||||
public void setModifiedDate(String modifiedDate) {
|
||||
this.modifiedDate = modifiedDate;
|
||||
}
|
||||
|
||||
public String getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getInstId() {
|
||||
return instId;
|
||||
}
|
||||
|
||||
public void setInstId(String instId) {
|
||||
this.instId = instId;
|
||||
}
|
||||
|
||||
public String getInstName() {
|
||||
return instName;
|
||||
}
|
||||
|
||||
public void setInstName(String instName) {
|
||||
this.instName = instName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("HistoryLogs [id=");
|
||||
builder.append(id);
|
||||
builder.append(", serviceName=");
|
||||
builder.append(serviceName);
|
||||
builder.append(", message=");
|
||||
builder.append(message);
|
||||
builder.append(", content=");
|
||||
builder.append(content);
|
||||
builder.append(", messageType=");
|
||||
builder.append(messageType);
|
||||
builder.append(", operateType=");
|
||||
builder.append(operateType);
|
||||
builder.append(", username=");
|
||||
builder.append(username);
|
||||
builder.append(", code=");
|
||||
builder.append(code);
|
||||
builder.append(", createdBy=");
|
||||
builder.append(createdBy);
|
||||
builder.append(", createdDate=");
|
||||
builder.append(createdDate);
|
||||
builder.append(", modifiedBy=");
|
||||
builder.append(modifiedBy);
|
||||
builder.append(", modifiedDate=");
|
||||
builder.append(modifiedDate);
|
||||
builder.append(", startDate=");
|
||||
builder.append(startDate);
|
||||
builder.append(", endDate=");
|
||||
builder.append(endDate);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
/*
|
||||
* Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.maxkey.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
||||
|
||||
/**
|
||||
* .
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "MXK_HISTORY_SYSTEM_LOGS")
|
||||
public class HistorySystemLogs extends JpaBaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 6560201093784960493L;
|
||||
@Id
|
||||
@Column
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "snowflakeid")
|
||||
String id;
|
||||
@Column
|
||||
String topic;
|
||||
@Column
|
||||
String message;
|
||||
@Column
|
||||
String messageType;
|
||||
@Column
|
||||
String messageResult;
|
||||
@Column
|
||||
String userId;
|
||||
@Column
|
||||
String username;
|
||||
@Column
|
||||
String displayName;
|
||||
@Column
|
||||
String executeTime;
|
||||
@Column
|
||||
private String instId;
|
||||
|
||||
private String instName;
|
||||
String startDate;
|
||||
String endDate;
|
||||
|
||||
public HistorySystemLogs() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTopic() {
|
||||
return topic;
|
||||
}
|
||||
|
||||
public void setTopic(String topic) {
|
||||
this.topic = topic;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getMessageType() {
|
||||
return messageType;
|
||||
}
|
||||
|
||||
public void setMessageType(String messageType) {
|
||||
this.messageType = messageType;
|
||||
}
|
||||
|
||||
public String getMessageResult() {
|
||||
return messageResult;
|
||||
}
|
||||
|
||||
public void setMessageResult(String messageResult) {
|
||||
this.messageResult = messageResult;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getExecuteTime() {
|
||||
return executeTime;
|
||||
}
|
||||
|
||||
public void setExecuteTime(String executeTime) {
|
||||
this.executeTime = executeTime;
|
||||
}
|
||||
|
||||
public String getInstId() {
|
||||
return instId;
|
||||
}
|
||||
|
||||
public void setInstId(String instId) {
|
||||
this.instId = instId;
|
||||
}
|
||||
|
||||
public String getInstName() {
|
||||
return instName;
|
||||
}
|
||||
|
||||
public void setInstName(String instName) {
|
||||
this.instName = instName;
|
||||
}
|
||||
|
||||
public String getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("HistoryLogs [id=");
|
||||
builder.append(id);
|
||||
builder.append(", topic=");
|
||||
builder.append(topic);
|
||||
builder.append(", message=");
|
||||
builder.append(message);
|
||||
builder.append(", messageType=");
|
||||
builder.append(messageType);
|
||||
builder.append(", messageResult=");
|
||||
builder.append(messageResult);
|
||||
builder.append(", userId=");
|
||||
builder.append(userId);
|
||||
builder.append(", username=");
|
||||
builder.append(username);
|
||||
builder.append(", displayName=");
|
||||
builder.append(displayName);
|
||||
builder.append(", executeTime=");
|
||||
builder.append(executeTime);
|
||||
builder.append(", instId=");
|
||||
builder.append(instId);
|
||||
builder.append(", instName=");
|
||||
builder.append(instName);
|
||||
builder.append(", startDate=");
|
||||
builder.append(startDate);
|
||||
builder.append(", endDate=");
|
||||
builder.append(endDate);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -65,32 +65,22 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
@Column
|
||||
private String description;
|
||||
|
||||
@Column
|
||||
private int status;
|
||||
|
||||
@Column
|
||||
private String logo;
|
||||
@Column
|
||||
private String title;
|
||||
private String frontTitle;
|
||||
@Column
|
||||
private String consoleTitle;
|
||||
@Column
|
||||
private String domain;
|
||||
@Column
|
||||
private String captcha;
|
||||
private String captchaType;
|
||||
@Column
|
||||
private String captchaSupport;
|
||||
@Column
|
||||
private String defaultUri;
|
||||
|
||||
@Column
|
||||
String createdBy;
|
||||
@Column
|
||||
String createdDate;
|
||||
@Column
|
||||
String modifiedBy;
|
||||
@Column
|
||||
String modifiedDate;
|
||||
|
||||
public Institutions() {
|
||||
super();
|
||||
@@ -128,12 +118,21 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
this.logo = logo;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
|
||||
public String getFrontTitle() {
|
||||
return frontTitle;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
public void setFrontTitle(String frontTitle) {
|
||||
this.frontTitle = frontTitle;
|
||||
}
|
||||
|
||||
public String getCaptchaType() {
|
||||
return captchaType;
|
||||
}
|
||||
|
||||
public void setCaptchaType(String captchaType) {
|
||||
this.captchaType = captchaType;
|
||||
}
|
||||
|
||||
public String getConsoleTitle() {
|
||||
@@ -248,62 +247,11 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedDate() {
|
||||
return createdDate;
|
||||
}
|
||||
|
||||
public void setCreatedDate(String createdDate) {
|
||||
this.createdDate = createdDate;
|
||||
}
|
||||
|
||||
public String getModifiedBy() {
|
||||
return modifiedBy;
|
||||
}
|
||||
|
||||
public void setModifiedBy(String modifiedBy) {
|
||||
this.modifiedBy = modifiedBy;
|
||||
}
|
||||
|
||||
public String getModifiedDate() {
|
||||
return modifiedDate;
|
||||
}
|
||||
|
||||
public void setModifiedDate(String modifiedDate) {
|
||||
this.modifiedDate = modifiedDate;
|
||||
}
|
||||
|
||||
public String getCaptcha() {
|
||||
return captcha;
|
||||
}
|
||||
|
||||
public void setCaptcha(String captcha) {
|
||||
this.captcha = captcha;
|
||||
}
|
||||
|
||||
public String getCaptchaSupport() {
|
||||
return captchaSupport;
|
||||
}
|
||||
|
||||
public boolean isTrueCaptchaSupport() {
|
||||
return "YES".equalsIgnoreCase(captchaSupport);
|
||||
}
|
||||
|
||||
public void setCaptchaSupport(String captchaSupport) {
|
||||
this.captchaSupport = captchaSupport;
|
||||
}
|
||||
@@ -325,14 +273,6 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
builder.append(name);
|
||||
builder.append(", fullName=");
|
||||
builder.append(fullName);
|
||||
builder.append(", logo=");
|
||||
builder.append(logo);
|
||||
builder.append(", title=");
|
||||
builder.append(title);
|
||||
builder.append(", consoleTitle=");
|
||||
builder.append(consoleTitle);
|
||||
builder.append(", domain=");
|
||||
builder.append(domain);
|
||||
builder.append(", division=");
|
||||
builder.append(division);
|
||||
builder.append(", country=");
|
||||
@@ -357,16 +297,20 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
builder.append(email);
|
||||
builder.append(", description=");
|
||||
builder.append(description);
|
||||
builder.append(", status=");
|
||||
builder.append(status);
|
||||
builder.append(", createdBy=");
|
||||
builder.append(createdBy);
|
||||
builder.append(", createdDate=");
|
||||
builder.append(createdDate);
|
||||
builder.append(", modifiedBy=");
|
||||
builder.append(modifiedBy);
|
||||
builder.append(", modifiedDate=");
|
||||
builder.append(modifiedDate);
|
||||
builder.append(", logo=");
|
||||
builder.append(logo);
|
||||
builder.append(", frontTitle=");
|
||||
builder.append(frontTitle);
|
||||
builder.append(", consoleTitle=");
|
||||
builder.append(consoleTitle);
|
||||
builder.append(", domain=");
|
||||
builder.append(domain);
|
||||
builder.append(", captchaType=");
|
||||
builder.append(captchaType);
|
||||
builder.append(", captchaSupport=");
|
||||
builder.append(captchaSupport);
|
||||
builder.append(", defaultUri=");
|
||||
builder.append(defaultUri);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.maxkey.constants.ConstsStatus;
|
||||
import org.maxkey.entity.Institutions;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -37,10 +36,10 @@ public class InstitutionsRepository {
|
||||
private static Logger _logger = LoggerFactory.getLogger(InstitutionsRepository.class);
|
||||
|
||||
private static final String SELECT_STATEMENT =
|
||||
"select * from mxk_institutions where domain = ? and status = " + ConstsStatus.ACTIVE;
|
||||
"select * from mxk_institutions where domain = ? " ;
|
||||
|
||||
private static final String SELECT_STATEMENT_BY_ID =
|
||||
"select * from mxk_institutions where id = ? and status = " + ConstsStatus.ACTIVE;
|
||||
"select * from mxk_institutions where id = ? " ;
|
||||
|
||||
protected static final Cache<String, Institutions> institutionsStore =
|
||||
Caffeine.newBuilder()
|
||||
@@ -102,11 +101,11 @@ public class InstitutionsRepository {
|
||||
institution.setFullName(rs.getString("fullname"));
|
||||
institution.setLogo(rs.getString("logo"));
|
||||
institution.setDomain(rs.getString("domain"));
|
||||
institution.setTitle(rs.getString("title"));
|
||||
institution.setFrontTitle(rs.getString("fronttitle"));
|
||||
institution.setConsoleTitle(rs.getString("consoletitle"));
|
||||
institution.setCaptcha(rs.getString("captcha"));
|
||||
institution.setCaptchaSupport(rs.getString("CaptchaSupport"));
|
||||
institution.setDefaultUri(rs.getString("DefaultUri"));
|
||||
institution.setCaptchaType(rs.getString("captchatype"));
|
||||
institution.setCaptchaSupport(rs.getString("captchasupport"));
|
||||
institution.setDefaultUri(rs.getString("defaultUri"));
|
||||
return institution;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class LocalizationRepository {
|
||||
}else if(code.equals("global.title")) {
|
||||
message = getFromStore(code, htmlTag, locale, inst);
|
||||
if(message == null) {
|
||||
message = institutionService.get(inst).getTitle();
|
||||
message = institutionService.get(inst).getFrontTitle();
|
||||
}
|
||||
}else if(code.equals("global.consoleTitle")) {
|
||||
message = getFromStore(code, htmlTag, locale, inst);
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.springframework.validation.FieldError;
|
||||
public class Message {
|
||||
static final Logger _logger = LoggerFactory.getLogger(Message.class);
|
||||
// 服务名称
|
||||
private String serviceName;
|
||||
private String topic;
|
||||
// 信息内容
|
||||
private String message;
|
||||
// 信息代码
|
||||
@@ -119,9 +119,9 @@ public class Message {
|
||||
WebContext.setMessage(this);
|
||||
}
|
||||
|
||||
public Message(String serviceName, String message, Object messageObject, BindingResult result,
|
||||
public Message(String topic, String message, Object messageObject, BindingResult result,
|
||||
MessageType messageType, OperateType operateType, MessageScope messageScope) {
|
||||
this.serviceName = serviceName;
|
||||
this.topic = topic;
|
||||
this.message = message;
|
||||
this.messageObject = messageObject;
|
||||
this.operateType = operateType;
|
||||
@@ -233,12 +233,14 @@ public class Message {
|
||||
this.messageScope = messageScope;
|
||||
}
|
||||
|
||||
public String getServiceName() {
|
||||
return serviceName;
|
||||
}
|
||||
public String getTopic() {
|
||||
return topic;
|
||||
}
|
||||
|
||||
public void setTopic(String topic) {
|
||||
this.topic = topic;
|
||||
}
|
||||
|
||||
|
||||
public void setServiceName(String serviceName) {
|
||||
this.serviceName = serviceName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
package org.maxkey.persistence.mapper;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.entity.HistoryLogs;
|
||||
import org.maxkey.entity.HistorySystemLogs;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
*
|
||||
*/
|
||||
public interface HistorySystemLogsMapper extends IJpaBaseMapper<HistoryLogs> {
|
||||
public interface HistorySystemLogsMapper extends IJpaBaseMapper<HistorySystemLogs> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
package org.maxkey.persistence.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.entity.HistoryLogs;
|
||||
import org.maxkey.entity.HistorySystemLogs;
|
||||
import org.maxkey.persistence.mapper.HistorySystemLogsMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public class HistorySystemLogsService extends JpaBaseService<HistoryLogs>{
|
||||
public class HistorySystemLogsService extends JpaBaseService<HistorySystemLogs>{
|
||||
|
||||
public HistorySystemLogsService() {
|
||||
super(HistorySystemLogsMapper.class);
|
||||
|
||||
@@ -6,50 +6,37 @@
|
||||
<if test="id != null and id != ''">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="serviceName != null and serviceName != '' ">
|
||||
and lower(servicename) like lower(concat('%',#{serviceName},'%'))
|
||||
<if test="topic != null and topic != '' ">
|
||||
and lower(topic) like lower(concat('%',#{topic},'%'))
|
||||
</if>
|
||||
<if test="message != null and message != '' ">
|
||||
and lower(message) like lower(concat('%',#{message},'%'))
|
||||
</if>
|
||||
<if test="startDate != null and startDate != '' ">
|
||||
and createddate between #{startDate} and #{endDate}
|
||||
and executeTime between #{startDate} and #{endDate}
|
||||
</if>
|
||||
<if test="createdBy != null and createdBy != ''">
|
||||
and createdby = #{createdBy}
|
||||
</if>
|
||||
|
||||
<if test="username != null and username != ''">
|
||||
and lower(username) like lower(concat('%',#{username},'%'))
|
||||
</if>
|
||||
<if test="displayName != null and displayName != ''">
|
||||
and lower(displayName) like lower(concat('%',#{displayName},'%'))
|
||||
</if>
|
||||
<if test="messageType != null and messageType != ''">
|
||||
and messagetype = #{messageType}
|
||||
and messageType = #{messageType}
|
||||
</if>
|
||||
<if test="operateType != null and operateType != ''">
|
||||
and operatetype = #{operateType}
|
||||
<if test="messageResult != null and messageResult != ''">
|
||||
and messageResult = #{messageResult}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="queryPageResults" parameterType="HistoryLogs" resultType="HistoryLogs">
|
||||
select
|
||||
id,
|
||||
tid,
|
||||
tname,
|
||||
servicename ,
|
||||
code,
|
||||
message ,
|
||||
content,
|
||||
operatetype,
|
||||
messagetype,
|
||||
username,
|
||||
createddate,
|
||||
createdby
|
||||
from mxk_history_logs
|
||||
<select id="queryPageResults" parameterType="HistorySystemLogs" resultType="HistorySystemLogs">
|
||||
select *
|
||||
from mxk_history_system_logs
|
||||
where instid = #{instId}
|
||||
<include refid="where_statement"/>
|
||||
|
||||
order by createddate desc
|
||||
order by executeTime desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -121,8 +121,8 @@ public class LoginEndpoint {
|
||||
modelAndView.addObject("userDomainUrlJson", kerberosService.buildKerberosProxys());
|
||||
}
|
||||
Institutions inst = (Institutions)WebContext.getAttribute(WebConstants.CURRENT_INST);
|
||||
modelAndView.addObject("isCaptcha", inst.isTrueCaptchaSupport());
|
||||
modelAndView.addObject("captcha", inst.getCaptcha());
|
||||
modelAndView.addObject("captchaSupport", inst.getCaptchaSupport());
|
||||
modelAndView.addObject("captchaType", inst.getCaptchaType());
|
||||
modelAndView.addObject("sessionid", WebContext.getSession().getId());
|
||||
//modelAndView.addObject("jwtToken",jwtLoginService.buildLoginJwt());
|
||||
//load Social Sign On Providers
|
||||
|
||||
@@ -20,7 +20,7 @@ package org.maxkey.web.historys.contorller;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import org.apache.mybatis.jpa.persistence.JpaPageResults;
|
||||
import org.maxkey.entity.HistoryLogs;
|
||||
import org.maxkey.entity.HistorySystemLogs;
|
||||
import org.maxkey.persistence.service.HistorySystemLogsService;
|
||||
import org.maxkey.util.DateUtils;
|
||||
import org.maxkey.web.WebContext;
|
||||
@@ -63,7 +63,7 @@ public class HistorySystemLogsController {
|
||||
*/
|
||||
@RequestMapping(value = { "/systemLogsList/grid" })
|
||||
@ResponseBody
|
||||
public JpaPageResults<HistoryLogs> logsDataGrid(@ModelAttribute("historyLogs") HistoryLogs historyLogs) {
|
||||
public JpaPageResults<HistorySystemLogs> logsDataGrid(@ModelAttribute("historyLogs") HistorySystemLogs historyLogs) {
|
||||
_logger.debug("history/systemLogs/grid/ systemLogs() " + historyLogs);
|
||||
historyLogs.setInstId(WebContext.getUserInfo().getInstId());
|
||||
return historySystemLogsService.queryPageResults(historyLogs);
|
||||
|
||||
@@ -19,10 +19,9 @@ package org.maxkey.web.interceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.maxkey.entity.HistoryLogs;
|
||||
import org.maxkey.entity.HistorySystemLogs;
|
||||
import org.maxkey.entity.UserInfo;
|
||||
import org.maxkey.persistence.service.HistorySystemLogsService;
|
||||
import org.maxkey.util.JsonUtils;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.maxkey.web.message.Message;
|
||||
import org.maxkey.web.message.MessageScope;
|
||||
@@ -64,17 +63,7 @@ public class HistoryLogsAdapter implements AsyncHandlerInterceptor {
|
||||
UserInfo userInfo = WebContext.getUserInfo();//取得当前用户信息
|
||||
|
||||
//创建日志记录
|
||||
HistoryLogs historyLogs = new HistoryLogs(
|
||||
message.getServiceName(),
|
||||
message.getCode(),
|
||||
message.getMessage(),
|
||||
JsonUtils.object2Json(message.getMessageObject()),
|
||||
message.getMessageType().toString(),
|
||||
message.getOperateType().toString(),
|
||||
userInfo == null ? null : userInfo.getId(),
|
||||
userInfo == null ? null : userInfo.getUsername(),
|
||||
""
|
||||
);
|
||||
HistorySystemLogs historyLogs = new HistorySystemLogs();
|
||||
historyLogs.setInstId(userInfo.getInstId());
|
||||
_logger.debug("insert db historyLogs content : " + historyLogs);
|
||||
historySystemLogsService.insert(historyLogs);//日志插入数据库
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
@@ -88,7 +89,7 @@ public class GroupMemberController {
|
||||
|
||||
@RequestMapping(value = {"/add"})
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> addGroupMember(@ModelAttribute("groupMember") GroupMember groupMember,@CurrentUser UserInfo currentUser) {
|
||||
public ResponseEntity<?> addGroupMember(@RequestBody GroupMember groupMember,@CurrentUser UserInfo currentUser) {
|
||||
if (groupMember == null || groupMember.getGroupId() == null) {
|
||||
return new Message<GroupMember>(Message.FAIL).buildResponse();
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ApplicationsController extends BaseAppContorller {
|
||||
public ResponseEntity<?> init() {
|
||||
Apps app=new Apps();
|
||||
app.setId(app.generateId());
|
||||
app.setProtocol(ConstsProtocols.FORMBASED);
|
||||
app.setProtocol(ConstsProtocols.BASIC);
|
||||
app.setSecret(ReciprocalUtils.generateKey(""));
|
||||
return new Message<Apps>(app).buildResponse();
|
||||
}
|
||||
|
||||
@@ -146,25 +146,28 @@ public class SAML20DetailsController extends BaseAppContorller {
|
||||
|
||||
protected AppsSAML20Details transform(AppsSAML20Details samlDetails) throws Exception{
|
||||
super.transform(samlDetails);
|
||||
ByteArrayInputStream bArrayInputStream = null;
|
||||
if(StringUtils.isNotBlank(samlDetails.getMetaFileId())) {
|
||||
bArrayInputStream = new ByteArrayInputStream(
|
||||
fileUploadService.get(samlDetails.getMetaFileId()).getUploaded());
|
||||
fileUploadService.remove(samlDetails.getMetaFileId());
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(samlDetails.getFileType())){
|
||||
if(StringUtils.isNotBlank(samlDetails.getMetaFileId())) {
|
||||
ByteArrayInputStream bArrayInputStream = new ByteArrayInputStream(
|
||||
fileUploadService.get(samlDetails.getMetaFileId()).getUploaded());;
|
||||
if(samlDetails.getFileType().equals("certificate")){//certificate file
|
||||
try {
|
||||
X509Certificate trustCert = X509CertUtils.loadCertFromInputStream(bArrayInputStream);
|
||||
samlDetails.setTrustCert(trustCert);
|
||||
} catch (IOException e) {
|
||||
_logger.error("read certificate file error .", e);
|
||||
throw new Exception("read certificate file error", e);
|
||||
if(samlDetails.getFileType().equals("certificate")){//certificate file
|
||||
try {
|
||||
if(bArrayInputStream != null) {
|
||||
samlDetails.setTrustCert(
|
||||
X509CertUtils.loadCertFromInputStream(bArrayInputStream));
|
||||
}
|
||||
}else if(samlDetails.getFileType().equals("metadata_file")){//metadata file
|
||||
} catch (IOException e) {
|
||||
_logger.error("read certificate file error .", e);
|
||||
}
|
||||
}else if(samlDetails.getFileType().equals("metadata_file")){//metadata file
|
||||
if(bArrayInputStream != null) {
|
||||
samlDetails = resolveMetaData(samlDetails,bArrayInputStream);
|
||||
}
|
||||
}
|
||||
|
||||
if(samlDetails.getFileType().equals("metadata_url")
|
||||
}else if(samlDetails.getFileType().equals("metadata_url")
|
||||
&&StringUtils.isNotBlank(samlDetails.getMetaUrl())){//metadata url
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost post = new HttpPost(samlDetails.getMetaUrl());
|
||||
@@ -173,27 +176,27 @@ public class SAML20DetailsController extends BaseAppContorller {
|
||||
response.close();
|
||||
httpClient.close();
|
||||
}
|
||||
}
|
||||
|
||||
if(samlDetails.getTrustCert()!=null) {
|
||||
samlDetails.setCertSubject(samlDetails.getTrustCert().getSubjectDN().getName());
|
||||
samlDetails.setCertExpiration(samlDetails.getTrustCert().getNotAfter().toString());
|
||||
|
||||
samlDetails.setCertIssuer(X509CertUtils.getCommonName(samlDetails.getTrustCert().getIssuerX500Principal()));
|
||||
|
||||
KeyStore keyStore = KeyStoreUtil.clone(idpKeyStoreLoader.getKeyStore(),idpKeyStoreLoader.getKeystorePassword());
|
||||
|
||||
KeyStore trustKeyStore = null;
|
||||
if (!samlDetails.getEntityId().equals("")) {
|
||||
trustKeyStore = KeyStoreUtil.importTrustCertificate(keyStore,samlDetails.getTrustCert(), samlDetails.getEntityId());
|
||||
} else {
|
||||
trustKeyStore = KeyStoreUtil.importTrustCertificate(keyStore,samlDetails.getTrustCert());
|
||||
}
|
||||
|
||||
byte[] keyStoreByte = KeyStoreUtil.keyStore2Bytes(trustKeyStore,idpKeyStoreLoader.getKeystorePassword());
|
||||
|
||||
// store KeyStore content
|
||||
samlDetails.setKeyStore(keyStoreByte);
|
||||
if(samlDetails.getTrustCert()!=null) {
|
||||
samlDetails.setCertSubject(samlDetails.getTrustCert().getSubjectDN().getName());
|
||||
samlDetails.setCertExpiration(samlDetails.getTrustCert().getNotAfter().toString());
|
||||
|
||||
samlDetails.setCertIssuer(X509CertUtils.getCommonName(samlDetails.getTrustCert().getIssuerX500Principal()));
|
||||
|
||||
KeyStore keyStore = KeyStoreUtil.clone(idpKeyStoreLoader.getKeyStore(),idpKeyStoreLoader.getKeystorePassword());
|
||||
|
||||
KeyStore trustKeyStore = null;
|
||||
if (!samlDetails.getEntityId().equals("")) {
|
||||
trustKeyStore = KeyStoreUtil.importTrustCertificate(keyStore,samlDetails.getTrustCert(), samlDetails.getEntityId());
|
||||
} else {
|
||||
trustKeyStore = KeyStoreUtil.importTrustCertificate(keyStore,samlDetails.getTrustCert());
|
||||
}
|
||||
|
||||
byte[] keyStoreByte = KeyStoreUtil.keyStore2Bytes(trustKeyStore,idpKeyStoreLoader.getKeystorePassword());
|
||||
|
||||
// store KeyStore content
|
||||
samlDetails.setKeyStore(keyStoreByte);
|
||||
}
|
||||
return samlDetails;
|
||||
}
|
||||
|
||||
@@ -17,57 +17,45 @@
|
||||
|
||||
package org.maxkey.web.config.contorller;
|
||||
|
||||
import org.maxkey.constants.ConstsOperateMessage;
|
||||
import org.maxkey.authn.annotation.CurrentUser;
|
||||
import org.maxkey.entity.Institutions;
|
||||
import org.maxkey.entity.Message;
|
||||
import org.maxkey.entity.UserInfo;
|
||||
import org.maxkey.persistence.service.InstitutionsService;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.maxkey.web.message.Message;
|
||||
import org.maxkey.web.message.MessageType;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value={"/institutions"})
|
||||
@RequestMapping(value={"/config/institutions"})
|
||||
public class InstitutionsController {
|
||||
|
||||
|
||||
final static Logger _logger = LoggerFactory.getLogger(InstitutionsController.class);
|
||||
|
||||
@Autowired
|
||||
private InstitutionsService institutionsService;
|
||||
|
||||
/**
|
||||
* 读取
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value={"/forward"})
|
||||
public ModelAndView forward(){
|
||||
Institutions institutions = institutionsService.get(WebContext.getUserInfo().getInstId());
|
||||
return new ModelAndView("institutions/updateInstitutions","model",institutions);
|
||||
@RequestMapping(value={"/get"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public ResponseEntity<?> get(@CurrentUser UserInfo currentUser){
|
||||
Institutions institutions = institutionsService.get(currentUser.getInstId());
|
||||
return new Message<Institutions>(Message.SUCCESS,institutions).buildResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @param sysConfig
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value={"/update"})
|
||||
@ResponseBody
|
||||
public Message updat(@ModelAttribute("institutions") Institutions institutions,BindingResult result) {
|
||||
@RequestMapping(value={"/update"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
public ResponseEntity<?> update(
|
||||
@RequestBody Institutions institutions,
|
||||
@CurrentUser UserInfo currentUser,
|
||||
BindingResult result) {
|
||||
_logger.debug("updateRole institutions : "+institutions);
|
||||
if(institutionsService.update(institutions)) {
|
||||
return new Message(WebContext.getI18nValue(ConstsOperateMessage.UPDATE_SUCCESS),MessageType.success);
|
||||
return new Message<Institutions>(Message.SUCCESS).buildResponse();
|
||||
} else {
|
||||
return new Message(WebContext.getI18nValue(ConstsOperateMessage.UPDATE_ERROR),MessageType.error);
|
||||
return new Message<Institutions>(Message.FAIL).buildResponse();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ public class LoginEndpoint {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
Institutions inst = (Institutions)WebContext.getAttribute(WebConstants.CURRENT_INST);
|
||||
modelAndView.addObject("isRemeberMe", applicationConfig.getLoginConfig().isRemeberMe());
|
||||
modelAndView.addObject("isCaptcha", inst.isTrueCaptchaSupport());
|
||||
modelAndView.addObject("captcha", inst.getCaptcha());
|
||||
modelAndView.addObject("captchaSupport", inst.getCaptchaSupport());
|
||||
modelAndView.addObject("captchaType", inst.getCaptchaType());
|
||||
modelAndView.addObject("sessionid", WebContext.getSession().getId());
|
||||
Object loginErrorMessage=WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE);
|
||||
modelAndView.addObject("loginErrorMessage", loginErrorMessage==null?"":loginErrorMessage);
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import org.apache.mybatis.jpa.persistence.JpaPageResults;
|
||||
import org.maxkey.authn.annotation.CurrentUser;
|
||||
import org.maxkey.entity.HistoryLogs;
|
||||
import org.maxkey.entity.HistorySystemLogs;
|
||||
import org.maxkey.entity.Message;
|
||||
import org.maxkey.entity.UserInfo;
|
||||
import org.maxkey.persistence.service.HistorySystemLogsService;
|
||||
@@ -60,11 +60,11 @@ final static Logger _logger = LoggerFactory.getLogger(SystemLogsController.class
|
||||
*/
|
||||
@RequestMapping(value={"/systemLogs/fetch"})
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> fetch(@ModelAttribute("historyLog") HistoryLogs historyLog,
|
||||
public ResponseEntity<?> fetch(@ModelAttribute("historyLog") HistorySystemLogs historyLog,
|
||||
@CurrentUser UserInfo currentUser){
|
||||
_logger.debug("historys/historyLog/fetch {} ",historyLog);
|
||||
historyLog.setInstId(currentUser.getInstId());
|
||||
return new Message<JpaPageResults<HistoryLogs>>(
|
||||
return new Message<JpaPageResults<HistorySystemLogs>>(
|
||||
historySystemLogsService.queryPageResults(historyLog)
|
||||
).buildResponse();
|
||||
}
|
||||
|
||||
@@ -19,10 +19,9 @@ package org.maxkey.web.interceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.maxkey.entity.HistoryLogs;
|
||||
import org.maxkey.entity.HistorySystemLogs;
|
||||
import org.maxkey.entity.UserInfo;
|
||||
import org.maxkey.persistence.service.HistorySystemLogsService;
|
||||
import org.maxkey.util.JsonUtils;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.maxkey.web.message.Message;
|
||||
import org.maxkey.web.message.MessageScope;
|
||||
@@ -58,20 +57,14 @@ public class HistoryLogsAdapter implements AsyncHandlerInterceptor {
|
||||
if(message.getMessageScope() == MessageScope.DB || message.getMessageScope() == MessageScope.DB_CLIENT) {//判断message类型
|
||||
UserInfo userInfo =WebContext.getUserInfo();//取得当前用户信息
|
||||
//创建日志记录
|
||||
HistoryLogs historyLog = new HistoryLogs(
|
||||
message.getServiceName(),
|
||||
message.getCode(),
|
||||
message.getMessage(),
|
||||
JsonUtils.object2Json(message.getMessageObject()),
|
||||
message.getMessageType().toString(),
|
||||
message.getOperateType().toString(),
|
||||
userInfo==null?null:userInfo.getId(),
|
||||
userInfo==null?null:userInfo.getUsername(),
|
||||
""
|
||||
);
|
||||
historyLog.setInstId(userInfo.getInstId());
|
||||
_logger.debug("insert db logs content : " + historyLog);
|
||||
historySystemLogsService.insert(historyLog);//日志插入数据库
|
||||
HistorySystemLogs historySystemLog = new HistorySystemLogs();
|
||||
historySystemLog.setTopic(message.getTopic());
|
||||
historySystemLog.setUserId(userInfo.getId());
|
||||
historySystemLog.setUsername(userInfo.getUsername());
|
||||
historySystemLog.setDisplayName(userInfo.getDisplayName());
|
||||
historySystemLog.setInstId(userInfo.getInstId());
|
||||
_logger.debug("insert db logs content : " + historySystemLog);
|
||||
historySystemLogsService.insert(historySystemLog);//日志插入数据库
|
||||
if(message.getMessageScope() == MessageScope.DB) {//message类型仅插入数据库
|
||||
WebContext.clearMessage();//清除message
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
@@ -85,7 +86,7 @@ public class RoleMemberController {
|
||||
|
||||
@RequestMapping(value = {"/add"})
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> add(@ModelAttribute RoleMember roleMember,@CurrentUser UserInfo currentUser) {
|
||||
public ResponseEntity<?> add(@RequestBody RoleMember roleMember,@CurrentUser UserInfo currentUser) {
|
||||
if (roleMember == null || roleMember.getRoleId() == null) {
|
||||
return new Message<RoleMember>(Message.FAIL).buildResponse();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user