diff --git a/src/main/resources/com/mappers/TrainingMapper.xml b/src/main/resources/com/mappers/TrainingMapper.xml new file mode 100644 index 0000000..08421f4 --- /dev/null +++ b/src/main/resources/com/mappers/TrainingMapper.xml @@ -0,0 +1,398 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + training_id, people_count, start_time, end_time, status, creator_id, create_school, + training_name, creator_name, create_time, update_time, school_id + + + + + + delete from sys_training + where training_id = #{trainingId,jdbcType=VARCHAR} + + + + delete from sys_training + + + + + + + insert into sys_training (training_id, people_count, start_time, + end_time, status, creator_id, + create_school, training_name, creator_name, + create_time, update_time, school_id + ) + values (#{trainingId,jdbcType=VARCHAR}, #{peopleCount,jdbcType=INTEGER}, #{startTime,jdbcType=VARCHAR}, + #{endTime,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{creatorId,jdbcType=INTEGER}, + #{createSchool,jdbcType=VARCHAR}, #{trainingName,jdbcType=VARCHAR}, #{creatorName,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{schoolId,jdbcType=INTEGER} + ) + + + + insert into sys_training + + + training_id, + + + people_count, + + + start_time, + + + end_time, + + + status, + + + creator_id, + + + create_school, + + + training_name, + + + creator_name, + + + create_time, + + + update_time, + + + school_id, + + + + + #{trainingId,jdbcType=VARCHAR}, + + + #{peopleCount,jdbcType=INTEGER}, + + + #{startTime,jdbcType=VARCHAR}, + + + #{endTime,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{creatorId,jdbcType=INTEGER}, + + + #{createSchool,jdbcType=VARCHAR}, + + + #{trainingName,jdbcType=VARCHAR}, + + + #{creatorName,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{schoolId,jdbcType=INTEGER}, + + + + + + + update sys_training + + + training_id = #{record.trainingId,jdbcType=VARCHAR}, + + + people_count = #{record.peopleCount,jdbcType=INTEGER}, + + + start_time = #{record.startTime,jdbcType=VARCHAR}, + + + end_time = #{record.endTime,jdbcType=VARCHAR}, + + + status = #{record.status,jdbcType=VARCHAR}, + + + creator_id = #{record.creatorId,jdbcType=INTEGER}, + + + create_school = #{record.createSchool,jdbcType=VARCHAR}, + + + training_name = #{record.trainingName,jdbcType=VARCHAR}, + + + creator_name = #{record.creatorName,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + school_id = #{record.schoolId,jdbcType=INTEGER}, + + + + + + + + + update sys_training + set training_id = #{record.trainingId,jdbcType=VARCHAR}, + people_count = #{record.peopleCount,jdbcType=INTEGER}, + start_time = #{record.startTime,jdbcType=VARCHAR}, + end_time = #{record.endTime,jdbcType=VARCHAR}, + status = #{record.status,jdbcType=VARCHAR}, + creator_id = #{record.creatorId,jdbcType=INTEGER}, + create_school = #{record.createSchool,jdbcType=VARCHAR}, + training_name = #{record.trainingName,jdbcType=VARCHAR}, + creator_name = #{record.creatorName,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + school_id = #{record.schoolId,jdbcType=INTEGER} + + + + + + + update sys_training + + + people_count = #{peopleCount,jdbcType=INTEGER}, + + + start_time = #{startTime,jdbcType=VARCHAR}, + + + end_time = #{endTime,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + creator_id = #{creatorId,jdbcType=INTEGER}, + + + create_school = #{createSchool,jdbcType=VARCHAR}, + + + training_name = #{trainingName,jdbcType=VARCHAR}, + + + creator_name = #{creatorName,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + school_id = #{schoolId,jdbcType=INTEGER}, + + + where training_id = #{trainingId,jdbcType=VARCHAR} + + + + update sys_training + set people_count = #{peopleCount,jdbcType=INTEGER}, + start_time = #{startTime,jdbcType=VARCHAR}, + end_time = #{endTime,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + creator_id = #{creatorId,jdbcType=INTEGER}, + create_school = #{createSchool,jdbcType=VARCHAR}, + training_name = #{trainingName,jdbcType=VARCHAR}, + creator_name = #{creatorName,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + school_id = #{schoolId,jdbcType=INTEGER} + where training_id = #{trainingId,jdbcType=VARCHAR} + + \ No newline at end of file