泛型函数返回类型优化

This commit is contained in:
thinkgem
2020-09-28 15:12:03 +08:00
parent 4e6e22e4dc
commit ac4c092a1c
3 changed files with 3 additions and 3 deletions

View File

@@ -107,7 +107,7 @@ public class EmpUser extends User {
@ExcelField(title="最后登录", attrName="lastLoginDate", align=Align.CENTER, words=20, sort=900, type=ExcelField.Type.EXPORT), @ExcelField(title="最后登录", attrName="lastLoginDate", align=Align.CENTER, words=20, sort=900, type=ExcelField.Type.EXPORT),
}) })
public Employee getEmployee(){ public Employee getEmployee(){
Employee employee = (Employee)super.getRefObj(); Employee employee = super.getRefObj();
if (employee == null){ if (employee == null){
employee = new Employee(getRefCode()); employee = new Employee(getRefCode());
super.setRefObj(employee); super.setRefObj(employee);

View File

@@ -54,7 +54,7 @@ public class EmpUtils {
*/ */
public static Employee get(User user){ public static Employee get(User user){
if (user != null && User.USER_TYPE_EMPLOYEE.equals(user.getUserType())){ if (user != null && User.USER_TYPE_EMPLOYEE.equals(user.getUserType())){
return (Employee)user.getRefObj(); return user.getRefObj();
} }
return null; return null;
} }

View File

@@ -6,7 +6,7 @@ set global read_only=0;
create user 'jeesite'@'%' identified by 'jeesite'; create user 'jeesite'@'%' identified by 'jeesite';
create database jeesite DEFAULT CHARSET 'utf8' COLLATE 'utf8_unicode_ci'; create database jeesite DEFAULT CHARSET 'utf8' COLLATE 'utf8_general_ci';
grant all privileges on jeesite.* to 'jeesite'@'%' identified by 'jeesite'; grant all privileges on jeesite.* to 'jeesite'@'%' identified by 'jeesite';