|
@@ -1,6 +1,8 @@
|
|
package com.hssx.cloudmodel.service.impl;
|
|
package com.hssx.cloudmodel.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
import com.hssx.cloudmodel.constant.Constant;
|
|
import com.hssx.cloudmodel.constant.Constant;
|
|
import com.hssx.cloudmodel.entity.User;
|
|
import com.hssx.cloudmodel.entity.User;
|
|
import com.hssx.cloudmodel.mapper.UserMapper;
|
|
import com.hssx.cloudmodel.mapper.UserMapper;
|
|
@@ -13,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
+import java.util.List;
|
|
import java.util.UUID;
|
|
import java.util.UUID;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -54,7 +57,18 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public HttpRespMsg pageList(PageUtil page, String account, String keyName) {
|
|
public HttpRespMsg pageList(PageUtil page, String account, String keyName) {
|
|
- return null;
|
|
|
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
|
+ QueryWrapper<User> qw = new QueryWrapper<>();
|
|
|
|
+ if(keyName !=null && !"".equals(keyName)){
|
|
|
|
+ qw.eq("username", keyName);
|
|
|
|
+ }else if(account !=null && !"".equals(account)){
|
|
|
|
+ qw.eq("account", account);
|
|
|
|
+ }
|
|
|
|
+ PageHelper.startPage(page.getPageNum(),page.getPageSize());
|
|
|
|
+ List<User> users = userMapper.selectList(qw);
|
|
|
|
+ PageInfo<User> pageInfos = new PageInfo<>(users);
|
|
|
|
+ msg.data = pageInfos;
|
|
|
|
+ return msg;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|