Commit 24adb6f0 by 涂亚平

监管版本备份

1 parent 7fb594bb
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.dto.cert.AddCertClassDTO;
import com.subsidy.dto.classDict.AddClassDTO;
import com.subsidy.service.CertClassService;
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 2022-09-06
*/
@RestController
@Api(tags = "证书班级映射表")
@RequestMapping("/certClassMapping")
public class CertClassController {
@Autowired
private CertClassService certClassMappingService;
@PostMapping("addCertClass")
@ApiOperation("添加班级 userId:登录人id certId courseId classTypeId className startDate endDate testRule 是否视频看完再做测试 isOrder 是否按照顺序播放 isFastPlay 是否快进 memberIds [] 班级学员")
@LoginRequired
public ResponseVO addClass(@RequestBody AddCertClassDTO addCertClassDTO){
return ResponseData.generateCreatedResponse(0,certClassMappingService.addClass(addCertClassDTO));
}
}
package com.subsidy.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 证书班级人员映射表 前端控制器
* </p>
*
* @author Tuyp
* @since 2022-09-06
*/
@RestController
@Api(tags = "证书班级人员映射表")
@RequestMapping("/certClassMemberMapping")
public class CertClassMemberMappingController {
}
......@@ -64,4 +64,6 @@ public class CertMemberMappingController {
return ResponseData.generateCreatedResponse(0,certMemberMappingService.getSignInfo(certMemberMappingDO));
}
}
......@@ -55,7 +55,7 @@ public class MemberController {
}
@PostMapping("updateMember")
@ApiOperation("编辑成员 {id companyId userName accountName accountNameEn telephone gender image idCard status departmentIds jobIds}")
@ApiOperation("编辑成员 {id companyId userName accountName accountNameEn telephone gender image idCard idCardPhoto status departmentIds jobIds}")
@LoginRequired
public ResponseVO updateMember(@RequestBody AddMemberDTO addMemberDTO){
return ResponseData.generateCreatedResponse(0,memberService.updateMember(addMemberDTO));
......
package com.subsidy.dto.cert;
import com.subsidy.model.CertClassDO;
import lombok.Data;
import java.util.List;
@Data
public class AddCertClassDTO extends CertClassDO {
private Long userId;
private List<Long> memberIds;
}
package com.subsidy.mapper;
import com.subsidy.model.CertClassDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 证书班级映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2022-09-06
*/
@Repository
public interface CertClassMapper extends BaseMapper<CertClassDO> {
}
package com.subsidy.mapper;
import com.subsidy.model.CertClassMemberMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 证书班级人员映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2022-09-06
*/
@Repository
public interface CertClassMemberMappingMapper extends BaseMapper<CertClassMemberMappingDO> {
}
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 2022-09-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("cert_class_mapping")
public class CertClassDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 证书id
*/
private Long certId;
/**
* 班级名称
*/
private String className;
/**
* 班级类型:平台支持/企业自荐
*/
private String classType;
/**
* 班级类型id
*/
private Long classTypeId;
/**
* 课程id
*/
private Long courseId;
/**
* 开课时间
*/
private String startDate;
/**
* 结课时间
*/
private String endDate;
/**
* 按序解锁时视频 1按照顺序解锁
*/
private Long isOrder;
/**
* 是否能快进 1:可以快进
*/
private Long isFastPlay;
/**
* 班级状态
*/
private String openStatus;
/**
* 1限制/0不限制
*/
private Integer testRule;
/**
* 学习上限时长
*/
private Integer limitHour;
/**
* 首次进入班级时人脸验证
*/
private Integer imageClassCheck;
/**
* 测试前人脸验证
*/
private Integer imageTestCheck;
/**
* 活跃度检测开启/关闭
*/
private Integer activityDetection;
/**
* 活跃度检测方式 1:常规 2:滑块 3:人脸识别
*/
private Integer activityDetectionMethod;
/**
* 首次播放允许拖曳
*/
private Integer firstDragAllowed;
/**
* 首次播放允许倍速
*/
private Integer firstSpeedAllowed;
/**
* 课时抓拍
*/
private Integer playSnap;
}
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 2022-09-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("cert_class_member_mapping")
public class CertClassMemberMappingDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long certClassId;
private Long memberId;
}
......@@ -101,6 +101,11 @@ public class MemberDO extends BaseModel {
private String idCard;
/**
* 身份证照片
*/
private String idCardPhoto;
/**
* 第一次登录
*/
private Integer firstLogin;
......
package com.subsidy.service;
import com.subsidy.model.CertClassMemberMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 证书班级人员映射表 服务类
* </p>
*
* @author Tuyp
* @since 2022-09-06
*/
public interface CertClassMemberMappingService extends IService<CertClassMemberMappingDO> {
}
package com.subsidy.service;
import com.subsidy.dto.cert.AddCertClassDTO;
import com.subsidy.dto.classDict.AddClassDTO;
import com.subsidy.model.CertClassDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 证书班级映射表 服务类
* </p>
*
* @author Tuyp
* @since 2022-09-06
*/
public interface CertClassService extends IService<CertClassDO> {
Long addClass(AddCertClassDTO addCertClassDTO);
}
package com.subsidy.service.impl;
import com.subsidy.model.CertClassMemberMappingDO;
import com.subsidy.mapper.CertClassMemberMappingMapper;
import com.subsidy.service.CertClassMemberMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 证书班级人员映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2022-09-06
*/
@Service
public class CertClassMemberMappingServiceImpl extends ServiceImpl<CertClassMemberMappingMapper, CertClassMemberMappingDO> implements CertClassMemberMappingService {
}
package com.subsidy.service.impl;
import com.subsidy.common.constant.CourseNotification;
import com.subsidy.common.exception.HttpException;
import com.subsidy.dto.cert.AddCertClassDTO;
import com.subsidy.dto.classDict.AddClassDTO;
import com.subsidy.jobs.CourseNotificationJob;
import com.subsidy.mapper.CertClassMemberMappingMapper;
import com.subsidy.model.*;
import com.subsidy.mapper.CertClassMapper;
import com.subsidy.service.CertClassService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.DateFormatUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
* 证书班级映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2022-09-06
*/
@Service
public class CertClassServiceImpl extends ServiceImpl<CertClassMapper, CertClassDO> implements CertClassService {
@Autowired
private CertClassMemberMappingMapper certClassMemberMappingMapper;
@Transactional(rollbackFor = Exception.class)
public Long addClass(AddCertClassDTO addCertClassDTO) {
//新建一个班级
CertClassDO certClassDO = new CertClassDO();
BeanUtils.copyProperties(addCertClassDTO, certClassDO);
this.baseMapper.insert(certClassDO);
//班级里添加成员
List<Long> memberIds = addCertClassDTO.getMemberIds();
for (Long lg : memberIds) {
CertClassMemberMappingDO certClassMemberMappingDO = new CertClassMemberMappingDO();
certClassMemberMappingDO.setMemberId(lg);
certClassMemberMappingDO.setCertClassId(certClassDO.getId());
certClassMemberMappingMapper.insert(certClassMemberMappingDO);
}
return certClassDO.getId();
}
}
......@@ -662,6 +662,12 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
checkStatusVO.setSMSStatus(false);
}
if (StringUtils.isEmpty(memberDO1.getIdCardPhoto())){
checkStatusVO.setIdCardStatus(false);
}else {
checkStatusVO.setIdCardStatus(true);
}
return checkStatusVO;
}
......
......@@ -11,6 +11,8 @@ public class GetCompanyMembersVO {
private String idCard;
private String idCardPhoto;
private String companyName;
private Integer firstLogin;
......
......@@ -9,4 +9,5 @@ public class CheckStatusVO {
private Boolean imageStatus;
private Boolean idCardStatus;
}
<?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.CertClassMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.CertClassDO">
<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="cert_id" property="certId" />
<result column="class_name" property="className" />
<result column="class_type" property="classType" />
<result column="class_type_id" property="classTypeId" />
<result column="course_id" property="courseId" />
<result column="start_date" property="startDate" />
<result column="end_date" property="endDate" />
<result column="is_order" property="isOrder" />
<result column="is_fast_play" property="isFastPlay" />
<result column="open_status" property="openStatus" />
<result column="test_rule" property="testRule" />
<result column="limit_hour" property="limitHour" />
<result column="image_class_check" property="imageClassCheck" />
<result column="image_test_check" property="imageTestCheck" />
<result column="activity_detection" property="activityDetection" />
<result column="activity_detection_method" property="activityDetectionMethod" />
<result column="first_drag_allowed" property="firstDragAllowed" />
<result column="first_speed_allowed" property="firstSpeedAllowed" />
<result column="play_snap" property="playSnap" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, cert_id, class_name, class_type, class_type_id, course_id, start_date, end_date, is_order, is_fast_play, open_status, test_rule, limit_hour, image_class_check, image_test_check, activity_detection, activity_detection_method, first_drag_allowed, first_speed_allowed, play_snap
</sql>
</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.CertClassMemberMappingMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.CertClassMemberMappingDO">
<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="cert_class_mapping_id" property="certClassMappingId" />
<result column="member_id" property="memberId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, cert_class_mapping_id, member_id
</sql>
</mapper>
......@@ -80,6 +80,7 @@
t.id,
t.user_name,
t.id_card,
t.id_card_photo,
t2.company_name,
t.first_login,
t.check_image,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!