实训案例内置写死一些资料,所有学校都可见

master
wanghb 1 year ago
parent d5bcd16d64
commit fe704bc0e5

@ -8,7 +8,7 @@ public class TrainingLessonPlan {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column sys_training_lesson_plan.id
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
private String id;
@ -17,7 +17,7 @@ public class TrainingLessonPlan {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column sys_training_lesson_plan.name
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
private String name;
@ -26,7 +26,7 @@ public class TrainingLessonPlan {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column sys_training_lesson_plan.file_path
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
private String filePath;
@ -35,7 +35,7 @@ public class TrainingLessonPlan {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column sys_training_lesson_plan.school_id
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
private Integer schoolId;
@ -44,7 +44,7 @@ public class TrainingLessonPlan {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column sys_training_lesson_plan.creator_id
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
private Integer creatorId;
@ -53,7 +53,7 @@ public class TrainingLessonPlan {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column sys_training_lesson_plan.creator_name
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
private String creatorName;
@ -62,17 +62,26 @@ public class TrainingLessonPlan {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column sys_training_lesson_plan.create_time
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column sys_training_lesson_plan.built_data
*
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
private Integer builtData;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column sys_training_lesson_plan.id
*
* @return the value of sys_training_lesson_plan.id
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public String getId() {
return id;
@ -84,7 +93,7 @@ public class TrainingLessonPlan {
*
* @param id the value for sys_training_lesson_plan.id
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void setId(String id) {
this.id = id == null ? null : id.trim();
@ -96,7 +105,7 @@ public class TrainingLessonPlan {
*
* @return the value of sys_training_lesson_plan.name
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public String getName() {
return name;
@ -108,7 +117,7 @@ public class TrainingLessonPlan {
*
* @param name the value for sys_training_lesson_plan.name
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
@ -120,7 +129,7 @@ public class TrainingLessonPlan {
*
* @return the value of sys_training_lesson_plan.file_path
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public String getFilePath() {
return filePath;
@ -132,7 +141,7 @@ public class TrainingLessonPlan {
*
* @param filePath the value for sys_training_lesson_plan.file_path
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void setFilePath(String filePath) {
this.filePath = filePath == null ? null : filePath.trim();
@ -144,7 +153,7 @@ public class TrainingLessonPlan {
*
* @return the value of sys_training_lesson_plan.school_id
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public Integer getSchoolId() {
return schoolId;
@ -156,7 +165,7 @@ public class TrainingLessonPlan {
*
* @param schoolId the value for sys_training_lesson_plan.school_id
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void setSchoolId(Integer schoolId) {
this.schoolId = schoolId;
@ -168,7 +177,7 @@ public class TrainingLessonPlan {
*
* @return the value of sys_training_lesson_plan.creator_id
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public Integer getCreatorId() {
return creatorId;
@ -180,7 +189,7 @@ public class TrainingLessonPlan {
*
* @param creatorId the value for sys_training_lesson_plan.creator_id
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void setCreatorId(Integer creatorId) {
this.creatorId = creatorId;
@ -192,7 +201,7 @@ public class TrainingLessonPlan {
*
* @return the value of sys_training_lesson_plan.creator_name
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public String getCreatorName() {
return creatorName;
@ -204,7 +213,7 @@ public class TrainingLessonPlan {
*
* @param creatorName the value for sys_training_lesson_plan.creator_name
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void setCreatorName(String creatorName) {
this.creatorName = creatorName == null ? null : creatorName.trim();
@ -216,7 +225,7 @@ public class TrainingLessonPlan {
*
* @return the value of sys_training_lesson_plan.create_time
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public Date getCreateTime() {
return createTime;
@ -228,9 +237,33 @@ public class TrainingLessonPlan {
*
* @param createTime the value for sys_training_lesson_plan.create_time
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column sys_training_lesson_plan.built_data
*
* @return the value of sys_training_lesson_plan.built_data
*
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public Integer getBuiltData() {
return builtData;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column sys_training_lesson_plan.built_data
*
* @param builtData the value for sys_training_lesson_plan.built_data
*
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void setBuiltData(Integer builtData) {
this.builtData = builtData;
}
}

@ -9,7 +9,7 @@ public class TrainingLessonPlanExample {
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
protected String orderByClause;
@ -17,7 +17,7 @@ public class TrainingLessonPlanExample {
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
protected boolean distinct;
@ -25,7 +25,7 @@ public class TrainingLessonPlanExample {
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
protected List<Criteria> oredCriteria;
@ -33,7 +33,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public TrainingLessonPlanExample() {
oredCriteria = new ArrayList<>();
@ -43,7 +43,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
@ -53,7 +53,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public String getOrderByClause() {
return orderByClause;
@ -63,7 +63,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
@ -73,7 +73,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public boolean isDistinct() {
return distinct;
@ -83,7 +83,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
@ -93,7 +93,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
@ -103,7 +103,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
@ -115,7 +115,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
@ -129,7 +129,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
@ -140,7 +140,7 @@ public class TrainingLessonPlanExample {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public void clear() {
oredCriteria.clear();
@ -152,7 +152,7 @@ public class TrainingLessonPlanExample {
* This class was generated by MyBatis Generator.
* This class corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
@ -654,13 +654,73 @@ public class TrainingLessonPlanExample {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andBuiltDataIsNull() {
addCriterion("built_data is null");
return (Criteria) this;
}
public Criteria andBuiltDataIsNotNull() {
addCriterion("built_data is not null");
return (Criteria) this;
}
public Criteria andBuiltDataEqualTo(Integer value) {
addCriterion("built_data =", value, "builtData");
return (Criteria) this;
}
public Criteria andBuiltDataNotEqualTo(Integer value) {
addCriterion("built_data <>", value, "builtData");
return (Criteria) this;
}
public Criteria andBuiltDataGreaterThan(Integer value) {
addCriterion("built_data >", value, "builtData");
return (Criteria) this;
}
public Criteria andBuiltDataGreaterThanOrEqualTo(Integer value) {
addCriterion("built_data >=", value, "builtData");
return (Criteria) this;
}
public Criteria andBuiltDataLessThan(Integer value) {
addCriterion("built_data <", value, "builtData");
return (Criteria) this;
}
public Criteria andBuiltDataLessThanOrEqualTo(Integer value) {
addCriterion("built_data <=", value, "builtData");
return (Criteria) this;
}
public Criteria andBuiltDataIn(List<Integer> values) {
addCriterion("built_data in", values, "builtData");
return (Criteria) this;
}
public Criteria andBuiltDataNotIn(List<Integer> values) {
addCriterion("built_data not in", values, "builtData");
return (Criteria) this;
}
public Criteria andBuiltDataBetween(Integer value1, Integer value2) {
addCriterion("built_data between", value1, value2, "builtData");
return (Criteria) this;
}
public Criteria andBuiltDataNotBetween(Integer value1, Integer value2) {
addCriterion("built_data not between", value1, value2, "builtData");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated do_not_delete_during_merge Thu Jul 06 16:31:12 CST 2023
* @mbg.generated do_not_delete_during_merge Thu Mar 07 15:03:26 CST 2024
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
@ -672,7 +732,7 @@ public class TrainingLessonPlanExample {
* This class was generated by MyBatis Generator.
* This class corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
public static class Criterion {
private String condition;

@ -6,14 +6,13 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TrainingLessonPlanMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
long countByExample(TrainingLessonPlanExample example);
@ -21,7 +20,7 @@ public interface TrainingLessonPlanMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
int deleteByExample(TrainingLessonPlanExample example);
@ -29,7 +28,7 @@ public interface TrainingLessonPlanMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
int deleteByPrimaryKey(String id);
@ -37,7 +36,7 @@ public interface TrainingLessonPlanMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
int insert(TrainingLessonPlan record);
@ -45,7 +44,7 @@ public interface TrainingLessonPlanMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
int insertSelective(TrainingLessonPlan record);
@ -53,7 +52,7 @@ public interface TrainingLessonPlanMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
List<TrainingLessonPlan> selectByExample(TrainingLessonPlanExample example);
@ -61,7 +60,7 @@ public interface TrainingLessonPlanMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
TrainingLessonPlan selectByPrimaryKey(String id);
@ -69,7 +68,7 @@ public interface TrainingLessonPlanMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
int updateByExampleSelective(@Param("record") TrainingLessonPlan record, @Param("example") TrainingLessonPlanExample example);
@ -77,7 +76,7 @@ public interface TrainingLessonPlanMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
int updateByExample(@Param("record") TrainingLessonPlan record, @Param("example") TrainingLessonPlanExample example);
@ -85,7 +84,7 @@ public interface TrainingLessonPlanMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
int updateByPrimaryKeySelective(TrainingLessonPlan record);
@ -93,7 +92,7 @@ public interface TrainingLessonPlanMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_training_lesson_plan
*
* @mbg.generated Thu Jul 06 16:31:12 CST 2023
* @mbg.generated Thu Mar 07 15:03:26 CST 2024
*/
int updateByPrimaryKey(TrainingLessonPlan record);
}

@ -8,8 +8,10 @@ import com.sztzjy.forex.trading_trading.config.security.JwtUser;
import com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan;
import com.sztzjy.forex.trading_trading.entity.TrainingLessonPlanExample;
import com.sztzjy.forex.trading_trading.mappers.TrainingLessonPlanMapper;
import com.sztzjy.forex.trading_trading.util.ResultEntity;
import com.sztzjy.forex.trading_trading.util.file.IFileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
@ -40,6 +42,7 @@ public class TrainingLessonPlanService {
trainingLessonPlan.setCreatorId(Integer.valueOf(currentUser.getUserId()));
trainingLessonPlan.setCreatorName(currentUser.getName());
trainingLessonPlan.setSchoolId(currentUser.getSchoolId());
trainingLessonPlan.setBuiltData(0);
trainingLessonPlanMapper.insert(trainingLessonPlan);
}
@ -62,7 +65,8 @@ public class TrainingLessonPlanService {
if (StringUtils.hasText(name)) {
criteria.andNameLike('%' + name + '%');
}
// criteria.andSchoolIdEqualTo(currentUser.getSchoolId());
example.or().andBuiltDataEqualTo(1);
criteria.andSchoolIdEqualTo(currentUser.getSchoolId());
return new PageInfo<>(trainingLessonPlanMapper.selectByExample(example));
@ -71,6 +75,9 @@ public class TrainingLessonPlanService {
public void deleteById(String id) {
TrainingLessonPlan trainingLessonPlan = findById(id);
if (trainingLessonPlan.getBuiltData() == 1){
return;
}
Assert.notNull(trainingLessonPlan, "教案不存在");
fileUtil.remove(trainingLessonPlan.getFilePath());
trainingLessonPlanMapper.deleteByPrimaryKey(id);

@ -1,318 +1,333 @@
<?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.forex.trading_trading.mappers.TrainingLessonPlanMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
<result column="school_id" jdbcType="INTEGER" property="schoolId" />
<result column="creator_id" jdbcType="INTEGER" property="creatorId" />
<result column="creator_name" jdbcType="VARCHAR" property="creatorName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
<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">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
<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">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
id, name, file_path, school_id, creator_id, creator_name, create_time
</sql>
<select id="selectByExample" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlanExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from sys_training_lesson_plan
<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">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
select
<include refid="Base_Column_List" />
from sys_training_lesson_plan
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
delete from sys_training_lesson_plan
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlanExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
delete from sys_training_lesson_plan
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
insert into sys_training_lesson_plan (id, name, file_path,
school_id, creator_id, creator_name,
create_time)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR},
#{schoolId,jdbcType=INTEGER}, #{creatorId,jdbcType=INTEGER}, #{creatorName,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
insert into sys_training_lesson_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="filePath != null">
file_path,
</if>
<if test="schoolId != null">
school_id,
</if>
<if test="creatorId != null">
creator_id,
</if>
<if test="creatorName != null">
creator_name,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="filePath != null">
#{filePath,jdbcType=VARCHAR},
</if>
<if test="schoolId != null">
#{schoolId,jdbcType=INTEGER},
</if>
<if test="creatorId != null">
#{creatorId,jdbcType=INTEGER},
</if>
<if test="creatorName != null">
#{creatorName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlanExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
select count(*) from sys_training_lesson_plan
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
update sys_training_lesson_plan
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.filePath != null">
file_path = #{record.filePath,jdbcType=VARCHAR},
</if>
<if test="record.schoolId != null">
school_id = #{record.schoolId,jdbcType=INTEGER},
</if>
<if test="record.creatorId != null">
creator_id = #{record.creatorId,jdbcType=INTEGER},
</if>
<if test="record.creatorName != null">
creator_name = #{record.creatorName,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
update sys_training_lesson_plan
set id = #{record.id,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
file_path = #{record.filePath,jdbcType=VARCHAR},
school_id = #{record.schoolId,jdbcType=INTEGER},
creator_id = #{record.creatorId,jdbcType=INTEGER},
creator_name = #{record.creatorName,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
update sys_training_lesson_plan
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="filePath != null">
file_path = #{filePath,jdbcType=VARCHAR},
</if>
<if test="schoolId != null">
school_id = #{schoolId,jdbcType=INTEGER},
</if>
<if test="creatorId != null">
creator_id = #{creatorId,jdbcType=INTEGER},
</if>
<if test="creatorName != null">
creator_name = #{creatorName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Jul 06 16:31:12 CST 2023.
-->
update sys_training_lesson_plan
set name = #{name,jdbcType=VARCHAR},
file_path = #{filePath,jdbcType=VARCHAR},
school_id = #{schoolId,jdbcType=INTEGER},
creator_id = #{creatorId,jdbcType=INTEGER},
creator_name = #{creatorName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<?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.forex.trading_trading.mappers.TrainingLessonPlanMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
<result column="school_id" jdbcType="INTEGER" property="schoolId" />
<result column="creator_id" jdbcType="INTEGER" property="creatorId" />
<result column="creator_name" jdbcType="VARCHAR" property="creatorName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="built_data" jdbcType="INTEGER" property="builtData" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
<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">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
<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">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
id, name, file_path, school_id, creator_id, creator_name, create_time, built_data
</sql>
<select id="selectByExample" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlanExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from sys_training_lesson_plan
<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">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
select
<include refid="Base_Column_List" />
from sys_training_lesson_plan
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
delete from sys_training_lesson_plan
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlanExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
delete from sys_training_lesson_plan
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
insert into sys_training_lesson_plan (id, name, file_path,
school_id, creator_id, creator_name,
create_time, built_data)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR},
#{schoolId,jdbcType=INTEGER}, #{creatorId,jdbcType=INTEGER}, #{creatorName,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{builtData,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
insert into sys_training_lesson_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="filePath != null">
file_path,
</if>
<if test="schoolId != null">
school_id,
</if>
<if test="creatorId != null">
creator_id,
</if>
<if test="creatorName != null">
creator_name,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="builtData != null">
built_data,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="filePath != null">
#{filePath,jdbcType=VARCHAR},
</if>
<if test="schoolId != null">
#{schoolId,jdbcType=INTEGER},
</if>
<if test="creatorId != null">
#{creatorId,jdbcType=INTEGER},
</if>
<if test="creatorName != null">
#{creatorName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="builtData != null">
#{builtData,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlanExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
select count(*) from sys_training_lesson_plan
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
update sys_training_lesson_plan
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.filePath != null">
file_path = #{record.filePath,jdbcType=VARCHAR},
</if>
<if test="record.schoolId != null">
school_id = #{record.schoolId,jdbcType=INTEGER},
</if>
<if test="record.creatorId != null">
creator_id = #{record.creatorId,jdbcType=INTEGER},
</if>
<if test="record.creatorName != null">
creator_name = #{record.creatorName,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.builtData != null">
built_data = #{record.builtData,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
update sys_training_lesson_plan
set id = #{record.id,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
file_path = #{record.filePath,jdbcType=VARCHAR},
school_id = #{record.schoolId,jdbcType=INTEGER},
creator_id = #{record.creatorId,jdbcType=INTEGER},
creator_name = #{record.creatorName,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
built_data = #{record.builtData,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
update sys_training_lesson_plan
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="filePath != null">
file_path = #{filePath,jdbcType=VARCHAR},
</if>
<if test="schoolId != null">
school_id = #{schoolId,jdbcType=INTEGER},
</if>
<if test="creatorId != null">
creator_id = #{creatorId,jdbcType=INTEGER},
</if>
<if test="creatorName != null">
creator_name = #{creatorName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="builtData != null">
built_data = #{builtData,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.forex.trading_trading.entity.TrainingLessonPlan">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 07 15:03:26 CST 2024.
-->
update sys_training_lesson_plan
set name = #{name,jdbcType=VARCHAR},
file_path = #{filePath,jdbcType=VARCHAR},
school_id = #{schoolId,jdbcType=INTEGER},
creator_id = #{creatorId,jdbcType=INTEGER},
creator_name = #{creatorName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
built_data = #{builtData,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
Loading…
Cancel
Save