Commit 959c7e9b authored by taabe's avatar taabe

增加查询公司下所有人信息接口

parent a361df30
......@@ -17,12 +17,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
......@@ -117,4 +112,11 @@ public class CommonController extends BaseController {
List<SUser> users = commonService.getUsers(departmentId);
return CommonResponseUtil.success(users);
}
@ApiOperation(httpMethod = "GET", value = "获取公司下人员列表", notes = "获取公司下人员列表")
@GetMapping(value = "/user/list", produces = "application/json;charset=UTF-8")
public CommonResponse getAllUser() {
List<SUser> users = commonService.getAllUser();
return CommonResponseUtil.success(users);
}
}
......@@ -11,5 +11,8 @@ public interface IUserDao extends BaseDao<SUser, Long> {
public List<SUser> findUserByDeptmentId(BigInteger departmentId, byte isDel);
SUser findById(Long id);
@Query(value = "select * from s_user u where u.is_delete = 0", nativeQuery = true)
List<SUser> findAllUser();
}
......@@ -54,5 +54,8 @@ public class CommonService implements ICommonService {
return userDao.findUserByDeptmentId(new BigInteger(departmentId.toString()), (byte) 0);
}
@Override
public List<SUser> getAllUser() {
return userDao.findAllUser();
}
}
......@@ -23,4 +23,11 @@ public interface ICommonService {
* @return
*/
List<SUser> getUsers(Long departmentId);
/**
* 获取公司下所有用户
*
* @return
*/
List<SUser> getAllUser();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment