From 85b21aa1b53e202fc43b871d34179fcce7bfebc8 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Thu, 14 Mar 2024 17:41:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=92=8Cmapper=20xml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tea/TeaExamManageController.java | 153 +++ .../controller/tea/UserController.java | 47 +- .../financial_bigdata/entity/SysLog.java | 155 --- .../entity/SysLogExample.java | 990 ------------------ .../financial_bigdata/entity/SysLoginLog.java | 100 ++ .../entity/SysLoginLogExample.java | 767 ++++++++++++++ .../entity/TeaExamManage.java | 11 + .../entity/TeaExamManageExample.java | 70 ++ .../entity/tea_dto/TeaExamManageCountDto.java | 22 + .../entity/tea_dto/TeaExamManageDto.java | 79 ++ .../mapper/StuClassMapper.java | 2 +- .../mapper/StuUserMapper.java | 2 +- .../mapper/SysLogMapper.java | 36 - .../mapper/SysLoginLogMapper.java | 32 + .../mapper/SysObjectiveQuestionMapper.java | 6 + .../mapper/TeaExamManageMapper.java | 4 +- .../service/tea/ITeaExamManageService.java | 13 + .../service/tea/ITeaUserService.java | 17 + .../tea/impl/TeaExamManageServiceImpl.java | 66 ++ .../service/tea/impl/TeaUserServiceImpl.java | 87 ++ src/main/resources/mapper/SysLogMapper.xml | 394 ------- .../resources/mapper/SysLoginLogMapper.xml | 258 +++++ .../resources/mapper/TeaExamManageMapper.xml | 38 +- 23 files changed, 1755 insertions(+), 1594 deletions(-) create mode 100644 src/main/java/com/sztzjy/financial_bigdata/controller/tea/TeaExamManageController.java delete mode 100644 src/main/java/com/sztzjy/financial_bigdata/entity/SysLog.java delete mode 100644 src/main/java/com/sztzjy/financial_bigdata/entity/SysLogExample.java create mode 100644 src/main/java/com/sztzjy/financial_bigdata/entity/SysLoginLog.java create mode 100644 src/main/java/com/sztzjy/financial_bigdata/entity/SysLoginLogExample.java create mode 100644 src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TeaExamManageCountDto.java create mode 100644 src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TeaExamManageDto.java delete mode 100644 src/main/java/com/sztzjy/financial_bigdata/mapper/SysLogMapper.java create mode 100644 src/main/java/com/sztzjy/financial_bigdata/mapper/SysLoginLogMapper.java create mode 100644 src/main/java/com/sztzjy/financial_bigdata/service/tea/ITeaExamManageService.java create mode 100644 src/main/java/com/sztzjy/financial_bigdata/service/tea/ITeaUserService.java create mode 100644 src/main/java/com/sztzjy/financial_bigdata/service/tea/impl/TeaExamManageServiceImpl.java create mode 100644 src/main/java/com/sztzjy/financial_bigdata/service/tea/impl/TeaUserServiceImpl.java delete mode 100644 src/main/resources/mapper/SysLogMapper.xml create mode 100644 src/main/resources/mapper/SysLoginLogMapper.xml diff --git a/src/main/java/com/sztzjy/financial_bigdata/controller/tea/TeaExamManageController.java b/src/main/java/com/sztzjy/financial_bigdata/controller/tea/TeaExamManageController.java new file mode 100644 index 0000000..5d4428e --- /dev/null +++ b/src/main/java/com/sztzjy/financial_bigdata/controller/tea/TeaExamManageController.java @@ -0,0 +1,153 @@ +package com.sztzjy.financial_bigdata.controller.tea; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.sztzjy.financial_bigdata.annotation.AnonymousAccess; +import com.sztzjy.financial_bigdata.entity.SysObjectiveQuestion; +import com.sztzjy.financial_bigdata.entity.TeaExamManage; +import com.sztzjy.financial_bigdata.entity.TeaExamManageExample; +import com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs; +import com.sztzjy.financial_bigdata.entity.tea_dto.TeaExamManageCountDto; +import com.sztzjy.financial_bigdata.entity.tea_dto.TeaExamManageDto; +import com.sztzjy.financial_bigdata.mapper.SysObjectiveQuestionMapper; +import com.sztzjy.financial_bigdata.mapper.TeaExamManageMapper; +import com.sztzjy.financial_bigdata.service.tea.ITeaExamManageService; +import com.sztzjy.financial_bigdata.util.ResultEntity; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; +import java.util.*; + +/** + * @Author xcj + * @Date 2024/3/14 + */ +@RestController +@RequestMapping("/tea/exam") +@Api(tags = "老师端--考试管理") +public class TeaExamManageController { + @Autowired + private ITeaExamManageService examManageService; + @Autowired + private SysObjectiveQuestionMapper sysObjectiveQuestionMapper; + @Autowired + private TeaExamManageMapper teaExamManageMapper; + + + @AnonymousAccess + @PostMapping("/getSelectCountAndScore") + @ApiOperation("新增考试管理--获取选题量和分数") + public ResultEntity<Map<Integer, BigDecimal>> getsingleId(@RequestParam @ApiParam("所有ID用,隔开一次传过来") String ids) { + List<String> idList = new ArrayList<>(Arrays.asList(ids.split(","))); + Map<Integer, BigDecimal> map = new HashMap<>(); + int i = 0; + BigDecimal score = BigDecimal.ZERO; + for (String id : idList) { + SysObjectiveQuestion sysObjectiveQuestion = sysObjectiveQuestionMapper.selectByPrimaryKey(id); + i++; + score = sysObjectiveQuestion.getScore().add(score); + } + map.put(i, score); + return new ResultEntity<>(map); + } + + + @AnonymousAccess + @PostMapping("/getAllCount") + @ApiOperation("考试管理--获取题目总数量") + public ResultEntity<TeaExamManageCountDto> getAllCount(@RequestParam String schoolId) { + TeaExamManageCountDto teaExamManageCountDto = sysObjectiveQuestionMapper.selectAllCount(schoolId); + return new ResultEntity<TeaExamManageCountDto>(teaExamManageCountDto); + } + + + @PostMapping("/addExam") + @ApiOperation("考试管理--新增考试") + public ResultEntity<HttpStatus> addExam(@ModelAttribute @ApiParam("file传图片/时间传年月日时分秒") TeaExamManageDto teaExamManagedto) { + return examManageService.addExam(teaExamManagedto); + } + + + @PostMapping("/selectExam") + @ApiOperation("考试管理--查询考试列表") + public ResultEntity<PageInfo> selectExam(@RequestParam Integer index, + @RequestParam Integer size, + @RequestParam(required = false) @ApiParam("考试名称") String examName, + @RequestParam String schoolId) { + PageHelper.startPage(index, size); + TeaExamManageExample teaExamManageExample = new TeaExamManageExample(); + TeaExamManageExample.Criteria criteria = teaExamManageExample.createCriteria(); + criteria.andSchoolIdEqualTo(schoolId); + if (StringUtils.isNotBlank(examName)) { + criteria.andExamNameEqualTo(examName); + } + List<TeaExamManageWithBLOBs> teaExamManageWithBLOBs = teaExamManageMapper.selectByExampleWithBLOBs(teaExamManageExample); + Date currentTime = new Date(); + + for (TeaExamManageWithBLOBs teaExamManageWithBLOB : teaExamManageWithBLOBs) { + Date startTime = teaExamManageWithBLOB.getStartTime(); + Date endTime = teaExamManageWithBLOB.getEndTime(); + + if (currentTime.before(startTime)) { + // 当前时间早于开始时间,表示“未开始” + teaExamManageWithBLOB.setExamDescription("未开始"); + } else if (currentTime.after(endTime)) { + // 当前时间晚于结束时间,表示“已结束” + teaExamManageWithBLOB.setExamDescription("已结束"); + } else { + // 当前时间在开始时间和结束时间之间,表示“进行中” + teaExamManageWithBLOB.setExamDescription("进行中"); + } + } + return new ResultEntity<>(new PageInfo(teaExamManageWithBLOBs)); + } + + @PostMapping("/updateExam") + @ApiOperation("考试管理--编辑") + public ResultEntity<HttpStatus> updateExam(@RequestBody(required = false)@ApiParam("ID必传") TeaExamManageWithBLOBs examManage) { + if (StringUtils.isBlank(examManage.getExamManageId())){ + return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST,"缺少必须的主键ID!"); + } + teaExamManageMapper.updateByPrimaryKeyWithBLOBs(examManage); + return new ResultEntity<HttpStatus>(HttpStatus.OK,"修改成功!"); + } + + @PostMapping("/selectExam") + @ApiOperation("考试管理--预览") + public ResultEntity<TeaExamManage> selectExam(@RequestParam String examId) { + return new ResultEntity<TeaExamManage>(teaExamManageMapper.selectByPrimaryKey(examId)); + } + + @PostMapping("/deleteExam") + @ApiOperation("考试管理--删除") + public ResultEntity<HttpStatus> deleteExam(@RequestParam String examId) { + teaExamManageMapper.deleteByPrimaryKey(examId); + return new ResultEntity<HttpStatus>(HttpStatus.OK,"删除成功!"); + } + + @PostMapping("/reloadExamById") + @ApiOperation("考试管理--指定人重考") + public ResultEntity reloadExamById(@RequestParam String examId) { + return null; + } +} + + + + + + + + + + + + + + diff --git a/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java b/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java index 7627a4a..d7a62d2 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java +++ b/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java @@ -4,13 +4,11 @@ import cn.hutool.core.util.IdUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.sztzjy.financial_bigdata.annotation.AnonymousAccess; -import com.sztzjy.financial_bigdata.entity.StuClass; -import com.sztzjy.financial_bigdata.entity.StuClassExample; -import com.sztzjy.financial_bigdata.entity.StuUser; -import com.sztzjy.financial_bigdata.entity.StuUserExample; +import com.sztzjy.financial_bigdata.entity.*; import com.sztzjy.financial_bigdata.entity.stu_dto.StuUserDto; import com.sztzjy.financial_bigdata.mapper.StuClassMapper; import com.sztzjy.financial_bigdata.mapper.StuUserMapper; +import com.sztzjy.financial_bigdata.service.tea.ITeaUserService; import com.sztzjy.financial_bigdata.util.ResultEntity; import com.sztzjy.financial_bigdata.util.excel.FilePortUtil; import io.swagger.annotations.Api; @@ -40,6 +38,19 @@ public class UserController { private StuClassMapper classMapper; @Autowired private StuUserMapper stuUserMapper; + @Autowired + private ITeaUserService userService; + + + + @PostMapping("/login") + @ApiOperation("登录接口") + public ResultEntity login() { //todo 保存日志/与智云打通 + return null; + } + + + /* 添加班级 * @author xcj * @Date 2024/3/11 @@ -150,6 +161,13 @@ public class UserController { return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功"); } + + @PostMapping("/batchImportStu") + @ApiOperation("学生管理--批量导入学生") + public void batchImport() { //todo 学生管理--批量导入学生 + } + + /* * @author xcj * @Date 2024/3/12 @@ -277,10 +295,25 @@ public class UserController { } + @AnonymousAccess + @PostMapping("/selectLogs") + @ApiOperation("学生管理--日志查询") + public ResultEntity<PageInfo<SysLoginLog>> selectLogs(@RequestParam Integer index, + @RequestParam Integer size, + @RequestParam String schoolId, + @RequestParam(required = false) String studentId, + @RequestParam(required = false) String classId) { + return userService.selectLogs(index, size, schoolId, studentId, classId); + } + @AnonymousAccess - @PostMapping("/batchImportStu") - @ApiOperation("学生管理--批量导入") - public void batchImportStu() { + @PostMapping("/logExport") + @ApiOperation("学生管理--日志查导出") + public void logExport(HttpServletResponse response, + @RequestParam String schoolId, + @RequestParam(required = false) String studentId, + @RequestParam(required = false) String classId) { + userService.logExport(response,schoolId, studentId, classId); } } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/entity/SysLog.java b/src/main/java/com/sztzjy/financial_bigdata/entity/SysLog.java deleted file mode 100644 index 06a40d5..0000000 --- a/src/main/java/com/sztzjy/financial_bigdata/entity/SysLog.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.sztzjy.financial_bigdata.entity; - -import java.util.Date; - -import io.swagger.annotations.ApiModelProperty; -/** - * 用户登录日志表 - * - * @author xcj - * sys_log - */ -public class SysLog { - @ApiModelProperty("ID") - private Long id; - - @ApiModelProperty("方法") - private String method; - - @ApiModelProperty("请求地址") - private String requestUrl; - - @ApiModelProperty("请求参数") - private String params; - - @ApiModelProperty("IP") - private String ip; - - @ApiModelProperty("创建时间") - private Date createTime; - - @ApiModelProperty("响应时间") - private Date resultTime; - - @ApiModelProperty("token") - private String token; - - @ApiModelProperty("学生ID") - private Long studentId; - - @ApiModelProperty("session") - private String session; - - @ApiModelProperty("管理员或教师ID") - private Long userId; - - @ApiModelProperty("微信ID") - private String openId; - - @ApiModelProperty("结果") - private String result; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getMethod() { - return method; - } - - public void setMethod(String method) { - this.method = method == null ? null : method.trim(); - } - - public String getRequestUrl() { - return requestUrl; - } - - public void setRequestUrl(String requestUrl) { - this.requestUrl = requestUrl == null ? null : requestUrl.trim(); - } - - public String getParams() { - return params; - } - - public void setParams(String params) { - this.params = params == null ? null : params.trim(); - } - - public String getIp() { - return ip; - } - - public void setIp(String ip) { - this.ip = ip == null ? null : ip.trim(); - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getResultTime() { - return resultTime; - } - - public void setResultTime(Date resultTime) { - this.resultTime = resultTime; - } - - public String getToken() { - return token; - } - - public void setToken(String token) { - this.token = token == null ? null : token.trim(); - } - - public Long getStudentId() { - return studentId; - } - - public void setStudentId(Long studentId) { - this.studentId = studentId; - } - - public String getSession() { - return session; - } - - public void setSession(String session) { - this.session = session == null ? null : session.trim(); - } - - public Long getUserId() { - return userId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public String getOpenId() { - return openId; - } - - public void setOpenId(String openId) { - this.openId = openId == null ? null : openId.trim(); - } - - public String getResult() { - return result; - } - - public void setResult(String result) { - this.result = result == null ? null : result.trim(); - } -} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/entity/SysLogExample.java b/src/main/java/com/sztzjy/financial_bigdata/entity/SysLogExample.java deleted file mode 100644 index 440668c..0000000 --- a/src/main/java/com/sztzjy/financial_bigdata/entity/SysLogExample.java +++ /dev/null @@ -1,990 +0,0 @@ -package com.sztzjy.financial_bigdata.entity; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class SysLogExample { - protected String orderByClause; - - protected boolean distinct; - - protected List<Criteria> oredCriteria; - - public SysLogExample() { - oredCriteria = new ArrayList<>(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List<Criteria> getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List<Criterion> criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList<>(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List<Criterion> getAllCriteria() { - return criteria; - } - - public List<Criterion> getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List<Long> values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List<Long> values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andMethodIsNull() { - addCriterion("method is null"); - return (Criteria) this; - } - - public Criteria andMethodIsNotNull() { - addCriterion("method is not null"); - return (Criteria) this; - } - - public Criteria andMethodEqualTo(String value) { - addCriterion("method =", value, "method"); - return (Criteria) this; - } - - public Criteria andMethodNotEqualTo(String value) { - addCriterion("method <>", value, "method"); - return (Criteria) this; - } - - public Criteria andMethodGreaterThan(String value) { - addCriterion("method >", value, "method"); - return (Criteria) this; - } - - public Criteria andMethodGreaterThanOrEqualTo(String value) { - addCriterion("method >=", value, "method"); - return (Criteria) this; - } - - public Criteria andMethodLessThan(String value) { - addCriterion("method <", value, "method"); - return (Criteria) this; - } - - public Criteria andMethodLessThanOrEqualTo(String value) { - addCriterion("method <=", value, "method"); - return (Criteria) this; - } - - public Criteria andMethodLike(String value) { - addCriterion("method like", value, "method"); - return (Criteria) this; - } - - public Criteria andMethodNotLike(String value) { - addCriterion("method not like", value, "method"); - return (Criteria) this; - } - - public Criteria andMethodIn(List<String> values) { - addCriterion("method in", values, "method"); - return (Criteria) this; - } - - public Criteria andMethodNotIn(List<String> values) { - addCriterion("method not in", values, "method"); - return (Criteria) this; - } - - public Criteria andMethodBetween(String value1, String value2) { - addCriterion("method between", value1, value2, "method"); - return (Criteria) this; - } - - public Criteria andMethodNotBetween(String value1, String value2) { - addCriterion("method not between", value1, value2, "method"); - return (Criteria) this; - } - - public Criteria andRequestUrlIsNull() { - addCriterion("request_url is null"); - return (Criteria) this; - } - - public Criteria andRequestUrlIsNotNull() { - addCriterion("request_url is not null"); - return (Criteria) this; - } - - public Criteria andRequestUrlEqualTo(String value) { - addCriterion("request_url =", value, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlNotEqualTo(String value) { - addCriterion("request_url <>", value, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlGreaterThan(String value) { - addCriterion("request_url >", value, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlGreaterThanOrEqualTo(String value) { - addCriterion("request_url >=", value, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlLessThan(String value) { - addCriterion("request_url <", value, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlLessThanOrEqualTo(String value) { - addCriterion("request_url <=", value, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlLike(String value) { - addCriterion("request_url like", value, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlNotLike(String value) { - addCriterion("request_url not like", value, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlIn(List<String> values) { - addCriterion("request_url in", values, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlNotIn(List<String> values) { - addCriterion("request_url not in", values, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlBetween(String value1, String value2) { - addCriterion("request_url between", value1, value2, "requestUrl"); - return (Criteria) this; - } - - public Criteria andRequestUrlNotBetween(String value1, String value2) { - addCriterion("request_url not between", value1, value2, "requestUrl"); - return (Criteria) this; - } - - public Criteria andParamsIsNull() { - addCriterion("params is null"); - return (Criteria) this; - } - - public Criteria andParamsIsNotNull() { - addCriterion("params is not null"); - return (Criteria) this; - } - - public Criteria andParamsEqualTo(String value) { - addCriterion("params =", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsNotEqualTo(String value) { - addCriterion("params <>", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsGreaterThan(String value) { - addCriterion("params >", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsGreaterThanOrEqualTo(String value) { - addCriterion("params >=", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsLessThan(String value) { - addCriterion("params <", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsLessThanOrEqualTo(String value) { - addCriterion("params <=", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsLike(String value) { - addCriterion("params like", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsNotLike(String value) { - addCriterion("params not like", value, "params"); - return (Criteria) this; - } - - public Criteria andParamsIn(List<String> values) { - addCriterion("params in", values, "params"); - return (Criteria) this; - } - - public Criteria andParamsNotIn(List<String> values) { - addCriterion("params not in", values, "params"); - return (Criteria) this; - } - - public Criteria andParamsBetween(String value1, String value2) { - addCriterion("params between", value1, value2, "params"); - return (Criteria) this; - } - - public Criteria andParamsNotBetween(String value1, String value2) { - addCriterion("params not between", value1, value2, "params"); - return (Criteria) this; - } - - public Criteria andIpIsNull() { - addCriterion("ip is null"); - return (Criteria) this; - } - - public Criteria andIpIsNotNull() { - addCriterion("ip is not null"); - return (Criteria) this; - } - - public Criteria andIpEqualTo(String value) { - addCriterion("ip =", value, "ip"); - return (Criteria) this; - } - - public Criteria andIpNotEqualTo(String value) { - addCriterion("ip <>", value, "ip"); - return (Criteria) this; - } - - public Criteria andIpGreaterThan(String value) { - addCriterion("ip >", value, "ip"); - return (Criteria) this; - } - - public Criteria andIpGreaterThanOrEqualTo(String value) { - addCriterion("ip >=", value, "ip"); - return (Criteria) this; - } - - public Criteria andIpLessThan(String value) { - addCriterion("ip <", value, "ip"); - return (Criteria) this; - } - - public Criteria andIpLessThanOrEqualTo(String value) { - addCriterion("ip <=", value, "ip"); - return (Criteria) this; - } - - public Criteria andIpLike(String value) { - addCriterion("ip like", value, "ip"); - return (Criteria) this; - } - - public Criteria andIpNotLike(String value) { - addCriterion("ip not like", value, "ip"); - return (Criteria) this; - } - - public Criteria andIpIn(List<String> values) { - addCriterion("ip in", values, "ip"); - return (Criteria) this; - } - - public Criteria andIpNotIn(List<String> values) { - addCriterion("ip not in", values, "ip"); - return (Criteria) this; - } - - public Criteria andIpBetween(String value1, String value2) { - addCriterion("ip between", value1, value2, "ip"); - return (Criteria) this; - } - - public Criteria andIpNotBetween(String value1, String value2) { - addCriterion("ip not between", value1, value2, "ip"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("create_time is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("create_time is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("create_time =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("create_time <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("create_time >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("create_time >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("create_time <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("create_time <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List<Date> values) { - addCriterion("create_time in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List<Date> values) { - addCriterion("create_time not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("create_time between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("create_time not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andResultTimeIsNull() { - addCriterion("result_time is null"); - return (Criteria) this; - } - - public Criteria andResultTimeIsNotNull() { - addCriterion("result_time is not null"); - return (Criteria) this; - } - - public Criteria andResultTimeEqualTo(Date value) { - addCriterion("result_time =", value, "resultTime"); - return (Criteria) this; - } - - public Criteria andResultTimeNotEqualTo(Date value) { - addCriterion("result_time <>", value, "resultTime"); - return (Criteria) this; - } - - public Criteria andResultTimeGreaterThan(Date value) { - addCriterion("result_time >", value, "resultTime"); - return (Criteria) this; - } - - public Criteria andResultTimeGreaterThanOrEqualTo(Date value) { - addCriterion("result_time >=", value, "resultTime"); - return (Criteria) this; - } - - public Criteria andResultTimeLessThan(Date value) { - addCriterion("result_time <", value, "resultTime"); - return (Criteria) this; - } - - public Criteria andResultTimeLessThanOrEqualTo(Date value) { - addCriterion("result_time <=", value, "resultTime"); - return (Criteria) this; - } - - public Criteria andResultTimeIn(List<Date> values) { - addCriterion("result_time in", values, "resultTime"); - return (Criteria) this; - } - - public Criteria andResultTimeNotIn(List<Date> values) { - addCriterion("result_time not in", values, "resultTime"); - return (Criteria) this; - } - - public Criteria andResultTimeBetween(Date value1, Date value2) { - addCriterion("result_time between", value1, value2, "resultTime"); - return (Criteria) this; - } - - public Criteria andResultTimeNotBetween(Date value1, Date value2) { - addCriterion("result_time not between", value1, value2, "resultTime"); - return (Criteria) this; - } - - public Criteria andTokenIsNull() { - addCriterion("token is null"); - return (Criteria) this; - } - - public Criteria andTokenIsNotNull() { - addCriterion("token is not null"); - return (Criteria) this; - } - - public Criteria andTokenEqualTo(String value) { - addCriterion("token =", value, "token"); - return (Criteria) this; - } - - public Criteria andTokenNotEqualTo(String value) { - addCriterion("token <>", value, "token"); - return (Criteria) this; - } - - public Criteria andTokenGreaterThan(String value) { - addCriterion("token >", value, "token"); - return (Criteria) this; - } - - public Criteria andTokenGreaterThanOrEqualTo(String value) { - addCriterion("token >=", value, "token"); - return (Criteria) this; - } - - public Criteria andTokenLessThan(String value) { - addCriterion("token <", value, "token"); - return (Criteria) this; - } - - public Criteria andTokenLessThanOrEqualTo(String value) { - addCriterion("token <=", value, "token"); - return (Criteria) this; - } - - public Criteria andTokenLike(String value) { - addCriterion("token like", value, "token"); - return (Criteria) this; - } - - public Criteria andTokenNotLike(String value) { - addCriterion("token not like", value, "token"); - return (Criteria) this; - } - - public Criteria andTokenIn(List<String> values) { - addCriterion("token in", values, "token"); - return (Criteria) this; - } - - public Criteria andTokenNotIn(List<String> values) { - addCriterion("token not in", values, "token"); - return (Criteria) this; - } - - public Criteria andTokenBetween(String value1, String value2) { - addCriterion("token between", value1, value2, "token"); - return (Criteria) this; - } - - public Criteria andTokenNotBetween(String value1, String value2) { - addCriterion("token not between", value1, value2, "token"); - return (Criteria) this; - } - - public Criteria andStudentIdIsNull() { - addCriterion("student_id is null"); - return (Criteria) this; - } - - public Criteria andStudentIdIsNotNull() { - addCriterion("student_id is not null"); - return (Criteria) this; - } - - public Criteria andStudentIdEqualTo(Long value) { - addCriterion("student_id =", value, "studentId"); - return (Criteria) this; - } - - public Criteria andStudentIdNotEqualTo(Long value) { - addCriterion("student_id <>", value, "studentId"); - return (Criteria) this; - } - - public Criteria andStudentIdGreaterThan(Long value) { - addCriterion("student_id >", value, "studentId"); - return (Criteria) this; - } - - public Criteria andStudentIdGreaterThanOrEqualTo(Long value) { - addCriterion("student_id >=", value, "studentId"); - return (Criteria) this; - } - - public Criteria andStudentIdLessThan(Long value) { - addCriterion("student_id <", value, "studentId"); - return (Criteria) this; - } - - public Criteria andStudentIdLessThanOrEqualTo(Long value) { - addCriterion("student_id <=", value, "studentId"); - return (Criteria) this; - } - - public Criteria andStudentIdIn(List<Long> values) { - addCriterion("student_id in", values, "studentId"); - return (Criteria) this; - } - - public Criteria andStudentIdNotIn(List<Long> values) { - addCriterion("student_id not in", values, "studentId"); - return (Criteria) this; - } - - public Criteria andStudentIdBetween(Long value1, Long value2) { - addCriterion("student_id between", value1, value2, "studentId"); - return (Criteria) this; - } - - public Criteria andStudentIdNotBetween(Long value1, Long value2) { - addCriterion("student_id not between", value1, value2, "studentId"); - return (Criteria) this; - } - - public Criteria andSessionIsNull() { - addCriterion("session is null"); - return (Criteria) this; - } - - public Criteria andSessionIsNotNull() { - addCriterion("session is not null"); - return (Criteria) this; - } - - public Criteria andSessionEqualTo(String value) { - addCriterion("session =", value, "session"); - return (Criteria) this; - } - - public Criteria andSessionNotEqualTo(String value) { - addCriterion("session <>", value, "session"); - return (Criteria) this; - } - - public Criteria andSessionGreaterThan(String value) { - addCriterion("session >", value, "session"); - return (Criteria) this; - } - - public Criteria andSessionGreaterThanOrEqualTo(String value) { - addCriterion("session >=", value, "session"); - return (Criteria) this; - } - - public Criteria andSessionLessThan(String value) { - addCriterion("session <", value, "session"); - return (Criteria) this; - } - - public Criteria andSessionLessThanOrEqualTo(String value) { - addCriterion("session <=", value, "session"); - return (Criteria) this; - } - - public Criteria andSessionLike(String value) { - addCriterion("session like", value, "session"); - return (Criteria) this; - } - - public Criteria andSessionNotLike(String value) { - addCriterion("session not like", value, "session"); - return (Criteria) this; - } - - public Criteria andSessionIn(List<String> values) { - addCriterion("session in", values, "session"); - return (Criteria) this; - } - - public Criteria andSessionNotIn(List<String> values) { - addCriterion("session not in", values, "session"); - return (Criteria) this; - } - - public Criteria andSessionBetween(String value1, String value2) { - addCriterion("session between", value1, value2, "session"); - return (Criteria) this; - } - - public Criteria andSessionNotBetween(String value1, String value2) { - addCriterion("session not between", value1, value2, "session"); - return (Criteria) this; - } - - public Criteria andUserIdIsNull() { - addCriterion("user_id is null"); - return (Criteria) this; - } - - public Criteria andUserIdIsNotNull() { - addCriterion("user_id is not null"); - return (Criteria) this; - } - - public Criteria andUserIdEqualTo(Long value) { - addCriterion("user_id =", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotEqualTo(Long value) { - addCriterion("user_id <>", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdGreaterThan(Long value) { - addCriterion("user_id >", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdGreaterThanOrEqualTo(Long value) { - addCriterion("user_id >=", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdLessThan(Long value) { - addCriterion("user_id <", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdLessThanOrEqualTo(Long value) { - addCriterion("user_id <=", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdIn(List<Long> values) { - addCriterion("user_id in", values, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotIn(List<Long> values) { - addCriterion("user_id not in", values, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdBetween(Long value1, Long value2) { - addCriterion("user_id between", value1, value2, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotBetween(Long value1, Long value2) { - addCriterion("user_id not between", value1, value2, "userId"); - return (Criteria) this; - } - - public Criteria andOpenIdIsNull() { - addCriterion("open_id is null"); - return (Criteria) this; - } - - public Criteria andOpenIdIsNotNull() { - addCriterion("open_id is not null"); - return (Criteria) this; - } - - public Criteria andOpenIdEqualTo(String value) { - addCriterion("open_id =", value, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdNotEqualTo(String value) { - addCriterion("open_id <>", value, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdGreaterThan(String value) { - addCriterion("open_id >", value, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdGreaterThanOrEqualTo(String value) { - addCriterion("open_id >=", value, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdLessThan(String value) { - addCriterion("open_id <", value, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdLessThanOrEqualTo(String value) { - addCriterion("open_id <=", value, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdLike(String value) { - addCriterion("open_id like", value, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdNotLike(String value) { - addCriterion("open_id not like", value, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdIn(List<String> values) { - addCriterion("open_id in", values, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdNotIn(List<String> values) { - addCriterion("open_id not in", values, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdBetween(String value1, String value2) { - addCriterion("open_id between", value1, value2, "openId"); - return (Criteria) this; - } - - public Criteria andOpenIdNotBetween(String value1, String value2) { - addCriterion("open_id not between", value1, value2, "openId"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List<?>) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/entity/SysLoginLog.java b/src/main/java/com/sztzjy/financial_bigdata/entity/SysLoginLog.java new file mode 100644 index 0000000..80c3de8 --- /dev/null +++ b/src/main/java/com/sztzjy/financial_bigdata/entity/SysLoginLog.java @@ -0,0 +1,100 @@ +package com.sztzjy.financial_bigdata.entity; + +import java.util.Date; + +import io.swagger.annotations.ApiModelProperty; +/** + * 用户登录日志表 + * + * @author xcj + * sys_login_log + */ +public class SysLoginLog { + @ApiModelProperty("日志ID") + private String logId; + + @ApiModelProperty("用户ID") + private String userid; + + @ApiModelProperty("姓名") + private String name; + + @ApiModelProperty("学号") + private String studentId; + + @ApiModelProperty("登录时间") + private Date loginTime; + + @ApiModelProperty("登录时长") + private Date loginDuration; + + @ApiModelProperty("登录IP") + private String loginIp; + + @ApiModelProperty("IP地址") + private String ipAddress; + + public String getLogId() { + return logId; + } + + public void setLogId(String logId) { + this.logId = logId == null ? null : logId.trim(); + } + + public String getUserid() { + return userid; + } + + public void setUserid(String userid) { + this.userid = userid == null ? null : userid.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getStudentId() { + return studentId; + } + + public void setStudentId(String studentId) { + this.studentId = studentId == null ? null : studentId.trim(); + } + + public Date getLoginTime() { + return loginTime; + } + + public void setLoginTime(Date loginTime) { + this.loginTime = loginTime; + } + + public Date getLoginDuration() { + return loginDuration; + } + + public void setLoginDuration(Date loginDuration) { + this.loginDuration = loginDuration; + } + + public String getLoginIp() { + return loginIp; + } + + public void setLoginIp(String loginIp) { + this.loginIp = loginIp == null ? null : loginIp.trim(); + } + + public String getIpAddress() { + return ipAddress; + } + + public void setIpAddress(String ipAddress) { + this.ipAddress = ipAddress == null ? null : ipAddress.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/entity/SysLoginLogExample.java b/src/main/java/com/sztzjy/financial_bigdata/entity/SysLoginLogExample.java new file mode 100644 index 0000000..2b13299 --- /dev/null +++ b/src/main/java/com/sztzjy/financial_bigdata/entity/SysLoginLogExample.java @@ -0,0 +1,767 @@ +package com.sztzjy.financial_bigdata.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +public class SysLoginLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List<Criteria> oredCriteria; + + public SysLoginLogExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List<Criteria> getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List<Criterion> criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List<Criterion> getAllCriteria() { + return criteria; + } + + public List<Criterion> getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + protected void addCriterionForJDBCTime(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Time(value.getTime()), property); + } + + protected void addCriterionForJDBCTime(String condition, List<Date> values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List<java.sql.Time> timeList = new ArrayList<>(); + Iterator<Date> iter = values.iterator(); + while (iter.hasNext()) { + timeList.add(new java.sql.Time(iter.next().getTime())); + } + addCriterion(condition, timeList, property); + } + + protected void addCriterionForJDBCTime(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Time(value1.getTime()), new java.sql.Time(value2.getTime()), property); + } + + public Criteria andLogIdIsNull() { + addCriterion("log_id is null"); + return (Criteria) this; + } + + public Criteria andLogIdIsNotNull() { + addCriterion("log_id is not null"); + return (Criteria) this; + } + + public Criteria andLogIdEqualTo(String value) { + addCriterion("log_id =", value, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdNotEqualTo(String value) { + addCriterion("log_id <>", value, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdGreaterThan(String value) { + addCriterion("log_id >", value, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdGreaterThanOrEqualTo(String value) { + addCriterion("log_id >=", value, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdLessThan(String value) { + addCriterion("log_id <", value, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdLessThanOrEqualTo(String value) { + addCriterion("log_id <=", value, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdLike(String value) { + addCriterion("log_id like", value, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdNotLike(String value) { + addCriterion("log_id not like", value, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdIn(List<String> values) { + addCriterion("log_id in", values, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdNotIn(List<String> values) { + addCriterion("log_id not in", values, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdBetween(String value1, String value2) { + addCriterion("log_id between", value1, value2, "logId"); + return (Criteria) this; + } + + public Criteria andLogIdNotBetween(String value1, String value2) { + addCriterion("log_id not between", value1, value2, "logId"); + return (Criteria) this; + } + + public Criteria andUseridIsNull() { + addCriterion("userid is null"); + return (Criteria) this; + } + + public Criteria andUseridIsNotNull() { + addCriterion("userid is not null"); + return (Criteria) this; + } + + public Criteria andUseridEqualTo(String value) { + addCriterion("userid =", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotEqualTo(String value) { + addCriterion("userid <>", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridGreaterThan(String value) { + addCriterion("userid >", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridGreaterThanOrEqualTo(String value) { + addCriterion("userid >=", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridLessThan(String value) { + addCriterion("userid <", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridLessThanOrEqualTo(String value) { + addCriterion("userid <=", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridLike(String value) { + addCriterion("userid like", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotLike(String value) { + addCriterion("userid not like", value, "userid"); + return (Criteria) this; + } + + public Criteria andUseridIn(List<String> values) { + addCriterion("userid in", values, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotIn(List<String> values) { + addCriterion("userid not in", values, "userid"); + return (Criteria) this; + } + + public Criteria andUseridBetween(String value1, String value2) { + addCriterion("userid between", value1, value2, "userid"); + return (Criteria) this; + } + + public Criteria andUseridNotBetween(String value1, String value2) { + addCriterion("userid not between", value1, value2, "userid"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List<String> values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List<String> values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andStudentIdIsNull() { + addCriterion("student_id is null"); + return (Criteria) this; + } + + public Criteria andStudentIdIsNotNull() { + addCriterion("student_id is not null"); + return (Criteria) this; + } + + public Criteria andStudentIdEqualTo(String value) { + addCriterion("student_id =", value, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdNotEqualTo(String value) { + addCriterion("student_id <>", value, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdGreaterThan(String value) { + addCriterion("student_id >", value, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdGreaterThanOrEqualTo(String value) { + addCriterion("student_id >=", value, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdLessThan(String value) { + addCriterion("student_id <", value, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdLessThanOrEqualTo(String value) { + addCriterion("student_id <=", value, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdLike(String value) { + addCriterion("student_id like", value, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdNotLike(String value) { + addCriterion("student_id not like", value, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdIn(List<String> values) { + addCriterion("student_id in", values, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdNotIn(List<String> values) { + addCriterion("student_id not in", values, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdBetween(String value1, String value2) { + addCriterion("student_id between", value1, value2, "studentId"); + return (Criteria) this; + } + + public Criteria andStudentIdNotBetween(String value1, String value2) { + addCriterion("student_id not between", value1, value2, "studentId"); + return (Criteria) this; + } + + public Criteria andLoginTimeIsNull() { + addCriterion("login_time is null"); + return (Criteria) this; + } + + public Criteria andLoginTimeIsNotNull() { + addCriterion("login_time is not null"); + return (Criteria) this; + } + + public Criteria andLoginTimeEqualTo(Date value) { + addCriterion("login_time =", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeNotEqualTo(Date value) { + addCriterion("login_time <>", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeGreaterThan(Date value) { + addCriterion("login_time >", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeGreaterThanOrEqualTo(Date value) { + addCriterion("login_time >=", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeLessThan(Date value) { + addCriterion("login_time <", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeLessThanOrEqualTo(Date value) { + addCriterion("login_time <=", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeIn(List<Date> values) { + addCriterion("login_time in", values, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeNotIn(List<Date> values) { + addCriterion("login_time not in", values, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeBetween(Date value1, Date value2) { + addCriterion("login_time between", value1, value2, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeNotBetween(Date value1, Date value2) { + addCriterion("login_time not between", value1, value2, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginDurationIsNull() { + addCriterion("login_duration is null"); + return (Criteria) this; + } + + public Criteria andLoginDurationIsNotNull() { + addCriterion("login_duration is not null"); + return (Criteria) this; + } + + public Criteria andLoginDurationEqualTo(Date value) { + addCriterionForJDBCTime("login_duration =", value, "loginDuration"); + return (Criteria) this; + } + + public Criteria andLoginDurationNotEqualTo(Date value) { + addCriterionForJDBCTime("login_duration <>", value, "loginDuration"); + return (Criteria) this; + } + + public Criteria andLoginDurationGreaterThan(Date value) { + addCriterionForJDBCTime("login_duration >", value, "loginDuration"); + return (Criteria) this; + } + + public Criteria andLoginDurationGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCTime("login_duration >=", value, "loginDuration"); + return (Criteria) this; + } + + public Criteria andLoginDurationLessThan(Date value) { + addCriterionForJDBCTime("login_duration <", value, "loginDuration"); + return (Criteria) this; + } + + public Criteria andLoginDurationLessThanOrEqualTo(Date value) { + addCriterionForJDBCTime("login_duration <=", value, "loginDuration"); + return (Criteria) this; + } + + public Criteria andLoginDurationIn(List<Date> values) { + addCriterionForJDBCTime("login_duration in", values, "loginDuration"); + return (Criteria) this; + } + + public Criteria andLoginDurationNotIn(List<Date> values) { + addCriterionForJDBCTime("login_duration not in", values, "loginDuration"); + return (Criteria) this; + } + + public Criteria andLoginDurationBetween(Date value1, Date value2) { + addCriterionForJDBCTime("login_duration between", value1, value2, "loginDuration"); + return (Criteria) this; + } + + public Criteria andLoginDurationNotBetween(Date value1, Date value2) { + addCriterionForJDBCTime("login_duration not between", value1, value2, "loginDuration"); + return (Criteria) this; + } + + public Criteria andLoginIpIsNull() { + addCriterion("login_ip is null"); + return (Criteria) this; + } + + public Criteria andLoginIpIsNotNull() { + addCriterion("login_ip is not null"); + return (Criteria) this; + } + + public Criteria andLoginIpEqualTo(String value) { + addCriterion("login_ip =", value, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpNotEqualTo(String value) { + addCriterion("login_ip <>", value, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpGreaterThan(String value) { + addCriterion("login_ip >", value, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpGreaterThanOrEqualTo(String value) { + addCriterion("login_ip >=", value, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpLessThan(String value) { + addCriterion("login_ip <", value, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpLessThanOrEqualTo(String value) { + addCriterion("login_ip <=", value, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpLike(String value) { + addCriterion("login_ip like", value, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpNotLike(String value) { + addCriterion("login_ip not like", value, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpIn(List<String> values) { + addCriterion("login_ip in", values, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpNotIn(List<String> values) { + addCriterion("login_ip not in", values, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpBetween(String value1, String value2) { + addCriterion("login_ip between", value1, value2, "loginIp"); + return (Criteria) this; + } + + public Criteria andLoginIpNotBetween(String value1, String value2) { + addCriterion("login_ip not between", value1, value2, "loginIp"); + return (Criteria) this; + } + + public Criteria andIpAddressIsNull() { + addCriterion("ip_address is null"); + return (Criteria) this; + } + + public Criteria andIpAddressIsNotNull() { + addCriterion("ip_address is not null"); + return (Criteria) this; + } + + public Criteria andIpAddressEqualTo(String value) { + addCriterion("ip_address =", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressNotEqualTo(String value) { + addCriterion("ip_address <>", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressGreaterThan(String value) { + addCriterion("ip_address >", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressGreaterThanOrEqualTo(String value) { + addCriterion("ip_address >=", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressLessThan(String value) { + addCriterion("ip_address <", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressLessThanOrEqualTo(String value) { + addCriterion("ip_address <=", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressLike(String value) { + addCriterion("ip_address like", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressNotLike(String value) { + addCriterion("ip_address not like", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressIn(List<String> values) { + addCriterion("ip_address in", values, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressNotIn(List<String> values) { + addCriterion("ip_address not in", values, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressBetween(String value1, String value2) { + addCriterion("ip_address between", value1, value2, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressNotBetween(String value1, String value2) { + addCriterion("ip_address not between", value1, value2, "ipAddress"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List<?>) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/entity/TeaExamManage.java b/src/main/java/com/sztzjy/financial_bigdata/entity/TeaExamManage.java index 1e147f7..2a2660d 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/entity/TeaExamManage.java +++ b/src/main/java/com/sztzjy/financial_bigdata/entity/TeaExamManage.java @@ -50,6 +50,9 @@ public class TeaExamManage { @ApiModelProperty("案例题分数") private BigDecimal caseScore; + @ApiModelProperty("学校ID") + private String schoolId; + public String getExamManageId() { return examManageId; } @@ -153,4 +156,12 @@ public class TeaExamManage { public void setCaseScore(BigDecimal caseScore) { this.caseScore = caseScore; } + + public String getSchoolId() { + return schoolId; + } + + public void setSchoolId(String schoolId) { + this.schoolId = schoolId == null ? null : schoolId.trim(); + } } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/entity/TeaExamManageExample.java b/src/main/java/com/sztzjy/financial_bigdata/entity/TeaExamManageExample.java index e07eede..9eaee61 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/entity/TeaExamManageExample.java +++ b/src/main/java/com/sztzjy/financial_bigdata/entity/TeaExamManageExample.java @@ -935,6 +935,76 @@ public class TeaExamManageExample { addCriterion("case_score not between", value1, value2, "caseScore"); return (Criteria) this; } + + public Criteria andSchoolIdIsNull() { + addCriterion("school_id is null"); + return (Criteria) this; + } + + public Criteria andSchoolIdIsNotNull() { + addCriterion("school_id is not null"); + return (Criteria) this; + } + + public Criteria andSchoolIdEqualTo(String value) { + addCriterion("school_id =", value, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdNotEqualTo(String value) { + addCriterion("school_id <>", value, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdGreaterThan(String value) { + addCriterion("school_id >", value, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdGreaterThanOrEqualTo(String value) { + addCriterion("school_id >=", value, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdLessThan(String value) { + addCriterion("school_id <", value, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdLessThanOrEqualTo(String value) { + addCriterion("school_id <=", value, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdLike(String value) { + addCriterion("school_id like", value, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdNotLike(String value) { + addCriterion("school_id not like", value, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdIn(List<String> values) { + addCriterion("school_id in", values, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdNotIn(List<String> values) { + addCriterion("school_id not in", values, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdBetween(String value1, String value2) { + addCriterion("school_id between", value1, value2, "schoolId"); + return (Criteria) this; + } + + public Criteria andSchoolIdNotBetween(String value1, String value2) { + addCriterion("school_id not between", value1, value2, "schoolId"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TeaExamManageCountDto.java b/src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TeaExamManageCountDto.java new file mode 100644 index 0000000..77be6e6 --- /dev/null +++ b/src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TeaExamManageCountDto.java @@ -0,0 +1,22 @@ +package com.sztzjy.financial_bigdata.entity.tea_dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author xcj + * @Date 2024/3/14 + */ +@Data +@NoArgsConstructor +public class TeaExamManageCountDto { + @ApiModelProperty("单选题总数量") + private Integer singleCount; + + @ApiModelProperty("多选题总数量") + private Integer manyCount; + + @ApiModelProperty("判断题总数量") + private Integer judgeCount; +} diff --git a/src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TeaExamManageDto.java b/src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TeaExamManageDto.java new file mode 100644 index 0000000..cbaa760 --- /dev/null +++ b/src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TeaExamManageDto.java @@ -0,0 +1,79 @@ +package com.sztzjy.financial_bigdata.entity.tea_dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.web.multipart.MultipartFile; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Author xcj + * @Date 2024/3/14 + */ +@Data +@NoArgsConstructor +public class TeaExamManageDto { + @ApiModelProperty("考试管理ID") + private String examManageId; + + @ApiModelProperty("考试名称") + private String examName; + + @ApiModelProperty("开始时间") + private Date startTime; + + @ApiModelProperty("结束时间") + private Date endTime; + + @ApiModelProperty("班级id") + private String classId; + + @ApiModelProperty("LOGO地址") + private String logoAddress; + + @ApiModelProperty("考试描述") + private String examDescription; + + @ApiModelProperty("客观题权重") + private BigDecimal objectiveWeight; + + @ApiModelProperty("案例题权重") + private BigDecimal caseWeight; + + @ApiModelProperty("单选题分数") + private BigDecimal singleScore; + + @ApiModelProperty("多选题分数") + private BigDecimal manyScore; + + @ApiModelProperty("判断题分数") + private BigDecimal judgeScore; + + @ApiModelProperty("案例题分数") + private BigDecimal caseScore; + + @ApiModelProperty("单选题ID列表") + private String singleIdlist; + + @ApiModelProperty("多选题ID列表") + private String manyIdlist; + + @ApiModelProperty("判断题ID列表") + private String judgeIdlist; + + @ApiModelProperty("案例题ID列表") + private String caseIdlist; + + @ApiModelProperty("单选题答案(id, answer)") + private String singleAnswer; + + @ApiModelProperty("多选题答案(id, answer)") + private String manyAnswer; + + @ApiModelProperty("判断题答案(id, answer)") + private String judgeAnswer; + + private MultipartFile file; +} diff --git a/src/main/java/com/sztzjy/financial_bigdata/mapper/StuClassMapper.java b/src/main/java/com/sztzjy/financial_bigdata/mapper/StuClassMapper.java index 27dc52e..a94fb9f 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/mapper/StuClassMapper.java +++ b/src/main/java/com/sztzjy/financial_bigdata/mapper/StuClassMapper.java @@ -34,6 +34,6 @@ public interface StuClassMapper { @Select("SELECT DISTINCT s.class_name, s.class_id FROM stu_class s, stu_users u WHERE #{schoolId}= u.school_id;") String selectAllClassNameBySchoolId(@Param("schoolId")String schoolId); - @Select("SELECT s.class_name FROM stu_class s, stu_users u WHERE s.class_id = u.class_id and s.class_id = #{classId};") + @Select("SELECT s.class_name FROM stu_class s, stu_userinfo u WHERE s.class_id = u.class_id and s.class_id = #{classId};") String selectClassNameByClassId(@Param("classId")String classId); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/mapper/StuUserMapper.java b/src/main/java/com/sztzjy/financial_bigdata/mapper/StuUserMapper.java index ce2c318..fff98ce 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/mapper/StuUserMapper.java +++ b/src/main/java/com/sztzjy/financial_bigdata/mapper/StuUserMapper.java @@ -32,6 +32,6 @@ public interface StuUserMapper { int updateByPrimaryKey(StuUser record); - @Select("select DISTINCT stu_users.school_name from stu_users where school_id =#{schoolId}") + @Select("select DISTINCT stu_userinfo.school_name from stu_users where school_id =#{schoolId}") String selectSchoolNameById(@Param("schoolId")String schoolId); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/mapper/SysLogMapper.java b/src/main/java/com/sztzjy/financial_bigdata/mapper/SysLogMapper.java deleted file mode 100644 index 55df9b5..0000000 --- a/src/main/java/com/sztzjy/financial_bigdata/mapper/SysLogMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.sztzjy.financial_bigdata.mapper; - -import com.sztzjy.financial_bigdata.entity.SysLog; -import com.sztzjy.financial_bigdata.entity.SysLogExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface SysLogMapper { - long countByExample(SysLogExample example); - - int deleteByExample(SysLogExample example); - - int deleteByPrimaryKey(Long id); - - int insert(SysLog record); - - int insertSelective(SysLog record); - - List<SysLog> selectByExampleWithBLOBs(SysLogExample example); - - List<SysLog> selectByExample(SysLogExample example); - - SysLog selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") SysLog record, @Param("example") SysLogExample example); - - int updateByExampleWithBLOBs(@Param("record") SysLog record, @Param("example") SysLogExample example); - - int updateByExample(@Param("record") SysLog record, @Param("example") SysLogExample example); - - int updateByPrimaryKeySelective(SysLog record); - - int updateByPrimaryKeyWithBLOBs(SysLog record); - - int updateByPrimaryKey(SysLog record); -} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/mapper/SysLoginLogMapper.java b/src/main/java/com/sztzjy/financial_bigdata/mapper/SysLoginLogMapper.java new file mode 100644 index 0000000..0b69756 --- /dev/null +++ b/src/main/java/com/sztzjy/financial_bigdata/mapper/SysLoginLogMapper.java @@ -0,0 +1,32 @@ +package com.sztzjy.financial_bigdata.mapper; + +import com.sztzjy.financial_bigdata.entity.SysLoginLog; +import com.sztzjy.financial_bigdata.entity.SysLoginLogExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface SysLoginLogMapper { + long countByExample(SysLoginLogExample example); + + int deleteByExample(SysLoginLogExample example); + + int deleteByPrimaryKey(String logId); + + int insert(SysLoginLog record); + + int insertSelective(SysLoginLog record); + + List<SysLoginLog> selectByExample(SysLoginLogExample example); + + SysLoginLog selectByPrimaryKey(String logId); + + int updateByExampleSelective(@Param("record") SysLoginLog record, @Param("example") SysLoginLogExample example); + + int updateByExample(@Param("record") SysLoginLog record, @Param("example") SysLoginLogExample example); + + int updateByPrimaryKeySelective(SysLoginLog record); + + int updateByPrimaryKey(SysLoginLog record); +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/mapper/SysObjectiveQuestionMapper.java b/src/main/java/com/sztzjy/financial_bigdata/mapper/SysObjectiveQuestionMapper.java index 496ea0a..71ce274 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/mapper/SysObjectiveQuestionMapper.java +++ b/src/main/java/com/sztzjy/financial_bigdata/mapper/SysObjectiveQuestionMapper.java @@ -4,8 +4,11 @@ import com.sztzjy.financial_bigdata.entity.SysObjectiveQuestion; import com.sztzjy.financial_bigdata.entity.SysObjectiveQuestionExample; import java.util.List; +import com.sztzjy.financial_bigdata.entity.tea_dto.TeaExamManageCountDto; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + @Mapper public interface SysObjectiveQuestionMapper { long countByExample(SysObjectiveQuestionExample example); @@ -29,4 +32,7 @@ public interface SysObjectiveQuestionMapper { int updateByPrimaryKeySelective(SysObjectiveQuestion record); int updateByPrimaryKey(SysObjectiveQuestion record); + + @Select("SELECT SUM(CASE WHEN type = 0 THEN 1 ELSE 0 END) AS singleCount,SUM(CASE WHEN type = 1 THEN 1 ELSE 0 END) AS manyCount, SUM(CASE WHEN type = 2 THEN 1 ELSE 0 END) AS judgeCount FROM sys_objective_question where school_id IN(999999999,#{schoolId})") + TeaExamManageCountDto selectAllCount(@Param("schoolId") String schoolId); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/financial_bigdata/mapper/TeaExamManageMapper.java b/src/main/java/com/sztzjy/financial_bigdata/mapper/TeaExamManageMapper.java index 05fe36d..fdce13b 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/mapper/TeaExamManageMapper.java +++ b/src/main/java/com/sztzjy/financial_bigdata/mapper/TeaExamManageMapper.java @@ -4,8 +4,10 @@ import com.sztzjy.financial_bigdata.entity.TeaExamManage; import com.sztzjy.financial_bigdata.entity.TeaExamManageExample; import com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs; import java.util.List; -import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper public interface TeaExamManageMapper { long countByExample(TeaExamManageExample example); diff --git a/src/main/java/com/sztzjy/financial_bigdata/service/tea/ITeaExamManageService.java b/src/main/java/com/sztzjy/financial_bigdata/service/tea/ITeaExamManageService.java new file mode 100644 index 0000000..f75b594 --- /dev/null +++ b/src/main/java/com/sztzjy/financial_bigdata/service/tea/ITeaExamManageService.java @@ -0,0 +1,13 @@ +package com.sztzjy.financial_bigdata.service.tea; + +import com.sztzjy.financial_bigdata.entity.tea_dto.TeaExamManageDto; +import com.sztzjy.financial_bigdata.util.ResultEntity; +import org.springframework.http.HttpStatus; + +/** + * @Author xcj + * @Date 2024/3/14 + */ +public interface ITeaExamManageService { + ResultEntity<HttpStatus> addExam(TeaExamManageDto teaExamManagedto); +} diff --git a/src/main/java/com/sztzjy/financial_bigdata/service/tea/ITeaUserService.java b/src/main/java/com/sztzjy/financial_bigdata/service/tea/ITeaUserService.java new file mode 100644 index 0000000..63a8503 --- /dev/null +++ b/src/main/java/com/sztzjy/financial_bigdata/service/tea/ITeaUserService.java @@ -0,0 +1,17 @@ +package com.sztzjy.financial_bigdata.service.tea; + +import com.github.pagehelper.PageInfo; +import com.sztzjy.financial_bigdata.entity.SysLoginLog; +import com.sztzjy.financial_bigdata.util.ResultEntity; + +import javax.servlet.http.HttpServletResponse; + +/** + * @Author xcj + * @Date 2024/3/13 + */ +public interface ITeaUserService { + ResultEntity<PageInfo<SysLoginLog>> selectLogs(Integer index, Integer size, String schoolId, String studentId, String classId); + + void logExport(HttpServletResponse response, String schoolId, String studentId, String classId); +} diff --git a/src/main/java/com/sztzjy/financial_bigdata/service/tea/impl/TeaExamManageServiceImpl.java b/src/main/java/com/sztzjy/financial_bigdata/service/tea/impl/TeaExamManageServiceImpl.java new file mode 100644 index 0000000..4045033 --- /dev/null +++ b/src/main/java/com/sztzjy/financial_bigdata/service/tea/impl/TeaExamManageServiceImpl.java @@ -0,0 +1,66 @@ +package com.sztzjy.financial_bigdata.service.tea.impl; + +import com.sztzjy.financial_bigdata.entity.SysObjectiveQuestion; +import com.sztzjy.financial_bigdata.entity.TeaExamManageExample; +import com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs; +import com.sztzjy.financial_bigdata.entity.tea_dto.TeaExamManageDto; +import com.sztzjy.financial_bigdata.mapper.SysObjectiveQuestionMapper; +import com.sztzjy.financial_bigdata.mapper.TeaExamManageMapper; +import com.sztzjy.financial_bigdata.service.tea.ITeaExamManageService; +import com.sztzjy.financial_bigdata.util.ResultEntity; +import com.sztzjy.financial_bigdata.util.file.IFileUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * @Author xcj + * @Date 2024/3/14 + */ +@Service +public class TeaExamManageServiceImpl implements ITeaExamManageService { + @Autowired + private IFileUtil fileUtil; + @Autowired + private TeaExamManageMapper teaExamManageMapper; + @Autowired + private SysObjectiveQuestionMapper sysObjectiveQuestionMapper; + + + /* 新增考试 + * @author xcj + * @Date 2024/3/14 + */ + @Override + public ResultEntity<HttpStatus> addExam(TeaExamManageDto teaExamManagedto) { + TeaExamManageWithBLOBs teaExamManageWithBLOBs = new TeaExamManageWithBLOBs(); + BeanUtils.copyProperties(teaExamManagedto, teaExamManageWithBLOBs); + //上传图片 + if (teaExamManagedto.getFile() != null) { + MultipartFile file = teaExamManagedto.getFile(); + String filePath = fileUtil.upload(file); + teaExamManageWithBLOBs.setLogoAddress(filePath); + } + if (StringUtils.isBlank(teaExamManageWithBLOBs.getExamName())) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请输入考试名称!"); + } + if (teaExamManageWithBLOBs.getEndTime() == null || teaExamManageWithBLOBs.getStartTime() == null) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请输入考试时间!"); + } + if (StringUtils.isBlank(teaExamManageWithBLOBs.getClassId())) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请选择考试班级!"); + } + if (teaExamManageWithBLOBs.getCaseWeight() == null || teaExamManageWithBLOBs.getObjectiveWeight() == null) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请输入题型得分权重!"); + } + teaExamManageMapper.insert(teaExamManageWithBLOBs); + return new ResultEntity<>(HttpStatus.OK, "添加考试成功!"); + } +} diff --git a/src/main/java/com/sztzjy/financial_bigdata/service/tea/impl/TeaUserServiceImpl.java b/src/main/java/com/sztzjy/financial_bigdata/service/tea/impl/TeaUserServiceImpl.java new file mode 100644 index 0000000..1e82fb1 --- /dev/null +++ b/src/main/java/com/sztzjy/financial_bigdata/service/tea/impl/TeaUserServiceImpl.java @@ -0,0 +1,87 @@ +package com.sztzjy.financial_bigdata.service.tea.impl; + +import cn.hutool.core.util.IdUtil; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.sztzjy.financial_bigdata.entity.StuUser; +import com.sztzjy.financial_bigdata.entity.StuUserExample; +import com.sztzjy.financial_bigdata.entity.SysLoginLog; +import com.sztzjy.financial_bigdata.entity.SysLoginLogExample; +import com.sztzjy.financial_bigdata.mapper.StuUserMapper; +import com.sztzjy.financial_bigdata.mapper.SysLoginLogMapper; +import com.sztzjy.financial_bigdata.service.tea.ITeaUserService; +import com.sztzjy.financial_bigdata.util.ResultEntity; +import com.sztzjy.financial_bigdata.util.excel.FilePortUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * @Author xcj + * @Date 2024/3/13 + */ +@Service +public class TeaUserServiceImpl implements ITeaUserService { + @Autowired + private SysLoginLogMapper sysLogMapper; + @Autowired + private StuUserMapper stuUserMapper; + + + @Override + public ResultEntity<PageInfo<SysLoginLog>> selectLogs(Integer index, Integer size, String schoolId, String studentId, String classId) { + PageHelper.startPage(index, size); + List<SysLoginLog> logList = getLogList(schoolId, studentId, classId); + return new ResultEntity<>(new PageInfo<>(logList)); + } + + public List<SysLoginLog> getLogList(String schoolId, String studentId, String classId) { + StuUserExample userExample = new StuUserExample(); + StuUserExample.Criteria criteria = userExample.createCriteria(); + criteria.andSchoolIdEqualTo(schoolId); + if (StringUtils.isNotBlank(studentId)) { + criteria.andStudentIdEqualTo(schoolId); + } + if (StringUtils.isNotBlank(classId)) { + criteria.andClassIdEqualTo(classId); + } + List<StuUser> stuUsers = stuUserMapper.selectByExample(userExample); + List<SysLoginLog> logList = new ArrayList<>(); + if (!stuUsers.isEmpty()) { + for (StuUser stuUser : stuUsers) { + String userid = stuUser.getUserid(); + SysLoginLogExample logExample = new SysLoginLogExample(); + logExample.createCriteria().andUseridEqualTo(userid); + List<SysLoginLog> sysLogs = sysLogMapper.selectByExample(logExample); + logList.addAll(sysLogs); + } + } + return logList; + } + + /* 导出 + * @author xcj + * @Date 2024/3/13 + */ + @Override + public void logExport(HttpServletResponse response, String schoolId, String studentId, String classId) { + List<SysLoginLog> logList = getLogList(schoolId, studentId, classId); + //导出的表名 + String title = IdUtil.simpleUUID(); + //表中第一行表头字段 + String[] headers = {"学生姓名", "学号", "登录时间", "在线时长", "登录IP", "IP归属地"}; + + //具体需要写入excel需要哪些字段,这些字段取自UserReward类,也就是上面的实际数据结果集的泛型 + List<String> listColumn = Arrays.asList("name", "studentId", "loginTime", "loginDuration", "loginIp", "ipAddress"); + try { + FilePortUtil.exportExcel(response, title, headers, logList, listColumn); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/resources/mapper/SysLogMapper.xml b/src/main/resources/mapper/SysLogMapper.xml deleted file mode 100644 index 456340d..0000000 --- a/src/main/resources/mapper/SysLogMapper.xml +++ /dev/null @@ -1,394 +0,0 @@ -<?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.financial_bigdata.mapper.SysLogMapper"> - <resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysLog"> - <id column="id" jdbcType="BIGINT" property="id" /> - <result column="method" jdbcType="VARCHAR" property="method" /> - <result column="request_url" jdbcType="VARCHAR" property="requestUrl" /> - <result column="params" jdbcType="VARCHAR" property="params" /> - <result column="ip" jdbcType="VARCHAR" property="ip" /> - <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> - <result column="result_time" jdbcType="TIMESTAMP" property="resultTime" /> - <result column="token" jdbcType="VARCHAR" property="token" /> - <result column="student_id" jdbcType="BIGINT" property="studentId" /> - <result column="session" jdbcType="VARCHAR" property="session" /> - <result column="user_id" jdbcType="BIGINT" property="userId" /> - <result column="open_id" jdbcType="VARCHAR" property="openId" /> - </resultMap> - <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.financial_bigdata.entity.SysLog"> - <result column="result" jdbcType="LONGVARCHAR" property="result" /> - </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, method, request_url, params, ip, create_time, result_time, token, student_id, - session, user_id, open_id - </sql> - <sql id="Blob_Column_List"> - result - </sql> - <select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.financial_bigdata.entity.SysLogExample" resultMap="ResultMapWithBLOBs"> - select - <if test="distinct"> - distinct - </if> - <include refid="Base_Column_List" /> - , - <include refid="Blob_Column_List" /> - from sys_log - <if test="_parameter != null"> - <include refid="Example_Where_Clause" /> - </if> - <if test="orderByClause != null"> - order by ${orderByClause} - </if> - </select> - <select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysLogExample" resultMap="BaseResultMap"> - select - <if test="distinct"> - distinct - </if> - <include refid="Base_Column_List" /> - from sys_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="ResultMapWithBLOBs"> - select - <include refid="Base_Column_List" /> - , - <include refid="Blob_Column_List" /> - from sys_log - where id = #{id,jdbcType=BIGINT} - </select> - <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> - delete from sys_log - where id = #{id,jdbcType=BIGINT} - </delete> - <delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysLogExample"> - delete from sys_log - <if test="_parameter != null"> - <include refid="Example_Where_Clause" /> - </if> - </delete> - <insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysLog"> - insert into sys_log (id, method, request_url, - params, ip, create_time, - result_time, token, student_id, - session, user_id, open_id, - result) - values (#{id,jdbcType=BIGINT}, #{method,jdbcType=VARCHAR}, #{requestUrl,jdbcType=VARCHAR}, - #{params,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, - #{resultTime,jdbcType=TIMESTAMP}, #{token,jdbcType=VARCHAR}, #{studentId,jdbcType=BIGINT}, - #{session,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, #{openId,jdbcType=VARCHAR}, - #{result,jdbcType=LONGVARCHAR}) - </insert> - <insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysLog"> - insert into sys_log - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null"> - id, - </if> - <if test="method != null"> - method, - </if> - <if test="requestUrl != null"> - request_url, - </if> - <if test="params != null"> - params, - </if> - <if test="ip != null"> - ip, - </if> - <if test="createTime != null"> - create_time, - </if> - <if test="resultTime != null"> - result_time, - </if> - <if test="token != null"> - token, - </if> - <if test="studentId != null"> - student_id, - </if> - <if test="session != null"> - session, - </if> - <if test="userId != null"> - user_id, - </if> - <if test="openId != null"> - open_id, - </if> - <if test="result != null"> - result, - </if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null"> - #{id,jdbcType=BIGINT}, - </if> - <if test="method != null"> - #{method,jdbcType=VARCHAR}, - </if> - <if test="requestUrl != null"> - #{requestUrl,jdbcType=VARCHAR}, - </if> - <if test="params != null"> - #{params,jdbcType=VARCHAR}, - </if> - <if test="ip != null"> - #{ip,jdbcType=VARCHAR}, - </if> - <if test="createTime != null"> - #{createTime,jdbcType=TIMESTAMP}, - </if> - <if test="resultTime != null"> - #{resultTime,jdbcType=TIMESTAMP}, - </if> - <if test="token != null"> - #{token,jdbcType=VARCHAR}, - </if> - <if test="studentId != null"> - #{studentId,jdbcType=BIGINT}, - </if> - <if test="session != null"> - #{session,jdbcType=VARCHAR}, - </if> - <if test="userId != null"> - #{userId,jdbcType=BIGINT}, - </if> - <if test="openId != null"> - #{openId,jdbcType=VARCHAR}, - </if> - <if test="result != null"> - #{result,jdbcType=LONGVARCHAR}, - </if> - </trim> - </insert> - <select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysLogExample" resultType="java.lang.Long"> - select count(*) from sys_log - <if test="_parameter != null"> - <include refid="Example_Where_Clause" /> - </if> - </select> - <update id="updateByExampleSelective" parameterType="map"> - update sys_log - <set> - <if test="record.id != null"> - id = #{record.id,jdbcType=BIGINT}, - </if> - <if test="record.method != null"> - method = #{record.method,jdbcType=VARCHAR}, - </if> - <if test="record.requestUrl != null"> - request_url = #{record.requestUrl,jdbcType=VARCHAR}, - </if> - <if test="record.params != null"> - params = #{record.params,jdbcType=VARCHAR}, - </if> - <if test="record.ip != null"> - ip = #{record.ip,jdbcType=VARCHAR}, - </if> - <if test="record.createTime != null"> - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - </if> - <if test="record.resultTime != null"> - result_time = #{record.resultTime,jdbcType=TIMESTAMP}, - </if> - <if test="record.token != null"> - token = #{record.token,jdbcType=VARCHAR}, - </if> - <if test="record.studentId != null"> - student_id = #{record.studentId,jdbcType=BIGINT}, - </if> - <if test="record.session != null"> - session = #{record.session,jdbcType=VARCHAR}, - </if> - <if test="record.userId != null"> - user_id = #{record.userId,jdbcType=BIGINT}, - </if> - <if test="record.openId != null"> - open_id = #{record.openId,jdbcType=VARCHAR}, - </if> - <if test="record.result != null"> - result = #{record.result,jdbcType=LONGVARCHAR}, - </if> - </set> - <if test="_parameter != null"> - <include refid="Update_By_Example_Where_Clause" /> - </if> - </update> - <update id="updateByExampleWithBLOBs" parameterType="map"> - update sys_log - set id = #{record.id,jdbcType=BIGINT}, - method = #{record.method,jdbcType=VARCHAR}, - request_url = #{record.requestUrl,jdbcType=VARCHAR}, - params = #{record.params,jdbcType=VARCHAR}, - ip = #{record.ip,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - result_time = #{record.resultTime,jdbcType=TIMESTAMP}, - token = #{record.token,jdbcType=VARCHAR}, - student_id = #{record.studentId,jdbcType=BIGINT}, - session = #{record.session,jdbcType=VARCHAR}, - user_id = #{record.userId,jdbcType=BIGINT}, - open_id = #{record.openId,jdbcType=VARCHAR}, - result = #{record.result,jdbcType=LONGVARCHAR} - <if test="_parameter != null"> - <include refid="Update_By_Example_Where_Clause" /> - </if> - </update> - <update id="updateByExample" parameterType="map"> - update sys_log - set id = #{record.id,jdbcType=BIGINT}, - method = #{record.method,jdbcType=VARCHAR}, - request_url = #{record.requestUrl,jdbcType=VARCHAR}, - params = #{record.params,jdbcType=VARCHAR}, - ip = #{record.ip,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - result_time = #{record.resultTime,jdbcType=TIMESTAMP}, - token = #{record.token,jdbcType=VARCHAR}, - student_id = #{record.studentId,jdbcType=BIGINT}, - session = #{record.session,jdbcType=VARCHAR}, - user_id = #{record.userId,jdbcType=BIGINT}, - open_id = #{record.openId,jdbcType=VARCHAR} - <if test="_parameter != null"> - <include refid="Update_By_Example_Where_Clause" /> - </if> - </update> - <update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysLog"> - update sys_log - <set> - <if test="method != null"> - method = #{method,jdbcType=VARCHAR}, - </if> - <if test="requestUrl != null"> - request_url = #{requestUrl,jdbcType=VARCHAR}, - </if> - <if test="params != null"> - params = #{params,jdbcType=VARCHAR}, - </if> - <if test="ip != null"> - ip = #{ip,jdbcType=VARCHAR}, - </if> - <if test="createTime != null"> - create_time = #{createTime,jdbcType=TIMESTAMP}, - </if> - <if test="resultTime != null"> - result_time = #{resultTime,jdbcType=TIMESTAMP}, - </if> - <if test="token != null"> - token = #{token,jdbcType=VARCHAR}, - </if> - <if test="studentId != null"> - student_id = #{studentId,jdbcType=BIGINT}, - </if> - <if test="session != null"> - session = #{session,jdbcType=VARCHAR}, - </if> - <if test="userId != null"> - user_id = #{userId,jdbcType=BIGINT}, - </if> - <if test="openId != null"> - open_id = #{openId,jdbcType=VARCHAR}, - </if> - <if test="result != null"> - result = #{result,jdbcType=LONGVARCHAR}, - </if> - </set> - where id = #{id,jdbcType=BIGINT} - </update> - <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.financial_bigdata.entity.SysLog"> - update sys_log - set method = #{method,jdbcType=VARCHAR}, - request_url = #{requestUrl,jdbcType=VARCHAR}, - params = #{params,jdbcType=VARCHAR}, - ip = #{ip,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - result_time = #{resultTime,jdbcType=TIMESTAMP}, - token = #{token,jdbcType=VARCHAR}, - student_id = #{studentId,jdbcType=BIGINT}, - session = #{session,jdbcType=VARCHAR}, - user_id = #{userId,jdbcType=BIGINT}, - open_id = #{openId,jdbcType=VARCHAR}, - result = #{result,jdbcType=LONGVARCHAR} - where id = #{id,jdbcType=BIGINT} - </update> - <update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysLog"> - update sys_log - set method = #{method,jdbcType=VARCHAR}, - request_url = #{requestUrl,jdbcType=VARCHAR}, - params = #{params,jdbcType=VARCHAR}, - ip = #{ip,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - result_time = #{resultTime,jdbcType=TIMESTAMP}, - token = #{token,jdbcType=VARCHAR}, - student_id = #{studentId,jdbcType=BIGINT}, - session = #{session,jdbcType=VARCHAR}, - user_id = #{userId,jdbcType=BIGINT}, - open_id = #{openId,jdbcType=VARCHAR} - where id = #{id,jdbcType=BIGINT} - </update> -</mapper> \ No newline at end of file diff --git a/src/main/resources/mapper/SysLoginLogMapper.xml b/src/main/resources/mapper/SysLoginLogMapper.xml new file mode 100644 index 0000000..5947bfc --- /dev/null +++ b/src/main/resources/mapper/SysLoginLogMapper.xml @@ -0,0 +1,258 @@ +<?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.financial_bigdata.mapper.SysLoginLogMapper"> + <resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysLoginLog"> + <id column="log_id" jdbcType="VARCHAR" property="logId" /> + <result column="userid" jdbcType="VARCHAR" property="userid" /> + <result column="name" jdbcType="VARCHAR" property="name" /> + <result column="student_id" jdbcType="VARCHAR" property="studentId" /> + <result column="login_time" jdbcType="TIMESTAMP" property="loginTime" /> + <result column="login_duration" jdbcType="TIME" property="loginDuration" /> + <result column="login_ip" jdbcType="VARCHAR" property="loginIp" /> + <result column="ip_address" jdbcType="VARCHAR" property="ipAddress" /> + </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"> + log_id, userid, name, student_id, login_time, login_duration, login_ip, ip_address + </sql> + <select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysLoginLogExample" resultMap="BaseResultMap"> + select + <if test="distinct"> + distinct + </if> + <include refid="Base_Column_List" /> + from sys_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.String" resultMap="BaseResultMap"> + select + <include refid="Base_Column_List" /> + from sys_login_log + where log_id = #{logId,jdbcType=VARCHAR} + </select> + <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> + delete from sys_login_log + where log_id = #{logId,jdbcType=VARCHAR} + </delete> + <delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysLoginLogExample"> + delete from sys_login_log + <if test="_parameter != null"> + <include refid="Example_Where_Clause" /> + </if> + </delete> + <insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysLoginLog"> + insert into sys_login_log (log_id, userid, name, + student_id, login_time, login_duration, + login_ip, ip_address) + values (#{logId,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{studentId,jdbcType=VARCHAR}, #{loginTime,jdbcType=TIMESTAMP}, #{loginDuration,jdbcType=TIME}, + #{loginIp,jdbcType=VARCHAR}, #{ipAddress,jdbcType=VARCHAR}) + </insert> + <insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysLoginLog"> + insert into sys_login_log + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="logId != null"> + log_id, + </if> + <if test="userid != null"> + userid, + </if> + <if test="name != null"> + name, + </if> + <if test="studentId != null"> + student_id, + </if> + <if test="loginTime != null"> + login_time, + </if> + <if test="loginDuration != null"> + login_duration, + </if> + <if test="loginIp != null"> + login_ip, + </if> + <if test="ipAddress != null"> + ip_address, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="logId != null"> + #{logId,jdbcType=VARCHAR}, + </if> + <if test="userid != null"> + #{userid,jdbcType=VARCHAR}, + </if> + <if test="name != null"> + #{name,jdbcType=VARCHAR}, + </if> + <if test="studentId != null"> + #{studentId,jdbcType=VARCHAR}, + </if> + <if test="loginTime != null"> + #{loginTime,jdbcType=TIMESTAMP}, + </if> + <if test="loginDuration != null"> + #{loginDuration,jdbcType=TIME}, + </if> + <if test="loginIp != null"> + #{loginIp,jdbcType=VARCHAR}, + </if> + <if test="ipAddress != null"> + #{ipAddress,jdbcType=VARCHAR}, + </if> + </trim> + </insert> + <select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysLoginLogExample" resultType="java.lang.Long"> + select count(*) from sys_login_log + <if test="_parameter != null"> + <include refid="Example_Where_Clause" /> + </if> + </select> + <update id="updateByExampleSelective" parameterType="map"> + update sys_login_log + <set> + <if test="record.logId != null"> + log_id = #{record.logId,jdbcType=VARCHAR}, + </if> + <if test="record.userid != null"> + userid = #{record.userid,jdbcType=VARCHAR}, + </if> + <if test="record.name != null"> + name = #{record.name,jdbcType=VARCHAR}, + </if> + <if test="record.studentId != null"> + student_id = #{record.studentId,jdbcType=VARCHAR}, + </if> + <if test="record.loginTime != null"> + login_time = #{record.loginTime,jdbcType=TIMESTAMP}, + </if> + <if test="record.loginDuration != null"> + login_duration = #{record.loginDuration,jdbcType=TIME}, + </if> + <if test="record.loginIp != null"> + login_ip = #{record.loginIp,jdbcType=VARCHAR}, + </if> + <if test="record.ipAddress != null"> + ip_address = #{record.ipAddress,jdbcType=VARCHAR}, + </if> + </set> + <if test="_parameter != null"> + <include refid="Update_By_Example_Where_Clause" /> + </if> + </update> + <update id="updateByExample" parameterType="map"> + update sys_login_log + set log_id = #{record.logId,jdbcType=VARCHAR}, + userid = #{record.userid,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + student_id = #{record.studentId,jdbcType=VARCHAR}, + login_time = #{record.loginTime,jdbcType=TIMESTAMP}, + login_duration = #{record.loginDuration,jdbcType=TIME}, + login_ip = #{record.loginIp,jdbcType=VARCHAR}, + ip_address = #{record.ipAddress,jdbcType=VARCHAR} + <if test="_parameter != null"> + <include refid="Update_By_Example_Where_Clause" /> + </if> + </update> + <update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysLoginLog"> + update sys_login_log + <set> + <if test="userid != null"> + userid = #{userid,jdbcType=VARCHAR}, + </if> + <if test="name != null"> + name = #{name,jdbcType=VARCHAR}, + </if> + <if test="studentId != null"> + student_id = #{studentId,jdbcType=VARCHAR}, + </if> + <if test="loginTime != null"> + login_time = #{loginTime,jdbcType=TIMESTAMP}, + </if> + <if test="loginDuration != null"> + login_duration = #{loginDuration,jdbcType=TIME}, + </if> + <if test="loginIp != null"> + login_ip = #{loginIp,jdbcType=VARCHAR}, + </if> + <if test="ipAddress != null"> + ip_address = #{ipAddress,jdbcType=VARCHAR}, + </if> + </set> + where log_id = #{logId,jdbcType=VARCHAR} + </update> + <update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysLoginLog"> + update sys_login_log + set userid = #{userid,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + student_id = #{studentId,jdbcType=VARCHAR}, + login_time = #{loginTime,jdbcType=TIMESTAMP}, + login_duration = #{loginDuration,jdbcType=TIME}, + login_ip = #{loginIp,jdbcType=VARCHAR}, + ip_address = #{ipAddress,jdbcType=VARCHAR} + where log_id = #{logId,jdbcType=VARCHAR} + </update> +</mapper> \ No newline at end of file diff --git a/src/main/resources/mapper/TeaExamManageMapper.xml b/src/main/resources/mapper/TeaExamManageMapper.xml index eb2c123..9a8f937 100644 --- a/src/main/resources/mapper/TeaExamManageMapper.xml +++ b/src/main/resources/mapper/TeaExamManageMapper.xml @@ -15,6 +15,7 @@ <result column="many_score" jdbcType="DECIMAL" property="manyScore" /> <result column="judge_score" jdbcType="DECIMAL" property="judgeScore" /> <result column="case_score" jdbcType="DECIMAL" property="caseScore" /> + <result column="school_id" jdbcType="VARCHAR" property="schoolId" /> </resultMap> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs"> <result column="single_idList" jdbcType="LONGVARCHAR" property="singleIdlist" /> @@ -85,7 +86,8 @@ </sql> <sql id="Base_Column_List"> exam_manage_id, exam_name, start_time, end_time, class_id, logo_address, exam_Description, - Objective_weight, case_weight, single_score, many_score, judge_score, case_score + Objective_weight, case_weight, single_score, many_score, judge_score, case_score, + school_id </sql> <sql id="Blob_Column_List"> single_idList, many_idList, judge_idList, case_idList, single_answer, many_answer, @@ -144,16 +146,18 @@ end_time, class_id, logo_address, exam_Description, Objective_weight, case_weight, single_score, many_score, judge_score, - case_score, single_idList, many_idList, - judge_idList, case_idList, single_answer, - many_answer, judge_answer) + case_score, school_id, single_idList, + many_idList, judge_idList, case_idList, + single_answer, many_answer, judge_answer + ) values (#{examManageId,jdbcType=VARCHAR}, #{examName,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{classId,jdbcType=VARCHAR}, #{logoAddress,jdbcType=VARCHAR}, #{examDescription,jdbcType=VARCHAR}, #{objectiveWeight,jdbcType=DECIMAL}, #{caseWeight,jdbcType=DECIMAL}, #{singleScore,jdbcType=DECIMAL}, #{manyScore,jdbcType=DECIMAL}, #{judgeScore,jdbcType=DECIMAL}, - #{caseScore,jdbcType=DECIMAL}, #{singleIdlist,jdbcType=LONGVARCHAR}, #{manyIdlist,jdbcType=LONGVARCHAR}, - #{judgeIdlist,jdbcType=LONGVARCHAR}, #{caseIdlist,jdbcType=LONGVARCHAR}, #{singleAnswer,jdbcType=LONGVARCHAR}, - #{manyAnswer,jdbcType=LONGVARCHAR}, #{judgeAnswer,jdbcType=LONGVARCHAR}) + #{caseScore,jdbcType=DECIMAL}, #{schoolId,jdbcType=VARCHAR}, #{singleIdlist,jdbcType=LONGVARCHAR}, + #{manyIdlist,jdbcType=LONGVARCHAR}, #{judgeIdlist,jdbcType=LONGVARCHAR}, #{caseIdlist,jdbcType=LONGVARCHAR}, + #{singleAnswer,jdbcType=LONGVARCHAR}, #{manyAnswer,jdbcType=LONGVARCHAR}, #{judgeAnswer,jdbcType=LONGVARCHAR} + ) </insert> <insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs"> insert into tea_exam_manage @@ -197,6 +201,9 @@ <if test="caseScore != null"> case_score, </if> + <if test="schoolId != null"> + school_id, + </if> <if test="singleIdlist != null"> single_idList, </if> @@ -259,6 +266,9 @@ <if test="caseScore != null"> #{caseScore,jdbcType=DECIMAL}, </if> + <if test="schoolId != null"> + #{schoolId,jdbcType=VARCHAR}, + </if> <if test="singleIdlist != null"> #{singleIdlist,jdbcType=LONGVARCHAR}, </if> @@ -330,6 +340,9 @@ <if test="record.caseScore != null"> case_score = #{record.caseScore,jdbcType=DECIMAL}, </if> + <if test="record.schoolId != null"> + school_id = #{record.schoolId,jdbcType=VARCHAR}, + </if> <if test="record.singleIdlist != null"> single_idList = #{record.singleIdlist,jdbcType=LONGVARCHAR}, </if> @@ -371,6 +384,7 @@ many_score = #{record.manyScore,jdbcType=DECIMAL}, judge_score = #{record.judgeScore,jdbcType=DECIMAL}, case_score = #{record.caseScore,jdbcType=DECIMAL}, + school_id = #{record.schoolId,jdbcType=VARCHAR}, single_idList = #{record.singleIdlist,jdbcType=LONGVARCHAR}, many_idList = #{record.manyIdlist,jdbcType=LONGVARCHAR}, judge_idList = #{record.judgeIdlist,jdbcType=LONGVARCHAR}, @@ -396,7 +410,8 @@ single_score = #{record.singleScore,jdbcType=DECIMAL}, many_score = #{record.manyScore,jdbcType=DECIMAL}, judge_score = #{record.judgeScore,jdbcType=DECIMAL}, - case_score = #{record.caseScore,jdbcType=DECIMAL} + case_score = #{record.caseScore,jdbcType=DECIMAL}, + school_id = #{record.schoolId,jdbcType=VARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> @@ -440,6 +455,9 @@ <if test="caseScore != null"> case_score = #{caseScore,jdbcType=DECIMAL}, </if> + <if test="schoolId != null"> + school_id = #{schoolId,jdbcType=VARCHAR}, + </if> <if test="singleIdlist != null"> single_idList = #{singleIdlist,jdbcType=LONGVARCHAR}, </if> @@ -478,6 +496,7 @@ many_score = #{manyScore,jdbcType=DECIMAL}, judge_score = #{judgeScore,jdbcType=DECIMAL}, case_score = #{caseScore,jdbcType=DECIMAL}, + school_id = #{schoolId,jdbcType=VARCHAR}, single_idList = #{singleIdlist,jdbcType=LONGVARCHAR}, many_idList = #{manyIdlist,jdbcType=LONGVARCHAR}, judge_idList = #{judgeIdlist,jdbcType=LONGVARCHAR}, @@ -500,7 +519,8 @@ single_score = #{singleScore,jdbcType=DECIMAL}, many_score = #{manyScore,jdbcType=DECIMAL}, judge_score = #{judgeScore,jdbcType=DECIMAL}, - case_score = #{caseScore,jdbcType=DECIMAL} + case_score = #{caseScore,jdbcType=DECIMAL}, + school_id = #{schoolId,jdbcType=VARCHAR} where exam_manage_id = #{examManageId,jdbcType=VARCHAR} </update> </mapper> \ No newline at end of file