Commit f9929fde by 涂亚平

2024.1 企业服务中心 开发前备份

1 parent ccfd90c4
Showing with 983 additions and 417 deletions
...@@ -7,6 +7,7 @@ import com.subsidy.common.interceptor.LoginRequired; ...@@ -7,6 +7,7 @@ import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.dto.administer.*; import com.subsidy.dto.administer.*;
import com.subsidy.model.*; import com.subsidy.model.*;
import com.subsidy.service.AdministerService; import com.subsidy.service.AdministerService;
import com.subsidy.vo.member.DownloadFailMembersDTO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
...@@ -14,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/** /**
* <p> * <p>
* 管理平台用户 前端控制器 * 管理平台用户 前端控制器
...@@ -250,6 +253,12 @@ public class AdministerController { ...@@ -250,6 +253,12 @@ public class AdministerController {
return ResponseData.generateCreatedResponse(0, administerService.importMember(companyId, file)); return ResponseData.generateCreatedResponse(0, administerService.importMember(companyId, file));
} }
@PostMapping("downloadFailMembers")
@ApiOperation("下载失败的学员 importMemberVOS[] 字段是导出失败的字段")
public void downloadFailMembers(@RequestBody DownloadFailMembersDTO downloadFailMembersDTO){
administerService.downloadFailMembers(downloadFailMembersDTO);
}
@PostMapping("manageMember") @PostMapping("manageMember")
@ApiOperation("用户管理 {pageSize pageNum userName:名字 }") @ApiOperation("用户管理 {pageSize pageNum userName:名字 }")
@LoginRequired @LoginRequired
......
...@@ -13,14 +13,13 @@ import com.subsidy.model.ClassDictDO; ...@@ -13,14 +13,13 @@ import com.subsidy.model.ClassDictDO;
import com.subsidy.model.ClassMemberMappingDO; import com.subsidy.model.ClassMemberMappingDO;
import com.subsidy.service.ClassDictService; import com.subsidy.service.ClassDictService;
import com.subsidy.util.ConstantUtils; import com.subsidy.util.ConstantUtils;
import com.subsidy.vo.member.DownloadFailClassMembers;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachePut; import org.springframework.cache.annotation.CachePut;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* <p> * <p>
...@@ -53,7 +52,7 @@ public class ClassDictController { ...@@ -53,7 +52,7 @@ public class ClassDictController {
} }
@PostMapping("addClass") @PostMapping("addClass")
@ApiOperation("添加班级 userId:登录人id companyId courseId classTypeId(证书课程的话传0) className startDate endDate testRule 是否视频看完再做测试 isOrder 是否按照顺序播放 isFastPlay 是否快进 memberIds [] 班级学员 classNoticeDOS[noticeType noticeTime]") @ApiOperation("添加班级 userId:登录人id companyId courseId classType classTypeId(证书课程的话传0) className startDate endDate testRule 是否视频看完再做测试 isOrder 是否按照顺序播放 isFastPlay 是否快进 memberIds [] 班级学员 classNoticeDOS[noticeType noticeTime]")
@LoginRequired @LoginRequired
public ResponseVO addClass(@RequestBody AddClassDTO addClassDTO){ public ResponseVO addClass(@RequestBody AddClassDTO addClassDTO){
return ResponseData.generateCreatedResponse(0,classDictService.addClass(addClassDTO)); return ResponseData.generateCreatedResponse(0,classDictService.addClass(addClassDTO));
...@@ -61,7 +60,7 @@ public class ClassDictController { ...@@ -61,7 +60,7 @@ public class ClassDictController {
@PostMapping("updateClass") @PostMapping("updateClass")
@ApiOperation("修改班级 id className classTypeId startDate endDate isOrder 是否按顺序播放 isFastPlay 是否允许快进 " + @ApiOperation("修改班级 id className classTypeId startDate endDate isOrder 是否按顺序播放 isFastPlay 是否允许快进 " +
"testRule:测试规则 limitHour 学习上限时长 imageClassCheck:首次进入班级时人脸验证 imageTestCheck:测试前人脸识别验证" + "testRule:测试规则 classType limitHour 学习上限时长 imageClassCheck:首次进入班级时人脸验证 imageTestCheck:测试前人脸识别验证" +
"activityDetection:活跃度检测开启/关闭 activityDetectionMethod:活跃度检测方式 firstDragAllowed:首次播放允许拖曳" + "activityDetection:活跃度检测开启/关闭 activityDetectionMethod:活跃度检测方式 firstDragAllowed:首次播放允许拖曳" +
"firstSpeedAllowed:首次播放允许倍速 playSnap 课程抓拍 classCode") "firstSpeedAllowed:首次播放允许倍速 playSnap 课程抓拍 classCode")
@LoginRequired @LoginRequired
...@@ -125,6 +124,17 @@ public class ClassDictController { ...@@ -125,6 +124,17 @@ public class ClassDictController {
return ResponseData.generateCreatedResponse(0,classDictService.getAllCertClasses(classDictDO)); return ResponseData.generateCreatedResponse(0,classDictService.getAllCertClasses(classDictDO));
} }
@PostMapping("importClassMembers")
@ApiOperation("班级导入学员 file companyId")
public ResponseVO importClassMembers(@RequestParam("file") MultipartFile file,Long companyId){
return ResponseData.generateCreatedResponse(0,classDictService.importClassMembers(file,companyId));
}
@PostMapping("downloadFailClassMembers")
@ApiOperation("下载导入失败的班级学员 downloadFailClassMembersDTOS[] 失败返回的那些字段")
public void downloadFailClassMembers(@RequestBody DownloadFailClassMembers downloadFailClassMembers){
classDictService.downloadFailClassMembers(downloadFailClassMembers);
}
} }
...@@ -88,7 +88,7 @@ public class CompanyDictController { ...@@ -88,7 +88,7 @@ public class CompanyDictController {
} }
@PostMapping("getCompanyMembers") @PostMapping("getCompanyMembers")
@ApiOperation("获取公司里的成员 pageNum pageSize companyId 公司id userName 成员名称") @ApiOperation("获取公司里的成员 pageNum pageSize companyId 公司id userName 成员名称 memberStatus")
@LoginRequired @LoginRequired
public ResponseVO getCompanyMembers(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){ public ResponseVO getCompanyMembers(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.getCompanyMembers(getCompanyMembersDTO)); return ResponseData.generateCreatedResponse(0,companyDictService.getCompanyMembers(getCompanyMembersDTO));
......
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.member.CancerMemberDTO;
import com.subsidy.dto.member.InviteMemberDTO;
import com.subsidy.mapper.CompanyMemberMappingMapper;
import com.subsidy.model.CompanyMemberMappingDO;
import com.subsidy.model.MemberDO;
import com.subsidy.service.CompanyMemberMappingService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 公司人员映射表 前端控制器
* </p>
*
* @author Tuyp
* @since 2023-12-21
*/
@RestController
@Api(tags = "公司人员映射表")
@RequestMapping("/companyMemberMapping")
public class CompanyMemberMappingController {
@Autowired
private CompanyMemberMappingService companyMemberMappingService;
@PostMapping("noCompanyMembers")
@ApiOperation(" userName idCard")
public ResponseVO noCompanyMembers(@RequestBody MemberDO memberDO){
return ResponseData.generateCreatedResponse(0,companyMemberMappingService.noCompanyMembers(memberDO));
}
@PostMapping("inviteMember")
@ApiOperation("邀请某人 userName idCard companyId")
public ResponseVO inviteMember(@RequestBody InviteMemberDTO inviteMemberDTO){
return ResponseData.generateCreatedResponse(0,companyMemberMappingService.inviteMember(inviteMemberDTO));
}
@PostMapping("cancerMember")
@ApiOperation("离职 memberIds[] companyId")
public ResponseVO cancerMember(@RequestBody CancerMemberDTO cancerMemberDTO){
return ResponseData.generateCreatedResponse(0,companyMemberMappingService.cancerMember(cancerMemberDTO));
}
}
...@@ -55,7 +55,7 @@ public class DepartmentDictController { ...@@ -55,7 +55,7 @@ public class DepartmentDictController {
} }
@PostMapping("updateDepartment") @PostMapping("updateDepartment")
@ApiOperation("编辑部门 id companyId departmentName leaderName parentId") @ApiOperation("编辑部门 id companyId fullName departmentName leaderName parentId")
@LoginRequired @LoginRequired
public ResponseVO updateDepartment(@RequestBody DepartmentDictDO departmentDictDO){ public ResponseVO updateDepartment(@RequestBody DepartmentDictDO departmentDictDO){
return ResponseData.generateCreatedResponse(0,departmentDictService.updateDepartment(departmentDictDO)); return ResponseData.generateCreatedResponse(0,departmentDictService.updateDepartment(departmentDictDO));
......
...@@ -13,4 +13,6 @@ public class GetCompanyMembersDTO { ...@@ -13,4 +13,6 @@ public class GetCompanyMembersDTO {
private String userName; private String userName;
private String memberStatus;
} }
...@@ -15,6 +15,8 @@ public class GetDepartmentsVO { ...@@ -15,6 +15,8 @@ public class GetDepartmentsVO {
private Integer cnt; private Integer cnt;
private String fullName;
private Long parentId; private Long parentId;
private List<GetDepartmentsVO> children; private List<GetDepartmentsVO> children;
......
...@@ -12,4 +12,6 @@ public class AddMemberDTO extends MemberDO { ...@@ -12,4 +12,6 @@ public class AddMemberDTO extends MemberDO {
private List<Long> jobIds; private List<Long> jobIds;
private Long companyId;
} }
package com.subsidy.dto.member;
import lombok.Data;
import java.util.List;
@Data
public class CancerMemberDTO {
private List<Long> memberIds;
private Long companyId;
}
package com.subsidy.dto.member; package com.subsidy.dto.member;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.subsidy.util.excel.ExcelColumn;
import com.subsidy.util.excel.ExcelColumnUtil; import com.subsidy.util.excel.ExcelColumnUtil;
import lombok.Data; import lombok.Data;
import java.util.Date;
@Data @Data
public class ImportMemberDTO { public class ImportMemberDTO {
......
package com.subsidy.dto.member;
import lombok.Data;
@Data
public class InviteMemberDTO {
private String userName;
private String idCard;
private Long companyId;
private Long departmentId;
}
...@@ -37,7 +37,7 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> { ...@@ -37,7 +37,7 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> {
/** /**
* 查看某个公司的学生 * 查看某个公司的学生
*/ */
IPage<GetCompanyMembersVO> getCompanyMembers(IPage page, Long companyId, String userName); IPage<GetCompanyMembersVO> getCompanyMembers(IPage page, Long companyId, String userName,String memberStatus);
} }
package com.subsidy.mapper;
import com.subsidy.model.CompanyDictDO;
import com.subsidy.model.CompanyMemberMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.model.MemberDO;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* 公司人员映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2023-12-21
*/
@Repository
public interface CompanyMemberMappingMapper extends BaseMapper<CompanyMemberMappingDO> {
/**
* 查看某公司下已经认证的学员的个数
*/
Integer companyAuthMembersCount(Long companyId);
/**
* 查看某个人所在公司
*/
CompanyDictDO memberCompany(Long memberId);
/**
* 查看公司里里全部的人
*/
List<String> companyMembers(Long companyId);
/**
* 找出还没有公司的人
*/
List<MemberDO> noCompanyMembers(String userName,String idCard);
/**
* 查看某个公司accountName的人
*/
List<MemberDO> companyAccountMembers(Long companyId,String accountName);
}
...@@ -15,4 +15,6 @@ import org.springframework.stereotype.Repository; ...@@ -15,4 +15,6 @@ import org.springframework.stereotype.Repository;
@Repository @Repository
public interface MemberDepartmentMappingMapper extends BaseMapper<MemberDepartmentMappingDO> { public interface MemberDepartmentMappingMapper extends BaseMapper<MemberDepartmentMappingDO> {
void cancelMember(Long memberId);
} }
...@@ -48,6 +48,8 @@ public class ClassDictDO extends BaseModel { ...@@ -48,6 +48,8 @@ public class ClassDictDO extends BaseModel {
*/ */
private String classTypeId; private String classTypeId;
private String classType;
/** /**
* 课程id * 课程id
*/ */
......
...@@ -41,6 +41,16 @@ public class CompanyDictDO extends BaseModel { ...@@ -41,6 +41,16 @@ public class CompanyDictDO extends BaseModel {
private String companyCode; private String companyCode;
/** /**
* 账号
*/
private String accountName;
/**
* 密码
*/
private String password;
/**
* 简称 * 简称
*/ */
private String shortName; private String shortName;
......
package com.subsidy.model;
import com.subsidy.util.BaseModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 公司人员映射表
* </p>
*
* @author Tuyp
* @since 2023-12-21
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("company_member_mapping")
public class CompanyMemberMappingDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 公司id
*/
private Long companyId;
/**
* 人员id
*/
private Long memberId;
/**
* 人员状态 1在职 0 离职
*/
private Integer memberStatus;
}
...@@ -29,10 +29,10 @@ public class MemberDO extends BaseModel { ...@@ -29,10 +29,10 @@ public class MemberDO extends BaseModel {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
/** // /**
* 公司id // * 公司id 该字段已删除
*/ // */
private Long companyId; // private Long companyId;
/** /**
* 账号 * 账号
......
package com.subsidy.model; package com.subsidy.model;
import com.subsidy.util.BaseModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime; import com.baomidou.mybatisplus.annotation.TableName;
import com.subsidy.util.BaseModel;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/** /**
* <p> * <p>
* 老师部门映射表 * 老师部门映射表
...@@ -36,6 +37,11 @@ public class MemberDepartmentMappingDO extends BaseModel { ...@@ -36,6 +37,11 @@ public class MemberDepartmentMappingDO extends BaseModel {
*/ */
private Long departmentId; private Long departmentId;
/**
* 人员在职状态
*/
private Integer memberStatus;
private LocalDateTime createTime; private LocalDateTime createTime;
private LocalDateTime updateTime; private LocalDateTime updateTime;
......
...@@ -8,6 +8,9 @@ import com.subsidy.vo.administer.*; ...@@ -8,6 +8,9 @@ import com.subsidy.vo.administer.*;
import com.subsidy.vo.classdict.ClassDetailVO; import com.subsidy.vo.classdict.ClassDetailVO;
import com.subsidy.vo.image.GetMemberCheckDetailVO; import com.subsidy.vo.image.GetMemberCheckDetailVO;
import com.subsidy.vo.member.ClassSignVO; import com.subsidy.vo.member.ClassSignVO;
import com.subsidy.vo.member.DownloadFailMembersDTO;
import com.subsidy.vo.member.ImportMemberResultVO;
import com.subsidy.vo.member.ImportMemberVO;
import com.subsidy.vo.sign.AnswerRecordVO; import com.subsidy.vo.sign.AnswerRecordVO;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -81,7 +84,9 @@ public interface AdministerService extends IService<AdministerDO> { ...@@ -81,7 +84,9 @@ public interface AdministerService extends IService<AdministerDO> {
void memberStudyLog(MemberStudyLogDTO memberStudyLogDTO)throws Exception; void memberStudyLog(MemberStudyLogDTO memberStudyLogDTO)throws Exception;
String importMember(Long companyId, MultipartFile multipartFile)throws Exception; ImportMemberResultVO importMember(Long companyId, MultipartFile multipartFile)throws Exception;
void downloadFailMembers(DownloadFailMembersDTO downloadFailMembersDTO);
IPage<ManageMemberVO> manageMember(ManageMemberDTO manageMemberDTO); IPage<ManageMemberVO> manageMember(ManageMemberDTO manageMemberDTO);
......
...@@ -10,6 +10,9 @@ import com.subsidy.model.ClassMemberMappingDO; ...@@ -10,6 +10,9 @@ import com.subsidy.model.ClassMemberMappingDO;
import com.subsidy.model.MemberDO; import com.subsidy.model.MemberDO;
import com.subsidy.vo.classdict.GetAllClassesVO; import com.subsidy.vo.classdict.GetAllClassesVO;
import com.subsidy.vo.classdict.GetClassBaseInfoVO; import com.subsidy.vo.classdict.GetClassBaseInfoVO;
import com.subsidy.vo.member.DownloadFailClassMembers;
import com.subsidy.vo.member.ImportClassMembersVO;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
...@@ -24,7 +27,7 @@ import java.util.List; ...@@ -24,7 +27,7 @@ import java.util.List;
*/ */
public interface ClassDictService extends IService<ClassDictDO> { public interface ClassDictService extends IService<ClassDictDO> {
List<GetAllClassesVO> getAllClasses(ClassDictDO classDictDO)throws Exception; List<GetAllClassesVO> getAllClasses(ClassDictDO classDictDO) throws Exception;
String deleteClasses(ClassDictDO classDictDO); String deleteClasses(ClassDictDO classDictDO);
...@@ -46,6 +49,10 @@ public interface ClassDictService extends IService<ClassDictDO> { ...@@ -46,6 +49,10 @@ public interface ClassDictService extends IService<ClassDictDO> {
String email(ClassMemberMappingDO classMemberMappingDO); String email(ClassMemberMappingDO classMemberMappingDO);
List<GetAllClassesVO> getAllCertClasses(ClassDictDO classDictDO)throws Exception; List<GetAllClassesVO> getAllCertClasses(ClassDictDO classDictDO) throws Exception;
ImportClassMembersVO importClassMembers(MultipartFile multipartFile,Long companyId);
void downloadFailClassMembers(DownloadFailClassMembers downloadFailClassMembers);
} }
package com.subsidy.service;
import com.subsidy.dto.member.CancerMemberDTO;
import com.subsidy.dto.member.InviteMemberDTO;
import com.subsidy.model.CompanyMemberMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.model.MemberDO;
import java.util.List;
/**
* <p>
* 公司人员映射表 服务类
* </p>
*
* @author Tuyp
* @since 2023-12-21
*/
public interface CompanyMemberMappingService extends IService<CompanyMemberMappingDO> {
List<MemberDO> noCompanyMembers(MemberDO memberDO);
String inviteMember(InviteMemberDTO inviteMemberDTO);
String cancerMember(CancerMemberDTO cancerMemberDTO);
}
...@@ -7,47 +7,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -7,47 +7,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.common.exception.HttpException; import com.subsidy.common.exception.HttpException;
import com.subsidy.dto.administer.*; import com.subsidy.dto.administer.*;
import com.subsidy.dto.member.ImportMemberDTO; import com.subsidy.dto.member.ImportMemberDTO;
import com.subsidy.mapper.AdministerMapper;
import com.subsidy.mapper.AnsweringQuestionMapper;
import com.subsidy.mapper.ClassDictMapper;
import com.subsidy.mapper.ClassMemberMappingMapper;
import com.subsidy.mapper.CompanyDictMapper;
import com.subsidy.mapper.CourseDictMapper;
import com.subsidy.mapper.DepartmentDictMapper;
import com.subsidy.mapper.ExerciseDoneResultMapper;
import com.subsidy.mapper.FieldDictMapper;
import com.subsidy.mapper.MemberDepartmentMappingMapper;
import com.subsidy.mapper.MemberMapper;
import com.subsidy.mapper.OprAdmDictMapper;
import com.subsidy.mapper.PaperDictMapper;
import com.subsidy.mapper.RoleAdministerMappingMapper;
import com.subsidy.mapper.SignInRecordMapper;
import com.subsidy.mapper.VodDictMapper;
import com.subsidy.mapper.VodPlayHistoryMapper;
import com.subsidy.model.AdministerDO;
import com.subsidy.model.AnsweringQuestionDO;
import com.subsidy.model.ClassDictDO;
import com.subsidy.model.ClassMemberMappingDO;
import com.subsidy.model.CompanyDictDO;
import com.subsidy.model.CourseDictDO;
import com.subsidy.model.DepartmentDictDO;
import com.subsidy.model.ExerciseDoneHistoryDO;
import com.subsidy.model.ExerciseDoneResultDO;
import com.subsidy.model.MemberDO;
import com.subsidy.model.MemberDepartmentMappingDO;
import com.subsidy.model.OprAdmDictDO;
import com.subsidy.model.PaperDictDO;
import com.subsidy.model.RoleAdministerMappingDO;
import com.subsidy.model.SignInRecordDO;
import com.subsidy.model.VodDictDO;
import com.subsidy.mapper.*; import com.subsidy.mapper.*;
import com.subsidy.model.*; import com.subsidy.model.*;
import com.subsidy.service.AdministerService; import com.subsidy.service.AdministerService;
import com.subsidy.util.ConstantUtils; import com.subsidy.util.*;
import com.subsidy.util.ExcelFormatUtils;
import com.subsidy.util.JwtUtil;
import com.subsidy.util.Localstorage;
import com.subsidy.util.MathUtil;
import com.subsidy.util.excel.ExcelUtil; import com.subsidy.util.excel.ExcelUtil;
import com.subsidy.vo.administer.*; import com.subsidy.vo.administer.*;
import com.subsidy.vo.classdict.ClassDetailVO; import com.subsidy.vo.classdict.ClassDetailVO;
...@@ -55,6 +18,9 @@ import com.subsidy.vo.done.GetMaxScoreVO; ...@@ -55,6 +18,9 @@ import com.subsidy.vo.done.GetMaxScoreVO;
import com.subsidy.vo.done.TestScoreInfoVO; import com.subsidy.vo.done.TestScoreInfoVO;
import com.subsidy.vo.image.GetMemberCheckDetailVO; import com.subsidy.vo.image.GetMemberCheckDetailVO;
import com.subsidy.vo.member.ClassSignVO; import com.subsidy.vo.member.ClassSignVO;
import com.subsidy.vo.member.DownloadFailMembersDTO;
import com.subsidy.vo.member.ImportMemberResultVO;
import com.subsidy.vo.member.ImportMemberVO;
import com.subsidy.vo.sign.AnswerRecordVO; import com.subsidy.vo.sign.AnswerRecordVO;
import com.subsidy.vo.vod.ClassMemberPlayLengthVO; import com.subsidy.vo.vod.ClassMemberPlayLengthVO;
import com.subsidy.vo.vod.ClassVodCompleteInfoVO; import com.subsidy.vo.vod.ClassVodCompleteInfoVO;
...@@ -68,13 +34,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -68,13 +34,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont; import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.util.CellRangeAddress; import org.apache.poi.hssf.util.CellRangeAddress;
import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.streaming.SXSSFCell; import org.apache.poi.xssf.streaming.SXSSFCell;
import org.apache.poi.xssf.streaming.SXSSFRow; import org.apache.poi.xssf.streaming.SXSSFRow;
import org.apache.poi.xssf.streaming.SXSSFSheet; import org.apache.poi.xssf.streaming.SXSSFSheet;
...@@ -82,32 +42,19 @@ import org.apache.poi.xssf.streaming.SXSSFWorkbook; ...@@ -82,32 +42,19 @@ import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.BufferedInputStream; import java.io.*;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
...@@ -175,6 +122,9 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -175,6 +122,9 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
@Autowired @Autowired
private ImageCheckRecordMapper imageCheckRecordMapper; private ImageCheckRecordMapper imageCheckRecordMapper;
@Autowired
private CompanyMemberMappingMapper companyMemberMappingMapper;
public LoginVO login(AdministerDO administerDO) { public LoginVO login(AdministerDO administerDO) {
LoginVO loginVO = new LoginVO(); LoginVO loginVO = new LoginVO();
...@@ -1344,10 +1294,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -1344,10 +1294,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
} }
@Transactional(rollbackFor = Exception.class) // @Transactional(rollbackFor = Exception.class)
public String importMember(Long companyId, MultipartFile multipartFile) throws Exception { public ImportMemberResultVO importMember(Long companyId, MultipartFile multipartFile) throws Exception {
try {
HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
//拼音小写 //拼音小写
...@@ -1355,50 +1303,130 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -1355,50 +1303,130 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//不带声调 //不带声调
format.setToneType(HanyuPinyinToneType.WITHOUT_TONE); format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
List<ImportMemberDTO> failMembers = new ArrayList<>(); ImportMemberResultVO importMemberResultVO = new ImportMemberResultVO();
ExcelUtil.readExcelWithoutTitle(null, ImportMemberDTO.class, multipartFile).forEach(s -> { List<ImportMemberVO> failMembers = new ArrayList<>();
MemberDO memberDO = memberMapper.selectOne(new QueryWrapper<MemberDO>() int successCount = 0;
int failCount = 0;
List<ImportMemberDTO> importMemberDTOS = ExcelUtil.readExcelWithoutTitle(null, ImportMemberDTO.class, multipartFile);
for (ImportMemberDTO s : importMemberDTOS) {
try {
MemberDO memberDel = memberMapper.selectOne(new QueryWrapper<MemberDO>()
.lambda() .lambda()
.eq(MemberDO::getTelephone, s.getTelephone())); .eq(MemberDO::getTelephone, s.getTelephone()));
if (null != memberDO) { MemberDO memberIdCard = memberMapper.selectOne(new QueryWrapper<MemberDO>()
ImportMemberDTO importMemberDTO = new ImportMemberDTO(); .lambda()
BeanUtils.copyProperties(memberDO, importMemberDTO); .eq(MemberDO::getIdCard, s.getIdCard()));
failMembers.add(importMemberDTO);
boolean departmentFlag = false;
String[] fullName = s.getDepartments().split(",");
for (String dep : fullName) {
DepartmentDictDO departmentDictDO = departmentDictMapper.selectOne(new QueryWrapper<DepartmentDictDO>()
.lambda()
.eq(DepartmentDictDO::getFullName, dep));
if (null == departmentDictDO) {
departmentFlag = true;
}
}
//日期格式
SimpleDateFormat d = null;
Date date = null;
if (!StringUtils.isEmpty(s.getInductionDate())) {
String DATE_PATTERN = "yyyy-MM-dd";
SimpleDateFormat sdf = new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy", Locale.US);
date = sdf.parse(s.getInductionDate());
d = new SimpleDateFormat(DATE_PATTERN);
}
if (StringUtils.isEmpty(s.getUserName())||StringUtils.isEmpty(s.getTelephone())||StringUtils.isEmpty(s.getGender())||StringUtils.isEmpty(s.getIdCard())||StringUtils.isEmpty(s.getDepartments())){
ImportMemberVO importMemberVO = new ImportMemberVO();
BeanUtils.copyProperties(s, importMemberVO);
importMemberVO.setReason("必填字段为空");
if (null != d && null != date) {
s.setInductionDate(d.format(date));
}
importMemberVO.setDepartments(s.getDepartments());
failMembers.add(importMemberVO);
failCount++;
}else if (departmentFlag) {
ImportMemberVO importMemberVO = new ImportMemberVO();
BeanUtils.copyProperties(s, importMemberVO);
importMemberVO.setReason("未查询到部门名称");
if (null != d && null != date) {
s.setInductionDate(d.format(date));
}
importMemberVO.setDepartments(s.getDepartments());
failMembers.add(importMemberVO);
failCount++;
} else if (null != s.getIdCard() && s.getIdCard().length() != 18) {
ImportMemberVO importMemberVO = new ImportMemberVO();
BeanUtils.copyProperties(s, importMemberVO);
importMemberVO.setReason("身份证位数不正确");
if (null != d && null != date) {
s.setInductionDate(d.format(date));
}
importMemberVO.setDepartments(s.getDepartments());
failMembers.add(importMemberVO);
failCount++;
} else if (null != s.getTelephone() && s.getTelephone().length() != 11) {
ImportMemberVO importMemberVO = new ImportMemberVO();
BeanUtils.copyProperties(s, importMemberVO);
importMemberVO.setReason("手机号位数不正确");
if (null != d && null != date) {
s.setInductionDate(d.format(date));
}
importMemberVO.setDepartments(s.getDepartments());
failMembers.add(importMemberVO);
failCount++;
} else if (null != memberDel) {
ImportMemberVO importMemberVO = new ImportMemberVO();
BeanUtils.copyProperties(s, importMemberVO);
importMemberVO.setReason("手机号重复");
if (null != d && null != date) {
s.setInductionDate(d.format(date));
}
importMemberVO.setDepartments(s.getDepartments());
failMembers.add(importMemberVO);
failCount++;
} else if (null != memberIdCard) {
ImportMemberVO importMemberVO = new ImportMemberVO();
BeanUtils.copyProperties(s, importMemberVO);
importMemberVO.setReason("身份证重复");
if (null != d && null != date) {
s.setInductionDate(d.format(date));
}
importMemberVO.setDepartments(s.getDepartments());
failMembers.add(importMemberVO);
failCount++;
} else { } else {
MemberDO memberDO1 = new MemberDO(); MemberDO memberDO1 = new MemberDO();
memberDO1.setUserName(s.getUserName()); memberDO1.setUserName(s.getUserName());
memberDO1.setGender(s.getGender()); memberDO1.setGender(s.getGender());
memberDO1.setEmail(s.getEmail()); memberDO1.setEmail(s.getEmail());
memberDO1.setWorkNo(s.getWorkNo()); memberDO1.setWorkNo(s.getWorkNo());
if (null != d && null != date) {
try {
//日期格式
if (!StringUtils.isEmpty(s.getInductionDate())) {
String DATE_PATTERN = "yyyy-MM-dd";
SimpleDateFormat sdf = new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy", Locale.US);
Date date = sdf.parse(s.getInductionDate());
SimpleDateFormat d = new SimpleDateFormat(DATE_PATTERN);
memberDO1.setInductionDate(d.format(date)); memberDO1.setInductionDate(d.format(date));
} }
String accountName = PinyinHelper.toHanYuPinyinString(s.getUserName(), format, "", true); String accountName = PinyinHelper.toHanYuPinyinString(s.getUserName(), format, "", true);
List<MemberDO> memberDOS = memberMapper.selectList(new QueryWrapper<MemberDO>() //查看人员目前所在公司是否有重名的情况
.lambda() List<MemberDO> memberDOS = companyMemberMappingMapper.companyAccountMembers(companyId,accountName);
.eq(MemberDO::getAccountName, accountName)
.eq(MemberDO::getCompanyId, companyId));
if (memberDOS.size() > 0) { if (memberDOS.size() > 0) {
String usernames = userName(accountName, 0, companyId); String usernames = userName(accountName, 0, companyId);
memberDO1.setAccountName(usernames.replace("u:", "v")); memberDO1.setAccountName(usernames.replace("u:", "v"));
} else { } else {
memberDO1.setAccountName(accountName.replace("u:", "v")); memberDO1.setAccountName(accountName.replace("u:", "v"));
} }
} catch (Exception ex) {
System.out.println(ex.getStackTrace()); // memberDO1.setCompanyId(companyId);
}
memberDO1.setCompanyId(companyId);
memberDO1.setFirstLogin(0); memberDO1.setFirstLogin(0);
memberDO1.setTelephone(s.getTelephone()); memberDO1.setTelephone(s.getTelephone());
memberDO1.setIdCard(s.getIdCard().toUpperCase()); memberDO1.setIdCard(s.getIdCard().toUpperCase());
...@@ -1407,26 +1435,54 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -1407,26 +1435,54 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
memberDO1.setAccountNameEn(s.getAccountNameEn()); memberDO1.setAccountNameEn(s.getAccountNameEn());
memberMapper.insert(memberDO1); memberMapper.insert(memberDO1);
//人和公司的映射
CompanyMemberMappingDO companyMemberMappingDO = new CompanyMemberMappingDO();
companyMemberMappingDO.setMemberId(memberDO1.getId());
companyMemberMappingDO.setCompanyId(companyId);
companyMemberMappingDO.setMemberStatus(1);
companyMemberMappingMapper.insert(companyMemberMappingDO);
successCount++;
//找到对应的部门 //找到对应的部门
String[] fullName = s.getDepartments().split(","); if (fullName.length > 0) {
for (String dep : fullName) { for (String dep : fullName) {
DepartmentDictDO departmentDictDO = departmentDictMapper.selectOne(new QueryWrapper<DepartmentDictDO>() DepartmentDictDO departmentDictDO = departmentDictMapper.selectOne(new QueryWrapper<DepartmentDictDO>()
.lambda() .lambda()
.eq(DepartmentDictDO::getFullName, dep)); .eq(DepartmentDictDO::getFullName, dep));
MemberDepartmentMappingDO memberDepartmentMappingDO = new MemberDepartmentMappingDO(); MemberDepartmentMappingDO memberDepartmentMappingDO = new MemberDepartmentMappingDO();
memberDepartmentMappingDO.setDepartmentId(departmentDictDO.getId()); memberDepartmentMappingDO.setDepartmentId(departmentDictDO.getId());
memberDepartmentMappingDO.setMemberId(memberDO1.getId()); memberDepartmentMappingDO.setMemberId(memberDO1.getId());
memberDepartmentMappingDO.setMemberStatus(1);
memberDepartmentMappingMapper.insert(memberDepartmentMappingDO); memberDepartmentMappingMapper.insert(memberDepartmentMappingDO);
} }
} }
System.out.println(failMembers); }
});
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); ImportMemberVO importMemberVO = new ImportMemberVO();
throw new HttpException(10001); BeanUtils.copyProperties(s, importMemberVO);
String DATE_PATTERN = "yyyy-MM-dd";
SimpleDateFormat sdf = new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy", Locale.US);
if (null != s.getInductionDate()){
Date date = sdf.parse(s.getInductionDate());
SimpleDateFormat d = new SimpleDateFormat(DATE_PATTERN);
importMemberVO.setInductionDate(d.format(date));
} }
return ConstantUtils.ADD_SUCCESS; importMemberVO.setReason("其他原因");
importMemberVO.setDepartments(s.getDepartments());
failCount++;
failMembers.add(importMemberVO);
}
}
importMemberResultVO.setImportMemberVOS(failMembers);
importMemberResultVO.setSuccessCount(successCount);
importMemberResultVO.setFailCount(failCount);
return importMemberResultVO;
}
public void downloadFailMembers(DownloadFailMembersDTO downloadFailMembersDTO) {
List<ImportMemberVO> importMemberVOS = downloadFailMembersDTO.getImportMemberVOS();
ExcelUtil.writeExcel(importMemberVOS, ImportMemberVO.class);
} }
public IPage<ManageMemberVO> manageMember(ManageMemberDTO manageMemberDTO) { public IPage<ManageMemberVO> manageMember(ManageMemberDTO manageMemberDTO) {
...@@ -1434,7 +1490,6 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -1434,7 +1490,6 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
return memberMapper.manageMember(pager, null, manageMemberDTO.getUserName(), null, null); return memberMapper.manageMember(pager, null, manageMemberDTO.getUserName(), null, null);
} }
public void exportManageMember(ManageMemberDTO manageMemberDTO) { public void exportManageMember(ManageMemberDTO manageMemberDTO) {
Page pager = new Page(1, -1L); Page pager = new Page(1, -1L);
...@@ -1468,8 +1523,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -1468,8 +1523,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
i++; i++;
List<MemberDO> memberDOS = memberMapper.selectList(new QueryWrapper<MemberDO>() List<MemberDO> memberDOS = memberMapper.selectList(new QueryWrapper<MemberDO>()
.lambda() .lambda()
.eq(MemberDO::getAccountName, originName + i) .eq(MemberDO::getAccountName, originName + i));
.eq(MemberDO::getCompanyId, companyId));
if (memberDOS.size() > 0) { if (memberDOS.size() > 0) {
return userName(originName, i, companyId); return userName(originName, i, companyId);
} else { } else {
......
...@@ -11,53 +11,44 @@ import com.subsidy.dto.classDict.AddClassDTO; ...@@ -11,53 +11,44 @@ import com.subsidy.dto.classDict.AddClassDTO;
import com.subsidy.dto.classDict.AddMemberToClassDTO; import com.subsidy.dto.classDict.AddMemberToClassDTO;
import com.subsidy.dto.classDict.GetClassBaseInfoDTO; import com.subsidy.dto.classDict.GetClassBaseInfoDTO;
import com.subsidy.dto.classDict.GetSpareMembersDTO; import com.subsidy.dto.classDict.GetSpareMembersDTO;
import com.subsidy.dto.member.ImportMemberDTO;
import com.subsidy.jobs.CourseNotificationJob; import com.subsidy.jobs.CourseNotificationJob;
import com.subsidy.mapper.AnsweringQuestionMapper; import com.subsidy.mapper.*;
import com.subsidy.mapper.ClassDictMapper;
import com.subsidy.mapper.ClassMemberMappingMapper;
import com.subsidy.mapper.ClassNoticeMapper;
import com.subsidy.mapper.CompanyDictMapper;
import com.subsidy.mapper.CourseDictMapper;
import com.subsidy.mapper.RoleAdministerMappingMapper;
import com.subsidy.mapper.VodDictMapper;
import com.subsidy.mapper.VodPlayHistoryMapper;
import com.subsidy.model.AnsweringQuestionDO; import com.subsidy.model.AnsweringQuestionDO;
import com.subsidy.model.ClassDictDO; import com.subsidy.model.ClassDictDO;
import com.subsidy.model.ClassMemberMappingDO; import com.subsidy.model.ClassMemberMappingDO;
import com.subsidy.model.ClassNoticeDO; import com.subsidy.model.ClassNoticeDO;
import com.subsidy.model.CompanyDictDO; import com.subsidy.model.CompanyDictDO;
import com.subsidy.model.CourseDictDO; import com.subsidy.model.CourseDictDO;
import com.subsidy.model.FieldDictDO;
import com.subsidy.model.MemberDO; import com.subsidy.model.MemberDO;
import com.subsidy.model.RoleAdministerMappingDO;
import com.subsidy.model.VodDictDO; import com.subsidy.model.VodDictDO;
import com.subsidy.service.ClassDictService; import com.subsidy.service.ClassDictService;
import com.subsidy.util.ConstantUtils; import com.subsidy.util.ConstantUtils;
import com.subsidy.util.DateFormatUtil; import com.subsidy.util.DateFormatUtil;
import com.subsidy.util.QuartzUtil; import com.subsidy.util.QuartzUtil;
import com.subsidy.util.SMSUtils; import com.subsidy.util.SMSUtils;
import com.subsidy.util.excel.ExcelUtil;
import com.subsidy.util.websocket.WebSocketUtil; import com.subsidy.util.websocket.WebSocketUtil;
import com.subsidy.vo.classdict.ClassSettingsVO; import com.subsidy.vo.classdict.ClassSettingsVO;
import com.subsidy.vo.classdict.GetAllClassesVO; import com.subsidy.vo.classdict.GetAllClassesVO;
import com.subsidy.vo.classdict.GetClassBaseInfoVO; import com.subsidy.vo.classdict.GetClassBaseInfoVO;
import com.subsidy.vo.classdict.SystemSettings; import com.subsidy.vo.classdict.SystemSettings;
import com.subsidy.vo.member.DownloadFailClassMembers;
import com.subsidy.vo.member.DownloadFailClassMembersDTO;
import com.subsidy.vo.member.ImportClassMemberDTO;
import com.subsidy.vo.member.ImportClassMembersVO;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.WebSocketSession;
import java.io.IOException;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
...@@ -94,6 +85,9 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -94,6 +85,9 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
@Autowired @Autowired
private VodPlayHistoryMapper vodPlayHistoryMapper; private VodPlayHistoryMapper vodPlayHistoryMapper;
@Autowired
private CompanyMemberMappingMapper companyMemberMappingMapper;
public List<GetAllClassesVO> getAllClasses(ClassDictDO classDictDO) throws Exception { public List<GetAllClassesVO> getAllClasses(ClassDictDO classDictDO) throws Exception {
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
...@@ -173,10 +167,10 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -173,10 +167,10 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
List<ClassMemberMappingDO> list = classMemberMappingMapper.selectList(new QueryWrapper<ClassMemberMappingDO>() List<ClassMemberMappingDO> list = classMemberMappingMapper.selectList(new QueryWrapper<ClassMemberMappingDO>()
.lambda() .lambda()
.eq(ClassMemberMappingDO::getClassId, classDictDO.getId())); .eq(ClassMemberMappingDO::getClassId, classDictDO.getId()));
if(CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
for (ClassMemberMappingDO classMemberMappingDO : list) { for (ClassMemberMappingDO classMemberMappingDO : list) {
WebSocketSession webSocketSession = WebSocketUtil.webSocketMap.get(classMemberMappingDO.getMemberId()); WebSocketSession webSocketSession = WebSocketUtil.webSocketMap.get(classMemberMappingDO.getMemberId());
if(null != webSocketSession && webSocketSession.isOpen()) { if (null != webSocketSession && webSocketSession.isOpen()) {
try { try {
//班级的配置 //班级的配置
List<ClassSettingsVO> classSettings = this.baseMapper.getClassSettings(classMemberMappingDO.getMemberId()); List<ClassSettingsVO> classSettings = this.baseMapper.getClassSettings(classMemberMappingDO.getMemberId());
...@@ -258,29 +252,29 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -258,29 +252,29 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
GetClassBaseInfoVO getClassBaseInfoVO = this.baseMapper.getClassBaseInfo(getClassBaseInfoDTO.getId()); GetClassBaseInfoVO getClassBaseInfoVO = this.baseMapper.getClassBaseInfo(getClassBaseInfoDTO.getId());
//查看课程完成状态 //查看课程完成状态
//查看某个课程都有哪些视频 //查看某个课程都有哪些视频
List<VodDictDO> vodDictDOS = vodDictMapper.getCourseVods(getClassBaseInfoVO.getCourseId(),null); List<VodDictDO> vodDictDOS = vodDictMapper.getCourseVods(getClassBaseInfoVO.getCourseId(), null);
int completeNum = 0 ; int completeNum = 0;
//查看每个视频的状态 //查看每个视频的状态
for (VodDictDO vodDictDO : vodDictDOS){ for (VodDictDO vodDictDO : vodDictDOS) {
int i = vodPlayHistoryMapper.completeVodOrNot(getClassBaseInfoDTO.getUserId(),vodDictDO.getId(),getClassBaseInfoDTO.getId()); int i = vodPlayHistoryMapper.completeVodOrNot(getClassBaseInfoDTO.getUserId(), vodDictDO.getId(), getClassBaseInfoDTO.getId());
completeNum += i; completeNum += i;
} }
if (completeNum == vodDictDOS.size()){ if (completeNum == vodDictDOS.size()) {
getClassBaseInfoVO.setTestFlag(true); getClassBaseInfoVO.setTestFlag(true);
}else { } else {
getClassBaseInfoVO.setTestFlag(false); getClassBaseInfoVO.setTestFlag(false);
} }
return getClassBaseInfoVO; return getClassBaseInfoVO;
} }
public String email(ClassMemberMappingDO classMemberMappingDO){ public String email(ClassMemberMappingDO classMemberMappingDO) {
ClassMemberMappingDO classMemberMappingDO1 = classMemberMappingMapper.selectOne(new QueryWrapper<ClassMemberMappingDO>() ClassMemberMappingDO classMemberMappingDO1 = classMemberMappingMapper.selectOne(new QueryWrapper<ClassMemberMappingDO>()
.lambda() .lambda()
.eq(ClassMemberMappingDO::getMemberId,classMemberMappingDO.getMemberId()) .eq(ClassMemberMappingDO::getMemberId, classMemberMappingDO.getMemberId())
.eq(ClassMemberMappingDO::getClassId,classMemberMappingDO.getClassId())); .eq(ClassMemberMappingDO::getClassId, classMemberMappingDO.getClassId()));
if (null != classMemberMappingDO1){ if (null != classMemberMappingDO1) {
classMemberMappingDO1.setEmail(classMemberMappingDO.getEmail()); classMemberMappingDO1.setEmail(classMemberMappingDO.getEmail());
classMemberMappingDO1.setEmailStatus(classMemberMappingDO.getEmailStatus()); classMemberMappingDO1.setEmailStatus(classMemberMappingDO.getEmailStatus());
classMemberMappingMapper.updateById(classMemberMappingDO1); classMemberMappingMapper.updateById(classMemberMappingDO1);
...@@ -308,4 +302,43 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -308,4 +302,43 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
return getAllClassesVOS; return getAllClassesVOS;
} }
public ImportClassMembersVO importClassMembers(MultipartFile multipartFile, Long companyId) {
ImportClassMembersVO importClassMembersVO = new ImportClassMembersVO();
List<ImportClassMemberDTO> importClassMemberDTOS = ExcelUtil.readExcel(null, ImportClassMemberDTO.class, multipartFile);
//查找企业下所有的学员的手机号 手机 姓名 身份证
List<String> companyMembers = companyMemberMappingMapper.companyMembers(companyId);
List<ImportClassMemberDTO> successMembers = new ArrayList<ImportClassMemberDTO>();
List<ImportClassMemberDTO> failMembers = new ArrayList<ImportClassMemberDTO>();
//查看该学员是否该企业下的人,不是的话就要返回 是的话直接导入成功
for (ImportClassMemberDTO imd : importClassMemberDTOS) {
if (null == imd.getUserName() || null == imd.getTelephone() || null == imd.getIdCard()) {
imd.setReason("人员信息不完整");
failMembers.add(imd);
} else if (!companyMembers.contains(imd.getUserName() + imd.getTelephone() + imd.getIdCard())) {
imd.setReason("企业内未查询到该成员信息");
failMembers.add(imd);
} else if (successMembers.contains(imd.getUserName() + imd.getTelephone() + imd.getIdCard())) {
imd.setReason("人员信息重复");
failMembers.add(imd);
} else {
successMembers.add(imd);
}
}
importClassMembersVO.setSuccessMembers(successMembers);
importClassMembersVO.setFailureMembers(failMembers);
return importClassMembersVO;
}
public void downloadFailClassMembers(DownloadFailClassMembers downloadFailClassMembers) {
List<DownloadFailClassMembersDTO> downloadFailClassMembersDTOS = downloadFailClassMembers.getDownloadFailClassMembersDTOS();
ExcelUtil.writeExcel(downloadFailClassMembersDTOS, DownloadFailClassMembersDTO.class);
}
} }
...@@ -114,31 +114,31 @@ public class ClassHourDictServiceImpl extends ServiceImpl<ClassHourDictMapper, C ...@@ -114,31 +114,31 @@ public class ClassHourDictServiceImpl extends ServiceImpl<ClassHourDictMapper, C
PollingGetVO pollingGetVO = new PollingGetVO(); PollingGetVO pollingGetVO = new PollingGetVO();
MemberDO memberDO = memberMapper.selectById(vodPlayHistoryDO.getMemberId()); // MemberDO memberDO = memberMapper.selectById(vodPlayHistoryDO.getMemberId());
//
//查看系统设定的时长 // //查看系统设定的时长
ClassHourDictDO classHourDictDO = this.baseMapper.selectOne (new QueryWrapper<ClassHourDictDO>() // ClassHourDictDO classHourDictDO = this.baseMapper.selectOne (new QueryWrapper<ClassHourDictDO>()
.lambda() // .lambda()
.eq(ClassHourDictDO::getCompanyId,memberDO.getCompanyId())); // .eq(ClassHourDictDO::getCompanyId,memberDO.getCompanyId()));
//
if (classHourDictDO.getStatus() == 0) { // if (classHourDictDO.getStatus() == 0) {
pollingGetVO.setBool(false); // pollingGetVO.setBool(false);
return pollingGetVO; // return pollingGetVO;
} // }
//
//查看当天这个人看了多少时间 // //查看当天这个人看了多少时间
Integer total = vodPlayHistoryMapper.memberDailyStudyLength(memberDO.getId(),null); // Integer total = vodPlayHistoryMapper.memberDailyStudyLength(memberDO.getId(),null);
//
//是否超过时长 没超过 false 超过 true // //是否超过时长 没超过 false 超过 true
if (classHourDictDO == null) { // if (classHourDictDO == null) {
pollingGetVO.setBool(true); // pollingGetVO.setBool(true);
} else { // } else {
if (total + vodPlayHistoryDO.getPlayLength() < classHourDictDO.getClassHour() * 3600) { // if (total + vodPlayHistoryDO.getPlayLength() < classHourDictDO.getClassHour() * 3600) {
pollingGetVO.setBool(false); // pollingGetVO.setBool(false);
} else { // } else {
pollingGetVO.setBool(true); // pollingGetVO.setBool(true);
} // }
} // }
return pollingGetVO; return pollingGetVO;
} }
......
...@@ -120,6 +120,9 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -120,6 +120,9 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
@Autowired @Autowired
private VODConfig vodConfig; private VODConfig vodConfig;
@Autowired
private CompanyMemberMappingMapper companyMemberMappingMapper;
public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) { public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) {
Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize()); Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize());
...@@ -334,12 +337,12 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -334,12 +337,12 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
public IPage<GetCompanyMembersVO> getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO) { public IPage<GetCompanyMembersVO> getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO) {
Page pager = new Page(getCompanyMembersDTO.getPageNum(), getCompanyMembersDTO.getPageSize()); Page pager = new Page(getCompanyMembersDTO.getPageNum(), getCompanyMembersDTO.getPageSize());
return this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName()); return this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName(),getCompanyMembersDTO.getMemberStatus());
} }
public void exportCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO) { public void exportCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO) {
Page pager = new Page(1, -1); Page pager = new Page(1, -1);
List<GetCompanyMembersVO> getCompanyMembersVOS = this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName()).getRecords(); List<GetCompanyMembersVO> getCompanyMembersVOS = this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName(),getCompanyMembersDTO.getMemberStatus()).getRecords();
ExcelUtil.writeExcel(getCompanyMembersVOS, GetCompanyMembersVO.class); ExcelUtil.writeExcel(getCompanyMembersVOS, GetCompanyMembersVO.class);
} }
...@@ -397,16 +400,13 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -397,16 +400,13 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
MemberSummaryVO memberSummaryVO = new MemberSummaryVO(); MemberSummaryVO memberSummaryVO = new MemberSummaryVO();
//总数 //总数
Integer total = memberMapper.selectCount(new QueryWrapper<MemberDO>() Integer total = companyMemberMappingMapper.selectCount(new QueryWrapper<CompanyMemberMappingDO>()
.lambda() .lambda()
.eq(MemberDO::getCompanyId, getCompanyMembersDTO.getCompanyId())); .eq(CompanyMemberMappingDO::getCompanyId, getCompanyMembersDTO.getCompanyId()));
memberSummaryVO.setTotal(total); memberSummaryVO.setTotal(total);
//短信验证 //短信验证
Integer smsCnt = memberMapper.selectCount(new QueryWrapper<MemberDO>() Integer smsCnt = companyMemberMappingMapper.companyAuthMembersCount(getCompanyMembersDTO.getCompanyId());
.lambda()
.eq(MemberDO::getCompanyId, getCompanyMembersDTO.getCompanyId())
.isNull(MemberDO::getFirstLogin));
memberSummaryVO.setSmsCnt(smsCnt); memberSummaryVO.setSmsCnt(smsCnt);
memberSummaryVO.setImgCnt(total - smsCnt); memberSummaryVO.setImgCnt(total - smsCnt);
......
package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.subsidy.common.exception.HttpException;
import com.subsidy.dto.member.CancerMemberDTO;
import com.subsidy.dto.member.InviteMemberDTO;
import com.subsidy.mapper.MemberDepartmentMappingMapper;
import com.subsidy.mapper.MemberMapper;
import com.subsidy.model.CompanyMemberMappingDO;
import com.subsidy.mapper.CompanyMemberMappingMapper;
import com.subsidy.model.MemberDO;
import com.subsidy.model.MemberDepartmentMappingDO;
import com.subsidy.service.CompanyMemberMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 公司人员映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2023-12-21
*/
@Service
public class CompanyMemberMappingServiceImpl extends ServiceImpl<CompanyMemberMappingMapper, CompanyMemberMappingDO> implements CompanyMemberMappingService {
@Autowired
private MemberMapper memberMapper;
@Autowired
private MemberDepartmentMappingMapper memberDepartmentMappingMapper;
public List<MemberDO> noCompanyMembers(MemberDO memberDO) {
return this.baseMapper.noCompanyMembers(memberDO.getIdCard(), memberDO.getUserName());
}
public String inviteMember(InviteMemberDTO inviteMemberDTO) {
MemberDO memberDO = memberMapper.selectOne(new QueryWrapper<MemberDO>()
.lambda()
.eq(MemberDO::getUserName, inviteMemberDTO.getUserName())
.eq(MemberDO::getIdCard, inviteMemberDTO.getIdCard()));
if (null == memberDO) {
throw new HttpException(10011);
}
Integer count = this.baseMapper.selectCount(new QueryWrapper<CompanyMemberMappingDO>()
.lambda()
.eq(CompanyMemberMappingDO::getMemberId, memberDO.getId())
.eq(CompanyMemberMappingDO::getMemberStatus, 1));
if (count > 0 ) {
throw new HttpException(10028);
}
CompanyMemberMappingDO companyMemberMappingDO = new CompanyMemberMappingDO();
companyMemberMappingDO.setCompanyId(inviteMemberDTO.getCompanyId());
companyMemberMappingDO.setMemberId(memberDO.getId());
companyMemberMappingDO.setMemberStatus(1);
this.baseMapper.insert(companyMemberMappingDO);
MemberDepartmentMappingDO memberDepartmentMappingDO = new MemberDepartmentMappingDO();
memberDepartmentMappingDO.setDepartmentId(inviteMemberDTO.getDepartmentId());
memberDepartmentMappingDO.setMemberId(memberDO.getId());
memberDepartmentMappingDO.setMemberStatus(1);
memberDepartmentMappingMapper.insert(memberDepartmentMappingDO);
return ConstantUtils.ADD_SUCCESS;
}
public String cancerMember(CancerMemberDTO cancerMemberDTO) {
List<Long> members = cancerMemberDTO.getMemberIds();
for (Long memberId : members) {
CompanyMemberMappingDO companyMemberMappingDO1 = this.baseMapper.selectOne(new QueryWrapper<CompanyMemberMappingDO>()
.lambda()
.eq(CompanyMemberMappingDO::getCompanyId, cancerMemberDTO.getCompanyId())
.eq(CompanyMemberMappingDO::getMemberId, memberId)
.eq(CompanyMemberMappingDO::getMemberStatus, 1));
companyMemberMappingDO1.setMemberStatus(0);
this.baseMapper.updateById(companyMemberMappingDO1);
memberDepartmentMappingMapper.cancelMember(memberId);
}
return ConstantUtils.DELETE_SUCCESS;
}
}
...@@ -95,7 +95,8 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper, ...@@ -95,7 +95,8 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
Integer count = memberDepartmentMappingMapper.selectCount(new QueryWrapper<MemberDepartmentMappingDO>() Integer count = memberDepartmentMappingMapper.selectCount(new QueryWrapper<MemberDepartmentMappingDO>()
.lambda() .lambda()
.eq(MemberDepartmentMappingDO::getDepartmentId, getDepartmentsVO.getId())); .eq(MemberDepartmentMappingDO::getDepartmentId, getDepartmentsVO.getId())
.eq(MemberDepartmentMappingDO::getMemberStatus,1));
getDepartmentsVO.setCnt(count); getDepartmentsVO.setCnt(count);
DepartmentDictDO departmentDictDO2 = this.baseMapper.selectById(departmentDictDO1.getParentId()); DepartmentDictDO departmentDictDO2 = this.baseMapper.selectById(departmentDictDO1.getParentId());
if (null != departmentDictDO2) { if (null != departmentDictDO2) {
......
...@@ -38,6 +38,7 @@ import org.springframework.stereotype.Service; ...@@ -38,6 +38,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Member;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.Duration; import java.time.Duration;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -115,9 +116,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -115,9 +116,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
private SmsVerifyCodeMapper smsVerifyCodeMapper; private SmsVerifyCodeMapper smsVerifyCodeMapper;
@Autowired @Autowired
private ClassHourDictMapper classHourDictMapper;
@Autowired
private QXueYouConfig qXueYouConfig; private QXueYouConfig qXueYouConfig;
@Autowired @Autowired
...@@ -126,6 +124,9 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -126,6 +124,9 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
@Autowired @Autowired
private MemberTokensMapper memberTokensMapper; private MemberTokensMapper memberTokensMapper;
@Autowired
private CompanyMemberMappingMapper companyMemberMappingMapper;
public IPage<GetAllVO> getAll(GetAllDTO getAllDTO) { public IPage<GetAllVO> getAll(GetAllDTO getAllDTO) {
Page pager = new Page(getAllDTO.getPageNum(), getAllDTO.getPageSize()); Page pager = new Page(getAllDTO.getPageNum(), getAllDTO.getPageSize());
...@@ -176,12 +177,17 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -176,12 +177,17 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw new HttpException(20002); throw new HttpException(20002);
} }
Integer count1 = this.baseMapper.selectCount(new QueryWrapper<MemberDO>() Integer count2 = this.baseMapper.selectCount(new QueryWrapper<MemberDO>()
.lambda() .lambda()
.eq(MemberDO::getAccountName, addMemberDTO.getAccountName()) .eq(MemberDO::getIdCard, addMemberDTO.getIdCard()));
.eq(MemberDO::getCompanyId, addMemberDTO.getCompanyId()));
if (count1 > 0) { if (count2 > 0) {
throw new HttpException(20002);
}
List<MemberDO> memberDOS = companyMemberMappingMapper.companyAccountMembers(addMemberDTO.getCompanyId(),addMemberDTO.getAccountName());
if (memberDOS.size() > 0) {
throw new HttpException(20002); throw new HttpException(20002);
} }
...@@ -190,10 +196,13 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -190,10 +196,13 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
memberDO.setPassword("Ykhl123456"); memberDO.setPassword("Ykhl123456");
memberDO.setStatus("启用"); memberDO.setStatus("启用");
memberDO.setFirstLogin(0); memberDO.setFirstLogin(0);
//公司赋值
memberDO.setCompanyId(addMemberDTO.getCompanyId());
this.baseMapper.insert(memberDO); this.baseMapper.insert(memberDO);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_COMPANY_MEMBER_PREFIX + memberDO.getCompanyId() + ":" + memberDO.getAccountName(), memberDO); //公司赋值
CompanyMemberMappingDO companyMemberMappingDO = new CompanyMemberMappingDO();
companyMemberMappingDO.setCompanyId(addMemberDTO.getCompanyId());
companyMemberMappingDO.setMemberId(memberDO.getId());
companyMemberMappingMapper.insert(companyMemberMappingDO);
if (null != addMemberDTO.getDepartmentIds()) { if (null != addMemberDTO.getDepartmentIds()) {
//部门 //部门
...@@ -240,7 +249,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -240,7 +249,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
Integer count1 = this.baseMapper.selectCount(new QueryWrapper<MemberDO>() Integer count1 = this.baseMapper.selectCount(new QueryWrapper<MemberDO>()
.lambda() .lambda()
.eq(MemberDO::getAccountName, addMemberDTO.getAccountName()) .eq(MemberDO::getAccountName, addMemberDTO.getAccountName())
.eq(MemberDO::getCompanyId, addMemberDTO.getCompanyId())
.ne(MemberDO::getId, addMemberDTO.getId())); .ne(MemberDO::getId, addMemberDTO.getId()));
if (count1 > 0) { if (count1 > 0) {
...@@ -250,8 +258,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -250,8 +258,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
MemberDO memberDO = new MemberDO(); MemberDO memberDO = new MemberDO();
BeanUtils.copyProperties(addMemberDTO, memberDO); BeanUtils.copyProperties(addMemberDTO, memberDO);
this.baseMapper.updateById(memberDO); this.baseMapper.updateById(memberDO);
//MemberDO memberDO1 = this.baseMapper.selectById(addMemberDTO.getId());
//redisUtil.set(RedisPrefixConstant.SUBSIDY_COMPANY_MEMBER_PREFIX + memberDO.getCompanyId() + ":" + memberDO.getAccountName(), memberDO1);
if (null != addMemberDTO.getDepartmentIds()) { if (null != addMemberDTO.getDepartmentIds()) {
memberDepartmentMappingMapper.delete(new QueryWrapper<MemberDepartmentMappingDO>() memberDepartmentMappingMapper.delete(new QueryWrapper<MemberDepartmentMappingDO>()
...@@ -298,7 +304,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -298,7 +304,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw new HttpException(10010); throw new HttpException(10010);
} }
CompanyDictDO companyDictDO = companyDictMapper.selectById(memberDO.getCompanyId()); CompanyDictDO companyDictDO = companyMemberMappingMapper.memberCompany(memberDO.getId());
if ("冻结".equals(memberDO.getStatus())) { if ("冻结".equals(memberDO.getStatus())) {
throw new HttpException(10013); throw new HttpException(10013);
...@@ -318,12 +324,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -318,12 +324,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
.gt(SmsVerifyCodeDO::getCreateDate, LocalDateTime.now().minusMinutes(30L))); .gt(SmsVerifyCodeDO::getCreateDate, LocalDateTime.now().minusMinutes(30L)));
if (null == smsCodeDO || !verifyCodeDTO.getVerifyCode().equals(smsCodeDO.getVerifyCode())) { if (null == smsCodeDO || !verifyCodeDTO.getVerifyCode().equals(smsCodeDO.getVerifyCode())) {
// OprMemDictDO oprMemDictDO = new OprMemDictDO();
// oprMemDictDO.setUserId(memberDO.getId());
// oprMemDictDO.setOprType("登录");
// oprMemDictDO.setResult(0);
// oprMemDictDO.setIpAddress(IpAddressUtil.getIpAddress(request));
// oprMemDictMapper.insert(oprMemDictDO);
throw new HttpException(70010); throw new HttpException(70010);
} }
userRoleVO.setCompanyId(companyDictDO.getId()); userRoleVO.setCompanyId(companyDictDO.getId());
...@@ -348,14 +348,13 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -348,14 +348,13 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
public MemberVO passwordLogin(PasswordLoginDTO passwordLoginDTO, HttpServletRequest request) { public MemberVO passwordLogin(PasswordLoginDTO passwordLoginDTO, HttpServletRequest request) {
MemberDO memberDO = this.baseMapper.selectOne(new QueryWrapper<MemberDO>() List<MemberDO> memberDOS = companyMemberMappingMapper.companyAccountMembers(passwordLoginDTO.getCompanyId(),passwordLoginDTO.getAccountName());
.lambda() if (memberDOS.size() == 0 ) {
.eq(MemberDO::getCompanyId, passwordLoginDTO.getCompanyId())
.eq(MemberDO::getAccountName, passwordLoginDTO.getAccountName()));
if (null == memberDO) {
throw new HttpException(10017); throw new HttpException(10017);
} }
MemberDO memberDO = memberDOS.get(0);
/** /**
* 最近5次都输入失败,5分钟后再验证 * 最近5次都输入失败,5分钟后再验证
*/ */
...@@ -373,7 +372,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -373,7 +372,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw new HttpException(10016); throw new HttpException(10016);
} }
CompanyDictDO companyDictDO = companyDictMapper.selectById(memberDO.getCompanyId()); CompanyDictDO companyDictDO = companyMemberMappingMapper.memberCompany(memberDO.getId());
if (memberDO.getPassword().equals(passwordLoginDTO.getPassword()) && 1 == memberDO.getFirstLogin() && !"冻结".equals(memberDO.getStatus())) { if (memberDO.getPassword().equals(passwordLoginDTO.getPassword()) && 1 == memberDO.getFirstLogin() && !"冻结".equals(memberDO.getStatus())) {
MemberVO memberVO = new MemberVO(); MemberVO memberVO = new MemberVO();
BeanUtils.copyProperties(memberDO, memberVO); BeanUtils.copyProperties(memberDO, memberVO);
...@@ -514,7 +513,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -514,7 +513,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw new HttpException(14001); throw new HttpException(14001);
} }
CompanyDictDO companyDictDO = companyDictMapper.selectById(memberDO.getCompanyId()); CompanyDictDO companyDictDO = companyMemberMappingMapper.memberCompany(memberDO.getId());
if ("冻结".equals(memberDO.getStatus())) { if ("冻结".equals(memberDO.getStatus())) {
throw new HttpException(10013); throw new HttpException(10013);
...@@ -570,7 +569,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -570,7 +569,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw new HttpException(14001); throw new HttpException(14001);
} }
CompanyDictDO companyDictDO = companyDictMapper.selectById(memberDO.getCompanyId()); CompanyDictDO companyDictDO = companyMemberMappingMapper.memberCompany(memberDO.getId());
if ("冻结".equals(memberDO.getStatus())) { if ("冻结".equals(memberDO.getStatus())) {
throw new HttpException(10013); throw new HttpException(10013);
...@@ -624,7 +623,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -624,7 +623,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw new HttpException(14001); throw new HttpException(14001);
} }
CompanyDictDO companyDictDO = companyDictMapper.selectById(memberDO.getCompanyId()); CompanyDictDO companyDictDO = companyMemberMappingMapper.memberCompany(memberDO.getId());
if ("冻结".equals(memberDO.getStatus())) { if ("冻结".equals(memberDO.getStatus())) {
throw new HttpException(10013); throw new HttpException(10013);
...@@ -984,9 +983,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -984,9 +983,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
//清掉以前的部门 //清掉以前的部门
for (Long lg : memberIds) { for (Long lg : memberIds) {
memberDepartmentMappingMapper.delete(new QueryWrapper<MemberDepartmentMappingDO>() memberDepartmentMappingMapper.cancelMember(lg);
.lambda()
.eq(MemberDepartmentMappingDO::getMemberId, lg));
} }
//加入新的部门 //加入新的部门
...@@ -996,6 +993,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -996,6 +993,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
MemberDepartmentMappingDO memberDepartmentMappingDO = new MemberDepartmentMappingDO(); MemberDepartmentMappingDO memberDepartmentMappingDO = new MemberDepartmentMappingDO();
memberDepartmentMappingDO.setMemberId(lg); memberDepartmentMappingDO.setMemberId(lg);
memberDepartmentMappingDO.setDepartmentId(depId); memberDepartmentMappingDO.setDepartmentId(depId);
memberDepartmentMappingDO.setMemberStatus(1);
memberDepartmentMappingMapper.insert(memberDepartmentMappingDO); memberDepartmentMappingMapper.insert(memberDepartmentMappingDO);
} }
} }
......
...@@ -219,7 +219,7 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu ...@@ -219,7 +219,7 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu
List<Long> imageList = pushImageDataMapper.imageList(); List<Long> imageList = pushImageDataMapper.imageList();
if (vodList.size()+answerList.size()+examList.size()+activityList.size()+imageList.size()>0){ if (vodList.size()+answerList.size()+examList.size()+activityList.size()+imageList.size()>0){
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"}); List<String> telephones = Arrays.asList("15201936167", "18201963812");
for (String telephone : telephones) { for (String telephone : telephones) {
smsUtils.sendWarning("SMS_460945631", telephone, null); smsUtils.sendWarning("SMS_460945631", telephone, null);
} }
......
...@@ -57,25 +57,26 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -57,25 +57,26 @@ public class RenSheJuServiceImpl implements RenSheJuService {
//查找前一天产生数据的班级 //查找前一天产生数据的班级
//看视频 // //看视频
List<Long> vodClassIds = renSheJuMapper.vodClassIds("0"); // List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
//
//考试 // //考试
List<Long> examClassIds = renSheJuMapper.examClassIds("0"); // List<Long> examClassIds = renSheJuMapper.examClassIds("0");
//
//答疑 // //答疑
List<Long> answerClassIds = renSheJuMapper.answerClassIds("0"); // List<Long> answerClassIds = renSheJuMapper.answerClassIds("0");
//
//人脸识别 // //人脸识别
List<Long> imageClassIds = renSheJuMapper.imageClassIds("0"); // List<Long> imageClassIds = renSheJuMapper.imageClassIds("0");
Set<Long> classIds = new HashSet<>(); Set<Long> classIds = new HashSet<>();
vodClassIds.stream().forEach(x -> classIds.add(x)); // vodClassIds.stream().forEach(x -> classIds.add(x));
examClassIds.stream().forEach(x -> classIds.add(x)); // examClassIds.stream().forEach(x -> classIds.add(x));
answerClassIds.stream().forEach(x -> classIds.add(x)); // answerClassIds.stream().forEach(x -> classIds.add(x));
imageClassIds.stream().forEach(x -> classIds.add(x)); // imageClassIds.stream().forEach(x -> classIds.add(x));
classIds.add(473L);
try { try {
if (classIds.size() > 0) { if (classIds.size() > 0) {
...@@ -160,12 +161,12 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -160,12 +161,12 @@ public class RenSheJuServiceImpl implements RenSheJuService {
List<ClassHourBasic> classHourBasics = new ArrayList<>(); List<ClassHourBasic> classHourBasics = new ArrayList<>();
// 产生视频学习数据的班级 // 产生视频学习数据的班级
List<Long> vodClassIds = renSheJuMapper.vodClassIds("0"); // List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
List<DailyStudyInfoVO> result = new ArrayList<>(); List<DailyStudyInfoVO> result = new ArrayList<>();
// List<Long> vodClassIds = new ArrayList<>(); List<Long> vodClassIds = new ArrayList<>();
// vodClassIds.add(477L); vodClassIds.add(473L);
try { try {
for (Long classId : vodClassIds) { for (Long classId : vodClassIds) {
...@@ -260,7 +261,7 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -260,7 +261,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL); renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL);
renshejuHistoryMapper.insert(renshejuHistoryDO); renshejuHistoryMapper.insert(renshejuHistoryDO);
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"}); List<String> telephones = Arrays.asList("15201936167", "18201963812");
// for (String telephone : telephones) { // for (String telephone : telephones) {
// smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_3); // smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_3);
// } // }
......
...@@ -775,7 +775,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -775,7 +775,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
System.out.println(result.toString()); System.out.println(result.toString());
if (result.size() > 0) { if (result.size() > 0) {
List<String> telephones = Arrays.asList(new String[]{"15201936167", "18201963812"}); List<String> telephones = Arrays.asList("15201936167", "18201963812");
for (String telephone : telephones) { for (String telephone : telephones) {
smsUtils.sendWarning("SMS_460945631", telephone, result.toString()); smsUtils.sendWarning("SMS_460945631", telephone, result.toString());
} }
......
...@@ -21,6 +21,8 @@ public class GetClassBaseInfoVO { ...@@ -21,6 +21,8 @@ public class GetClassBaseInfoVO {
private Long courseId; private Long courseId;
private String rensheClassType;
private Long classTypeId; private Long classTypeId;
private Integer isOrder; private Integer isOrder;
......
...@@ -36,6 +36,7 @@ public class GetCompanyMembersVO { ...@@ -36,6 +36,7 @@ public class GetCompanyMembersVO {
@ExcelColumn(col = 9,value = "最近采集时间") @ExcelColumn(col = 9,value = "最近采集时间")
private String checkTime; private String checkTime;
private String memberStatus;
} }
package com.subsidy.vo.member;
import lombok.Data;
import java.util.List;
@Data
public class DownloadFailClassMembers {
private List<DownloadFailClassMembersDTO> downloadFailClassMembersDTOS;
}
package com.subsidy.vo.member;
import com.subsidy.util.excel.ExcelColumn;
import lombok.Data;
@Data
public class DownloadFailClassMembersDTO {
@ExcelColumn(value = "姓名", col = 1)
private String userName;
@ExcelColumn(value = "身份证", col = 2)
private String idCard;
@ExcelColumn(value = "手机号", col = 3)
private String telephone;
@ExcelColumn(value = "原因", col = 4)
private String reason;
}
package com.subsidy.vo.member;
import lombok.Data;
import java.util.List;
@Data
public class DownloadFailMembersDTO {
private List<ImportMemberVO> importMemberVOS;
}
package com.subsidy.vo.member;
import com.subsidy.util.excel.ExcelColumnUtil;
import lombok.Data;
@Data
public class ImportClassMemberDTO {
@ExcelColumnUtil(value = "姓名", col = 1)
private String userName;
@ExcelColumnUtil(value = "身份证", col = 2)
private String idCard;
@ExcelColumnUtil(value = "手机号", col = 3)
private String telephone;
private String reason;
}
package com.subsidy.vo.member;
import lombok.Data;
import java.util.List;
@Data
public class ImportClassMembersVO {
private List<ImportClassMemberDTO> successMembers;
private List<ImportClassMemberDTO> failureMembers;
}
package com.subsidy.vo.member;
import lombok.Data;
import java.util.List;
@Data
public class ImportMemberResultVO {
private List<ImportMemberVO> importMemberVOS;
private Integer successCount;
private Integer failCount;
}
package com.subsidy.vo.member;
import com.subsidy.util.excel.ExcelColumn;
import lombok.Data;
@Data
public class ImportMemberVO {
@ExcelColumn(value = "姓名", col = 1)
private String userName;
@ExcelColumn(value = "手机号", col = 2)
private String telephone;
@ExcelColumn(value = "部门", col = 3)
private String departments;
@ExcelColumn(value = "身份证号码", col = 4)
private String idCard;
@ExcelColumn(value = "性别(男/女)", col = 5)
private String gender;
@ExcelColumn(value = "英文名", col = 6)
private String accountNameEn;
@ExcelColumn(value = "邮箱", col = 7)
private String email;
@ExcelColumn(value = "工号", col = 8)
private String workNo;
@ExcelColumn(value = "入职时间", col = 9)
private String inductionDate;
@ExcelColumn(value = "原因", col = 10)
private String reason;
}
...@@ -21,6 +21,7 @@ meishu.code-message[10024]=密码输入错误,您还可以输入4次密码 ...@@ -21,6 +21,7 @@ meishu.code-message[10024]=密码输入错误,您还可以输入4次密码
meishu.code-message[10025]=身份证识别错误 meishu.code-message[10025]=身份证识别错误
meishu.code-message[10026]=姓名或身份证号格式不正确 meishu.code-message[10026]=姓名或身份证号格式不正确
meishu.code-message[10027]=该手机号已注册 meishu.code-message[10027]=该手机号已注册
meishu.code-message[10028]=该成员已在其他公司入职
meishu.code-message[20001]=该课程已存在 meishu.code-message[20001]=该课程已存在
......
...@@ -55,7 +55,8 @@ ...@@ -55,7 +55,8 @@
FROM FROM
class_member_mapping t class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id LEFT JOIN member t2 ON t.member_id = t2.id
left join company_dict t3 on t2.company_id = t3.id left join company_member_mapping t4 on t4.member_id = t2.id and t4.member_status = 1
left join company_dict t3 on t4.company_id = t3.id
where t.delete_date IS NULL where t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
AND t.class_id = #{classId} AND t.class_id = #{classId}
...@@ -76,7 +77,8 @@ ...@@ -76,7 +77,8 @@
FROM FROM
class_member_mapping t class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id LEFT JOIN member t2 ON t.member_id = t2.id
left join company_dict t3 on t2.company_id = t3.id left join company_member_mapping t4 on t4.member_id = t2.id and t4.member_status = 1
left join company_dict t3 on t4.company_id = t3.id
where t.delete_date IS NULL where t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
AND t.class_id = #{classId} AND t.class_id = #{classId}
...@@ -97,7 +99,8 @@ ...@@ -97,7 +99,8 @@
FROM FROM
class_member_mapping t class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id LEFT JOIN member t2 ON t.member_id = t2.id
left join company_dict t3 on t2.company_id = t3.id left join company_member_mapping t4 on t4.member_id = t2.id and t4.member_status = 1
left join company_dict t3 on t4.company_id = t3.id
where t.delete_date IS NULL where t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
AND t.class_id = #{classId} AND t.class_id = #{classId}
...@@ -119,7 +122,8 @@ ...@@ -119,7 +122,8 @@
FROM FROM
answering_question t answering_question t
LEFT JOIN member t2 ON t.ask_id = t2.id LEFT JOIN member t2 ON t.ask_id = t2.id
left join company_dict t3 on t2.company_id = t3.id left join company_member_mapping t4 on t4.member_id = t2.id and t4.member_status = 1
left join company_dict t3 on t4.company_id = t3.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t.class_id = #{classId} AND t.class_id = #{classId}
...@@ -131,56 +135,62 @@ ...@@ -131,56 +135,62 @@
<select id="classActivityDetection" resultType="com.subsidy.vo.administer.MemberDetectionRecordVO"> <select id="classActivityDetection" resultType="com.subsidy.vo.administer.MemberDetectionRecordVO">
SELECT SELECT
t2.id, t.id,
t2.user_name, t2.user_name,
t2.account_name, t2.account_name,
t2.telephone, t2.telephone,
t2.id_card, t2.id_card,
t4.company_name, t4.company_name,
count( t3.id ) as cnt t.cnt
FROM
(
SELECT
t.member_id AS id,
count( t3.id ) AS cnt
FROM FROM
class_member_mapping t class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id LEFT JOIN member t2 ON t.member_id = t2.id
LEFT JOIN activity_detection t3 ON t.class_id = t3.class_id LEFT JOIN activity_detection t3 ON t.class_id = t3.class_id
AND t.member_id = t3.member_id and t3.delete_date IS NULL AND t.member_id = t3.member_id
left join company_dict t4 on t2.company_id = t4.id AND t3.delete_date IS NULL
where t.delete_date IS NULL WHERE
AND t2.delete_date IS NULL t.delete_date IS NULL
AND t.class_id = #{classId} and t2.delete_date IS NULL
and t.class_id = #{classId}
<if test="userName != null and userName !=''"> <if test="userName != null and userName !=''">
and t2.user_name like concat('%',#{userName} ,'%') and t2.user_name like concat('%',#{userName} ,'%')
</if> </if>
GROUP BY GROUP BY
t.member_id t.member_id
order by t2.account_name ASC ) t
LEFT JOIN member t2 ON t.id = t2.id
LEFT JOIN company_member_mapping t6 ON t6.member_id = t2.id
AND t6.member_status = 1
LEFT JOIN company_dict t4 ON t6.company_id = t4.id
ORDER BY
t2.account_name ASC
</select> </select>
<select id="imageCheckDetail" resultType="com.subsidy.vo.administer.ImageCheckDetailVO"> <select id="imageCheckDetail" resultType="com.subsidy.vo.administer.ImageCheckDetailVO">
SELECT SELECT
t1.id, t1.id,
t1.user_name, t6.user_name,
t1.account_name, t6.account_name,
t1.telephone, t6.telephone,
t1.company_name, t4.company_name,
t1.id_card, t6.id_card,
cnt, cnt,
recentDate recentDate
FROM FROM
( (
SELECT SELECT
t2.id, t2.id,
t2.user_name,
t2.account_name,
t2.telephone,
t2.id_card,
t4.company_name,
count( t3.id ) AS cnt count( t3.id ) AS cnt
FROM FROM
class_member_mapping t class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id LEFT JOIN member t2 ON t.member_id = t2.id
LEFT JOIN image_check_record t3 ON t.class_id = t3.class_id LEFT JOIN image_check_record t3 ON t.class_id = t3.class_id
AND t.member_id = t3.member_id and t3.delete_date IS NULL AND t.member_id = t3.member_id and t3.delete_date IS NULL
left join company_dict t4 on t2.company_id = t4.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
...@@ -189,8 +199,11 @@ ...@@ -189,8 +199,11 @@
</if> </if>
AND t.class_id = #{classId} AND t.class_id = #{classId}
GROUP BY GROUP BY
t.member_id t.id
) t1 ) t1
left join company_member_mapping t5 on t5.member_id = t1.id and t5.member_status = 1
left join company_dict t4 on t5.company_id = t4.id
left join member t6 on t6.id = t1.id
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
t2.member_id, t2.member_id,
...@@ -205,7 +218,7 @@ ...@@ -205,7 +218,7 @@
t2.member_id, t2.member_id,
t2.class_id t2.class_id
) t2 ON t1.id = t2.member_id ) t2 ON t1.id = t2.member_id
order by t1.account_name ASC order by t6.account_name ASC
</select> </select>
<select id="operators" parameterType="string" resultType="com.subsidy.vo.administer.OperatorsVO"> <select id="operators" parameterType="string" resultType="com.subsidy.vo.administer.OperatorsVO">
...@@ -289,10 +302,11 @@ ...@@ -289,10 +302,11 @@
AND t5.delete_date IS NULL AND t5.delete_date IS NULL
) t7 ON t1.vod_id = t7.id ) t7 ON t1.vod_id = t7.id
LEFT JOIN member t3 ON t1.member_id = t3.id LEFT JOIN member t3 ON t1.member_id = t3.id
left join company_member_mapping t8 on t8.member_id = t3.id and t8.member_status = 1
LEFT JOIN class_member_mapping t6 ON t3.id = t6.member_id LEFT JOIN class_member_mapping t6 ON t3.id = t6.member_id
AND t6.class_id = t1.class_id AND t6.class_id = t1.class_id
LEFT JOIN class_dict t4 ON t1.class_id = t4.id LEFT JOIN class_dict t4 ON t1.class_id = t4.id
LEFT JOIN company_dict t5 ON t3.company_id = t5.id LEFT JOIN company_dict t5 ON t8.company_id = t5.id
WHERE WHERE
t6.delete_date IS NULL t6.delete_date IS NULL
ORDER BY ORDER BY
......
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
answering_question t answering_question t
LEFT JOIN member t2 ON t.ask_id = t2.id LEFT JOIN member t2 ON t.ask_id = t2.id
left join administer t3 on t.answer_id = t3.id left join administer t3 on t.answer_id = t3.id
left join company_dict t4 on t3.company_id = t4.id left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
left join company_dict t4 on t5.company_id = t4.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
......
...@@ -2,25 +2,6 @@ ...@@ -2,25 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.BusinessScopeDictMapper"> <mapper namespace="com.subsidy.mapper.BusinessScopeDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.BusinessScopeDictDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="parent_id" property="parentId" />
<result column="company_id" property="companyId" />
<result column="business_scope_name" property="businessScopeName" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, parent_id, company_id, business_scope_name
</sql>
<select id="queryBusinessScopePage" resultType="com.subsidy.vo.businessScope.BusinessScopeDictVO"> <select id="queryBusinessScopePage" resultType="com.subsidy.vo.businessScope.BusinessScopeDictVO">
SELECT * FROM business_scope_dict SELECT * FROM business_scope_dict
<where> <where>
......
...@@ -2,24 +2,6 @@ ...@@ -2,24 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.CertCompanyMappingMapper"> <mapper namespace="com.subsidy.mapper.CertCompanyMappingMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.CertCompanyMappingDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="company_id" property="companyId" />
<result column="cert_id" property="certId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, company_id, cert_id
</sql>
<select id="getCompanyCerts" resultType="com.subsidy.model.CertDictDO"> <select id="getCompanyCerts" resultType="com.subsidy.model.CertDictDO">
SELECT SELECT
distinct t.* distinct t.*
......
...@@ -62,7 +62,8 @@ ...@@ -62,7 +62,8 @@
</if> </if>
) t4 ON t.id = t4.cert_id ) t4 ON t.id = t4.cert_id
LEFT JOIN member t6 ON t4.member_id = t6.id LEFT JOIN member t6 ON t4.member_id = t6.id
LEFT JOIN company_dict t5 ON t6.company_id = t5.id left join company_member_mapping t8 on t8.member_id = t6.id and t8.member_status = 1
LEFT JOIN company_dict t5 ON t8.company_id = t5.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t5.delete_date IS NULL AND t5.delete_date IS NULL
...@@ -160,7 +161,8 @@ ...@@ -160,7 +161,8 @@
FROM FROM
cert_member_mapping t cert_member_mapping t
LEFT JOIN member t1 ON t.member_id = t1.id LEFT JOIN member t1 ON t.member_id = t1.id
LEFT JOIN company_dict t2 ON t1.company_id = t2.id left join company_member_mapping t5 on t5.member_id = t1.id and t5.member_status = 1
LEFT JOIN company_dict t2 ON t5.company_id = t2.id
LEFT JOIN cert_dict t3 ON t.cert_id = t.id LEFT JOIN cert_dict t3 ON t.cert_id = t.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
resultType="com.subsidy.model.MemberDO"> resultType="com.subsidy.model.MemberDO">
SELECT SELECT
distinct t2.id, distinct t2.id,
t2.company_id, t5.company_id,
t2.user_name, t2.user_name,
t2.account_name, t2.account_name,
t2.telephone, t2.telephone,
...@@ -90,7 +90,8 @@ ...@@ -90,7 +90,8 @@
member t2 member t2
LEFT JOIN member_department_mapping t ON t.member_id = t2.id LEFT JOIN member_department_mapping t ON t.member_id = t2.id
left join department_dict t3 on t.department_id = t3.id left join department_dict t3 on t.department_id = t3.id
left join company_dict t4 on t3.company_id = t4.id left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
left join company_dict t4 on t5.company_id = t4.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
...@@ -111,7 +112,7 @@ ...@@ -111,7 +112,7 @@
<select id="classMembers" parameterType="long" resultType="com.subsidy.model.MemberDO"> <select id="classMembers" parameterType="long" resultType="com.subsidy.model.MemberDO">
SELECT SELECT
t2.id, t2.id,
t2.company_id, t5.company_id,
t2.user_name, t2.user_name,
t2.account_name, t2.account_name,
t2.telephone, t2.telephone,
...@@ -124,6 +125,8 @@ ...@@ -124,6 +125,8 @@
FROM FROM
class_member_mapping t class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id LEFT JOIN member t2 ON t.member_id = t2.id
left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
left join company_dict t6 on t5.company_id = t6.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
...@@ -144,7 +147,8 @@ ...@@ -144,7 +147,8 @@
t.is_fast_play, t.is_fast_play,
t.test_rule, t.test_rule,
t2.cover_page, t2.cover_page,
t.class_code t.class_code,
t.class_type as rensheClassType
FROM FROM
class_dict t class_dict t
LEFT JOIN course_dict t2 ON t.course_id = t2.id LEFT JOIN course_dict t2 ON t.course_id = t2.id
......
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
FROM FROM
class_member_mapping t class_member_mapping t
left join member t2 on t.member_id = t2.id left join member t2 on t.member_id = t2.id
left join company_dict t3 on t2.company_id = t3.id left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
left join company_dict t3 on t5.company_id = t3.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
and t2.delete_date is null and t2.delete_date is null
......
...@@ -2,22 +2,4 @@ ...@@ -2,22 +2,4 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.ClassTypeDictMapper"> <mapper namespace="com.subsidy.mapper.ClassTypeDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.ClassTypeDictDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="company_id" property="companyId" />
<result column="class_type" property="classType" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, company_id, class_type
</sql>
</mapper> </mapper>
...@@ -88,17 +88,27 @@ ...@@ -88,17 +88,27 @@
ifnull( t.check_image, '尚未完成' ) AS check_image, ifnull( t.check_image, '尚未完成' ) AS check_image,
t.check_time, t.check_time,
t.telephone, t.telephone,
t.account_name t.account_name,
t5.member_status
FROM FROM
member t member t
LEFT JOIN company_dict t2 ON t.company_id = t2.id left join ( SELECT
t2.company_id,t2.member_status,t3.member_id
FROM
( SELECT t.member_id, max( t.id ) AS id FROM company_member_mapping t GROUP BY t.member_id ) t3
LEFT JOIN company_member_mapping t2 ON t3.id = t2.id) t5 on t5.member_id = t.id
LEFT JOIN company_dict t2 ON t5.company_id = t2.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
and t.company_id = #{companyId} <if test="companyId != null and companyId != ''">
and t5.company_id = #{companyId}
</if>
<if test="userName != null and userName != ''"> <if test="userName != null and userName != ''">
and t.user_name like concat('%',#{userName} ,'%') and (t.user_name like concat('%',#{userName} ,'%') or t.telephone like concat('%',#{userName} ,'%') )
</if>
<if test="memberStatus != null and memberStatus != ''">
and t5.member_status = #{memberStatus}
</if> </if>
</select> </select>
......
...@@ -2,22 +2,4 @@ ...@@ -2,22 +2,4 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.CompanyFieldMappingMapper"> <mapper namespace="com.subsidy.mapper.CompanyFieldMappingMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.CompanyFieldMappingDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="company_id" property="companyId" />
<result column="field_id" property="fieldId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, company_id, field_id
</sql>
</mapper> </mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.CompanyMemberMappingMapper">
<select id="companyAuthMembersCount" parameterType="long" resultType="integer">
SELECT
count(
DISTINCT ( t2.id ))
FROM
company_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.company_id = #{companyId}
AND t.member_status = 1
AND t2.first_login IS NOT NULL
</select>
<select id="memberCompany" parameterType="long" resultType="com.subsidy.model.CompanyDictDO">
SELECT
t2.*
FROM
company_member_mapping t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.member_status = 1
AND t.member_id = #{memberId}
</select>
<select id="companyMembers" parameterType="long" resultType="string">
SELECT
concat(t2.user_name,t2.telephone,t2.id_card)
FROM
company_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.company_id = #{companyId}
AND t.member_status = 1
</select>
<select id="noCompanyMembers" resultType="com.subsidy.model.MemberDO">
SELECT
*
FROM
member t
WHERE
t.delete_date IS NOT NULL
AND t.id NOT IN (
SELECT DISTINCT
( t2.member_id )
FROM
company_member_mapping t2
WHERE
t2.delete_date IS NOT NULL
AND t2.member_status = 1)
and t.user_name like concat('%',#{userName} ,'%')
and t.id_card like concat('%',#{idCard} ,'%')
</select>
<select id="companyAccountMembers" resultType="com.subsidy.model.MemberDO">
SELECT
t2.*
FROM
company_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.company_id = #{companyId}
AND t2.account_name = #{accountName}
AND t.member_status = 1
</select>
</mapper>
...@@ -2,15 +2,6 @@ ...@@ -2,15 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.DudaoMapper"> <mapper namespace="com.subsidy.mapper.DudaoMapper">
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, company_id, cert_id
</sql>
<select id="vodClassIds" parameterType="string" resultType="long"> <select id="vodClassIds" parameterType="string" resultType="long">
SELECT SELECT
t.id t.id
...@@ -198,7 +189,8 @@ ...@@ -198,7 +189,8 @@
answering_question t1 answering_question t1
LEFT JOIN class_dict t2 ON t1.class_id = t2.id LEFT JOIN class_dict t2 ON t1.class_id = t2.id
LEFT JOIN member t3 ON t1.ask_id = t3.id LEFT JOIN member t3 ON t1.ask_id = t3.id
LEFT JOIN company_dict t4 ON t2.company_id = t4.id left join company_member_mapping t5 on t5.member_id = t3.id and t5.member_status = 1
LEFT JOIN company_dict t4 ON t5.company_id = t4.id
WHERE WHERE
DATE_FORMAT( DATE_ADD( t1.update_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) DATE_FORMAT( DATE_ADD( t1.update_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND AND
......
...@@ -2,25 +2,6 @@ ...@@ -2,25 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.JobDictMapper"> <mapper namespace="com.subsidy.mapper.JobDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.JobDictDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="company_id" property="companyId" />
<result column="job_name" property="jobName" />
<result column="order_no" property="orderNo" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, company_id, job_name, order_no
</sql>
<select id="queryCourseJobs" parameterType="long" resultType="com.subsidy.model.JobDictDO"> <select id="queryCourseJobs" parameterType="long" resultType="com.subsidy.model.JobDictDO">
SELECT SELECT
t2.* t2.*
......
...@@ -2,19 +2,8 @@ ...@@ -2,19 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.MemberDepartmentMappingMapper"> <mapper namespace="com.subsidy.mapper.MemberDepartmentMappingMapper">
<!-- 通用查询映射结果 --> <update id="cancelMember">
<resultMap id="BaseResultMap" type="com.subsidy.model.MemberDepartmentMappingDO"> update member_department_mapping t set t.member_status = 0 where t.member_id = #{memberId}
<id column="id" property="id" /> </update>
<result column="administer_id" property="administerId" />
<result column="department_id" property="departmentId" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="delete_time" property="deleteTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, administer_id, department_id, create_time, update_time, delete_time
</sql>
</mapper> </mapper>
...@@ -36,10 +36,11 @@ ...@@ -36,10 +36,11 @@
t.password t.password
FROM FROM
member t member t
left join company_member_mapping t2 on t.id = t2.member_id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t.account_name = #{accountName} AND t.account_name = #{accountName}
AND t.company_id =#{companyId} AND t2.company_id =#{companyId}
</select> </select>
<select id="studyPage" parameterType="com.subsidy.model.MemberDO" resultType="com.subsidy.vo.member.StudyPageVO"> <select id="studyPage" parameterType="com.subsidy.model.MemberDO" resultType="com.subsidy.vo.member.StudyPageVO">
...@@ -253,6 +254,7 @@ ...@@ -253,6 +254,7 @@
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
and t.member_status = 1
AND t.member_id = #{memberId} AND t.member_id = #{memberId}
</select> </select>
...@@ -275,6 +277,7 @@ ...@@ -275,6 +277,7 @@
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
and t.member_status = 1
and t.department_id = #{departmentId} and t.department_id = #{departmentId}
<if test="userName != null and userName !=''"> <if test="userName != null and userName !=''">
and t2.user_name like concat('%',#{userName} ,'%') and t2.user_name like concat('%',#{userName} ,'%')
...@@ -311,6 +314,7 @@ ...@@ -311,6 +314,7 @@
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
AND t2.id IS NOT NULL AND t2.id IS NOT NULL
and t.department_id = #{departmentId} and t.department_id = #{departmentId}
and t.member_status = 1
<if test="userName != null and userName !=''"> <if test="userName != null and userName !=''">
and t2.user_name like concat('%',#{userName} ,'%') and t2.user_name like concat('%',#{userName} ,'%')
</if> </if>
...@@ -340,9 +344,10 @@ ...@@ -340,9 +344,10 @@
t2.induction_date t2.induction_date
FROM FROM
member t2 member t2
left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
WHERE WHERE
t2.delete_date IS NULL t2.delete_date IS NULL
and t2.company_id = #{companyId} and t5.company_id = #{companyId}
<if test="userName != null and userName !=''"> <if test="userName != null and userName !=''">
and t2.user_name like concat('%',#{userName} ,'%') and t2.user_name like concat('%',#{userName} ,'%')
</if> </if>
...@@ -356,6 +361,7 @@ ...@@ -356,6 +361,7 @@
and DATE_FORMAT(t2.induction_date ,'%Y-%m-%d') &lt;= DATE_FORMAT(#{endDate}, '%Y-%m-%d') and DATE_FORMAT(t2.induction_date ,'%Y-%m-%d') &lt;= DATE_FORMAT(#{endDate}, '%Y-%m-%d')
</if> </if>
</select> </select>
<select id="manageMember" parameterType="string" resultType="com.subsidy.vo.administer.ManageMemberVO"> <select id="manageMember" parameterType="string" resultType="com.subsidy.vo.administer.ManageMemberVO">
SELECT SELECT
t.id, t.id,
...@@ -369,7 +375,8 @@ ...@@ -369,7 +375,8 @@
t.first_login t.first_login
FROM FROM
member t member t
LEFT JOIN company_dict t2 ON t.company_id = t2.id left join company_member_mapping t5 on t5.member_id = t.id and t5.member_status = 1
LEFT JOIN company_dict t2 ON t5.company_id = t2.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
...@@ -377,7 +384,7 @@ ...@@ -377,7 +384,7 @@
AND t.user_name LIKE concat('%',#{userName} ,'%') AND t.user_name LIKE concat('%',#{userName} ,'%')
</if> </if>
<if test="companyId != null and companyId != ''"> <if test="companyId != null and companyId != ''">
and t.company_id = #{companyId} and t5.company_id = #{companyId}
</if> </if>
</select> </select>
...@@ -432,7 +439,8 @@ ...@@ -432,7 +439,8 @@
t2.device_no_record t2.device_no_record
FROM FROM
member t member t
LEFT JOIN company_dict t2 ON t.company_id = t2.id left join company_member_mapping t5 on t5.member_id = t.id and t5.member_status = 1
LEFT JOIN company_dict t2 ON t5.company_id = t2.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
FROM FROM
opr_mem_dict t opr_mem_dict t
LEFT JOIN member t2 ON t.user_id = t2.id LEFT JOIN member t2 ON t.user_id = t2.id
LEFT JOIN company_dict t3 ON t2.company_id = t3.id left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
LEFT JOIN company_dict t3 ON t5.company_id = t3.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
AND t1.occurred_time = t2.create_date AND t1.occurred_time = t2.create_date
WHERE WHERE
t2.delete_date IS NULL t2.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t2.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' ) AND DATE_FORMAT( DATE_ADD( t2.create_date, interval 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.id IS NULL AND t1.id IS NULL
AND t2.result = 1 AND t2.result = 1
and t3.class_type = 0 and t3.class_type = 0
......
...@@ -2,22 +2,4 @@ ...@@ -2,22 +2,4 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.RotationImgDictMapper"> <mapper namespace="com.subsidy.mapper.RotationImgDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.RotationImgDictDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="company_id" property="companyId" />
<result column="rotation_img" property="rotationImg" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, company_id, rotation_img
</sql>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!