教师端签到发布

main
whb 7 months ago
parent 333c1cb565
commit 70484dd730

@ -0,0 +1,53 @@
package com.sztzjy.trade.controller.tch;
import com.sztzjy.trade.annotation.AnonymousAccess;
import com.sztzjy.trade.entity.dto.TeacherOpenCourseStudentSigninSettingDTO;
import com.sztzjy.trade.service.TeacherOpenCourseStudentSigninService;
import com.sztzjy.trade.util.ResultEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
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 javax.validation.Valid;
/**
* @author 17803
* @date 2024-08-08 9:14
*/
@RequestMapping("api/tch/signInfo")
@RestController
@Api(tags = "签到")
public class TchSignInfoController {
@Autowired
private TeacherOpenCourseStudentSigninService teacherOpenCourseStudentSigninService;
/**
* -
*
* teacherOpenCourseStudentSigninSettingType
* @param teacherOpenCourseStudentSigninSettingDTO
* @return
*/
@PostMapping("/add.do")
@ApiOperation("教师端-发起签到(统一签到接口,根据类型验证)")
@AnonymousAccess
public ResultEntity addDo(@Valid @RequestBody TeacherOpenCourseStudentSigninSettingDTO teacherOpenCourseStudentSigninSettingDTO){
if(null == teacherOpenCourseStudentSigninSettingDTO.getTeacherOpenCourseStudentSigninSettingStatus()){
teacherOpenCourseStudentSigninSettingDTO.setTeacherOpenCourseStudentSigninSettingStatus(1);
}
return teacherOpenCourseStudentSigninService.addDo(teacherOpenCourseStudentSigninSettingDTO);
}
}

