新增接口,修改数据库部分表,重新生成相关类

master
xiaoCJ 9 months ago
parent 88a33ff073
commit 4f6e0837c4

@ -7,6 +7,8 @@ import com.sztzjy.resource_center.config.Constant;
import com.sztzjy.resource_center.entity.SysOneCatalog;
import com.sztzjy.resource_center.entity.SysOneCatalogExample;
import com.sztzjy.resource_center.mapper.SysOneCatalogMapper;
import com.sztzjy.resource_center.mapper.SysThreeCatalogMapper;
import com.sztzjy.resource_center.mapper.SysTwoCatalogMapper;
import com.sztzjy.resource_center.util.ResultEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -14,10 +16,14 @@ 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 org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @Author xcj
@ -30,6 +36,11 @@ public class CourseController {
@Autowired
private SysOneCatalogMapper sysOneCatalogMapper;
@Autowired
private SysTwoCatalogMapper sysTwoCatalogMapper;
@Autowired
private SysThreeCatalogMapper sysThreeCatalogMapper;
@AnonymousAccess
@ApiOperation("新增课程")
@ -55,4 +66,29 @@ public class CourseController {
}
}
@AnonymousAccess
@ApiOperation("课程下拉框")
@PostMapping("getAllOneCatalogList")
public ResultEntity<List<Map<String, String>>> getAllOneCatalogList() {
return new ResultEntity<>(sysOneCatalogMapper.getAllOneCatalogList());
}
@AnonymousAccess
@ApiOperation("章下拉框")
@PostMapping("getAllTwoCatalogList")
public ResultEntity<List<Map<String, String>>> getAllTwoCatalogList() {
return new ResultEntity<>(sysTwoCatalogMapper.getAllTwoCatalogList());
}
@AnonymousAccess
@ApiOperation("节下拉框")
@PostMapping("getAllThreeCatalogList")
public ResultEntity<List<Map<String, String>>> getAllThreeCatalogList() {
return new ResultEntity<>(sysThreeCatalogMapper.getAllThreeCatalogList());
}
}

