do mapper
This commit is contained in:
@@ -155,4 +155,6 @@ public class CommonConstants {
|
||||
public static final String DEAULT_SELECT_SITE_MANAGER = "020125244825417786";
|
||||
|
||||
public static final int MAX_LENGTH_ONE_HUNDRED = 100;
|
||||
|
||||
public static final String YUN_XUE_TANG_SUC_CODE = "10000";
|
||||
}
|
||||
|
||||
@@ -273,4 +273,8 @@ public class RedisConstant {
|
||||
*/
|
||||
public static final String INVESTMENT_MANAGER_CACHE = "investment_manager_cache_";
|
||||
|
||||
/**
|
||||
* 招商经理轮询key
|
||||
*/
|
||||
public static final String YUN_XUE_TANG_ACCESS_TOKEN = "yun_xue_tang_access_token_";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.mapper.EmployeeTrainingMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
* @date 2024-04-29 16:06
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
public class EmployeeTrainingDAO {
|
||||
|
||||
@Resource
|
||||
private EmployeeTrainingMapper employeeTrainingMapper;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.mapper.TempUserDetailMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
* @date 2024-04-29 16:06
|
||||
*/
|
||||
@Repository
|
||||
public class TempUserDetailDAO {
|
||||
|
||||
@Resource
|
||||
private TempUserDetailMapper tempUserDetailMapper;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.EmployeeTrainingDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface EmployeeTrainingMapper extends Mapper<EmployeeTrainingDO> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.TempUserDetailDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface TempUserDetailMapper extends Mapper<TempUserDetailDO> {
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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.cool.store.mapper.EmployeeTrainingMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.EmployeeTrainingDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="region_id" jdbcType="BIGINT" property="regionId" />
|
||||
<result column="xfsg_user_detail_id" jdbcType="BIGINT" property="xfsgUserDetailId" />
|
||||
<result column="assign_flag" jdbcType="TINYINT" property="assignFlag" />
|
||||
<result column="training_start_time" jdbcType="TIMESTAMP" property="trainingStartTime" />
|
||||
<result column="training_end_time" jdbcType="TIMESTAMP" property="trainingEndTime" />
|
||||
<result column="training_store_id" jdbcType="VARCHAR" property="trainingStoreId" />
|
||||
<result column="training_teacher_user_id" jdbcType="VARCHAR" property="trainingTeacherUserId" />
|
||||
<result column="practical_assessment_user_id" jdbcType="VARCHAR" property="practicalAssessmentUserId" />
|
||||
<result column="estimated_assessment_time" jdbcType="TIMESTAMP" property="estimatedAssessmentTime" />
|
||||
<result column="actual_assessment_time" jdbcType="TIMESTAMP" property="actualAssessmentTime" />
|
||||
<result column="assessment_num" jdbcType="INTEGER" property="assessmentNum" />
|
||||
<result column="assessment_total_num" jdbcType="INTEGER" property="assessmentTotalNum" />
|
||||
<result column="theoretical_exam_status" jdbcType="TINYINT" property="theoreticalExamStatus" />
|
||||
<result column="theoretical_exam_score" jdbcType="INTEGER" property="theoreticalExamScore" />
|
||||
<result column="practical_exam_status" jdbcType="TINYINT" property="practicalExamStatus" />
|
||||
<result column="practical_exam_score" jdbcType="INTEGER" property="practicalExamScore" />
|
||||
<result column="assessment_status" jdbcType="TINYINT" property="assessmentStatus" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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.cool.store.mapper.TempUserDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.TempUserDetailDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="line_id" jdbcType="BIGINT" property="lineId" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="region_id" jdbcType="BIGINT" property="regionId" />
|
||||
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
||||
<result column="username" jdbcType="VARCHAR" property="username" />
|
||||
<result column="sex" jdbcType="VARCHAR" property="sex" />
|
||||
<result column="age" jdbcType="INTEGER" property="age" />
|
||||
<result column="id_card" jdbcType="VARCHAR" property="idCard" />
|
||||
<result column="educational" jdbcType="TINYINT" property="educational" />
|
||||
<result column="role_id" jdbcType="BIGINT" property="roleId" />
|
||||
<result column="id_card_positive_url" jdbcType="VARCHAR" property="idCardPositiveUrl" />
|
||||
<result column="id_card_negative_url" jdbcType="VARCHAR" property="idCardNegativeUrl" />
|
||||
<result column="health_certificate_url" jdbcType="VARCHAR" property="healthCertificateUrl" />
|
||||
<result column="register_time" jdbcType="TIMESTAMP" property="registerTime" />
|
||||
<result column="source" jdbcType="VARCHAR" property="source" />
|
||||
<result column="submit_time" jdbcType="TIMESTAMP" property="submitTime" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.dto.yun;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/3/25 17:03
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class StudentResultDTO {
|
||||
|
||||
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户考试状态 0:未开始;1:考试中;2:已提交;3:批阅中;4:已完成
|
||||
*/
|
||||
private Integer userExamStatus;
|
||||
|
||||
/**
|
||||
* 最新分
|
||||
*/
|
||||
private Float newScore;
|
||||
|
||||
/**
|
||||
* 是否通过,0:不是;1:是
|
||||
*/
|
||||
private Integer passed;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,528 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Table(name = "xfsg_employee_training")
|
||||
public class EmployeeTrainingDO {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* shop_info.id
|
||||
*/
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 区域ID
|
||||
*/
|
||||
@Column(name = "region_id")
|
||||
private Long regionId;
|
||||
|
||||
/**
|
||||
* xfsg_temp_user_detail.id
|
||||
*/
|
||||
@Column(name = "xfsg_user_detail_id")
|
||||
private Long xfsgUserDetailId;
|
||||
|
||||
/**
|
||||
* 是否分配 0-待分配 1-已分配
|
||||
*/
|
||||
@Column(name = "assign_flag")
|
||||
private Byte assignFlag;
|
||||
|
||||
/**
|
||||
* 实训开始时间
|
||||
*/
|
||||
@Column(name = "training_start_time")
|
||||
private Date trainingStartTime;
|
||||
|
||||
/**
|
||||
* 实训结束时间
|
||||
*/
|
||||
@Column(name = "training_end_time")
|
||||
private Date trainingEndTime;
|
||||
|
||||
/**
|
||||
* 实训门店ID
|
||||
*/
|
||||
@Column(name = "training_store_id")
|
||||
private String trainingStoreId;
|
||||
|
||||
/**
|
||||
* 带教老师ID
|
||||
*/
|
||||
@Column(name = "training_teacher_user_id")
|
||||
private String trainingTeacherUserId;
|
||||
|
||||
/**
|
||||
* 实操考核人员ID
|
||||
*/
|
||||
@Column(name = "practical_assessment_user_id")
|
||||
private String practicalAssessmentUserId;
|
||||
|
||||
/**
|
||||
* 预计考核时间
|
||||
*/
|
||||
@Column(name = "estimated_assessment_time")
|
||||
private Date estimatedAssessmentTime;
|
||||
|
||||
/**
|
||||
* 实际考核时间
|
||||
*/
|
||||
@Column(name = "actual_assessment_time")
|
||||
private Date actualAssessmentTime;
|
||||
|
||||
/**
|
||||
* 考核项数
|
||||
*/
|
||||
@Column(name = "assessment_num")
|
||||
private Integer assessmentNum;
|
||||
|
||||
/**
|
||||
* 考核总项数
|
||||
*/
|
||||
@Column(name = "assessment_total_num")
|
||||
private Integer assessmentTotalNum;
|
||||
|
||||
/**
|
||||
* 理论考试状态 0-未开始 1-合格 2-不合格
|
||||
*/
|
||||
@Column(name = "theoretical_exam_status")
|
||||
private Byte theoreticalExamStatus;
|
||||
|
||||
/**
|
||||
* 理论考试分值
|
||||
*/
|
||||
@Column(name = "theoretical_exam_score")
|
||||
private Integer theoreticalExamScore;
|
||||
|
||||
/**
|
||||
* 实操考试状态 0-未开始 1-合格 2-不合格
|
||||
*/
|
||||
@Column(name = "practical_exam_status")
|
||||
private Byte practicalExamStatus;
|
||||
|
||||
/**
|
||||
* 实操考试分值
|
||||
*/
|
||||
@Column(name = "practical_exam_score")
|
||||
private Integer practicalExamScore;
|
||||
|
||||
/**
|
||||
* 考核状态 0-培训中 1-带考核 2-考核通过 3-考核不通过
|
||||
*/
|
||||
@Column(name = "assessment_status")
|
||||
private Byte assessmentStatus;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除:0.否 1.是
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取shop_info.id
|
||||
*
|
||||
* @return shop_id - shop_info.id
|
||||
*/
|
||||
public Long getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置shop_info.id
|
||||
*
|
||||
* @param shopId shop_info.id
|
||||
*/
|
||||
public void setShopId(Long shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区域ID
|
||||
*
|
||||
* @return region_id - 区域ID
|
||||
*/
|
||||
public Long getRegionId() {
|
||||
return regionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置区域ID
|
||||
*
|
||||
* @param regionId 区域ID
|
||||
*/
|
||||
public void setRegionId(Long regionId) {
|
||||
this.regionId = regionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取xfsg_temp_user_detail.id
|
||||
*
|
||||
* @return xfsg_user_detail_id - xfsg_temp_user_detail.id
|
||||
*/
|
||||
public Long getXfsgUserDetailId() {
|
||||
return xfsgUserDetailId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置xfsg_temp_user_detail.id
|
||||
*
|
||||
* @param xfsgUserDetailId xfsg_temp_user_detail.id
|
||||
*/
|
||||
public void setXfsgUserDetailId(Long xfsgUserDetailId) {
|
||||
this.xfsgUserDetailId = xfsgUserDetailId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否分配 0-待分配 1-已分配
|
||||
*
|
||||
* @return assign_flag - 是否分配 0-待分配 1-已分配
|
||||
*/
|
||||
public Byte getAssignFlag() {
|
||||
return assignFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否分配 0-待分配 1-已分配
|
||||
*
|
||||
* @param assignFlag 是否分配 0-待分配 1-已分配
|
||||
*/
|
||||
public void setAssignFlag(Byte assignFlag) {
|
||||
this.assignFlag = assignFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实训开始时间
|
||||
*
|
||||
* @return training_start_time - 实训开始时间
|
||||
*/
|
||||
public Date getTrainingStartTime() {
|
||||
return trainingStartTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置实训开始时间
|
||||
*
|
||||
* @param trainingStartTime 实训开始时间
|
||||
*/
|
||||
public void setTrainingStartTime(Date trainingStartTime) {
|
||||
this.trainingStartTime = trainingStartTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实训结束时间
|
||||
*
|
||||
* @return training_end_time - 实训结束时间
|
||||
*/
|
||||
public Date getTrainingEndTime() {
|
||||
return trainingEndTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置实训结束时间
|
||||
*
|
||||
* @param trainingEndTime 实训结束时间
|
||||
*/
|
||||
public void setTrainingEndTime(Date trainingEndTime) {
|
||||
this.trainingEndTime = trainingEndTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实训门店ID
|
||||
*
|
||||
* @return training_store_id - 实训门店ID
|
||||
*/
|
||||
public String getTrainingStoreId() {
|
||||
return trainingStoreId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置实训门店ID
|
||||
*
|
||||
* @param trainingStoreId 实训门店ID
|
||||
*/
|
||||
public void setTrainingStoreId(String trainingStoreId) {
|
||||
this.trainingStoreId = trainingStoreId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取带教老师ID
|
||||
*
|
||||
* @return training_teacher_user_id - 带教老师ID
|
||||
*/
|
||||
public String getTrainingTeacherUserId() {
|
||||
return trainingTeacherUserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置带教老师ID
|
||||
*
|
||||
* @param trainingTeacherUserId 带教老师ID
|
||||
*/
|
||||
public void setTrainingTeacherUserId(String trainingTeacherUserId) {
|
||||
this.trainingTeacherUserId = trainingTeacherUserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实操考核人员ID
|
||||
*
|
||||
* @return practical_assessment_user_id - 实操考核人员ID
|
||||
*/
|
||||
public String getPracticalAssessmentUserId() {
|
||||
return practicalAssessmentUserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置实操考核人员ID
|
||||
*
|
||||
* @param practicalAssessmentUserId 实操考核人员ID
|
||||
*/
|
||||
public void setPracticalAssessmentUserId(String practicalAssessmentUserId) {
|
||||
this.practicalAssessmentUserId = practicalAssessmentUserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取预计考核时间
|
||||
*
|
||||
* @return estimated_assessment_time - 预计考核时间
|
||||
*/
|
||||
public Date getEstimatedAssessmentTime() {
|
||||
return estimatedAssessmentTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置预计考核时间
|
||||
*
|
||||
* @param estimatedAssessmentTime 预计考核时间
|
||||
*/
|
||||
public void setEstimatedAssessmentTime(Date estimatedAssessmentTime) {
|
||||
this.estimatedAssessmentTime = estimatedAssessmentTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实际考核时间
|
||||
*
|
||||
* @return actual_assessment_time - 实际考核时间
|
||||
*/
|
||||
public Date getActualAssessmentTime() {
|
||||
return actualAssessmentTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置实际考核时间
|
||||
*
|
||||
* @param actualAssessmentTime 实际考核时间
|
||||
*/
|
||||
public void setActualAssessmentTime(Date actualAssessmentTime) {
|
||||
this.actualAssessmentTime = actualAssessmentTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考核项数
|
||||
*
|
||||
* @return assessment_num - 考核项数
|
||||
*/
|
||||
public Integer getAssessmentNum() {
|
||||
return assessmentNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置考核项数
|
||||
*
|
||||
* @param assessmentNum 考核项数
|
||||
*/
|
||||
public void setAssessmentNum(Integer assessmentNum) {
|
||||
this.assessmentNum = assessmentNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考核总项数
|
||||
*
|
||||
* @return assessment_total_num - 考核总项数
|
||||
*/
|
||||
public Integer getAssessmentTotalNum() {
|
||||
return assessmentTotalNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置考核总项数
|
||||
*
|
||||
* @param assessmentTotalNum 考核总项数
|
||||
*/
|
||||
public void setAssessmentTotalNum(Integer assessmentTotalNum) {
|
||||
this.assessmentTotalNum = assessmentTotalNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取理论考试状态 0-未开始 1-合格 2-不合格
|
||||
*
|
||||
* @return theoretical_exam_status - 理论考试状态 0-未开始 1-合格 2-不合格
|
||||
*/
|
||||
public Byte getTheoreticalExamStatus() {
|
||||
return theoreticalExamStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置理论考试状态 0-未开始 1-合格 2-不合格
|
||||
*
|
||||
* @param theoreticalExamStatus 理论考试状态 0-未开始 1-合格 2-不合格
|
||||
*/
|
||||
public void setTheoreticalExamStatus(Byte theoreticalExamStatus) {
|
||||
this.theoreticalExamStatus = theoreticalExamStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取理论考试分值
|
||||
*
|
||||
* @return theoretical_exam_score - 理论考试分值
|
||||
*/
|
||||
public Integer getTheoreticalExamScore() {
|
||||
return theoreticalExamScore;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置理论考试分值
|
||||
*
|
||||
* @param theoreticalExamScore 理论考试分值
|
||||
*/
|
||||
public void setTheoreticalExamScore(Integer theoreticalExamScore) {
|
||||
this.theoreticalExamScore = theoreticalExamScore;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实操考试状态 0-未开始 1-合格 2-不合格
|
||||
*
|
||||
* @return practical_exam_status - 实操考试状态 0-未开始 1-合格 2-不合格
|
||||
*/
|
||||
public Byte getPracticalExamStatus() {
|
||||
return practicalExamStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置实操考试状态 0-未开始 1-合格 2-不合格
|
||||
*
|
||||
* @param practicalExamStatus 实操考试状态 0-未开始 1-合格 2-不合格
|
||||
*/
|
||||
public void setPracticalExamStatus(Byte practicalExamStatus) {
|
||||
this.practicalExamStatus = practicalExamStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实操考试分值
|
||||
*
|
||||
* @return practical_exam_score - 实操考试分值
|
||||
*/
|
||||
public Integer getPracticalExamScore() {
|
||||
return practicalExamScore;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置实操考试分值
|
||||
*
|
||||
* @param practicalExamScore 实操考试分值
|
||||
*/
|
||||
public void setPracticalExamScore(Integer practicalExamScore) {
|
||||
this.practicalExamScore = practicalExamScore;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考核状态 0-培训中 1-带考核 2-考核通过 3-考核不通过
|
||||
*
|
||||
* @return assessment_status - 考核状态 0-培训中 1-带考核 2-考核通过 3-考核不通过
|
||||
*/
|
||||
public Byte getAssessmentStatus() {
|
||||
return assessmentStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置考核状态 0-培训中 1-带考核 2-考核通过 3-考核不通过
|
||||
*
|
||||
* @param assessmentStatus 考核状态 0-培训中 1-带考核 2-考核通过 3-考核不通过
|
||||
*/
|
||||
public void setAssessmentStatus(Byte assessmentStatus) {
|
||||
this.assessmentStatus = assessmentStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*
|
||||
* @return create_time - 创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间
|
||||
*
|
||||
* @param createTime 创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新时间
|
||||
*
|
||||
* @return update_time - 更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新时间
|
||||
*
|
||||
* @param updateTime 更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否删除:0.否 1.是
|
||||
*
|
||||
* @return deleted - 是否删除:0.否 1.是
|
||||
*/
|
||||
public Boolean getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否删除:0.否 1.是
|
||||
*
|
||||
* @param deleted 是否删除:0.否 1.是
|
||||
*/
|
||||
public void setDeleted(Boolean deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,474 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Table(name = "xfsg_temp_user_detail")
|
||||
public class TempUserDetailDO {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* line_info.id
|
||||
*/
|
||||
@Column(name = "line_id")
|
||||
private Long lineId;
|
||||
|
||||
/**
|
||||
* shop_info.id
|
||||
*/
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 区域ID
|
||||
*/
|
||||
@Column(name = "region_id")
|
||||
private Long regionId;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 申请人姓名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 性别0未选,1男,2女
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
@Column(name = "id_card")
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 学历 0-小学 1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-硕士以上
|
||||
*/
|
||||
private Byte educational;
|
||||
|
||||
/**
|
||||
* 角色id 170000000-店长 180000000-店员
|
||||
*/
|
||||
@Column(name = "role_id")
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 身份证正面url
|
||||
*/
|
||||
@Column(name = "id_card_positive_url")
|
||||
private String idCardPositiveUrl;
|
||||
|
||||
/**
|
||||
* 身份证反面url
|
||||
*/
|
||||
@Column(name = "id_card_negative_url")
|
||||
private String idCardNegativeUrl;
|
||||
|
||||
/**
|
||||
* 健康证url
|
||||
*/
|
||||
@Column(name = "health_certificate_url")
|
||||
private String healthCertificateUrl;
|
||||
|
||||
/**
|
||||
* 登记时间
|
||||
*/
|
||||
@Column(name = "register_time")
|
||||
private Date registerTime;
|
||||
|
||||
/**
|
||||
* 来源:create-创建 sync-钉钉同步
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
@Column(name = "submit_time")
|
||||
private Date submitTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除:0.否 1.是
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取line_info.id
|
||||
*
|
||||
* @return line_id - line_info.id
|
||||
*/
|
||||
public Long getLineId() {
|
||||
return lineId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置line_info.id
|
||||
*
|
||||
* @param lineId line_info.id
|
||||
*/
|
||||
public void setLineId(Long lineId) {
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取shop_info.id
|
||||
*
|
||||
* @return shop_id - shop_info.id
|
||||
*/
|
||||
public Long getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置shop_info.id
|
||||
*
|
||||
* @param shopId shop_info.id
|
||||
*/
|
||||
public void setShopId(Long shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区域ID
|
||||
*
|
||||
* @return region_id - 区域ID
|
||||
*/
|
||||
public Long getRegionId() {
|
||||
return regionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置区域ID
|
||||
*
|
||||
* @param regionId 区域ID
|
||||
*/
|
||||
public void setRegionId(Long regionId) {
|
||||
this.regionId = regionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取手机号
|
||||
*
|
||||
* @return mobile - 手机号
|
||||
*/
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置手机号
|
||||
*
|
||||
* @param mobile 手机号
|
||||
*/
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取申请人姓名
|
||||
*
|
||||
* @return username - 申请人姓名
|
||||
*/
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置申请人姓名
|
||||
*
|
||||
* @param username 申请人姓名
|
||||
*/
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取性别0未选,1男,2女
|
||||
*
|
||||
* @return sex - 性别0未选,1男,2女
|
||||
*/
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置性别0未选,1男,2女
|
||||
*
|
||||
* @param sex 性别0未选,1男,2女
|
||||
*/
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取年龄
|
||||
*
|
||||
* @return age - 年龄
|
||||
*/
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置年龄
|
||||
*
|
||||
* @param age 年龄
|
||||
*/
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取身份证号码
|
||||
*
|
||||
* @return id_card - 身份证号码
|
||||
*/
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置身份证号码
|
||||
*
|
||||
* @param idCard 身份证号码
|
||||
*/
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学历 0-小学 1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-硕士以上
|
||||
*
|
||||
* @return educational - 学历 0-小学 1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-硕士以上
|
||||
*/
|
||||
public Byte getEducational() {
|
||||
return educational;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置学历 0-小学 1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-硕士以上
|
||||
*
|
||||
* @param educational 学历 0-小学 1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-硕士以上
|
||||
*/
|
||||
public void setEducational(Byte educational) {
|
||||
this.educational = educational;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色id 170000000-店长 180000000-店员
|
||||
*
|
||||
* @return role_id - 角色id 170000000-店长 180000000-店员
|
||||
*/
|
||||
public Long getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置角色id 170000000-店长 180000000-店员
|
||||
*
|
||||
* @param roleId 角色id 170000000-店长 180000000-店员
|
||||
*/
|
||||
public void setRoleId(Long roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取身份证正面url
|
||||
*
|
||||
* @return id_card_positive_url - 身份证正面url
|
||||
*/
|
||||
public String getIdCardPositiveUrl() {
|
||||
return idCardPositiveUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置身份证正面url
|
||||
*
|
||||
* @param idCardPositiveUrl 身份证正面url
|
||||
*/
|
||||
public void setIdCardPositiveUrl(String idCardPositiveUrl) {
|
||||
this.idCardPositiveUrl = idCardPositiveUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取身份证反面url
|
||||
*
|
||||
* @return id_card_negative_url - 身份证反面url
|
||||
*/
|
||||
public String getIdCardNegativeUrl() {
|
||||
return idCardNegativeUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置身份证反面url
|
||||
*
|
||||
* @param idCardNegativeUrl 身份证反面url
|
||||
*/
|
||||
public void setIdCardNegativeUrl(String idCardNegativeUrl) {
|
||||
this.idCardNegativeUrl = idCardNegativeUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取健康证url
|
||||
*
|
||||
* @return health_certificate_url - 健康证url
|
||||
*/
|
||||
public String getHealthCertificateUrl() {
|
||||
return healthCertificateUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置健康证url
|
||||
*
|
||||
* @param healthCertificateUrl 健康证url
|
||||
*/
|
||||
public void setHealthCertificateUrl(String healthCertificateUrl) {
|
||||
this.healthCertificateUrl = healthCertificateUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取登记时间
|
||||
*
|
||||
* @return register_time - 登记时间
|
||||
*/
|
||||
public Date getRegisterTime() {
|
||||
return registerTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置登记时间
|
||||
*
|
||||
* @param registerTime 登记时间
|
||||
*/
|
||||
public void setRegisterTime(Date registerTime) {
|
||||
this.registerTime = registerTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取来源:create-创建 sync-钉钉同步
|
||||
*
|
||||
* @return source - 来源:create-创建 sync-钉钉同步
|
||||
*/
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置来源:create-创建 sync-钉钉同步
|
||||
*
|
||||
* @param source 来源:create-创建 sync-钉钉同步
|
||||
*/
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提交时间
|
||||
*
|
||||
* @return submit_time - 提交时间
|
||||
*/
|
||||
public Date getSubmitTime() {
|
||||
return submitTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置提交时间
|
||||
*
|
||||
* @param submitTime 提交时间
|
||||
*/
|
||||
public void setSubmitTime(Date submitTime) {
|
||||
this.submitTime = submitTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*
|
||||
* @return create_time - 创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间
|
||||
*
|
||||
* @param createTime 创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新时间
|
||||
*
|
||||
* @return update_time - 更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新时间
|
||||
*
|
||||
* @param updateTime 更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否删除:0.否 1.是
|
||||
*
|
||||
* @return deleted - 是否删除:0.否 1.是
|
||||
*/
|
||||
public Boolean getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否删除:0.否 1.是
|
||||
*
|
||||
* @param deleted 是否删除:0.否 1.是
|
||||
*/
|
||||
public void setDeleted(Boolean deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.yun.StudentResultDTO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
* @date 2024-04-29 9:55
|
||||
*/
|
||||
public interface YunXueTangApiService {
|
||||
|
||||
|
||||
String getAccessToken();
|
||||
|
||||
Map<String, StudentResultDTO> studentResultUserList(List<String> userIdList);
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.dto.yun.StudentResultDTO;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.service.YunXueTangApiService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
* @date 2024-04-29 9:55
|
||||
*/
|
||||
@Service
|
||||
public class YunXueTangApiServiceImpl implements YunXueTangApiService {
|
||||
|
||||
private final static String REQUEST_URL = "https://openapi.yunxuetang.cn/";
|
||||
|
||||
private final static String APP_ID = "1782195114";
|
||||
|
||||
private final static String APP_SECRET = "W2Py1G4XYvBFGkXVgdbrZsm4C9zStM5QvBG8WS-0YYw4lPTcoKaFB9S6F5spshCJ";
|
||||
|
||||
private final static String ARRANGE_ID = "d011f26d-cd82-4a58-b705-529c63295198";
|
||||
|
||||
@Resource
|
||||
private RedisUtilPool redisUtilPool;
|
||||
|
||||
@Resource
|
||||
private HttpRestTemplateService httpRestTemplateService;
|
||||
|
||||
|
||||
@Override
|
||||
public String getAccessToken() {
|
||||
|
||||
//若果在缓存中存在,从缓存中去取
|
||||
String accessToken = redisUtilPool.getString(RedisConstant.YUN_XUE_TANG_ACCESS_TOKEN);
|
||||
if (StringUtils.isNotBlank(accessToken)) {
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
|
||||
Map<String, Object> body = new HashMap<>();
|
||||
|
||||
// 请求接口地址
|
||||
String url = "token";
|
||||
// url拼接所需参数
|
||||
String pathUrl = REQUEST_URL + url + "?" + "appId=" + APP_ID + "&appSecret=" + APP_SECRET;
|
||||
// 以post方式调用第三方接口,获取响应结果
|
||||
String result = HttpUtil.post(pathUrl, body);
|
||||
|
||||
// 返回accessToken
|
||||
JSONObject jsonObject = JSONObject.parseObject(result, JSONObject.class);
|
||||
accessToken = jsonObject.getString("accessToken");
|
||||
if (StringUtils.isNotBlank(accessToken)) {
|
||||
Integer expiresIn = jsonObject.getInteger("expiresIn");
|
||||
redisUtilPool.setString(RedisConstant.YUN_XUE_TANG_ACCESS_TOKEN, accessToken, expiresIn - 5 * 60);
|
||||
}
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, StudentResultDTO> studentResultUserList(List<String> userIdList) {
|
||||
Map<String, Object> body = new HashMap<>();
|
||||
body.put("arrangeId", ARRANGE_ID);
|
||||
body.put("thirdUserIds", userIdList);
|
||||
body.put("limit", userIdList.size());
|
||||
String pathUrl = "v1/rpt2open/public/ote/student/result/user/list";
|
||||
// 以post方式调用第三方接口,获取响应结果
|
||||
Map<String, String> headMap = new HashMap<>();
|
||||
headMap.put("Authorization", this.getAccessToken());
|
||||
String result = httpRestTemplateService.postForObject(REQUEST_URL + pathUrl, body, String.class, headMap);
|
||||
List<StudentResultDTO> resultDTOList = new ArrayList<>();
|
||||
// 返回accessToken
|
||||
JSONObject jsonObject = JSONObject.parseObject(result, JSONObject.class);
|
||||
String code = jsonObject.getString("code");
|
||||
if (CommonConstants.YUN_XUE_TANG_SUC_CODE.equals(code)) {
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("datas");
|
||||
if (CollectionUtils.isNotEmpty(jsonArray)) {
|
||||
jsonArray.forEach(item -> {
|
||||
JSONObject itemObj = (JSONObject) item;
|
||||
StudentResultDTO resultDTO = new StudentResultDTO();
|
||||
resultDTO.setUserId(itemObj.getString("thirdUserId"));
|
||||
resultDTO.setPassed(itemObj.getInteger("passed"));
|
||||
resultDTO.setNewScore(itemObj.getFloat("newScore"));
|
||||
resultDTO.setUserExamStatus(itemObj.getInteger("userExamStatus"));
|
||||
resultDTOList.add(resultDTO);
|
||||
});
|
||||
}
|
||||
}
|
||||
return resultDTOList.stream().collect(
|
||||
Collectors.toMap(StudentResultDTO::getUserId, Function.identity()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user