com.yuweix.kuafu.permission.dto.PermissionExportDto Maven / Gradle / Ivy
package com.yuweix.kuafu.permission.dto;
import com.yuweix.kuafu.core.encrypt.SecurityUtil;
import com.yuweix.kuafu.core.json.JsonUtil;
import java.io.Serializable;
import java.util.List;
/**
* @author yuwei
*/
public class PermissionExportDto implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private static final String SALT = "Rewfe5..;;43po6baasfpcxr034;;',";
private List list;
private String sign;
public PermissionExportDto() {
}
public PermissionExportDto(List list) {
this.setList(list);
}
public boolean verify() {
return this.toSgin().equals(this.sign);
}
private String toSgin() {
return SecurityUtil.getMd5(JsonUtil.toJSONString(list) + SALT);
}
public List getList() {
return list;
}
public void setList(List list) {
this.list = list;
this.sign = this.toSgin();
}
public String getSign() {
return sign;
}
}