diff --git a/pom.xml b/pom.xml index cbccbd3..5f68023 100644 --- a/pom.xml +++ b/pom.xml @@ -108,7 +108,7 @@ - student + enroll-student diff --git a/src/main/java/com/sincere/student/controller/SysYxController.java b/src/main/java/com/sincere/student/controller/SysYxController.java new file mode 100644 index 0000000..cff8a92 --- /dev/null +++ b/src/main/java/com/sincere/student/controller/SysYxController.java @@ -0,0 +1,133 @@ +package com.sincere.student.controller; + +import com.sincere.student.dto.BaseDto; +import com.sincere.student.dto.yx.AddYxSchoolConsultVo; +import com.sincere.student.dto.yx.AddYxSchoolVo; +import com.sincere.student.model.yx.SysYxSchool; +import com.sincere.student.model.yx.SysYxSchoolConsult; +import com.sincere.student.service.SysYxColumnService; +import com.sincere.student.utils.Page; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@RestController +@RequestMapping("sys/yx") +public class SysYxController { + + @Autowired + SysYxColumnService sysYxColumnService; + + @ApiOperation("获取学校列表") + @RequestMapping(value = "/schoolList", method = RequestMethod.POST) + public BaseDto> schoolList(@RequestBody AddYxSchoolVo vo) { + BaseDto> result = new BaseDto<>(); + result.setData(sysYxColumnService.schoolList(vo)); + return result; + } + + @ApiOperation("添加学校") + @PostMapping(value = "addSchool") + public BaseDto addSchool(@RequestBody AddYxSchoolVo vo) { + sysYxColumnService.addSchool(vo); + return new BaseDto(); + } + + @ApiOperation("删除学校") + @GetMapping(value = "delSchool") + public BaseDto delSchool(@RequestParam Integer id) { + sysYxColumnService.delSchool(id); + return new BaseDto(); + } + + +// /** +// * 栏目相关接口 +// */ +// @MemberAccess +// @ApiOperation("获取栏目列表(1 文章 2学校 3视频)") +// @PostMapping(value = "/column/columnList") +// public BaseDto> columnList(@RequestBody ColumnDto columnDto) { +// BaseDto> result = new BaseDto<>(); +// ColumnEnums columnEnums = ColumnEnums.getByType(columnDto.getType()); +// if (columnEnums != null) { +// List data = sysYxColumnService.columnList(columnDto); +// result.setData(data); +// } else { +// result.setSuccess(false); +// result.setMessage("类型不匹配"); +// } +// return result; +// } + +// @ApiOperation("创建栏目(type : 1 文章 2学校 3视频)") +// @PostMapping(value = "/addColumnType") +// public BaseDto addColumnType(@RequestBody ColumnType columnType) { +// BaseDto result = new BaseDto(); +// sysYxColumnService.addColumnType(columnType); +// return result; +// } +// +// @ApiOperation("更新栏目(type : 1 文章 2学校 3视频)") +// @PostMapping(value = "/updateColumnType") +// public BaseDto updateColumn(@RequestBody ColumnType columnType) { +// BaseDto result = new BaseDto(); +// if (columnType.getId() > 0) { +// sysYxColumnService.updateColumnType(columnType); +// } else { +// result.setSuccess(false); +// result.setMessage("id没传"); +// } +// return result; +// } + + @ApiOperation("获取咨询列表") + @RequestMapping(value = "/consultList", method = RequestMethod.POST) + public BaseDto> consultList(@RequestBody AddYxSchoolConsultVo vo) { + BaseDto> result = new BaseDto<>(); + result.setData(sysYxColumnService.consultList(vo)); + return result; + } + + + @ApiOperation("新建咨询会相关接口") + @PostMapping(value = "/addConsult") + public BaseDto createConsult(@RequestBody AddYxSchoolConsultVo schoolConsultVo) { + BaseDto result = new BaseDto(); + sysYxColumnService.createConsult(schoolConsultVo); + return result; + } + + @ApiOperation("修改咨询会相关接口") + @PostMapping(value = "/updateConsult") + public BaseDto updateConsult(@RequestBody AddYxSchoolConsultVo schoolConsultVo) { + BaseDto result = new BaseDto(); + sysYxColumnService.createConsult(schoolConsultVo); + return result; + } + + @ApiOperation("删除咨询会(传主键)") + @GetMapping(value = "/delConsult") + public BaseDto deleteConsult(@RequestParam Integer id) { + BaseDto result = new BaseDto(); + sysYxColumnService.delConsult(id); + return result; + } + + @ApiOperation("获取详情") + @GetMapping(value = "/getConsultDetail") + public BaseDto getConsultDetail(@RequestParam Integer id) { + BaseDto result = new BaseDto(); + SysYxSchoolConsult consult = sysYxColumnService.getConsultDetail(id); + result.setData(consult); + return result; + } + + @ApiOperation("累加阅读量接口") + @GetMapping(value = "/updateRead") + public BaseDto updateRead(@RequestParam Integer id) { + BaseDto result = new BaseDto(); + sysYxColumnService.updateRead(id); + return result; + } +} diff --git a/src/main/java/com/sincere/student/dto/yx/AddYxSchoolConsultVo.java b/src/main/java/com/sincere/student/dto/yx/AddYxSchoolConsultVo.java new file mode 100644 index 0000000..fa4f993 --- /dev/null +++ b/src/main/java/com/sincere/student/dto/yx/AddYxSchoolConsultVo.java @@ -0,0 +1,130 @@ +package com.sincere.student.dto.yx; + +import com.sincere.student.dto.PageDto; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; + +public class AddYxSchoolConsultVo extends PageDto { + + @ApiModelProperty(value = "主键") + private Integer id; + @ApiModelProperty(value = "学校id") + private Integer schoolId; + @ApiModelProperty(value = "标题描述") + private Integer titleDesc; + @ApiModelProperty(value = "视频地址") + private String videoUrl; + @ApiModelProperty(value = "内容") + private String context; + @ApiModelProperty(value = "背景图片地址") + private String background; + @ApiModelProperty(value = "图片地址") + private String imgUrl; + @ApiModelProperty(value = "时间") + private Date createTime; + @ApiModelProperty(value = "排序") + private Integer sort; + @ApiModelProperty(value = "状态 0预览1发布") + private int status; + @ApiModelProperty(value = "阅读量") + private int readNumber; + @ApiModelProperty(value = "模板排版信息") + private String modelList; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getSchoolId() { + return schoolId; + } + + public void setSchoolId(Integer schoolId) { + this.schoolId = schoolId; + } + + public Integer getTitleDesc() { + return titleDesc; + } + + public void setTitleDesc(Integer titleDesc) { + this.titleDesc = titleDesc; + } + + public String getVideoUrl() { + return videoUrl; + } + + public void setVideoUrl(String videoUrl) { + this.videoUrl = videoUrl; + } + + public String getContext() { + return context; + } + + public void setContext(String context) { + this.context = context; + } + + public String getBackground() { + return background; + } + + public void setBackground(String background) { + this.background = background; + } + + public String getImgUrl() { + return imgUrl; + } + + public void setImgUrl(String imgUrl) { + this.imgUrl = imgUrl; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public int getReadNumber() { + return readNumber; + } + + public void setReadNumber(int readNumber) { + this.readNumber = readNumber; + } + + public String getModelList() { + return modelList; + } + + public void setModelList(String modelList) { + this.modelList = modelList; + } +} diff --git a/src/main/java/com/sincere/student/dto/yx/AddYxSchoolVo.java b/src/main/java/com/sincere/student/dto/yx/AddYxSchoolVo.java new file mode 100644 index 0000000..a1418ce --- /dev/null +++ b/src/main/java/com/sincere/student/dto/yx/AddYxSchoolVo.java @@ -0,0 +1,36 @@ +package com.sincere.student.dto.yx; + +import com.sincere.student.dto.PageDto; + +public class AddYxSchoolVo extends PageDto { + + private Integer id; + + private String schoolName; + + private Integer schoolType; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getSchoolName() { + return schoolName; + } + + public void setSchoolName(String schoolName) { + this.schoolName = schoolName; + } + + public Integer getSchoolType() { + return schoolType; + } + + public void setSchoolType(Integer schoolType) { + this.schoolType = schoolType; + } +} diff --git a/src/main/java/com/sincere/student/mapper/SysYxColumnTypeMapper.java b/src/main/java/com/sincere/student/mapper/SysYxColumnTypeMapper.java new file mode 100644 index 0000000..10f46d3 --- /dev/null +++ b/src/main/java/com/sincere/student/mapper/SysYxColumnTypeMapper.java @@ -0,0 +1,20 @@ +package com.sincere.student.mapper; + +import com.sincere.student.model.yx.SysYxColumnType; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface SysYxColumnTypeMapper { + int deleteByPrimaryKey(Integer id); + + int insertSelective(SysYxColumnType record); + + SysYxColumnType selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(SysYxColumnType record); + + List selectList(SysYxColumnType record); + + List countSort(@Param(value = "sort") int sort, @Param(value = "type") int type, @Param(value = "flag") int flag, @Param(value = "id") Integer id); +} \ No newline at end of file diff --git a/src/main/java/com/sincere/student/mapper/SysYxSchoolConsultMapper.java b/src/main/java/com/sincere/student/mapper/SysYxSchoolConsultMapper.java new file mode 100644 index 0000000..7014689 --- /dev/null +++ b/src/main/java/com/sincere/student/mapper/SysYxSchoolConsultMapper.java @@ -0,0 +1,25 @@ +package com.sincere.student.mapper; + +import com.sincere.student.dto.yx.AddYxSchoolConsultVo; +import com.sincere.student.model.yx.SysYxSchoolConsult; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface SysYxSchoolConsultMapper { + int deleteByPrimaryKey(Integer id); + + int insertSelective(SysYxSchoolConsult record); + + SysYxSchoolConsult selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(SysYxSchoolConsult record); + + List selectList(AddYxSchoolConsultVo record); + + int getListCount(AddYxSchoolConsultVo record); + + List countSort(@Param(value = "sort") int sort, @Param(value = "flag") int flag, @Param(value = "id") Integer id); + + int updateSort(SysYxSchoolConsult record); +} \ No newline at end of file diff --git a/src/main/java/com/sincere/student/mapper/SysYxSchoolMapper.java b/src/main/java/com/sincere/student/mapper/SysYxSchoolMapper.java new file mode 100644 index 0000000..335622a --- /dev/null +++ b/src/main/java/com/sincere/student/mapper/SysYxSchoolMapper.java @@ -0,0 +1,21 @@ +package com.sincere.student.mapper; + +import com.sincere.student.dto.yx.AddYxSchoolVo; +import com.sincere.student.model.yx.SysYxSchool; + +import java.util.List; + +public interface SysYxSchoolMapper { + + int deleteByPrimaryKey(Integer id); + + int insertSelective(SysYxSchool record); + + SysYxSchool selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(SysYxSchool record); + + List selectList(AddYxSchoolVo vo); + + int getListCount(AddYxSchoolVo vo); +} \ No newline at end of file diff --git a/src/main/java/com/sincere/student/model/yx/SysYxColumnType.java b/src/main/java/com/sincere/student/model/yx/SysYxColumnType.java new file mode 100644 index 0000000..617257d --- /dev/null +++ b/src/main/java/com/sincere/student/model/yx/SysYxColumnType.java @@ -0,0 +1,55 @@ +package com.sincere.student.model.yx; + +import java.util.Date; + +public class SysYxColumnType { + private Integer id; + + private String columnName; + + private Integer columnType; + + private Integer sort; + + private Date createTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getColumnName() { + return columnName; + } + + public void setColumnName(String columnName) { + this.columnName = columnName; + } + + public Integer getColumnType() { + return columnType; + } + + public void setColumnType(Integer columnType) { + this.columnType = columnType; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } +} \ No newline at end of file diff --git a/src/main/java/com/sincere/student/model/yx/SysYxSchool.java b/src/main/java/com/sincere/student/model/yx/SysYxSchool.java new file mode 100644 index 0000000..c344786 --- /dev/null +++ b/src/main/java/com/sincere/student/model/yx/SysYxSchool.java @@ -0,0 +1,45 @@ +package com.sincere.student.model.yx; + +import java.util.Date; + +public class SysYxSchool { + private Integer id; + + private String schoolName; + + private Integer schoolType; + + private Date createTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getSchoolName() { + return schoolName; + } + + public void setSchoolName(String schoolName) { + this.schoolName = schoolName == null ? null : schoolName.trim(); + } + + public Integer getSchoolType() { + return schoolType; + } + + public void setSchoolType(Integer schoolType) { + this.schoolType = schoolType; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } +} \ No newline at end of file diff --git a/src/main/java/com/sincere/student/model/yx/SysYxSchoolConsult.java b/src/main/java/com/sincere/student/model/yx/SysYxSchoolConsult.java new file mode 100644 index 0000000..81fcc48 --- /dev/null +++ b/src/main/java/com/sincere/student/model/yx/SysYxSchoolConsult.java @@ -0,0 +1,125 @@ +package com.sincere.student.model.yx; + +import java.util.Date; + +public class SysYxSchoolConsult { + private Integer id; + + private Integer schoolId; + + private Integer columnType; + + private String videoUrl; + + private String context; + + private String imgUrl; + + private Integer sort; + + private Integer status; + + private Integer readNumber; + + private String background; + + private Date createTime; + + private String modelList; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getSchoolId() { + return schoolId; + } + + public void setSchoolId(Integer schoolId) { + this.schoolId = schoolId; + } + + public Integer getColumnType() { + return columnType; + } + + public void setColumnType(Integer columnType) { + this.columnType = columnType; + } + + public String getVideoUrl() { + return videoUrl; + } + + public void setVideoUrl(String videoUrl) { + this.videoUrl = videoUrl == null ? null : videoUrl.trim(); + } + + public String getContext() { + return context; + } + + public void setContext(String context) { + this.context = context == null ? null : context.trim(); + } + + public String getImgUrl() { + return imgUrl; + } + + public void setImgUrl(String imgUrl) { + this.imgUrl = imgUrl == null ? null : imgUrl.trim(); + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getReadNumber() { + return readNumber; + } + + public void setReadNumber(Integer readNumber) { + this.readNumber = readNumber; + } + + public String getBackground() { + return background; + } + + public void setBackground(String background) { + this.background = background == null ? null : background.trim(); + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getModelList() { + return modelList; + } + + public void setModelList(String modelList) { + this.modelList = modelList == null ? null : modelList.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/sincere/student/service/SysYxColumnService.java b/src/main/java/com/sincere/student/service/SysYxColumnService.java new file mode 100644 index 0000000..942a71c --- /dev/null +++ b/src/main/java/com/sincere/student/service/SysYxColumnService.java @@ -0,0 +1,33 @@ +package com.sincere.student.service; + +import com.sincere.student.dto.yx.AddYxSchoolConsultVo; +import com.sincere.student.dto.yx.AddYxSchoolVo; +import com.sincere.student.model.ColumnType; +import com.sincere.student.model.yx.SysYxSchool; +import com.sincere.student.model.yx.SysYxSchoolConsult; +import com.sincere.student.utils.Page; + +public interface SysYxColumnService { + + void addSchool(AddYxSchoolVo vo); + + void delSchool(Integer id); + + Page schoolList(AddYxSchoolVo vo); + + void addColumnType(ColumnType columnType); + + void updateColumnType(ColumnType columnType); + + void delColumnType(Integer id); + + Page consultList(AddYxSchoolConsultVo vo); + + void createConsult(AddYxSchoolConsultVo schoolConsultVo); + + void delConsult(Integer id); + + SysYxSchoolConsult getConsultDetail(Integer id); + + void updateRead(Integer id); +} diff --git a/src/main/java/com/sincere/student/service/impl/SysYxColumnServiceImpl.java b/src/main/java/com/sincere/student/service/impl/SysYxColumnServiceImpl.java new file mode 100644 index 0000000..28348d5 --- /dev/null +++ b/src/main/java/com/sincere/student/service/impl/SysYxColumnServiceImpl.java @@ -0,0 +1,191 @@ +package com.sincere.student.service.impl; + +import com.github.pagehelper.PageHelper; +import com.sincere.student.dto.yx.AddYxSchoolConsultVo; +import com.sincere.student.dto.yx.AddYxSchoolVo; +import com.sincere.student.mapper.SysYxColumnTypeMapper; +import com.sincere.student.mapper.SysYxSchoolConsultMapper; +import com.sincere.student.mapper.SysYxSchoolMapper; +import com.sincere.student.model.ColumnType; +import com.sincere.student.model.yx.SysYxColumnType; +import com.sincere.student.model.yx.SysYxSchool; +import com.sincere.student.model.yx.SysYxSchoolConsult; +import com.sincere.student.service.SysYxColumnService; +import com.sincere.student.utils.Page; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.Date; +import java.util.List; + +@Service +public class SysYxColumnServiceImpl implements SysYxColumnService { + + @Autowired + SysYxSchoolMapper sysYxSchoolMapper; + @Autowired + SysYxColumnTypeMapper sysYxColumnTypeMapper; + @Autowired + SysYxSchoolConsultMapper sysYxSchoolConsultMapper; + + @Override + public Page schoolList(AddYxSchoolVo vo) { + Page result = new Page<>(vo.getPage(), vo.getPageSize()); + PageHelper.startPage(vo.getPage(), vo.getPageSize()); + List list = sysYxSchoolMapper.selectList(vo); + result.setList(list); + result.setCount(sysYxSchoolMapper.getListCount(vo)); + return result; + } + + @Override + public void addSchool(AddYxSchoolVo vo) { + SysYxSchool school = new SysYxSchool(); + BeanUtils.copyProperties(vo,school); + school.setCreateTime(new Date()); + if(vo.getId()==null){ + school.setId(null); + sysYxSchoolMapper.insertSelective(school); + }else{ + sysYxSchoolMapper.updateByPrimaryKeySelective(school); + } + } + + @Override + public void delSchool(Integer id) { + sysYxSchoolMapper.deleteByPrimaryKey(id); + } + + @Override + public void addColumnType(ColumnType columnType) { + Integer type = columnType.getType(); + Integer sort = columnType.getSort(); + String name = columnType.getName(); + + SysYxColumnType sysYxColumnType = new SysYxColumnType(); + sysYxColumnType.setColumnType(type); + sysYxColumnType.setColumnName(name); + sysYxColumnType.setSort(sort); + sysYxColumnType.setCreateTime(new Date()); + + List countList = sysYxColumnTypeMapper.countSort(sort.intValue(), type.intValue(), 1, null); + if (!CollectionUtils.isEmpty(countList)) { + int i = 1; + for (SysYxColumnType oldType : countList) { + int addSort = i + sort; + if (addSort > oldType.getSort()) { + //若已存在自增1 + oldType.setSort(oldType.getSort() + 1); + sysYxColumnTypeMapper.updateByPrimaryKeySelective(oldType); + } + i++; + } + } + sysYxColumnTypeMapper.insertSelective(sysYxColumnType); + } + + @Override + public void updateColumnType(ColumnType columnType) { + SysYxColumnType sysYxColumnType = sysYxColumnTypeMapper.selectByPrimaryKey(columnType.getId()); + if(sysYxColumnType==null){ + return; + } + Integer type = columnType.getType(); + Integer sort = columnType.getSort(); + String name = columnType.getName(); + + SysYxColumnType newType = new SysYxColumnType(); + newType.setColumnType(type); + newType.setColumnName(name); + newType.setSort(sort); + newType.setCreateTime(new Date()); + + List countList = sysYxColumnTypeMapper.countSort(sort.intValue(), type.intValue(), 2, columnType.getId()); + if (!CollectionUtils.isEmpty(countList)) { + int i = 1; + for (SysYxColumnType oldType : countList) { + int addSort = i + sort; + if (addSort > oldType.getSort()) { + //若已存在自增1 + oldType.setSort(oldType.getSort() + 1); + sysYxColumnTypeMapper.updateByPrimaryKeySelective(oldType); + } + i++; + } + } + sysYxColumnType.setId(columnType.getId()); + sysYxColumnTypeMapper.updateByPrimaryKeySelective(sysYxColumnType); + } + + @Override + public void delColumnType(Integer id) { + + } + + @Override + public void createConsult(AddYxSchoolConsultVo schoolConsultVo) { + //排序 + Integer sort = schoolConsultVo.getSort(); + SysYxSchoolConsult consult = new SysYxSchoolConsult(); + BeanUtils.copyProperties(schoolConsultVo,consult); + + List consultList = null; + if(schoolConsultVo.getId() != null){ + consultList = sysYxSchoolConsultMapper.countSort(sort.intValue(), 2, schoolConsultVo.getId()); + }else{ + consultList = sysYxSchoolConsultMapper.countSort(sort.intValue(), 1, null); + } + if (!CollectionUtils.isEmpty(consultList)) { + int i = 1; + for (SysYxSchoolConsult oldConsult : consultList) { + int addSort = i + sort; + if (addSort > oldConsult.getSort()) { + //若已存在自增1 + oldConsult.setSort(oldConsult.getSort() + 1); + sysYxSchoolConsultMapper.updateSort(oldConsult); + } + i++; + } + } + if(schoolConsultVo.getId() != null){ + sysYxSchoolConsultMapper.updateByPrimaryKeySelective(consult); + }else { + consult.setId(null); + consult.setStatus(1); + sysYxSchoolConsultMapper.insertSelective(consult); + } + } + + @Override + public void delConsult(Integer id) { + sysYxSchoolConsultMapper.deleteByPrimaryKey(id); + } + + @Override + public SysYxSchoolConsult getConsultDetail(Integer id) { + return sysYxSchoolConsultMapper.selectByPrimaryKey(id); + } + + @Override + public void updateRead(Integer id) { + SysYxSchoolConsult consult = sysYxSchoolConsultMapper.selectByPrimaryKey(id); + if(consult!=null){ + int num = consult.getReadNumber(); + num = num+1; + consult.setReadNumber(num); + sysYxSchoolConsultMapper.updateByPrimaryKeySelective(consult); + } + } + + @Override + public Page consultList(AddYxSchoolConsultVo vo) { + Page result = new Page<>(vo.getPage(), vo.getPageSize()); + PageHelper.startPage(vo.getPage(), vo.getPageSize()); + List list = sysYxSchoolConsultMapper.selectList(vo); + result.setList(list); + result.setCount(sysYxSchoolConsultMapper.getListCount(vo)); + return result; + } +} diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 7f36a98..0d5e36f 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -31,4 +31,5 @@ mybatis: logging: level: - com.sincere.student.mapper: info \ No newline at end of file +# com.sincere.student.mapper: info + com.sincere.student.mapper: DEBUG \ No newline at end of file diff --git a/src/main/resources/mapper/SysYxColumnTypeMapper.xml b/src/main/resources/mapper/SysYxColumnTypeMapper.xml new file mode 100644 index 0000000..5d21c84 --- /dev/null +++ b/src/main/resources/mapper/SysYxColumnTypeMapper.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + id, column_name, column_type, sort, create_time + + + + delete from sys_yx_column_type + where id = #{id,jdbcType=INTEGER} + + + + + + insert into sys_yx_column_type + + + id, + + + column_name, + + + column_type, + + + sort, + + + create_time, + + + + + #{id,jdbcType=INTEGER}, + + + #{columnName,jdbcType=VARCHAR}, + + + #{columnType,jdbcType=INTEGER}, + + + #{sort,jdbcType=INTEGER}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + + + update sys_yx_column_type + + + column_name = #{columnName,jdbcType=VARCHAR}, + + + column_type = #{columnType,jdbcType=INTEGER}, + + + sort = #{sort,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysYxSchoolConsultMapper.xml b/src/main/resources/mapper/SysYxSchoolConsultMapper.xml new file mode 100644 index 0000000..29b8578 --- /dev/null +++ b/src/main/resources/mapper/SysYxSchoolConsultMapper.xml @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + id, school_id, title_desc, video_url, context, img_url, sort, status, read_number, + background, model_list,create_time + + + model_list + + + + delete from sys_yx_school_consult + where id = #{id,jdbcType=INTEGER} + + + + + + + + insert into sys_yx_school_consult + + + id, + + + school_id, + + + title_desc, + + + video_url, + + + context, + + + img_url, + + + sort, + + + status, + + + read_number, + + + background, + + + create_time, + + + model_list, + + + + + #{id,jdbcType=INTEGER}, + + + #{schoolId,jdbcType=INTEGER}, + + + #{titleDesc,jdbcType=VARCHAR}, + + + #{videoUrl,jdbcType=VARCHAR}, + + + #{context,jdbcType=VARCHAR}, + + + #{imgUrl,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + #{status,jdbcType=INTEGER}, + + + #{readNumber,jdbcType=INTEGER}, + + + #{background,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{modelList,jdbcType=LONGVARCHAR}, + + + + + update sys_yx_school_consult + + + school_id = #{schoolId,jdbcType=INTEGER}, + + + title_desc = #{titleDesc,jdbcType=VARCHAR}, + + + video_url = #{videoUrl,jdbcType=VARCHAR}, + + + context = #{context,jdbcType=VARCHAR}, + + + img_url = #{imgUrl,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=INTEGER}, + + + status = #{status,jdbcType=INTEGER}, + + + read_number = #{readNumber,jdbcType=INTEGER}, + + + background = #{background,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + model_list = #{modelList,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + + + update university_consult set sort = #{sort} where id=#{id} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysYxSchoolMapper.xml b/src/main/resources/mapper/SysYxSchoolMapper.xml new file mode 100644 index 0000000..2006089 --- /dev/null +++ b/src/main/resources/mapper/SysYxSchoolMapper.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + id, school_name, school_type, create_time + + + + delete from sys_yx_school + where id = #{id,jdbcType=INTEGER} + + + + + + + + insert into sys_yx_school + + + id, + + + school_name, + + + school_type, + + + create_time, + + + + + #{id,jdbcType=INTEGER}, + + + #{schoolName,jdbcType=VARCHAR}, + + + #{schoolType,jdbcType=INTEGER}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + + + update sys_yx_school + + + school_name = #{schoolName,jdbcType=VARCHAR}, + + + school_type = #{schoolType,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file -- libgit2 0.21.0