From 4aefea4bf790c16bbcdeefcf1642f9c1d3d8f163 Mon Sep 17 00:00:00 2001 From: bai <1643359946@qq.com> Date: Wed, 19 Apr 2023 19:57:52 +0800 Subject: [PATCH] =?UTF-8?q?2023=E5=B9=B44=E6=9C=8819=E6=97=A5=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../KcEvaluationstudentController.java | 162 ++++++++++++++++++ .../kc/qa/entity/KcEvaluationstudent.java | 61 +++++++ .../qa/mapper/KcEvaluationstudentMapper.java | 14 ++ .../mapper/xml/KcEvaluationstudentMapper.xml | 5 + .../service/IKcEvaluationstudentService.java | 14 ++ .../impl/KcEvaluationstudentServiceImpl.java | 18 ++ 6 files changed, 274 insertions(+) create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/controller/KcEvaluationstudentController.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/entity/KcEvaluationstudent.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/KcEvaluationstudentMapper.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/xml/KcEvaluationstudentMapper.xml create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/IKcEvaluationstudentService.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/impl/KcEvaluationstudentServiceImpl.java diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/controller/KcEvaluationstudentController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/controller/KcEvaluationstudentController.java new file mode 100644 index 00000000..876cac0c --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/controller/KcEvaluationstudentController.java @@ -0,0 +1,162 @@ +package org.jeecg.modules.kc.qa.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.kc.qa.entity.KcEvaluationstudent; +import org.jeecg.modules.kc.qa.service.IKcEvaluationstudentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; + + /** + * @Description: kc_evaluationstudent + * @Author: jeecg-boot + * @Date: 2023-04-19 + * @Version: V1.0 + */ +@Api(tags="kc_evaluationstudent") +@RestController +@RequestMapping("/qa/kcEvaluationstudent") +@Slf4j +public class KcEvaluationstudentController extends JeecgController { + @Autowired + private IKcEvaluationstudentService kcEvaluationstudentService; + + /** + * 分页列表查询 + * + * @param kcEvaluationstudent + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "kc_evaluationstudent-分页列表查询") + @ApiOperation(value="kc_evaluationstudent-分页列表查询", notes="kc_evaluationstudent-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(KcEvaluationstudent kcEvaluationstudent, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(kcEvaluationstudent, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = kcEvaluationstudentService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param kcEvaluationstudent + * @return + */ + @AutoLog(value = "kc_evaluationstudent-添加") + @ApiOperation(value="kc_evaluationstudent-添加", notes="kc_evaluationstudent-添加") + @RequiresPermissions("qa:kc_evaluationstudent:add") + @PostMapping(value = "/add") + public Result add(@RequestBody KcEvaluationstudent kcEvaluationstudent) { + kcEvaluationstudentService.save(kcEvaluationstudent); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param kcEvaluationstudent + * @return + */ + @AutoLog(value = "kc_evaluationstudent-编辑") + @ApiOperation(value="kc_evaluationstudent-编辑", notes="kc_evaluationstudent-编辑") + @RequiresPermissions("qa:kc_evaluationstudent:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody KcEvaluationstudent kcEvaluationstudent) { + kcEvaluationstudentService.updateById(kcEvaluationstudent); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "kc_evaluationstudent-通过id删除") + @ApiOperation(value="kc_evaluationstudent-通过id删除", notes="kc_evaluationstudent-通过id删除") + @RequiresPermissions("qa:kc_evaluationstudent:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + kcEvaluationstudentService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "kc_evaluationstudent-批量删除") + @ApiOperation(value="kc_evaluationstudent-批量删除", notes="kc_evaluationstudent-批量删除") + @RequiresPermissions("qa:kc_evaluationstudent:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.kcEvaluationstudentService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "kc_evaluationstudent-通过id查询") + @ApiOperation(value="kc_evaluationstudent-通过id查询", notes="kc_evaluationstudent-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + KcEvaluationstudent kcEvaluationstudent = kcEvaluationstudentService.getById(id); + if(kcEvaluationstudent==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(kcEvaluationstudent); + } + + /** + * 导出excel + * + * @param request + * @param kcEvaluationstudent + */ + @RequiresPermissions("qa:kc_evaluationstudent:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, KcEvaluationstudent kcEvaluationstudent) { + return super.exportXls(request, kcEvaluationstudent, KcEvaluationstudent.class, "kc_evaluationstudent"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("qa:kc_evaluationstudent:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, KcEvaluationstudent.class); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/entity/KcEvaluationstudent.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/entity/KcEvaluationstudent.java new file mode 100644 index 00000000..6849f02b --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/entity/KcEvaluationstudent.java @@ -0,0 +1,61 @@ +package org.jeecg.modules.kc.qa.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; + +import java.io.Serializable; + +/** + * @Description: kc_evaluationstudent + * @Author: jeecg-boot + * @Date: 2023-04-19 + * @Version: V1.0 + */ +@Data +@TableName("kc_evaluationstudent") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="kc_evaluationstudent对象", description="kc_evaluationstudent") +public class KcEvaluationstudent implements Serializable { + private static final long serialVersionUID = 1L; + + /**id*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + private java.lang.String id; + /**课堂表id*/ + @Excel(name = "课堂表id", width = 15) + @ApiModelProperty(value = "课堂表id") + private java.lang.String ketangbiaoid; + /**学生学号*/ + @Excel(name = "学生学号", width = 15) + @ApiModelProperty(value = "学生学号") + private java.lang.String sid; + /**学生姓名*/ + @Excel(name = "学生姓名", width = 15) + @ApiModelProperty(value = "学生姓名") + private java.lang.String sname; + /**提交时间*/ + @Excel(name = "提交时间", width = 15) + @ApiModelProperty(value = "提交时间") + private java.lang.String uptime; + /**提交文本内容*/ + @Excel(name = "提交文本内容", width = 15) + @ApiModelProperty(value = "提交文本内容") + private java.lang.String textdeail; + /**是否匿名 0 是 1否*/ + @Excel(name = "是否匿名 0 是 1否", width = 15) + @ApiModelProperty(value = "是否匿名 0 是 1否") + private java.lang.String sfnm; + /**星级*/ + @Excel(name = "星级", width = 15) + @ApiModelProperty(value = "星级") + private java.lang.Integer stars; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/KcEvaluationstudentMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/KcEvaluationstudentMapper.java new file mode 100644 index 00000000..8ca9208d --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/KcEvaluationstudentMapper.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.kc.qa.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.kc.qa.entity.KcEvaluationstudent; + +/** + * @Description: kc_evaluationstudent + * @Author: jeecg-boot + * @Date: 2023-04-19 + * @Version: V1.0 + */ +public interface KcEvaluationstudentMapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/xml/KcEvaluationstudentMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/xml/KcEvaluationstudentMapper.xml new file mode 100644 index 00000000..4957d7d2 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/xml/KcEvaluationstudentMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/IKcEvaluationstudentService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/IKcEvaluationstudentService.java new file mode 100644 index 00000000..fb9ea34e --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/IKcEvaluationstudentService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.kc.qa.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.kc.qa.entity.KcEvaluationstudent; + +/** + * @Description: kc_evaluationstudent + * @Author: jeecg-boot + * @Date: 2023-04-19 + * @Version: V1.0 + */ +public interface IKcEvaluationstudentService extends IService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/impl/KcEvaluationstudentServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/impl/KcEvaluationstudentServiceImpl.java new file mode 100644 index 00000000..e420ca6f --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/impl/KcEvaluationstudentServiceImpl.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.kc.qa.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.kc.qa.entity.KcEvaluationstudent; +import org.jeecg.modules.kc.qa.mapper.KcEvaluationstudentMapper; +import org.jeecg.modules.kc.qa.service.IKcEvaluationstudentService; +import org.springframework.stereotype.Service; + +/** + * @Description: kc_evaluationstudent + * @Author: jeecg-boot + * @Date: 2023-04-19 + * @Version: V1.0 + */ +@Service +public class KcEvaluationstudentServiceImpl extends ServiceImpl implements IKcEvaluationstudentService { + +}