学习培训订单
This commit is contained in:
parent
a55b216eb6
commit
3c99d157f6
@ -0,0 +1,103 @@
|
||||
package com.xinelu.manage.controller.trainingitemplayrecord;
|
||||
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.trainingitemplayrecord.TrainingItemPlayRecord;
|
||||
import com.xinelu.manage.service.trainingitemplayrecord.ITrainingItemPlayRecordService;
|
||||
import com.xinelu.manage.vo.trainingitemplayrecord.TrainingItemPlayRecordVO;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学习培训项目播放日志记录Controller
|
||||
*
|
||||
* @author ljh
|
||||
* @date 2023-05-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/playRecord")
|
||||
public class TrainingItemPlayRecordController extends BaseController {
|
||||
@Resource
|
||||
private ITrainingItemPlayRecordService trainingItemPlayRecordService;
|
||||
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:playRecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TrainingItemPlayRecord trainingItemPlayRecord) {
|
||||
startPage();
|
||||
List<TrainingItemPlayRecord> list = trainingItemPlayRecordService.selectTrainingItemPlayRecordList(trainingItemPlayRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学习培训项目播放日志记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:playRecord:export')")
|
||||
@Log(title = "学习培训项目播放日志记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TrainingItemPlayRecord trainingItemPlayRecord) {
|
||||
List<TrainingItemPlayRecord> list = trainingItemPlayRecordService.selectTrainingItemPlayRecordList(trainingItemPlayRecord);
|
||||
ExcelUtil<TrainingItemPlayRecord> util = new ExcelUtil<>(TrainingItemPlayRecord.class);
|
||||
util.exportExcel(response, list, "学习培训项目播放日志记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学习培训项目播放日志记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:playRecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(trainingItemPlayRecordService.selectTrainingItemPlayRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学习培训项目播放日志记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:playRecord:add')")
|
||||
@Log(title = "学习培训项目播放日志记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TrainingItemPlayRecord trainingItemPlayRecord) {
|
||||
return toAjax(trainingItemPlayRecordService.insertTrainingItemPlayRecord(trainingItemPlayRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学习培训项目播放日志记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:playRecord:edit')")
|
||||
@Log(title = "学习培训项目播放日志记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TrainingItemPlayRecord trainingItemPlayRecord) {
|
||||
return toAjax(trainingItemPlayRecordService.updateTrainingItemPlayRecord(trainingItemPlayRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学习培训项目播放日志记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:playRecord:remove')")
|
||||
@Log(title = "学习培训项目播放日志记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(trainingItemPlayRecordService.deleteTrainingItemPlayRecordByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录列表数量
|
||||
*/
|
||||
@GetMapping("/trainingItemPlayRecordList")
|
||||
public TableDataInfo trainingItemPlayRecordList(TrainingItemPlayRecord trainingItemPlayRecord) {
|
||||
startPage();
|
||||
List<TrainingItemPlayRecordVO> trainingItemPlayRecordList = trainingItemPlayRecordService.getTrainingItemPlayRecordList(trainingItemPlayRecord);
|
||||
return getDataTable(trainingItemPlayRecordList);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,122 @@
|
||||
package com.xinelu.manage.domain.trainingitemplayrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学习培训项目播放日志记录对象 training_item_play_record
|
||||
*
|
||||
* @author xinyilu
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "学习培训项目播放日志记录对象", description = "training_item_play_record")
|
||||
public class TrainingItemPlayRecord extends BaseDomain implements Serializable {
|
||||
private static final long serialVersionUID = 5808471517075078173L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学习培训订单id
|
||||
*/
|
||||
@ApiModelProperty(value = "学习培训订单id")
|
||||
@Excel(name = "学习培训订单id")
|
||||
private Long trainingOrderId;
|
||||
|
||||
/**
|
||||
* 培训项目表id,此处id是学习培训订单明细表中的项目id
|
||||
*/
|
||||
@ApiModelProperty(value = "培训项目表id,此处id是学习培训订单明细表中的项目id")
|
||||
@Excel(name = "培训项目表id,此处id是学习培训订单明细表中的项目id")
|
||||
private Long trainingItemId;
|
||||
|
||||
/**
|
||||
* 培训项目标题
|
||||
*/
|
||||
@ApiModelProperty(value = "培训项目标题")
|
||||
@Excel(name = "培训项目标题")
|
||||
private String trainingItemTitle;
|
||||
|
||||
/**
|
||||
* 培训项目章节表id,此处id是学习培训订单章节信息表中的id
|
||||
*/
|
||||
@ApiModelProperty(value = "培训项目章节表id,此处id是学习培训订单章节信息表中的id")
|
||||
@Excel(name = "培训项目章节表id,此处id是学习培训订单章节信息表中的id")
|
||||
private Long trainingItemDirectoryId;
|
||||
|
||||
/**
|
||||
* 培训项目章节名称
|
||||
*/
|
||||
@ApiModelProperty(value = "培训项目章节名称")
|
||||
@Excel(name = "培训项目章节名称")
|
||||
private String trainingItemDirectoryName;
|
||||
|
||||
/**
|
||||
* 护理员信息表id
|
||||
*/
|
||||
@ApiModelProperty(value = "护理员信息表id")
|
||||
@Excel(name = "护理员信息表id")
|
||||
private Long nurseStationPersonId;
|
||||
|
||||
/**
|
||||
* 护理站人员名称
|
||||
*/
|
||||
@ApiModelProperty(value = "护理站人员名称")
|
||||
@Excel(name = "护理站人员名称")
|
||||
private String nursePersonName;
|
||||
|
||||
/**
|
||||
* 播放时间,格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@ApiModelProperty(value = "播放时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "播放时间,格式:yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private LocalDateTime playTime;
|
||||
|
||||
/**
|
||||
* 播放日期,格式:yyyy-MM-dd
|
||||
*/
|
||||
@ApiModelProperty(value = "播放日期,格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "播放日期,格式:yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private LocalDate playDate;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("trainingOrderId", getTrainingOrderId())
|
||||
.append("trainingItemId", getTrainingItemId())
|
||||
.append("trainingItemTitle", getTrainingItemTitle())
|
||||
.append("trainingItemDirectoryId", getTrainingItemDirectoryId())
|
||||
.append("trainingItemDirectoryName", getTrainingItemDirectoryName())
|
||||
.append("nurseStationPersonId", getNurseStationPersonId())
|
||||
.append("nursePersonName", getNursePersonName())
|
||||
.append("playTime", getPlayTime())
|
||||
.append("playDate", getPlayDate())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.xinelu.manage.mapper.trainingitemplayrecord;
|
||||
|
||||
|
||||
import com.xinelu.manage.domain.trainingitemplayrecord.TrainingItemPlayRecord;
|
||||
import com.xinelu.manage.vo.trainingitemplayrecord.TrainingItemPlayRecordVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 学习培训项目播放日志记录Mapper接口
|
||||
*
|
||||
* @author xinyilu
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
public interface TrainingItemPlayRecordMapper {
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录
|
||||
*
|
||||
* @param id 学习培训项目播放日志记录主键
|
||||
* @return 学习培训项目播放日志记录
|
||||
*/
|
||||
TrainingItemPlayRecord selectTrainingItemPlayRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录列表
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 学习培训项目播放日志记录集合
|
||||
*/
|
||||
List<TrainingItemPlayRecord> selectTrainingItemPlayRecordList(TrainingItemPlayRecord trainingItemPlayRecord);
|
||||
|
||||
/**
|
||||
* 新增学习培训项目播放日志记录
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 结果
|
||||
*/
|
||||
int insertTrainingItemPlayRecord(TrainingItemPlayRecord trainingItemPlayRecord);
|
||||
|
||||
/**
|
||||
* 修改学习培训项目播放日志记录
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 结果
|
||||
*/
|
||||
int updateTrainingItemPlayRecord(TrainingItemPlayRecord trainingItemPlayRecord);
|
||||
|
||||
/**
|
||||
* 删除学习培训项目播放日志记录
|
||||
*
|
||||
* @param id 学习培训项目播放日志记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteTrainingItemPlayRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除学习培训项目播放日志记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteTrainingItemPlayRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录列表数量
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 学习培训项目播放日志记录集合
|
||||
*/
|
||||
List<TrainingItemPlayRecordVO> getTrainingItemPlayRecordList(TrainingItemPlayRecord trainingItemPlayRecord);
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.xinelu.manage.service.trainingitemplayrecord;
|
||||
|
||||
|
||||
import com.xinelu.manage.domain.trainingitemplayrecord.TrainingItemPlayRecord;
|
||||
import com.xinelu.manage.vo.trainingitemplayrecord.TrainingItemPlayRecordVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 学习培训项目播放日志记录Service接口
|
||||
*
|
||||
* @author xinyilu
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
public interface ITrainingItemPlayRecordService {
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录
|
||||
*
|
||||
* @param id 学习培训项目播放日志记录主键
|
||||
* @return 学习培训项目播放日志记录
|
||||
*/
|
||||
TrainingItemPlayRecord selectTrainingItemPlayRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录列表
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 学习培训项目播放日志记录集合
|
||||
*/
|
||||
List<TrainingItemPlayRecord> selectTrainingItemPlayRecordList(TrainingItemPlayRecord trainingItemPlayRecord);
|
||||
|
||||
/**
|
||||
* 新增学习培训项目播放日志记录
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 结果
|
||||
*/
|
||||
int insertTrainingItemPlayRecord(TrainingItemPlayRecord trainingItemPlayRecord);
|
||||
|
||||
/**
|
||||
* 修改学习培训项目播放日志记录
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 结果
|
||||
*/
|
||||
int updateTrainingItemPlayRecord(TrainingItemPlayRecord trainingItemPlayRecord);
|
||||
|
||||
/**
|
||||
* 批量删除学习培训项目播放日志记录
|
||||
*
|
||||
* @param ids 需要删除的学习培训项目播放日志记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteTrainingItemPlayRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录列表数量
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 学习培训项目播放日志记录集合
|
||||
*/
|
||||
List<TrainingItemPlayRecordVO> getTrainingItemPlayRecordList(TrainingItemPlayRecord trainingItemPlayRecord);
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
package com.xinelu.manage.service.trainingitemplayrecord.Impl;
|
||||
|
||||
import com.xinelu.manage.domain.trainingitemplayrecord.TrainingItemPlayRecord;
|
||||
import com.xinelu.manage.mapper.trainingitemplayrecord.TrainingItemPlayRecordMapper;
|
||||
import com.xinelu.manage.service.trainingitemplayrecord.ITrainingItemPlayRecordService;
|
||||
import com.xinelu.manage.vo.trainingitemplayrecord.TrainingItemPlayRecordVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 学习培训项目播放日志记录Service业务层处理
|
||||
*
|
||||
* @author xinyilu
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
@Service
|
||||
public class TrainingItemPlayRecordServiceImpl implements ITrainingItemPlayRecordService {
|
||||
@Resource
|
||||
private TrainingItemPlayRecordMapper trainingItemPlayRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录
|
||||
*
|
||||
* @param id 学习培训项目播放日志记录主键
|
||||
* @return 学习培训项目播放日志记录
|
||||
*/
|
||||
@Override
|
||||
public TrainingItemPlayRecord selectTrainingItemPlayRecordById(Long id) {
|
||||
return trainingItemPlayRecordMapper.selectTrainingItemPlayRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录列表
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 学习培训项目播放日志记录
|
||||
*/
|
||||
@Override
|
||||
public List<TrainingItemPlayRecord> selectTrainingItemPlayRecordList(TrainingItemPlayRecord trainingItemPlayRecord) {
|
||||
return trainingItemPlayRecordMapper.selectTrainingItemPlayRecordList(trainingItemPlayRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学习培训项目播放日志记录
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTrainingItemPlayRecord(TrainingItemPlayRecord trainingItemPlayRecord) {
|
||||
trainingItemPlayRecord.setCreateTime(LocalDateTime.now());
|
||||
return trainingItemPlayRecordMapper.insertTrainingItemPlayRecord(trainingItemPlayRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学习培训项目播放日志记录
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTrainingItemPlayRecord(TrainingItemPlayRecord trainingItemPlayRecord) {
|
||||
trainingItemPlayRecord.setUpdateTime(LocalDateTime.now());
|
||||
return trainingItemPlayRecordMapper.updateTrainingItemPlayRecord(trainingItemPlayRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除学习培训项目播放日志记录
|
||||
*
|
||||
* @param ids 需要删除的学习培训项目播放日志记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTrainingItemPlayRecordByIds(Long[] ids) {
|
||||
return trainingItemPlayRecordMapper.deleteTrainingItemPlayRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学习培训项目播放日志记录列表数量
|
||||
*
|
||||
* @param trainingItemPlayRecord 学习培训项目播放日志记录
|
||||
* @return 学习培训项目播放日志记录集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainingItemPlayRecordVO> getTrainingItemPlayRecordList(TrainingItemPlayRecord trainingItemPlayRecord) {
|
||||
return trainingItemPlayRecordMapper.getTrainingItemPlayRecordList(trainingItemPlayRecord);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.xinelu.manage.vo.trainingitemplayrecord;
|
||||
|
||||
import com.xinelu.manage.domain.trainingitemplayrecord.TrainingItemPlayRecord;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @date 2023/5/6 9:48
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TrainingItemPlayRecordVO extends TrainingItemPlayRecord implements Serializable {
|
||||
private static final long serialVersionUID = -7098608554887802291L;
|
||||
|
||||
/**
|
||||
* 观看数量
|
||||
*/
|
||||
private Long playCount;
|
||||
}
|
||||
@ -0,0 +1,253 @@
|
||||
<?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.trainingitemplayrecord.TrainingItemPlayRecordMapper">
|
||||
|
||||
<resultMap type="TrainingItemPlayRecord" id="TrainingItemPlayRecordResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="trainingOrderId" column="training_order_id"/>
|
||||
<result property="trainingItemId" column="training_item_id"/>
|
||||
<result property="trainingItemTitle" column="training_item_title"/>
|
||||
<result property="trainingItemDirectoryId" column="training_item_directory_id"/>
|
||||
<result property="trainingItemDirectoryName" column="training_item_directory_name"/>
|
||||
<result property="nurseStationPersonId" column="nurse_station_person_id"/>
|
||||
<result property="nursePersonName" column="nurse_person_name"/>
|
||||
<result property="playTime" column="play_time"/>
|
||||
<result property="playDate" column="play_date"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTrainingItemPlayRecordVo">
|
||||
select id,
|
||||
training_order_id,
|
||||
training_item_id,
|
||||
training_item_title,
|
||||
training_item_directory_id,
|
||||
training_item_directory_name,
|
||||
nurse_station_person_id,
|
||||
nurse_person_name,
|
||||
play_time,
|
||||
play_date,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
from training_item_play_record
|
||||
</sql>
|
||||
|
||||
<select id="selectTrainingItemPlayRecordList" parameterType="TrainingItemPlayRecord"
|
||||
resultMap="TrainingItemPlayRecordResult">
|
||||
<include refid="selectTrainingItemPlayRecordVo"/>
|
||||
<where>
|
||||
<if test="trainingOrderId != null ">
|
||||
and training_order_id = #{trainingOrderId}
|
||||
</if>
|
||||
<if test="trainingItemId != null ">
|
||||
and training_item_id = #{trainingItemId}
|
||||
</if>
|
||||
<if test="trainingItemTitle != null and trainingItemTitle != ''">
|
||||
and training_item_title = #{trainingItemTitle}
|
||||
</if>
|
||||
<if test="trainingItemDirectoryId != null ">
|
||||
and training_item_directory_id = #{trainingItemDirectoryId}
|
||||
</if>
|
||||
<if test="trainingItemDirectoryName != null and trainingItemDirectoryName != ''">
|
||||
and training_item_directory_name like concat('%', #{trainingItemDirectoryName}, '%')
|
||||
</if>
|
||||
<if test="nurseStationPersonId != null ">
|
||||
and nurse_station_person_id = #{nurseStationPersonId}
|
||||
</if>
|
||||
<if test="nursePersonName != null and nursePersonName != ''">
|
||||
and nurse_person_name like concat('%', #{nursePersonName}, '%')
|
||||
</if>
|
||||
<if test="playTime != null ">
|
||||
and play_time = #{playTime}
|
||||
</if>
|
||||
<if test="playDate != null ">
|
||||
and play_date = #{playDate}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTrainingItemPlayRecordById" parameterType="Long"
|
||||
resultMap="TrainingItemPlayRecordResult">
|
||||
<include refid="selectTrainingItemPlayRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTrainingItemPlayRecord" parameterType="TrainingItemPlayRecord" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into training_item_play_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="trainingOrderId != null">training_order_id,
|
||||
</if>
|
||||
<if test="trainingItemId != null">training_item_id,
|
||||
</if>
|
||||
<if test="trainingItemTitle != null">training_item_title,
|
||||
</if>
|
||||
<if test="trainingItemDirectoryId != null">training_item_directory_id,
|
||||
</if>
|
||||
<if test="trainingItemDirectoryName != null">training_item_directory_name,
|
||||
</if>
|
||||
<if test="nurseStationPersonId != null">nurse_station_person_id,
|
||||
</if>
|
||||
<if test="nursePersonName != null">nurse_person_name,
|
||||
</if>
|
||||
<if test="playTime != null">play_time,
|
||||
</if>
|
||||
<if test="playDate != null">play_date,
|
||||
</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="trainingOrderId != null">#{trainingOrderId},
|
||||
</if>
|
||||
<if test="trainingItemId != null">#{trainingItemId},
|
||||
</if>
|
||||
<if test="trainingItemTitle != null">#{trainingItemTitle},
|
||||
</if>
|
||||
<if test="trainingItemDirectoryId != null">#{trainingItemDirectoryId},
|
||||
</if>
|
||||
<if test="trainingItemDirectoryName != null">#{trainingItemDirectoryName},
|
||||
</if>
|
||||
<if test="nurseStationPersonId != null">#{nurseStationPersonId},
|
||||
</if>
|
||||
<if test="nursePersonName != null">#{nursePersonName},
|
||||
</if>
|
||||
<if test="playTime != null">#{playTime},
|
||||
</if>
|
||||
<if test="playDate != null">#{playDate},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTrainingItemPlayRecord" parameterType="TrainingItemPlayRecord">
|
||||
update training_item_play_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="trainingOrderId != null">training_order_id =
|
||||
#{trainingOrderId},
|
||||
</if>
|
||||
<if test="trainingItemId != null">training_item_id =
|
||||
#{trainingItemId},
|
||||
</if>
|
||||
<if test="trainingItemTitle != null">training_item_title =
|
||||
#{trainingItemTitle},
|
||||
</if>
|
||||
<if test="trainingItemDirectoryId != null">training_item_directory_id =
|
||||
#{trainingItemDirectoryId},
|
||||
</if>
|
||||
<if test="trainingItemDirectoryName != null">training_item_directory_name =
|
||||
#{trainingItemDirectoryName},
|
||||
</if>
|
||||
<if test="nurseStationPersonId != null">nurse_station_person_id =
|
||||
#{nurseStationPersonId},
|
||||
</if>
|
||||
<if test="nursePersonName != null">nurse_person_name =
|
||||
#{nursePersonName},
|
||||
</if>
|
||||
<if test="playTime != null">play_time =
|
||||
#{playTime},
|
||||
</if>
|
||||
<if test="playDate != null">play_date =
|
||||
#{playDate},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTrainingItemPlayRecordById" parameterType="Long">
|
||||
delete
|
||||
from training_item_play_record
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTrainingItemPlayRecordByIds" parameterType="String">
|
||||
delete from training_item_play_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getTrainingItemPlayRecordList" parameterType="TrainingItemPlayRecord"
|
||||
resultType="com.xinelu.manage.vo.trainingitemplayrecord.TrainingItemPlayRecordVO">
|
||||
SELECT
|
||||
COUNT( 1 ) playCount,
|
||||
id,
|
||||
training_order_id,
|
||||
training_item_id,
|
||||
training_item_title,
|
||||
training_item_directory_id,
|
||||
training_item_directory_name,
|
||||
nurse_station_person_id,
|
||||
nurse_person_name,
|
||||
play_time,
|
||||
play_date
|
||||
FROM
|
||||
training_item_play_record
|
||||
<where>
|
||||
<if test="trainingOrderId != null ">
|
||||
and training_order_id = #{trainingOrderId}
|
||||
</if>
|
||||
<if test="trainingItemId != null ">
|
||||
and training_item_id = #{trainingItemId}
|
||||
</if>
|
||||
<if test="trainingItemTitle != null and trainingItemTitle != ''">
|
||||
and training_item_title = #{trainingItemTitle}
|
||||
</if>
|
||||
<if test="trainingItemDirectoryId != null ">
|
||||
and training_item_directory_id = #{trainingItemDirectoryId}
|
||||
</if>
|
||||
<if test="trainingItemDirectoryName != null and trainingItemDirectoryName != ''">
|
||||
and training_item_directory_name like concat('%', #{trainingItemDirectoryName}, '%')
|
||||
</if>
|
||||
<if test="nurseStationPersonId != null ">
|
||||
and nurse_station_person_id = #{nurseStationPersonId}
|
||||
</if>
|
||||
<if test="nursePersonName != null and nursePersonName != ''">
|
||||
and nurse_person_name like concat('%', #{nursePersonName}, '%')
|
||||
</if>
|
||||
<if test="playTime != null ">
|
||||
and play_time = #{playTime}
|
||||
</if>
|
||||
<if test="playDate != null ">
|
||||
and play_date = #{playDate}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
nurse_station_person_id,
|
||||
training_item_id,
|
||||
training_item_directory_id
|
||||
ORDER BY nurse_station_person_id
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user