修复漏洞 查询用户500

This commit is contained in:
liuchengqian 2023-03-27 14:33:46 +08:00
parent a85ad2e82e
commit ea09ef1fb5
4 changed files with 4 additions and 18 deletions

View File

@ -221,7 +221,7 @@ public class SysUserController {
if (sysUserEntity == null) {
return outputEncapsulationObject(PromptMessageEnum.USER_LOGIN_ERROR, "您还没有注册登录,请先注册登录", locale);
}
List<SysUserEntity> sysUserEntityList = sysUserService.selectAllUser();
List<SysUserEntity> sysUserEntityList = sysUserDao.findAll(Sort.by(Sort.Direction.DESC, "id"));
List<SysUserVo> sysUserVoList = new ArrayList<>();
for (SysUserEntity sysUser : sysUserEntityList) {
sysUserVoList.add(SysUserConvertUtils.convert(sysUser));

View File

@ -4,7 +4,6 @@ import com.xkrs.model.entity.SysUserEntity;
import com.xkrs.model.qo.SysUserQo;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* 系统用户服务接口
@ -59,13 +58,6 @@ public interface SysUserService {
*/
int updateSysUser(SysUserQo sysUserQo);
/**
* 查询用户的信息
*
* @return
*/
List<SysUserEntity> selectAllUser();
/**
* 启用
*

View File

@ -9,7 +9,6 @@ import com.xkrs.model.entity.SysUserEntity;
import com.xkrs.model.qo.SysUserQo;
import com.xkrs.service.RedisService;
import com.xkrs.service.SysUserService;
import com.xkrs.utilsnew.VipTimeRangeUtils;
import org.apache.http.util.TextUtils;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.data.domain.Sort;
@ -304,14 +303,6 @@ public class SysUserServiceImpl implements SysUserService {
return 1;
}
/**
* 查询用户的信息
*/
@Override
public List<SysUserEntity> selectAllUser() {
return sysUserDao.findAll(Sort.by(Sort.Direction.DESC, "id"));
}
/**
* 启用
*/

View File

@ -44,6 +44,9 @@ public class VipTimeRangeUtils {
private static LocalDateTime obtainLastOverTime(String oldVipTimeRangeJson) {
//oldVipTimeRangeJson不为空说明不是新注册用户解析该用户的VIP时间范围
if (TextUtils.isEmpty(oldVipTimeRangeJson)) {
return null;
}
VipTimeRangeBean vipTimeRangeBean = JsonUtils.deserialize(oldVipTimeRangeJson, VipTimeRangeBean.class);
if (vipTimeRangeBean == null || vipTimeRangeBean.getList() == null || vipTimeRangeBean.getList().size() == 0) {
return null;