2023年4月8日 增课程订阅提醒功能
This commit is contained in:
parent
98c76b702c
commit
30a881ff70
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.kc.kcKechengtixingdingyue.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.kcKechengtixingdingyue.entity.KcKechengtixingdingyue;
|
||||
import org.jeecg.modules.kc.kcKechengtixingdingyue.service.IKcKechengtixingdingyueService;
|
||||
|
||||
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: 课程提醒订阅
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="课程提醒订阅")
|
||||
@RestController
|
||||
@RequestMapping("/kcKechengtixingdingyue/kcKechengtixingdingyue")
|
||||
@Slf4j
|
||||
public class KcKechengtixingdingyueController extends JeecgController<KcKechengtixingdingyue, IKcKechengtixingdingyueService> {
|
||||
@Autowired
|
||||
private IKcKechengtixingdingyueService kcKechengtixingdingyueService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcKechengtixingdingyue
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "课程提醒订阅-分页列表查询")
|
||||
@ApiOperation(value="课程提醒订阅-分页列表查询", notes="课程提醒订阅-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcKechengtixingdingyue>> queryPageList(KcKechengtixingdingyue kcKechengtixingdingyue,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcKechengtixingdingyue> queryWrapper = QueryGenerator.initQueryWrapper(kcKechengtixingdingyue, req.getParameterMap());
|
||||
Page<KcKechengtixingdingyue> page = new Page<KcKechengtixingdingyue>(pageNo, pageSize);
|
||||
IPage<KcKechengtixingdingyue> pageList = kcKechengtixingdingyueService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcKechengtixingdingyue
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程提醒订阅-添加")
|
||||
@ApiOperation(value="课程提醒订阅-添加", notes="课程提醒订阅-添加")
|
||||
// @RequiresPermissions("kcKechengtixingdingyue:kc_kechengtixingdingyue:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcKechengtixingdingyue kcKechengtixingdingyue) {
|
||||
kcKechengtixingdingyueService.save(kcKechengtixingdingyue);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcKechengtixingdingyue
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程提醒订阅-编辑")
|
||||
@ApiOperation(value="课程提醒订阅-编辑", notes="课程提醒订阅-编辑")
|
||||
// @RequiresPermissions("kcKechengtixingdingyue:kc_kechengtixingdingyue:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcKechengtixingdingyue kcKechengtixingdingyue) {
|
||||
kcKechengtixingdingyueService.updateById(kcKechengtixingdingyue);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程提醒订阅-通过id删除")
|
||||
@ApiOperation(value="课程提醒订阅-通过id删除", notes="课程提醒订阅-通过id删除")
|
||||
@RequiresPermissions("kcKechengtixingdingyue:kc_kechengtixingdingyue:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcKechengtixingdingyueService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程提醒订阅-批量删除")
|
||||
@ApiOperation(value="课程提醒订阅-批量删除", notes="课程提醒订阅-批量删除")
|
||||
@RequiresPermissions("kcKechengtixingdingyue:kc_kechengtixingdingyue:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcKechengtixingdingyueService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "课程提醒订阅-通过id查询")
|
||||
@ApiOperation(value="课程提醒订阅-通过id查询", notes="课程提醒订阅-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<KcKechengtixingdingyue> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcKechengtixingdingyue kcKechengtixingdingyue = kcKechengtixingdingyueService.getById(id);
|
||||
if(kcKechengtixingdingyue==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcKechengtixingdingyue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcKechengtixingdingyue
|
||||
*/
|
||||
@RequiresPermissions("kcKechengtixingdingyue:kc_kechengtixingdingyue:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcKechengtixingdingyue kcKechengtixingdingyue) {
|
||||
return super.exportXls(request, kcKechengtixingdingyue, KcKechengtixingdingyue.class, "课程提醒订阅");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcKechengtixingdingyue:kc_kechengtixingdingyue:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcKechengtixingdingyue.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package org.jeecg.modules.kc.kcKechengtixingdingyue.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: 课程提醒订阅
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_kechengtixingdingyue")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_kechengtixingdingyue对象", description="课程提醒订阅")
|
||||
public class KcKechengtixingdingyue implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**账号*/
|
||||
@TableId
|
||||
@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 kqtx;
|
||||
/**每日课程提醒*/
|
||||
@Excel(name = "每日课程提醒", width = 15)
|
||||
@ApiModelProperty(value = "每日课程提醒")
|
||||
private java.lang.String mrkctx;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.kcKechengtixingdingyue.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.kcKechengtixingdingyue.entity.KcKechengtixingdingyue;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 课程提醒订阅
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcKechengtixingdingyueMapper extends BaseMapper<KcKechengtixingdingyue> {
|
||||
|
||||
}
|
|
@ -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.kcKechengtixingdingyue.mapper.KcKechengtixingdingyueMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.kcKechengtixingdingyue.service;
|
||||
|
||||
import org.jeecg.modules.kc.kcKechengtixingdingyue.entity.KcKechengtixingdingyue;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 课程提醒订阅
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcKechengtixingdingyueService extends IService<KcKechengtixingdingyue> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.kc.kcKechengtixingdingyue.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.kcKechengtixingdingyue.entity.KcKechengtixingdingyue;
|
||||
import org.jeecg.modules.kc.kcKechengtixingdingyue.mapper.KcKechengtixingdingyueMapper;
|
||||
import org.jeecg.modules.kc.kcKechengtixingdingyue.service.IKcKechengtixingdingyueService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 课程提醒订阅
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-04-06
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcKechengtixingdingyueServiceImpl extends ServiceImpl<KcKechengtixingdingyueMapper, KcKechengtixingdingyue> implements IKcKechengtixingdingyueService {
|
||||
|
||||
}
|
Loading…
Reference in New Issue