Z兄弟
parent
1d05647a73
commit
811f6249ad
1
pom.xml
1
pom.xml
|
@ -183,6 +183,7 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>ruoyi-application</module>
|
<module>ruoyi-application</module>
|
||||||
<module>ruoyi-basic</module>
|
<module>ruoyi-basic</module>
|
||||||
|
<module>ruoyi-basic/ruoyi-clazz</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
package com.ruoyi.web.controller.clazz;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.Result;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.system.domain.SysClazz;
|
||||||
|
import com.ruoyi.system.domain.req.SysClazzEditReq;
|
||||||
|
import com.ruoyi.system.domain.req.SysClazzQueryReq;
|
||||||
|
import com.ruoyi.system.domain.req.SysClazzSaveReq;
|
||||||
|
import com.ruoyi.system.service.SysClazzService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-22
|
||||||
|
*/
|
||||||
|
@Api(tags = "【请填写功能名称】")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/clazz/clazz")
|
||||||
|
public class ClazzController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private SysClazzService sysClazzService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取【请填写功能名称】列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('clazz:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public Result<TableDataInfo<SysClazz>> list(SysClazzQueryReq sysClazzQueryReq) {
|
||||||
|
startPage();
|
||||||
|
List<SysClazz> list = sysClazzService.list(SysClazz.queryBuild(sysClazzQueryReq));
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出【请填写功能名称】列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("导出【请填写功能名称】列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('clazz:export')")
|
||||||
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SysClazz sysClazz) {
|
||||||
|
List<SysClazz> list = sysClazzService.list(sysClazz);
|
||||||
|
ExcelUtil<SysClazz> util = new ExcelUtil<SysClazz>(SysClazz.class);
|
||||||
|
util.exportExcel(response, list, "【请填写功能名称】数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取【请填写功能名称】详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取【请填写功能名称】详细信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:clazz:query')")
|
||||||
|
@GetMapping(value = "/{clazzId}")
|
||||||
|
@ApiImplicitParam(name = "clazzId", value = "clazzId", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||||
|
public Result<SysClazz> getInfo(@PathVariable("clazzId") Long clazzId) {
|
||||||
|
return Result.success(sysClazzService.getById(clazzId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增【请填写功能名称】
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:clazz:add')")
|
||||||
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation("新增【请填写功能名称】")
|
||||||
|
public Result<String> add(@RequestBody SysClazzSaveReq sysClazzSaveReq) {
|
||||||
|
return toAjax(sysClazzService.save(SysClazz.saveBuild(sysClazzSaveReq)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改【请填写功能名称】
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:clazz:edit')")
|
||||||
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/{clazzId}")
|
||||||
|
@ApiOperation("修改【请填写功能名称】")
|
||||||
|
public Result<String> edit(@PathVariable Long clazzId, @RequestBody SysClazzEditReq sysClazzEditReq) {
|
||||||
|
return toAjax(sysClazzService.updateById(SysClazz.editBuild(clazzId,sysClazzEditReq)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除【请填写功能名称】
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system: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(sysClazzService.removeBatchByIds(clazzIds));
|
||||||
|
}
|
||||||
|
}
|
|
@ -37,7 +37,7 @@ spring:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost:3306/vue-server?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/vue-server?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: ljy@0809
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea/modules.xml
|
||||||
|
.idea/jarRepositories.xml
|
||||||
|
.idea/compiler.xml
|
||||||
|
.idea/libraries/
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### Eclipse ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
### Mac OS ###
|
||||||
|
.DS_Store
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?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>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>com.xiaoYao</groupId>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<description>基础数据系统</description>
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- 通用工具-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>ruoyi-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.ruoyi.system.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.system.domain.req.SysClazzQueryReq;
|
||||||
|
import com.ruoyi.system.domain.req.SysClazzSaveReq;
|
||||||
|
import com.ruoyi.system.domain.req.SysClazzEditReq;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】对象 sys_clazz
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName("sys_clazz")
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "SysClazz", description = "【请填写功能名称】")
|
||||||
|
public class SysClazz extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 班级编号 */
|
||||||
|
@TableId(value = "clazz_id",type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(name = "班级编号", value = "班级编号")
|
||||||
|
private Long clazzId;
|
||||||
|
|
||||||
|
/** 班级名称 */
|
||||||
|
@Excel(name = "班级名称")
|
||||||
|
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||||
|
private String clazzName;
|
||||||
|
|
||||||
|
/** 班级状态 */
|
||||||
|
@Excel(name = "班级状态")
|
||||||
|
@ApiModelProperty(name = "班级状态", value = "班级状态")
|
||||||
|
private Long clazzState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询构造器
|
||||||
|
*/
|
||||||
|
public static SysClazz queryBuild( SysClazzQueryReq sysClazzQueryReq){
|
||||||
|
return SysClazz.builder()
|
||||||
|
.clazzName(sysClazzQueryReq.getClazzName())
|
||||||
|
.clazzState(sysClazzQueryReq.getClazzState())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加构造器
|
||||||
|
*/
|
||||||
|
public static SysClazz saveBuild(SysClazzSaveReq sysClazzSaveReq){
|
||||||
|
return SysClazz.builder()
|
||||||
|
.clazzName(sysClazzSaveReq.getClazzName())
|
||||||
|
.clazzState(sysClazzSaveReq.getClazzState())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改构造器
|
||||||
|
*/
|
||||||
|
public static SysClazz editBuild(Long clazzId, SysClazzEditReq sysClazzEditReq){
|
||||||
|
return SysClazz.builder()
|
||||||
|
.clazzId(clazzId)
|
||||||
|
.clazzName(sysClazzEditReq.getClazzName())
|
||||||
|
.clazzState(sysClazzEditReq.getClazzState())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.ruoyi.system.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】对象 sys_clazz
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel(value = "SysClazzEditReq", description = "【请填写功能名称】")
|
||||||
|
public class SysClazzEditReq extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 班级名称 */
|
||||||
|
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||||
|
private String clazzName;
|
||||||
|
|
||||||
|
/** 班级状态 */
|
||||||
|
@ApiModelProperty(name = "班级状态", value = "班级状态")
|
||||||
|
private Long clazzState;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.ruoyi.system.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】对象 sys_clazz
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel(value = "SysClazzQueryReq", description = "【请填写功能名称】")
|
||||||
|
public class SysClazzQueryReq extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 班级名称 */
|
||||||
|
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||||
|
private String clazzName;
|
||||||
|
|
||||||
|
/** 班级状态 */
|
||||||
|
@ApiModelProperty(name = "班级状态", value = "班级状态")
|
||||||
|
private Long clazzState;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.ruoyi.system.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】对象 sys_clazz
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel(value = "SysClazzSaveReq", description = "【请填写功能名称】")
|
||||||
|
public class SysClazzSaveReq extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 班级编号 */
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "班级编号", value = "班级编号")
|
||||||
|
private Long clazzId;
|
||||||
|
|
||||||
|
/** 班级名称 */
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||||
|
private String clazzName;
|
||||||
|
|
||||||
|
/** 班级状态 */
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "班级状态", value = "班级状态")
|
||||||
|
private Long clazzState;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.ruoyi.clazz.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ruoyi.system.domain.SysClazz;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-22
|
||||||
|
*/
|
||||||
|
public interface SysClazzMapper extends BaseMapper<SysClazz> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ruoyi.clazz.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.SysClazz;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-22
|
||||||
|
*/
|
||||||
|
public interface SysClazzService extends IService<SysClazz> {
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】列表
|
||||||
|
*
|
||||||
|
* @param sysClazz 【请填写功能名称】
|
||||||
|
* @return 【请填写功能名称】集合
|
||||||
|
*/
|
||||||
|
public List<SysClazz> list(SysClazz sysClazz);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.ruoyi.clazz.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.clazz.mapper.SysClazzMapper;
|
||||||
|
import com.ruoyi.clazz.service.SysClazzService;
|
||||||
|
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.system.domain.SysClazz;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-04-22
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class SysClazzServiceImpl extends ServiceImpl<SysClazzMapper, SysClazz> implements SysClazzService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】列表
|
||||||
|
*
|
||||||
|
* @param sysClazz 【请填写功能名称】
|
||||||
|
* @return 【请填写功能名称】
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysClazz> list(SysClazz sysClazz) {
|
||||||
|
LambdaQueryWrapper<SysClazz> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
|
||||||
|
if (ObjUtils.notNull(sysClazz.getClazzName())){
|
||||||
|
queryWrapper.like(SysClazz::getClazzName, sysClazz.getClazzName());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ObjUtils.notNull(sysClazz.getClazzState())){
|
||||||
|
queryWrapper.eq(SysClazz::getClazzState, sysClazz.getClazzState());
|
||||||
|
}
|
||||||
|
return list(queryWrapper);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?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.system.mapper.SysClazzMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.clazz.domain.SysClazz" id="SysClazzResult">
|
||||||
|
<result property="clazzId" column="clazz_id" />
|
||||||
|
<result property="clazzName" column="clazz_name" />
|
||||||
|
<result property="clazzState" column="clazz_state" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSysClazzVo">
|
||||||
|
select clazz_id, clazz_name, clazz_state from sys_clazz
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue