xiaoCJ 9 months ago
parent 659ad3f5bb
commit 1675fbe6f4

@ -45,7 +45,7 @@ public class CourseConfigController {
@AnonymousAccess
@ApiOperation("本地上传资源")
@PostMapping("uploadLocal")
public ResultEntity<String> uploadLocal(@ApiParam("") @RequestBody SysResourceDto dto) {
public ResultEntity<String> uploadLocal(@ModelAttribute SysResourceDto dto) {
if (dto.getFile() == null) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请上传文件!");
}
@ -67,7 +67,7 @@ public class CourseConfigController {
|| extension.equals(".xlsx") || extension.equals(".xls")
|| extension.equals(".doc") || extension.equals(".docx")) {
sysResource.setResourceType("课件");
} else if (extension.equals(".mp4") || extension.equals(".wmv") || extension.equals(".wmv")) {
} else if (extension.equals(".mp4") || extension.equals(".wmv") || extension.equals(".avi")) {
sysResource.setResourceType("视频");
} else {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "文件类型不支持!");
@ -76,9 +76,12 @@ public class CourseConfigController {
String uuid = IdUtil.randomUUID();
sysResource.setResourceId(uuid);
sysResource.setPictureUrl(pictureName);
sysResource.setOntTag(dto.getOneId());
sysResource.setOneTag(dto.getOneId());
sysResource.setOneName(dto.getOneName());
sysResource.setTwoTag(dto.getTwoId());
sysResource.setTwoName(dto.getTwoName());
sysResource.setThreeTag(dto.getThreeId());
sysResource.setThreeName(dto.getThreeName());
sysResource.setUrl(url);
sysResource.setSource(dto.getSource()); //管理员或者 xx学校
sysResource.setResourceName(dto.getResourceName());

@ -84,14 +84,13 @@ public class CourseManageController {
}
@AnonymousAccess
@ApiOperation("删除课程")
@PostMapping("deleteOneCatalog")
public ResultEntity<String> deleteOneCatalog(@RequestParam String oneId) {
sysOneCatalogMapper.deleteByPrimaryKey(oneId);
//删除课程资源的绑定关系
SysResourceAndCourseExample example =new SysResourceAndCourseExample();
SysResourceAndCourseExample example = new SysResourceAndCourseExample();
example.createCriteria().andOneIdEqualTo(oneId);
sysResourceAndCourseMapper.deleteByExample(example);
return new ResultEntity<>(HttpStatus.OK, "删除成功");
@ -125,4 +124,5 @@ public class CourseManageController {
PageInfo<SysOneCatalog> pageInfo = new PageInfo(sysOneCatalogs);
return new ResultEntity<PageInfo<SysOneCatalog>>(pageInfo);
}
}

@ -3,6 +3,7 @@ package com.sztzjy.resource_center.controller;
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.SysObjectiveQuestions;
import com.sztzjy.resource_center.entity.SysObjectiveQuestionsExample;
import com.sztzjy.resource_center.entity.SysTopicAndCourse;
@ -122,14 +123,15 @@ public class TopicResourceController {
return new ResultEntity<>(HttpStatus.OK, "添加成功!");
}
@AnonymousAccess
@ApiOperation("条件查询")
@PostMapping("selectTopicByConditions") //todo 关于老师删除的题库如何查询
private ResultEntity<PageInfo<SysObjectiveQuestionsDto>> selectTopicByConditions(@RequestParam Integer index,
@RequestParam Integer size,
@RequestParam String oneID,
@RequestParam String twoID,
@RequestParam String threeID,
@ApiParam("题干") @RequestParam String content) {
@RequestParam(required = false) String oneID,
@RequestParam (required = false)String twoID,
@RequestParam (required = false)String threeID,
@ApiParam("题干") @RequestParam (required = false)String content) {
PageHelper.startPage(index, size);
List<SysObjectiveQuestionsDto> list = sysObjectiveQuestionMapper.selectTopicByConditions(oneID, twoID, threeID, content);
PageInfo<SysObjectiveQuestionsDto> pageInfo = new PageInfo(list);

@ -29,14 +29,20 @@ public class SysResource {
private String source;
@ApiModelProperty("一级目录标签")
private String ontTag;
private String oneTag;
private String oneName;
@ApiModelProperty("二级目录标签")
private String twoTag;
private String twoName;
@ApiModelProperty("三级目录标签")
private String threeTag;
private String threeName;
@ApiModelProperty("启用状态 1已启用 0未启用")
private Integer status;
@ -91,12 +97,20 @@ public class SysResource {
this.source = source == null ? null : source.trim();
}
public String getOntTag() {
return ontTag;
public String getOneTag() {
return oneTag;
}
public void setOneTag(String oneTag) {
this.oneTag = oneTag == null ? null : oneTag.trim();
}
public String getOneName() {
return oneName;
}
public void setOntTag(String ontTag) {
this.ontTag = ontTag == null ? null : ontTag.trim();
public void setOneName(String oneName) {
this.oneName = oneName == null ? null : oneName.trim();
}
public String getTwoTag() {
@ -107,6 +121,14 @@ public class SysResource {
this.twoTag = twoTag == null ? null : twoTag.trim();
}
public String getTwoName() {
return twoName;
}
public void setTwoName(String twoName) {
this.twoName = twoName == null ? null : twoName.trim();
}
public String getThreeTag() {
return threeTag;
}
@ -115,6 +137,14 @@ public class SysResource {
this.threeTag = threeTag == null ? null : threeTag.trim();
}
public String getThreeName() {
return threeName;
}
public void setThreeName(String threeName) {
this.threeName = threeName == null ? null : threeName.trim();
}
public Integer getStatus() {
return status;
}

@ -525,73 +525,143 @@ public class SysResourceExample {
return (Criteria) this;
}
public Criteria andOntTagIsNull() {
addCriterion("ont_tag is null");
public Criteria andOneTagIsNull() {
addCriterion("one_tag is null");
return (Criteria) this;
}
public Criteria andOntTagIsNotNull() {
addCriterion("ont_tag is not null");
public Criteria andOneTagIsNotNull() {
addCriterion("one_tag is not null");
return (Criteria) this;
}
public Criteria andOntTagEqualTo(String value) {
addCriterion("ont_tag =", value, "ontTag");
public Criteria andOneTagEqualTo(String value) {
addCriterion("one_tag =", value, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagNotEqualTo(String value) {
addCriterion("ont_tag <>", value, "ontTag");
public Criteria andOneTagNotEqualTo(String value) {
addCriterion("one_tag <>", value, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagGreaterThan(String value) {
addCriterion("ont_tag >", value, "ontTag");
public Criteria andOneTagGreaterThan(String value) {
addCriterion("one_tag >", value, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagGreaterThanOrEqualTo(String value) {
addCriterion("ont_tag >=", value, "ontTag");
public Criteria andOneTagGreaterThanOrEqualTo(String value) {
addCriterion("one_tag >=", value, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagLessThan(String value) {
addCriterion("ont_tag <", value, "ontTag");
public Criteria andOneTagLessThan(String value) {
addCriterion("one_tag <", value, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagLessThanOrEqualTo(String value) {
addCriterion("ont_tag <=", value, "ontTag");
public Criteria andOneTagLessThanOrEqualTo(String value) {
addCriterion("one_tag <=", value, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagLike(String value) {
addCriterion("ont_tag like", value, "ontTag");
public Criteria andOneTagLike(String value) {
addCriterion("one_tag like", value, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagNotLike(String value) {
addCriterion("ont_tag not like", value, "ontTag");
public Criteria andOneTagNotLike(String value) {
addCriterion("one_tag not like", value, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagIn(List<String> values) {
addCriterion("ont_tag in", values, "ontTag");
public Criteria andOneTagIn(List<String> values) {
addCriterion("one_tag in", values, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagNotIn(List<String> values) {
addCriterion("ont_tag not in", values, "ontTag");
public Criteria andOneTagNotIn(List<String> values) {
addCriterion("one_tag not in", values, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagBetween(String value1, String value2) {
addCriterion("ont_tag between", value1, value2, "ontTag");
public Criteria andOneTagBetween(String value1, String value2) {
addCriterion("one_tag between", value1, value2, "oneTag");
return (Criteria) this;
}
public Criteria andOntTagNotBetween(String value1, String value2) {
addCriterion("ont_tag not between", value1, value2, "ontTag");
public Criteria andOneTagNotBetween(String value1, String value2) {
addCriterion("one_tag not between", value1, value2, "oneTag");
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;
}
@ -665,6 +735,76 @@ public class SysResourceExample {
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 andThreeTagIsNull() {
addCriterion("three_tag is null");
return (Criteria) this;
@ -735,6 +875,76 @@ public class SysResourceExample {
return (Criteria) this;
}
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 andThreeNameNotEqualTo(String value) {
addCriterion("three_name <>", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameGreaterThan(String value) {
addCriterion("three_name >", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameGreaterThanOrEqualTo(String value) {
addCriterion("three_name >=", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameLessThan(String value) {
addCriterion("three_name <", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameLessThanOrEqualTo(String value) {
addCriterion("three_name <=", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameLike(String value) {
addCriterion("three_name like", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameNotLike(String value) {
addCriterion("three_name not like", value, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameIn(List<String> values) {
addCriterion("three_name in", values, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameNotIn(List<String> values) {
addCriterion("three_name not in", values, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameBetween(String value1, String value2) {
addCriterion("three_name between", value1, value2, "threeName");
return (Criteria) this;
}
public Criteria andThreeNameNotBetween(String value1, String value2) {
addCriterion("three_name not between", value1, value2, "threeName");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
return (Criteria) this;

@ -57,7 +57,6 @@ public class SysResourceDto {
@ApiModelProperty("资源文件")
private MultipartFile file;
@ApiModelProperty("封面图片")
private MultipartFile pictureUrl;
}

@ -4,7 +4,6 @@ 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
@ -31,8 +30,9 @@ public interface SysResourceMapper {
int updateByPrimaryKey(SysResource record);
List<SysResource> selectResource(@Param("oneId") String oneId,
@Param("twoId") String twoId,
@Param("threeId") String threeId,
@Param("resourceName") String resourceName);
@Param("twoId") String twoId,
@Param("threeId") String threeId,
@Param("resourceName") String resourceName);
}

@ -45,14 +45,14 @@
<!-- <table tableName="sys_model" domainObjectName="SysModel" />-->
<!-- <table tableName="sys_model_question" domainObjectName="SysModelQuestion" />-->
<!-- <table tableName="sys_objective_question" domainObjectName="SysObjectiveQuestions" />-->
<table tableName="sys_one_catalog" domainObjectName="SysOneCatalog" />
<!-- <table tableName="sys_resource" domainObjectName="SysResource" />-->
<!-- <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_three_catalog" domainObjectName="SysThreeCatalog" />-->
<!-- <table tableName="sys_topic_and_course" domainObjectName="SysTopicAndCourse" />-->
<table tableName="sys_two_catalog" domainObjectName="SysTwoCatalog" />
<!-- <table tableName="sys_two_catalog" domainObjectName="SysTwoCatalog" />-->
</context>

@ -396,19 +396,19 @@
JOIN sys_topic_and_course st
on sb.objective_id = st.topic_id
<where>
<if test="oneID != null and oneID != ">
one_id = #{oneID}
<if test="oneID != null and oneID != ''">
sb.one_id = #{oneID}
</if>
<if test="twoID != null and twoID != ">
and two_id = #{twoID}
<if test="twoID != null and twoID != ''">
and sb.two_id = #{twoID}
</if>
<if test="threeId != null and threeId != ">
and three_id = #{threeId}
<if test="threeID != null and threeID != '' ">
and sb.three_id = #{threeID}
</if>
<if test="content != null and content != ''">
and content = #{content}
and sb.content = #{content}
</if>
</where>>
order by create_time
</where>
order by sb.create_time
</select>
</mapper>

@ -8,9 +8,12 @@
<result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
<result column="resource_type" jdbcType="VARCHAR" property="resourceType" />
<result column="source" jdbcType="VARCHAR" property="source" />
<result column="ont_tag" jdbcType="VARCHAR" property="ontTag" />
<result column="one_tag" jdbcType="VARCHAR" property="oneTag" />
<result column="one_name" jdbcType="VARCHAR" property="oneName" />
<result column="two_tag" jdbcType="VARCHAR" property="twoTag" />
<result column="two_name" jdbcType="VARCHAR" property="twoName" />
<result column="three_tag" jdbcType="VARCHAR" property="threeTag" />
<result column="three_name" jdbcType="VARCHAR" property="threeName" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
@ -73,8 +76,8 @@
</where>
</sql>
<sql id="Base_Column_List">
resource_id, resource_name, url, picture_url, resource_type, source, ont_tag, two_tag,
three_tag, status, create_time
resource_id, resource_name, url, picture_url, resource_type, source, one_tag, one_name,
two_tag, two_name, three_tag, three_name, status, create_time
</sql>
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample" resultMap="BaseResultMap">
select
@ -109,11 +112,13 @@
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysResource">
insert into sys_resource (resource_id, resource_name, url,
picture_url, resource_type, source,
ont_tag, two_tag, three_tag,
one_tag, one_name, two_tag,
two_name, three_tag, three_name,
status, create_time)
values (#{resourceId,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
#{pictureUrl,jdbcType=VARCHAR}, #{resourceType,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR},
#{ontTag,jdbcType=VARCHAR}, #{twoTag,jdbcType=VARCHAR}, #{threeTag,jdbcType=VARCHAR},
#{oneTag,jdbcType=VARCHAR}, #{oneName,jdbcType=VARCHAR}, #{twoTag,jdbcType=VARCHAR},
#{twoName,jdbcType=VARCHAR}, #{threeTag,jdbcType=VARCHAR}, #{threeName,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
@ -137,15 +142,24 @@
<if test="source != null">
source,
</if>
<if test="ontTag != null">
ont_tag,
<if test="oneTag != null">
one_tag,
</if>
<if test="oneName != null">
one_name,
</if>
<if test="twoTag != null">
two_tag,
</if>
<if test="twoName != null">
two_name,
</if>
<if test="threeTag != null">
three_tag,
</if>
<if test="threeName != null">
three_name,
</if>
<if test="status != null">
status,
</if>
@ -172,15 +186,24 @@
<if test="source != null">
#{source,jdbcType=VARCHAR},
</if>
<if test="ontTag != null">
#{ontTag,jdbcType=VARCHAR},
<if test="oneTag != null">
#{oneTag,jdbcType=VARCHAR},
</if>
<if test="oneName != null">
#{oneName,jdbcType=VARCHAR},
</if>
<if test="twoTag != null">
#{twoTag,jdbcType=VARCHAR},
</if>
<if test="twoName != null">
#{twoName,jdbcType=VARCHAR},
</if>
<if test="threeTag != null">
#{threeTag,jdbcType=VARCHAR},
</if>
<if test="threeName != null">
#{threeName,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
@ -216,15 +239,24 @@
<if test="record.source != null">
source = #{record.source,jdbcType=VARCHAR},
</if>
<if test="record.ontTag != null">
ont_tag = #{record.ontTag,jdbcType=VARCHAR},
<if test="record.oneTag != null">
one_tag = #{record.oneTag,jdbcType=VARCHAR},
</if>
<if test="record.oneName != null">
one_name = #{record.oneName,jdbcType=VARCHAR},
</if>
<if test="record.twoTag != null">
two_tag = #{record.twoTag,jdbcType=VARCHAR},
</if>
<if test="record.twoName != null">
two_name = #{record.twoName,jdbcType=VARCHAR},
</if>
<if test="record.threeTag != null">
three_tag = #{record.threeTag,jdbcType=VARCHAR},
</if>
<if test="record.threeName != null">
three_name = #{record.threeName,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
@ -244,9 +276,12 @@
picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
resource_type = #{record.resourceType,jdbcType=VARCHAR},
source = #{record.source,jdbcType=VARCHAR},
ont_tag = #{record.ontTag,jdbcType=VARCHAR},
one_tag = #{record.oneTag,jdbcType=VARCHAR},
one_name = #{record.oneName,jdbcType=VARCHAR},
two_tag = #{record.twoTag,jdbcType=VARCHAR},
two_name = #{record.twoName,jdbcType=VARCHAR},
three_tag = #{record.threeTag,jdbcType=VARCHAR},
three_name = #{record.threeName,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
@ -271,15 +306,24 @@
<if test="source != null">
source = #{source,jdbcType=VARCHAR},
</if>
<if test="ontTag != null">
ont_tag = #{ontTag,jdbcType=VARCHAR},
<if test="oneTag != null">
one_tag = #{oneTag,jdbcType=VARCHAR},
</if>
<if test="oneName != null">
one_name = #{oneName,jdbcType=VARCHAR},
</if>
<if test="twoTag != null">
two_tag = #{twoTag,jdbcType=VARCHAR},
</if>
<if test="twoName != null">
two_name = #{twoName,jdbcType=VARCHAR},
</if>
<if test="threeTag != null">
three_tag = #{threeTag,jdbcType=VARCHAR},
</if>
<if test="threeName != null">
three_name = #{threeName,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
@ -296,38 +340,21 @@
picture_url = #{pictureUrl,jdbcType=VARCHAR},
resource_type = #{resourceType,jdbcType=VARCHAR},
source = #{source,jdbcType=VARCHAR},
ont_tag = #{ontTag,jdbcType=VARCHAR},
one_tag = #{oneTag,jdbcType=VARCHAR},
one_name = #{oneName,jdbcType=VARCHAR},
two_tag = #{twoTag,jdbcType=VARCHAR},
two_name = #{twoName,jdbcType=VARCHAR},
three_tag = #{threeTag,jdbcType=VARCHAR},
three_name = #{threeName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where resource_id = #{resourceId,jdbcType=VARCHAR}
</update>
<!-- <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>-->
<select id="selectResource" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT *
FROM sys_resource
join
<where>
<if test="oneId != null and oneId != ''">
ont_tag = #{oneId}

Loading…
Cancel
Save