From 8adb1162460c2c74aebd52c38212e59ecdafa4d2 Mon Sep 17 00:00:00 2001 From: yuqin <1627766274@qq.com> Date: Tue, 22 Jun 2021 15:40:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BB=A5=E5=8F=8A=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 7 -- src/main/java/com/yipin/liuwanr/App.java | 9 +- .../controller/UserInfoController.java | 25 ++++ .../liuwanr/entity/response/CommonCode.java | 70 +++++++++++ .../entity/response/ResponseResult.java | 75 ++++++++++++ .../liuwanr/entity/response/ResultCode.java | 37 ++++++ .../entity/response/UserInfoListRes.java | 65 ++++++++++ .../yipin/liuwanr/entity/vo/UserInfoReq.java | 25 ++++ .../yipin/liuwanr/mapper/AssesmentMapper.java | 12 +- .../liuwanr/mapper/AssesmentRecordMapper.java | 2 + .../liuwanr/mapper/AttendanceMapper.java | 3 +- .../com/yipin/liuwanr/mapper/CityMapper.java | 3 +- .../com/yipin/liuwanr/mapper/ClassMapper.java | 2 + .../yipin/liuwanr/mapper/CourseMapper.java | 13 +- .../mapper/CoursePermissionsMapper.java | 3 +- .../yipin/liuwanr/mapper/CustomerMapper.java | 9 +- .../yipin/liuwanr/mapper/DeviceMapper.java | 8 +- .../mapper/ExperimentalClassMapper.java | 9 +- .../mapper/ExperimentallearningMapper.java | 6 +- .../com/yipin/liuwanr/mapper/GroupMapper.java | 10 +- .../liuwanr/mapper/HrUserAccountMapper.java | 47 ++++++++ .../liuwanr/mapper/MakeuplistMapper.java | 2 + .../com/yipin/liuwanr/mapper/OrderMapper.java | 2 +- .../liuwanr/mapper/PersonalCenterMapper.java | 3 +- .../com/yipin/liuwanr/mapper/PetMapper.java | 10 +- .../yipin/liuwanr/mapper/ProvinceMapper.java | 3 +- .../yipin/liuwanr/mapper/RecordMapper.java | 3 +- .../yipin/liuwanr/mapper/SchoolMapper.java | 3 +- .../liuwanr/mapper/ServiceConfigMapper.java | 3 +- .../liuwanr/mapper/StaffGradeMapper.java | 4 +- .../com/yipin/liuwanr/mapper/StaffMapper.java | 2 +- .../StaffProfessionalArchitectureMapper.java | 2 +- .../StuProfessionalArchitectureMapper.java | 7 +- .../yipin/liuwanr/mapper/StudentMapper.java | 2 +- .../liuwanr/mapper/SysPermissionMapper.java | 1 + .../mapper/SysRolePermissionMapper.java | 1 + .../mapper/TeacherProjectAndCourseMapper.java | 1 + .../com/yipin/liuwanr/mapper/TopicMapper.java | 3 +- .../yipin/liuwanr/mapper/UserInfoMapper.java | 6 +- .../com/yipin/liuwanr/mapper/UserMapper.java | 1 + .../service/IHrUserAccountService.java | 3 + .../liuwanr/service/UserInfoService.java | 26 +++- .../impl/HrUserAccountServiceImpl.java | 20 ++++ .../com/yipin/liuwanr/util/PageUtils.java | 111 ++++++++++++++++++ .../mapper/tms/HrUserAccountMapper.xml | 43 +++++++ 45 files changed, 604 insertions(+), 98 deletions(-) create mode 100644 src/main/java/com/yipin/liuwanr/entity/response/CommonCode.java create mode 100644 src/main/java/com/yipin/liuwanr/entity/response/ResponseResult.java create mode 100644 src/main/java/com/yipin/liuwanr/entity/response/ResultCode.java create mode 100644 src/main/java/com/yipin/liuwanr/entity/response/UserInfoListRes.java create mode 100644 src/main/java/com/yipin/liuwanr/entity/vo/UserInfoReq.java create mode 100644 src/main/java/com/yipin/liuwanr/util/PageUtils.java diff --git a/pom.xml b/pom.xml index 01a5255..c363b3c 100644 --- a/pom.xml +++ b/pom.xml @@ -289,13 +289,6 @@ - - - - com.baomidou - mybatis-plus-boot-starter - 3.0.7.1 - root diff --git a/src/main/java/com/yipin/liuwanr/App.java b/src/main/java/com/yipin/liuwanr/App.java index 389bd75..73df8ab 100644 --- a/src/main/java/com/yipin/liuwanr/App.java +++ b/src/main/java/com/yipin/liuwanr/App.java @@ -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); diff --git a/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java b/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java index 2d07e3f..983ab3f 100644 --- a/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java +++ b/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java @@ -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不可见) */ diff --git a/src/main/java/com/yipin/liuwanr/entity/response/CommonCode.java b/src/main/java/com/yipin/liuwanr/entity/response/CommonCode.java new file mode 100644 index 0000000..25e38d3 --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/entity/response/CommonCode.java @@ -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; + } +} diff --git a/src/main/java/com/yipin/liuwanr/entity/response/ResponseResult.java b/src/main/java/com/yipin/liuwanr/entity/response/ResponseResult.java new file mode 100644 index 0000000..2c3ac93 --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/entity/response/ResponseResult.java @@ -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 { + /** + * 操作是否成功 + */ + 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); + } + +} diff --git a/src/main/java/com/yipin/liuwanr/entity/response/ResultCode.java b/src/main/java/com/yipin/liuwanr/entity/response/ResultCode.java new file mode 100644 index 0000000..796ec3c --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/entity/response/ResultCode.java @@ -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(); +} diff --git a/src/main/java/com/yipin/liuwanr/entity/response/UserInfoListRes.java b/src/main/java/com/yipin/liuwanr/entity/response/UserInfoListRes.java new file mode 100644 index 0000000..5961a52 --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/entity/response/UserInfoListRes.java @@ -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; + +/** + *

+ * 用户管理列表 + *

+ * + * @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; + +} diff --git a/src/main/java/com/yipin/liuwanr/entity/vo/UserInfoReq.java b/src/main/java/com/yipin/liuwanr/entity/vo/UserInfoReq.java new file mode 100644 index 0000000..1d1cff3 --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/entity/vo/UserInfoReq.java @@ -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; +} diff --git a/src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java b/src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java index 4396b3b..9967e03 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java @@ -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 { diff --git a/src/main/java/com/yipin/liuwanr/mapper/AssesmentRecordMapper.java b/src/main/java/com/yipin/liuwanr/mapper/AssesmentRecordMapper.java index 0de0d8c..46a6f87 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/AssesmentRecordMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/AssesmentRecordMapper.java @@ -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 { /** diff --git a/src/main/java/com/yipin/liuwanr/mapper/AttendanceMapper.java b/src/main/java/com/yipin/liuwanr/mapper/AttendanceMapper.java index c87010c..ad7f116 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/AttendanceMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/AttendanceMapper.java @@ -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 { /** diff --git a/src/main/java/com/yipin/liuwanr/mapper/CityMapper.java b/src/main/java/com/yipin/liuwanr/mapper/CityMapper.java index 4e122e9..1143ded 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/CityMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/CityMapper.java @@ -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)" diff --git a/src/main/java/com/yipin/liuwanr/mapper/ClassMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ClassMapper.java index 23d7b28..fbb57ba 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/ClassMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/ClassMapper.java @@ -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},'%') ") diff --git a/src/main/java/com/yipin/liuwanr/mapper/CourseMapper.java b/src/main/java/com/yipin/liuwanr/mapper/CourseMapper.java index fa52eb2..75e629c 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/CourseMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/CourseMapper.java @@ -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 { //添加课程 diff --git a/src/main/java/com/yipin/liuwanr/mapper/CoursePermissionsMapper.java b/src/main/java/com/yipin/liuwanr/mapper/CoursePermissionsMapper.java index bb3df72..38d4ac9 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/CoursePermissionsMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/CoursePermissionsMapper.java @@ -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)" diff --git a/src/main/java/com/yipin/liuwanr/mapper/CustomerMapper.java b/src/main/java/com/yipin/liuwanr/mapper/CustomerMapper.java index e1d1582..14140ab 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/CustomerMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/CustomerMapper.java @@ -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)" diff --git a/src/main/java/com/yipin/liuwanr/mapper/DeviceMapper.java b/src/main/java/com/yipin/liuwanr/mapper/DeviceMapper.java index d33f7a4..603d58a 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/DeviceMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/DeviceMapper.java @@ -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}") diff --git a/src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java index 6b2624a..9d5bbc7 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java @@ -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)" diff --git a/src/main/java/com/yipin/liuwanr/mapper/ExperimentallearningMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ExperimentallearningMapper.java index 22b44ee..1cab3cc 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/ExperimentallearningMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/ExperimentallearningMapper.java @@ -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 { /** diff --git a/src/main/java/com/yipin/liuwanr/mapper/GroupMapper.java b/src/main/java/com/yipin/liuwanr/mapper/GroupMapper.java index 09e5db4..e82b030 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/GroupMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/GroupMapper.java @@ -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({ diff --git a/src/main/java/com/yipin/liuwanr/mapper/HrUserAccountMapper.java b/src/main/java/com/yipin/liuwanr/mapper/HrUserAccountMapper.java index 1bd6ade..2cb21a4 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/HrUserAccountMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/HrUserAccountMapper.java @@ -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; + /** *

@@ -11,6 +21,43 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @author Qyq * @since 2021-06-18 */ +@Mapper public interface HrUserAccountMapper extends BaseMapper { + @Select({" "}) + List pageByCondition(Page page, @Param("userInfoReq") UserInfoReq userInfoReq); + + IPage pageByCondition2(Page page); + } diff --git a/src/main/java/com/yipin/liuwanr/mapper/MakeuplistMapper.java b/src/main/java/com/yipin/liuwanr/mapper/MakeuplistMapper.java index 7d39557..151a31e 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/MakeuplistMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/MakeuplistMapper.java @@ -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 " + diff --git a/src/main/java/com/yipin/liuwanr/mapper/OrderMapper.java b/src/main/java/com/yipin/liuwanr/mapper/OrderMapper.java index 1ad5fdf..ab39fbc 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/OrderMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/OrderMapper.java @@ -12,7 +12,7 @@ import com.yipin.liuwanr.entity.Order; import com.yipin.liuwanr.vo.OrderVo; import java.util.List; - +@Mapper public interface OrderMapper { //添加订单 diff --git a/src/main/java/com/yipin/liuwanr/mapper/PersonalCenterMapper.java b/src/main/java/com/yipin/liuwanr/mapper/PersonalCenterMapper.java index 360d4c9..c6cc2ec 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/PersonalCenterMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/PersonalCenterMapper.java @@ -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") diff --git a/src/main/java/com/yipin/liuwanr/mapper/PetMapper.java b/src/main/java/com/yipin/liuwanr/mapper/PetMapper.java index fc5c1af..adcd855 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/PetMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/PetMapper.java @@ -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({ diff --git a/src/main/java/com/yipin/liuwanr/mapper/ProvinceMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ProvinceMapper.java index ad11bb3..87a1eff 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/ProvinceMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/ProvinceMapper.java @@ -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)" diff --git a/src/main/java/com/yipin/liuwanr/mapper/RecordMapper.java b/src/main/java/com/yipin/liuwanr/mapper/RecordMapper.java index bb271ae..9053eaf 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/RecordMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/RecordMapper.java @@ -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 { diff --git a/src/main/java/com/yipin/liuwanr/mapper/SchoolMapper.java b/src/main/java/com/yipin/liuwanr/mapper/SchoolMapper.java index 96f6cec..2586a94 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/SchoolMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/SchoolMapper.java @@ -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)" diff --git a/src/main/java/com/yipin/liuwanr/mapper/ServiceConfigMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ServiceConfigMapper.java index d4fdafd..dae2458 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/ServiceConfigMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/ServiceConfigMapper.java @@ -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)") diff --git a/src/main/java/com/yipin/liuwanr/mapper/StaffGradeMapper.java b/src/main/java/com/yipin/liuwanr/mapper/StaffGradeMapper.java index 8cfc09e..490388c 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/StaffGradeMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/StaffGradeMapper.java @@ -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)") @@ -34,7 +34,7 @@ public interface StaffGradeMapper { @Select({" "}) - List queryStaffGradeDetails(Integer staffGradeId); + List queryStaffGradeDetails(Integer staffGradeId); @Update("UPDATE staff_grade SET staffGradeName = #{staffGradeName},staffProfessionalArchitectureId = #{staffProfessionalArchitectureId} where staffGradeId = #{staffGradeId}") void updateStaffGrade(StaffGrade staffGrade); diff --git a/src/main/java/com/yipin/liuwanr/mapper/StaffMapper.java b/src/main/java/com/yipin/liuwanr/mapper/StaffMapper.java index dc58cb2..24411e1 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/StaffMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/StaffMapper.java @@ -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); diff --git a/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java b/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java index f862f83..10f37c8 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java @@ -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)" diff --git a/src/main/java/com/yipin/liuwanr/mapper/StuProfessionalArchitectureMapper.java b/src/main/java/com/yipin/liuwanr/mapper/StuProfessionalArchitectureMapper.java index f8fd98e..9f79b94 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/StuProfessionalArchitectureMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/StuProfessionalArchitectureMapper.java @@ -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)" diff --git a/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java b/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java index b083055..25cbe49 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java @@ -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 { //添加学生 diff --git a/src/main/java/com/yipin/liuwanr/mapper/SysPermissionMapper.java b/src/main/java/com/yipin/liuwanr/mapper/SysPermissionMapper.java index 463bd62..fd2bf80 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/SysPermissionMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/SysPermissionMapper.java @@ -16,6 +16,7 @@ import java.util.List; * @author Qyq * @since 2021-02-26 */ +@Mapper public interface SysPermissionMapper extends BaseMapper { @Select({"