|
|
|
@ -6,8 +6,10 @@ import com.keyware.shandan.common.entity.Result; |
|
|
|
|
import com.keyware.shandan.common.util.*; |
|
|
|
|
import com.keyware.shandan.frame.config.security.SecurityUtil; |
|
|
|
|
import com.keyware.shandan.frame.properties.CustomProperties; |
|
|
|
|
import com.keyware.shandan.system.entity.SysFormConfig; |
|
|
|
|
import com.keyware.shandan.system.entity.SysRole; |
|
|
|
|
import com.keyware.shandan.system.entity.SysUser; |
|
|
|
|
import com.keyware.shandan.system.service.SysFormConfigService; |
|
|
|
|
import com.keyware.shandan.system.service.SysRoleService; |
|
|
|
|
import com.keyware.shandan.system.utils.SysSettingUtil; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
@ -25,7 +27,9 @@ import org.springframework.web.servlet.ModelAndView; |
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* AES + RSA 加解密AOP处理 |
|
|
|
@ -44,6 +48,9 @@ public class SafetyAspect { |
|
|
|
|
@Autowired |
|
|
|
|
private SysRoleService sysRoleService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private SysFormConfigService formConfigService; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Pointcut 切入点 |
|
|
|
|
*/ |
|
|
|
@ -98,7 +105,7 @@ public class SafetyAspect { |
|
|
|
|
ModelAndView modelAndView = (ModelAndView) result; |
|
|
|
|
modelAndView.addObject("publicKey", RsaUtil.getPublicKey()); |
|
|
|
|
modelAndView.addObject("sys", SysSettingUtil.getCurrentSysSetting()); |
|
|
|
|
SysUser loginUser = SecurityUtil.getLoginSysUser(); |
|
|
|
|
SysUser loginUser = SecurityUtil.getLoginSysUser(); |
|
|
|
|
loginUser.setPassword(null); |
|
|
|
|
modelAndView.addObject("loginUser", loginUser); |
|
|
|
|
//登录用户角色信息
|
|
|
|
@ -121,6 +128,10 @@ public class SafetyAspect { |
|
|
|
|
} |
|
|
|
|
//展示用户角色
|
|
|
|
|
modelAndView.addObject("userRole", userRoles.get(index)); |
|
|
|
|
List<SysFormConfig> formConfigList = formConfigService.list(); |
|
|
|
|
|
|
|
|
|
modelAndView.addObject("metadataFormConfig", formConfigList.stream().filter(conf -> conf.getFormType() == 1).collect(Collectors.toList())); |
|
|
|
|
modelAndView.addObject("uploadFormConfig", formConfigList.stream().filter(conf -> conf.getFormType() == 2).collect(Collectors.toList())); |
|
|
|
|
setStaticResourceAddress(request, modelAndView); |
|
|
|
|
} |
|
|
|
|
return result; |
|
|
|
|