添加功能
This commit is contained in:
parent
fc41f35eb2
commit
68ddeb3b37
|
@ -0,0 +1,174 @@
|
|||
package org.jeecg.modules.kc.kcErrorreport.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.kc.kcErrorreport.entity.KcErrorreport;
|
||||
import org.jeecg.modules.kc.kcErrorreport.service.IKcErrorreportService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: kc_errorreport
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="kc_errorreport")
|
||||
@RestController
|
||||
@RequestMapping("/kcErrorreport/kcErrorreport")
|
||||
@Slf4j
|
||||
public class KcErrorreportController extends JeecgController<KcErrorreport, IKcErrorreportService> {
|
||||
@Autowired
|
||||
private IKcErrorreportService kcErrorreportService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcErrorreport
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "kc_errorreport-分页列表查询")
|
||||
@ApiOperation(value="kc_errorreport-分页列表查询", notes="kc_errorreport-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcErrorreport>> queryPageList(KcErrorreport kcErrorreport,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcErrorreport> queryWrapper = QueryGenerator.initQueryWrapper(kcErrorreport, req.getParameterMap());
|
||||
Page<KcErrorreport> page = new Page<KcErrorreport>(pageNo, pageSize);
|
||||
IPage<KcErrorreport> pageList = kcErrorreportService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcErrorreport
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "kc_errorreport-添加")
|
||||
@ApiOperation(value="kc_errorreport-添加", notes="kc_errorreport-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcErrorreport kcErrorreport) {
|
||||
kcErrorreportService.save(kcErrorreport);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcErrorreport
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "kc_errorreport-编辑")
|
||||
@ApiOperation(value="kc_errorreport-编辑", notes="kc_errorreport-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcErrorreport kcErrorreport) {
|
||||
kcErrorreportService.updateById(kcErrorreport);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "kc_errorreport-通过id删除")
|
||||
@ApiOperation(value="kc_errorreport-通过id删除", notes="kc_errorreport-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcErrorreportService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "kc_errorreport-批量删除")
|
||||
@ApiOperation(value="kc_errorreport-批量删除", notes="kc_errorreport-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcErrorreportService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "kc_errorreport-通过id查询")
|
||||
@ApiOperation(value="kc_errorreport-通过id查询", notes="kc_errorreport-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<KcErrorreport> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcErrorreport kcErrorreport = kcErrorreportService.getById(id);
|
||||
if(kcErrorreport==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcErrorreport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcErrorreport
|
||||
*/
|
||||
@RequiresPermissions("kcErrorreport:kc_errorreport:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcErrorreport kcErrorreport) {
|
||||
return super.exportXls(request, kcErrorreport, KcErrorreport.class, "kc_errorreport");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcErrorreport:kc_errorreport:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcErrorreport.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package org.jeecg.modules.kc.kcErrorreport.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: kc_errorreport
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_errorreport")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_errorreport对象", description="kc_errorreport")
|
||||
public class KcErrorreport implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**报错人*/
|
||||
@Excel(name = "报错人", width = 15)
|
||||
@ApiModelProperty(value = "报错人")
|
||||
private java.lang.String subper;
|
||||
/**错误类型*/
|
||||
@Excel(name = "错误类型", width = 15, dicCode = "optionsradios")
|
||||
@Dict(dicCode = "optionsradios")
|
||||
@ApiModelProperty(value = "错误类型")
|
||||
private java.lang.String optionsradios;
|
||||
/**会议号*/
|
||||
@Excel(name = "会议号", width = 15)
|
||||
@ApiModelProperty(value = "会议号")
|
||||
private java.lang.String meetingnum;
|
||||
/**会议密码*/
|
||||
@Excel(name = "会议密码", width = 15)
|
||||
@ApiModelProperty(value = "会议密码")
|
||||
private java.lang.String meetingpsw;
|
||||
/**会议邀请链接*/
|
||||
@Excel(name = "会议邀请链接", width = 15)
|
||||
@ApiModelProperty(value = "会议邀请链接")
|
||||
private java.lang.String meetinglink;
|
||||
/**错误信息描述*/
|
||||
@Excel(name = "错误信息描述", width = 15)
|
||||
@ApiModelProperty(value = "错误信息描述")
|
||||
private java.lang.String errortext;
|
||||
/**报错时间*/
|
||||
@Excel(name = "报错时间", width = 15)
|
||||
@ApiModelProperty(value = "报错时间")
|
||||
private java.lang.String reportstime;
|
||||
/**处理状态*/
|
||||
@Excel(name = "处理状态", width = 15)
|
||||
@ApiModelProperty(value = "处理状态")
|
||||
private java.lang.Integer reportstatus;
|
||||
/**课程表ID*/
|
||||
@Excel(name = "课程表ID", width = 15)
|
||||
@ApiModelProperty(value = "课程表ID")
|
||||
private java.lang.Integer kechengbiaoid;
|
||||
/**账号ID*/
|
||||
@Excel(name = "账号ID", width = 15)
|
||||
@ApiModelProperty(value = "账号ID")
|
||||
private java.lang.String userid;
|
||||
/**账号姓名*/
|
||||
@Excel(name = "账号姓名", width = 15)
|
||||
@ApiModelProperty(value = "账号姓名")
|
||||
private java.lang.String username;
|
||||
/**修改类型:0-本堂课修改,1-*/
|
||||
@Excel(name = "修改类型:0-本堂课修改,1-", width = 15, dicCode = "edittype")
|
||||
@Dict(dicCode = "edittype")
|
||||
@ApiModelProperty(value = "修改类型:0-本堂课修改,1-")
|
||||
private java.lang.Integer edittype;
|
||||
/**是否修改:0-未修改,1-已修改*/
|
||||
@Excel(name = "是否修改:0-未修改,1-已修改", width = 15)
|
||||
@ApiModelProperty(value = "是否修改:0-未修改,1-已修改")
|
||||
private java.lang.Integer ismodified;
|
||||
/**课程的上课日期*/
|
||||
@Excel(name = "课程的上课日期", width = 15)
|
||||
@ApiModelProperty(value = "课程的上课日期")
|
||||
private java.lang.String skrq;
|
||||
/**是否出镜,0-出镜,1-不出镜*/
|
||||
@Excel(name = "是否出镜,0-出镜,1-不出镜", width = 15)
|
||||
@ApiModelProperty(value = "是否出镜,0-出镜,1-不出镜")
|
||||
private java.lang.Integer sfcj;
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.kcErrorreport.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.kcErrorreport.entity.KcErrorreport;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: kc_errorreport
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcErrorreportMapper extends BaseMapper<KcErrorreport> {
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?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="org.jeecg.modules.kc.kcErrorreport.mapper.KcErrorreportMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.kcErrorreport.service;
|
||||
|
||||
import org.jeecg.modules.kc.kcErrorreport.entity.KcErrorreport;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: kc_errorreport
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcErrorreportService extends IService<KcErrorreport> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.kc.kcErrorreport.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.kcErrorreport.entity.KcErrorreport;
|
||||
import org.jeecg.modules.kc.kcErrorreport.mapper.KcErrorreportMapper;
|
||||
import org.jeecg.modules.kc.kcErrorreport.service.IKcErrorreportService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: kc_errorreport
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcErrorreportServiceImpl extends ServiceImpl<KcErrorreportMapper, KcErrorreport> implements IKcErrorreportService {
|
||||
|
||||
}
|
|
@ -0,0 +1,174 @@
|
|||
package org.jeecg.modules.kc.kcYuyue.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.kc.kcYuyue.entity.KcYuyue;
|
||||
import org.jeecg.modules.kc.kcYuyue.service.IKcYuyueService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: kc_yuyue
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="kc_yuyue")
|
||||
@RestController
|
||||
@RequestMapping("/kcYuyue/kcYuyue")
|
||||
@Slf4j
|
||||
public class KcYuyueController extends JeecgController<KcYuyue, IKcYuyueService> {
|
||||
@Autowired
|
||||
private IKcYuyueService kcYuyueService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcYuyue
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "kc_yuyue-分页列表查询")
|
||||
@ApiOperation(value="kc_yuyue-分页列表查询", notes="kc_yuyue-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcYuyue>> queryPageList(KcYuyue kcYuyue,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcYuyue> queryWrapper = QueryGenerator.initQueryWrapper(kcYuyue, req.getParameterMap());
|
||||
Page<KcYuyue> page = new Page<KcYuyue>(pageNo, pageSize);
|
||||
IPage<KcYuyue> pageList = kcYuyueService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcYuyue
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "kc_yuyue-添加")
|
||||
@ApiOperation(value="kc_yuyue-添加", notes="kc_yuyue-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcYuyue kcYuyue) {
|
||||
kcYuyueService.save(kcYuyue);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcYuyue
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "kc_yuyue-编辑")
|
||||
@ApiOperation(value="kc_yuyue-编辑", notes="kc_yuyue-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcYuyue kcYuyue) {
|
||||
kcYuyueService.updateById(kcYuyue);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "kc_yuyue-通过id删除")
|
||||
@ApiOperation(value="kc_yuyue-通过id删除", notes="kc_yuyue-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcYuyueService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "kc_yuyue-批量删除")
|
||||
@ApiOperation(value="kc_yuyue-批量删除", notes="kc_yuyue-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcYuyueService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "kc_yuyue-通过id查询")
|
||||
@ApiOperation(value="kc_yuyue-通过id查询", notes="kc_yuyue-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<KcYuyue> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcYuyue kcYuyue = kcYuyueService.getById(id);
|
||||
if(kcYuyue==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcYuyue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcYuyue
|
||||
*/
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcYuyue kcYuyue) {
|
||||
return super.exportXls(request, kcYuyue, KcYuyue.class, "kc_yuyue");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcYuyue.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package org.jeecg.modules.kc.kcYuyue.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: kc_yuyue
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_yuyue")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_yuyue对象", description="kc_yuyue")
|
||||
public class KcYuyue 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 userid;
|
||||
/**用户名*/
|
||||
@Excel(name = "用户名", width = 15)
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private java.lang.String username;
|
||||
/**授课日期*/
|
||||
@Excel(name = "授课日期", width = 15)
|
||||
@ApiModelProperty(value = "授课日期")
|
||||
private java.lang.String skrq;
|
||||
/**节次*/
|
||||
@Excel(name = "节次", width = 15)
|
||||
@ApiModelProperty(value = "节次")
|
||||
private java.lang.String hh;
|
||||
/**直播平台*/
|
||||
@Excel(name = "直播平台", width = 15)
|
||||
@ApiModelProperty(value = "直播平台")
|
||||
private java.lang.String zbpx;
|
||||
/**链接*/
|
||||
@Excel(name = "链接", width = 15)
|
||||
@ApiModelProperty(value = "链接")
|
||||
private java.lang.String link;
|
||||
/**是否删除*/
|
||||
@Excel(name = "是否删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private java.lang.Integer isdeleted;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createTime;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.kcYuyue.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.kcYuyue.entity.KcYuyue;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: kc_yuyue
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcYuyueMapper extends BaseMapper<KcYuyue> {
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?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="org.jeecg.modules.kc.kcYuyue.mapper.KcYuyueMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.kcYuyue.service;
|
||||
|
||||
import org.jeecg.modules.kc.kcYuyue.entity.KcYuyue;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: kc_yuyue
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcYuyueService extends IService<KcYuyue> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.kc.kcYuyue.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.kcYuyue.entity.KcYuyue;
|
||||
import org.jeecg.modules.kc.kcYuyue.mapper.KcYuyueMapper;
|
||||
import org.jeecg.modules.kc.kcYuyue.service.IKcYuyueService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: kc_yuyue
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcYuyueServiceImpl extends ServiceImpl<KcYuyueMapper, KcYuyue> implements IKcYuyueService {
|
||||
|
||||
}
|
|
@ -11,8 +11,12 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.api.CommonAPI;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.system.vo.SysUserCacheInfo;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoService;
|
||||
|
@ -29,6 +33,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
|
|||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
@ -52,7 +57,10 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|||
public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKetangbiaoService> {
|
||||
@Autowired
|
||||
private IKcKetangbiaoService kcKetangbiaoService;
|
||||
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
private CommonAPI commonApi;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -216,6 +224,23 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
|
||||
//------------------------------yangjun------------------------------
|
||||
|
||||
@ApiOperation(value="课堂管理-子表-分页列表查询", notes="课堂管理-子表-分页列表查询")
|
||||
@GetMapping(value = "/getKclblist")
|
||||
public Result<IPage<KcKetangbiao>> getKclblist(KcKetangbiao kcKetangbiao,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
String username = JwtUtil.getUserNameByToken(req);
|
||||
LoginUser loginUser = commonApi.getUserByName(username);
|
||||
kcKetangbiao.setUserid(loginUser.getUsername());
|
||||
// QueryWrapper<KcKetangbiao> queryWrapper = QueryGenerator.initQueryWrapper(kcKetangbiao, req.getParameterMap());
|
||||
// queryWrapper.apply(StringUtils.isNotBlank(kcKetangbiao.getYwmc())," (skjs like '%"+kcKetangbiao.getYwmc()+"%' or kcmc like '%"+kcKetangbiao.getYwmc()+"%')");
|
||||
// queryWrapper.ne(StringUtils.isNotBlank(kcKetangbiao.getYwskxs()),"skxs",kcKetangbiao.getYwskxs());
|
||||
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
|
||||
IPage<KcKetangbiao> pageList = kcKetangbiaoService.getKclblist(page, kcKetangbiao);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
// ------------------------------yangjun------------------------------
|
||||
|
||||
|
||||
|
|
|
@ -4,10 +4,8 @@ import java.io.Serializable;
|
|||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
@ -37,24 +35,24 @@ public class KcKechengbiao implements Serializable {
|
|||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**创建人登录名称*/
|
||||
@ApiModelProperty(value = "创建人登录名称")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人登录名称*/
|
||||
@ApiModelProperty(value = "更新人登录名称")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
// @ApiModelProperty(value = "创建人登录名称")
|
||||
// private java.lang.String createBy;
|
||||
// /**创建日期*/
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
// @ApiModelProperty(value = "创建日期")
|
||||
// private java.util.Date createTime;
|
||||
// /**更新人登录名称*/
|
||||
// @ApiModelProperty(value = "更新人登录名称")
|
||||
// private java.lang.String updateBy;
|
||||
// /**更新日期*/
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
// @ApiModelProperty(value = "更新日期")
|
||||
// private java.util.Date updateTime;
|
||||
// /**所属部门*/
|
||||
// @ApiModelProperty(value = "所属部门")
|
||||
// private java.lang.String sysOrgCode;
|
||||
/**课程编号*/
|
||||
@Excel(name = "课程编号", width = 15)
|
||||
@ApiModelProperty(value = "课程编号")
|
||||
|
@ -231,4 +229,5 @@ public class KcKechengbiao implements Serializable {
|
|||
@Excel(name = "状态", width = 15)
|
||||
@ApiModelProperty(value = "状态")
|
||||
private java.lang.String zt;
|
||||
|
||||
}
|
||||
|
|
|
@ -244,4 +244,8 @@ public class KcKetangbiao implements Serializable {
|
|||
private java.lang.String ywmc;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String ywskxs;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String sfyy;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String userid;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,11 @@ package org.jeecg.modules.kc.ktgl.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
@ -14,4 +19,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface KcKetangbiaoMapper extends BaseMapper<KcKetangbiao> {
|
||||
|
||||
IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page,KcKetangbiao kcKetangbiao);
|
||||
}
|
||||
|
|
|
@ -2,4 +2,44 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.kc.ktgl.mapper.KcKetangbiaoMapper">
|
||||
|
||||
|
||||
<select id="getKclblist" parameterType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao">
|
||||
select ktb.*,if(yy.id is null,0,1) as sfyy from kc_ketangbiao ktb
|
||||
left join (select * from kc_yuyue where userid = #{kcKetangbiao.userid}) yy on ktb.id = yy.ketangbiaoid
|
||||
<where>
|
||||
<if test="kcKetangbiao.ywmc!=null and kcKetangbiao.ywmc!=''">
|
||||
and (ktb.skjs like concat('%',#{kcKetangbiao.ywmc},'%') or ktb.kcmc like concat('%',#{kcKetangbiao.ywmc},'%') )
|
||||
</if>
|
||||
<if test="kcKetangbiao.skxs!=null and kcKetangbiao.skxs!=''">
|
||||
and ktb.skxs = #{kcKetangbiao.skxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.ywskxs!=null and kcKetangbiao.ywskxs!=''">
|
||||
and ktb.skxs != #{kcKetangbiao.ywskxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.skrq!=null and kcKetangbiao.skrq!=''">
|
||||
and ktb.skrq = #{kcKetangbiao.skrq}
|
||||
</if>
|
||||
<if test="kcKetangbiao.hh!=null and kcKetangbiao.hh!=''">
|
||||
and ktb.hh in
|
||||
<foreach item="item" index="index" collection="kcKetangbiao.hh.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="kcKetangbiao.kkdw!=null and kcKetangbiao.kkdw!=''">
|
||||
and ktb.kkdw = #{kcKetangbiao.kkdw}
|
||||
</if>
|
||||
<if test="kcKetangbiao.zbpx!=null and kcKetangbiao.zbpx!=''">
|
||||
and ktb.zbpx = #{kcKetangbiao.zbpx}
|
||||
</if>
|
||||
<if test="kcKetangbiao.ywskxs!=null and kcKetangbiao.ywskxs!=''">
|
||||
and ktb.skxs != #{kcKetangbiao.ywskxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.kcxz!=null and kcKetangbiao.kcxz!=''">
|
||||
and ktb.kcxz = #{kcKetangbiao.kcxz}
|
||||
</if>
|
||||
<if test="kcKetangbiao.kkdw!=null and kcKetangbiao.kkdw!=''">
|
||||
and ktb.kkdw = #{kcKetangbiao.kkdw}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,5 +1,8 @@
|
|||
package org.jeecg.modules.kc.ktgl.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface IKcKetangbiaoService extends IService<KcKetangbiao> {
|
||||
|
||||
IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.jeecg.modules.kc.ktgl.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.kc.ktgl.mapper.KcKetangbiaoMapper;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoService;
|
||||
|
@ -16,4 +19,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
@Service
|
||||
public class KcKetangbiaoServiceImpl extends ServiceImpl<KcKetangbiaoMapper, KcKetangbiao> implements IKcKetangbiaoService {
|
||||
|
||||
@Override
|
||||
public IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.getKclblist(page,kcKetangbiao);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue