大赛管理功能删除之前的模块相关功能
This commit is contained in:
parent
9bf2fede2c
commit
37f6fd51eb
|
@ -1,67 +0,0 @@
|
|||
package club.joylink.rtss.controller.racetr;
|
||||
|
||||
import club.joylink.rtss.entity.racetr.RacetrModulePager;
|
||||
import club.joylink.rtss.services.ISysUserService;
|
||||
import club.joylink.rtss.services.race.RaceModuleService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.race.RaceModule.RaceModuleCreateVO;
|
||||
import club.joylink.rtss.vo.race.RaceModule.RaceModuleListVO;
|
||||
import club.joylink.rtss.vo.race.RaceModule.RaceModuleVO;
|
||||
import club.joylink.rtss.vo.race.RaceModule.TaskSetting;
|
||||
import club.joylink.rtss.vo.race.RaceModuleQueryVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 竞赛-模块管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/exercise/race/module")
|
||||
public class RaceModuleController {
|
||||
|
||||
@Autowired
|
||||
private RaceModuleService moduleServicce;
|
||||
@Autowired
|
||||
private ISysUserService iSysUserService;
|
||||
|
||||
@PostMapping("/save/basic")
|
||||
public void saveBasic(@RequestBody RaceModuleCreateVO dto, @RequestAttribute AccountVO user) {
|
||||
this.moduleServicce.saveBasic(dto, user);
|
||||
}
|
||||
|
||||
@PostMapping("/update/{id}/basic")
|
||||
public void updateBasic(@PathVariable("id") Long id, @RequestBody RaceModuleCreateVO dto, @RequestAttribute AccountVO user) {
|
||||
this.moduleServicce.updateBasic(id, dto, user);
|
||||
}
|
||||
|
||||
@PostMapping("/setting/{moduleId}/task")
|
||||
public void editTaskSet(@PathVariable("moduleId") Long moduleId, @RequestBody TaskSetting setting, @RequestAttribute AccountVO user) {
|
||||
this.moduleServicce.editTaskSet(moduleId, setting, user);
|
||||
}
|
||||
|
||||
@DeleteMapping("/{id}")
|
||||
public void delete(@PathVariable("id") Long id) {
|
||||
this.moduleServicce.delete(id);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
public RaceModuleVO detail(@PathVariable("id") Long id) {
|
||||
return this.moduleServicce.detail(id);
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
public PageVO<RaceModuleListVO> page(RaceModuleQueryVO vo) {
|
||||
return this.moduleServicce.page(vo);
|
||||
}
|
||||
|
||||
//TODo 你是说数据校验接口?加到模块管理里面吧,所有校验、单个校验,加俩接口吧,好像都有用
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
package club.joylink.rtss.dao.racetr;
|
||||
|
||||
import club.joylink.rtss.dao.MyBatisBaseDao;
|
||||
import club.joylink.rtss.entity.racetr.RacetrModule;
|
||||
import club.joylink.rtss.entity.racetr.RacetrModuleExample;
|
||||
import club.joylink.rtss.entity.racetr.RacetrModulePager;
|
||||
import club.joylink.rtss.vo.race.RaceModuleQueryVO;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* RacetrModuleDAO继承基类
|
||||
*/
|
||||
|
||||
@Repository
|
||||
public interface RacetrModuleDAO extends MyBatisBaseDao<RacetrModule, Long, RacetrModuleExample> {
|
||||
|
||||
@Select("<script>"
|
||||
+ "select A.id,A.code,A.desc,A.paper_id as paperId,B.`name` as paperName,A.duration,A.create_time,A.update_time,A.creator_id,A.updater_id,C.nickname as creatorName,D.nickname as updaterName"
|
||||
+ " from racetr_module A left join racetr_paper B on A.paper_id = B.id "
|
||||
+ " left join sys_account C on A.creator_id = C.id "
|
||||
+ " left JOIN sys_account D on A.updater_id = D.id "
|
||||
+ " where 1 = 1 "
|
||||
+ "<if test='vo.code!= null and vo.code!= \"\"'> "
|
||||
+ " and A.code like CONCAT('%',#{vo.code},'%') "
|
||||
+ "</if> "
|
||||
+ "<if test='vo.paperName!= null and vo.paperName!= \"\"'> "
|
||||
+ " and B.name like CONCAT('%',#{vo.paperName},'%') "
|
||||
+ "</if> "
|
||||
+ "<if test='vo.paperId!= null and vo.paperId!= 0'> "
|
||||
+ " and A.paper_id = #{vo.paperId} "
|
||||
+ "</if> "
|
||||
+ "</script>")
|
||||
List<RacetrModulePager> pageList(@Param("vo") RaceModuleQueryVO vo);
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
package club.joylink.rtss.entity.racetr;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 模块
|
||||
*/
|
||||
@Data
|
||||
public class RacetrModule implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 模块编号(模块A、模块B...)
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 模块描述(智慧城轨运营组织、智慧城轨通信信号设备维护...)
|
||||
*/
|
||||
private String desc;
|
||||
|
||||
/**
|
||||
* 所属的试卷的ID
|
||||
*/
|
||||
private Long paperId;
|
||||
|
||||
/**
|
||||
* 考试总时间(min)
|
||||
*/
|
||||
private Integer duration;
|
||||
|
||||
/**
|
||||
* 创建者的ID
|
||||
*/
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者的ID
|
||||
*/
|
||||
private Long updaterId;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 任务设置
|
||||
*/
|
||||
private byte[] taskSetting;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -1,783 +0,0 @@
|
|||
package club.joylink.rtss.entity.racetr;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class RacetrModuleExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Long offset;
|
||||
|
||||
public RacetrModuleExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Long offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Long getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeIsNull() {
|
||||
addCriterion("code is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeIsNotNull() {
|
||||
addCriterion("code is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeEqualTo(String value) {
|
||||
addCriterion("code =", value, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeNotEqualTo(String value) {
|
||||
addCriterion("code <>", value, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeGreaterThan(String value) {
|
||||
addCriterion("code >", value, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("code >=", value, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeLessThan(String value) {
|
||||
addCriterion("code <", value, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeLessThanOrEqualTo(String value) {
|
||||
addCriterion("code <=", value, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeLike(String value) {
|
||||
addCriterion("code like", value, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeNotLike(String value) {
|
||||
addCriterion("code not like", value, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeIn(List<String> values) {
|
||||
addCriterion("code in", values, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeNotIn(List<String> values) {
|
||||
addCriterion("code not in", values, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeBetween(String value1, String value2) {
|
||||
addCriterion("code between", value1, value2, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeNotBetween(String value1, String value2) {
|
||||
addCriterion("code not between", value1, value2, "code");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescIsNull() {
|
||||
addCriterion("`desc` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescIsNotNull() {
|
||||
addCriterion("`desc` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescEqualTo(String value) {
|
||||
addCriterion("`desc` =", value, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescNotEqualTo(String value) {
|
||||
addCriterion("`desc` <>", value, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescGreaterThan(String value) {
|
||||
addCriterion("`desc` >", value, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`desc` >=", value, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescLessThan(String value) {
|
||||
addCriterion("`desc` <", value, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescLessThanOrEqualTo(String value) {
|
||||
addCriterion("`desc` <=", value, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescLike(String value) {
|
||||
addCriterion("`desc` like", value, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescNotLike(String value) {
|
||||
addCriterion("`desc` not like", value, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescIn(List<String> values) {
|
||||
addCriterion("`desc` in", values, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescNotIn(List<String> values) {
|
||||
addCriterion("`desc` not in", values, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescBetween(String value1, String value2) {
|
||||
addCriterion("`desc` between", value1, value2, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDescNotBetween(String value1, String value2) {
|
||||
addCriterion("`desc` not between", value1, value2, "desc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdIsNull() {
|
||||
addCriterion("paper_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdIsNotNull() {
|
||||
addCriterion("paper_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdEqualTo(Long value) {
|
||||
addCriterion("paper_id =", value, "paperId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdNotEqualTo(Long value) {
|
||||
addCriterion("paper_id <>", value, "paperId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdGreaterThan(Long value) {
|
||||
addCriterion("paper_id >", value, "paperId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("paper_id >=", value, "paperId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdLessThan(Long value) {
|
||||
addCriterion("paper_id <", value, "paperId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("paper_id <=", value, "paperId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdIn(List<Long> values) {
|
||||
addCriterion("paper_id in", values, "paperId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdNotIn(List<Long> values) {
|
||||
addCriterion("paper_id not in", values, "paperId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdBetween(Long value1, Long value2) {
|
||||
addCriterion("paper_id between", value1, value2, "paperId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPaperIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("paper_id not between", value1, value2, "paperId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationIsNull() {
|
||||
addCriterion("duration is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationIsNotNull() {
|
||||
addCriterion("duration is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationEqualTo(Integer value) {
|
||||
addCriterion("duration =", value, "duration");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationNotEqualTo(Integer value) {
|
||||
addCriterion("duration <>", value, "duration");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationGreaterThan(Integer value) {
|
||||
addCriterion("duration >", value, "duration");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("duration >=", value, "duration");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationLessThan(Integer value) {
|
||||
addCriterion("duration <", value, "duration");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("duration <=", value, "duration");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationIn(List<Integer> values) {
|
||||
addCriterion("duration in", values, "duration");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationNotIn(List<Integer> values) {
|
||||
addCriterion("duration not in", values, "duration");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationBetween(Integer value1, Integer value2) {
|
||||
addCriterion("duration between", value1, value2, "duration");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDurationNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("duration not between", value1, value2, "duration");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdIsNull() {
|
||||
addCriterion("creator_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdIsNotNull() {
|
||||
addCriterion("creator_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdEqualTo(Long value) {
|
||||
addCriterion("creator_id =", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotEqualTo(Long value) {
|
||||
addCriterion("creator_id <>", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdGreaterThan(Long value) {
|
||||
addCriterion("creator_id >", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("creator_id >=", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdLessThan(Long value) {
|
||||
addCriterion("creator_id <", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("creator_id <=", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdIn(List<Long> values) {
|
||||
addCriterion("creator_id in", values, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotIn(List<Long> values) {
|
||||
addCriterion("creator_id not in", values, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdBetween(Long value1, Long value2) {
|
||||
addCriterion("creator_id between", value1, value2, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("creator_id not between", value1, value2, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdIsNull() {
|
||||
addCriterion("updater_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdIsNotNull() {
|
||||
addCriterion("updater_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdEqualTo(Long value) {
|
||||
addCriterion("updater_id =", value, "updaterId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdNotEqualTo(Long value) {
|
||||
addCriterion("updater_id <>", value, "updaterId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdGreaterThan(Long value) {
|
||||
addCriterion("updater_id >", value, "updaterId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("updater_id >=", value, "updaterId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdLessThan(Long value) {
|
||||
addCriterion("updater_id <", value, "updaterId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("updater_id <=", value, "updaterId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdIn(List<Long> values) {
|
||||
addCriterion("updater_id in", values, "updaterId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdNotIn(List<Long> values) {
|
||||
addCriterion("updater_id not in", values, "updaterId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdBetween(Long value1, Long value2) {
|
||||
addCriterion("updater_id between", value1, value2, "updaterId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdaterIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("updater_id not between", value1, value2, "updaterId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
package club.joylink.rtss.entity.racetr;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RacetrModulePager {
|
||||
|
||||
private Long id;
|
||||
private String code;
|
||||
private String desc;
|
||||
private Long paperId;
|
||||
private String paperName;
|
||||
private Integer duration;
|
||||
private LocalDateTime createTime;
|
||||
private LocalDateTime updateTime;
|
||||
private Long creatorId;
|
||||
private Long updaterId;
|
||||
private String creatorName;
|
||||
private String updaterName;
|
||||
|
||||
}
|
|
@ -1,136 +0,0 @@
|
|||
package club.joylink.rtss.services.race;
|
||||
|
||||
import club.joylink.rtss.dao.racetr.RacetrModuleDAO;
|
||||
import club.joylink.rtss.entity.SysAccount;
|
||||
import club.joylink.rtss.entity.racetr.RacetrModule;
|
||||
import club.joylink.rtss.entity.racetr.RacetrModulePager;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.ISysUserService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.common.ModifyInfo.ModifyInfoVO;
|
||||
import club.joylink.rtss.vo.race.RaceModule.RaceModuleCreateVO;
|
||||
import club.joylink.rtss.vo.race.RaceModule.RaceModuleListVO;
|
||||
import club.joylink.rtss.vo.race.RaceModule.RaceModuleVO;
|
||||
import club.joylink.rtss.vo.race.RaceModule.TaskSetting;
|
||||
import club.joylink.rtss.vo.race.RaceModuleQueryVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@Deprecated
|
||||
public class RaceModuleService extends RaceServiceUtil {
|
||||
|
||||
@Autowired
|
||||
private RacetrModuleDAO moduleDAO;
|
||||
@Autowired
|
||||
private ISysUserService iSysUserService;
|
||||
|
||||
private RacetrModule findId(Long id) {
|
||||
RacetrModule module = this.moduleDAO.selectByPrimaryKey(id);
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(module), "未找到对应的模块数据");
|
||||
return module;
|
||||
}
|
||||
|
||||
public void saveBasic(RaceModuleCreateVO dto, AccountVO user) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
RacetrModule module = new RacetrModule();
|
||||
module.setCode(dto.getCode());
|
||||
module.setDesc(dto.getDesc());
|
||||
module.setPaperId(dto.getPaperId());
|
||||
module.setDuration(dto.getDuration());
|
||||
module.setCreatorId(user.getId());
|
||||
module.setUpdaterId(user.getId());
|
||||
module.setCreateTime(now);
|
||||
module.setUpdateTime(now);
|
||||
this.moduleDAO.insertSelective(module);
|
||||
}
|
||||
|
||||
public void updateBasic(Long id, RaceModuleCreateVO dto, AccountVO user) {
|
||||
RacetrModule module = this.findId(id);
|
||||
module.setCode(dto.getCode());
|
||||
module.setDesc(dto.getDesc());
|
||||
module.setPaperId(dto.getPaperId());
|
||||
module.setDuration(dto.getDuration());
|
||||
module.setUpdaterId(user.getId());
|
||||
module.setUpdateTime(LocalDateTime.now());
|
||||
this.moduleDAO.updateByPrimaryKeySelective(module);
|
||||
}
|
||||
|
||||
public void editTaskSet(Long moduleId, TaskSetting setting, AccountVO user) {
|
||||
RacetrModule module = this.findId(moduleId);
|
||||
module.setTaskSetting(setting.toByteArray());
|
||||
module.setUpdaterId(user.getId());
|
||||
module.setUpdateTime(LocalDateTime.now());
|
||||
this.moduleDAO.updateByPrimaryKeySelective(module);
|
||||
}
|
||||
|
||||
public PageVO<RaceModuleListVO> page(RaceModuleQueryVO vo) {
|
||||
PageHelper.startPage(vo.getPageNum(), vo.getPageSize());
|
||||
Page<RacetrModulePager> page = (Page<RacetrModulePager>) this.moduleDAO.pageList(vo);
|
||||
return PageVO.convert(page, this.convertPageVO(page.getResult()));
|
||||
}
|
||||
|
||||
private RaceModuleListVO convertVO(RacetrModulePager p) {
|
||||
RaceModuleListVO.Builder bu = RaceModuleListVO.newBuilder();
|
||||
bu.setId(p.getId());
|
||||
bu.setCode(p.getCode());
|
||||
bu.setDesc(p.getDesc());
|
||||
bu.setDuration(p.getDuration());
|
||||
bu.setPaperId(p.getPaperId());
|
||||
bu.setPaperName(p.getPaperName());
|
||||
ModifyInfoVO modifyInfoVO = this.createModifyInfo(p.getCreatorId(), p.getCreatorName(), p.getUpdaterId(), p.getUpdaterName(), p.getCreateTime(), p.getUpdateTime());
|
||||
|
||||
bu.setModifyInfo(modifyInfoVO);
|
||||
return bu.build();
|
||||
}
|
||||
|
||||
private List<RaceModuleListVO> convertPageVO(List<RacetrModulePager> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<RaceModuleListVO> voList = Lists.newArrayListWithCapacity(list.size());
|
||||
for (RacetrModulePager mp : list) {
|
||||
voList.add(this.convertVO(mp));
|
||||
}
|
||||
return voList;
|
||||
}
|
||||
|
||||
public void delete(Long id) {
|
||||
this.moduleDAO.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public RaceModuleVO detail(Long id) {
|
||||
RacetrModule rm = this.findId(id);
|
||||
Map<Long, SysAccount> accountMap = this.iSysUserService.findEntitiesForMap(List.of(rm.getCreatorId(), rm.getUpdaterId()));
|
||||
ModifyInfoVO modifyInfoVO = this.createModifyInfo(accountMap, rm.getCreatorId(), rm.getUpdaterId(), rm.getCreateTime(), rm.getUpdateTime());
|
||||
|
||||
RaceModuleVO.Builder builder = RaceModuleVO.newBuilder();
|
||||
builder.setId(rm.getId());
|
||||
builder.setCode(rm.getCode());
|
||||
builder.setDesc(rm.getDesc());
|
||||
builder.setDuration(rm.getDuration());
|
||||
builder.setModifyInfo(modifyInfoVO);
|
||||
builder.setPaperId(rm.getPaperId());
|
||||
try {
|
||||
TaskSetting ts = TaskSetting.parseFrom(rm.getTaskSetting());
|
||||
builder.setTaskSetting(ts);
|
||||
} catch (Exception e) {
|
||||
log.error("模型[{}] 解析任务设置失败 msg:[{}]", id, e.getMessage());
|
||||
BusinessExceptionAssertEnum.DATA_ERROR.fail("数据获取失败");
|
||||
}
|
||||
return builder.build();
|
||||
|
||||
}
|
||||
}
|
|
@ -1,350 +0,0 @@
|
|||
<?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="club.joylink.rtss.dao.racetr.RacetrModuleDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.racetr.RacetrModule">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="desc" jdbcType="VARCHAR" property="desc" />
|
||||
<result column="paper_id" jdbcType="BIGINT" property="paperId" />
|
||||
<result column="duration" jdbcType="INTEGER" property="duration" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="updater_id" jdbcType="BIGINT" property="updaterId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.racetr.RacetrModule">
|
||||
<result column="task_setting" jdbcType="LONGVARBINARY" property="taskSetting" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<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">
|
||||
<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">
|
||||
id, code, `desc`, paper_id, duration, creator_id, create_time, updater_id, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
task_setting
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.entity.racetr.RacetrModuleExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from racetr_module
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrModuleExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from racetr_module
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from racetr_module
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from racetr_module
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrModuleExample">
|
||||
delete from racetr_module
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrModule" useGeneratedKeys="true">
|
||||
insert into racetr_module (code, `desc`, paper_id,
|
||||
duration, creator_id, create_time,
|
||||
updater_id, update_time, task_setting
|
||||
)
|
||||
values (#{code,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{paperId,jdbcType=BIGINT},
|
||||
#{duration,jdbcType=INTEGER}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{taskSetting,jdbcType=LONGVARBINARY}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrModule" useGeneratedKeys="true">
|
||||
insert into racetr_module
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="desc != null">
|
||||
`desc`,
|
||||
</if>
|
||||
<if test="paperId != null">
|
||||
paper_id,
|
||||
</if>
|
||||
<if test="duration != null">
|
||||
duration,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updaterId != null">
|
||||
updater_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="taskSetting != null">
|
||||
task_setting,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="desc != null">
|
||||
#{desc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="paperId != null">
|
||||
#{paperId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="duration != null">
|
||||
#{duration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updaterId != null">
|
||||
#{updaterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="taskSetting != null">
|
||||
#{taskSetting,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrModuleExample" resultType="java.lang.Long">
|
||||
select count(*) from racetr_module
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update racetr_module
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.desc != null">
|
||||
`desc` = #{record.desc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.paperId != null">
|
||||
paper_id = #{record.paperId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.duration != null">
|
||||
duration = #{record.duration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updaterId != null">
|
||||
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.taskSetting != null">
|
||||
task_setting = #{record.taskSetting,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update racetr_module
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`desc` = #{record.desc,jdbcType=VARCHAR},
|
||||
paper_id = #{record.paperId,jdbcType=BIGINT},
|
||||
duration = #{record.duration,jdbcType=INTEGER},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
task_setting = #{record.taskSetting,jdbcType=LONGVARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update racetr_module
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`desc` = #{record.desc,jdbcType=VARCHAR},
|
||||
paper_id = #{record.paperId,jdbcType=BIGINT},
|
||||
duration = #{record.duration,jdbcType=INTEGER},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.racetr.RacetrModule">
|
||||
update racetr_module
|
||||
<set>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="desc != null">
|
||||
`desc` = #{desc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="paperId != null">
|
||||
paper_id = #{paperId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="duration != null">
|
||||
duration = #{duration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updaterId != null">
|
||||
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="taskSetting != null">
|
||||
task_setting = #{taskSetting,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.racetr.RacetrModule">
|
||||
update racetr_module
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
`desc` = #{desc,jdbcType=VARCHAR},
|
||||
paper_id = #{paperId,jdbcType=BIGINT},
|
||||
duration = #{duration,jdbcType=INTEGER},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
task_setting = #{taskSetting,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.racetr.RacetrModule">
|
||||
update racetr_module
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
`desc` = #{desc,jdbcType=VARCHAR},
|
||||
paper_id = #{paperId,jdbcType=BIGINT},
|
||||
duration = #{duration,jdbcType=INTEGER},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue