用户管理列表以及筛选

master
yuqin 3 years ago
parent 7701d5c69d
commit 8adb116246
  1. 7
      pom.xml
  2. 9
      src/main/java/com/yipin/liuwanr/App.java
  3. 25
      src/main/java/com/yipin/liuwanr/controller/UserInfoController.java
  4. 70
      src/main/java/com/yipin/liuwanr/entity/response/CommonCode.java
  5. 75
      src/main/java/com/yipin/liuwanr/entity/response/ResponseResult.java
  6. 37
      src/main/java/com/yipin/liuwanr/entity/response/ResultCode.java
  7. 65
      src/main/java/com/yipin/liuwanr/entity/response/UserInfoListRes.java
  8. 25
      src/main/java/com/yipin/liuwanr/entity/vo/UserInfoReq.java
  9. 12
      src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java
  10. 2
      src/main/java/com/yipin/liuwanr/mapper/AssesmentRecordMapper.java
  11. 3
      src/main/java/com/yipin/liuwanr/mapper/AttendanceMapper.java
  12. 3
      src/main/java/com/yipin/liuwanr/mapper/CityMapper.java
  13. 2
      src/main/java/com/yipin/liuwanr/mapper/ClassMapper.java
  14. 13
      src/main/java/com/yipin/liuwanr/mapper/CourseMapper.java
  15. 3
      src/main/java/com/yipin/liuwanr/mapper/CoursePermissionsMapper.java
  16. 9
      src/main/java/com/yipin/liuwanr/mapper/CustomerMapper.java
  17. 8
      src/main/java/com/yipin/liuwanr/mapper/DeviceMapper.java
  18. 9
      src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java
  19. 6
      src/main/java/com/yipin/liuwanr/mapper/ExperimentallearningMapper.java
  20. 10
      src/main/java/com/yipin/liuwanr/mapper/GroupMapper.java
  21. 47
      src/main/java/com/yipin/liuwanr/mapper/HrUserAccountMapper.java
  22. 2
      src/main/java/com/yipin/liuwanr/mapper/MakeuplistMapper.java
  23. 2
      src/main/java/com/yipin/liuwanr/mapper/OrderMapper.java
  24. 3
      src/main/java/com/yipin/liuwanr/mapper/PersonalCenterMapper.java
  25. 10
      src/main/java/com/yipin/liuwanr/mapper/PetMapper.java
  26. 3
      src/main/java/com/yipin/liuwanr/mapper/ProvinceMapper.java
  27. 3
      src/main/java/com/yipin/liuwanr/mapper/RecordMapper.java
  28. 3
      src/main/java/com/yipin/liuwanr/mapper/SchoolMapper.java
  29. 3
      src/main/java/com/yipin/liuwanr/mapper/ServiceConfigMapper.java
  30. 2
      src/main/java/com/yipin/liuwanr/mapper/StaffGradeMapper.java
  31. 2
      src/main/java/com/yipin/liuwanr/mapper/StaffMapper.java
  32. 2
      src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java
  33. 7
      src/main/java/com/yipin/liuwanr/mapper/StuProfessionalArchitectureMapper.java
  34. 2
      src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java
  35. 1
      src/main/java/com/yipin/liuwanr/mapper/SysPermissionMapper.java
  36. 1
      src/main/java/com/yipin/liuwanr/mapper/SysRolePermissionMapper.java
  37. 1
      src/main/java/com/yipin/liuwanr/mapper/TeacherProjectAndCourseMapper.java
  38. 3
      src/main/java/com/yipin/liuwanr/mapper/TopicMapper.java
  39. 6
      src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java
  40. 1
      src/main/java/com/yipin/liuwanr/mapper/UserMapper.java
  41. 3
      src/main/java/com/yipin/liuwanr/service/IHrUserAccountService.java
  42. 26
      src/main/java/com/yipin/liuwanr/service/UserInfoService.java
  43. 20
      src/main/java/com/yipin/liuwanr/service/impl/HrUserAccountServiceImpl.java
  44. 111
      src/main/java/com/yipin/liuwanr/util/PageUtils.java
  45. 43
      src/main/resources/mapper/tms/HrUserAccountMapper.xml

@ -289,13 +289,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- MP 核心库 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.0.7.1</version>
</dependency>
</dependencies>
<build>
<finalName>root</finalName>

@ -6,10 +6,17 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@ServletComponentScan(value = "com.yipin.liuwanr.listener")
@MapperScan("com.yipin.liuwanr.mapper")
//@MapperScan("com.yipin.liuwanr.mapper")
@ComponentScan(basePackages = "com.yipin")
//@SpringBootApplication
//@EnableScheduling
////@ComponentScan(basePackages = "com.yipin")
//@MapperScan("com.yipin.liuwanr.mapper")
public class App extends SpringBootServletInitializer{
public static void main(String[] args) {
SpringApplication.run(App.class, args);

@ -1,11 +1,15 @@
package com.yipin.liuwanr.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yipin.liuwanr.entity.*;
import com.yipin.liuwanr.entity.annotation.Log;
import com.yipin.liuwanr.entity.response.ResponseResult;
import com.yipin.liuwanr.entity.vo.AccountLoginVO;
import com.yipin.liuwanr.entity.vo.AdminLoginVO;
import com.yipin.liuwanr.entity.vo.UserInfoReq;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.*;
import com.yipin.liuwanr.util.PageUtils;
import com.yipin.liuwanr.util.UserIdUtils;
import com.yipin.liuwanr.vo.UserInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
@ -44,6 +48,9 @@ public class UserInfoController {
@Autowired
private UserIdUtils userIdUtils;
@Autowired
private IHrUserAccountService iHrUserAccountService;
/**
* 添加用户
@ -146,6 +153,24 @@ public class UserInfoController {
return resp;
}
/**
* 查询用户管理列表
*/
@PostMapping("/queryUserInfoList")
ResponseResult queryUserInfoList(@RequestBody UserInfoReq userInfoReq) {
List data = userInfoService.queryPage(userInfoReq.getPage(), userInfoReq.getSize(), userInfoReq);
return ResponseResult.SUCCESS(data);
}
/**
* 查询用户管理列表(不可用)
*/
@PostMapping("/queryUserInfoList2")
ResponseResult queryUserInfoList2(@RequestBody UserInfoReq userInfoReq) {
PageUtils data = iHrUserAccountService.queryPage2(userInfoReq.getPage(), userInfoReq.getSize(), userInfoReq);
return ResponseResult.SUCCESS(data);
}
/**
* 删除用户(根据ID修改isdel状态,0可见 1不可见)
*/

@ -0,0 +1,70 @@
package com.yipin.liuwanr.entity.response;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;
/**
* @Author: gongsj.
* @Description: 系统操作状态集
* @Date:Created in 2020/09/07 11:35.
* @Modified By:
*/
@ToString
@AllArgsConstructor
public enum CommonCode implements ResultCode {
SUCCESS(true, 10000, "操作成功!"),
FAIL(false, 11111, "操作失败!"),
INEXISTENCE(false,10004,"抱歉,当前客户信息已不存在!"),
START_FAIL(false,10009,"启用或禁用失败,当前用户状态异常!"),
RESET_FAIL(false,10010,"重置密码失败,当前用户状态异常!"),
PERMISSION_IS_NOT(false,10011,"当前角色的权限信息不存在!"),
DISABLE_FAIL(false,10012,"禁用失败,禁用结束时间可能早于当前时间"),
UPDATE_FAIL(false,10005,"更新信息失败!"),
SAVE_FAIL(false,10006,"新增信息失败!"),
DELETE_FAIL(false,10007,"删除失败!"),
UNAUTHENTICATED(false, 10001, "此操作需要登陆系统!"),
UNAUTHORISE(false, 10002, "权限不足,无权操作!"),
INVALID_PARAM(false, 10003, "非法参数!"),
USER_IS_NOT_EXIST(false, 10004, "用户不存在或用户已禁用!"),
USER_LOGIN_NULL(false,10013,"获取当前用户登录信息失败!"),
POSITION_DEPT_NOT_NULL(false,10014,"职位名称或所属部门不能为空!"),
PASSWORD_IS_ERROR(false, 10005, "密码错误!"),
IMPORT_ERROR(false,10008,"导入数据失败!"),
SERVER_ERROR(false, 99999, "抱歉,系统繁忙,请稍后重试!"),
GET_LOGIN_USER_FAIL(false,10015,"获取当前登录用户失败,请稍后重试!");
/**
* 操作是否成功
*/
@Getter
private boolean success;
/**
* 状态码
*/
@Getter
private int code;
/**
* 提示信息
*/
@Getter
private String message;
@Override
public boolean success() {
return this.success;
}
@Override
public int code() {
return this.code;
}
@Override
public String message() {
return this.message;
}
}

@ -0,0 +1,75 @@
package com.yipin.liuwanr.entity.response;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* @Author: gongsj.
* @Description: 统一返回的结果集
* @Date:Created in 2020/09/07 12:28.
* @Modified By:
*/
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class ResponseResult<T> {
/**
* 操作是否成功
*/
private boolean success;
/**
* 状态码
*/
private int code;
/**
* 返回的数据
*/
private T data;
/**
* 提示信息
*/
private String message;
public ResponseResult(boolean success, int code, String message) {
this.success = success;
this.code = code;
this.message = message;
}
public ResponseResult(ResultCode resultCode) {
this.success = resultCode.success();
this.code = resultCode.code();
this.message = resultCode.message();
}
public static ResponseResult SUCCESS() {
return new ResponseResult(CommonCode.SUCCESS);
}
public static ResponseResult SUCCESS(Object t) {
return new ResponseResult<>(true, 10000, t, "操作成功!");
}
public static ResponseResult FAIL(Object t) {
return new ResponseResult<>(false, 99999, t, "操作失败,请检查客户名称是否已存在或者文件和数据格式是否正确!");
}
public ResponseResult SUCCESS_DATA(T t) {
return new ResponseResult<>(false, 20000, t, "操作失败!");
}
public static ResponseResult FAIL() {
return new ResponseResult(CommonCode.FAIL);
}
public static ResponseResult FAIL(int code, String message) {
return new ResponseResult<>(false, code, null, message);
}
}

@ -0,0 +1,37 @@
package com.yipin.liuwanr.entity.response;
/**
* @Author: gongsj.
* @Description: 系统操作状态集接口
* @Date:Created in 2020/09/09 15:35.
* @Modified By:
* 10000-- 通用错误码
* 22000-- 人资管理系统错误码
* 23000-- 人资管理系统认证系统错误码
* 24000-- 客户管理系统错误码
* 25000-- 客户管理系统认证系统错误码
* 26000-- 工作流程管理系统错误码
* 27000-- 担保业务系统错误码
*/
public interface ResultCode {
/**
* 操作是否成功
*
* @return true为成功false操作失败
*/
boolean success();
/**
* 操作码
*
* @return 操作码
*/
int code();
/**
* 提示信息
*
* @return 提示信息
*/
String message();
}

@ -0,0 +1,65 @@
package com.yipin.liuwanr.entity.response;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* <p>
* 用户管理列表
* </p>
*
* @author Qyq
* @since 2021-03-17
*/
@Data
@ToString
public class UserInfoListRes implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户id
*/
@TableId(value = "userId", type = IdType.AUTO)
private Integer userId;
/**
* 用户账号
*/
private String account;
/**
* 用户姓名
*/
private String userName;
/**
* 学校名称
*/
private String schoolName;
/**
* 平台来源
*/
private String platformName;
/**
* 手机号
*/
private String phone;
/**
* 创建时间
*/
private String creationTime;
/**
* 登录次数
*/
private Integer logInNumber;
}

@ -0,0 +1,25 @@
package com.yipin.liuwanr.entity.vo;
import lombok.Data;
/**
* @Author chen
* @DATE 2021/6/7 16:20
* @Version 1.0
*/
@Data
public class UserInfoReq {
private String countries;
private Integer provinceId;
private Integer cityId;
private Integer page;
private Integer size;
private Integer schoolId;
private String roleId;
private String searchContent;
private Integer month;
private String creationTime;
private String endTime;
private Integer platformId;
}

@ -4,22 +4,14 @@ import java.util.List;
import com.yipin.liuwanr.entity.*;
import com.yipin.liuwanr.entity.Class;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
/**
* 考核
* @author 或然
*
*/
@Mapper
public interface AssesmentMapper {

@ -1,5 +1,6 @@
package com.yipin.liuwanr.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@ -10,6 +11,7 @@ import com.yipin.liuwanr.vo.AssesmentRecordVo;
* @author 或然
*
*/
@Mapper
public interface AssesmentRecordMapper {
/**

@ -2,11 +2,12 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.yipin.liuwanr.entity.Attendance;
@Mapper
public interface AttendanceMapper {
/**

@ -4,9 +4,10 @@ import java.util.List;
import com.yipin.liuwanr.entity.StudentCity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
@Mapper
public interface CityMapper {
@Insert("INSERT INTO studentCity(cityName,provinceId,isdel)"

@ -3,6 +3,7 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import com.yipin.liuwanr.entity.Class;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
/**
@ -11,6 +12,7 @@ import org.apache.ibatis.annotations.Select;
* @author 全承珠
*
*/
@Mapper
public interface ClassMapper {
@Select("select classId,className from class where className like concat(#{className},'%') ")

@ -2,15 +2,7 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
import com.yipin.liuwanr.entity.Course;
import com.yipin.liuwanr.entity.CourseLink;
@ -21,9 +13,8 @@ import com.yipin.liuwanr.entity.ProfessionalClass;
import com.yipin.liuwanr.entity.ServiceConfig;
import com.yipin.liuwanr.entity.UserM;
import com.yipin.liuwanr.vo.CourseVO;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface CourseMapper {
//添加课程

@ -3,6 +3,7 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
@ -13,7 +14,7 @@ import com.yipin.liuwanr.entity.Discipline;
import com.yipin.liuwanr.entity.Professional;
import com.yipin.liuwanr.entity.ProfessionalClass;
import com.yipin.liuwanr.entity.ServiceConfig;
@Mapper
public interface CoursePermissionsMapper {
@Insert("INSERT INTO hr_course_permissions(usePeriod,marketPrice,transactionPrice,discount,portAddressId,isDeliverGoods,courseId,orderId,isdel)"

@ -3,16 +3,11 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import com.yipin.liuwanr.entity.*;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
import com.yipin.liuwanr.vo.CustomerVO;
@Mapper
public interface CustomerMapper {
@Insert("INSERT INTO customer(countries,industry,provinceId,adminName,adminPhone,cityId,customerType,stopTime,email,isdel,schoolId,industryClassId,industryId,customerName,creationTime,account,position)"

@ -2,12 +2,7 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
import com.yipin.liuwanr.entity.Action;
import com.yipin.liuwanr.entity.Device;
@ -15,6 +10,7 @@ import com.yipin.liuwanr.entity.Position;
import com.yipin.liuwanr.entity.Relationship;
import com.yipin.liuwanr.entity.UploadInfo;
@Mapper
public interface DeviceMapper {
@Select("SELECT duid, version, tariff, createtime, updatetime FROM lw_device where duid = #{duid}")

@ -2,19 +2,14 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
import com.yipin.liuwanr.entity.ExperimentalClass;
import com.yipin.liuwanr.entity.Professional;
import com.yipin.liuwanr.entity.StuProfessionalArchitecture;
import com.yipin.liuwanr.entity.Student;
@Mapper
public interface ExperimentalClassMapper {
//实验班级添加学生
@Insert("INSERT INTO experimental_class_student(studentId,experimentalClassId)"

@ -3,16 +3,14 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import com.yipin.liuwanr.entity.*;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
/**
* 学生_实验学习
* @author 86151
*
*/
@Mapper
public interface ExperimentallearningMapper {
/**

@ -2,18 +2,12 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;
import com.yipin.liuwanr.entity.Group;
import com.yipin.liuwanr.entity.User;
@Mapper
public interface GroupMapper {
@Results({

@ -1,7 +1,17 @@
package com.yipin.liuwanr.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yipin.liuwanr.entity.HrUserAccount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yipin.liuwanr.entity.response.UserInfoListRes;
import com.yipin.liuwanr.entity.vo.UserInfoReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* <p>
@ -11,6 +21,43 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author Qyq
* @since 2021-06-18
*/
@Mapper
public interface HrUserAccountMapper extends BaseMapper<HrUserAccount> {
@Select({"<script>",
" SELECT\n" +
" ui.userId,\n" +
" GROUP_CONCAT( DISTINCT ua.account ) as account,\n" +
" ui.userName,\n" +
" GROUP_CONCAT( DISTINCT s.schoolName ) AS schoolName,\n" +
" GROUP_CONCAT( DISTINCT p.platformName ) as platformName,\n" +
" ui.phone,\n" +
" ui.creationTime,\n" +
" ui.logInNumber\n" +
" FROM\n" +
" hr_user_info ui\n" +
" INNER JOIN hr_user_account ua ON ui.userId = ua.user_id\n" +
" LEFT JOIN school s on s.schoolId=ua.school_id\n" +
" LEFT JOIN hr_platform p on p.platformId=ua.platform_id where\n" +
" <if test='userInfoReq.creationTime!=null and userInfoReq.endTime!=null and userInfoReq.endTime!=\"\" and userInfoReq.creationTime!=\"\" '> " +
"ui.creationTime between #{userInfoReq.creationTime} and #{userInfoReq.endTime}" +
"</if>\n"+
" <if test='userInfoReq.month !=null'> " +
"AND ui.creationTime &gt; date_sub(curdate(),interval #{userInfoReq.month} MONTH) " +
"</if>\n" +
" <if test='userInfoReq.platformId !=null'> " +
"AND FIND_IN_SET(ua.platform_id,#{userInfoReq.platformId}) " +
"</if>\n" +
" <if test='userInfoReq.schoolId !=null'> " +
"AND FIND_IN_SET(ua.school_id,#{userInfoReq.schoolId}) " +
"</if>\n" +
" <if test='userInfoReq.searchContent !=null'> " +
"AND (ui.userName LIKE CONCAT('%',#{userInfoReq.searchContent},'%') OR ua.account LIKE CONCAT('%',#{userInfoReq.searchContent},'%') OR ui.phone LIKE CONCAT('%',#{userInfoReq.searchContent},'%'))" +
"</if>\n" +
" GROUP BY ui.phone",
"</script> "})
List<UserInfoListRes> pageByCondition(Page page, @Param("userInfoReq") UserInfoReq userInfoReq);
IPage<UserInfoListRes> pageByCondition2(Page page);
}

@ -6,6 +6,7 @@ import com.yipin.liuwanr.entity.Makeuplist;
import com.yipin.liuwanr.entity.Student;
import com.yipin.liuwanr.vo.MakeupStudentsVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@ -15,6 +16,7 @@ import org.apache.ibatis.annotations.Select;
* @author 全承珠
*
*/
@Mapper
public interface MakeuplistMapper {
@Select("select professionalName,gradeName,className,m.studentNumber,studentName from makeuplist m,student s,class c,grade g,professional p " +

@ -12,7 +12,7 @@ import com.yipin.liuwanr.entity.Order;
import com.yipin.liuwanr.vo.OrderVo;
import java.util.List;
@Mapper
public interface OrderMapper {
//添加订单

@ -2,10 +2,11 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import com.yipin.liuwanr.entity.PersonalCenter;
@Mapper
public interface PersonalCenterMapper {
@Select("SELECT us.userId as userId,us.`name` as name,us.userAccount as userAccount,us.`password` as password,us.sex as sex,us.workNumber as workNumber,us.phone as phone,us.email as email,us.logInNumber as logInNumber, sch.schoolName as schoolName, sch.provinceName as provinceName, sch.cityName as cityName, pro.professionalName as professionalName,gra.gradeName as gradeName,cla.className as className,us.accountRole as accountRole,(SELECT GROUP_CONCAT(exp.experimentalClassName) FROM experimental_class_ning exp WHERE FIND_IN_SET(exp.experimentalClassId,stu.experimentalClassId)) AS experimentName FROM user us,school sch,class cla,grade gra,professional pro,student stu, experimental_class_ning exp WHERE us.schoolId = sch.schoolId and us.teachingProfessional = pro.professionalId and us.phone = stu.phone and stu.gradeId = gra.gradeId and cla.gradeId = gra.gradeId and us.userId = #{userId} GROUP BY us.userId")

@ -2,18 +2,12 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;
import com.yipin.liuwanr.entity.Breed;
import com.yipin.liuwanr.entity.Pet;
@Mapper
public interface PetMapper {
@Results({

@ -3,11 +3,12 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import com.yipin.liuwanr.entity.Province;
@Mapper
public interface ProvinceMapper {
@Insert("INSERT INTO province(provinceName,isdel)"

@ -2,12 +2,13 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.yipin.liuwanr.entity.Record;
import com.yipin.liuwanr.vo.PracticeRecordVo;
@Mapper
public interface RecordMapper {

@ -3,11 +3,12 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import com.yipin.liuwanr.entity.School;
@Mapper
public interface SchoolMapper {
@Insert("INSERT INTO school(schoolName,provinceId,cityId,level,isdel)"

@ -2,11 +2,12 @@ package com.yipin.liuwanr.mapper;
import com.yipin.liuwanr.entity.ServiceConfig;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
@Mapper
public interface ServiceConfigMapper {
@Insert("INSERT INTO service_config(systemName,systemType,systemAttribution,systemStatus,isdel) VALUES(#{systemName},#{systemType},#{systemAttribution},#{systemStatus},0)")

@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.*;
import com.yipin.liuwanr.entity.Staff;
import com.yipin.liuwanr.entity.StaffGrade;
@Mapper
public interface StaffGradeMapper {
@Insert("INSERT INTO staff_grade(staffGradeName,staffProfessionalArchitectureId,isdel)"
+ "VALUES(#{staffGradeName},#{staffProfessionalArchitectureId},0)")

@ -8,7 +8,7 @@ import com.yipin.liuwanr.vo.UserVO;
import org.apache.ibatis.annotations.*;
import io.lettuce.core.dynamic.annotation.Param;
@Mapper
public interface StaffMapper {
// @Insert("INSERT INTO staff(staffName,staffWorkNumber,phone,email,staffProfessionalArchitectureId,staffGradeId,roleId,isdel,uniqueIdentificationAccount,schoolId)VALUES(#{staffName},#{staffWorkNumber},#{phone},#{email},#{staffProfessionalArchitectureId},#{staffGradeId},#{roleId},0,#{uniqueIdentificationAccount},#{schoolId})")
// void addStaff(Staff staff);

@ -5,7 +5,7 @@ import java.util.List;
import org.apache.ibatis.annotations.*;
import com.yipin.liuwanr.entity.StaffProfessionalArchitecture;
@Mapper
public interface StaffProfessionalArchitectureMapper {
@Insert("INSERT INTO staff_professional_architecture(staffProfessionalArchitectureName,schoolId,isdel)"

@ -3,15 +3,12 @@ package com.yipin.liuwanr.mapper;
import java.util.List;
import com.yipin.liuwanr.entity.Class;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
import com.yipin.liuwanr.entity.Grade;
import com.yipin.liuwanr.entity.StuProfessionalArchitecture;
import com.yipin.liuwanr.entity.Student;
@Mapper
public interface StuProfessionalArchitectureMapper {
@Insert("INSERT INTO stu_professional_architecture(stuProfessionalArchitectureName,schoolId,isdel)"

@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.*;
import com.yipin.liuwanr.entity.Student;
import io.lettuce.core.dynamic.annotation.Param;
@Mapper
public interface StudentMapper {
//添加学生

@ -16,6 +16,7 @@ import java.util.List;
* @author Qyq
* @since 2021-02-26
*/
@Mapper
public interface SysPermissionMapper extends BaseMapper<SysPermission> {
@Select({"<script>",
" select id,code,name,parent_id as parentId,level,menu_or_not as menuOrNot," +

@ -17,6 +17,7 @@ import java.util.List;
* @author Qyq
* @since 2021-02-26
*/
@Mapper
public interface SysRolePermissionMapper extends BaseMapper<SysRolePermission> {
@Select({"<script>",

@ -14,6 +14,7 @@ import com.yipin.liuwanr.entity.Project_Management;
* @author 或然
*
*/
@Mapper
public interface TeacherProjectAndCourseMapper {
/**

@ -4,12 +4,13 @@ import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import com.yipin.liuwanr.entity.Comment;
import com.yipin.liuwanr.entity.Topic;
import com.yipin.liuwanr.entity.User;
@Mapper
public interface TopicMapper {
@Select("SELECT t.*,nickname,avatar,comment,praise,follow,opinion FROM (select * from `lw_topic` where tuid=#{tuid}) as t left join (select tuid, count(id) as comment from `lw_comment` where type= 1 GROUP BY tuid) c1 on t.`tuid`= c1.`tuid` left join (select tuid, count(id) as praise from `lw_topic_opinion` where type=2 GROUP BY tuid) c2 on t.`tuid`= c2.`tuid` left join ( select tuid, count(id) as follow from `lw_topic_opinion` where type= 3 GROUP BY tuid) as c3 on t.`tuid`= c3.`tuid` left join (select tuid, type as opinion from lw_topic_opinion where uuid=#{uuid}) as c4 on t.tuid=c4.tuid left join lw_user as u on t.uuid=u.uuid")

@ -1,15 +1,11 @@
package com.yipin.liuwanr.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yipin.liuwanr.entity.*;
import com.yipin.liuwanr.vo.UserInfoReceiveVo;
import com.yipin.liuwanr.vo.UserInfoVO;
import com.yipin.liuwanr.vo.UserVO;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;
import java.util.List;
@Mapper
public interface UserInfoMapper {
@Update({"<script>",
"UPDATE lw_user SET",

@ -7,6 +7,7 @@ import org.apache.ibatis.mapping.FetchType;
import java.util.List;
@Mapper
public interface UserMapper {
@Select("SELECT uuid,mobile,email,wxid,qqid,aliid,sinaid,netid,nickname,sex,birthday,sign,avatar,country,province,city,password,createtime,updatetime FROM lw_user")

@ -2,6 +2,8 @@ package com.yipin.liuwanr.service;
import com.yipin.liuwanr.entity.HrUserAccount;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yipin.liuwanr.entity.vo.UserInfoReq;
import com.yipin.liuwanr.util.PageUtils;
/**
* <p>
@ -12,5 +14,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @since 2021-06-18
*/
public interface IHrUserAccountService extends IService<HrUserAccount> {
PageUtils queryPage2(Integer page, Integer size, UserInfoReq userInfoReq);
}

@ -1,17 +1,19 @@
package com.yipin.liuwanr.service;
import com.aliyun.oss.OSSClient;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yipin.liuwanr.AliyunOssConfig;
import com.yipin.liuwanr.entity.*;
import com.yipin.liuwanr.entity.response.UserInfoListRes;
import com.yipin.liuwanr.entity.vo.UserInfoReq;
import com.yipin.liuwanr.helper.OssConfigUtil;
import com.yipin.liuwanr.helper.RandomUtil;
import com.yipin.liuwanr.mapper.OrganizationRelationshipMapper;
import com.yipin.liuwanr.mapper.StaffMapper;
import com.yipin.liuwanr.mapper.StudentMapper;
import com.yipin.liuwanr.mapper.UserInfoMapper;
import com.yipin.liuwanr.mapper.*;
import com.yipin.liuwanr.util.MD5;
import com.yipin.liuwanr.util.PageUtils;
import com.yipin.liuwanr.vo.UserInfoReceiveVo;
import org.jboss.logging.Logger;
import org.springframework.beans.factory.BeanFactory;
@ -59,6 +61,9 @@ public class UserInfoService {
@Autowired
private OrganizationRelationshipMapper organizationRelationshipMapper;
@Autowired
private HrUserAccountMapper hrUserAccountMapper;
public HashMap<String, Object> login(String id, String password){
HashMap<String, Object> resp = new HashMap<String, Object>();
User user = null;
@ -936,4 +941,17 @@ public class UserInfoService {
return flag;
}
public List queryPage(Integer page, Integer size, UserInfoReq userInfoReq) {
//分页参数
if (page <= 0) {
page = 1;
}
if (size <= 0) {
size = 10;
}
List<UserInfoListRes> positionVO = hrUserAccountMapper.pageByCondition(new Page(page, size),userInfoReq);
return positionVO;
}
}

@ -1,9 +1,15 @@
package com.yipin.liuwanr.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yipin.liuwanr.entity.HrUserAccount;
import com.yipin.liuwanr.entity.response.UserInfoListRes;
import com.yipin.liuwanr.entity.vo.UserInfoReq;
import com.yipin.liuwanr.mapper.HrUserAccountMapper;
import com.yipin.liuwanr.service.IHrUserAccountService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yipin.liuwanr.util.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
@ -16,5 +22,19 @@ import org.springframework.stereotype.Service;
*/
@Service
public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, HrUserAccount> implements IHrUserAccountService {
@Autowired
private HrUserAccountMapper hrUserAccountMapper;
public PageUtils queryPage2(Integer page, Integer size, UserInfoReq userInfoReq) {
//分页参数
if (page <= 0) {
page = 1;
}
if (size <= 0) {
size = 10;
}
IPage<UserInfoListRes> positionVO = hrUserAccountMapper.pageByCondition2(new Page(page, size));
return new PageUtils(positionVO);
}
}

@ -0,0 +1,111 @@
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.yipin.liuwanr.util;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.io.Serializable;
import java.util.List;
/**
* 分页工具类
*
* @author Mark sunlightcs@gmail.com
*/
public class PageUtils implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 总记录数
*/
private int totalCount;
/**
* 每页记录数
*/
private int pageSize;
/**
* 总页数
*/
private int totalPage;
/**
* 当前页数
*/
private int currPage;
/**
* 列表数据
*/
private List<?> list;
/**
* 分页
* @param list 列表数据
* @param totalCount 总记录数
* @param pageSize 每页记录数
* @param currPage 当前页数
*/
public PageUtils(List<?> list, int totalCount, int pageSize, int currPage) {
this.list = list;
this.totalCount = totalCount;
this.pageSize = pageSize;
this.currPage = currPage;
this.totalPage = (int) Math.ceil((double) totalCount / pageSize);
}
/**
* 分页
*/
public PageUtils(IPage<?> page) {
this.list = page.getRecords();
this.totalCount = (int) page.getTotal();
this.pageSize = (int) page.getSize();
this.currPage = (int) page.getCurrent();
this.totalPage = (int) page.getPages();
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getCurrPage() {
return currPage;
}
public void setCurrPage(int currPage) {
this.currPage = currPage;
}
public List<?> getList() {
return list;
}
public void setList(List<?> list) {
this.list = list;
}
}

@ -16,5 +16,48 @@
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
<resultMap id="UserInfoListRes" type="com.yipin.liuwanr.entity.response.UserInfoListRes">
<result property="userId" column="userId"/>
<result property="account" column="account"/>
<result property="userName" column="userName"/>
<result property="schoolName" column="schoolId"/>
<result property="platformName" column="platformId"/>
<result property="phone" column="phone"/>
<result property="creationTime" column="creationTime"/>
</resultMap>
<select id="pageByCondition" parameterType="com.yipin.liuwanr.entity.vo.UserInfoReq" resultMap="UserInfoListRes">
SELECT
ui.userId,
GROUP_CONCAT( DISTINCT ua.account ) as account,
ui.userName,
GROUP_CONCAT( DISTINCT ua.school_id ) as schoolId,
GROUP_CONCAT( DISTINCT ua.platform_id ) as platformId,
ui.phone,
ui.creationTime,
ui.logInNumber
FROM
hr_user_info ui
INNER JOIN hr_user_account ua ON ui.userId = ua.user_id
GROUP BY
ui.phone
</select>
<select id="pageByCondition2" resultMap="UserInfoListRes">
SELECT
ui.userId,
GROUP_CONCAT( DISTINCT ua.account ) as account,
ui.userName,
GROUP_CONCAT( DISTINCT ua.school_id ) as schoolId,
GROUP_CONCAT( DISTINCT ua.platform_id ) as platformId,
ui.phone,
ui.creationTime
FROM
hr_user_info ui
INNER JOIN hr_user_account ua ON ui.userId = ua.user_id
GROUP BY
ui.phone
</select>
</mapper>

Loading…
Cancel
Save