mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-22 14:45:43 +08:00
Merge branch 'develop' of https://gitee.com/likeadmin/likeadmin_java into develop
This commit is contained in:
@@ -3,7 +3,12 @@ package com.mdd.common.mapper.admin;
|
||||
import com.mdd.common.core.basics.IBaseMapper;
|
||||
import com.mdd.common.entity.admin.AdminJobs;
|
||||
import com.mdd.common.entity.admin.AdminRole;
|
||||
import com.mdd.common.entity.system.SystemRole;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 角色关联表Mapper
|
||||
@@ -11,4 +16,6 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface AdminJobsMapper extends IBaseMapper<AdminJobs> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@ package com.mdd.common.mapper.admin;
|
||||
import com.mdd.common.core.basics.IBaseMapper;
|
||||
import com.mdd.common.entity.admin.Dept;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 部门表Mapper
|
||||
@@ -10,4 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface DeptMapper extends IBaseMapper<Dept> {
|
||||
|
||||
@Select("SELECT * FROM la_dept dept INNER JOIN la_admin_dept lad ON lad.dept_id = dept.id WHERE lad.admin_id = #{adminId} AND dept.delete_time IS NULL")
|
||||
List<Dept> getByAdminId(@Param("adminId") Integer adminId);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
package com.mdd.common.mapper.admin;
|
||||
|
||||
import com.mdd.common.core.basics.IBaseMapper;
|
||||
import com.mdd.common.entity.admin.AdminJobs;
|
||||
import com.mdd.common.entity.admin.Dept;
|
||||
import com.mdd.common.entity.system.Jobs;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 岗位表Mapper
|
||||
@@ -11,4 +16,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface JobsMapper extends IBaseMapper<Jobs> {
|
||||
|
||||
@Select("SELECT * FROM la_jobs jobs INNER JOIN la_admin_jobs laj ON laj.jobs_id = jobs.id WHERE laj.admin_id = #{adminId} AND jobs.delete_time IS NULL")
|
||||
List<Jobs> getByAdminId(@Param("adminId") Integer adminId);
|
||||
|
||||
}
|
||||
|
||||
@@ -3,10 +3,19 @@ package com.mdd.common.mapper.system;
|
||||
import com.mdd.common.core.basics.IBaseMapper;
|
||||
import com.mdd.common.entity.system.SystemRole;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统角色Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface SystemRoleMapper extends IBaseMapper<SystemRole> {
|
||||
|
||||
|
||||
@Select("SELECT * FROM la_system_role role INNER JOIN la_admin_role lar ON lar.role_id = role.id WHERE lar.admin_id = #{adminId} AND role.delete_time IS NULL")
|
||||
List<SystemRole> getByAdminId(@Param("adminId") Integer adminId);
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,10 @@ public class TimeUtils {
|
||||
* @return String
|
||||
*/
|
||||
public static String timestampToDate(Long time) {
|
||||
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(time * 1000));
|
||||
if (time != null) {
|
||||
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(time * 1000));
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user