@ -0,0 +1,155 @@
package com.sztzjy.trade.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* ---
*
* @author whb
* teacher_open_course_student_signin_log
*/
public class TeacherOpenCourseStudentSigninLog {
@ApiModelProperty("ID")
private Long teacherOpenCourseStudentSigninLogId;
@ApiModelProperty("签到配置ID")
private Long teacherOpenCourseStudentSigninSettingId;
@ApiModelProperty("场次时间")
private Date teacherOpenCourseStudentSigninSettingSessionTime;
@ApiModelProperty("学生ID")
private Long studentId;
@ApiModelProperty("开课ID")
private Long teacherOpenCourseId;
@ApiModelProperty("班级ID")
private Long schoolClassId;
@ApiModelProperty("签到日期")
private Date teacherOpenCourseStudentSigninLogAddTime;
@ApiModelProperty("签到方式 (数据字典 student_signin_type)")
private String teacherOpenCourseStudentSigninLogType;
@ApiModelProperty("备注(缺勤理由)")
private String teacherOpenCourseStudentSigninLogRemark;
@ApiModelProperty("签到的IP")
private String teacherOpenCourseStudentSigninLogIp;
@ApiModelProperty("标记 10签到 20缺勤")
private Integer teacherOpenCourseStudentSigninLogTag;
@ApiModelProperty("组织ID")
private Long orgId;
@ApiModelProperty("用户ID")
private Long userId;
public Long getTeacherOpenCourseStudentSigninLogId() {
return teacherOpenCourseStudentSigninLogId;
}
public void setTeacherOpenCourseStudentSigninLogId(Long teacherOpenCourseStudentSigninLogId) {
this.teacherOpenCourseStudentSigninLogId = teacherOpenCourseStudentSigninLogId;
}
public Long getTeacherOpenCourseStudentSigninSettingId() {
return teacherOpenCourseStudentSigninSettingId;
}
public void setTeacherOpenCourseStudentSigninSettingId(Long teacherOpenCourseStudentSigninSettingId) {
this.teacherOpenCourseStudentSigninSettingId = teacherOpenCourseStudentSigninSettingId;
}
public Date getTeacherOpenCourseStudentSigninSettingSessionTime() {
return teacherOpenCourseStudentSigninSettingSessionTime;
}
public void setTeacherOpenCourseStudentSigninSettingSessionTime(Date teacherOpenCourseStudentSigninSettingSessionTime) {
this.teacherOpenCourseStudentSigninSettingSessionTime = teacherOpenCourseStudentSigninSettingSessionTime;
}
public Long getStudentId() {
return studentId;
}
public void setStudentId(Long studentId) {
this.studentId = studentId;
}
public Long getTeacherOpenCourseId() {
return teacherOpenCourseId;
}
public void setTeacherOpenCourseId(Long teacherOpenCourseId) {
this.teacherOpenCourseId = teacherOpenCourseId;
}
public Long getSchoolClassId() {
return schoolClassId;
}
public void setSchoolClassId(Long schoolClassId) {
this.schoolClassId = schoolClassId;
}
public Date getTeacherOpenCourseStudentSigninLogAddTime() {
return teacherOpenCourseStudentSigninLogAddTime;
}
public void setTeacherOpenCourseStudentSigninLogAddTime(Date teacherOpenCourseStudentSigninLogAddTime) {
this.teacherOpenCourseStudentSigninLogAddTime = teacherOpenCourseStudentSigninLogAddTime;
}
public String getTeacherOpenCourseStudentSigninLogType() {
return teacherOpenCourseStudentSigninLogType;
}
public void setTeacherOpenCourseStudentSigninLogType(String teacherOpenCourseStudentSigninLogType) {
this.teacherOpenCourseStudentSigninLogType = teacherOpenCourseStudentSigninLogType == null ? null : teacherOpenCourseStudentSigninLogType.trim();
}
public String getTeacherOpenCourseStudentSigninLogRemark() {
return teacherOpenCourseStudentSigninLogRemark;
}
public void setTeacherOpenCourseStudentSigninLogRemark(String teacherOpenCourseStudentSigninLogRemark) {
this.teacherOpenCourseStudentSigninLogRemark = teacherOpenCourseStudentSigninLogRemark == null ? null : teacherOpenCourseStudentSigninLogRemark.trim();
}
public String getTeacherOpenCourseStudentSigninLogIp() {
return teacherOpenCourseStudentSigninLogIp;
}
public void setTeacherOpenCourseStudentSigninLogIp(String teacherOpenCourseStudentSigninLogIp) {
this.teacherOpenCourseStudentSigninLogIp = teacherOpenCourseStudentSigninLogIp == null ? null : teacherOpenCourseStudentSigninLogIp.trim();
}
public Integer getTeacherOpenCourseStudentSigninLogTag() {
return teacherOpenCourseStudentSigninLogTag;
}
public void setTeacherOpenCourseStudentSigninLogTag(Integer teacherOpenCourseStudentSigninLogTag) {
this.teacherOpenCourseStudentSigninLogTag = teacherOpenCourseStudentSigninLogTag;
}
public Long getOrgId() {
return orgId;
}
public void setOrgId(Long orgId) {
this.orgId = orgId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
}

@ -0,0 +1,166 @@
package com.sztzjy.trade.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* ----
*
* @author whb
* teacher_open_course_student_signin_setting
*/
public class TeacherOpenCourseStudentSigninSetting {
@ApiModelProperty("ID")
private Long teacherOpenCourseStudentSigninSettingId;
@ApiModelProperty("场次时间")
private Date teacherOpenCourseStudentSigninSettingSessionTime;
@ApiModelProperty("开课ID")
private Long teacherOpenCourseId;
@ApiModelProperty("班级ID集合")
private String schoolClassIds;
@ApiModelProperty("签到方式 (数据字典 student_signin_type)")
private String teacherOpenCourseStudentSigninSettingType;
@ApiModelProperty("设置的值数据例子IP: x.x.x.x-x.x.x.x验证码xxxx手动签到无需设置")
private String teacherOpenCourseStudentSigninSettingValue;
@ApiModelProperty("创建时间")
private Date teacherOpenCourseStudentSigninSettingAddTime;
@ApiModelProperty("状态 1正常 2删除")
private Integer teacherOpenCourseStudentSigninSettingStatus;
@ApiModelProperty("开启状态 (枚举 StartStatusEnum")
private String teacherOpenCourseStudentSigninSettingStartStatus;
@ApiModelProperty("开始时间")
private Date teacherOpenCourseStudentSigninSettingStartTime;
@ApiModelProperty("结束时间")
private Date teacherOpenCourseStudentSigninSettingEndTime;
@ApiModelProperty("组织ID")
private Long orgId;
@ApiModelProperty("用户ID")
private Long userId;
@ApiModelProperty("学生签到时间")
private Date teacherOpenCourseStudentSigninSettingSigninTime;
public Long getTeacherOpenCourseStudentSigninSettingId() {
return teacherOpenCourseStudentSigninSettingId;
}
public void setTeacherOpenCourseStudentSigninSettingId(Long teacherOpenCourseStudentSigninSettingId) {
this.teacherOpenCourseStudentSigninSettingId = teacherOpenCourseStudentSigninSettingId;
}
public Date getTeacherOpenCourseStudentSigninSettingSessionTime() {
return teacherOpenCourseStudentSigninSettingSessionTime;
}
public void setTeacherOpenCourseStudentSigninSettingSessionTime(Date teacherOpenCourseStudentSigninSettingSessionTime) {
this.teacherOpenCourseStudentSigninSettingSessionTime = teacherOpenCourseStudentSigninSettingSessionTime;
}
public Long getTeacherOpenCourseId() {
return teacherOpenCourseId;
}
public void setTeacherOpenCourseId(Long teacherOpenCourseId) {
this.teacherOpenCourseId = teacherOpenCourseId;
}
public String getSchoolClassIds() {
return schoolClassIds;
}
public void setSchoolClassIds(String schoolClassIds) {
this.schoolClassIds = schoolClassIds == null ? null : schoolClassIds.trim();
}
public String getTeacherOpenCourseStudentSigninSettingType() {
return teacherOpenCourseStudentSigninSettingType;
}
public void setTeacherOpenCourseStudentSigninSettingType(String teacherOpenCourseStudentSigninSettingType) {
this.teacherOpenCourseStudentSigninSettingType = teacherOpenCourseStudentSigninSettingType == null ? null : teacherOpenCourseStudentSigninSettingType.trim();
}
public String getTeacherOpenCourseStudentSigninSettingValue() {
return teacherOpenCourseStudentSigninSettingValue;
}
public void setTeacherOpenCourseStudentSigninSettingValue(String teacherOpenCourseStudentSigninSettingValue) {
this.teacherOpenCourseStudentSigninSettingValue = teacherOpenCourseStudentSigninSettingValue == null ? null : teacherOpenCourseStudentSigninSettingValue.trim();
}
public Date getTeacherOpenCourseStudentSigninSettingAddTime() {
return teacherOpenCourseStudentSigninSettingAddTime;
}
public void setTeacherOpenCourseStudentSigninSettingAddTime(Date teacherOpenCourseStudentSigninSettingAddTime) {
this.teacherOpenCourseStudentSigninSettingAddTime = teacherOpenCourseStudentSigninSettingAddTime;
}
public Integer getTeacherOpenCourseStudentSigninSettingStatus() {
return teacherOpenCourseStudentSigninSettingStatus;
}
public void setTeacherOpenCourseStudentSigninSettingStatus(Integer teacherOpenCourseStudentSigninSettingStatus) {
this.teacherOpenCourseStudentSigninSettingStatus = teacherOpenCourseStudentSigninSettingStatus;
}
public String getTeacherOpenCourseStudentSigninSettingStartStatus() {
return teacherOpenCourseStudentSigninSettingStartStatus;
}
public void setTeacherOpenCourseStudentSigninSettingStartStatus(String teacherOpenCourseStudentSigninSettingStartStatus) {
this.teacherOpenCourseStudentSigninSettingStartStatus = teacherOpenCourseStudentSigninSettingStartStatus == null ? null : teacherOpenCourseStudentSigninSettingStartStatus.trim();
}
public Date getTeacherOpenCourseStudentSigninSettingStartTime() {
return teacherOpenCourseStudentSigninSettingStartTime;
}
public void setTeacherOpenCourseStudentSigninSettingStartTime(Date teacherOpenCourseStudentSigninSettingStartTime) {
this.teacherOpenCourseStudentSigninSettingStartTime = teacherOpenCourseStudentSigninSettingStartTime;
}
public Date getTeacherOpenCourseStudentSigninSettingEndTime() {
return teacherOpenCourseStudentSigninSettingEndTime;
}
public void setTeacherOpenCourseStudentSigninSettingEndTime(Date teacherOpenCourseStudentSigninSettingEndTime) {
this.teacherOpenCourseStudentSigninSettingEndTime = teacherOpenCourseStudentSigninSettingEndTime;
}
public Long getOrgId() {
return orgId;
}
public void setOrgId(Long orgId) {
this.orgId = orgId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Date getTeacherOpenCourseStudentSigninSettingSigninTime() {
return teacherOpenCourseStudentSigninSettingSigninTime;
}
public void setTeacherOpenCourseStudentSigninSettingSigninTime(Date teacherOpenCourseStudentSigninSettingSigninTime) {
this.teacherOpenCourseStudentSigninSettingSigninTime = teacherOpenCourseStudentSigninSettingSigninTime;
}
}

@ -0,0 +1,90 @@
package com.sztzjy.trade.entity.dto;/**
* @author 17803
* @date 2024-08-08 9:18
*/
import com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSetting;
import com.sztzjy.trade.enums.StartStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.jpa.repository.Query;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;
@Data
public class TeacherOpenCourseStudentSigninSettingDTO {
// 签到场次(时间)
// @NotNull(message = "签到场次(时间)不能为空", groups =ValidateConfig.ADD.class)
@ApiModelProperty("场次时间")
private Date teacherOpenCourseStudentSigninSettingSessionTime;
@NotNull(message = "开课ID不能为空")
@ApiModelProperty("开课ID")
private Long teacherOpenCourseId;
@Pattern(regexp = "^ALL|[\\d,]+$", message = "班级ID集合不能为空")
@NotBlank(message = "班级ID集合不能为空")
@ApiModelProperty("班级ID集合不能为空")
private String schoolClassIds;
@NotBlank(message = "签到方式不能为空")
// (数据字典 student_signin_type)
@ApiModelProperty("签到方式ip/code/manual")
private String teacherOpenCourseStudentSigninSettingType;
//数据例子IP: x.x.x.x-x.x.x.x,x.x.x.x-x.x.x.x多个IP段逗号隔开验证码xxxx长度6位验证手动签到无需设置必须为空
@ApiModelProperty("设置的值")
private String teacherOpenCourseStudentSigninSettingValue;
@ApiModelProperty("签到开始日期")
private Date teacherOpenCourseStudentSigninSettingStartTime;
@ApiModelProperty("签到结束日期")
private Date teacherOpenCourseStudentSigninSettingEndTime;
@ApiModelProperty("学生签到时间")
private Date teacherOpenCourseStudentSigninSettingSigninTime ;
@ApiModelProperty("创建时间")
private Date teacherOpenCourseStudentSigninSettingAddTime;
@ApiModelProperty("状态 1正常 2删除")
private Integer teacherOpenCourseStudentSigninSettingStatus;
//
@ApiModelProperty("开始状态 未开始 进行中 已结束")
private StartStatusEnum teacherOpenCourseStudentSigninSettingStartStatus;
@ApiModelProperty("用户ID")
private Long userId;
public TeacherOpenCourseStudentSigninSetting pojo(){
TeacherOpenCourseStudentSigninSetting pojo = new TeacherOpenCourseStudentSigninSetting();
pojo.setTeacherOpenCourseId(this.getTeacherOpenCourseId());
pojo.setSchoolClassIds(this.getSchoolClassIds());
pojo.setTeacherOpenCourseStudentSigninSettingType(this.getTeacherOpenCourseStudentSigninSettingType());
pojo.setTeacherOpenCourseStudentSigninSettingValue(this.getTeacherOpenCourseStudentSigninSettingValue());
pojo.setTeacherOpenCourseStudentSigninSettingStartTime(this.getTeacherOpenCourseStudentSigninSettingStartTime());
pojo.setTeacherOpenCourseStudentSigninSettingEndTime(this.getTeacherOpenCourseStudentSigninSettingEndTime());
pojo.setTeacherOpenCourseStudentSigninSettingAddTime(this.getTeacherOpenCourseStudentSigninSettingAddTime());
pojo.setTeacherOpenCourseStudentSigninSettingStatus(this.getTeacherOpenCourseStudentSigninSettingStatus());
pojo.setTeacherOpenCourseStudentSigninSettingSessionTime(this.getTeacherOpenCourseStudentSigninSettingSessionTime());
pojo.setTeacherOpenCourseStudentSigninSettingSigninTime(this.getTeacherOpenCourseStudentSigninSettingSigninTime());
pojo.setUserId(this.getUserId());
return pojo;
}
}

@ -0,0 +1,38 @@
package com.sztzjy.trade.enums;
import com.sztzjy.trade.util.EnumUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* ING
* END
* READY
*/
@Getter
@AllArgsConstructor
public enum StartStatusEnum {
// 未开始
READY(-1, "未开始"),
// 进行中
ING(0, "进行中"),
// 已结束
END(1, "已结束")
;
private Integer code;
// 可以转换成中文
// @JsonValue
private String text;
public static StartStatusEnum getByCode(Integer code) {
return EnumUtil.getByFieldWithValue(StartStatusEnum.class, "code", code);
}
}

@ -0,0 +1,30 @@
package com.sztzjy.trade.mapper;
import com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninLog;
import com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TeacherOpenCourseStudentSigninLogMapper {
long countByExample(TeacherOpenCourseStudentSigninLogExample example);
int deleteByExample(TeacherOpenCourseStudentSigninLogExample example);
int deleteByPrimaryKey(Long teacherOpenCourseStudentSigninLogId);
int insert(TeacherOpenCourseStudentSigninLog record);
int insertSelective(TeacherOpenCourseStudentSigninLog record);
List<TeacherOpenCourseStudentSigninLog> selectByExample(TeacherOpenCourseStudentSigninLogExample example);
TeacherOpenCourseStudentSigninLog selectByPrimaryKey(Long teacherOpenCourseStudentSigninLogId);
int updateByExampleSelective(@Param("record") TeacherOpenCourseStudentSigninLog record, @Param("example") TeacherOpenCourseStudentSigninLogExample example);
int updateByExample(@Param("record") TeacherOpenCourseStudentSigninLog record, @Param("example") TeacherOpenCourseStudentSigninLogExample example);
int updateByPrimaryKeySelective(TeacherOpenCourseStudentSigninLog record);
int updateByPrimaryKey(TeacherOpenCourseStudentSigninLog record);
}

@ -0,0 +1,30 @@
package com.sztzjy.trade.mapper;
import com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSetting;
import com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSettingExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TeacherOpenCourseStudentSigninSettingMapper {
long countByExample(TeacherOpenCourseStudentSigninSettingExample example);
int deleteByExample(TeacherOpenCourseStudentSigninSettingExample example);
int deleteByPrimaryKey(Long teacherOpenCourseStudentSigninSettingId);
int insert(TeacherOpenCourseStudentSigninSetting record);
int insertSelective(TeacherOpenCourseStudentSigninSetting record);
List<TeacherOpenCourseStudentSigninSetting> selectByExample(TeacherOpenCourseStudentSigninSettingExample example);
TeacherOpenCourseStudentSigninSetting selectByPrimaryKey(Long teacherOpenCourseStudentSigninSettingId);
int updateByExampleSelective(@Param("record") TeacherOpenCourseStudentSigninSetting record, @Param("example") TeacherOpenCourseStudentSigninSettingExample example);
int updateByExample(@Param("record") TeacherOpenCourseStudentSigninSetting record, @Param("example") TeacherOpenCourseStudentSigninSettingExample example);
int updateByPrimaryKeySelective(TeacherOpenCourseStudentSigninSetting record);
int updateByPrimaryKey(TeacherOpenCourseStudentSigninSetting record);
}

@ -0,0 +1,12 @@
package com.sztzjy.trade.service;
import com.sztzjy.trade.entity.dto.TeacherOpenCourseStudentSigninSettingDTO;
import com.sztzjy.trade.util.ResultEntity;
/**
* @author 17803
* @date 2024-08-08 9:23
*/
public interface TeacherOpenCourseStudentSigninService {
ResultEntity addDo(TeacherOpenCourseStudentSigninSettingDTO teacherOpenCourseStudentSigninSettingDTO);
}

@ -0,0 +1,44 @@
package com.sztzjy.trade.service.impl;/**
* @author 17803
* @date 2024-08-08 9:24
*/
import com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSetting;
import com.sztzjy.trade.entity.dto.TeacherOpenCourseStudentSigninSettingDTO;
import com.sztzjy.trade.enums.StartStatusEnum;
import com.sztzjy.trade.mapper.TeacherOpenCourseStudentSigninSettingMapper;
import com.sztzjy.trade.service.TeacherOpenCourseStudentSigninService;
import com.sztzjy.trade.util.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Date;
@Service
public class TeacherOpenCourseStudentSigninServiceImpl implements TeacherOpenCourseStudentSigninService {
@Autowired
private TeacherOpenCourseStudentSigninSettingMapper teacherOpenCourseStudentSigninSettingMapper;
@Override
public ResultEntity addDo(TeacherOpenCourseStudentSigninSettingDTO teacherOpenCourseStudentSigninSettingDTO) {
TeacherOpenCourseStudentSigninSetting teacherOpenCourseStudentSigninSetting = teacherOpenCourseStudentSigninSettingDTO.pojo();
teacherOpenCourseStudentSigninSetting.setTeacherOpenCourseStudentSigninSettingAddTime(new Date());
// 默认是未开始的状态
teacherOpenCourseStudentSigninSetting.setTeacherOpenCourseStudentSigninSettingStartStatus(String.valueOf(StartStatusEnum.READY));
//获取现在时间 只保留到分钟
Date now = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
String nowTime = dateFormat.format(now);
try {
now = dateFormat.parse(nowTime);
}catch (Exception e){
throw new RuntimeException("时间转换异常", e);
}
teacherOpenCourseStudentSigninSetting.setTeacherOpenCourseStudentSigninSettingSessionTime(now);
teacherOpenCourseStudentSigninSettingMapper.insertSelective(teacherOpenCourseStudentSigninSetting);
return new ResultEntity<>(HttpStatus.OK,"创建成功");
}
}

@ -0,0 +1,40 @@
package com.sztzjy.trade.util;
import cn.hutool.core.util.ReflectUtil;
import java.util.Arrays;
/**
* <p>
*
* </p>
*
* @author mlx
* @date 2022/9/24
* @modified
*/
public class EnumUtil extends cn.hutool.core.util.EnumUtil {
/**
*
* @param enumClass
* @param fieldNme
* @param value
* @return
* @param <E>
*/
public static <E extends Enum<E>> E getByFieldWithValue(Class<E> enumClass, String fieldNme, Object value) {
final E[] enumConstants = enumClass.getEnumConstants();
for (E enumConstant : enumConstants) {
Object fieldValue = ReflectUtil.getFieldValue(enumConstant, fieldNme);
if (fieldValue.equals(value)) {
return enumConstant;
}
}
return null;
}
public static <E extends Enum<E>> boolean contains(E em, E... eNums) {
return Arrays.stream(eNums).anyMatch(e -> e.compareTo(em) == 0);
}
}

@ -0,0 +1,343 @@
<?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.sztzjy.trade.mapper.TeacherOpenCourseStudentSigninLogMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninLog">
<id column="teacher_open_course_student_signin_log_id" jdbcType="BIGINT" property="teacherOpenCourseStudentSigninLogId" />
<result column="teacher_open_course_student_signin_setting_id" jdbcType="BIGINT" property="teacherOpenCourseStudentSigninSettingId" />
<result column="teacher_open_course_student_signin_setting_session_time" jdbcType="TIMESTAMP" property="teacherOpenCourseStudentSigninSettingSessionTime" />
<result column="student_id" jdbcType="BIGINT" property="studentId" />
<result column="teacher_open_course_id" jdbcType="BIGINT" property="teacherOpenCourseId" />
<result column="school_class_id" jdbcType="BIGINT" property="schoolClassId" />
<result column="teacher_open_course_student_signin_log_add_time" jdbcType="TIMESTAMP" property="teacherOpenCourseStudentSigninLogAddTime" />
<result column="teacher_open_course_student_signin_log_type" jdbcType="VARCHAR" property="teacherOpenCourseStudentSigninLogType" />
<result column="teacher_open_course_student_signin_log_remark" jdbcType="VARCHAR" property="teacherOpenCourseStudentSigninLogRemark" />
<result column="teacher_open_course_student_signin_log_ip" jdbcType="VARCHAR" property="teacherOpenCourseStudentSigninLogIp" />
<result column="teacher_open_course_student_signin_log_tag" jdbcType="INTEGER" property="teacherOpenCourseStudentSigninLogTag" />
<result column="org_id" jdbcType="BIGINT" property="orgId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
teacher_open_course_student_signin_log_id, teacher_open_course_student_signin_setting_id,
teacher_open_course_student_signin_setting_session_time, student_id, teacher_open_course_id,
school_class_id, teacher_open_course_student_signin_log_add_time, teacher_open_course_student_signin_log_type,
teacher_open_course_student_signin_log_remark, teacher_open_course_student_signin_log_ip,
teacher_open_course_student_signin_log_tag, org_id, user_id
</sql>
<select id="selectByExample" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninLogExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from teacher_open_course_student_signin_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from teacher_open_course_student_signin_log
where teacher_open_course_student_signin_log_id = #{teacherOpenCourseStudentSigninLogId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from teacher_open_course_student_signin_log
where teacher_open_course_student_signin_log_id = #{teacherOpenCourseStudentSigninLogId,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninLogExample">
delete from teacher_open_course_student_signin_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninLog">
insert into teacher_open_course_student_signin_log (teacher_open_course_student_signin_log_id, teacher_open_course_student_signin_setting_id,
teacher_open_course_student_signin_setting_session_time, student_id,
teacher_open_course_id, school_class_id, teacher_open_course_student_signin_log_add_time,
teacher_open_course_student_signin_log_type, teacher_open_course_student_signin_log_remark,
teacher_open_course_student_signin_log_ip, teacher_open_course_student_signin_log_tag,
org_id, user_id)
values (#{teacherOpenCourseStudentSigninLogId,jdbcType=BIGINT}, #{teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT},
#{teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP}, #{studentId,jdbcType=BIGINT},
#{teacherOpenCourseId,jdbcType=BIGINT}, #{schoolClassId,jdbcType=BIGINT}, #{teacherOpenCourseStudentSigninLogAddTime,jdbcType=TIMESTAMP},
#{teacherOpenCourseStudentSigninLogType,jdbcType=VARCHAR}, #{teacherOpenCourseStudentSigninLogRemark,jdbcType=VARCHAR},
#{teacherOpenCourseStudentSigninLogIp,jdbcType=VARCHAR}, #{teacherOpenCourseStudentSigninLogTag,jdbcType=INTEGER},
#{orgId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninLog">
insert into teacher_open_course_student_signin_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="teacherOpenCourseStudentSigninLogId != null">
teacher_open_course_student_signin_log_id,
</if>
<if test="teacherOpenCourseStudentSigninSettingId != null">
teacher_open_course_student_signin_setting_id,
</if>
<if test="teacherOpenCourseStudentSigninSettingSessionTime != null">
teacher_open_course_student_signin_setting_session_time,
</if>
<if test="studentId != null">
student_id,
</if>
<if test="teacherOpenCourseId != null">
teacher_open_course_id,
</if>
<if test="schoolClassId != null">
school_class_id,
</if>
<if test="teacherOpenCourseStudentSigninLogAddTime != null">
teacher_open_course_student_signin_log_add_time,
</if>
<if test="teacherOpenCourseStudentSigninLogType != null">
teacher_open_course_student_signin_log_type,
</if>
<if test="teacherOpenCourseStudentSigninLogRemark != null">
teacher_open_course_student_signin_log_remark,
</if>
<if test="teacherOpenCourseStudentSigninLogIp != null">
teacher_open_course_student_signin_log_ip,
</if>
<if test="teacherOpenCourseStudentSigninLogTag != null">
teacher_open_course_student_signin_log_tag,
</if>
<if test="orgId != null">
org_id,
</if>
<if test="userId != null">
user_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="teacherOpenCourseStudentSigninLogId != null">
#{teacherOpenCourseStudentSigninLogId,jdbcType=BIGINT},
</if>
<if test="teacherOpenCourseStudentSigninSettingId != null">
#{teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT},
</if>
<if test="teacherOpenCourseStudentSigninSettingSessionTime != null">
#{teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
</if>
<if test="studentId != null">
#{studentId,jdbcType=BIGINT},
</if>
<if test="teacherOpenCourseId != null">
#{teacherOpenCourseId,jdbcType=BIGINT},
</if>
<if test="schoolClassId != null">
#{schoolClassId,jdbcType=BIGINT},
</if>
<if test="teacherOpenCourseStudentSigninLogAddTime != null">
#{teacherOpenCourseStudentSigninLogAddTime,jdbcType=TIMESTAMP},
</if>
<if test="teacherOpenCourseStudentSigninLogType != null">
#{teacherOpenCourseStudentSigninLogType,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninLogRemark != null">
#{teacherOpenCourseStudentSigninLogRemark,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninLogIp != null">
#{teacherOpenCourseStudentSigninLogIp,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninLogTag != null">
#{teacherOpenCourseStudentSigninLogTag,jdbcType=INTEGER},
</if>
<if test="orgId != null">
#{orgId,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninLogExample" resultType="java.lang.Long">
select count(*) from teacher_open_course_student_signin_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update teacher_open_course_student_signin_log
<set>
<if test="record.teacherOpenCourseStudentSigninLogId != null">
teacher_open_course_student_signin_log_id = #{record.teacherOpenCourseStudentSigninLogId,jdbcType=BIGINT},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingId != null">
teacher_open_course_student_signin_setting_id = #{record.teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingSessionTime != null">
teacher_open_course_student_signin_setting_session_time = #{record.teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
</if>
<if test="record.studentId != null">
student_id = #{record.studentId,jdbcType=BIGINT},
</if>
<if test="record.teacherOpenCourseId != null">
teacher_open_course_id = #{record.teacherOpenCourseId,jdbcType=BIGINT},
</if>
<if test="record.schoolClassId != null">
school_class_id = #{record.schoolClassId,jdbcType=BIGINT},
</if>
<if test="record.teacherOpenCourseStudentSigninLogAddTime != null">
teacher_open_course_student_signin_log_add_time = #{record.teacherOpenCourseStudentSigninLogAddTime,jdbcType=TIMESTAMP},
</if>
<if test="record.teacherOpenCourseStudentSigninLogType != null">
teacher_open_course_student_signin_log_type = #{record.teacherOpenCourseStudentSigninLogType,jdbcType=VARCHAR},
</if>
<if test="record.teacherOpenCourseStudentSigninLogRemark != null">
teacher_open_course_student_signin_log_remark = #{record.teacherOpenCourseStudentSigninLogRemark,jdbcType=VARCHAR},
</if>
<if test="record.teacherOpenCourseStudentSigninLogIp != null">
teacher_open_course_student_signin_log_ip = #{record.teacherOpenCourseStudentSigninLogIp,jdbcType=VARCHAR},
</if>
<if test="record.teacherOpenCourseStudentSigninLogTag != null">
teacher_open_course_student_signin_log_tag = #{record.teacherOpenCourseStudentSigninLogTag,jdbcType=INTEGER},
</if>
<if test="record.orgId != null">
org_id = #{record.orgId,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update teacher_open_course_student_signin_log
set teacher_open_course_student_signin_log_id = #{record.teacherOpenCourseStudentSigninLogId,jdbcType=BIGINT},
teacher_open_course_student_signin_setting_id = #{record.teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT},
teacher_open_course_student_signin_setting_session_time = #{record.teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
student_id = #{record.studentId,jdbcType=BIGINT},
teacher_open_course_id = #{record.teacherOpenCourseId,jdbcType=BIGINT},
school_class_id = #{record.schoolClassId,jdbcType=BIGINT},
teacher_open_course_student_signin_log_add_time = #{record.teacherOpenCourseStudentSigninLogAddTime,jdbcType=TIMESTAMP},
teacher_open_course_student_signin_log_type = #{record.teacherOpenCourseStudentSigninLogType,jdbcType=VARCHAR},
teacher_open_course_student_signin_log_remark = #{record.teacherOpenCourseStudentSigninLogRemark,jdbcType=VARCHAR},
teacher_open_course_student_signin_log_ip = #{record.teacherOpenCourseStudentSigninLogIp,jdbcType=VARCHAR},
teacher_open_course_student_signin_log_tag = #{record.teacherOpenCourseStudentSigninLogTag,jdbcType=INTEGER},
org_id = #{record.orgId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninLog">
update teacher_open_course_student_signin_log
<set>
<if test="teacherOpenCourseStudentSigninSettingId != null">
teacher_open_course_student_signin_setting_id = #{teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT},
</if>
<if test="teacherOpenCourseStudentSigninSettingSessionTime != null">
teacher_open_course_student_signin_setting_session_time = #{teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
</if>
<if test="studentId != null">
student_id = #{studentId,jdbcType=BIGINT},
</if>
<if test="teacherOpenCourseId != null">
teacher_open_course_id = #{teacherOpenCourseId,jdbcType=BIGINT},
</if>
<if test="schoolClassId != null">
school_class_id = #{schoolClassId,jdbcType=BIGINT},
</if>
<if test="teacherOpenCourseStudentSigninLogAddTime != null">
teacher_open_course_student_signin_log_add_time = #{teacherOpenCourseStudentSigninLogAddTime,jdbcType=TIMESTAMP},
</if>
<if test="teacherOpenCourseStudentSigninLogType != null">
teacher_open_course_student_signin_log_type = #{teacherOpenCourseStudentSigninLogType,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninLogRemark != null">
teacher_open_course_student_signin_log_remark = #{teacherOpenCourseStudentSigninLogRemark,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninLogIp != null">
teacher_open_course_student_signin_log_ip = #{teacherOpenCourseStudentSigninLogIp,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninLogTag != null">
teacher_open_course_student_signin_log_tag = #{teacherOpenCourseStudentSigninLogTag,jdbcType=INTEGER},
</if>
<if test="orgId != null">
org_id = #{orgId,jdbcType=BIGINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
</set>
where teacher_open_course_student_signin_log_id = #{teacherOpenCourseStudentSigninLogId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninLog">
update teacher_open_course_student_signin_log
set teacher_open_course_student_signin_setting_id = #{teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT},
teacher_open_course_student_signin_setting_session_time = #{teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
student_id = #{studentId,jdbcType=BIGINT},
teacher_open_course_id = #{teacherOpenCourseId,jdbcType=BIGINT},
school_class_id = #{schoolClassId,jdbcType=BIGINT},
teacher_open_course_student_signin_log_add_time = #{teacherOpenCourseStudentSigninLogAddTime,jdbcType=TIMESTAMP},
teacher_open_course_student_signin_log_type = #{teacherOpenCourseStudentSigninLogType,jdbcType=VARCHAR},
teacher_open_course_student_signin_log_remark = #{teacherOpenCourseStudentSigninLogRemark,jdbcType=VARCHAR},
teacher_open_course_student_signin_log_ip = #{teacherOpenCourseStudentSigninLogIp,jdbcType=VARCHAR},
teacher_open_course_student_signin_log_tag = #{teacherOpenCourseStudentSigninLogTag,jdbcType=INTEGER},
org_id = #{orgId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT}
where teacher_open_course_student_signin_log_id = #{teacherOpenCourseStudentSigninLogId,jdbcType=BIGINT}
</update>
</mapper>

@ -0,0 +1,361 @@
<?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.sztzjy.trade.mapper.TeacherOpenCourseStudentSigninSettingMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSetting">
<id column="teacher_open_course_student_signin_setting_id" jdbcType="BIGINT" property="teacherOpenCourseStudentSigninSettingId" />
<result column="teacher_open_course_student_signin_setting_session_time" jdbcType="TIMESTAMP" property="teacherOpenCourseStudentSigninSettingSessionTime" />
<result column="teacher_open_course_id" jdbcType="BIGINT" property="teacherOpenCourseId" />
<result column="school_class_ids" jdbcType="VARCHAR" property="schoolClassIds" />
<result column="teacher_open_course_student_signin_setting_type" jdbcType="VARCHAR" property="teacherOpenCourseStudentSigninSettingType" />
<result column="teacher_open_course_student_signin_setting_value" jdbcType="VARCHAR" property="teacherOpenCourseStudentSigninSettingValue" />
<result column="teacher_open_course_student_signin_setting_add_time" jdbcType="TIMESTAMP" property="teacherOpenCourseStudentSigninSettingAddTime" />
<result column="teacher_open_course_student_signin_setting_status" jdbcType="INTEGER" property="teacherOpenCourseStudentSigninSettingStatus" />
<result column="teacher_open_course_student_signin_setting_start_status" jdbcType="CHAR" property="teacherOpenCourseStudentSigninSettingStartStatus" />
<result column="teacher_open_course_student_signin_setting_start_time" jdbcType="TIMESTAMP" property="teacherOpenCourseStudentSigninSettingStartTime" />
<result column="teacher_open_course_student_signin_setting_end_time" jdbcType="TIMESTAMP" property="teacherOpenCourseStudentSigninSettingEndTime" />
<result column="org_id" jdbcType="BIGINT" property="orgId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="teacher_open_course_student_signin_setting_signin_time" jdbcType="TIMESTAMP" property="teacherOpenCourseStudentSigninSettingSigninTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
teacher_open_course_student_signin_setting_id, teacher_open_course_student_signin_setting_session_time,
teacher_open_course_id, school_class_ids, teacher_open_course_student_signin_setting_type,
teacher_open_course_student_signin_setting_value, teacher_open_course_student_signin_setting_add_time,
teacher_open_course_student_signin_setting_status, teacher_open_course_student_signin_setting_start_status,
teacher_open_course_student_signin_setting_start_time, teacher_open_course_student_signin_setting_end_time,
org_id, user_id, teacher_open_course_student_signin_setting_signin_time
</sql>
<select id="selectByExample" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSettingExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from teacher_open_course_student_signin_setting
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from teacher_open_course_student_signin_setting
where teacher_open_course_student_signin_setting_id = #{teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from teacher_open_course_student_signin_setting
where teacher_open_course_student_signin_setting_id = #{teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSettingExample">
delete from teacher_open_course_student_signin_setting
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSetting">
insert into teacher_open_course_student_signin_setting (teacher_open_course_student_signin_setting_id, teacher_open_course_student_signin_setting_session_time,
teacher_open_course_id, school_class_ids, teacher_open_course_student_signin_setting_type,
teacher_open_course_student_signin_setting_value, teacher_open_course_student_signin_setting_add_time,
teacher_open_course_student_signin_setting_status, teacher_open_course_student_signin_setting_start_status,
teacher_open_course_student_signin_setting_start_time, teacher_open_course_student_signin_setting_end_time,
org_id, user_id, teacher_open_course_student_signin_setting_signin_time
)
values (#{teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT}, #{teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
#{teacherOpenCourseId,jdbcType=BIGINT}, #{schoolClassIds,jdbcType=VARCHAR}, #{teacherOpenCourseStudentSigninSettingType,jdbcType=VARCHAR},
#{teacherOpenCourseStudentSigninSettingValue,jdbcType=VARCHAR}, #{teacherOpenCourseStudentSigninSettingAddTime,jdbcType=TIMESTAMP},
#{teacherOpenCourseStudentSigninSettingStatus,jdbcType=INTEGER}, #{teacherOpenCourseStudentSigninSettingStartStatus,jdbcType=CHAR},
#{teacherOpenCourseStudentSigninSettingStartTime,jdbcType=TIMESTAMP}, #{teacherOpenCourseStudentSigninSettingEndTime,jdbcType=TIMESTAMP},
#{orgId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{teacherOpenCourseStudentSigninSettingSigninTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSetting">
insert into teacher_open_course_student_signin_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="teacherOpenCourseStudentSigninSettingId != null">
teacher_open_course_student_signin_setting_id,
</if>
<if test="teacherOpenCourseStudentSigninSettingSessionTime != null">
teacher_open_course_student_signin_setting_session_time,
</if>
<if test="teacherOpenCourseId != null">
teacher_open_course_id,
</if>
<if test="schoolClassIds != null">
school_class_ids,
</if>
<if test="teacherOpenCourseStudentSigninSettingType != null">
teacher_open_course_student_signin_setting_type,
</if>
<if test="teacherOpenCourseStudentSigninSettingValue != null">
teacher_open_course_student_signin_setting_value,
</if>
<if test="teacherOpenCourseStudentSigninSettingAddTime != null">
teacher_open_course_student_signin_setting_add_time,
</if>
<if test="teacherOpenCourseStudentSigninSettingStatus != null">
teacher_open_course_student_signin_setting_status,
</if>
<if test="teacherOpenCourseStudentSigninSettingStartStatus != null">
teacher_open_course_student_signin_setting_start_status,
</if>
<if test="teacherOpenCourseStudentSigninSettingStartTime != null">
teacher_open_course_student_signin_setting_start_time,
</if>
<if test="teacherOpenCourseStudentSigninSettingEndTime != null">
teacher_open_course_student_signin_setting_end_time,
</if>
<if test="orgId != null">
org_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="teacherOpenCourseStudentSigninSettingSigninTime != null">
teacher_open_course_student_signin_setting_signin_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="teacherOpenCourseStudentSigninSettingId != null">
#{teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT},
</if>
<if test="teacherOpenCourseStudentSigninSettingSessionTime != null">
#{teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
</if>
<if test="teacherOpenCourseId != null">
#{teacherOpenCourseId,jdbcType=BIGINT},
</if>
<if test="schoolClassIds != null">
#{schoolClassIds,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninSettingType != null">
#{teacherOpenCourseStudentSigninSettingType,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninSettingValue != null">
#{teacherOpenCourseStudentSigninSettingValue,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninSettingAddTime != null">
#{teacherOpenCourseStudentSigninSettingAddTime,jdbcType=TIMESTAMP},
</if>
<if test="teacherOpenCourseStudentSigninSettingStatus != null">
#{teacherOpenCourseStudentSigninSettingStatus,jdbcType=INTEGER},
</if>
<if test="teacherOpenCourseStudentSigninSettingStartStatus != null">
#{teacherOpenCourseStudentSigninSettingStartStatus,jdbcType=CHAR},
</if>
<if test="teacherOpenCourseStudentSigninSettingStartTime != null">
#{teacherOpenCourseStudentSigninSettingStartTime,jdbcType=TIMESTAMP},
</if>
<if test="teacherOpenCourseStudentSigninSettingEndTime != null">
#{teacherOpenCourseStudentSigninSettingEndTime,jdbcType=TIMESTAMP},
</if>
<if test="orgId != null">
#{orgId,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="teacherOpenCourseStudentSigninSettingSigninTime != null">
#{teacherOpenCourseStudentSigninSettingSigninTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSettingExample" resultType="java.lang.Long">
select count(*) from teacher_open_course_student_signin_setting
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update teacher_open_course_student_signin_setting
<set>
<if test="record.teacherOpenCourseStudentSigninSettingId != null">
teacher_open_course_student_signin_setting_id = #{record.teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingSessionTime != null">
teacher_open_course_student_signin_setting_session_time = #{record.teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
</if>
<if test="record.teacherOpenCourseId != null">
teacher_open_course_id = #{record.teacherOpenCourseId,jdbcType=BIGINT},
</if>
<if test="record.schoolClassIds != null">
school_class_ids = #{record.schoolClassIds,jdbcType=VARCHAR},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingType != null">
teacher_open_course_student_signin_setting_type = #{record.teacherOpenCourseStudentSigninSettingType,jdbcType=VARCHAR},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingValue != null">
teacher_open_course_student_signin_setting_value = #{record.teacherOpenCourseStudentSigninSettingValue,jdbcType=VARCHAR},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingAddTime != null">
teacher_open_course_student_signin_setting_add_time = #{record.teacherOpenCourseStudentSigninSettingAddTime,jdbcType=TIMESTAMP},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingStatus != null">
teacher_open_course_student_signin_setting_status = #{record.teacherOpenCourseStudentSigninSettingStatus,jdbcType=INTEGER},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingStartStatus != null">
teacher_open_course_student_signin_setting_start_status = #{record.teacherOpenCourseStudentSigninSettingStartStatus,jdbcType=CHAR},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingStartTime != null">
teacher_open_course_student_signin_setting_start_time = #{record.teacherOpenCourseStudentSigninSettingStartTime,jdbcType=TIMESTAMP},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingEndTime != null">
teacher_open_course_student_signin_setting_end_time = #{record.teacherOpenCourseStudentSigninSettingEndTime,jdbcType=TIMESTAMP},
</if>
<if test="record.orgId != null">
org_id = #{record.orgId,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.teacherOpenCourseStudentSigninSettingSigninTime != null">
teacher_open_course_student_signin_setting_signin_time = #{record.teacherOpenCourseStudentSigninSettingSigninTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update teacher_open_course_student_signin_setting
set teacher_open_course_student_signin_setting_id = #{record.teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT},
teacher_open_course_student_signin_setting_session_time = #{record.teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
teacher_open_course_id = #{record.teacherOpenCourseId,jdbcType=BIGINT},
school_class_ids = #{record.schoolClassIds,jdbcType=VARCHAR},
teacher_open_course_student_signin_setting_type = #{record.teacherOpenCourseStudentSigninSettingType,jdbcType=VARCHAR},
teacher_open_course_student_signin_setting_value = #{record.teacherOpenCourseStudentSigninSettingValue,jdbcType=VARCHAR},
teacher_open_course_student_signin_setting_add_time = #{record.teacherOpenCourseStudentSigninSettingAddTime,jdbcType=TIMESTAMP},
teacher_open_course_student_signin_setting_status = #{record.teacherOpenCourseStudentSigninSettingStatus,jdbcType=INTEGER},
teacher_open_course_student_signin_setting_start_status = #{record.teacherOpenCourseStudentSigninSettingStartStatus,jdbcType=CHAR},
teacher_open_course_student_signin_setting_start_time = #{record.teacherOpenCourseStudentSigninSettingStartTime,jdbcType=TIMESTAMP},
teacher_open_course_student_signin_setting_end_time = #{record.teacherOpenCourseStudentSigninSettingEndTime,jdbcType=TIMESTAMP},
org_id = #{record.orgId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
teacher_open_course_student_signin_setting_signin_time = #{record.teacherOpenCourseStudentSigninSettingSigninTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSetting">
update teacher_open_course_student_signin_setting
<set>
<if test="teacherOpenCourseStudentSigninSettingSessionTime != null">
teacher_open_course_student_signin_setting_session_time = #{teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
</if>
<if test="teacherOpenCourseId != null">
teacher_open_course_id = #{teacherOpenCourseId,jdbcType=BIGINT},
</if>
<if test="schoolClassIds != null">
school_class_ids = #{schoolClassIds,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninSettingType != null">
teacher_open_course_student_signin_setting_type = #{teacherOpenCourseStudentSigninSettingType,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninSettingValue != null">
teacher_open_course_student_signin_setting_value = #{teacherOpenCourseStudentSigninSettingValue,jdbcType=VARCHAR},
</if>
<if test="teacherOpenCourseStudentSigninSettingAddTime != null">
teacher_open_course_student_signin_setting_add_time = #{teacherOpenCourseStudentSigninSettingAddTime,jdbcType=TIMESTAMP},
</if>
<if test="teacherOpenCourseStudentSigninSettingStatus != null">
teacher_open_course_student_signin_setting_status = #{teacherOpenCourseStudentSigninSettingStatus,jdbcType=INTEGER},
</if>
<if test="teacherOpenCourseStudentSigninSettingStartStatus != null">
teacher_open_course_student_signin_setting_start_status = #{teacherOpenCourseStudentSigninSettingStartStatus,jdbcType=CHAR},
</if>
<if test="teacherOpenCourseStudentSigninSettingStartTime != null">
teacher_open_course_student_signin_setting_start_time = #{teacherOpenCourseStudentSigninSettingStartTime,jdbcType=TIMESTAMP},
</if>
<if test="teacherOpenCourseStudentSigninSettingEndTime != null">
teacher_open_course_student_signin_setting_end_time = #{teacherOpenCourseStudentSigninSettingEndTime,jdbcType=TIMESTAMP},
</if>
<if test="orgId != null">
org_id = #{orgId,jdbcType=BIGINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="teacherOpenCourseStudentSigninSettingSigninTime != null">
teacher_open_course_student_signin_setting_signin_time = #{teacherOpenCourseStudentSigninSettingSigninTime,jdbcType=TIMESTAMP},
</if>
</set>
where teacher_open_course_student_signin_setting_id = #{teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.trade.entity.TeacherOpenCourseStudentSigninSetting">
update teacher_open_course_student_signin_setting
set teacher_open_course_student_signin_setting_session_time = #{teacherOpenCourseStudentSigninSettingSessionTime,jdbcType=TIMESTAMP},
teacher_open_course_id = #{teacherOpenCourseId,jdbcType=BIGINT},
school_class_ids = #{schoolClassIds,jdbcType=VARCHAR},
teacher_open_course_student_signin_setting_type = #{teacherOpenCourseStudentSigninSettingType,jdbcType=VARCHAR},
teacher_open_course_student_signin_setting_value = #{teacherOpenCourseStudentSigninSettingValue,jdbcType=VARCHAR},
teacher_open_course_student_signin_setting_add_time = #{teacherOpenCourseStudentSigninSettingAddTime,jdbcType=TIMESTAMP},
teacher_open_course_student_signin_setting_status = #{teacherOpenCourseStudentSigninSettingStatus,jdbcType=INTEGER},
teacher_open_course_student_signin_setting_start_status = #{teacherOpenCourseStudentSigninSettingStartStatus,jdbcType=CHAR},
teacher_open_course_student_signin_setting_start_time = #{teacherOpenCourseStudentSigninSettingStartTime,jdbcType=TIMESTAMP},
teacher_open_course_student_signin_setting_end_time = #{teacherOpenCourseStudentSigninSettingEndTime,jdbcType=TIMESTAMP},
org_id = #{orgId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
teacher_open_course_student_signin_setting_signin_time = #{teacherOpenCourseStudentSigninSettingSigninTime,jdbcType=TIMESTAMP}
where teacher_open_course_student_signin_setting_id = #{teacherOpenCourseStudentSigninSettingId,jdbcType=BIGINT}
</update>
</mapper>
Loading…
Cancel
Save