@ -1,10 +1,27 @@
package com.sztzjy.resource_center.controller;
import com.sztzjy.resource_center.mapper.SysResourceDataMapper;
import cn.hutool.core.util.IdUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sztzjy.resource_center.annotation.AnonymousAccess;
import com.sztzjy.resource_center.entity.SysResource;
import com.sztzjy.resource_center.entity.SysResourceAndCourse;
import com.sztzjy.resource_center.entity.SysResourceExample;
import com.sztzjy.resource_center.entity.dto.SysResourceDto;
import com.sztzjy.resource_center.mapper.SysResourceAndCourseMapper;
import com.sztzjy.resource_center.mapper.SysResourceMapper;
import com.sztzjy.resource_center.util.ResultEntity;
import com.sztzjy.resource_center.util.file.IFileUtil;
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.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
/**
* @Author xcj
@ -16,5 +33,74 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("api/sys/resource")
public class ResourceController {
@Autowired
private SysResourceDataMapper sysResourceDataMapper;
private SysResourceMapper sysResourceMapper;
@Autowired
private SysResourceAndCourseMapper sysResourceAndCourseMapper;
@Autowired
private IFileUtil fileUtil;
@AnonymousAccess
@ApiOperation("上传资源")
@PostMapping("uploadResource")
public ResultEntity<String> uploadResource(@ApiParam("") @RequestBody SysResourceDto dto) {
if (StringUtils.isBlank(dto.getResourceName())) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请输入资源名称!");
}
if (dto.getFile() == null) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请上传文件!");
}
//取到文件后缀名
String fileName = dto.getResourceName();
int lastIndex = fileName.lastIndexOf(".");
String extension = fileName.substring(lastIndex);
SysResource sysResource = new SysResource();
//判断文件type //todo 格式可能不够全
if (extension.equals(".pdf") || extension.equals(".ppt") || extension.equals(".pptx")
|| extension.equals(".xlsx") || extension.equals(".xls")
|| extension.equals(".doc") || extension.equals(".docx")) {
sysResource.setResourceType("课件");
} else if (extension.equals(".mp4") || extension.equals(".wmv") || extension.equals(".avi")) {
sysResource.setResourceType("视频");
} else {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "文件类型不支持!");
}
String url = fileUtil.upload(dto.getFile());
String uuid = IdUtil.randomUUID();
sysResource.setResourceId(uuid);
sysResource.setUrl(url);
sysResource.setSchoolId(dto.getSchoolId());
sysResource.setResourceName(dto.getResourceName());
sysResource.setCreateTime(new Date()); //todo 测试修改资源之后 新增时间会不会变化,有变化就错了
sysResourceMapper.insert(sysResource);
//绑定资源的对应关系
SysResourceAndCourse sysResourceAndCourse = new SysResourceAndCourse();
sysResourceAndCourse.setId(IdUtil.randomUUID());
sysResourceAndCourse.setOneId(dto.getOneId());
sysResourceAndCourse.setOneName(dto.getOneName());
sysResourceAndCourse.setTwoId(dto.getTwoId());
sysResourceAndCourse.setTwoName(dto.getTwoName());
sysResourceAndCourse.setThreeId(dto.getThreeId());
sysResourceAndCourse.setThreeName(dto.getThreeName());
sysResourceAndCourse.setResourceId(uuid); //资源ID
sysResourceAndCourseMapper.insert(sysResourceAndCourse);
return new ResultEntity<>(HttpStatus.OK, "上传成功!");
}
@AnonymousAccess
@ApiOperation("资源列表展示")
@PostMapping("selectResource")
public ResultEntity<PageInfo<SysResourceDto>> selectResource(@ApiParam("课程ID") @RequestParam(required = false) String oneID,
@ApiParam("章ID") @RequestParam(required = false) String twoID,
@ApiParam("节ID") @RequestParam(required = false) String threeID,
@ApiParam("资源名称") @RequestParam(required = false) String resourceName,
@RequestParam int index,
@RequestParam int size) {
PageHelper.startPage(index, size);
List<SysResourceDto> sysResourceDtos = sysResourceMapper.selectResource(oneID, twoID, threeID, resourceName);
PageInfo<SysResourceDto> pageInfo = new PageInfo(sysResourceDtos);
return new ResultEntity<PageInfo<SysResourceDto>>(pageInfo);
}
}

@ -0,0 +1,100 @@
package com.sztzjy.resource_center.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
*
*
* @author xcj
* sys_resource
*/
public class SysResource {
@ApiModelProperty("资源ID")
private String resourceId;
@ApiModelProperty("资源名称")
private String resourceName;
@ApiModelProperty("文件保存路径")
private String url;
@ApiModelProperty("资源类型 /视频/课件")
private String resourceType;
@ApiModelProperty("来源(内置/老师新增)")
private String source;
@ApiModelProperty("学校ID")
private String schoolId;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
public String getResourceId() {
return resourceId;
}
public void setResourceId(String resourceId) {
this.resourceId = resourceId == null ? null : resourceId.trim();
}
public String getResourceName() {
return resourceName;
}
public void setResourceName(String resourceName) {
this.resourceName = resourceName == null ? null : resourceName.trim();
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url == null ? null : url.trim();
}
public String getResourceType() {
return resourceType;
}
public void setResourceType(String resourceType) {
this.resourceType = resourceType == null ? null : resourceType.trim();
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source == null ? null : source.trim();
}
public String getSchoolId() {
return schoolId;
}
public void setSchoolId(String schoolId) {
this.schoolId = schoolId == null ? null : schoolId.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}

@ -9,16 +9,26 @@ import io.swagger.annotations.ApiModelProperty;
public class SysResourceAndCourse {
private String id;
@ApiModelProperty("资源ID")
private String resourceId;
@ApiModelProperty("一级目录ID/课程ID")
private String oneId;
@ApiModelProperty("课程名称")
private String oneName;
@ApiModelProperty("二级目录ID/章ID")
private String twoId;
@ApiModelProperty("章名称")
private String twoName;
@ApiModelProperty("三级目录ID/节ID")
private String threeId;
private Integer resourceDataId;
@ApiModelProperty("节名称")
private String threeName;
public String getId() {
return id;
@ -28,6 +38,14 @@ public class SysResourceAndCourse {
this.id = id == null ? null : id.trim();
}
public String getResourceId() {
return resourceId;
}
public void setResourceId(String resourceId) {
this.resourceId = resourceId == null ? null : resourceId.trim();
}
public String getOneId() {
return oneId;
}
@ -36,6 +54,14 @@ public class SysResourceAndCourse {
this.oneId = oneId == null ? null : oneId.trim();
}
public String getOneName() {
return oneName;
}
public void setOneName(String oneName) {
this.oneName = oneName == null ? null : oneName.trim();
}
public String getTwoId() {
return twoId;
}
@ -44,6 +70,14 @@ public class SysResourceAndCourse {
this.twoId = twoId == null ? null : twoId.trim();
}
public String getTwoName() {
return twoName;
}
public void setTwoName(String twoName) {
this.twoName = twoName == null ? null : twoName.trim();
}
public String getThreeId() {
return threeId;
}
@ -52,11 +86,11 @@ public class SysResourceAndCourse {
this.threeId = threeId == null ? null : threeId.trim();
}
public Integer getResourceDataId() {
return resourceDataId;
public String getThreeName() {
return threeName;
}
public void setResourceDataId(Integer resourceDataId) {
this.resourceDataId = resourceDataId;
public void setThreeName(String threeName) {
this.threeName = threeName == null ? null : threeName.trim();
}
}

@ -174,6 +174,76 @@ public class SysResourceAndCourseExample {
return (Criteria) this;
}
public Criteria andResourceIdIsNull() {
addCriterion("resource_id is null");
return (Criteria) this;
}
public Criteria andResourceIdIsNotNull() {
addCriterion("resource_id is not null");
return (Criteria) this;
}
public Criteria andResourceIdEqualTo(String value) {
addCriterion("resource_id =", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotEqualTo(String value) {
addCriterion("resource_id <>", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdGreaterThan(String value) {
addCriterion("resource_id >", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdGreaterThanOrEqualTo(String value) {
addCriterion("resource_id >=", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdLessThan(String value) {
addCriterion("resource_id <", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdLessThanOrEqualTo(String value) {
addCriterion("resource_id <=", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdLike(String value) {
addCriterion("resource_id like", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotLike(String value) {
addCriterion("resource_id not like", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdIn(List<String> values) {
addCriterion("resource_id in", values, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotIn(List<String> values) {
addCriterion("resource_id not in", values, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdBetween(String value1, String value2) {
addCriterion("resource_id between", value1, value2, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotBetween(String value1, String value2) {
addCriterion("resource_id not between", value1, value2, "resourceId");
return (Criteria) this;
}
public Criteria andOneIdIsNull() {
addCriterion("one_id is null");
return (Criteria) this;
@ -244,6 +314,76 @@ public class SysResourceAndCourseExample {
return (Criteria) this;
}
public Criteria andOneNameIsNull() {
addCriterion("one_name is null");
return (Criteria) this;
}
public Criteria andOneNameIsNotNull() {
addCriterion("one_name is not null");
return (Criteria) this;
}
public Criteria andOneNameEqualTo(String value) {
addCriterion("one_name =", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameNotEqualTo(String value) {
addCriterion("one_name <>", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameGreaterThan(String value) {
addCriterion("one_name >", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameGreaterThanOrEqualTo(String value) {
addCriterion("one_name >=", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameLessThan(String value) {
addCriterion("one_name <", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameLessThanOrEqualTo(String value) {
addCriterion("one_name <=", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameLike(String value) {
addCriterion("one_name like", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameNotLike(String value) {
addCriterion("one_name not like", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameIn(List<String> values) {
addCriterion("one_name in", values, "oneName");
return (Criteria) this;
}
public Criteria andOneNameNotIn(List<String> values) {
addCriterion("one_name not in", values, "oneName");
return (Criteria) this;
}
public Criteria andOneNameBetween(String value1, String value2) {
addCriterion("one_name between", value1, value2, "oneName");
return (Criteria) this;
}
public Criteria andOneNameNotBetween(String value1, String value2) {
addCriterion("one_name not between", value1, value2, "oneName");
return (Criteria) this;
}
public Criteria andTwoIdIsNull() {
addCriterion("two_id is null");
return (Criteria) this;
@ -314,6 +454,76 @@ public class SysResourceAndCourseExample {
return (Criteria) this;
}
public Criteria andTwoNameIsNull() {
addCriterion("two_name is null");
return (Criteria) this;
}
public Criteria andTwoNameIsNotNull() {
addCriterion("two_name is not null");
return (Criteria) this;
}
public Criteria andTwoNameEqualTo(String value) {
addCriterion("two_name =", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameNotEqualTo(String value) {
addCriterion("two_name <>", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameGreaterThan(String value) {
addCriterion("two_name >", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameGreaterThanOrEqualTo(String value) {
addCriterion("two_name >=", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameLessThan(String value) {
addCriterion("two_name <", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameLessThanOrEqualTo(String value) {
addCriterion("two_name <=", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameLike(String value) {
addCriterion("two_name like", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameNotLike(String value) {
addCriterion("two_name not like", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameIn(List<String> values) {
addCriterion("two_name in", values, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameNotIn(List<String> values) {
addCriterion("two_name not in", values, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameBetween(String value1, String value2) {
addCriterion("two_name between", value1, value2, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameNotBetween(String value1, String value2) {
addCriterion("two_name not between", value1, value2, "twoName");
return (Criteria) this;
}
public Criteria andThreeIdIsNull() {
addCriterion("three_id is null");
return (Criteria) this;
@ -384,63 +594,73 @@ public class SysResourceAndCourseExample {
return (Criteria) this;
}
public Criteria andResourceDataIdIsNull() {
addCriterion("resource_data_id is null");
public Criteria andThreeNameIsNull() {
addCriterion("three_name is null");
return (Criteria) this;
}
public Criteria andThreeNameIsNotNull() {
addCriterion("three_name is not null");
return (Criteria) this;
}
public Criteria andThreeNameEqualTo(String value) {
addCriterion("three_name =", value, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdIsNotNull() {
addCriterion("resource_data_id is not null");
public Criteria andThreeNameNotEqualTo(String value) {
addCriterion("three_name <>", value, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdEqualTo(Integer value) {
addCriterion("resource_data_id =", value, "resourceDataId");
public Criteria andThreeNameGreaterThan(String value) {
addCriterion("three_name >", value, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdNotEqualTo(Integer value) {
addCriterion("resource_data_id <>", value, "resourceDataId");
public Criteria andThreeNameGreaterThanOrEqualTo(String value) {
addCriterion("three_name >=", value, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdGreaterThan(Integer value) {
addCriterion("resource_data_id >", value, "resourceDataId");
public Criteria andThreeNameLessThan(String value) {
addCriterion("three_name <", value, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdGreaterThanOrEqualTo(Integer value) {
addCriterion("resource_data_id >=", value, "resourceDataId");
public Criteria andThreeNameLessThanOrEqualTo(String value) {
addCriterion("three_name <=", value, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdLessThan(Integer value) {
addCriterion("resource_data_id <", value, "resourceDataId");
public Criteria andThreeNameLike(String value) {
addCriterion("three_name like", value, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdLessThanOrEqualTo(Integer value) {
addCriterion("resource_data_id <=", value, "resourceDataId");
public Criteria andThreeNameNotLike(String value) {
addCriterion("three_name not like", value, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdIn(List<Integer> values) {
addCriterion("resource_data_id in", values, "resourceDataId");
public Criteria andThreeNameIn(List<String> values) {
addCriterion("three_name in", values, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdNotIn(List<Integer> values) {
addCriterion("resource_data_id not in", values, "resourceDataId");
public Criteria andThreeNameNotIn(List<String> values) {
addCriterion("three_name not in", values, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdBetween(Integer value1, Integer value2) {
addCriterion("resource_data_id between", value1, value2, "resourceDataId");
public Criteria andThreeNameBetween(String value1, String value2) {
addCriterion("three_name between", value1, value2, "threeName");
return (Criteria) this;
}
public Criteria andResourceDataIdNotBetween(Integer value1, Integer value2) {
addCriterion("resource_data_id not between", value1, value2, "resourceDataId");
public Criteria andThreeNameNotBetween(String value1, String value2) {
addCriterion("three_name not between", value1, value2, "threeName");
return (Criteria) this;
}
}

@ -0,0 +1,740 @@
package com.sztzjy.resource_center.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysResourceExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysResourceExample() {
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 andResourceIdIsNull() {
addCriterion("resource_id is null");
return (Criteria) this;
}
public Criteria andResourceIdIsNotNull() {
addCriterion("resource_id is not null");
return (Criteria) this;
}
public Criteria andResourceIdEqualTo(String value) {
addCriterion("resource_id =", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotEqualTo(String value) {
addCriterion("resource_id <>", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdGreaterThan(String value) {
addCriterion("resource_id >", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdGreaterThanOrEqualTo(String value) {
addCriterion("resource_id >=", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdLessThan(String value) {
addCriterion("resource_id <", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdLessThanOrEqualTo(String value) {
addCriterion("resource_id <=", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdLike(String value) {
addCriterion("resource_id like", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotLike(String value) {
addCriterion("resource_id not like", value, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdIn(List<String> values) {
addCriterion("resource_id in", values, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotIn(List<String> values) {
addCriterion("resource_id not in", values, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdBetween(String value1, String value2) {
addCriterion("resource_id between", value1, value2, "resourceId");
return (Criteria) this;
}
public Criteria andResourceIdNotBetween(String value1, String value2) {
addCriterion("resource_id not between", value1, value2, "resourceId");
return (Criteria) this;
}
public Criteria andResourceNameIsNull() {
addCriterion("resource_name is null");
return (Criteria) this;
}
public Criteria andResourceNameIsNotNull() {
addCriterion("resource_name is not null");
return (Criteria) this;
}
public Criteria andResourceNameEqualTo(String value) {
addCriterion("resource_name =", value, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameNotEqualTo(String value) {
addCriterion("resource_name <>", value, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameGreaterThan(String value) {
addCriterion("resource_name >", value, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameGreaterThanOrEqualTo(String value) {
addCriterion("resource_name >=", value, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameLessThan(String value) {
addCriterion("resource_name <", value, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameLessThanOrEqualTo(String value) {
addCriterion("resource_name <=", value, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameLike(String value) {
addCriterion("resource_name like", value, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameNotLike(String value) {
addCriterion("resource_name not like", value, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameIn(List<String> values) {
addCriterion("resource_name in", values, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameNotIn(List<String> values) {
addCriterion("resource_name not in", values, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameBetween(String value1, String value2) {
addCriterion("resource_name between", value1, value2, "resourceName");
return (Criteria) this;
}
public Criteria andResourceNameNotBetween(String value1, String value2) {
addCriterion("resource_name not between", value1, value2, "resourceName");
return (Criteria) this;
}
public Criteria andUrlIsNull() {
addCriterion("url is null");
return (Criteria) this;
}
public Criteria andUrlIsNotNull() {
addCriterion("url is not null");
return (Criteria) this;
}
public Criteria andUrlEqualTo(String value) {
addCriterion("url =", value, "url");
return (Criteria) this;
}
public Criteria andUrlNotEqualTo(String value) {
addCriterion("url <>", value, "url");
return (Criteria) this;
}
public Criteria andUrlGreaterThan(String value) {
addCriterion("url >", value, "url");
return (Criteria) this;
}
public Criteria andUrlGreaterThanOrEqualTo(String value) {
addCriterion("url >=", value, "url");
return (Criteria) this;
}
public Criteria andUrlLessThan(String value) {
addCriterion("url <", value, "url");
return (Criteria) this;
}
public Criteria andUrlLessThanOrEqualTo(String value) {
addCriterion("url <=", value, "url");
return (Criteria) this;
}
public Criteria andUrlLike(String value) {
addCriterion("url like", value, "url");
return (Criteria) this;
}
public Criteria andUrlNotLike(String value) {
addCriterion("url not like", value, "url");
return (Criteria) this;
}
public Criteria andUrlIn(List<String> values) {
addCriterion("url in", values, "url");
return (Criteria) this;
}
public Criteria andUrlNotIn(List<String> values) {
addCriterion("url not in", values, "url");
return (Criteria) this;
}
public Criteria andUrlBetween(String value1, String value2) {
addCriterion("url between", value1, value2, "url");
return (Criteria) this;
}
public Criteria andUrlNotBetween(String value1, String value2) {
addCriterion("url not between", value1, value2, "url");
return (Criteria) this;
}
public Criteria andResourceTypeIsNull() {
addCriterion("resource_type is null");
return (Criteria) this;
}
public Criteria andResourceTypeIsNotNull() {
addCriterion("resource_type is not null");
return (Criteria) this;
}
public Criteria andResourceTypeEqualTo(String value) {
addCriterion("resource_type =", value, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeNotEqualTo(String value) {
addCriterion("resource_type <>", value, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeGreaterThan(String value) {
addCriterion("resource_type >", value, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeGreaterThanOrEqualTo(String value) {
addCriterion("resource_type >=", value, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeLessThan(String value) {
addCriterion("resource_type <", value, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeLessThanOrEqualTo(String value) {
addCriterion("resource_type <=", value, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeLike(String value) {
addCriterion("resource_type like", value, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeNotLike(String value) {
addCriterion("resource_type not like", value, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeIn(List<String> values) {
addCriterion("resource_type in", values, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeNotIn(List<String> values) {
addCriterion("resource_type not in", values, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeBetween(String value1, String value2) {
addCriterion("resource_type between", value1, value2, "resourceType");
return (Criteria) this;
}
public Criteria andResourceTypeNotBetween(String value1, String value2) {
addCriterion("resource_type not between", value1, value2, "resourceType");
return (Criteria) this;
}
public Criteria andSourceIsNull() {
addCriterion("source is null");
return (Criteria) this;
}
public Criteria andSourceIsNotNull() {
addCriterion("source is not null");
return (Criteria) this;
}
public Criteria andSourceEqualTo(String value) {
addCriterion("source =", value, "source");
return (Criteria) this;
}
public Criteria andSourceNotEqualTo(String value) {
addCriterion("source <>", value, "source");
return (Criteria) this;
}
public Criteria andSourceGreaterThan(String value) {
addCriterion("source >", value, "source");
return (Criteria) this;
}
public Criteria andSourceGreaterThanOrEqualTo(String value) {
addCriterion("source >=", value, "source");
return (Criteria) this;
}
public Criteria andSourceLessThan(String value) {
addCriterion("source <", value, "source");
return (Criteria) this;
}
public Criteria andSourceLessThanOrEqualTo(String value) {
addCriterion("source <=", value, "source");
return (Criteria) this;
}
public Criteria andSourceLike(String value) {
addCriterion("source like", value, "source");
return (Criteria) this;
}
public Criteria andSourceNotLike(String value) {
addCriterion("source not like", value, "source");
return (Criteria) this;
}
public Criteria andSourceIn(List<String> values) {
addCriterion("source in", values, "source");
return (Criteria) this;
}
public Criteria andSourceNotIn(List<String> values) {
addCriterion("source not in", values, "source");
return (Criteria) this;
}
public Criteria andSourceBetween(String value1, String value2) {
addCriterion("source between", value1, value2, "source");
return (Criteria) this;
}
public Criteria andSourceNotBetween(String value1, String value2) {
addCriterion("source not between", value1, value2, "source");
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 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 andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
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);
}
}
}

@ -9,17 +9,26 @@ import io.swagger.annotations.ApiModelProperty;
public class SysTopicAndCourse {
private String id;
@ApiModelProperty("题目ID")
private String topicId;
@ApiModelProperty("一级目录ID/课程ID")
private String oneId;
@ApiModelProperty("课程名称")
private String oneName;
@ApiModelProperty("二级目录ID/章ID")
private String twoId;
@ApiModelProperty("章名称")
private String twoName;
@ApiModelProperty("三级目录ID/节ID")
private String threeId;
@ApiModelProperty("题目ID")
private String topicId;
@ApiModelProperty("节名称")
private String threeName;
@ApiModelProperty("题目类型 0客观题 1案例题 2模型题")
private String topicType;
@ -32,6 +41,14 @@ public class SysTopicAndCourse {
this.id = id == null ? null : id.trim();
}
public String getTopicId() {
return topicId;
}
public void setTopicId(String topicId) {
this.topicId = topicId == null ? null : topicId.trim();
}
public String getOneId() {
return oneId;
}
@ -40,6 +57,14 @@ public class SysTopicAndCourse {
this.oneId = oneId == null ? null : oneId.trim();
}
public String getOneName() {
return oneName;
}
public void setOneName(String oneName) {
this.oneName = oneName == null ? null : oneName.trim();
}
public String getTwoId() {
return twoId;
}
@ -48,6 +73,14 @@ public class SysTopicAndCourse {
this.twoId = twoId == null ? null : twoId.trim();
}
public String getTwoName() {
return twoName;
}
public void setTwoName(String twoName) {
this.twoName = twoName == null ? null : twoName.trim();
}
public String getThreeId() {
return threeId;
}
@ -56,12 +89,12 @@ public class SysTopicAndCourse {
this.threeId = threeId == null ? null : threeId.trim();
}
public String getTopicId() {
return topicId;
public String getThreeName() {
return threeName;
}
public void setTopicId(String topicId) {
this.topicId = topicId == null ? null : topicId.trim();
public void setThreeName(String threeName) {
this.threeName = threeName == null ? null : threeName.trim();
}
public String getTopicType() {

@ -174,6 +174,76 @@ public class SysTopicAndCourseExample {
return (Criteria) this;
}
public Criteria andTopicIdIsNull() {
addCriterion("topic_id is null");
return (Criteria) this;
}
public Criteria andTopicIdIsNotNull() {
addCriterion("topic_id is not null");
return (Criteria) this;
}
public Criteria andTopicIdEqualTo(String value) {
addCriterion("topic_id =", value, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdNotEqualTo(String value) {
addCriterion("topic_id <>", value, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdGreaterThan(String value) {
addCriterion("topic_id >", value, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdGreaterThanOrEqualTo(String value) {
addCriterion("topic_id >=", value, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdLessThan(String value) {
addCriterion("topic_id <", value, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdLessThanOrEqualTo(String value) {
addCriterion("topic_id <=", value, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdLike(String value) {
addCriterion("topic_id like", value, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdNotLike(String value) {
addCriterion("topic_id not like", value, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdIn(List<String> values) {
addCriterion("topic_id in", values, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdNotIn(List<String> values) {
addCriterion("topic_id not in", values, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdBetween(String value1, String value2) {
addCriterion("topic_id between", value1, value2, "topicId");
return (Criteria) this;
}
public Criteria andTopicIdNotBetween(String value1, String value2) {
addCriterion("topic_id not between", value1, value2, "topicId");
return (Criteria) this;
}
public Criteria andOneIdIsNull() {
addCriterion("one_id is null");
return (Criteria) this;
@ -244,6 +314,76 @@ public class SysTopicAndCourseExample {
return (Criteria) this;
}
public Criteria andOneNameIsNull() {
addCriterion("one_name is null");
return (Criteria) this;
}
public Criteria andOneNameIsNotNull() {
addCriterion("one_name is not null");
return (Criteria) this;
}
public Criteria andOneNameEqualTo(String value) {
addCriterion("one_name =", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameNotEqualTo(String value) {
addCriterion("one_name <>", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameGreaterThan(String value) {
addCriterion("one_name >", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameGreaterThanOrEqualTo(String value) {
addCriterion("one_name >=", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameLessThan(String value) {
addCriterion("one_name <", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameLessThanOrEqualTo(String value) {
addCriterion("one_name <=", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameLike(String value) {
addCriterion("one_name like", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameNotLike(String value) {
addCriterion("one_name not like", value, "oneName");
return (Criteria) this;
}
public Criteria andOneNameIn(List<String> values) {
addCriterion("one_name in", values, "oneName");
return (Criteria) this;
}
public Criteria andOneNameNotIn(List<String> values) {
addCriterion("one_name not in", values, "oneName");
return (Criteria) this;
}
public Criteria andOneNameBetween(String value1, String value2) {
addCriterion("one_name between", value1, value2, "oneName");
return (Criteria) this;
}
public Criteria andOneNameNotBetween(String value1, String value2) {
addCriterion("one_name not between", value1, value2, "oneName");
return (Criteria) this;
}
public Criteria andTwoIdIsNull() {
addCriterion("two_id is null");
return (Criteria) this;
@ -314,6 +454,76 @@ public class SysTopicAndCourseExample {
return (Criteria) this;
}
public Criteria andTwoNameIsNull() {
addCriterion("two_name is null");
return (Criteria) this;
}
public Criteria andTwoNameIsNotNull() {
addCriterion("two_name is not null");
return (Criteria) this;
}
public Criteria andTwoNameEqualTo(String value) {
addCriterion("two_name =", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameNotEqualTo(String value) {
addCriterion("two_name <>", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameGreaterThan(String value) {
addCriterion("two_name >", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameGreaterThanOrEqualTo(String value) {
addCriterion("two_name >=", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameLessThan(String value) {
addCriterion("two_name <", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameLessThanOrEqualTo(String value) {
addCriterion("two_name <=", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameLike(String value) {
addCriterion("two_name like", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameNotLike(String value) {
addCriterion("two_name not like", value, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameIn(List<String> values) {
addCriterion("two_name in", values, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameNotIn(List<String> values) {
addCriterion("two_name not in", values, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameBetween(String value1, String value2) {
addCriterion("two_name between", value1, value2, "twoName");
return (Criteria) this;
}
public Criteria andTwoNameNotBetween(String value1, String value2) {
addCriterion("two_name not between", value1, value2, "twoName");
return (Criteria) this;
}
public Criteria andThreeIdIsNull() {
addCriterion("three_id is null");
return (Criteria) this;
@ -384,73 +594,73 @@ public class SysTopicAndCourseExample {
return (Criteria) this;
}
public Criteria andTopicIdIsNull() {
addCriterion("topic_id is null");
public Criteria andThreeNameIsNull() {
addCriterion("three_name is null");
return (Criteria) this;
}
public Criteria andTopicIdIsNotNull() {
addCriterion("topic_id is not null");
public Criteria andThreeNameIsNotNull() {
addCriterion("three_name is not null");
return (Criteria) this;
}
public Criteria andTopicIdEqualTo(String value) {
addCriterion("topic_id =", value, "topicId");
public Criteria andThreeNameEqualTo(String value) {
addCriterion("three_name =", value, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdNotEqualTo(String value) {
addCriterion("topic_id <>", value, "topicId");
public Criteria andThreeNameNotEqualTo(String value) {
addCriterion("three_name <>", value, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdGreaterThan(String value) {
addCriterion("topic_id >", value, "topicId");
public Criteria andThreeNameGreaterThan(String value) {
addCriterion("three_name >", value, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdGreaterThanOrEqualTo(String value) {
addCriterion("topic_id >=", value, "topicId");
public Criteria andThreeNameGreaterThanOrEqualTo(String value) {
addCriterion("three_name >=", value, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdLessThan(String value) {
addCriterion("topic_id <", value, "topicId");
public Criteria andThreeNameLessThan(String value) {
addCriterion("three_name <", value, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdLessThanOrEqualTo(String value) {
addCriterion("topic_id <=", value, "topicId");
public Criteria andThreeNameLessThanOrEqualTo(String value) {
addCriterion("three_name <=", value, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdLike(String value) {
addCriterion("topic_id like", value, "topicId");
public Criteria andThreeNameLike(String value) {
addCriterion("three_name like", value, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdNotLike(String value) {
addCriterion("topic_id not like", value, "topicId");
public Criteria andThreeNameNotLike(String value) {
addCriterion("three_name not like", value, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdIn(List<String> values) {
addCriterion("topic_id in", values, "topicId");
public Criteria andThreeNameIn(List<String> values) {
addCriterion("three_name in", values, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdNotIn(List<String> values) {
addCriterion("topic_id not in", values, "topicId");
public Criteria andThreeNameNotIn(List<String> values) {
addCriterion("three_name not in", values, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdBetween(String value1, String value2) {
addCriterion("topic_id between", value1, value2, "topicId");
public Criteria andThreeNameBetween(String value1, String value2) {
addCriterion("three_name between", value1, value2, "threeName");
return (Criteria) this;
}
public Criteria andTopicIdNotBetween(String value1, String value2) {
addCriterion("topic_id not between", value1, value2, "topicId");
public Criteria andThreeNameNotBetween(String value1, String value2) {
addCriterion("three_name not between", value1, value2, "threeName");
return (Criteria) this;
}

@ -0,0 +1,56 @@
package com.sztzjy.resource_center.entity.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;
import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysResourceDto {
@ApiModelProperty("资源ID")
private String resourceId;
@ApiModelProperty("资源名称")
private String resourceName;
@ApiModelProperty("资源类型 /视频/课件")
private String resourceType;
@ApiModelProperty("来源(内置/老师新增)")
private String source;
@ApiModelProperty("学校ID")
private String schoolId;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("所属课程ID")
private String oneId;
@ApiModelProperty("所属课程名称")
private String oneName;
@ApiModelProperty("所属章ID")
private String twoId;
@ApiModelProperty("所属章名称")
private String twoName;
@ApiModelProperty("所属节ID")
private String threeId;
@ApiModelProperty("所属节名称")
private String threeName;
@ApiModelProperty("资源文件")
private MultipartFile file;
}

@ -3,9 +3,13 @@ package com.sztzjy.resource_center.mapper;
import com.sztzjy.resource_center.entity.SysOneCatalog;
import com.sztzjy.resource_center.entity.SysOneCatalogExample;
import java.util.List;
import java.util.Map;
import com.sztzjy.resource_center.util.ResultEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface SysOneCatalogMapper {
long countByExample(SysOneCatalogExample example);
@ -29,4 +33,8 @@ public interface SysOneCatalogMapper {
int updateByPrimaryKeySelective(SysOneCatalog record);
int updateByPrimaryKey(SysOneCatalog record);
@Select("select one_id,one_name from sys_one_catalog order by create_time ASC")
List<Map<String, String>> getAllOneCatalogList();
}

@ -3,8 +3,10 @@ package com.sztzjy.resource_center.mapper;
import com.sztzjy.resource_center.entity.SysResourceAndCourse;
import com.sztzjy.resource_center.entity.SysResourceAndCourseExample;
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 SysResourceAndCourseMapper {
long countByExample(SysResourceAndCourseExample example);

@ -0,0 +1,41 @@
package com.sztzjy.resource_center.mapper;
import com.sztzjy.resource_center.entity.SysResource;
import com.sztzjy.resource_center.entity.SysResourceExample;
import java.util.List;
import com.sztzjy.resource_center.entity.dto.SysResourceDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SysResourceMapper {
long countByExample(SysResourceExample example);
int deleteByExample(SysResourceExample example);
int deleteByPrimaryKey(String resourceId);
int insert(SysResource record);
int insertSelective(SysResource record);
List<SysResource> selectByExample(SysResourceExample example);
SysResource selectByPrimaryKey(String resourceId);
int updateByExampleSelective(@Param("record") SysResource record, @Param("example") SysResourceExample example);
int updateByExample(@Param("record") SysResource record, @Param("example") SysResourceExample example);
int updateByPrimaryKeySelective(SysResource record);
int updateByPrimaryKey(SysResource record);
List<SysResourceDto> selectResource(@Param("oneId") String oneId,
@Param("twoId") String twoId,
@Param("threeId") String threeId,
@Param("resourceName") String resourceName);
}

@ -3,8 +3,13 @@ package com.sztzjy.resource_center.mapper;
import com.sztzjy.resource_center.entity.SysThreeCatalog;
import com.sztzjy.resource_center.entity.SysThreeCatalogExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface SysThreeCatalogMapper {
long countByExample(SysThreeCatalogExample example);
@ -27,4 +32,7 @@ public interface SysThreeCatalogMapper {
int updateByPrimaryKeySelective(SysThreeCatalog record);
int updateByPrimaryKey(SysThreeCatalog record);
@Select("select three_id,three_name from sys_three_catalog order by create_time ASC")
List<Map<String, String>> getAllThreeCatalogList();
}

@ -3,8 +3,13 @@ package com.sztzjy.resource_center.mapper;
import com.sztzjy.resource_center.entity.SysTwoCatalog;
import com.sztzjy.resource_center.entity.SysTwoCatalogExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface SysTwoCatalogMapper {
long countByExample(SysTwoCatalogExample example);
@ -27,4 +32,8 @@ public interface SysTwoCatalogMapper {
int updateByPrimaryKeySelective(SysTwoCatalog record);
int updateByPrimaryKey(SysTwoCatalog record);
@Select("select two_id,two_name from sys_two_catalog order by create_time ASC")
List<Map<String, String>> getAllTwoCatalogList();
}

@ -81,5 +81,9 @@ spring:
mybatis:
type-aliases-package: com.sztzjy.resource_center.entity
mapper-locations: classpath*:/mapper/*.xml
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#logging:
# level:
# com.sztzjy.resource_center.mapper: trace #

@ -45,12 +45,13 @@
<!-- <table tableName="sys_model" domainObjectName="SysModel" />-->
<!-- <table tableName="sys_model_question" domainObjectName="SysModelQuestion" />-->
<!-- <table tableName="sys_objective_question" domainObjectName="SysObjectiveQuestion" />-->
<table tableName="sys_one_catalog" domainObjectName="SysOneCatalog" />
<!-- <table tableName="sys_resource_and_course" domainObjectName="SysResourceAndCourse" />-->
<!-- <table tableName="sys_one_catalog" domainObjectName="SysOneCatalog" />-->
<!-- <table tableName="sys_resource" domainObjectName="SysResource" />-->
<table tableName="sys_resource_and_course" domainObjectName="SysResourceAndCourse" />
<!-- <table tableName="sys_resource_data" domainObjectName="SysResourceData" />-->
<!-- <table tableName="sys_school" domainObjectName="SysSchool" />-->
<!-- <table tableName="sys_three_catalog" domainObjectName="SysThreeCatalog" />-->
<!-- <table tableName="sys_topic_and_course" domainObjectName="SysTopicAndCourse" />-->
<table tableName="sys_topic_and_course" domainObjectName="SysTopicAndCourse" />
<!-- <table tableName="sys_two_catalog" domainObjectName="SysTwoCatalog" />-->
</context>

@ -3,10 +3,13 @@
<mapper namespace="com.sztzjy.resource_center.mapper.SysResourceAndCourseMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysResourceAndCourse">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="resource_id" jdbcType="VARCHAR" property="resourceId" />
<result column="one_id" jdbcType="VARCHAR" property="oneId" />
<result column="one_name" jdbcType="VARCHAR" property="oneName" />
<result column="two_id" jdbcType="VARCHAR" property="twoId" />
<result column="two_name" jdbcType="VARCHAR" property="twoName" />
<result column="three_id" jdbcType="VARCHAR" property="threeId" />
<result column="resource_data_id" jdbcType="INTEGER" property="resourceDataId" />
<result column="three_name" jdbcType="VARCHAR" property="threeName" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -67,7 +70,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, one_id, two_id, three_id, resource_data_id
id, resource_id, one_id, one_name, two_id, two_name, three_id, three_name
</sql>
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceAndCourseExample" resultMap="BaseResultMap">
select
@ -100,10 +103,12 @@
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysResourceAndCourse">
insert into sys_resource_and_course (id, one_id, two_id,
three_id, resource_data_id)
values (#{id,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR},
#{threeId,jdbcType=VARCHAR}, #{resourceDataId,jdbcType=INTEGER})
insert into sys_resource_and_course (id, resource_id, one_id,
one_name, two_id, two_name,
three_id, three_name)
values (#{id,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR},
#{oneName,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR}, #{twoName,jdbcType=VARCHAR},
#{threeId,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysResourceAndCourse">
insert into sys_resource_and_course
@ -111,34 +116,52 @@
<if test="id != null">
id,
</if>
<if test="resourceId != null">
resource_id,
</if>
<if test="oneId != null">
one_id,
</if>
<if test="oneName != null">
one_name,
</if>
<if test="twoId != null">
two_id,
</if>
<if test="twoName != null">
two_name,
</if>
<if test="threeId != null">
three_id,
</if>
<if test="resourceDataId != null">
resource_data_id,
<if test="threeName != null">
three_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="resourceId != null">
#{resourceId,jdbcType=VARCHAR},
</if>
<if test="oneId != null">
#{oneId,jdbcType=VARCHAR},
</if>
<if test="oneName != null">
#{oneName,jdbcType=VARCHAR},
</if>
<if test="twoId != null">
#{twoId,jdbcType=VARCHAR},
</if>
<if test="twoName != null">
#{twoName,jdbcType=VARCHAR},
</if>
<if test="threeId != null">
#{threeId,jdbcType=VARCHAR},
</if>
<if test="resourceDataId != null">
#{resourceDataId,jdbcType=INTEGER},
<if test="threeName != null">
#{threeName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
@ -154,17 +177,26 @@
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.resourceId != null">
resource_id = #{record.resourceId,jdbcType=VARCHAR},
</if>
<if test="record.oneId != null">
one_id = #{record.oneId,jdbcType=VARCHAR},
</if>
<if test="record.oneName != null">
one_name = #{record.oneName,jdbcType=VARCHAR},
</if>
<if test="record.twoId != null">
two_id = #{record.twoId,jdbcType=VARCHAR},
</if>
<if test="record.twoName != null">
two_name = #{record.twoName,jdbcType=VARCHAR},
</if>
<if test="record.threeId != null">
three_id = #{record.threeId,jdbcType=VARCHAR},
</if>
<if test="record.resourceDataId != null">
resource_data_id = #{record.resourceDataId,jdbcType=INTEGER},
<if test="record.threeName != null">
three_name = #{record.threeName,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
@ -174,10 +206,13 @@
<update id="updateByExample" parameterType="map">
update sys_resource_and_course
set id = #{record.id,jdbcType=VARCHAR},
resource_id = #{record.resourceId,jdbcType=VARCHAR},
one_id = #{record.oneId,jdbcType=VARCHAR},
one_name = #{record.oneName,jdbcType=VARCHAR},
two_id = #{record.twoId,jdbcType=VARCHAR},
two_name = #{record.twoName,jdbcType=VARCHAR},
three_id = #{record.threeId,jdbcType=VARCHAR},
resource_data_id = #{record.resourceDataId,jdbcType=INTEGER}
three_name = #{record.threeName,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -185,27 +220,39 @@
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysResourceAndCourse">
update sys_resource_and_course
<set>
<if test="resourceId != null">
resource_id = #{resourceId,jdbcType=VARCHAR},
</if>
<if test="oneId != null">
one_id = #{oneId,jdbcType=VARCHAR},
</if>
<if test="oneName != null">
one_name = #{oneName,jdbcType=VARCHAR},
</if>
<if test="twoId != null">
two_id = #{twoId,jdbcType=VARCHAR},
</if>
<if test="twoName != null">
two_name = #{twoName,jdbcType=VARCHAR},
</if>
<if test="threeId != null">
three_id = #{threeId,jdbcType=VARCHAR},
</if>
<if test="resourceDataId != null">
resource_data_id = #{resourceDataId,jdbcType=INTEGER},
<if test="threeName != null">
three_name = #{threeName,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysResourceAndCourse">
update sys_resource_and_course
set one_id = #{oneId,jdbcType=VARCHAR},
set resource_id = #{resourceId,jdbcType=VARCHAR},
one_id = #{oneId,jdbcType=VARCHAR},
one_name = #{oneName,jdbcType=VARCHAR},
two_id = #{twoId,jdbcType=VARCHAR},
two_name = #{twoName,jdbcType=VARCHAR},
three_id = #{threeId,jdbcType=VARCHAR},
resource_data_id = #{resourceDataId,jdbcType=INTEGER}
three_name = #{threeName,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

@ -0,0 +1,295 @@
<?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.resource_center.mapper.SysResourceMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysResource">
<id column="resource_id" jdbcType="VARCHAR" property="resourceId"/>
<result column="resource_name" jdbcType="VARCHAR" property="resourceName"/>
<result column="url" jdbcType="VARCHAR" property="url"/>
<result column="resource_type" jdbcType="VARCHAR" property="resourceType"/>
<result column="source" jdbcType="VARCHAR" property="source"/>
<result column="school_id" jdbcType="VARCHAR" property="schoolId"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</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">
resource_id
, resource_name, url, resource_type, source, school_id, create_time, update_time
</sql>
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample"
resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List"/>
from sys_resource
<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_resource
where resource_id = #{resourceId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete
from sys_resource
where resource_id = #{resourceId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample">
delete from sys_resource
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysResource">
insert into sys_resource (resource_id, resource_name, url,
resource_type, source, school_id,
create_time, update_time)
values (#{resourceId,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
#{resourceType,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
insert into sys_resource
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="resourceId != null">
resource_id,
</if>
<if test="resourceName != null">
resource_name,
</if>
<if test="url != null">
url,
</if>
<if test="resourceType != null">
resource_type,
</if>
<if test="source != null">
source,
</if>
<if test="schoolId != null">
school_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="resourceId != null">
#{resourceId,jdbcType=VARCHAR},
</if>
<if test="resourceName != null">
#{resourceName,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="resourceType != null">
#{resourceType,jdbcType=VARCHAR},
</if>
<if test="source != null">
#{source,jdbcType=VARCHAR},
</if>
<if test="schoolId != null">
#{schoolId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample"
resultType="java.lang.Long">
select count(*) from sys_resource
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update sys_resource
<set>
<if test="record.resourceId != null">
resource_id = #{record.resourceId,jdbcType=VARCHAR},
</if>
<if test="record.resourceName != null">
resource_name = #{record.resourceName,jdbcType=VARCHAR},
</if>
<if test="record.url != null">
url = #{record.url,jdbcType=VARCHAR},
</if>
<if test="record.resourceType != null">
resource_type = #{record.resourceType,jdbcType=VARCHAR},
</if>
<if test="record.source != null">
source = #{record.source,jdbcType=VARCHAR},
</if>
<if test="record.schoolId != null">
school_id = #{record.schoolId,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_resource
set resource_id = #{record.resourceId,jdbcType=VARCHAR},
resource_name = #{record.resourceName,jdbcType=VARCHAR},
url = #{record.url,jdbcType=VARCHAR},
resource_type = #{record.resourceType,jdbcType=VARCHAR},
source = #{record.source,jdbcType=VARCHAR},
school_id = #{record.schoolId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
update sys_resource
<set>
<if test="resourceName != null">
resource_name = #{resourceName,jdbcType=VARCHAR},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="resourceType != null">
resource_type = #{resourceType,jdbcType=VARCHAR},
</if>
<if test="source != null">
source = #{source,jdbcType=VARCHAR},
</if>
<if test="schoolId != null">
school_id = #{schoolId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where resource_id = #{resourceId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysResource">
update sys_resource
set resource_name = #{resourceName,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
resource_type = #{resourceType,jdbcType=VARCHAR},
source = #{source,jdbcType=VARCHAR},
school_id = #{schoolId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where resource_id = #{resourceId,jdbcType=VARCHAR}
</update>
<resultMap id="SelectResourceMap" type="com.sztzjy.resource_center.entity.dto.SysResourceDto">
<id column="resource_id" jdbcType="VARCHAR" property="resourceId"/>
<result column="resource_name" jdbcType="VARCHAR" property="resourceName"/>
<result column="resource_name" jdbcType="VARCHAR" property="resourceName"/>
<result column="resource_type" jdbcType="VARCHAR" property="resourceType"/>
<result column="one_name" jdbcType="VARCHAR" property="oneName"/>
<result column="two_name" jdbcType="VARCHAR" property="twoName"/>
<result column="three_name" jdbcType="VARCHAR" property="threeName"/>
</resultMap>
<select id="selectResource" parameterType="java.lang.String" resultMap="SelectResourceMap">
SELECT sr.resource_id,sr.resource_name,sr.resource_type,sra.one_name,sra.two_name,sra.three_name
FROM sys_resource sr
JOIN sys_resource_and_course sra ON sr.resource_id = sra.resource_id
<where>
<if test="oneId != null and oneId != ''">
sra.one_id = #{oneId}
</if>
<if test="twoId != null and twoId != ''">
and sra.two_id = #{twoId}
</if>
<if test="threeId != null and threeId != ''">
and sra.three_id = #{threeId}
</if>
<if test="resourceName != null and resourceName != ''">
and sr.resource_name = #{resourceName}
</if>
</where>
order by sr.create_time
</select>
</mapper>

@ -3,10 +3,13 @@
<mapper namespace="com.sztzjy.resource_center.mapper.SysTopicAndCourseMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysTopicAndCourse">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="topic_id" jdbcType="VARCHAR" property="topicId" />
<result column="one_id" jdbcType="VARCHAR" property="oneId" />
<result column="one_name" jdbcType="VARCHAR" property="oneName" />
<result column="two_id" jdbcType="VARCHAR" property="twoId" />
<result column="two_name" jdbcType="VARCHAR" property="twoName" />
<result column="three_id" jdbcType="VARCHAR" property="threeId" />
<result column="topic_id" jdbcType="VARCHAR" property="topicId" />
<result column="three_name" jdbcType="VARCHAR" property="threeName" />
<result column="topic_type" jdbcType="VARCHAR" property="topicType" />
</resultMap>
<sql id="Example_Where_Clause">
@ -68,7 +71,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, one_id, two_id, three_id, topic_id, topic_type
id, topic_id, one_id, one_name, two_id, two_name, three_id, three_name, topic_type
</sql>
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourseExample" resultMap="BaseResultMap">
select
@ -101,11 +104,13 @@
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
insert into sys_topic_and_course (id, one_id, two_id,
three_id, topic_id, topic_type
insert into sys_topic_and_course (id, topic_id, one_id,
one_name, two_id, two_name,
three_id, three_name, topic_type
)
values (#{id,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR},
#{threeId,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}
values (#{id,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, #{oneId,jdbcType=VARCHAR},
#{oneName,jdbcType=VARCHAR}, #{twoId,jdbcType=VARCHAR}, #{twoName,jdbcType=VARCHAR},
#{threeId,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
@ -114,17 +119,26 @@
<if test="id != null">
id,
</if>
<if test="topicId != null">
topic_id,
</if>
<if test="oneId != null">
one_id,
</if>
<if test="oneName != null">
one_name,
</if>
<if test="twoId != null">
two_id,
</if>
<if test="twoName != null">
two_name,
</if>
<if test="threeId != null">
three_id,
</if>
<if test="topicId != null">
topic_id,
<if test="threeName != null">
three_name,
</if>
<if test="topicType != null">
topic_type,
@ -134,17 +148,26 @@
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="topicId != null">
#{topicId,jdbcType=VARCHAR},
</if>
<if test="oneId != null">
#{oneId,jdbcType=VARCHAR},
</if>
<if test="oneName != null">
#{oneName,jdbcType=VARCHAR},
</if>
<if test="twoId != null">
#{twoId,jdbcType=VARCHAR},
</if>
<if test="twoName != null">
#{twoName,jdbcType=VARCHAR},
</if>
<if test="threeId != null">
#{threeId,jdbcType=VARCHAR},
</if>
<if test="topicId != null">
#{topicId,jdbcType=VARCHAR},
<if test="threeName != null">
#{threeName,jdbcType=VARCHAR},
</if>
<if test="topicType != null">
#{topicType,jdbcType=VARCHAR},
@ -163,17 +186,26 @@
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.topicId != null">
topic_id = #{record.topicId,jdbcType=VARCHAR},
</if>
<if test="record.oneId != null">
one_id = #{record.oneId,jdbcType=VARCHAR},
</if>
<if test="record.oneName != null">
one_name = #{record.oneName,jdbcType=VARCHAR},
</if>
<if test="record.twoId != null">
two_id = #{record.twoId,jdbcType=VARCHAR},
</if>
<if test="record.twoName != null">
two_name = #{record.twoName,jdbcType=VARCHAR},
</if>
<if test="record.threeId != null">
three_id = #{record.threeId,jdbcType=VARCHAR},
</if>
<if test="record.topicId != null">
topic_id = #{record.topicId,jdbcType=VARCHAR},
<if test="record.threeName != null">
three_name = #{record.threeName,jdbcType=VARCHAR},
</if>
<if test="record.topicType != null">
topic_type = #{record.topicType,jdbcType=VARCHAR},
@ -186,10 +218,13 @@
<update id="updateByExample" parameterType="map">
update sys_topic_and_course
set id = #{record.id,jdbcType=VARCHAR},
topic_id = #{record.topicId,jdbcType=VARCHAR},
one_id = #{record.oneId,jdbcType=VARCHAR},
one_name = #{record.oneName,jdbcType=VARCHAR},
two_id = #{record.twoId,jdbcType=VARCHAR},
two_name = #{record.twoName,jdbcType=VARCHAR},
three_id = #{record.threeId,jdbcType=VARCHAR},
topic_id = #{record.topicId,jdbcType=VARCHAR},
three_name = #{record.threeName,jdbcType=VARCHAR},
topic_type = #{record.topicType,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -198,17 +233,26 @@
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
update sys_topic_and_course
<set>
<if test="topicId != null">
topic_id = #{topicId,jdbcType=VARCHAR},
</if>
<if test="oneId != null">
one_id = #{oneId,jdbcType=VARCHAR},
</if>
<if test="oneName != null">
one_name = #{oneName,jdbcType=VARCHAR},
</if>
<if test="twoId != null">
two_id = #{twoId,jdbcType=VARCHAR},
</if>
<if test="twoName != null">
two_name = #{twoName,jdbcType=VARCHAR},
</if>
<if test="threeId != null">
three_id = #{threeId,jdbcType=VARCHAR},
</if>
<if test="topicId != null">
topic_id = #{topicId,jdbcType=VARCHAR},
<if test="threeName != null">
three_name = #{threeName,jdbcType=VARCHAR},
</if>
<if test="topicType != null">
topic_type = #{topicType,jdbcType=VARCHAR},
@ -218,10 +262,13 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysTopicAndCourse">
update sys_topic_and_course
set one_id = #{oneId,jdbcType=VARCHAR},
set topic_id = #{topicId,jdbcType=VARCHAR},
one_id = #{oneId,jdbcType=VARCHAR},
one_name = #{oneName,jdbcType=VARCHAR},
two_id = #{twoId,jdbcType=VARCHAR},
two_name = #{twoName,jdbcType=VARCHAR},
three_id = #{threeId,jdbcType=VARCHAR},
topic_id = #{topicId,jdbcType=VARCHAR},
three_name = #{threeName,jdbcType=VARCHAR},
topic_type = #{topicType,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>

Loading…
Cancel
Save