Commit d2a05828 authored by luzhuang's avatar luzhuang

feat: 新表接口集成(未调用)

parent 083c46f9
package org.rcisoft.business.bchapter.dao;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.rcisoft.business.bchapter.entity.BPChapter;
import org.rcisoft.core.base.BaseMapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Created with on 2020-7-1 18:57:28.
*/
@Repository
public interface BPChapterRepository extends BaseMapper<BPChapter> {
/**
* 分页查询 bPChapter
*
*/
@Select("<script>select * from b_p_chapter where 1=1 "
+ "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "</script>")
@ResultMap(value = "BaseResultMap" )
List<BPChapter> queryBPChapters(BPChapter bPChapter);
}
package org.rcisoft.business.bchapter.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.rcisoft.core.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* Created with on 2020-7-1 18:57:28.
*/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "b_p_chapter")
public class BPChapter extends IdEntity<BPChapter> {
/**
* @desc 章节名称
* @column chapter_name
* @default
*/
private String chapterName;
/**
* @desc 等级,1:章 2:节
* @column chapter_level
* @default 1
*/
private Integer chapterLevel;
/**
* @desc 上一级
* @column pid
* @default -1
*/
private String pid;
/**
* @desc 课程url
* @column chapter_url
* @default
*/
private String chapterUrl;
/**
* @desc 任务书
* @column md_file
* @default
*/
private String mdFile;
/**
* @desc 0视频 1音频 2PPT 3PDF 4word(单选)
* @column is_test
* @default
*/
private String isTest;
/**
* @desc 课程ID
* @column lesson_id
* @default
*/
private String lessonId;
/**
* @desc 学时
* @column class_hour
* @default
*/
private String classHour;
/**
* @desc 状态 0 关闭,1开启
* @column state
* @default 0
*/
private String state;
/**
* @desc 章节排序
* @column sort
* @default
*/
private Integer sort;
/**
* @desc 企业id
* @column corp_id
* @default
*/
private String corpId;
/**
* @desc 是否智评 0否 1是
* @column automatic
* @default 1
*/
private String automatic;
/**
* @desc 实验类型 1java单文件 2java工程 3html单文件 4html工程
* @column experiment_type
* @default
*/
private String experimentType;
/**
* @desc 课程时长
* @column course_time
* @default
*/
private String courseTime;
}
package org.rcisoft.business.bchapter.service;
import org.rcisoft.business.bchapter.entity.BPChapter;
import org.rcisoft.core.model.PersistModel;
import java.util.List;
/**
* Created by on 2020-7-1 18:57:28.
*/
public interface BPChapterService {
/**
* 保存 平台记录企业课程章节表
* @param bPChapter
* @return
*/
PersistModel save(BPChapter bPChapter);
/**
* 删除 平台记录企业课程章节表
* @param bPChapter
* @return
*/
PersistModel remove(BPChapter bPChapter);
}
package org.rcisoft.business.bchapter.service.impl;
import lombok.extern.slf4j.Slf4j;
import org.rcisoft.business.bchapter.dao.BPChapterRepository;
import org.rcisoft.business.bchapter.entity.BPChapter;
import org.rcisoft.business.bchapter.service.BPChapterService;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.util.UserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* Created by on 2020-7-1 18:57:28.
*/
@Service
@Transactional(readOnly = true,propagation = Propagation.NOT_SUPPORTED)
@Slf4j
public class BPChapterServiceImpl implements BPChapterService {
@Autowired
private BPChapterRepository bPChapterRepository;
/**
* 保存 平台记录企业课程章节表
* @param bPChapter
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel save(BPChapter bPChapter){
//增加操作
UserUtil.setCurrentPersistOperation(bPChapter);
int line = bPChapterRepository.insertSelective(bPChapter);
return new PersistModel(line);
}
/**
* 删除 平台记录企业课程章节表
* @param bPChapter
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel remove(BPChapter bPChapter){
int line = bPChapterRepository.deleteByPrimaryKey(bPChapter.getBusinessId());
return new PersistModel(line);
}
}
package org.rcisoft.business.bfile.controller;
/*固定导入*/
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.common.controller.PaginationController;
import org.rcisoft.common.model.GridModel;
import org.rcisoft.core.constant.MessageConstant;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.result.Result;
import org.springframework.validation.BindingResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import org.rcisoft.business.bfile.entity.BPFile;
import org.rcisoft.business.bfile.service.BPFileService;
/**
* Created by on 2020-7-1 18:57:28.
*/
@RestController
@RequestMapping("/bpfile")
public class BPFileController extends PaginationController<BPFile> {
@Autowired
private BPFileService bPFileServiceImpl;
@ApiOperation(value="添加平台记录企业文件表", notes="添加平台记录企业文件表")
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PostMapping(value = "/add")
public Result add(@Valid BPFile bPFile, BindingResult bindingResult) {
PersistModel data = bPFileServiceImpl.save(bPFile);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bPFile);
}
@ApiOperation(value="删除平台记录企业文件表", notes="删除平台记录企业文件表")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@DeleteMapping("/delete/{businessId:\\w+}")
public Result delete(@PathVariable String businessId,BPFile bPFile) {
bPFile.setBusinessId(businessId);
PersistModel data = bPFileServiceImpl.remove(bPFile);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
businessId);
}
}
package org.rcisoft.business.bfile.dao;
import org.rcisoft.business.bfile.entity.BPFile;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.rcisoft.core.base.BaseMapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Created with on 2020-7-1 18:57:28.
*/
@Repository
public interface BPFileRepository extends BaseMapper<BPFile> {
/**
* 分页查询 bPFile
*
*/
@Select("<script>select * from b_p_file where 1=1 "
+ "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "</script>")
@ResultMap(value = "BaseResultMap" )
List<BPFile> queryBPFiles(BPFile bPFile);
}
package org.rcisoft.business.bfile.entity;
import lombok.*;
import org.rcisoft.core.entity.IdEntity;
import javax.persistence.*;
/**
* Created with on 2020-7-1 18:57:28.
*/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "b_p_file")
public class BPFile extends IdEntity<BPFile> {
/**
* @desc 课程ID
* @column lesson_id
* @default
*/
private String lessonId;
/**
* @desc 章节ID
* @column chapter_id
* @default
*/
private String chapterId;
/**
* @desc 视频名称
* @column file_name
* @default
*/
private String fileName;
/**
* @desc 可读文件地址(视频、音频、pdf、ppt)
* @column video_url
* @default
*/
private String videoUrl;
/**
* @desc 其他文件地址(文件包、word文档(转成PDF后pdf存放video_url))
* @column file_url
* @default
*/
private String fileUrl;
/**
* @desc 文件大小
* @column file_size
* @default
*/
private String fileSize;
/**
* @desc 文件时长
* @column file_time
* @default
*/
private String fileTime;
/**
* @desc 0视频 1音频 2PPT 3PDF 4word(单选)
* @column type
* @default
*/
private String type;
}
package org.rcisoft.business.bfile.service;
import org.rcisoft.business.bfile.entity.BPFile;
import org.rcisoft.core.model.PersistModel;
import java.util.List;
/**
* Created by on 2020-7-1 18:57:28.
*/
public interface BPFileService {
/**
* 保存 平台记录企业文件表
* @param bPFile
* @return
*/
PersistModel save(BPFile bPFile);
/**
* 删除 平台记录企业文件表
* @param bPFile
* @return
*/
PersistModel remove(BPFile bPFile);
}
package org.rcisoft.business.bfile.service.impl;
import org.rcisoft.business.bfile.dao.BPFileRepository;
import org.rcisoft.business.bfile.entity.BPFile;
import org.rcisoft.business.bfile.service.BPFileService;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.util.UserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/**
* Created by on 2020-7-1 18:57:28.
*/
@Service
@Transactional(readOnly = true,propagation = Propagation.NOT_SUPPORTED)
@Slf4j
public class BPFileServiceImpl implements BPFileService {
@Autowired
private BPFileRepository bPFileRepository;
/**
* 保存 平台记录企业文件表
* @param bPFile
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel save(BPFile bPFile){
//增加操作
UserUtil.setCurrentPersistOperation(bPFile);
int line = bPFileRepository.insertSelective(bPFile);
return new PersistModel(line);
}
/**
* 删除 平台记录企业文件表
* @param bPFile
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel remove(BPFile bPFile){
int line = bPFileRepository.deleteByPrimaryKey(bPFile.getBusinessId());
return new PersistModel(line);
}
}
package org.rcisoft.business.blesson.controller;
/*固定导入*/
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.common.controller.PaginationController;
import org.rcisoft.core.constant.MessageConstant;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.result.Result;
import org.springframework.validation.BindingResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import org.rcisoft.business.blesson.entity.BPLesson;
import org.rcisoft.business.blesson.service.BPLessonService;
/**
* Created by on 2020-7-1 18:57:28.
*/
@RestController
@RequestMapping("/bplesson")
public class BPLessonController extends PaginationController<BPLesson> {
@Autowired
private BPLessonService bPLessonServiceImpl;
@ApiOperation(value="添加平台记录企业的课程", notes="添加平台记录企业的课程")
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PostMapping(value = "/add")
public Result add(@Valid BPLesson bPLesson, BindingResult bindingResult) {
PersistModel data = bPLessonServiceImpl.save(bPLesson);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bPLesson);
}
@ApiOperation(value="删除平台记录企业的课程", notes="删除平台记录企业的课程")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@DeleteMapping("/delete/{businessId:\\w+}")
public Result delete(@PathVariable String businessId,BPLesson bPLesson) {
bPLesson.setBusinessId(businessId);
PersistModel data = bPLessonServiceImpl.remove(bPLesson);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
businessId);
}
}
package org.rcisoft.business.blesson.dao;
import org.rcisoft.business.blesson.entity.BPLesson;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.rcisoft.core.base.BaseMapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Created with on 2020-7-1 18:57:28.
*/
@Repository
public interface BPLessonRepository extends BaseMapper<BPLesson> {
/**
* 分页查询 bPLesson
*
*/
@Select("<script>select * from b_p_lesson where 1=1 "
+ "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "</script>")
@ResultMap(value = "BaseResultMap" )
List<BPLesson> queryBPLessons(BPLesson bPLesson);
}
......@@ -220,7 +220,6 @@ public class BLesson extends IdEntity<BLesson> {
private List<BViewRangeSonDTO> viewRangeDepartList;
@ApiModelProperty(value = "是否报名(0未报名 1已报名)")
@Transient
private String isApply;
......@@ -287,6 +286,9 @@ public class BLesson extends IdEntity<BLesson> {
@ApiModelProperty(value = "是不是new(0/1)")
private String isNew;
@ApiModelProperty(value = "是否为企业转化(1 转化)")
private String isTrans;
public void initModel(){
// this.setDefaultUrl(global.getDEFAULT_COURSE_LOCATION());
......
package org.rcisoft.business.blesson.entity;
import lombok.*;
import org.rcisoft.core.entity.IdEntity;
import javax.persistence.*;
import java.util.Date;
/**
* Created with on 2020-7-1 18:57:28.
*/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "b_p_lesson")
public class BPLesson extends IdEntity<BPLesson> {
/**
* @desc 课程编号
* @column code
* @default
*/
private String code;
/**
* @desc 课程名称
* @column lesson_name
* @default
*/
private String lessonName;
/**
* @desc 默认封面图片url
* @column default_url
* @default
*/
private String defaultUrl;
/**
* @desc 学时
* @column class_hour
* @default
*/
private String classHour;
/**
* @desc 讲师id
* @column lecturer_id
* @default
*/
private String lecturerId;
/**
* @desc 发布状态(0:待发布 1:审核中 2:已发布 3:已驳回 4:已关闭)
* @column release_state
* @default
*/
private String releaseState;
/**
* @desc 课程分类
* @column course_id
* @default
*/
private String courseId;
/**
* @desc 选课人数
* @column person_number
* @default
*/
private String personNumber;
/**
* @desc 课程时长(当课时为1时显示)
* @column course_time
* @default
*/
private String courseTime;
/**
* @desc 课程描述
* @column course_description
* @default
*/
private String courseDescription;
/**
* @desc 可见范围
* @column view_range
* @default
*/
private String viewRange;
/**
* @desc 发布时间
* @column release_date
* @default
*/
private Date releaseDate;
/**
* @desc 关闭时间
* @column close_date
* @default
*/
private Date closeDate;
/**
* @desc 课程类型(0:课程 1:培训)
* @column lesson_type
* @default
*/
private String lessonType;
/**
* @desc 评论数
* @column discuss_number
* @default
*/
private String discussNumber;
/**
* @desc 推荐(0:不推荐 1:推荐)
* @column recommend
* @default
*/
private String recommend;
/**
* @desc 关注数
* @column collect_number
* @default
*/
private String collectNumber;
/**
* @desc 热度
* @column hot_number
* @default
*/
private String hotNumber;
/**
* @desc 企业id
* @column corp_id
* @default
*/
private String corpId;
/**
* @desc 报名开始时间
* @column apply_start_date
* @default
*/
private Date applyStartDate;
/**
* @desc 报名结束时间
* @column apply_over_date
* @default
*/
private Date applyOverDate;
/**
* @desc 培训开始时间
* @column train_start_date
* @default
*/
private Date trainStartDate;
/**
* @desc 培训结束时间
* @column train_over_date
* @default
*/
private Date trainOverDate;
/**
* @desc 培训最大报名人数
* @column max_apply_person
* @default
*/
private String maxApplyPerson;
/**
* @desc 培训地址
* @column train_address
* @default
*/
private String trainAddress;
/**
* @desc 培训签到时间(培训开始前 分钟数)
* @column train_sign_time
* @default
*/
private String trainSignTime;
/**
* @desc 二维码
* @column qr_code
* @default
*/
private String qrCode;
/**
* @desc
* @column value_consume
* @default 0
*/
private String valueConsume;
/**
* @desc
* @column value_gain
* @default 0
*/
private String valueGain;
/**
* @desc 积分修改时间
* @column value_update_date
* @default
*/
private Date valueUpdateDate;
}
package org.rcisoft.business.blesson.service;
import org.rcisoft.business.blesson.entity.BPLesson;
import org.rcisoft.core.model.PersistModel;
import java.util.List;
/**
* Created by on 2020-7-1 18:57:28.
*/
public interface BPLessonService {
/**
* 保存 平台记录企业的课程
* @param bPLesson
* @return
*/
PersistModel save(BPLesson bPLesson);
/**
* 删除 平台记录企业的课程
* @param bPLesson
* @return
*/
PersistModel remove(BPLesson bPLesson);
}
package org.rcisoft.business.blesson.service.impl;
import org.rcisoft.core.util.UserUtil;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.business.blesson.dao.BPLessonRepository;
import org.rcisoft.business.blesson.entity.BPLesson;
import org.rcisoft.business.blesson.service.BPLessonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import lombok.extern.slf4j.Slf4j;
/**
* Created by on 2020-7-1 18:57:28.
*/
@Service
@Transactional(readOnly = true,propagation = Propagation.NOT_SUPPORTED)
@Slf4j
public class BPLessonServiceImpl implements BPLessonService {
@Autowired
private BPLessonRepository bPLessonRepository;
/**
* 保存 平台记录企业的课程
* @param bPLesson
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel save(BPLesson bPLesson){
//增加操作
UserUtil.setCurrentPersistOperation(bPLesson);
int line = bPLessonRepository.insertSelective(bPLesson);
return new PersistModel(line);
}
/**
* 删除 平台记录企业的课程
* @param bPLesson
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel remove(BPLesson bPLesson){
int line = bPLessonRepository.deleteByPrimaryKey(bPLesson.getBusinessId());
return new PersistModel(line);
}
}
package org.rcisoft.business.blessonlog.controller;
/*固定导入*/
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.common.controller.PaginationController;
import org.rcisoft.common.model.GridModel;
import org.rcisoft.core.constant.MessageConstant;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.result.Result;
import org.rcisoft.sys.user.bean.CurUser;
import org.springframework.validation.BindingResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import org.rcisoft.business.blessonlog.entity.BLessonLog;
import org.rcisoft.business.blessonlog.service.BLessonLogService;
import java.util.List;
/**
* Created by on 2020-7-1 18:57:28.
*/
@RestController
@RequestMapping("/blessonlog")
public class BLessonLogController extends PaginationController<BLessonLog> {
@Autowired
private BLessonLogService bLessonLogServiceImpl;
@ApiOperation(value="添加课程日志", notes="添加课程日志")
@PostMapping(value = "/add")
public Result add(CurUser curUser, @Valid BLessonLog bLessonLog, BindingResult bindingResult) {
bLessonLog.setCorpId(curUser.getCorpId());
PersistModel data = bLessonLogServiceImpl.save(bLessonLog);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
bLessonLog);
}
@ApiOperation(value="分页查询课程日志集合", notes="分页查询课程日志集合")
@GetMapping(value = "/queryBLessonLogByPagination")
public GridModel listByPagination(CurUser curUser ,BLessonLog bLessonLog) {
bLessonLogServiceImpl.findAllByPagination(getPaginationUtility(), bLessonLog);
return getGridModelResponse();
}
}
package org.rcisoft.business.blessonlog.dao;
import org.rcisoft.core.base.BaseMapper;
import org.rcisoft.business.blessonlog.entity.BLessonLog;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Created with on 2020-7-1 18:57:28.
*/
@Repository
public interface BLessonLogRepository extends BaseMapper<BLessonLog> {
/**
* 分页查询 bLessonLog
*
*/
@Select("<script>select * from b_lesson_log where 1=1 "
+ "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> " +
" order by create_date desc "
+ "</script>")
@ResultMap(value = "BaseResultMap" )
List<BLessonLog> queryBLessonLogs(BLessonLog bLessonLog);
}
package org.rcisoft.business.blessonlog.entity;
import lombok.*;
import org.rcisoft.core.entity.IdEntity;
import javax.persistence.*;
/**
* Created with on 2020-7-1 18:57:27.
*/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "b_lesson_log")
public class BLessonLog extends IdEntity<BLessonLog> {
/**
* @desc 日志内容
* @column content
* @default
*/
private String content;
/**
* @desc 日志内容
* @column content
* @default
*/
private String lessonId;
}
<?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="org.rcisoft.business.blessonlog.dao.BLessonLogRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.business.blessonlog.entity.BLessonLog">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="content" jdbcType="VARCHAR" property="content"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="corp_id" jdbcType="VARCHAR" property="corpId"/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
package org.rcisoft.business.blessonlog.service;
import org.rcisoft.business.blessonlog.entity.BLessonLog;
import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.model.PersistModel;
import java.util.List;
/**
* Created by on 2020-7-1 18:57:28.
*/
public interface BLessonLogService {
/**
* 保存 课程日志
* @param bLessonLog
* @return
*/
PersistModel save(BLessonLog bLessonLog);
/**
* 分页查询 课程日志
* @param bLessonLog
* @return
*/
List<BLessonLog> findAllByPagination(PageUtil<BLessonLog> paginationUtility,
BLessonLog bLessonLog);
}
package org.rcisoft.business.blessonlog.service.impl;
import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.business.blessonlog.dao.BLessonLogRepository;
import org.rcisoft.business.blessonlog.entity.BLessonLog;
import org.rcisoft.business.blessonlog.service.BLessonLogService;
import org.rcisoft.core.util.UserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/**
* Created by on 2020-7-1 18:57:28.
*/
@Service
@Transactional(readOnly = true,propagation = Propagation.NOT_SUPPORTED)
@Slf4j
public class BLessonLogServiceImpl implements BLessonLogService {
@Autowired
private BLessonLogRepository bLessonLogRepository;
/**
* 保存 课程日志
* @param bLessonLog
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel save(BLessonLog bLessonLog){
//增加操作
UserUtil.setCurrentPersistOperation(bLessonLog);
int line = bLessonLogRepository.insertSelective(bLessonLog);
return new PersistModel(line);
}
/**
* 分页查询 课程日志
* @param bLessonLog
* @return
*/
@Override
public List<BLessonLog> findAllByPagination(PageUtil<BLessonLog> paginationUtility,BLessonLog bLessonLog){
bLessonLog.setNormal();
return bLessonLogRepository.queryBLessonLogs(bLessonLog);
}
}
<?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="org.rcisoft.business.bchapter.dao.BPChapterRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.business.bchapter.entity.BPChapter">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="chapter_name" jdbcType="VARCHAR" property="chapterName"/>
<result column="chapter_level" jdbcType="TINYINT" property="chapterLevel"/>
<result column="pid" jdbcType="VARCHAR" property="pid"/>
<result column="chapter_url" jdbcType="VARCHAR" property="chapterUrl"/>
<result column="md_file" jdbcType="LONGVARCHAR" property="mdFile"/>
<result column="is_test" jdbcType="VARCHAR" property="isTest"/>
<result column="lesson_id" jdbcType="VARCHAR" property="lessonId"/>
<result column="class_hour" jdbcType="VARCHAR" property="classHour"/>
<result column="state" jdbcType="VARCHAR" property="state"/>
<result column="sort" jdbcType="INTEGER" property="sort"/>
<result column="corp_id" jdbcType="VARCHAR" property="corpId"/>
<result column="automatic" jdbcType="VARCHAR" property="automatic"/>
<result column="experiment_type" jdbcType="VARCHAR" property="experimentType"/>
<result column="course_time" jdbcType="VARCHAR" property="courseTime"/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
<?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="org.rcisoft.business.bfile.dao.BPFileRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.business.bfile.entity.BPFile">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="lesson_id" jdbcType="VARCHAR" property="lessonId"/>
<result column="chapter_id" jdbcType="VARCHAR" property="chapterId"/>
<result column="file_name" jdbcType="VARCHAR" property="fileName"/>
<result column="video_url" jdbcType="VARCHAR" property="videoUrl"/>
<result column="file_url" jdbcType="VARCHAR" property="fileUrl"/>
<result column="file_size" jdbcType="VARCHAR" property="fileSize"/>
<result column="file_time" jdbcType="VARCHAR" property="fileTime"/>
<result column="type" jdbcType="VARCHAR" property="type"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
......@@ -91,6 +91,8 @@
<result column="value_consume" jdbcType="VARCHAR" property="valueConsume"/>
<result column="value_gain" jdbcType="VARCHAR" property="valueGain"/>
<result column="value_update_date" jdbcType="TIMESTAMP" property="valueUpdateDate"/>
<result column="is_trans" jdbcType="VARCHAR" property="isTrans"/>
<collection property="labelList" ofType="org.rcisoft.business.blabel.dto.QueryLabelResDTO"
javaType="java.util.ArrayList" select="org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"
......
<?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="org.rcisoft.business.blesson.dao.BPLessonRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.business.blesson.entity.BPLesson">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="code" jdbcType="VARCHAR" property="code"/>
<result column="lesson_name" jdbcType="VARCHAR" property="lessonName"/>
<result column="default_url" jdbcType="VARCHAR" property="defaultUrl"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="class_hour" jdbcType="VARCHAR" property="classHour"/>
<result column="lecturer_id" jdbcType="VARCHAR" property="lecturerId"/>
<result column="release_state" jdbcType="VARCHAR" property="releaseState"/>
<result column="course_id" jdbcType="VARCHAR" property="courseId"/>
<result column="person_number" jdbcType="VARCHAR" property="personNumber"/>
<result column="course_time" jdbcType="VARCHAR" property="courseTime"/>
<result column="course_description" jdbcType="LONGVARCHAR" property="courseDescription"/>
<result column="view_range" jdbcType="VARCHAR" property="viewRange"/>
<result column="release_date" jdbcType="TIMESTAMP" property="releaseDate"/>
<result column="close_date" jdbcType="TIMESTAMP" property="closeDate"/>
<result column="lesson_type" jdbcType="VARCHAR" property="lessonType"/>
<result column="discuss_number" jdbcType="VARCHAR" property="discussNumber"/>
<result column="recommend" jdbcType="VARCHAR" property="recommend"/>
<result column="collect_number" jdbcType="VARCHAR" property="collectNumber"/>
<result column="hot_number" jdbcType="VARCHAR" property="hotNumber"/>
<result column="corp_id" jdbcType="VARCHAR" property="corpId"/>
<result column="apply_start_date" jdbcType="TIMESTAMP" property="applyStartDate"/>
<result column="apply_over_date" jdbcType="TIMESTAMP" property="applyOverDate"/>
<result column="train_start_date" jdbcType="TIMESTAMP" property="trainStartDate"/>
<result column="train_over_date" jdbcType="TIMESTAMP" property="trainOverDate"/>
<result column="max_apply_person" jdbcType="VARCHAR" property="maxApplyPerson"/>
<result column="train_address" jdbcType="VARCHAR" property="trainAddress"/>
<result column="train_sign_time" jdbcType="VARCHAR" property="trainSignTime"/>
<result column="qr_code" jdbcType="VARCHAR" property="qrCode"/>
<result column="value_consume" jdbcType="VARCHAR" property="valueConsume"/>
<result column="value_gain" jdbcType="VARCHAR" property="valueGain"/>
<result column="value_update_date" jdbcType="TIMESTAMP" property="valueUpdateDate"/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
<?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="org.rcisoft.business.blessonlog.dao.BLessonLogRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.business.blessonlog.entity.BLessonLog">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="content" jdbcType="VARCHAR" property="content"/>
<result column="lesson_id" jdbcType="VARCHAR" property="lessonId"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="corp_id" jdbcType="VARCHAR" property="corpId"/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment