4.23
parent
a2e84b5c23
commit
7127653951
|
@ -86,6 +86,12 @@
|
|||
<version>3.8.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-groupe</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -3,6 +3,9 @@ package com.ruoyi.web.controller.classe;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.system.domain.Groupe;
|
||||
import com.ruoyi.system.domain.req.GroupeQueryReq;
|
||||
import com.ruoyi.system.service.GroupeService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -30,7 +33,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||
* 班级信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Api(tags = "班级信息")
|
||||
@RestController
|
||||
|
@ -39,6 +42,7 @@ public class ClasseController extends BaseController {
|
|||
@Autowired
|
||||
private ClasseService classeService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询班级信息列表
|
||||
*/
|
||||
|
@ -108,4 +112,13 @@ public class ClasseController extends BaseController {
|
|||
public Result<String> remove(@PathVariable List<Long> classeIds) {
|
||||
return toAjax(classeService.removeBatchByIds(classeIds));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("获取小组信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:groupe:list')")
|
||||
@GetMapping("/selectGroupe")
|
||||
public Result<List<Groupe>> list() {
|
||||
List<Groupe> list=classeService.selectGroupe();
|
||||
return Result.success(list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
package com.ruoyi.web.controller.groupe;
|
||||
|
||||
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.system.domain.Groupe;
|
||||
import com.ruoyi.system.domain.req.GroupeQueryReq;
|
||||
import com.ruoyi.system.domain.req.GroupeSaveReq;
|
||||
import com.ruoyi.system.domain.req.GroupeEditReq;
|
||||
import com.ruoyi.system.service.GroupeService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 小组信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Api(tags = "小组信息")
|
||||
@RestController
|
||||
@RequestMapping("/system/groupe")
|
||||
public class GroupeController extends BaseController {
|
||||
@Autowired
|
||||
private GroupeService groupeService;
|
||||
|
||||
/**
|
||||
* 查询小组信息列表
|
||||
*/
|
||||
@ApiOperation("获取小组信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:groupe:list')")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<Groupe>> list(GroupeQueryReq groupeQueryReq) {
|
||||
startPage();
|
||||
List<Groupe> list = groupeService.list(Groupe.queryBuild(groupeQueryReq));
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出小组信息列表
|
||||
*/
|
||||
@ApiOperation("导出小组信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:groupe:export')")
|
||||
@Log(title = "小组信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Groupe groupe) {
|
||||
List<Groupe> list = groupeService.list(groupe);
|
||||
ExcelUtil<Groupe> util = new ExcelUtil<Groupe>(Groupe.class);
|
||||
util.exportExcel(response, list, "小组信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取小组信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取小组信息详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('system:groupe:query')")
|
||||
@GetMapping(value = "/{groupId}")
|
||||
@ApiImplicitParam(name = "groupId", value = "groupId", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<Groupe> getInfo(@PathVariable("groupId") Long groupId) {
|
||||
return Result.success(groupeService.getById(groupId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增小组信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:groupe:add')")
|
||||
@Log(title = "小组信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增小组信息")
|
||||
public Result<String> add(@RequestBody GroupeSaveReq groupeSaveReq) {
|
||||
return toAjax(groupeService.save(Groupe.saveBuild(groupeSaveReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改小组信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:groupe:edit')")
|
||||
@Log(title = "小组信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{groupId}")
|
||||
@ApiOperation("修改小组信息")
|
||||
public Result<String> edit(@PathVariable Long groupId, @RequestBody GroupeEditReq groupeEditReq) {
|
||||
return toAjax(groupeService.updateById(Groupe.editBuild(groupId,groupeEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小组信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:groupe:remove')")
|
||||
@Log(title = "小组信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{groupIds}")
|
||||
@ApiOperation("删除小组信息")
|
||||
@ApiImplicitParam(name = "groupId", value = "groupId", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> groupIds) {
|
||||
return toAjax(groupeService.removeBatchByIds(groupIds));
|
||||
}
|
||||
}
|
|
@ -17,6 +17,7 @@
|
|||
<module>ruoyi-system</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>ruoyi-classe</module>
|
||||
<module>ruoyi-groupe</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -27,6 +27,12 @@
|
|||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-groupe</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
* 班级信息对象 classe
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
|
@ -42,12 +42,18 @@ public class Classe extends BaseEntity {
|
|||
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||
private String classeName;
|
||||
|
||||
/** 小组id */
|
||||
@Excel(name = "小组id")
|
||||
@ApiModelProperty(name = "小组id", value = "小组id")
|
||||
private String groups;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static Classe queryBuild( ClasseQueryReq classeQueryReq){
|
||||
return Classe.builder()
|
||||
.classeName(classeQueryReq.getClasseName())
|
||||
.groups(classeQueryReq.getGroups())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -57,6 +63,7 @@ public class Classe extends BaseEntity {
|
|||
public static Classe saveBuild(ClasseSaveReq classeSaveReq){
|
||||
return Classe.builder()
|
||||
.classeName(classeSaveReq.getClasseName())
|
||||
.groups(classeSaveReq.getGroups())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -67,6 +74,7 @@ public class Classe extends BaseEntity {
|
|||
return Classe.builder()
|
||||
.classeId(classeId)
|
||||
.classeName(classeEditReq.getClasseName())
|
||||
.groups(classeEditReq.getGroups())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
* 班级信息对象 classe
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
|
@ -30,4 +30,8 @@ public class ClasseEditReq extends BaseEntity {
|
|||
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||
private String classeName;
|
||||
|
||||
/** 小组id */
|
||||
@ApiModelProperty(name = "小组id", value = "小组id")
|
||||
private String groups;
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
* 班级信息对象 classe
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
|
@ -30,4 +30,8 @@ public class ClasseQueryReq extends BaseEntity {
|
|||
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||
private String classeName;
|
||||
|
||||
/** 小组id */
|
||||
@ApiModelProperty(name = "小组id", value = "小组id")
|
||||
private String groups;
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
* 班级信息对象 classe
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
|
@ -36,4 +36,9 @@ public class ClasseSaveReq extends BaseEntity {
|
|||
@ApiModelProperty(name = "班级名称", value = "班级名称")
|
||||
private String classeName;
|
||||
|
||||
/** 小组id */
|
||||
|
||||
@ApiModelProperty(name = "小组id", value = "小组id")
|
||||
private String groups;
|
||||
|
||||
}
|
||||
|
|
|
@ -3,13 +3,16 @@ package com.ruoyi.system.mapper;
|
|||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.system.domain.Classe;
|
||||
import com.ruoyi.system.domain.Groupe;
|
||||
|
||||
/**
|
||||
* 班级信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
public interface ClasseMapper extends BaseMapper<Classe> {
|
||||
|
||||
List<Groupe> selectGroupe();
|
||||
|
||||
}
|
||||
|
|
|
@ -3,12 +3,13 @@ package com.ruoyi.system.service;
|
|||
import java.util.List;
|
||||
import com.ruoyi.system.domain.Classe;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.system.domain.Groupe;
|
||||
|
||||
/**
|
||||
* 班级信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
public interface ClasseService extends IService<Classe> {
|
||||
/**
|
||||
|
@ -19,4 +20,7 @@ public interface ClasseService extends IService<Classe> {
|
|||
*/
|
||||
public List<Classe> list(Classe classe);
|
||||
|
||||
List<Groupe> selectGroupe();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@ import java.util.List;
|
|||
|
||||
import com.ruoyi.common.utils.ObjUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.Groupe;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.ClasseMapper;
|
||||
import com.ruoyi.system.domain.Classe;
|
||||
|
@ -16,12 +18,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
* 班级信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-22
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ClasseServiceImpl extends ServiceImpl<ClasseMapper, Classe> implements ClasseService {
|
||||
|
||||
@Autowired
|
||||
ClasseMapper classeMapper;
|
||||
/**
|
||||
* 查询班级信息列表
|
||||
*
|
||||
|
@ -37,9 +41,18 @@ public class ClasseServiceImpl extends ServiceImpl<ClasseMapper, Classe> implem
|
|||
queryWrapper.like(Classe::getClasseName, classe.getClasseName());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(classe.getGroups())){
|
||||
queryWrapper.eq(Classe::getGroups, classe.getGroups());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Groupe> selectGroupe() {
|
||||
return classeMapper.selectGroupe();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<resultMap type="com.ruoyi.system.domain.Classe" id="ClasseResult">
|
||||
<result property="classeId" column="classe_id" />
|
||||
<result property="classeName" column="classe_name" />
|
||||
<result property="groups" column="groups" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
@ -14,6 +15,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectClasseVo">
|
||||
select classe_id, classe_name, create_by, create_time, update_by, update_time from classe
|
||||
select classe_id, classe_name, groups, create_by, create_time, update_by, update_time from classe
|
||||
</sql>
|
||||
<select id="selectGroupe" resultType="com.ruoyi.system.domain.Groupe">
|
||||
select group_id,group_name from groupe
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -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-basic</artifactId>
|
||||
<version>3.8.6</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ruoyi-groupe</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-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,73 @@
|
|||
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.GroupeQueryReq;
|
||||
import com.ruoyi.system.domain.req.GroupeSaveReq;
|
||||
import com.ruoyi.system.domain.req.GroupeEditReq;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 小组信息对象 groupe
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("groupe")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "Groupe", description = "小组信息")
|
||||
public class Groupe extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 小组id */
|
||||
@TableId(value = "group_id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "小组id", value = "小组id")
|
||||
private Long groupId;
|
||||
|
||||
/** 小组名称 */
|
||||
@Excel(name = "小组名称")
|
||||
@ApiModelProperty(name = "小组名称", value = "小组名称")
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static Groupe queryBuild( GroupeQueryReq groupeQueryReq){
|
||||
return Groupe.builder()
|
||||
.groupName(groupeQueryReq.getGroupName())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static Groupe saveBuild(GroupeSaveReq groupeSaveReq){
|
||||
return Groupe.builder()
|
||||
.groupName(groupeSaveReq.getGroupName())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static Groupe editBuild(Long groupId, GroupeEditReq groupeEditReq){
|
||||
return Groupe.builder()
|
||||
.groupId(groupId)
|
||||
.groupName(groupeEditReq.getGroupName())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* 小组信息对象 groupe
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "GroupeEditReq", description = "小组信息")
|
||||
public class GroupeEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 小组名称 */
|
||||
@ApiModelProperty(name = "小组名称", value = "小组名称")
|
||||
private String groupName;
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* 小组信息对象 groupe
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "GroupeQueryReq", description = "小组信息")
|
||||
public class GroupeQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 小组名称 */
|
||||
@ApiModelProperty(name = "小组名称", value = "小组名称")
|
||||
private String groupName;
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* 小组信息对象 groupe
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "GroupeSaveReq", description = "小组信息")
|
||||
public class GroupeSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 小组id */
|
||||
|
||||
@ApiModelProperty(name = "小组id", value = "小组id")
|
||||
private Long groupId;
|
||||
|
||||
/** 小组名称 */
|
||||
|
||||
@ApiModelProperty(name = "小组名称", value = "小组名称")
|
||||
private String groupName;
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.system.domain.Groupe;
|
||||
|
||||
/**
|
||||
* 小组信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
public interface GroupeMapper extends BaseMapper<Groupe> {
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.Groupe;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 小组信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
public interface GroupeService extends IService<Groupe> {
|
||||
/**
|
||||
* 查询小组信息列表
|
||||
*
|
||||
* @param groupe 小组信息
|
||||
* @return 小组信息集合
|
||||
*/
|
||||
public List<Groupe> list(Groupe groupe);
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.ruoyi.system.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.system.mapper.GroupeMapper;
|
||||
import com.ruoyi.system.domain.Groupe;
|
||||
import com.ruoyi.system.service.GroupeService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* 小组信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-23
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class GroupeServiceImpl extends ServiceImpl<GroupeMapper, Groupe> implements GroupeService {
|
||||
|
||||
/**
|
||||
* 查询小组信息列表
|
||||
*
|
||||
* @param groupe 小组信息
|
||||
* @return 小组信息
|
||||
*/
|
||||
@Override
|
||||
public List<Groupe> list(Groupe groupe) {
|
||||
LambdaQueryWrapper<Groupe> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
if (ObjUtils.notNull(groupe.getGroupName())){
|
||||
queryWrapper.like(Groupe::getGroupName, groupe.getGroupName());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?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.GroupeMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.system.domain.Groupe" id="GroupeResult">
|
||||
<result property="groupId" column="group_id" />
|
||||
<result property="groupName" column="group_name" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGroupeVo">
|
||||
select group_id, group_name, create_by, create_time, update_by, update_time from groupe
|
||||
</sql>
|
||||
</mapper>
|
Loading…
Reference in New Issue