证书、学习进度完善

This commit is contained in:
zhujj 2019-01-15 18:17:13 +08:00
parent fc979eea8d
commit 902a9a3d97
21 changed files with 1590 additions and 3 deletions

View File

@ -54,13 +54,15 @@ spring:
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
serialization:
write-dates-as-timestamps: false
profiles:
active: druid
# 文件上传
servlet:
multipart:
max-file-size: 30MB
max-request-size: 30MB
max-file-size: 300MB
max-request-size: 300MB
# 服务模块
devtools:
restart:
@ -127,7 +129,7 @@ gen:
# 作者
author: zhujj
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ruoyi.train
packageName: com.ruoyi.vip
# 自动去除表前缀默认是true
autoRemovePre: false
# 表前缀(类名不会包含表前缀)

View File

@ -49,6 +49,7 @@ public class JwtUtil {
try {
String token = ServletUtils.getRequest().getHeader("Authorization");
DecodedJWT jwt = JWT.decode(token);
// jwt.getExpiresAt();
return jwt.getClaim("loginName").asString();
} catch (JWTDecodeException e) {
return null;

View File

@ -0,0 +1,126 @@
package com.ruoyi.vip.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.vip.domain.VipUserCertificate;
import com.ruoyi.vip.service.IVipUserCertificateService;
import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.utils.ExcelUtil;
/**
* 我的订单 信息操作处理
*
* @author zhujj
* @date 2019-01-15
*/
@Controller
@RequestMapping("/vip/vipUserCertificate")
public class VipUserCertificateController extends BaseController
{
private String prefix = "vip/vipUserCertificate";
@Autowired
private IVipUserCertificateService vipUserCertificateService;
@RequiresPermissions("vip:vipUserCertificate:view")
@GetMapping()
public String vipUserCertificate()
{
return prefix + "/vipUserCertificate";
}
/**
* 查询我的订单列表
*/
@RequiresPermissions("vip:vipUserCertificate:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(VipUserCertificate vipUserCertificate)
{
List<VipUserCertificate> list = vipUserCertificateService.selectVipUserCertificatePage(vipUserCertificate);
return getDataTable(list);
}
/**
* 导出我的订单列表
*/
@RequiresPermissions("vip:vipUserCertificate:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(VipUserCertificate vipUserCertificate)
{
List<VipUserCertificate> list = vipUserCertificateService.selectVipUserCertificateList(vipUserCertificate);
ExcelUtil<VipUserCertificate> util = new ExcelUtil<VipUserCertificate>(VipUserCertificate.class);
return util.exportExcel(list, "vipUserCertificate");
}
/**
* 新增我的订单
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存我的订单
*/
@RequiresPermissions("vip:vipUserCertificate:add")
@Log(title = "我的订单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(VipUserCertificate vipUserCertificate)
{
return toAjax(vipUserCertificateService.insert(vipUserCertificate));
}
/**
* 修改我的订单
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
VipUserCertificate vipUserCertificate = vipUserCertificateService.selectById(id);
mmap.put("vipUserCertificate", vipUserCertificate);
return prefix + "/edit";
}
/**
* 修改保存我的订单
*/
@RequiresPermissions("vip:vipUserCertificate:edit")
@Log(title = "我的订单", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(VipUserCertificate vipUserCertificate)
{
return toAjax(vipUserCertificateService.updateById(vipUserCertificate));
}
/**
* 删除我的订单
*/
@RequiresPermissions("vip:vipUserCertificate:remove")
@Log(title = "我的订单", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(vipUserCertificateService.deleteByIds(ids));
}
}

View File

@ -0,0 +1,126 @@
package com.ruoyi.vip.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.vip.domain.VipUserCourseSection;
import com.ruoyi.vip.service.IVipUserCourseSectionService;
import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.utils.ExcelUtil;
/**
* 我的课程学习 信息操作处理
*
* @author zhujj
* @date 2019-01-15
*/
@Controller
@RequestMapping("/vip/vipUserCourseSection")
public class VipUserCourseSectionController extends BaseController
{
private String prefix = "vip/vipUserCourseSection";
@Autowired
private IVipUserCourseSectionService vipUserCourseSectionService;
@RequiresPermissions("vip:vipUserCourseSection:view")
@GetMapping()
public String vipUserCourseSection()
{
return prefix + "/vipUserCourseSection";
}
/**
* 查询我的课程学习列表
*/
@RequiresPermissions("vip:vipUserCourseSection:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(VipUserCourseSection vipUserCourseSection)
{
List<VipUserCourseSection> list = vipUserCourseSectionService.selectVipUserCourseSectionPage(vipUserCourseSection);
return getDataTable(list);
}
/**
* 导出我的课程学习列表
*/
@RequiresPermissions("vip:vipUserCourseSection:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(VipUserCourseSection vipUserCourseSection)
{
List<VipUserCourseSection> list = vipUserCourseSectionService.selectVipUserCourseSectionList(vipUserCourseSection);
ExcelUtil<VipUserCourseSection> util = new ExcelUtil<VipUserCourseSection>(VipUserCourseSection.class);
return util.exportExcel(list, "vipUserCourseSection");
}
/**
* 新增我的课程学习
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存我的课程学习
*/
@RequiresPermissions("vip:vipUserCourseSection:add")
@Log(title = "我的课程学习", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(VipUserCourseSection vipUserCourseSection)
{
return toAjax(vipUserCourseSectionService.insert(vipUserCourseSection));
}
/**
* 修改我的课程学习
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
VipUserCourseSection vipUserCourseSection = vipUserCourseSectionService.selectById(id);
mmap.put("vipUserCourseSection", vipUserCourseSection);
return prefix + "/edit";
}
/**
* 修改保存我的课程学习
*/
@RequiresPermissions("vip:vipUserCourseSection:edit")
@Log(title = "我的课程学习", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(VipUserCourseSection vipUserCourseSection)
{
return toAjax(vipUserCourseSectionService.updateById(vipUserCourseSection));
}
/**
* 删除我的课程学习
*/
@RequiresPermissions("vip:vipUserCourseSection:remove")
@Log(title = "我的课程学习", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(vipUserCourseSectionService.deleteByIds(ids));
}
}

View File

@ -0,0 +1,194 @@
package com.ruoyi.vip.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.base.BaseEntity;
import javax.persistence.Id;
import java.util.Date;
/**
* 我的订单表 vip_user_certificate
*
* @author zhujj
* @date 2019-01-15
*/
public class VipUserCertificate
{
private static final long serialVersionUID = 1L;
/** 练习对象 */
@Id
private Integer id;
/** 会员代码 */
private Integer vipUserId;
/** 证书名称 */
private String name;
/** 证书照片 */
private String image;
/** 生效日期 */
private Date startDate;
/** 截止日期 */
private Date endDate;
/** 创建者 */
private String createBy;
/** 创建时间 */
private Date createDate;
/** 更新者 */
private String updateBy;
/** 更新时间 */
private Date updateDate;
/** 备注信息 */
private String remarks;
/** 删除标记 */
private String delFlag;
/** 设置练习对象 */
public void setId(Integer id)
{
this.id = id;
}
/** 获取练习对象 */
public Integer getId()
{
return id;
}
/** 设置会员代码 */
public void setVipUserId(Integer vipUserId)
{
this.vipUserId = vipUserId;
}
/** 获取会员代码 */
public Integer getVipUserId()
{
return vipUserId;
}
/** 设置证书名称 */
public void setName(String name)
{
this.name = name;
}
/** 获取证书名称 */
public String getName()
{
return name;
}
/** 设置证书照片 */
public void setImage(String image)
{
this.image = image;
}
/** 获取证书照片 */
public String getImage()
{
return image;
}
/** 设置生效日期 */
public void setStartDate(Date startDate)
{
this.startDate = startDate;
}
/** 获取生效日期 */
public Date getStartDate()
{
return startDate;
}
/** 设置截止日期 */
public void setEndDate(Date endDate)
{
this.endDate = endDate;
}
/** 获取截止日期 */
public Date getEndDate()
{
return endDate;
}
/** 设置创建者 */
public void setCreateBy(String createBy)
{
this.createBy = createBy;
}
/** 获取创建者 */
public String getCreateBy()
{
return createBy;
}
/** 设置创建时间 */
public void setCreateDate(Date createDate)
{
this.createDate = createDate;
}
/** 获取创建时间 */
public Date getCreateDate()
{
return createDate;
}
/** 设置更新者 */
public void setUpdateBy(String updateBy)
{
this.updateBy = updateBy;
}
/** 获取更新者 */
public String getUpdateBy()
{
return updateBy;
}
/** 设置更新时间 */
public void setUpdateDate(Date updateDate)
{
this.updateDate = updateDate;
}
/** 获取更新时间 */
public Date getUpdateDate()
{
return updateDate;
}
/** 设置备注信息 */
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
/** 获取备注信息 */
public String getRemarks()
{
return remarks;
}
/** 设置删除标记 */
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
/** 获取删除标记 */
public String getDelFlag()
{
return delFlag;
}
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("vipUserId", getVipUserId())
.append("name", getName())
.append("image", getImage())
.append("startDate", getStartDate())
.append("endDate", getEndDate())
.append("createBy", getCreateBy())
.append("createDate", getCreateDate())
.append("updateBy", getUpdateBy())
.append("updateDate", getUpdateDate())
.append("remarks", getRemarks())
.append("delFlag", getDelFlag())
.toString();
}
}

View File

@ -0,0 +1,180 @@
package com.ruoyi.vip.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.base.BaseEntity;
import javax.persistence.Id;
import java.util.Date;
/**
* 我的课程学习表 vip_user_course_section
*
* @author zhujj
* @date 2019-01-15
*/
public class VipUserCourseSection
{
private static final long serialVersionUID = 1L;
/** 练习对象 */
@Id
private Integer id;
/** 会员代码 */
private Integer vipUserId;
/** 课程ID */
private Integer trainCourseId;
/** 章节id */
private Integer trainCourseSection;
/** 学习时间长度(分钟) */
private Integer duration;
/** 创建者 */
private String createBy;
/** 创建时间 */
private Date createDate;
/** 更新者 */
private String updateBy;
/** 更新时间 */
private Date updateDate;
/** 备注信息 */
private String remarks;
/** 删除标记 */
private String delFlag;
/** 设置练习对象 */
public void setId(Integer id)
{
this.id = id;
}
/** 获取练习对象 */
public Integer getId()
{
return id;
}
/** 设置会员代码 */
public void setVipUserId(Integer vipUserId)
{
this.vipUserId = vipUserId;
}
/** 获取会员代码 */
public Integer getVipUserId()
{
return vipUserId;
}
/** 设置课程ID */
public void setTrainCourseId(Integer trainCourseId)
{
this.trainCourseId = trainCourseId;
}
/** 获取课程ID */
public Integer getTrainCourseId()
{
return trainCourseId;
}
/** 设置章节id */
public void setTrainCourseSection(Integer trainCourseSection)
{
this.trainCourseSection = trainCourseSection;
}
/** 获取章节id */
public Integer getTrainCourseSection()
{
return trainCourseSection;
}
/** 设置学习时间长度(分钟) */
public void setDuration(Integer duration)
{
this.duration = duration;
}
/** 获取学习时间长度(分钟) */
public Integer getDuration()
{
return duration;
}
/** 设置创建者 */
public void setCreateBy(String createBy)
{
this.createBy = createBy;
}
/** 获取创建者 */
public String getCreateBy()
{
return createBy;
}
/** 设置创建时间 */
public void setCreateDate(Date createDate)
{
this.createDate = createDate;
}
/** 获取创建时间 */
public Date getCreateDate()
{
return createDate;
}
/** 设置更新者 */
public void setUpdateBy(String updateBy)
{
this.updateBy = updateBy;
}
/** 获取更新者 */
public String getUpdateBy()
{
return updateBy;
}
/** 设置更新时间 */
public void setUpdateDate(Date updateDate)
{
this.updateDate = updateDate;
}
/** 获取更新时间 */
public Date getUpdateDate()
{
return updateDate;
}
/** 设置备注信息 */
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
/** 获取备注信息 */
public String getRemarks()
{
return remarks;
}
/** 设置删除标记 */
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
/** 获取删除标记 */
public String getDelFlag()
{
return delFlag;
}
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("vipUserId", getVipUserId())
.append("trainCourseId", getTrainCourseId())
.append("trainCourseSection", getTrainCourseSection())
.append("duration", getDuration())
.append("createBy", getCreateBy())
.append("createDate", getCreateDate())
.append("updateBy", getUpdateBy())
.append("updateDate", getUpdateDate())
.append("remarks", getRemarks())
.append("delFlag", getDelFlag())
.toString();
}
}

View File

@ -0,0 +1,17 @@
package com.ruoyi.vip.domain.vo;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.vip.domain.VipUserCertificate;
/**
* @ProjectName: RuoYi
* @Package: com.ruoyi.vip.domain.vo
* @ClassName: VipUserCertificateVO
* @Description: java类作用描述
* @Author: Zhujj
* @CreateDate: 2019/1/15 0015 17:42
* @Version: 1.0
*/
public class VipUserCertificateVO extends VipUserCertificate {
private SysUser user;
}

View File

@ -0,0 +1,24 @@
package com.ruoyi.vip.mapper;
import com.ruoyi.vip.domain.VipUserCertificate;
import java.util.List;
import com.ruoyi.framework.web.base.MyMapper;
/**
* 我的订单 数据层
*
* @author zhujj
* @date 2019-01-15
*/
public interface VipUserCertificateMapper extends MyMapper<VipUserCertificate>
{
/**
* 查询我的订单列表
*
* @param vipUserCertificate 我的订单信息
* @return 我的订单集合
*/
public List<VipUserCertificate> selectVipUserCertificateList(VipUserCertificate vipUserCertificate);
}

View File

@ -0,0 +1,24 @@
package com.ruoyi.vip.mapper;
import com.ruoyi.vip.domain.VipUserCourseSection;
import java.util.List;
import com.ruoyi.framework.web.base.MyMapper;
/**
* 我的课程学习 数据层
*
* @author zhujj
* @date 2019-01-15
*/
public interface VipUserCourseSectionMapper extends MyMapper<VipUserCourseSection>
{
/**
* 查询我的课程学习列表
*
* @param vipUserCourseSection 我的课程学习信息
* @return 我的课程学习集合
*/
public List<VipUserCourseSection> selectVipUserCourseSectionList(VipUserCourseSection vipUserCourseSection);
}

View File

@ -0,0 +1,30 @@
package com.ruoyi.vip.service;
import com.ruoyi.vip.domain.VipUserCertificate;
import java.util.List;
import com.ruoyi.framework.web.base.AbstractBaseService;
/**
* 我的订单 服务层
*
* @author zhujj
* @date 2019-01-15
*/
public interface IVipUserCertificateService extends AbstractBaseService<VipUserCertificate>
{
/**
* 查询我的订单分页列表
*
* @param vipUserCertificate 我的订单信息
* @return 我的订单集合
*/
public List<VipUserCertificate> selectVipUserCertificatePage(VipUserCertificate vipUserCertificate);
/**
* 查询我的订单列表
*
* @param vipUserCertificate 我的订单信息
* @return 我的订单集合
*/
public List<VipUserCertificate> selectVipUserCertificateList(VipUserCertificate vipUserCertificate);
}

View File

@ -0,0 +1,30 @@
package com.ruoyi.vip.service;
import com.ruoyi.vip.domain.VipUserCourseSection;
import java.util.List;
import com.ruoyi.framework.web.base.AbstractBaseService;
/**
* 我的课程学习 服务层
*
* @author zhujj
* @date 2019-01-15
*/
public interface IVipUserCourseSectionService extends AbstractBaseService<VipUserCourseSection>
{
/**
* 查询我的课程学习分页列表
*
* @param vipUserCourseSection 我的课程学习信息
* @return 我的课程学习集合
*/
public List<VipUserCourseSection> selectVipUserCourseSectionPage(VipUserCourseSection vipUserCourseSection);
/**
* 查询我的课程学习列表
*
* @param vipUserCourseSection 我的课程学习信息
* @return 我的课程学习集合
*/
public List<VipUserCourseSection> selectVipUserCourseSectionList(VipUserCourseSection vipUserCourseSection);
}

View File

@ -0,0 +1,48 @@
package com.ruoyi.vip.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.vip.mapper.VipUserCertificateMapper;
import com.ruoyi.vip.domain.VipUserCertificate;
import com.ruoyi.vip.service.IVipUserCertificateService;
import com.ruoyi.common.support.Convert;
import com.ruoyi.framework.web.base.AbstractBaseServiceImpl;
/**
* 我的订单 服务层实现
*
* @author zhujj
* @date 2019-01-15
*/
@Service
public class VipUserCertificateServiceImpl extends AbstractBaseServiceImpl<VipUserCertificateMapper,VipUserCertificate> implements IVipUserCertificateService
{
@Autowired
private VipUserCertificateMapper vipUserCertificateMapper;
/**
* 查询我的订单列表
*
* @param vipUserCertificate 我的订单信息
* @return 我的订单集合
*/
@Override
public List<VipUserCertificate> selectVipUserCertificateList(VipUserCertificate vipUserCertificate)
{
return vipUserCertificateMapper.selectVipUserCertificateList(vipUserCertificate);
}
/**
* 查询我的订单分页列表
*
* @param vipUserCertificate 我的订单信息
* @return 我的订单集合
*/
@Override
public List<VipUserCertificate> selectVipUserCertificatePage(VipUserCertificate vipUserCertificate)
{
startPage();
return vipUserCertificateMapper.selectVipUserCertificateList(vipUserCertificate);
}
}

View File

@ -0,0 +1,48 @@
package com.ruoyi.vip.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.vip.mapper.VipUserCourseSectionMapper;
import com.ruoyi.vip.domain.VipUserCourseSection;
import com.ruoyi.vip.service.IVipUserCourseSectionService;
import com.ruoyi.common.support.Convert;
import com.ruoyi.framework.web.base.AbstractBaseServiceImpl;
/**
* 我的课程学习 服务层实现
*
* @author zhujj
* @date 2019-01-15
*/
@Service
public class VipUserCourseSectionServiceImpl extends AbstractBaseServiceImpl<VipUserCourseSectionMapper,VipUserCourseSection> implements IVipUserCourseSectionService
{
@Autowired
private VipUserCourseSectionMapper vipUserCourseSectionMapper;
/**
* 查询我的课程学习列表
*
* @param vipUserCourseSection 我的课程学习信息
* @return 我的课程学习集合
*/
@Override
public List<VipUserCourseSection> selectVipUserCourseSectionList(VipUserCourseSection vipUserCourseSection)
{
return vipUserCourseSectionMapper.selectVipUserCourseSectionList(vipUserCourseSection);
}
/**
* 查询我的课程学习分页列表
*
* @param vipUserCourseSection 我的课程学习信息
* @return 我的课程学习集合
*/
@Override
public List<VipUserCourseSection> selectVipUserCourseSectionPage(VipUserCourseSection vipUserCourseSection)
{
startPage();
return vipUserCourseSectionMapper.selectVipUserCourseSectionList(vipUserCourseSection);
}
}

View File

@ -0,0 +1,46 @@
<?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.vip.mapper.VipUserCertificateMapper">
<resultMap type="VipUserCertificate" id="VipUserCertificateResult">
<result property="id" column="id" />
<result property="vipUserId" column="vip_user_id" />
<result property="name" column="name" />
<result property="image" column="image" />
<result property="startDate" column="start_date" />
<result property="endDate" column="end_date" />
<result property="createBy" column="create_by" />
<result property="createDate" column="create_date" />
<result property="updateBy" column="update_by" />
<result property="updateDate" column="update_date" />
<result property="remarks" column="remarks" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectVipUserCertificateVo">
id, vip_user_id, name, image, start_date, end_date, create_by, create_date, update_by, update_date, remarks, del_flag </sql>
<select id="selectVipUserCertificateList" parameterType="VipUserCertificate" resultMap="VipUserCertificateResult">
select
<include refid="selectVipUserCertificateVo"/>
from vip_user_certificate
<where>
<if test="id != null "> and id = #{id}</if>
<if test="vipUserId != null "> and vip_user_id = #{vipUserId}</if>
<if test="name != null and name != '' "> and name = #{name}</if>
<if test="image != null and image != '' "> and image = #{image}</if>
<if test="startDate != null "> and start_date = #{startDate}</if>
<if test="endDate != null "> and end_date = #{endDate}</if>
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
<if test="createDate != null "> and create_date = #{createDate}</if>
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
<if test="updateDate != null "> and update_date = #{updateDate}</if>
<if test="remarks != null and remarks != '' "> and remarks = #{remarks}</if>
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
</where>
</select>
</mapper>

View File

@ -0,0 +1,44 @@
<?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.vip.mapper.VipUserCourseSectionMapper">
<resultMap type="VipUserCourseSection" id="VipUserCourseSectionResult">
<result property="id" column="id" />
<result property="vipUserId" column="vip_user_id" />
<result property="trainCourseId" column="train_course_id" />
<result property="trainCourseSection" column="train_course_section" />
<result property="duration" column="duration" />
<result property="createBy" column="create_by" />
<result property="createDate" column="create_date" />
<result property="updateBy" column="update_by" />
<result property="updateDate" column="update_date" />
<result property="remarks" column="remarks" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectVipUserCourseSectionVo">
id, vip_user_id, train_course_id, train_course_section, duration, create_by, create_date, update_by, update_date, remarks, del_flag </sql>
<select id="selectVipUserCourseSectionList" parameterType="VipUserCourseSection" resultMap="VipUserCourseSectionResult">
select
<include refid="selectVipUserCourseSectionVo"/>
from vip_user_course_section
<where>
<if test="id != null "> and id = #{id}</if>
<if test="vipUserId != null "> and vip_user_id = #{vipUserId}</if>
<if test="trainCourseId != null "> and train_course_id = #{trainCourseId}</if>
<if test="trainCourseSection != null "> and train_course_section = #{trainCourseSection}</if>
<if test="duration != null "> and duration = #{duration}</if>
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
<if test="createDate != null "> and create_date = #{createDate}</if>
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
<if test="updateDate != null "> and update_date = #{updateDate}</if>
<if test="remarks != null and remarks != '' "> and remarks = #{remarks}</if>
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
</where>
</select>
</mapper>

View File

@ -0,0 +1,100 @@
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-vipUserCertificate-add">
<div class="form-group">
<label class="col-sm-3 control-label">会员代码:</label>
<div class="col-sm-8">
<input id="vipUserId" name="vipUserId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">证书名称:</label>
<div class="col-sm-8">
<input id="name" name="name" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">证书照片:</label>
<div class="col-sm-8">
<input id="image" name="image" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生效日期:</label>
<div class="col-sm-8">
<div class="input-group date"> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" id="startDate" name="startDate" class="form-control" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">截止日期:</label>
<div class="col-sm-8">
<div class="input-group date"> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" id="endDate" name="endDate" class="form-control" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建者:</label>
<div class="col-sm-8">
<input id="createBy" name="createBy" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div class="col-sm-8">
<input id="createDate" name="createDate" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">更新者:</label>
<div class="col-sm-8">
<input id="updateBy" name="updateBy" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">更新时间:</label>
<div class="col-sm-8">
<input id="updateDate" name="updateDate" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注信息:</label>
<div class="col-sm-8">
<input id="remarks" name="remarks" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">删除标记:</label>
<div class="col-sm-8">
<input id="delFlag" name="delFlag" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "vip/vipUserCertificate"
$("#form-vipUserCertificate-add").validate({
rules:{
xxxx:{
required:true,
},
}
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-vipUserCertificate-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,69 @@
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-vipUserCertificate-edit" th:object="${vipUserCertificate}">
<input id="id" name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">会员代码:</label>
<div class="col-sm-8">
<input id="vipUserId" name="vipUserId" th:field="*{vipUserId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">证书名称:</label>
<div class="col-sm-8">
<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">证书照片:</label>
<div class="col-sm-8">
<input id="image" name="image" th:field="*{image}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生效日期:</label>
<div class="col-sm-8">
<div class="input-group date"> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" id="startDate" th:field="*{startDate}" name="startDate" class="form-control" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">截止日期:</label>
<div class="col-sm-8">
<div class="input-group date"> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" id="endDate" th:field="*{endDate}" name="endDate" class="form-control" >
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注信息:</label>
<div class="col-sm-8">
<input id="remarks" name="remarks" th:field="*{remarks}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "vip/vipUserCertificate"
$("#form-vipUserCertificate-edit").validate({
rules:{
xxxx:{
required:true,
},
}
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-vipUserCertificate-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,162 @@
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
会员代码:<input type="text" name="vipUserId"/>
</li>
<li>
证书名称:<input type="text" name="name"/>
</li>
<li>
证书照片:<input type="text" name="image"/>
</li>
<li>
生效日期:<input type="text" name="startDate"/>
</li>
<li>
截止日期:<input type="text" name="endDate"/>
</li>
<li>
创建者:<input type="text" name="createBy"/>
</li>
<li>
创建时间:<input type="text" name="createDate"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="vip:vipUserCertificate:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="vip:vipUserCertificate:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="vip:vipUserCertificate:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="vip:vipUserCertificate:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('vip:vipUserCertificate:edit')}]];
var removeFlag = [[${@permission.hasPermi('vip:vipUserCertificate:remove')}]];
var prefix = ctx + "vip/vipUserCertificate";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "我的订单",
search: false,
showExport: true,
columns: [{
checkbox: true
},
{
field : 'id',
title : '练习对象',
visible: false
},
{
field : 'vipUserId',
title : '会员代码',
sortable: true
},
{
field : 'name',
title : '证书名称',
sortable: true
},
{
field : 'image',
title : '证书照片',
sortable: true
},
{
field : 'startDate',
title : '生效日期',
sortable: true
},
{
field : 'endDate',
title : '截止日期',
sortable: true
},
{
field : 'createBy',
title : '创建者',
sortable: true
},
{
field : 'createDate',
title : '创建时间',
sortable: true
},
{
field : 'updateBy',
title : '更新者',
sortable: true
},
{
field : 'updateDate',
title : '更新时间',
sortable: true
},
{
field : 'remarks',
title : '备注信息',
sortable: true
},
{
field : 'delFlag',
title : '删除标记',
sortable: true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,88 @@
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-vipUserCourseSection-add">
<div class="form-group">
<label class="col-sm-3 control-label">会员代码:</label>
<div class="col-sm-8">
<input id="vipUserId" name="vipUserId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">课程ID</label>
<div class="col-sm-8">
<input id="trainCourseId" name="trainCourseId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">章节id</label>
<div class="col-sm-8">
<input id="trainCourseSection" name="trainCourseSection" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">学习时间长度(分钟):</label>
<div class="col-sm-8">
<input id="duration" name="duration" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建者:</label>
<div class="col-sm-8">
<input id="createBy" name="createBy" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div class="col-sm-8">
<input id="createDate" name="createDate" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">更新者:</label>
<div class="col-sm-8">
<input id="updateBy" name="updateBy" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">更新时间:</label>
<div class="col-sm-8">
<input id="updateDate" name="updateDate" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注信息:</label>
<div class="col-sm-8">
<input id="remarks" name="remarks" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">删除标记:</label>
<div class="col-sm-8">
<input id="delFlag" name="delFlag" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "vip/vipUserCourseSection"
$("#form-vipUserCourseSection-add").validate({
rules:{
xxxx:{
required:true,
},
}
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-vipUserCourseSection-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,89 @@
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-vipUserCourseSection-edit" th:object="${vipUserCourseSection}">
<input id="id" name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">会员代码:</label>
<div class="col-sm-8">
<input id="vipUserId" name="vipUserId" th:field="*{vipUserId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">课程ID</label>
<div class="col-sm-8">
<input id="trainCourseId" name="trainCourseId" th:field="*{trainCourseId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">章节id</label>
<div class="col-sm-8">
<input id="trainCourseSection" name="trainCourseSection" th:field="*{trainCourseSection}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">学习时间长度(分钟):</label>
<div class="col-sm-8">
<input id="duration" name="duration" th:field="*{duration}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建者:</label>
<div class="col-sm-8">
<input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div class="col-sm-8">
<input id="createDate" name="createDate" th:field="*{createDate}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">更新者:</label>
<div class="col-sm-8">
<input id="updateBy" name="updateBy" th:field="*{updateBy}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">更新时间:</label>
<div class="col-sm-8">
<input id="updateDate" name="updateDate" th:field="*{updateDate}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注信息:</label>
<div class="col-sm-8">
<input id="remarks" name="remarks" th:field="*{remarks}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">删除标记:</label>
<div class="col-sm-8">
<input id="delFlag" name="delFlag" th:field="*{delFlag}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "vip/vipUserCourseSection"
$("#form-vipUserCourseSection-edit").validate({
rules:{
xxxx:{
required:true,
},
}
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-vipUserCourseSection-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,139 @@
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
会员代码:<input type="text" name="vipUserId"/>
</li>
<li>
课程ID<input type="text" name="trainCourseId"/>
</li>
<li>
章节id<input type="text" name="trainCourseSection"/>
</li>
<li>
学习时间长度(分钟):<input type="text" name="duration"/>
</li>
<li>
创建者:<input type="text" name="createBy"/>
</li>
<li>
创建时间:<input type="text" name="createDate"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="vip:vipUserCourseSection:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="vip:vipUserCourseSection:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="vip:vipUserCourseSection:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="vip:vipUserCourseSection:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('vip:vipUserCourseSection:edit')}]];
var removeFlag = [[${@permission.hasPermi('vip:vipUserCourseSection:remove')}]];
var prefix = ctx + "vip/vipUserCourseSection";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "我的课程学习",
search: false,
showExport: true,
columns: [{
checkbox: true
},
{
field : 'id',
title : '练习对象',
visible: false
},
{
field : 'vipUserId',
title : '会员代码',
sortable: true
},
{
field : 'trainCourseId',
title : '课程ID',
sortable: true
},
{
field : 'trainCourseSection',
title : '章节id',
sortable: true
},
{
field : 'duration',
title : '学习时间(分钟)',
sortable: true
},
{
field : 'createBy',
title : '创建者',
sortable: true
},
{
field : 'createDate',
title : '创建时间',
sortable: true
},
{
field : 'updateBy',
title : '更新者',
sortable: true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>