This commit is contained in:
thinkgem
2022-06-21 09:25:41 +08:00
parent 8c7540f838
commit 0a123a137b
22 changed files with 94 additions and 67 deletions

View File

@@ -72,6 +72,7 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
* @param plainPassword 明文密码
* @return 16位salt密钥 + 40位hash密码
*/
@Override
public String encryptPassword(String plainPassword) {
String plain = EncodeUtils.decodeHtml(plainPassword);
byte[] salt = Sha1Utils.genSalt(SALT_SIZE);
@@ -85,6 +86,7 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
* @param password 密文密码
* @return 验证成功返回true
*/
@Override
public boolean validatePassword(String plainPassword, String password) {
try{
String plain = EncodeUtils.decodeHtml(plainPassword);

View File

@@ -27,6 +27,7 @@ public class AreaType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
for (Area e : list){
if (StringUtils.trimToEmpty(val).equals(e.getAreaName())){
@@ -39,6 +40,7 @@ public class AreaType implements FieldType {
/**
* 获取对象值(导出)
*/
@Override
public String setValue(Object val) {
if (val != null && ((Area)val).getAreaName() != null){
return ((Area)val).getAreaName();

View File

@@ -27,6 +27,7 @@ public class CompanyType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
for (Company e : list){
if (StringUtils.trimToEmpty(val).equals(e.getCompanyName())){
@@ -39,6 +40,7 @@ public class CompanyType implements FieldType {
/**
* 设置对象值(导出)
*/
@Override
public String setValue(Object val) {
if (val != null && ((Company)val).getCompanyName() != null){
return ((Company)val).getCompanyName();

View File

@@ -27,6 +27,7 @@ public class OfficeType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
for (Office e : list){
if (StringUtils.trimToEmpty(val).equals(e.getOfficeName())){
@@ -39,6 +40,7 @@ public class OfficeType implements FieldType {
/**
* 设置对象值(导出)
*/
@Override
public String setValue(Object val) {
if (val != null && ((Office)val).getOfficeName() != null){
return ((Office)val).getOfficeName();

View File

@@ -31,6 +31,7 @@ public class PostListType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
List<String> list = new ArrayList<String>();
for (String s : StringUtils.split(val, ",")) {
@@ -46,6 +47,7 @@ public class PostListType implements FieldType {
/**
* 设置对象值(导出)
*/
@Override
public String setValue(Object val) {
if (val != null) {
@SuppressWarnings("unchecked")

View File

@@ -31,6 +31,7 @@ public class RoleListType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
List<String> list = new ArrayList<String>();
for (String s : StringUtils.split(val, ",")) {
@@ -46,6 +47,7 @@ public class RoleListType implements FieldType {
/**
* 设置对象值(导出)
*/
@Override
public String setValue(Object val) {
if (val != null) {
@SuppressWarnings("unchecked")

View File

@@ -186,6 +186,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
// 手动触发消息推送任务
if (Global.TRUE.equals(Global.getProperty("msg.realtime.enabled"))){
msgPushThreadPool.submit(new Runnable() {
@Override
public void run() {
try{
MsgPushUtils.getMsgPushTask().execute();

View File

@@ -52,7 +52,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
*/
@PostConstruct
private void corpModelValid() throws Exception{
if (Global.isUseCorpModel() != Global.getPropertyToBoolean("user.useCorpModel", "false")){
if (!Global.isUseCorpModel().equals(Global.getPropertyToBoolean("user.useCorpModel", "false"))){
throw new Exception("\n\nuser.useCorpModel=true? 你开启了多租户模式似乎你的当前版本不是JeeSite专业版。\n");
}
}
@@ -91,6 +91,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
/**
* 查询全部用户,仅返回基本信息
*/
@Override
public List<EmpUser> findUserList(EmpUser empUser){
return dao.findUserList(empUser);
}
@@ -98,6 +99,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
/**
* 根据部门编码查询用户,仅返回基本信息
*/
@Override
public List<EmpUser> findUserListByOfficeCodes(EmpUser empUser){
return dao.findUserListByOfficeCodes(empUser);
}
@@ -105,6 +107,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
/**
* 根据角色编码查询用户,仅返回基本信息
*/
@Override
public List<EmpUser> findUserListByRoleCodes(EmpUser empUser){
return dao.findUserListByRoleCodes(empUser);
}
@@ -112,6 +115,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
/**
* 根据岗位编码查询用户,仅返回基本信息
*/
@Override
public List<EmpUser> findUserListByPostCodes(EmpUser empUser){
return dao.findUserListByPostCodes(empUser);
}
@@ -170,6 +174,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
* @param file 导入的用户数据文件
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
*/
@Override
@Transactional
public String importData(MultipartFile file, Boolean isUpdateSupport) {
if (file == null){

View File

@@ -94,6 +94,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
/**
* 查询当前员工关联的岗位信息
*/
@Override
public List<EmployeePost> findEmployeePostList(Employee employee){
EmployeePost employeePost = new EmployeePost();
employeePost.setEmpCode(employee.getEmpCode());
@@ -103,6 +104,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
/**
* 查询当前员工关联的附属机构信息
*/
@Override
public List<EmployeeOffice> findEmployeeOfficeList(Employee employee){
EmployeeOffice employeeOffice = new EmployeeOffice();
employeeOffice.setEmpCode(employee.getEmpCode());

View File

@@ -43,6 +43,7 @@ public class LogServiceSupport extends CrudService<LogDao, Log>
/**
* 不使用数据库事务,执行插入日志
*/
@Override
@Transactional//(propagation = Propagation.NOT_SUPPORTED)
public void insertLog(Log entity) {
DataSourceHolder.setJdbcTransaction(false);

View File

@@ -82,6 +82,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
* @param file 导入的机构数据文件
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
*/
@Override
@Transactional
public String importData(MultipartFile file, Boolean isUpdateSupport) {
if (file == null){

View File

@@ -35,6 +35,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
/**
* 根据名称查询岗位
*/
@Override
public Post getByPostName(Post post) {
Post where = new Post();
where.setPostName(post.getPostName());