🔥 精简历史遗留代码

This commit is contained in:
lishangbu committed 2018-09-29 21:16:13 +08:00
1 parent 9278a31f1c
commit 7b4913781d
5 files changed
+3 -32

No files matched your search

@@ -24,20 +24,6 @@ package com.pig4cloud.pigx.common.core.constant;
* @date 2017/10/29
*/
public interface CommonConstant {
/**
* token请求头名称
*/
String REQ_HEADER = "Authorization";
/**
* token分割符
*/
String TOKEN_SPLIT = "Bearer ";
/**
* jwt签名
*/
String SIGN_KEY = "PIG";
/**
* 删除
*/
@@ -57,16 +43,6 @@ public interface CommonConstant {
*/
String MENU = "0";
/**
* 按钮
*/
String BUTTON = "1";
/**
* 删除标记
*/
String DEL_FLAG = "del_flag";
/**
* 编码
*/
@@ -98,10 +98,9 @@ public class PigxUserDetailsServiceImpl implements PigxUserDetailsService {
Collection<? extends GrantedAuthority> authorities
= AuthorityUtils.createAuthorityList(dbAuthsSet.toArray(new String[0]));
SysUser user = info.getSysUser();
boolean enabled = StrUtil.equals(user.getDelFlag(), CommonConstant.STATUS_NORMAL);
// 构造security用户
return new PigxUser(user.getUserId(), user.getDeptId(), user.getUsername(), SecurityConstants.BCRYPT + user.getPassword(), enabled,
true, true, true, authorities);
// 构造security用户
return new PigxUser(user.getUserId(), user.getDeptId(), user.getUsername(), SecurityConstants.BCRYPT + user.getPassword(),
StrUtil.equals(user.getDelFlag(), CommonConstant.STATUS_NORMAL),true, true, true, authorities);
}
}
@@ -71,7 +71,6 @@ public class DictController {
*/
@GetMapping("/dictPage")
public Page dictPage(@RequestParam Map<String, Object> params) {
params.put(CommonConstant.DEL_FLAG, CommonConstant.STATUS_NORMAL);
return sysDictService.selectPage(new Query<>(params), new EntityWrapper<>());
}
@@ -25,7 +25,6 @@ import com.baomidou.mybatisplus.plugins.Page;
import com.pig4cloud.pigx.admin.api.entity.SysLog;
import com.pig4cloud.pigx.admin.api.vo.PreLogVo;
import com.pig4cloud.pigx.admin.service.SysLogService;
import com.pig4cloud.pigx.common.core.constant.CommonConstant;
import com.pig4cloud.pigx.common.core.util.Query;
import com.pig4cloud.pigx.common.core.util.R;
import lombok.AllArgsConstructor;
@@ -58,7 +57,6 @@ public class LogController {
*/
@GetMapping("/logPage")
public Page logPage(@RequestParam Map<String, Object> params) {
params.put(CommonConstant.DEL_FLAG, CommonConstant.STATUS_NORMAL);
return sysLogService.selectPage(new Query<>(params), new EntityWrapper<>());
}
@@ -110,7 +110,6 @@ public class RoleController {
*/
@GetMapping("/rolePage")
public Page rolePage(@RequestParam Map<String, Object> params) {
params.put(CommonConstant.DEL_FLAG, CommonConstant.STATUS_NORMAL);
return sysRoleService.selectwithDeptPage(new Query<>(params), new EntityWrapper<>());
}