Commit f4da1322 by 涂亚平

online

1 parent 24adb6f0
Showing with 529 additions and 150 deletions
......@@ -42,7 +42,7 @@ public class ActivityDetectionController {
}
@PostMapping("getCheckHistory")
@ApiOperation("获取某个人某个课程的活跃度验证详情 memberId classId")
@ApiOperation("获取某个人某个课程的活跃度验证详情 memberId classId pageSize pageNum")
public ResponseVO getCheckHistory(@RequestBody GetCheckHistoryDTO getCheckHistoryDTO){
return ResponseData.generateCreatedResponse(0,activityDetectionService.getCheckHistory(getCheckHistoryDTO));
}
......
......@@ -254,7 +254,7 @@ public class AdministerController {
@PostMapping("importMember")
@ApiOperation("导入学生 {companyId 公司id file}")
@LoginRequired
// @LoginRequired
public ResponseVO importMember(Long companyId,@RequestParam("file") MultipartFile file)throws Exception{
return ResponseData.generateCreatedResponse(0,administerService.importMember(companyId,file));
}
......
......@@ -4,9 +4,8 @@ package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.TimeRequired;
import com.subsidy.dto.cert.GetListDTO;
import com.subsidy.dto.cert.SignManagementDTO;
import com.subsidy.dto.cert.SignUpDTO;
import com.subsidy.dto.cert.*;
import com.subsidy.model.CertClassMemberMappingDO;
import com.subsidy.model.CertMemberMappingDO;
import com.subsidy.service.CertMemberMappingService;
import io.swagger.annotations.Api;
......@@ -34,7 +33,7 @@ public class CertMemberMappingController {
private CertMemberMappingService certMemberMappingService;
@PostMapping("signUp")
@ApiOperation("报名 certId memberId files[fileName fileUrl requirementId] ")
@ApiOperation("报名 certId memberId ")
public ResponseVO signUp(@RequestBody SignUpDTO signUpDTO){
return ResponseData.generateCreatedResponse(0,certMemberMappingService.signUp(signUpDTO));
}
......@@ -46,7 +45,7 @@ public class CertMemberMappingController {
}
@PostMapping("changeStatus")
@ApiOperation("编辑订单状态 id status")
@ApiOperation("编辑订单状态 id status 报名状态 commitPrice 已缴金额")
public ResponseVO changeStatus(@RequestBody CertMemberMappingDO certMemberMappingDO){
return ResponseData.generateCreatedResponse(0,certMemberMappingService.changeStatus(certMemberMappingDO));
}
......@@ -64,6 +63,16 @@ public class CertMemberMappingController {
return ResponseData.generateCreatedResponse(0,certMemberMappingService.getSignInfo(certMemberMappingDO));
}
@PostMapping("certSignStatus")
@ApiOperation("手机端---获取证书+报名状态 memberId typeId pageSize pageNum")
public ResponseVO certSignStatus(@RequestBody CertSignStatusDTO certSignStatusDTO){
return ResponseData.generateCreatedResponse(0,certMemberMappingService.certSignStatus(certSignStatusDTO));
}
@PostMapping("certSignInfo")
@ApiOperation("证书报名情况 certId status userName pageSize pageNum")
public ResponseVO certSignInfo(@RequestBody CertSignInfoDTO certSignInfoDTO){
return ResponseData.generateCreatedResponse(0,certMemberMappingService.certSignInfo(certSignInfoDTO));
}
}
......@@ -111,4 +111,11 @@ public class ClassDictController {
public ResponseVO getClassBaseInfo(@RequestBody GetClassBaseInfoDTO getClassBaseInfoDTO){
return ResponseData.generateCreatedResponse(0,classDictService.getClassBaseInfo(getClassBaseInfoDTO));
}
@PostMapping("email")
@ApiOperation("记录邮箱 memberId classId email")
public ResponseVO email(@RequestBody ClassMemberMappingDO classMemberMappingDO){
return ResponseData.generateCreatedResponse(0,classDictService.email(classMemberMappingDO));
}
}
......@@ -94,6 +94,13 @@ public class CompanyDictController {
return ResponseData.generateCreatedResponse(0,companyDictService.getCompanyMembers(getCompanyMembersDTO));
}
@PostMapping("exportCompanyMembers")
@ApiOperation("获取公司里的成员 companyId 公司id userName 成员名称")
@LoginRequired
public void exportCompanyMembers(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){
companyDictService.exportCompanyMembers(getCompanyMembersDTO);
}
@PostMapping("memberSummary")
@ApiOperation("学员认证详情 companyId")
@LoginRequired
......
......@@ -70,7 +70,7 @@ public class DepartmentDictController {
@PostMapping("getMembers")
@ApiOperation("获取成员(树) companyId 公司id startDate endDate ")
@LoginRequired
// @LoginRequired
public ResponseVO getMembers(@RequestBody GetDepartmentMembersDTO getDepartmentMembersDTO){
return ResponseData.generateCreatedResponse(0,departmentDictService.getMembers(getDepartmentMembersDTO));
}
......
......@@ -6,6 +6,7 @@ import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.common.interceptor.TimeRequired;
import com.subsidy.dto.administer.VerifyCodeDTO;
import com.subsidy.dto.member.*;
import com.subsidy.mapper.MemberMapper;
import com.subsidy.model.ExerciseDoneResultDO;
import com.subsidy.model.MemberDO;
import com.subsidy.service.MemberService;
......@@ -191,4 +192,11 @@ public class MemberController {
return ResponseData.generateCreatedResponse(0,memberService.qxy(memberDO));
}
@PostMapping("register")
@ApiOperation("注册 companyId userName idCard telephone smsCode ")
// @LoginRequired
public ResponseVO register(@RequestBody RegisterDTO registerDTO){
return ResponseData.generateCreatedResponse(0,memberService.register(registerDTO));
}
}
......@@ -38,5 +38,13 @@ public class SmsVerifyCodeController {
return ResponseData.generateCreatedResponse(0);
}
@PostMapping(value = "/sendMsg")
@ApiOperation("发送短信验证码 注册发送 {telephone} ")
@TimeRequired
public ResponseVO sendMsg(@RequestBody SendVerifyCodeDTO sendVerifyCodeDTO ) {
smsVerifyCodeService.sendMsg(sendVerifyCodeDTO);
return ResponseData.generateCreatedResponse(0);
}
}
package com.subsidy.dto.cert;
import lombok.Data;
@Data
public class CertSignInfoDTO {
private Long certId;
private String status;
private String userName;
private Integer pageSize;
private Integer pageNum;
}
package com.subsidy.dto.cert;
import lombok.Data;
@Data
public class CertSignStatusDTO {
private Long memberId;
private Long typeId;
private Integer pageSize;
private Integer pageNum;
}
package com.subsidy.dto.member;
import com.subsidy.model.MemberDO;
import lombok.Data;
@Data
public class RegisterDTO extends MemberDO {
private Long companyId;
private String userName;
private String idCard;
private String telephone;
private String smsCode;
}
......@@ -3,10 +3,7 @@ package com.subsidy.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.model.AdministerDO;
import com.subsidy.vo.administer.ExerciseTestVO;
import com.subsidy.vo.administer.ImageCheckDetailVO;
import com.subsidy.vo.administer.MemberDetectionRecordVO;
import com.subsidy.vo.administer.PermissionsVO;
import com.subsidy.vo.administer.*;
import com.subsidy.vo.classdict.ClassDetailVO;
import com.subsidy.vo.member.ClassSignVO;
import com.subsidy.vo.sign.AnswerRecordVO;
......@@ -57,4 +54,10 @@ public interface AdministerMapper extends BaseMapper<AdministerDO> {
*/
IPage<ImageCheckDetailVO> imageCheckDetail(IPage iPage, Long classId, String userName);
/**
* 管理员账号管理
*/
IPage<OperatorsVO> operators(IPage page, String userName);
}
......@@ -3,9 +3,7 @@ package com.subsidy.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.model.CertMemberMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.vo.cert.GetListVO;
import com.subsidy.vo.cert.GetSignInfoVO;
import com.subsidy.vo.cert.SignManagementVO;
import com.subsidy.vo.cert.*;
import org.springframework.stereotype.Repository;
/**
......@@ -36,5 +34,15 @@ public interface CertMemberMappingMapper extends BaseMapper<CertMemberMappingDO>
int memberCertStatus(Long memberId,Long certId);
/**
* 手机首页--证书、类型、学生报名情况
*/
IPage<CertSignStatusVO> certTypeSignStatus(IPage page, Long memberId, Long TypeId);
/**
* 查看某个证书的报名情况
*/
IPage<CertSignInfoVO> certSignInfo(IPage iPage, Long certId, String status, String userName);
}
......@@ -33,4 +33,6 @@ public class CertMemberMappingDO extends BaseModel {
private Long orderNo;
private String commitPrice;
}
......@@ -35,5 +35,14 @@ public class ClassMemberMappingDO extends BaseModel {
*/
private Long classId;
/**
* 邮箱
*/
private String email;
/**
* 验证状态
*/
private Integer emailStatus;
}
package com.subsidy.model;
import lombok.Data;
@Data
public class Collection {
private String _id;
private String name;
}
......@@ -21,6 +21,7 @@ import org.omg.CosNaming.NamingContextExtPackage.StringNameHelper;
@TableName("opr_adm_dict")
public class OprAdmDictDO extends BaseModel{
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
......
......@@ -20,6 +20,7 @@ import lombok.EqualsAndHashCode;
@TableName("opr_mem_dict")
public class OprMemDictDO extends BaseModel {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
......
package com.subsidy.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.dto.cert.GetListDTO;
import com.subsidy.dto.cert.SignManagementDTO;
import com.subsidy.dto.cert.SignUpDTO;
import com.subsidy.dto.cert.*;
import com.subsidy.model.CertMemberMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.vo.cert.GetListVO;
import com.subsidy.vo.cert.GetSignInfoVO;
import com.subsidy.vo.cert.SignManagementVO;
import com.subsidy.vo.cert.*;
import java.util.List;
......@@ -31,4 +27,9 @@ public interface CertMemberMappingService extends IService<CertMemberMappingDO>
IPage<GetListVO> getList(GetListDTO getListDTO);
GetSignInfoVO getSignInfo(CertMemberMappingDO certMemberMappingDO);
IPage<CertSignStatusVO> certSignStatus(CertSignStatusDTO certSignStatusDTO);
IPage<CertSignInfoVO> certSignInfo(CertSignInfoDTO certSignInfoDTO);
}
......@@ -44,4 +44,5 @@ public interface ClassDictService extends IService<ClassDictDO> {
GetClassBaseInfoVO getClassBaseInfo(GetClassBaseInfoDTO getClassBaseInfoDTO);
String email(ClassMemberMappingDO classMemberMappingDO);
}
......@@ -41,6 +41,8 @@ public interface CompanyDictService extends IService<CompanyDictDO> {
IPage<GetCompanyMembersVO> getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO);
void exportCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO);
MemberSummaryVO memberSummary(GetCompanyMembersDTO getCompanyMembersDTO);
DataOverviewVO getCompanyDataOverview();
......
......@@ -66,4 +66,6 @@ public interface MemberService extends IService<MemberDO> {
String changeDepartments(ChangeDepartmentsDTO changeDepartmentsDTO);
QxyVO qxy(MemberDO memberDO);
UserRoleVO register(RegisterDTO registerDTO);
}
......@@ -16,4 +16,6 @@ public interface SmsVerifyCodeService extends IService<SmsVerifyCodeDO> {
void sendVerifyCode(SendVerifyCodeDTO sendVerifyCodeDTO);
void sendMsg(SendVerifyCodeDTO sendVerifyCodeDTO);
}
......@@ -2,6 +2,7 @@ package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.subsidy.common.exception.HttpException;
import com.subsidy.dto.detection.GetCheckHistoryDTO;
import com.subsidy.dto.detection.VerifyDTO;
import com.subsidy.model.ActivityDetectionDO;
......@@ -30,7 +31,7 @@ public class ActivityDetectionServiceImpl extends ServiceImpl<ActivityDetectionM
public String verify(VerifyDTO verifyDTO, HttpServletRequest request){
try{
DescribeCaptchaResultResponse resp = ActivityDetectionUtils.activityDetection(request,verifyDTO.getRandStr());
DescribeCaptchaResultResponse resp = ActivityDetectionUtils.activityDetection(request,verifyDTO.getTicket(),verifyDTO.getRandStr());
// 输出json格式的字符串回包
ActivityDetectionDO activityDetectionDO = new ActivityDetectionDO();
activityDetectionDO.setClassId(verifyDTO.getClassId());
......@@ -45,7 +46,7 @@ public class ActivityDetectionServiceImpl extends ServiceImpl<ActivityDetectionM
//失败
activityDetectionDO.setStatus(0);
this.baseMapper.insert(activityDetectionDO);
return ConstantUtils.FAIL_VERIFY;
throw new HttpException(19001);
}
} catch (Exception e) {
// System.out.println(e.toString());
......
......@@ -94,6 +94,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedInputStream;
......@@ -323,7 +324,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) {
Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize());
IPage<OperatorsVO> operatorsVOIPage = companyDictMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(), null, 1, null);
IPage<OperatorsVO> operatorsVOIPage = this.baseMapper.operators(pager, operatorsDTO.getUserName());
List<OperatorsVO> operatorsVOS = operatorsVOIPage.getRecords();
for (OperatorsVO operatorsVO : operatorsVOS) {
......@@ -383,7 +384,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
}
@Override
@Cacheable(value = "ResultData", key = "'classId_'+#classDetailDTO.getId()")
// @Cacheable(value = "ResultData", key = "'classId_'+#classDetailDTO.getId()")
public ClassSummaryVO classSummary(ClassDetailDTO classDetailDTO) {
ClassSummaryVO classSummaryVO = new ClassSummaryVO();
......@@ -640,10 +641,12 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
classSignVO.setSignInDateList(signInDate);
}
//最近一次签到
SignInRecordDO signInRecordDO = signInRecordDOS.get(signInRecordDOS.size() - 1);
classSignVO.setIpAddress(signInRecordDO.getIpAddress());
classSignVO.setDeviceNo(signInRecordDO.getDeviceNo());
if (signInRecordDOS.size() > 0) {
//最近一次签到
SignInRecordDO signInRecordDO = signInRecordDOS.get(signInRecordDOS.size() - 1);
classSignVO.setIpAddress(signInRecordDO.getIpAddress());
classSignVO.setDeviceNo(signInRecordDO.getDeviceNo());
}
}
classSignVOIPage.setRecords(classSignVOS);
......@@ -684,10 +687,11 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
}
//最近一次签到
SignInRecordDO signInRecordDO = signInRecordDOS.get(signInRecordDOS.size() - 1);
classSignVO.setIpAddress(signInRecordDO.getIpAddress());
classSignVO.setDeviceNo(signInRecordDO.getDeviceNo());
if (signInRecordDOS.size() > 0) {
SignInRecordDO signInRecordDO = signInRecordDOS.get(signInRecordDOS.size() - 1);
classSignVO.setIpAddress(signInRecordDO.getIpAddress());
classSignVO.setDeviceNo(signInRecordDO.getDeviceNo());
}
}
if (classDetailDTO.getFlag()) {
......@@ -1366,6 +1370,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
});
} catch (
Exception e) {
e.printStackTrace();
throw new HttpException(10001);
}
return ConstantUtils.ADD_SUCCESS;
......
......@@ -45,33 +45,32 @@ public class CertCompanyMappingServiceImpl extends ServiceImpl<CertCompanyMappin
@Autowired
private CertCompanyMappingMapper certCompanyMappingMapper;
public List<GetCompanyCertsWithStatusVO> getCompanyCertsWithStatus(GetCompanyCertsWithStatusDTO getCompanyCertsDTO){
public List<GetCompanyCertsWithStatusVO> getCompanyCertsWithStatus(GetCompanyCertsWithStatusDTO getCompanyCertsDTO) {
List<GetCompanyCertsWithStatusVO> getCompanyCertsWithStatusVOS = new ArrayList<>();
//查看某个公司所有的证书
List<CertDictDO> certDictDOS = this.baseMapper.getCompanyCerts(getCompanyCertsDTO.getCompanyId(),getCompanyCertsDTO.getTypeId());
for (CertDictDO certDictDO : certDictDOS){
List<CertDictDO> certDictDOS = this.baseMapper.getCompanyCerts(getCompanyCertsDTO.getCompanyId(), getCompanyCertsDTO.getTypeId());
for (CertDictDO certDictDO : certDictDOS) {
GetCompanyCertsWithStatusVO getCompanyCertsWithStatusVO = new GetCompanyCertsWithStatusVO();
BeanUtils.copyProperties(certDictDO,getCompanyCertsWithStatusVO);
int count = certMemberMappingMapper.selectCount(new QueryWrapper<CertMemberMappingDO>()
.lambda()
.eq(CertMemberMappingDO::getCertId,certDictDO.getId())
.eq(CertMemberMappingDO::getMemberId,getCompanyCertsDTO.getMemberId()));
if (count>0){
getCompanyCertsWithStatusVO.setStatus(true);
BeanUtils.copyProperties(certDictDO, getCompanyCertsWithStatusVO);
CertMemberMappingDO certMemberMappingDO = certMemberMappingMapper.selectOne(new QueryWrapper<CertMemberMappingDO>()
.lambda()
.eq(CertMemberMappingDO::getCertId, certDictDO.getId())
.eq(CertMemberMappingDO::getMemberId, getCompanyCertsDTO.getMemberId()));
if (null != certMemberMappingDO){
getCompanyCertsWithStatusVO.setStatus(certMemberMappingDO.getStatus());
}else {
getCompanyCertsWithStatusVO.setStatus(false);
getCompanyCertsWithStatusVO.setStatus("未报名");
}
getCompanyCertsWithStatusVOS.add(getCompanyCertsWithStatusVO);
}
return getCompanyCertsWithStatusVOS;
}
public IPage<GetCompanyCertsVO> getCompanyCerts(GetCompanyCertsDTO getCompanyCertsDTO){
public IPage<GetCompanyCertsVO> getCompanyCerts(GetCompanyCertsDTO getCompanyCertsDTO) {
Page pager = new Page(getCompanyCertsDTO.getPageNum(), getCompanyCertsDTO.getPageSize());
......@@ -79,36 +78,36 @@ public class CertCompanyMappingServiceImpl extends ServiceImpl<CertCompanyMappin
List<GetCompanyCertsVO> getCompanyCertsVOS = getCompanyCertsVOIPage.getRecords();
for (GetCompanyCertsVO getCompanyCertsVO : getCompanyCertsVOS){
for (GetCompanyCertsVO getCompanyCertsVO : getCompanyCertsVOS) {
List<CertTypeDictDO> certTypeDictDOS = certTypeDictMapper.getCertTypes(getCompanyCertsVO.getId());
getCompanyCertsVO.setCertTypeDictDOS(certTypeDictDOS);
int count = certCompanyMappingMapper.selectCount(new QueryWrapper<CertCompanyMappingDO>()
.lambda()
.eq(CertCompanyMappingDO::getCertId,getCompanyCertsVO.getId())
.eq(CertCompanyMappingDO::getCompanyId,getCompanyCertsDTO.getCompanyId()));
.lambda()
.eq(CertCompanyMappingDO::getCertId, getCompanyCertsVO.getId())
.eq(CertCompanyMappingDO::getCompanyId, getCompanyCertsDTO.getCompanyId()));
if (count>0){
if (count > 0) {
getCompanyCertsVO.setSignStatus(true);
}else {
} else {
getCompanyCertsVO.setSignStatus(false);
}
}
return getCompanyCertsVOIPage;
}
public String changeCompanyCerts(ChangeCompanyCertsDTO changeCompanyCertsDTO){
public String changeCompanyCerts(ChangeCompanyCertsDTO changeCompanyCertsDTO) {
if (changeCompanyCertsDTO.getSignStatus()){
if (changeCompanyCertsDTO.getSignStatus()) {
CertCompanyMappingDO certCompanyMappingDO = new CertCompanyMappingDO();
certCompanyMappingDO.setCertId(changeCompanyCertsDTO.getCertId());
certCompanyMappingDO.setCompanyId(changeCompanyCertsDTO.getCompanyId());
this.baseMapper.insert(certCompanyMappingDO);
}else {
} else {
this.baseMapper.delete(new QueryWrapper<CertCompanyMappingDO>()
.lambda()
.eq(CertCompanyMappingDO::getCertId,changeCompanyCertsDTO.getCertId())
.eq(CertCompanyMappingDO::getCompanyId,changeCompanyCertsDTO.getCompanyId()));
.lambda()
.eq(CertCompanyMappingDO::getCertId, changeCompanyCertsDTO.getCertId())
.eq(CertCompanyMappingDO::getCompanyId, changeCompanyCertsDTO.getCompanyId()));
}
return ConstantUtils.SET_SUCCESS;
}
......
......@@ -118,12 +118,17 @@ public class CertDictServiceImpl extends ServiceImpl<CertDictMapper, CertDictDO>
List<CertTypeDictDO> certTypeDictDOS = certTypeDictMapper.getCertTypes(certDictDO1.getId());
getOneCertVO.setCertTypeDictDOS(certTypeDictDOS);
Integer count = certMemberMappingMapper.memberCertStatus(getOneCertDTO.getUserId(),certDictDO1.getId());
// Integer count = certMemberMappingMapper.memberCertStatus(getOneCertDTO.getUserId(),certDictDO1.getId());
if (count > 0){
getOneCertVO.setStatus(true);
CertMemberMappingDO certMemberMappingDO = certMemberMappingMapper.selectOne(new QueryWrapper<CertMemberMappingDO>()
.lambda()
.eq(CertMemberMappingDO::getCertId,certDictDO1.getId())
.eq(CertMemberMappingDO::getMemberId,getOneCertDTO.getUserId()));
if (null != certMemberMappingDO){
getOneCertVO.setStatus(certMemberMappingDO.getStatus());
}else {
getOneCertVO.setStatus(false);
getOneCertVO.setStatus("未报名");
}
return getOneCertVO;
......
......@@ -3,9 +3,7 @@ package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.subsidy.dto.cert.GetListDTO;
import com.subsidy.dto.cert.SignManagementDTO;
import com.subsidy.dto.cert.SignUpDTO;
import com.subsidy.dto.cert.*;
import com.subsidy.mapper.CertMemberFileMappingMapper;
import com.subsidy.mapper.CertRequirementMapper;
import com.subsidy.mapper.CertTypeDictMapper;
......@@ -18,9 +16,7 @@ import com.subsidy.service.CertMemberFileMappingService;
import com.subsidy.service.CertMemberMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import com.subsidy.vo.cert.GetListVO;
import com.subsidy.vo.cert.GetSignInfoVO;
import com.subsidy.vo.cert.SignManagementVO;
import com.subsidy.vo.cert.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -63,7 +59,7 @@ public class CertMemberMappingServiceImpl extends ServiceImpl<CertMemberMappingM
certMemberMappingDO.setCertId(signUpDTO.getCertId());
certMemberMappingDO.setMemberId(signUpDTO.getMemberId());
certMemberMappingDO.setOrderNo(System.currentTimeMillis());
certMemberMappingDO.setStatus("等待确认");
certMemberMappingDO.setStatus("已报名");
this.baseMapper.insert(certMemberMappingDO);
//生成订单逻辑 TODO
......@@ -96,19 +92,30 @@ public class CertMemberMappingServiceImpl extends ServiceImpl<CertMemberMappingM
public String changeStatus(CertMemberMappingDO certMemberMappingDO) {
CertMemberMappingDO certMemberMappingDO1 = this.baseMapper.selectById(certMemberMappingDO.getId());
certMemberMappingDO1.setStatus(certMemberMappingDO.getStatus());
if (null != certMemberMappingDO){
certMemberMappingDO1.setCommitPrice(certMemberMappingDO.getCommitPrice());
}
this.baseMapper.updateById(certMemberMappingDO1);
return ConstantUtils.SET_SUCCESS;
}
public IPage<GetListVO> getList(GetListDTO getListDTO) {
Page pager = new Page(getListDTO.getPageNum(), getListDTO.getPageSize());
return this.baseMapper.getList(pager,getListDTO.getMemberId(),getListDTO.getStatus());
return this.baseMapper.getList(pager, getListDTO.getMemberId(), getListDTO.getStatus());
}
public GetSignInfoVO getSignInfo(CertMemberMappingDO certMemberMappingDO) {
return this.baseMapper.getSignInfo(certMemberMappingDO.getMemberId(), certMemberMappingDO.getCertId());
}
public IPage<CertSignStatusVO> certSignStatus(CertSignStatusDTO certSignStatusDTO) {
Page pager = new Page(certSignStatusDTO.getPageNum(), certSignStatusDTO.getPageSize());
return this.baseMapper.certTypeSignStatus(pager, certSignStatusDTO.getMemberId(), certSignStatusDTO.getTypeId());
}
public GetSignInfoVO getSignInfo(CertMemberMappingDO certMemberMappingDO){
return this.baseMapper.getSignInfo(certMemberMappingDO.getMemberId(),certMemberMappingDO.getCertId());
public IPage<CertSignInfoVO> certSignInfo(CertSignInfoDTO certSignInfoDTO) {
Page pager = new Page(certSignInfoDTO.getPageNum(), certSignInfoDTO.getPageSize());
return this.baseMapper.certSignInfo(pager,certSignInfoDTO.getCertId(),certSignInfoDTO.getStatus(),certSignInfoDTO.getUserName());
}
}
......@@ -270,4 +270,19 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
return getClassBaseInfoVO;
}
public String email(ClassMemberMappingDO classMemberMappingDO){
ClassMemberMappingDO classMemberMappingDO1 = classMemberMappingMapper.selectOne(new QueryWrapper<ClassMemberMappingDO>()
.lambda()
.eq(ClassMemberMappingDO::getMemberId,classMemberMappingDO.getMemberId())
.eq(ClassMemberMappingDO::getClassId,classMemberMappingDO.getClassId()));
if (null != classMemberMappingDO1){
classMemberMappingDO1.setEmail(classMemberMappingDO.getEmail());
classMemberMappingDO1.setEmailStatus(classMemberMappingDO.getEmailStatus());
classMemberMappingMapper.updateById(classMemberMappingDO1);
}
return ConstantUtils.SUCCESS_UPDATE;
}
}
......@@ -36,6 +36,7 @@ import com.subsidy.util.ConstantUtils;
import com.subsidy.util.DateFormatUtil;
import com.subsidy.util.EhCacheUtil;
import com.subsidy.util.VodUtil;
import com.subsidy.util.excel.ExcelUtil;
import com.subsidy.util.websocket.WebSocketUtil;
import com.subsidy.vo.administer.OperatorsVO;
import com.subsidy.vo.classdict.ClassSettingsVO;
......@@ -296,13 +297,13 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
CompanyDictDO companyDictDO1 = this.baseMapper.selectById(companyDictDO.getId());
SystemSettings systemSettings = new SystemSettings();
BeanUtils.copyProperties(companyDictDO1,systemSettings);
BeanUtils.copyProperties(companyDictDO1, systemSettings);
List<ClassMemberMappingDO> list = classMemberMappingMapper.getCLassMemberByCompanyId(companyDictDO.getId());
if(CollectionUtils.isNotEmpty(list)) {
if (CollectionUtils.isNotEmpty(list)) {
for (ClassMemberMappingDO classMemberMappingDO : list) {
WebSocketSession webSocketSession = WebSocketUtil.webSocketMap.get(classMemberMappingDO.getMemberId());
if(null != webSocketSession && webSocketSession.isOpen()) {
if (null != webSocketSession && webSocketSession.isOpen()) {
try {
List<ClassSettingsVO> classSettings = classDictMapper.getClassSettings(classMemberMappingDO.getMemberId());
systemSettings.setClassSettingsVOS(classSettings);
......@@ -330,6 +331,12 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
return this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName());
}
public void exportCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO) {
Page pager = new Page(1, -1);
List<GetCompanyMembersVO> getCompanyMembersVOS = this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName()).getRecords();
ExcelUtil.writeExcel(getCompanyMembersVOS, GetCompanyMembersVO.class);
}
@Override
public DataOverviewVO getCompanyDataOverview() {
DataOverviewVO dataOverviewVO = new DataOverviewVO();
......@@ -338,7 +345,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
dataOverviewVO.setCompanyNum(companyNum);
List<MemberDO> memberList = memberMapper.selectList(new QueryWrapper<>());
if(CollectionUtils.isNotEmpty(memberList)) {
if (CollectionUtils.isNotEmpty(memberList)) {
int realNameNum = (int) memberList.stream().filter(m -> StringUtils.isNotBlank(m.getIdCard())).count();
/* 注册人数 */
dataOverviewVO.setRegistrantsNum(memberList.size());
......@@ -351,7 +358,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
dataOverviewVO.setClassNum(classNum);
List<CourseDictDO> courseList = courseDictMapper.selectList(new QueryWrapper<>());
if(CollectionUtils.isNotEmpty(courseList)) {
if (CollectionUtils.isNotEmpty(courseList)) {
/* 资源数量 */
dataOverviewVO.setCourseNum(courseList.size());
......@@ -363,14 +370,14 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
/* 累计学习时长(小时) */
double studyTotal = vodPlayHistoryMapper.getStudyTotal();
if(studyTotal > 0) {
if (studyTotal > 0) {
dataOverviewVO.setStudyTotal(new BigDecimal(studyTotal).divide(new BigDecimal(Math.pow(60, 2)), 2, BigDecimal.ROUND_UP).doubleValue());
}
/* 专项资源时(小时) */
double subsidyStudyTotal = vodPlayHistoryMapper.getSubsidyStudyTotal();
if(subsidyStudyTotal > 0) {
dataOverviewVO.setSubsidyStudyTotal(new BigDecimal(subsidyStudyTotal).divide(new BigDecimal(Math.pow(60,2)), 2, BigDecimal.ROUND_UP).doubleValue());
if (subsidyStudyTotal > 0) {
dataOverviewVO.setSubsidyStudyTotal(new BigDecimal(subsidyStudyTotal).divide(new BigDecimal(Math.pow(60, 2)), 2, BigDecimal.ROUND_UP).doubleValue());
}
/* 学习过程记录人次 */
......@@ -379,7 +386,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
return dataOverviewVO;
}
public MemberSummaryVO memberSummary(GetCompanyMembersDTO getCompanyMembersDTO){
public MemberSummaryVO memberSummary(GetCompanyMembersDTO getCompanyMembersDTO) {
MemberSummaryVO memberSummaryVO = new MemberSummaryVO();
......@@ -409,15 +416,15 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
* 返回数据单位:bps, 转换成Mbps, 1Mbps = 1000000bps
*/
List<CDNStatDetailsVO> data = new ArrayList<>();
if(EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.BANDWIDTH_CACHE_KEY) != null) {
if (EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.BANDWIDTH_CACHE_KEY) != null) {
return (List<CDNStatDetailsVO>) EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.BANDWIDTH_CACHE_KEY);
} else {
String startDate =LocalDateTime.now().minusDays(6).withNano(0)+"+08:00";
String endDate = LocalDateTime.now().withNano(0)+"+08:00";
StatDataItem[] statDataItems = VodUtil.DescribeCDNStatDetails(vodConfig, VodConstant.BANDWIDTH ,startDate, endDate);
String startDate = LocalDateTime.now().minusDays(6).withNano(0) + "+08:00";
String endDate = LocalDateTime.now().withNano(0) + "+08:00";
StatDataItem[] statDataItems = VodUtil.DescribeCDNStatDetails(vodConfig, VodConstant.BANDWIDTH, startDate, endDate);
for (StatDataItem statDataItem : statDataItems) {
CDNStatDetailsVO sd = new CDNStatDetailsVO();
LocalDateTime localDateTime = LocalDateTime.parse(statDataItem.getTime().replace("+08:00",""));
LocalDateTime localDateTime = LocalDateTime.parse(statDataItem.getTime().replace("+08:00", ""));
Date date = DateFormatUtil.localDateTimeToDate(localDateTime);
sd.setTime(DateFormatUtil.format(date, DateFormatUtil.FMT_sdf_yMd));
BigDecimal bigDecimal = new BigDecimal(statDataItem.getValue()).divide(new BigDecimal(1000000));
......@@ -438,15 +445,15 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
* 返回数据单位:B, 转换成GB
*/
List<CDNStatDetailsVO> data = new ArrayList<>();
if(EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.FLUX_CACHE_KEY) != null) {
if (EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.FLUX_CACHE_KEY) != null) {
return (List<CDNStatDetailsVO>) EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.FLUX_CACHE_KEY);
} else {
String startDate =LocalDateTime.now().minusDays(6).withNano(0)+"+08:00";
String endDate = LocalDateTime.now().withNano(0)+"+08:00";
StatDataItem[] statDataItems = VodUtil.DescribeCDNStatDetails(vodConfig, VodConstant.FLUX ,startDate, endDate);
String startDate = LocalDateTime.now().minusDays(6).withNano(0) + "+08:00";
String endDate = LocalDateTime.now().withNano(0) + "+08:00";
StatDataItem[] statDataItems = VodUtil.DescribeCDNStatDetails(vodConfig, VodConstant.FLUX, startDate, endDate);
for (StatDataItem statDataItem : statDataItems) {
CDNStatDetailsVO sd = new CDNStatDetailsVO();
LocalDateTime localDateTime = LocalDateTime.parse(statDataItem.getTime().replace("+08:00",""));
LocalDateTime localDateTime = LocalDateTime.parse(statDataItem.getTime().replace("+08:00", ""));
Date date = DateFormatUtil.localDateTimeToDate(localDateTime);
sd.setTime(DateFormatUtil.format(date, DateFormatUtil.FMT_sdf_yMd));
BigDecimal bigDecimal = new BigDecimal(statDataItem.getValue()).divide(new BigDecimal(Math.pow(1000, 3)));
......
......@@ -401,6 +401,7 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD
}
businessVOS.add(businessVO);
}
queryCoursesVO.setBusinessVOS(businessVOS);
//课时
Integer vodCnt = courseDictMapper.queryCourseCnt(queryCoursesVO.getId());
queryCoursesVO.setVodCounts(vodCnt);
......
......@@ -225,19 +225,20 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
}
gmv.setChildren(getChildNodes(gmv));
if (dpt.getParentId()!=null){
//部门人员
List<MemberDO> memberDOS1 = memberMapper.getMemberWithoutPage(dpt.getId(),getMembersVO.getUserName(),null,null,null);
gmv.setMemberDOS(memberDOS1);
getMembersVOS.add(gmv);
}else {
//公司人员
List<MemberDO> memberDOS = memberMapper.selectList(new QueryWrapper<MemberDO>()
.lambda()
.eq(MemberDO::getCompanyId,getDepartmentMembersDTO.getCompanyId()));
gmv.setMemberDOS(memberDOS);
getMembersVOS.add(gmv);
}
// if (dpt.getParentId()!=null){
// //部门人员
// List<MemberDO> memberDOS1 = memberMapper.getMemberWithoutPage(dpt.getId(),getMembersVO.getUserName(),null,null,null);
// gmv.setMemberDOS(memberDOS1);
// getMembersVOS.add(gmv);
// }else {
// //公司人员
// List<MemberDO> memberDOS = memberMapper.selectList(new QueryWrapper<MemberDO>()
// .lambda()
// .eq(MemberDO::getCompanyId,getDepartmentMembersDTO.getCompanyId()));
// gmv.setMemberDOS(memberDOS);
// getMembersVOS.add(gmv);
// }
getMembersVOS.add(gmv);
}
return getMembersVOS;
}
......@@ -271,7 +272,9 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
//部门人员
List<MemberDO> memberDOS = memberMapper.getMemberWithoutPage(dd.getId(),getMembersVO.getUserName(),null,null,null);
gmv.setMemberDOS(memberDOS);
if (memberDOS.size()>0){
gmv.setMemberDOS(memberDOS);
}
getAllDepartmentVOS.add(gmv);
}
if (departmentDictDOS.size() == 0) {
......
......@@ -16,6 +16,10 @@ import com.subsidy.util.*;
import com.subsidy.vo.administer.UserRoleVO;
import com.subsidy.vo.member.*;
import com.subsidy.vo.paper.QueryPapersVO;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
......@@ -662,9 +666,9 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
checkStatusVO.setSMSStatus(false);
}
if (StringUtils.isEmpty(memberDO1.getIdCardPhoto())){
if (StringUtils.isEmpty(memberDO1.getIdCardPhoto())) {
checkStatusVO.setIdCardStatus(false);
}else {
} else {
checkStatusVO.setIdCardStatus(true);
}
......@@ -696,7 +700,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
.eq(ImageCheckRecordDO::getCheckPlace, 0)
.eq(ImageCheckRecordDO::getResult, 1));
int checkCnt = imageCheckRecordMapper.checkDailyCount(myCoursesDTO.getMemberId(), myCoursesVO.getClassId(), 1,null);
int checkCnt = imageCheckRecordMapper.checkDailyCount(myCoursesDTO.getMemberId(), myCoursesVO.getClassId(), 1, null);
myCoursesVO.setCheckCnt(checkCnt);
if (count > 0) {
......@@ -845,11 +849,11 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
.lambda()
.eq(ImageCheckRecordDO::getMemberId, contentMemberDTO.getMemberId())
.eq(ImageCheckRecordDO::getClassId, contentMemberDTO.getClassId())
.eq(ImageCheckRecordDO::getPaperId,queryPapersVO.getId())
.eq(ImageCheckRecordDO::getPaperId, queryPapersVO.getId())
.eq(ImageCheckRecordDO::getClassPlace, 2)
.eq(ImageCheckRecordDO::getResult, 1));
int checkCnt = imageCheckRecordMapper.checkDailyCount(contentMemberDTO.getMemberId(), contentMemberDTO.getClassId(), 2,queryPapersVO.getId());
int checkCnt = imageCheckRecordMapper.checkDailyCount(contentMemberDTO.getMemberId(), contentMemberDTO.getClassId(), 2, queryPapersVO.getId());
queryPapersVO.setCheckCnt(checkCnt);
if (count > 0) {
......@@ -1004,4 +1008,77 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
}
return new QxyVO();
}
@Transactional(rollbackFor = Exception.class)
public UserRoleVO register(RegisterDTO registerDTO) {
UserRoleVO userRoleVO = new UserRoleVO();
//判断手机号是否已经注册
int count = this.baseMapper.selectCount(new QueryWrapper<MemberDO>()
.lambda()
.eq(MemberDO::getTelephone, registerDTO.getTelephone()));
if (count > 0) {
throw new HttpException(10027);
}
SmsVerifyCodeDO smsCodeDO = smsVerifyCodeMapper.selectOne(new QueryWrapper<SmsVerifyCodeDO>()
.lambda()
.eq(SmsVerifyCodeDO::getTelephone, registerDTO.getTelephone())
.eq(SmsVerifyCodeDO::getVerifyCode, registerDTO.getSmsCode())
.gt(SmsVerifyCodeDO::getCreateDate, LocalDateTime.now().minusMinutes(30L)));
if (null == smsCodeDO) {
throw new HttpException(10003);
}
//赋值
MemberDO memberDO = new MemberDO();
BeanUtils.copyProperties(registerDTO,memberDO);
memberDO.setFirstLogin(1);
memberDO.setStatus("启用");
HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
//拼音小写
format.setCaseType(HanyuPinyinCaseType.LOWERCASE);
//不带声调
format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
try {
String accountName = PinyinHelper.toHanYuPinyinString(registerDTO.getUserName(), format, "", true);
memberDO.setAccountName(accountName);
memberDO.setPassword("123456");
}catch (Exception e){
e.printStackTrace();
}
this.baseMapper.insert(memberDO);
//审计日志
OprMemDictDO oprMemDictDO = new OprMemDictDO();
oprMemDictDO.setUserId(memberDO.getId());
oprMemDictDO.setOprType("登录");
//oprMemDictDO.setUserName(memberDO.getUserName());
oprMemDictDO.setResult(1);
//oprMemDictDO.setCreateDate(System.currentTimeMillis() + "");
//oprMemDictDO.setLoginDateFormat(DateFormatUtil.format(new Date(), "yyyyMMdd"));
//oprMemDictDO.setCompanyId(companyDictDO.getId());
//oprMemDictDO.setCompanyName(companyDictDO.getCompanyName());
oprMemDictMapper.insert(oprMemDictDO);
CompanyDictDO companyDictDO = companyDictMapper.selectById(registerDTO.getCompanyId());
BeanUtils.copyProperties(memberDO,userRoleVO);
userRoleVO.setCompanyId(companyDictDO.getId());
userRoleVO.setSuperviseName(companyDictDO.getSuperviseName());
userRoleVO.setCompanyName(companyDictDO.getCompanyName());
userRoleVO.setLogo(companyDictDO.getLogo());
userRoleVO.setQxyStatus(companyDictDO.getQxyStatus());
List<RotationImgDictDO> rotationImgDictDOS = rotationImgDictMapper.selectList(new QueryWrapper<RotationImgDictDO>()
.lambda()
.eq(RotationImgDictDO::getCompanyId, companyDictDO.getId()));
userRoleVO.setRotationImgDictDOS(rotationImgDictDOS);
String token = JwtUtil.generateToken(memberDO.getId(), ConstantUtils.MOBILE_TERMINATE);
//redisUtil.set(ConstantUtils.MOBILE_TERMINATE + "_" + memberDO.getId(), token);
Localstorage.setUser(memberDO);
userRoleVO.setToken(token);
return userRoleVO;
}
}
......@@ -58,4 +58,19 @@ public class SmsVerifyCodeServiceImpl extends ServiceImpl<SmsVerifyCodeMapper, S
this.baseMapper.insert(smsCodeDO);
}
public void sendMsg(SendVerifyCodeDTO sendVerifyCodeDTO) {
String code = RandomUtil.getRandomCode(6);
smsUtils.send(sendVerifyCodeDTO.getTelephone(), code);
this.baseMapper.delete(new QueryWrapper<SmsVerifyCodeDO>()
.lambda()
.eq(SmsVerifyCodeDO::getTelephone,sendVerifyCodeDTO.getTelephone()));
//redisUtil.set(RedisPrefixConstant.SUBSIDY_TELEPHONE_PREFIX + sendVerifyCodeDTO.getTelephone(), code, 30 * 60);
SmsVerifyCodeDO smsCodeDO = new SmsVerifyCodeDO();
smsCodeDO.setVerifyCode(code);
smsCodeDO.setTelephone(sendVerifyCodeDTO.getTelephone());
this.baseMapper.insert(smsCodeDO);
}
}
......@@ -630,7 +630,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
public HashSet<Long> testPlays(VodPlayHistoryDO vodPlayHistoryDO) {
String classIds = "150,151,152,153,165,195,199,200,202,207,209,210,211,212,213,215,227,228,229,233,234,235,240,241,243,244,248,249,250,251,252,253,254,255,256,257,258,261,268,278,280,282,286,287,288,289,292,293,294,295,297,298,300,301,303,304,305,306";
String classIds = "344";
String[] classIdArr = classIds.split(",");
......@@ -649,7 +649,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
System.out.println("111111111111111111111" + vodPlayStateVO);
//查看这个人 这个课程 当天的全部数据 按照createDate升序排序
List<VodPlayHistoryDO> vodPlayHistoryDOS = this.baseMapper.getVodPlayDay(Long.valueOf(classId), classMemberMappingDO.getMemberId(), vodPlayStateVO.getStartDate());
// //从第一条开始看,顺延减去第二条的playlength得到第二条的create_date 以此类推
//从第一条开始看,顺延减去第二条的playlength得到第二条的create_date 以此类推
for (int l = 0; l < vodPlayHistoryDOS.size() - 1; l++) {
VodPlayHistoryDO vph1 = vodPlayHistoryDOS.get(l); //第一条
if (l==0){
......
......@@ -19,7 +19,7 @@ public class ActivityDetectionUtils {
* @throws Exception
*/
public static DescribeCaptchaResultResponse activityDetection(HttpServletRequest request, String randstr) throws Exception {
public static DescribeCaptchaResultResponse activityDetection(HttpServletRequest request,String ticket, String randstr) throws Exception {
// 实例化一个认证对象,入参需要传入腾讯云账户secretId,secretKey,此处还需注意密钥对的保密
// 密钥可前往https://console.cloud.tencent.com/cam/capi网站进行获取
......@@ -41,6 +41,7 @@ public class ActivityDetectionUtils {
req.setCaptchaAppId(ConstantUtils.CAPTCHAAPP_ID);
req.setAppSecretKey(ConstantUtils.APP_SECRET_KEY);
req.setBusinessId(ConstantUtils.BUSINESS_ID);
req.setTicket(ticket);
// 返回的resp是一个DescribeCaptchaResultResponse的实例,与请求对象对应
return client.DescribeCaptchaResult(req);
}
......
package com.subsidy.vo.cert;
import lombok.Data;
@Data
public class CertSignInfoVO {
private Long id;
private String userName;
private String companyName;
private String telephone;
private String idCard;
private String status;
private String price;
private String scribePrice;
private String commitPrice;
}
package com.subsidy.vo.cert;
import com.subsidy.model.CertDictDO;
import lombok.Data;
@Data
public class CertSignStatusVO extends CertDictDO {
private String status;
}
......@@ -6,6 +6,6 @@ import lombok.Data;
@Data
public class GetCompanyCertsWithStatusVO extends CertDictDO {
private Boolean status;
private String status;
}
......@@ -11,6 +11,6 @@ public class GetOneCertVO extends CertDictDO {
private List<CertTypeDictDO> certTypeDictDOS;
private Boolean status;
private String status;
}
......@@ -24,6 +24,11 @@ public class ClassDetailVO{
@ExcelColumn(col = 3,value = "性别")
private String gender;
/**
* 邮箱
*/
private String email;
@ExcelColumn(col = 4,value = "身份证号")
private String idCard;
......
package com.subsidy.vo.company;
import com.subsidy.util.excel.ExcelColumn;
import lombok.Data;
@Data
public class GetCompanyMembersVO {
@ExcelColumn(col = 1,value = "ID")
private Long id;
@ExcelColumn(col = 2,value = "用户名称")
private String userName;
private String idCard;
@ExcelColumn(col = 3,value = "手机号")
private String telephone;
private String idCardPhoto;
@ExcelColumn(col = 3,value = "身份证号")
private String idCard;
@ExcelColumn(col = 4,value = "所属企业")
private String companyName;
private Integer firstLogin;
@ExcelColumn(col = 5,value = "企业账号")
private String accountName;
@ExcelColumn(col = 6,value = "手机短信验证")
private String firstLogin;
@ExcelColumn(col = 7,value = "身份证验证")
private String idCardPhoto;
@ExcelColumn(col = 8,value = "人脸图像采集")
private String checkImage;
@ExcelColumn(col = 9,value = "最近采集时间")
private String checkTime;
}
......@@ -36,5 +36,7 @@ public class MyCoursesVO {
private Integer checkCnt;
private Integer emailStatus;
private List<FieldDictDO> fieldDictDOS;
}
......@@ -2,7 +2,7 @@
spring.server.port=23459
# 数据源配置
spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy_new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=ykadmin_new
......
# 环境配置
spring.profiles.active=dev
spring.profiles.active=prod
#和CPU数
spring.server.acceptorThreadCount=600
spring.server.minSpareThreads=100
......
......@@ -19,6 +19,7 @@ meishu.code-message[10023]=密码输入错误,您还可以输入3次密码
meishu.code-message[10024]=密码输入错误,您还可以输入4次密码
meishu.code-message[10025]=身份证识别错误
meishu.code-message[10026]=姓名或身份证号格式不正确
meishu.code-message[10027]=该手机号已注册
meishu.code-message[20001]=该课程已存在
......@@ -71,4 +72,4 @@ meishu.code-message[17001]=系统不支持00:00:00~06:00:00学习
meishu.code-message[18001]=已超过当日验证次数上线
meishu.code-message[19001]=验证失败
\ No newline at end of file
......@@ -50,7 +50,8 @@
t2.gender,
t2.id_card,
t2.account_name,
t2.telephone
t2.telephone,
t.email
FROM
class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
......@@ -60,7 +61,7 @@
<if test="userName != null and userName !=''">
and t2.user_name like concat('%',#{userName} ,'%')
</if>
order by t2.id
order by t2.account_name
</select>
<select id="classSign" resultType="com.subsidy.vo.member.ClassSignVO">
......@@ -79,7 +80,7 @@
<if test="userName != null and userName !=''">
and t2.user_name like concat('%',#{userName} ,'%')
</if>
order by t2.id
order by t2.account_name
</select>
<select id="exerciseTest" resultType="com.subsidy.vo.administer.ExerciseTestVO">
......@@ -98,7 +99,7 @@
<if test="userName != null and userName !=''">
and t2.user_name like concat('%',#{userName} ,'%')
</if>
order by t2.id
order by t2.account_name
</select>
<select id="answerRecord" resultType="com.subsidy.vo.sign.AnswerRecordVO">
......@@ -118,6 +119,7 @@
<if test="userName !=null and userName !=''">
AND t2.user_name LIKE concat('%',#{userName} ,'%')
</if>
order by t2.account_name
</select>
<select id="classActivityDetection" resultType="com.subsidy.vo.administer.MemberDetectionRecordVO">
......@@ -141,7 +143,7 @@
</if>
GROUP BY
t.member_id
order by t2.id
order by t2.account_name
</select>
<select id="imageCheckDetail" resultType="com.subsidy.vo.administer.ImageCheckDetailVO">
......@@ -191,6 +193,22 @@
t2.member_id,
t2.class_id
) t2 ON t1.id = t2.member_id
order by t1.account_name
</select>
<select id="operators" parameterType="string" resultType="com.subsidy.vo.administer.OperatorsVO">
SELECT
t.id,
t.user_name,
t.account_name
FROM
administer t
WHERE
t.role = 0
AND t.delete_date IS NULL
<if test="userName != null and userName != ''">
and t.user_name like concat('%',#{userName} ,'%')
</if>
</select>
</mapper>
......@@ -121,8 +121,58 @@
AND t.member_id = #{memberId}
AND t.cert_id = #{certId}
AND (
t.`status` = "等待确认"
t.`status` = "已报名"
OR t.`status` = "等待支付"
OR t.`status` = "有效订单")
</select>
<select id="certTypeSignStatus" resultType="com.subsidy.vo.cert.CertSignStatusVO">
SELECT DISTINCT
t.id,
t.cert_name,
t.cover_page,
t.price,
t.scribe_price,
t4.`status`
FROM
cert_dict t
LEFT JOIN cert_type_mapping t2 ON t.id = t2.cert_id
LEFT JOIN cert_member_mapping t4 ON t.id = t4.cert_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t4.delete_date IS NULL
AND t4.member_id = #{memberId}
AND t2.type_id = #{typeId}
</select>
<select id="certSignInfo" resultType="com.subsidy.vo.cert.CertSignInfoVO">
SELECT
t.id,
t1.user_name,
t2.company_name,
t1.telephone,
t1.id_card,
t.STATUS,
t3.price,
t3.scribe_price,
t.commit_price
FROM
cert_member_mapping t
LEFT JOIN member t1 ON t.member_id = t1.id
LEFT JOIN company_dict t2 ON t1.company_id = t2.id
LEFT JOIN cert_dict t3 ON t.cert_id = t.id
WHERE
t.delete_date IS NULL
AND t1.delete_date IS NULL
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
and t.cert_id = #{certId}
<if test="status != null and status != ''">
and t.status = #{status}
</if>
<if test="userName != null and userName != ''">
and t1.user_name like concat('%',#{userName} ,'%')
</if>
</select>
</mapper>
......@@ -200,6 +200,7 @@
<select id="getCompanySettings" parameterType="long" resultType="com.subsidy.vo.classdict.SystemSettings">
SELECT
t2.id,
t2.time_limit,
t2.ip_address_record,
t2.device_no_record
......
......@@ -76,24 +76,25 @@
</select>
<select id="getCompanyMembers" resultType="com.subsidy.vo.company.GetCompanyMembersVO">
SELECT
SELECT
t.id,
t.user_name,
t.id_card,
t.id_card_photo,
ifnull( t.id_card_photo, '尚未完成' ) AS id_card_photo,
t2.company_name,
t.first_login,
t.check_image,
t.check_time
if(t.first_login =1,'是','否') as first_login,
ifnull( t.check_image, '尚未完成' ) AS check_image,
t.check_time,
t.telephone,
t.account_name
FROM
member 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.company_id = #{companyId}
and t.user_name like concat('%',#{userName} ,'%')
</select>
</mapper>
......@@ -73,6 +73,7 @@
t6.ttlMember,
t2.is_order,
t2.is_fast_play,
t.email_status,
if(
TIMESTAMPDIFF(
DAY,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!