|
@@ -47,6 +47,7 @@ import com.qunzhixinxi.hnqz.common.core.constant.CacheConstants;
|
|
|
import com.qunzhixinxi.hnqz.common.core.constant.CommonConstants;
|
|
|
import com.qunzhixinxi.hnqz.common.core.util.R;
|
|
|
import com.qunzhixinxi.hnqz.common.data.datascope.DataScope;
|
|
|
+import com.qunzhixinxi.hnqz.common.security.encoder.SM4PasswordEncoder;
|
|
|
import com.qunzhixinxi.hnqz.common.security.service.HnqzUser;
|
|
|
import com.qunzhixinxi.hnqz.common.security.util.SecurityUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
@@ -57,7 +58,6 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.cache.annotation.Caching;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -85,7 +85,7 @@ import java.util.stream.Stream;
|
|
|
@AllArgsConstructor
|
|
|
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
|
|
|
|
|
|
- private static final PasswordEncoder ENCODER = new BCryptPasswordEncoder();
|
|
|
+ private static final PasswordEncoder ENCODER = new SM4PasswordEncoder();
|
|
|
|
|
|
private final SysMenuService sysMenuService;
|
|
|
private final SysRoleService sysRoleService;
|
|
@@ -766,14 +766,14 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
}
|
|
|
|
|
|
|
|
|
- //每页数据条数
|
|
|
+ // 每页数据条数
|
|
|
Page<UserVO> page1 = new Page<>();
|
|
|
int current = Long.valueOf(page.getCurrent()).intValue();
|
|
|
int size = Long.valueOf(page.getSize()).intValue();
|
|
|
|
|
|
int count = userList.size();
|
|
|
List<UserVO> pageList = new ArrayList<>();
|
|
|
- //计算当前页第一条数据的下标
|
|
|
+ // 计算当前页第一条数据的下标
|
|
|
int currId = current > 1 ? (current - 1) * size : 0;
|
|
|
for (int i = 0; i < size && i < count - currId; i++) {
|
|
|
pageList.add(userList.get(currId + i));
|
|
@@ -781,7 +781,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
page1.setSize(size);
|
|
|
page1.setCurrent(current);
|
|
|
page1.setTotal(count);
|
|
|
- //计算分页总页数
|
|
|
+ // 计算分页总页数
|
|
|
page1.setPages(count % 10 == 0 ? count / 10 : count / 10 + 1);
|
|
|
page1.setRecords(pageList);
|
|
|
return page1;
|
|
@@ -928,16 +928,16 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
public List<UserVO> getUserVoByPlatId(UserDTO userDTO) {
|
|
|
|
|
|
// 放开角色校验
|
|
|
- //List<Integer> roleList = new ArrayList<>();
|
|
|
- //roleList.add(5);
|
|
|
- //roleList.add(6);
|
|
|
- //roleList.add(10);
|
|
|
+ // List<Integer> roleList = new ArrayList<>();
|
|
|
+ // roleList.add(5);
|
|
|
+ // roleList.add(6);
|
|
|
+ // roleList.add(10);
|
|
|
//// 患者教育-HCP角色
|
|
|
- //roleList.add(13);
|
|
|
+ // roleList.add(13);
|
|
|
//// 招商经理
|
|
|
- //roleList.add(31);
|
|
|
+ // roleList.add(31);
|
|
|
//
|
|
|
- //userDTO.setRole(roleList);
|
|
|
+ // userDTO.setRole(roleList);
|
|
|
return baseMapper.getUserVoByPlatId(userDTO);
|
|
|
}
|
|
|
|