update===>:临时提交

This commit is contained in:
haown 2023-09-21 17:12:11 +08:00
parent 0997c0a5d1
commit 24eb6bd3fb
5 changed files with 249 additions and 0 deletions

View File

@ -0,0 +1,57 @@
package com.xinelu.manage.domain.schedule;
import com.xinelu.common.core.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 排班班次表
* @TableName schedule
*/
@Data
@ApiModel(value = "排班表对象", description = "schedule")
public class Schedule extends BaseDomain implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 医院主键
*/
private Long hospitalId;
/**
* 医院名称
*/
private String hospitalName;
/**
* 班次名称
*/
private String scheduleName;
/**
* 班次上午开始时间
*/
private Date forenoonStartTime;
/**
* 班次上午结束时间
*/
private Date forenoonEndTime;
/**
* 班次下午开始时间
*/
private Date afternoonStartTime;
/**
* 班次下午结束时间
*/
private Date afternoonEndTime;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,25 @@
package com.xinelu.manage.mapper.schedule;
import com.xinelu.manage.domain.schedule.Schedule;
/**
* @author Administrator
* @description 针对表schedule(排班班次表)的数据库操作Mapper
* @createDate 2023-09-21 10:16:44
* @Entity com.xinelu.manage.domain.schedule.Schedule
*/
public interface ScheduleMapper {
int deleteByPrimaryKey(Long id);
int insert(Schedule record);
int insertSelective(Schedule record);
Schedule selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(Schedule record);
int updateByPrimaryKey(Schedule record);
}

View File

@ -0,0 +1,10 @@
package com.xinelu.manage.service.schedule;
/**
* @author haown
* @description 针对表schedule(排班班次表)的数据库操作Service
* @createDate 2023-09-21 10:12:22
*/
public interface ScheduleService {
}

View File

@ -0,0 +1,18 @@
package com.xinelu.manage.service.schedule.impl;
import com.xinelu.manage.service.schedule.ScheduleService;
import org.springframework.stereotype.Service;
/**
* @author Administrator
* @description 针对表schedule(排班班次表)的数据库操作Service实现
* @createDate 2023-09-21 10:12:22
*/
@Service
public class ScheduleServiceImpl implements ScheduleService {
}

View File

@ -0,0 +1,139 @@
<?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.xinelu.manage.mapper.schedule.ScheduleMapper">
<resultMap id="BaseResultMap" type="com.xinelu.manage.domain.schedule.Schedule">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="hospitalId" column="hospital_id" jdbcType="BIGINT"/>
<result property="hospitalName" column="hospital_name" jdbcType="VARCHAR"/>
<result property="scheduleName" column="schedule_name" jdbcType="VARCHAR"/>
<result property="forenoonStartTime" column="forenoon_start_time" jdbcType="TIME"/>
<result property="forenoonEndTime" column="forenoon_end_time" jdbcType="TIME"/>
<result property="afternoonStartTime" column="afternoon_start_time" jdbcType="TIME"/>
<result property="afternoonEndTime" column="afternoon_end_time" jdbcType="TIME"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,hospital_id,hospital_name,
schedule_name,forenoon_start_time,forenoon_end_time,
afternoon_start_time,afternoon_end_time,create_by,
create_time,update_by,update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from schedule
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from schedule
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.xinelu.manage.domain.schedule.Schedule" useGeneratedKeys="true">
insert into schedule
( id,hospital_id,hospital_name
,schedule_name,forenoon_start_time,forenoon_end_time
,afternoon_start_time,afternoon_end_time,create_by
,create_time,update_by,update_time
)
values (#{id,jdbcType=BIGINT},#{hospitalId,jdbcType=BIGINT},#{hospitalName,jdbcType=VARCHAR}
,#{scheduleName,jdbcType=VARCHAR},#{forenoonStartTime,jdbcType=TIME},#{forenoonEndTime,jdbcType=TIME}
,#{afternoonStartTime,jdbcType=TIME},#{afternoonEndTime,jdbcType=TIME},#{createBy,jdbcType=VARCHAR}
,#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.xinelu.manage.domain.schedule.Schedule" useGeneratedKeys="true">
insert into schedule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="hospitalId != null">hospital_id,</if>
<if test="hospitalName != null">hospital_name,</if>
<if test="scheduleName != null">schedule_name,</if>
<if test="forenoonStartTime != null">forenoon_start_time,</if>
<if test="forenoonEndTime != null">forenoon_end_time,</if>
<if test="afternoonStartTime != null">afternoon_start_time,</if>
<if test="afternoonEndTime != null">afternoon_end_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id,jdbcType=BIGINT},</if>
<if test="hospitalId != null">#{hospitalId,jdbcType=BIGINT},</if>
<if test="hospitalName != null">#{hospitalName,jdbcType=VARCHAR},</if>
<if test="scheduleName != null">#{scheduleName,jdbcType=VARCHAR},</if>
<if test="forenoonStartTime != null">#{forenoonStartTime,jdbcType=TIME},</if>
<if test="forenoonEndTime != null">#{forenoonEndTime,jdbcType=TIME},</if>
<if test="afternoonStartTime != null">#{afternoonStartTime,jdbcType=TIME},</if>
<if test="afternoonEndTime != null">#{afternoonEndTime,jdbcType=TIME},</if>
<if test="createBy != null">#{createBy,jdbcType=VARCHAR},</if>
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
<if test="updateBy != null">#{updateBy,jdbcType=VARCHAR},</if>
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.xinelu.manage.domain.schedule.Schedule">
update schedule
<set>
<if test="hospitalId != null">
hospital_id = #{hospitalId,jdbcType=BIGINT},
</if>
<if test="hospitalName != null">
hospital_name = #{hospitalName,jdbcType=VARCHAR},
</if>
<if test="scheduleName != null">
schedule_name = #{scheduleName,jdbcType=VARCHAR},
</if>
<if test="forenoonStartTime != null">
forenoon_start_time = #{forenoonStartTime,jdbcType=TIME},
</if>
<if test="forenoonEndTime != null">
forenoon_end_time = #{forenoonEndTime,jdbcType=TIME},
</if>
<if test="afternoonStartTime != null">
afternoon_start_time = #{afternoonStartTime,jdbcType=TIME},
</if>
<if test="afternoonEndTime != null">
afternoon_end_time = #{afternoonEndTime,jdbcType=TIME},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.xinelu.manage.domain.schedule.Schedule">
update schedule
set
hospital_id = #{hospitalId,jdbcType=BIGINT},
hospital_name = #{hospitalName,jdbcType=VARCHAR},
schedule_name = #{scheduleName,jdbcType=VARCHAR},
forenoon_start_time = #{forenoonStartTime,jdbcType=TIME},
forenoon_end_time = #{forenoonEndTime,jdbcType=TIME},
afternoon_start_time = #{afternoonStartTime,jdbcType=TIME},
afternoon_end_time = #{afternoonEndTime,jdbcType=TIME},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>