Merge branch 'main' of http://118.31.7.2:3000/tzjy-code/digital_trade
# Conflicts: # src/main/resources/generatorConfig.xmlmain
commit
7bfa2902a7
@ -0,0 +1,140 @@
|
||||
package com.sztzjy.trade.controller.tch;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sztzjy.trade.annotation.AnonymousAccess;
|
||||
import com.sztzjy.trade.entity.dto.LoginLogDTO;
|
||||
import com.sztzjy.trade.entity.dto.RestPassWordDTO;
|
||||
import com.sztzjy.trade.service.TchLoginLogAndStuListService;
|
||||
import com.sztzjy.trade.util.ResultEntity;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author 17803
|
||||
* @date 2024-08-06 10:46
|
||||
*/
|
||||
|
||||
@RequestMapping("api/tch/loginLogAndStuList")
|
||||
@RestController
|
||||
@Api(tags = "教学管理(登录日志和学生列表)")
|
||||
public class TchLoginLogAndStuListController {
|
||||
|
||||
@Autowired
|
||||
private TchLoginLogAndStuListService tchLoginLogAndStuListService;
|
||||
|
||||
|
||||
//登录和登出调用,数据更新操作,从新计算登录时长,累计登录时长,累计登录天数,是否在线
|
||||
|
||||
@ApiOperation("登录/退出统计")
|
||||
@PostMapping("/loginLog")
|
||||
@AnonymousAccess
|
||||
public ResultEntity loginLog(@RequestBody LoginLogDTO loginLogDTO, HttpServletRequest request) {
|
||||
//"yyyy-MM-dd HH:mm:ss"
|
||||
|
||||
return tchLoginLogAndStuListService.loginLog(loginLogDTO, request);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询登录日志")
|
||||
@GetMapping("/loginLogBySchoolId")
|
||||
@AnonymousAccess
|
||||
public ResultEntity loginLogBySchoolId(@ApiParam("学校ID") String schoolId
|
||||
, @ApiParam("当前页") Integer page,
|
||||
@ApiParam("每页展示条数") Integer size) {
|
||||
//"yyyy-MM-dd HH:mm:ss"
|
||||
|
||||
return tchLoginLogAndStuListService.loginLogBySchoolId(schoolId, page, size);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("班级下拉框")
|
||||
@GetMapping("/getClassList")
|
||||
@AnonymousAccess
|
||||
public ResultEntity getClassList(@ApiParam("学校ID") String schoolId) {
|
||||
//"yyyy-MM-dd HH:mm:ss"
|
||||
|
||||
return tchLoginLogAndStuListService.getClassList(schoolId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("登录日志条件查询")
|
||||
@GetMapping("/queryCondition ")
|
||||
@AnonymousAccess
|
||||
public ResultEntity queryCondition(@ApiParam("用户名") @RequestParam(required = false) String name,
|
||||
@ApiParam("所属班级ID") @RequestParam(required = false) String classID,
|
||||
@ApiParam("开始时间") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date startTime,
|
||||
@ApiParam("结束时间") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime,
|
||||
@ApiParam("当前页") Integer page,
|
||||
@ApiParam("每页展示条数") Integer size,
|
||||
@ApiParam("学校ID") String schoolId) {
|
||||
//"yyyy-MM-dd HH:mm:ss"
|
||||
|
||||
return tchLoginLogAndStuListService.queryCondition(name, classID, startTime, endTime, page, size, schoolId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("日志导出")
|
||||
@GetMapping("/exportExcel")
|
||||
@AnonymousAccess
|
||||
public void exportExcel(
|
||||
@ApiParam("开始时间") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date startTime,
|
||||
@ApiParam("结束时间") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime,
|
||||
@ApiParam("学校ID") String schoolId, HttpServletResponse response) {
|
||||
//"yyyy-MM-dd HH:mm:ss"
|
||||
|
||||
tchLoginLogAndStuListService.exportExcel(startTime, endTime, schoolId, response);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation("学生列表")
|
||||
@GetMapping("/getStuListInfo")
|
||||
@AnonymousAccess
|
||||
public ResultEntity getStuListInfo(@ApiParam("学校ID") String schoolId,
|
||||
@ApiParam("当前页") Integer page,
|
||||
@ApiParam("每页展示条数") Integer size) {
|
||||
//"yyyy-MM-dd HH:mm:ss"
|
||||
|
||||
return tchLoginLogAndStuListService.getStuListInfo(schoolId, page, size);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation("学生列表删除用户")
|
||||
@PostMapping("/delStuInfo")
|
||||
@AnonymousAccess
|
||||
public ResultEntity delStuInfo(String userId) {
|
||||
//"yyyy-MM-dd HH:mm:ss"
|
||||
|
||||
return tchLoginLogAndStuListService.delStuInfo(userId);
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation("学生列表重置密码")
|
||||
@PostMapping("/restPwd")
|
||||
@AnonymousAccess
|
||||
public ResultEntity restPwd(@RequestBody @Valid RestPassWordDTO restPassWord) {
|
||||
//"yyyy-MM-dd HH:mm:ss"
|
||||
|
||||
return tchLoginLogAndStuListService.restPwd(restPassWord);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,43 @@
|
||||
package com.sztzjy.trade.entity.dto;/**
|
||||
* @author 17803
|
||||
* @date 2024-08-06 11:05
|
||||
*/
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class LoginLogDTO {
|
||||
|
||||
@ApiModelProperty("登入时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
Date loginTimeLast;
|
||||
|
||||
|
||||
@ApiModelProperty("登出时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
Date exitTimeLast;
|
||||
|
||||
@ApiModelProperty("学校ID")
|
||||
private String schoolId;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("班级ID")
|
||||
private String classId;
|
||||
|
||||
@ApiModelProperty("学号")
|
||||
private String studentId;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.sztzjy.trade.entity.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author 17803
|
||||
* @date 2024-08-06 16:08
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(description="重置密码参数")
|
||||
public class RestPassWordDTO {
|
||||
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
@NotNull
|
||||
private String userId;
|
||||
@ApiModelProperty("第一次输入密码")
|
||||
@NotNull
|
||||
private String passwordOne;
|
||||
@ApiModelProperty("第二次输入密码")
|
||||
@NotNull
|
||||
private String passwordTwo;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.sztzjy.trade.mapper;
|
||||
|
||||
import com.sztzjy.trade.entity.TchLoginLog;
|
||||
import com.sztzjy.trade.entity.TchLoginLogExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TchLoginLogMapper {
|
||||
long countByExample(TchLoginLogExample example);
|
||||
|
||||
int deleteByExample(TchLoginLogExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TchLoginLog record);
|
||||
|
||||
int insertSelective(TchLoginLog record);
|
||||
|
||||
List<TchLoginLog> selectByExample(TchLoginLogExample example);
|
||||
|
||||
TchLoginLog selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TchLoginLog record, @Param("example") TchLoginLogExample example);
|
||||
|
||||
int updateByExample(@Param("record") TchLoginLog record, @Param("example") TchLoginLogExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TchLoginLog record);
|
||||
|
||||
int updateByPrimaryKey(TchLoginLog record);
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package com.sztzjy.trade.service;
|
||||
|
||||
import com.sztzjy.trade.entity.dto.LoginLogDTO;
|
||||
import com.sztzjy.trade.entity.dto.RestPassWordDTO;
|
||||
import com.sztzjy.trade.util.ResultEntity;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author 17803
|
||||
* @date 2024-08-06 11:03
|
||||
*/
|
||||
|
||||
|
||||
public interface TchLoginLogAndStuListService {
|
||||
|
||||
//登录/退出统计
|
||||
ResultEntity loginLog(LoginLogDTO loginLogDTO, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 查询登录日志
|
||||
* @param schoolId
|
||||
* @return
|
||||
*/
|
||||
ResultEntity loginLogBySchoolId(@Param("schoolId") String schoolId,Integer page,Integer size);
|
||||
|
||||
/**
|
||||
* 班级下拉框
|
||||
* @param schoolId
|
||||
* @return
|
||||
*/
|
||||
|
||||
ResultEntity getClassList(String schoolId);
|
||||
|
||||
/**
|
||||
* 登录日志条件查询
|
||||
* @param name
|
||||
* @param classID
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
|
||||
ResultEntity queryCondition(@Param("name") String name, @Param("classID") String classID, @Param("startTime") Date startTime, @Param("endTime") Date endTime,Integer page,Integer size,String schoolId);
|
||||
|
||||
/**
|
||||
* 日志导出
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @param schoolId
|
||||
* @return
|
||||
*/
|
||||
|
||||
void exportExcel(Date startTime, Date endTime, String schoolId, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 学生列表查询
|
||||
* @param schoolId
|
||||
* @param page
|
||||
* @param size
|
||||
* @return
|
||||
*/
|
||||
|
||||
ResultEntity getStuListInfo(String schoolId, Integer page, Integer size);
|
||||
|
||||
/**
|
||||
* 学生列表删除
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
|
||||
ResultEntity delStuInfo(@Param("userId") String userId);
|
||||
|
||||
/**
|
||||
* 学生列表重置密码
|
||||
* @param restPassWord
|
||||
* @return
|
||||
*/
|
||||
|
||||
ResultEntity restPwd(RestPassWordDTO restPassWord);
|
||||
}
|
Binary file not shown.
@ -0,0 +1,353 @@
|
||||
<?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.TchLoginLogMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.TchLoginLog">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="student_id" jdbcType="VARCHAR" property="studentId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="login_time_last" jdbcType="TIMESTAMP" property="loginTimeLast" />
|
||||
<result column="exit_time_last" jdbcType="TIMESTAMP" property="exitTimeLast" />
|
||||
<result column="login_duration" jdbcType="BIGINT" property="loginDuration" />
|
||||
<result column="online" jdbcType="TINYINT" property="online" />
|
||||
<result column="login_ip" jdbcType="VARCHAR" property="loginIp" />
|
||||
<result column="ip_owner_location" jdbcType="VARCHAR" property="ipOwnerLocation" />
|
||||
<result column="total_login_duration" jdbcType="BIGINT" property="totalLoginDuration" />
|
||||
<result column="total_login_days" jdbcType="INTEGER" property="totalLoginDays" />
|
||||
<result column="class_id" jdbcType="VARCHAR" property="classId" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="school_id" jdbcType="VARCHAR" property="schoolId" />
|
||||
</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">
|
||||
id, student_id, name, login_time_last, exit_time_last, login_duration, online, login_ip,
|
||||
ip_owner_location, total_login_duration, total_login_days, class_id, user_id, school_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.sztzjy.trade.entity.TchLoginLogExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from tch_login_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.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tch_login_log
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tch_login_log
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.sztzjy.trade.entity.TchLoginLogExample">
|
||||
delete from tch_login_log
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sztzjy.trade.entity.TchLoginLog">
|
||||
insert into tch_login_log (id, student_id, name,
|
||||
login_time_last, exit_time_last, login_duration,
|
||||
online, login_ip, ip_owner_location,
|
||||
total_login_duration, total_login_days, class_id,
|
||||
user_id, school_id)
|
||||
values (#{id,jdbcType=INTEGER}, #{studentId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{loginTimeLast,jdbcType=TIMESTAMP}, #{exitTimeLast,jdbcType=TIMESTAMP}, #{loginDuration,jdbcType=BIGINT},
|
||||
#{online,jdbcType=TINYINT}, #{loginIp,jdbcType=VARCHAR}, #{ipOwnerLocation,jdbcType=VARCHAR},
|
||||
#{totalLoginDuration,jdbcType=BIGINT}, #{totalLoginDays,jdbcType=INTEGER}, #{classId,jdbcType=VARCHAR},
|
||||
#{userId,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.TchLoginLog">
|
||||
insert into tch_login_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="studentId != null">
|
||||
student_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="loginTimeLast != null">
|
||||
login_time_last,
|
||||
</if>
|
||||
<if test="exitTimeLast != null">
|
||||
exit_time_last,
|
||||
</if>
|
||||
<if test="loginDuration != null">
|
||||
login_duration,
|
||||
</if>
|
||||
<if test="online != null">
|
||||
online,
|
||||
</if>
|
||||
<if test="loginIp != null">
|
||||
login_ip,
|
||||
</if>
|
||||
<if test="ipOwnerLocation != null">
|
||||
ip_owner_location,
|
||||
</if>
|
||||
<if test="totalLoginDuration != null">
|
||||
total_login_duration,
|
||||
</if>
|
||||
<if test="totalLoginDays != null">
|
||||
total_login_days,
|
||||
</if>
|
||||
<if test="classId != null">
|
||||
class_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
school_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="studentId != null">
|
||||
#{studentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="loginTimeLast != null">
|
||||
#{loginTimeLast,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="exitTimeLast != null">
|
||||
#{exitTimeLast,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="loginDuration != null">
|
||||
#{loginDuration,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="online != null">
|
||||
#{online,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="loginIp != null">
|
||||
#{loginIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ipOwnerLocation != null">
|
||||
#{ipOwnerLocation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="totalLoginDuration != null">
|
||||
#{totalLoginDuration,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="totalLoginDays != null">
|
||||
#{totalLoginDays,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classId != null">
|
||||
#{classId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
#{schoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.sztzjy.trade.entity.TchLoginLogExample" resultType="java.lang.Long">
|
||||
select count(*) from tch_login_log
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update tch_login_log
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.studentId != null">
|
||||
student_id = #{record.studentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.loginTimeLast != null">
|
||||
login_time_last = #{record.loginTimeLast,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.exitTimeLast != null">
|
||||
exit_time_last = #{record.exitTimeLast,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.loginDuration != null">
|
||||
login_duration = #{record.loginDuration,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.online != null">
|
||||
online = #{record.online,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="record.loginIp != null">
|
||||
login_ip = #{record.loginIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.ipOwnerLocation != null">
|
||||
ip_owner_location = #{record.ipOwnerLocation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.totalLoginDuration != null">
|
||||
total_login_duration = #{record.totalLoginDuration,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.totalLoginDays != null">
|
||||
total_login_days = #{record.totalLoginDays,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.classId != null">
|
||||
class_id = #{record.classId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.schoolId != null">
|
||||
school_id = #{record.schoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update tch_login_log
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
student_id = #{record.studentId,jdbcType=VARCHAR},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
login_time_last = #{record.loginTimeLast,jdbcType=TIMESTAMP},
|
||||
exit_time_last = #{record.exitTimeLast,jdbcType=TIMESTAMP},
|
||||
login_duration = #{record.loginDuration,jdbcType=BIGINT},
|
||||
online = #{record.online,jdbcType=TINYINT},
|
||||
login_ip = #{record.loginIp,jdbcType=VARCHAR},
|
||||
ip_owner_location = #{record.ipOwnerLocation,jdbcType=VARCHAR},
|
||||
total_login_duration = #{record.totalLoginDuration,jdbcType=BIGINT},
|
||||
total_login_days = #{record.totalLoginDays,jdbcType=INTEGER},
|
||||
class_id = #{record.classId,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
school_id = #{record.schoolId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.trade.entity.TchLoginLog">
|
||||
update tch_login_log
|
||||
<set>
|
||||
<if test="studentId != null">
|
||||
student_id = #{studentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="loginTimeLast != null">
|
||||
login_time_last = #{loginTimeLast,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="exitTimeLast != null">
|
||||
exit_time_last = #{exitTimeLast,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="loginDuration != null">
|
||||
login_duration = #{loginDuration,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="online != null">
|
||||
online = #{online,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="loginIp != null">
|
||||
login_ip = #{loginIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ipOwnerLocation != null">
|
||||
ip_owner_location = #{ipOwnerLocation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="totalLoginDuration != null">
|
||||
total_login_duration = #{totalLoginDuration,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="totalLoginDays != null">
|
||||
total_login_days = #{totalLoginDays,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classId != null">
|
||||
class_id = #{classId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
school_id = #{schoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.trade.entity.TchLoginLog">
|
||||
update tch_login_log
|
||||
set student_id = #{studentId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
login_time_last = #{loginTimeLast,jdbcType=TIMESTAMP},
|
||||
exit_time_last = #{exitTimeLast,jdbcType=TIMESTAMP},
|
||||
login_duration = #{loginDuration,jdbcType=BIGINT},
|
||||
online = #{online,jdbcType=TINYINT},
|
||||
login_ip = #{loginIp,jdbcType=VARCHAR},
|
||||
ip_owner_location = #{ipOwnerLocation,jdbcType=VARCHAR},
|
||||
total_login_duration = #{totalLoginDuration,jdbcType=BIGINT},
|
||||
total_login_days = #{totalLoginDays,jdbcType=INTEGER},
|
||||
class_id = #{classId,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
school_id = #{schoolId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue