parent
1725541bbb
commit
f1ae64f4da
16
pom.xml
16
pom.xml
|
@ -177,12 +177,28 @@
|
|||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 功能模块-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 班级管理-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-clazz</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<modules>
|
||||
<module>ruoyi-application</module>
|
||||
<module>ruoyi-basic</module>
|
||||
<module>ruoyi-modules</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
|
|
@ -80,6 +80,12 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 班级管理 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-clazz</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -11,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|||
* @author ruoyi
|
||||
*/
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||
@MapperScan(basePackages = {"com.ruoyi.clazz.mapper"})
|
||||
public class RuoYiApplication {
|
||||
public static void main (String[] args) {
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
package com.ruoyi.web.controller.clazz;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.Result;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.clazz.domain.Clazz;
|
||||
import com.ruoyi.clazz.domain.req.ClazzQueryReq;
|
||||
import com.ruoyi.clazz.domain.req.ClazzSaveReq;
|
||||
import com.ruoyi.clazz.domain.req.ClazzEditReq;
|
||||
import com.ruoyi.clazz.service.ClazzService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 班级管理Controller
|
||||
*
|
||||
* @author seer
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Api(tags = "班级管理")
|
||||
@RestController
|
||||
@RequestMapping("/data/clazz")
|
||||
public class ClazzController extends BaseController {
|
||||
@Autowired
|
||||
private ClazzService clazzService;
|
||||
|
||||
/**
|
||||
* 查询班级管理列表
|
||||
*/
|
||||
@ApiOperation("获取班级管理列表")
|
||||
@PreAuthorize("@ss.hasPermi('data:clazz:list')")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<Clazz>> list(ClazzQueryReq clazzQueryReq) {
|
||||
startPage();
|
||||
List<Clazz> list = clazzService.list(Clazz.queryBuild(clazzQueryReq));
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出班级管理列表
|
||||
*/
|
||||
@ApiOperation("导出班级管理列表")
|
||||
@PreAuthorize("@ss.hasPermi('data:clazz:export')")
|
||||
@Log(title = "班级管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Clazz clazz) {
|
||||
List<Clazz> list = clazzService.list(clazz);
|
||||
ExcelUtil<Clazz> util = new ExcelUtil<Clazz>(Clazz.class);
|
||||
util.exportExcel(response, list, "班级管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班级管理详细信息
|
||||
*/
|
||||
@ApiOperation("获取班级管理详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('data:clazz:query')")
|
||||
@GetMapping(value = "/{clazzId}")
|
||||
@ApiImplicitParam(name = "clazzId", value = "clazzId", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<Clazz> getInfo(@PathVariable("clazzId") Long clazzId) {
|
||||
return Result.success(clazzService.getById(clazzId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班级管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:clazz:add')")
|
||||
@Log(title = "班级管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增班级管理")
|
||||
public Result<String> add(@RequestBody ClazzSaveReq clazzSaveReq) {
|
||||
return toAjax(clazzService.save(Clazz.saveBuild(clazzSaveReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班级管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:clazz:edit')")
|
||||
@Log(title = "班级管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{clazzId}")
|
||||
@ApiOperation("修改班级管理")
|
||||
public Result<String> edit(@PathVariable Long clazzId, @RequestBody ClazzEditReq clazzEditReq) {
|
||||
return toAjax(clazzService.updateById(Clazz.editBuild(clazzId,clazzEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班级管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:clazz:remove')")
|
||||
@Log(title = "班级管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{clazzIds}")
|
||||
@ApiOperation("删除班级管理")
|
||||
@ApiImplicitParam(name = "clazzId", value = "clazzId", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> clazzIds) {
|
||||
return toAjax(clazzService.removeBatchByIds(clazzIds));
|
||||
}
|
||||
}
|
|
@ -67,6 +67,10 @@ public class BaseEntity implements Serializable {
|
|||
@ApiModelProperty(hidden=true)
|
||||
private Date updateTime;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
|
|
|
@ -80,10 +80,10 @@ public class SysDictData extends BaseEntity {
|
|||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
// /**
|
||||
// * 备注
|
||||
// */
|
||||
// private String remark;
|
||||
|
||||
@NotBlank(message = "字典标签不能为空")
|
||||
@Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
|
||||
|
|
|
@ -52,10 +52,10 @@ public class SysDictType extends BaseEntity {
|
|||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
// /**
|
||||
// * 备注
|
||||
// */
|
||||
// private String remark;
|
||||
|
||||
|
||||
@NotBlank(message = "字典名称不能为空")
|
||||
|
|
|
@ -108,10 +108,10 @@ public class SysMenu extends BaseEntity {
|
|||
*/
|
||||
private List<SysMenu> children = new ArrayList<SysMenu>();
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
// /**
|
||||
// * 备注
|
||||
// */
|
||||
// private String remark;
|
||||
|
||||
|
||||
@NotBlank(message = "菜单名称不能为空")
|
||||
|
|
|
@ -99,10 +99,10 @@ public class SysRole extends BaseEntity {
|
|||
*/
|
||||
private Set<String> permissions;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
// /**
|
||||
// * 备注
|
||||
// */
|
||||
// private String remark;
|
||||
|
||||
|
||||
public SysRole () {
|
||||
|
|
|
@ -136,10 +136,10 @@ public class SysUser extends BaseEntity {
|
|||
*/
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
// /**
|
||||
// * 备注
|
||||
// */
|
||||
// private String remark;
|
||||
|
||||
public SysUser () {
|
||||
|
||||
|
|
|
@ -147,10 +147,10 @@ public class GenTable extends BaseEntity {
|
|||
*/
|
||||
private String parentMenuName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
// /**
|
||||
// * 备注
|
||||
// */
|
||||
// private String remark;
|
||||
|
||||
|
||||
public static boolean isTree (String tplCategory) {
|
||||
|
|
|
@ -80,10 +80,10 @@ public class SysJob extends BaseEntity {
|
|||
@Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
// /**
|
||||
// * 备注
|
||||
// */
|
||||
// private String remark;
|
||||
|
||||
@NotBlank(message = "任务名称不能为空")
|
||||
@Size(min = 0, max = 64, message = "任务名称不能超过64个字符")
|
||||
|
|
|
@ -57,10 +57,6 @@ public class SysConfig extends BaseEntity {
|
|||
@Excel(name = "系统内置", readConverterExp = "Y=是,N=否")
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
@NotBlank(message = "参数名称不能为空")
|
||||
@Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
|
||||
|
|
|
@ -51,10 +51,10 @@ public class SysNotice extends BaseEntity {
|
|||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
// /**
|
||||
// * 备注
|
||||
// */
|
||||
// private String remark;
|
||||
|
||||
@Xss(message = "公告标题不能包含脚本字符")
|
||||
@NotBlank(message = "公告标题不能为空")
|
||||
|
|
|
@ -63,10 +63,10 @@ public class SysPost extends BaseEntity {
|
|||
*/
|
||||
private boolean flag = false;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
// /**
|
||||
// * 备注
|
||||
// */
|
||||
// private String remark;
|
||||
|
||||
@NotBlank(message = "岗位编码不能为空")
|
||||
@Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符")
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.8.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>ruoyi-clazz</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>3.8.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ruoyi-clazz</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,87 @@
|
|||
package com.ruoyi.clazz.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.clazz.domain.req.ClazzQueryReq;
|
||||
import com.ruoyi.clazz.domain.req.ClazzSaveReq;
|
||||
import com.ruoyi.clazz.domain.req.ClazzEditReq;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 班级管理对象 clazz
|
||||
*
|
||||
* @author seer
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("clazz")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "Clazz", description = "班级管理")
|
||||
public class Clazz extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 班级ID */
|
||||
@Excel(name = "班级ID")
|
||||
@TableId(value = "clazz_id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "班级ID", value = "班级ID")
|
||||
private Long clazzId;
|
||||
|
||||
/** 班级名称 */
|
||||
@Excel(name = "班级名称")
|
||||
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||
private String clazzName;
|
||||
|
||||
/** 班级状态 0-停用 1-启用 */
|
||||
@Excel(name = "班级状态 0-停用 1-启用")
|
||||
@ApiModelProperty(name = "班级状态 0-停用 1-启用", value = "班级状态 0-停用 1-启用", required = true)
|
||||
private Long clazzStatus;
|
||||
|
||||
// private String remark;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static Clazz queryBuild( ClazzQueryReq clazzQueryReq){
|
||||
return Clazz.builder()
|
||||
.clazzId(clazzQueryReq.getClazzId())
|
||||
.clazzName(clazzQueryReq.getClazzName())
|
||||
.clazzStatus(clazzQueryReq.getClazzStatus())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static Clazz saveBuild(ClazzSaveReq clazzSaveReq){
|
||||
return Clazz.builder()
|
||||
.clazzName(clazzSaveReq.getClazzName())
|
||||
.clazzStatus(clazzSaveReq.getClazzStatus())
|
||||
.remark(clazzSaveReq.getRemark())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static Clazz editBuild(Long clazzId, ClazzEditReq clazzEditReq){
|
||||
return Clazz.builder()
|
||||
.clazzId(clazzId)
|
||||
.clazzName(clazzEditReq.getClazzName())
|
||||
.clazzStatus(clazzEditReq.getClazzStatus())
|
||||
.remark(clazzEditReq.getRemark())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.ruoyi.clazz.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 班级管理对象 clazz
|
||||
*
|
||||
* @author seer
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ClazzEditReq", description = "班级管理")
|
||||
public class ClazzEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 班级名称 */
|
||||
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||
private String clazzName;
|
||||
|
||||
/** 班级状态 0-停用 1-启用 */
|
||||
@ApiModelProperty(name = "班级状态 0-停用 1-启用", value = "班级状态 0-停用 1-启用", required = true)
|
||||
private Long clazzStatus;
|
||||
|
||||
// private String remark;
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.ruoyi.clazz.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 班级管理对象 clazz
|
||||
*
|
||||
* @author seer
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ClazzQueryReq", description = "班级管理")
|
||||
public class ClazzQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 班级ID */
|
||||
@TableId(value = "clazzId",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "班级ID", value = "班级ID")
|
||||
private Long clazzId;
|
||||
|
||||
/** 班级名称 */
|
||||
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||
private String clazzName;
|
||||
|
||||
/** 班级状态 0-停用 1-启用 */
|
||||
@ApiModelProperty(name = "班级状态 0-停用 1-启用", value = "班级状态 0-停用 1-启用")
|
||||
private Long clazzStatus;
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.ruoyi.clazz.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 班级管理对象 clazz
|
||||
*
|
||||
* @author seer
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ClazzSaveReq", description = "班级管理")
|
||||
public class ClazzSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 班级名称 */
|
||||
|
||||
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||
private String clazzName;
|
||||
|
||||
/** 班级状态 0-停用 1-启用 */
|
||||
|
||||
@ApiModelProperty(name = "班级状态 0-停用 1-启用", value = "班级状态 0-停用 1-启用", required = true)
|
||||
private Long clazzStatus;
|
||||
|
||||
// private String remark;
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.ruoyi.clazz.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.clazz.domain.Clazz;
|
||||
|
||||
/**
|
||||
* 班级管理Mapper接口
|
||||
*
|
||||
* @author seer
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
public interface ClazzMapper extends BaseMapper<Clazz> {
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.ruoyi.clazz.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.clazz.domain.Clazz;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 班级管理Service接口
|
||||
*
|
||||
* @author seer
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
public interface ClazzService extends IService<Clazz> {
|
||||
/**
|
||||
* 查询班级管理列表
|
||||
*
|
||||
* @param clazz 班级管理
|
||||
* @return 班级管理集合
|
||||
*/
|
||||
public List<Clazz> list(Clazz clazz);
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.ruoyi.clazz.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.ObjUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.clazz.mapper.ClazzMapper;
|
||||
import com.ruoyi.clazz.domain.Clazz;
|
||||
import com.ruoyi.clazz.service.ClazzService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* 班级管理Service业务层处理
|
||||
*
|
||||
* @author seer
|
||||
* @date 2024-04-22
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ClazzServiceImpl extends ServiceImpl<ClazzMapper, Clazz> implements ClazzService {
|
||||
|
||||
/**
|
||||
* 查询班级管理列表
|
||||
*
|
||||
* @param clazz 班级管理
|
||||
* @return 班级管理
|
||||
*/
|
||||
@Override
|
||||
public List<Clazz> list(Clazz clazz) {
|
||||
LambdaQueryWrapper<Clazz> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
if (ObjUtils.notNull(clazz.getClazzId())){
|
||||
queryWrapper.eq(Clazz::getClazzId, clazz.getClazzId());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(clazz.getClazzName())){
|
||||
queryWrapper.like(Clazz::getClazzName, clazz.getClazzName());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(clazz.getClazzStatus())){
|
||||
queryWrapper.eq(Clazz::getClazzStatus, clazz.getClazzStatus());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.clazz.mapper.ClazzMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.clazz.domain.Clazz" id="ClazzResult">
|
||||
<result property="clazzId" column="clazz_id" />
|
||||
<result property="clazzName" column="clazz_name" />
|
||||
<result property="clazzStatus" column="clazz_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectClazzVo">
|
||||
select clazz_id, clazz_name, clazz_status, create_by, create_time, update_by, update_time, remark from clazz
|
||||
</sql>
|
||||
</mapper>
|
Loading…
Reference in New Issue