Forráskód Böngészése

后台超级会员列表

zhijiezhao 3 éve
szülő
commit
64d96385cc

+ 27 - 0
src/main/java/com/caimei/modules/supervip/dao/CmSvipHistoryDao.java

@@ -0,0 +1,27 @@
+package com.caimei.modules.supervip.dao;
+
+import com.caimei.modules.supervip.entity.CmSvipHistory;
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+
+import java.util.List;
+
+
+/**
+ * 超级会员DAO接口
+ * @author zzj
+ * @version 2021-09-27
+ */
+@MyBatisDao
+public interface CmSvipHistoryDao extends CrudDao<CmSvipHistory> {
+
+    List<CmSvipHistory> superFind(CmSvipHistory vip);
+
+    List<CmSvipHistory> findHistory(CmSvipHistory vip);
+
+    CmSvipHistory findEndTime(Long userId);
+
+
+    CmSvipHistory findOutEndTime(Long userId);
+
+}

+ 205 - 0
src/main/java/com/caimei/modules/supervip/entity/CmSvipHistory.java

@@ -0,0 +1,205 @@
+package com.caimei.modules.supervip.entity;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.hibernate.validator.constraints.Length;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * 超级会员Entity
+ *
+ * @author zzj
+ * @version 2021-09-27
+ */
+public class CmSvipHistory extends DataEntity<CmSvipHistory> {
+
+    private static final long serialVersionUID = 1L;
+    private Long userId;        // 用户ID
+    private Long packageId;        // 超级会员套餐ID 12个月1 3个月2 1个月3
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date beginTime;        // 生效时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date endTime;        // 到期时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+    private String payWay;        // 用户付款方式:1线上,2线下,3余额抵扣,4采美豆抵扣
+    private String payType;        // 付款类型:1建设银行7297、2广发银行0115、3中信银行7172、4中信银行0897、5中信银行0897-财付通、6中信银行0897-支付宝、7线上-支付宝、8线上-微信支付、9线上-快钱支付、10口头返佣、11广发银行5461、12PC-B2B网银、13PC-微信支付、14PC-支付宝、15小程序-微信支付、16余额抵扣、17PC-B2C网银
+    private String price;        // 支付金额
+    private String userBeans;        // 抵扣采美豆数量
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date payTime;        // 购买时间
+    //jsp页面虚拟字段
+    private String status;
+    private String clubName;
+    private String linkMan;
+    private String mobile;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date startPayTime;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date endPayTime;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date startEndTime;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date endEndTime;
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getClubName() {
+        return clubName;
+    }
+
+    public void setClubName(String clubName) {
+        this.clubName = clubName;
+    }
+
+    public String getLinkMan() {
+        return linkMan;
+    }
+
+    public void setLinkMan(String linkMan) {
+        this.linkMan = linkMan;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public Date getStartPayTime() {
+        return startPayTime;
+    }
+
+    public void setStartPayTime(Date startPayTime) {
+        this.startPayTime = startPayTime;
+    }
+
+    public Date getEndPayTime() {
+        return endPayTime;
+    }
+
+    public void setEndPayTime(Date endPayTime) {
+        this.endPayTime = endPayTime;
+    }
+
+    public Date getStartEndTime() {
+        return startEndTime;
+    }
+
+    public void setStartEndTime(Date startEndTime) {
+        this.startEndTime = startEndTime;
+    }
+
+    public Date getEndEndTime() {
+        return endEndTime;
+    }
+
+    public void setEndEndTime(Date endEndTime) {
+        this.endEndTime = endEndTime;
+    }
+
+    public CmSvipHistory() {
+        super();
+    }
+
+    public CmSvipHistory(String id) {
+        super(id);
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public Long getPackageId() {
+        return packageId;
+    }
+
+    public void setPackageId(Long packageId) {
+        this.packageId = packageId;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    public Date getBeginTime() {
+        return beginTime;
+    }
+
+    public void setBeginTime(Date beginTime) {
+        this.beginTime = beginTime;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    @Length(min = 0, max = 1, message = "用户付款方式:1线上,2线下,3余额抵扣,4采美豆抵扣长度必须介于 0 和 1 之间")
+    public String getPayWay() {
+        return payWay;
+    }
+
+    public void setPayWay(String payWay) {
+        this.payWay = payWay;
+    }
+
+    @Length(min = 0, max = 10, message = "付款类型:1建设银行7297、2广发银行0115、3中信银行7172、4中信银行0897、5中信银行0897-财付通、6中信银行0897-支付宝、7线上-支付宝、8线上-微信支付、9线上-快钱支付、10口头返佣、11广发银行5461、12PC-B2B网银、13PC-微信支付、14PC-支付宝、15小程序-微信支付、16余额抵扣、17PC-B2C网银长度必须介于 0 和 10 之间")
+    public String getPayType() {
+        return payType;
+    }
+
+    public void setPayType(String payType) {
+        this.payType = payType;
+    }
+
+    public String getPrice() {
+        return price;
+    }
+
+    public void setPrice(String price) {
+        this.price = price;
+    }
+
+    public String getUserBeans() {
+        return userBeans;
+    }
+
+    public void setUserBeans(String userBeans) {
+        this.userBeans = userBeans;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    public Date getPayTime() {
+        return payTime;
+    }
+
+    public void setPayTime(Date payTime) {
+        this.payTime = payTime;
+    }
+
+}

+ 66 - 0
src/main/java/com/caimei/modules/supervip/service/CmSvipHistoryService.java

@@ -0,0 +1,66 @@
+package com.caimei.modules.supervip.service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.caimei.modules.supervip.dao.CmSvipHistoryDao;
+import com.caimei.modules.supervip.entity.CmSvipHistory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.service.CrudService;
+
+
+/**
+ * 超级会员Service
+ *
+ * @author zzj
+ * @version 2021-09-27
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmSvipHistoryService extends CrudService<CmSvipHistoryDao, CmSvipHistory> {
+
+    @Autowired
+    private CmSvipHistoryDao svipDao;
+
+    @Override
+    public List<CmSvipHistory> findList(CmSvipHistory cmSvipHistory) {
+        return super.findList(cmSvipHistory);
+    }
+
+    public List<CmSvipHistory> findHistoryform(CmSvipHistory cmSvipHistory) {
+        List<CmSvipHistory> history = svipDao.findHistory(cmSvipHistory);
+        for (CmSvipHistory svipHistory : history) {
+            CmSvipHistory vp = svipDao.findEndTime(svipHistory.getUserId());
+            CmSvipHistory vps=svipDao.findOutEndTime(svipHistory.getUserId());
+            if (vp != null) {
+                svipHistory.setStatus("1");
+            } else {
+                svipHistory.setStatus("2");
+            }
+            if(vps!=null){
+                svipHistory.setStatus("3");
+            }
+        }
+        return history;
+    }
+
+    @Override
+    public Page<CmSvipHistory> findPage(Page<CmSvipHistory> page, CmSvipHistory vip) {
+        Page<CmSvipHistory> pageReslut = super.findPage(page, vip);
+        List<CmSvipHistory> cmSvipHistories = svipDao.superFind(vip);
+        for (CmSvipHistory cmSvipHistory : cmSvipHistories) {
+            CmSvipHistory vp = svipDao.findEndTime(cmSvipHistory.getUserId());
+            if (vp != null) {
+                cmSvipHistory.setStatus("1");
+            } else {
+                cmSvipHistory.setStatus("2");
+            }
+        }
+        pageReslut.setList(cmSvipHistories);
+        return pageReslut;
+    }
+}

+ 109 - 0
src/main/java/com/caimei/modules/supervip/web/CmSvipHistoryController.java

@@ -0,0 +1,109 @@
+package com.caimei.modules.supervip.web;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.caimei.modules.supervip.entity.CmSvipHistory;
+import com.caimei.modules.supervip.service.CmSvipHistoryService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.web.BaseController;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+
+import java.util.List;
+
+/**
+ * 超级会员Controller
+ *
+ * @author zzj
+ * @version 2021-09-27
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/svip/cmSvipHistory")
+public class CmSvipHistoryController extends BaseController {
+
+    @Autowired
+    private CmSvipHistoryService cmSvipHistoryService;
+
+    @ModelAttribute
+    public CmSvipHistory get(@RequestParam(required = false) String id) {
+        CmSvipHistory entity = null;
+        if (StringUtils.isNotBlank(id)) {
+            entity = cmSvipHistoryService.get(id);
+        }
+        if (entity == null) {
+            entity = new CmSvipHistory();
+        }
+        return entity;
+    }
+
+
+    @RequestMapping(value = {"list", ""})
+    public String list(CmSvipHistory cmSvipHistory, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<CmSvipHistory> page = cmSvipHistoryService.findPage(new Page<CmSvipHistory>(request, response), cmSvipHistory);
+        model.addAttribute("page", page);
+        return "modules/svip/cmSvipHistoryList";
+    }
+
+
+    @RequestMapping(value = "form")
+    public String form(CmSvipHistory cmSvipHistory, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<CmSvipHistory> page = new Page<>(request, response);
+        List<CmSvipHistory> pageResult = cmSvipHistoryService.findHistoryform(cmSvipHistory);
+        String mobile = "";
+        String linkMan = "";
+        String clubName = "";
+        for (CmSvipHistory svipHistory : pageResult) {
+            mobile = svipHistory.getMobile();
+            linkMan = svipHistory.getLinkMan();
+            clubName = svipHistory.getClubName();
+
+        }
+        page.setList(pageResult);
+        model.addAttribute("page", page);
+        model.addAttribute("mobile",mobile);
+        model.addAttribute("linkMan",linkMan);
+        model.addAttribute("clubName",clubName);
+        return "modules/svip/cmSvipHistoryForm";
+    }
+
+
+    @RequestMapping(value = "findHistory")
+    public String save(CmSvipHistory cmSvipHistory, Model model, HttpServletRequest request, HttpServletResponse response,RedirectAttributes redirectAttributes) {
+        Page<CmSvipHistory> page = new Page<>(request, response);
+        List<CmSvipHistory> pageResult = cmSvipHistoryService.findHistoryform(cmSvipHistory);
+        String mobile = "";
+        String linkMan = "";
+        String clubName = "";
+        for (CmSvipHistory svipHistory : pageResult) {
+            mobile = svipHistory.getMobile();
+            linkMan = svipHistory.getLinkMan();
+            clubName = svipHistory.getClubName();
+
+        }
+        page.setList(pageResult);
+        model.addAttribute("page", page);
+        model.addAttribute("mobile",mobile);
+        model.addAttribute("linkMan",linkMan);
+        model.addAttribute("clubName",clubName);
+        return "modules/svip/cmSvipHistoryForm";
+    }
+
+
+    @RequestMapping(value = "delete")
+    public String delete(CmSvipHistory cmSvipHistory, RedirectAttributes redirectAttributes) {
+        cmSvipHistoryService.delete(cmSvipHistory);
+        addMessage(redirectAttributes, "删除超级会员成功");
+        return "redirect:" + Global.getAdminPath() + "/svip/cmSvipHistory/?repage";
+    }
+
+}

+ 166 - 0
src/main/resources/mappings/modules/super/CmSvipHistoryMapper.xml

@@ -0,0 +1,166 @@
+<?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.caimei.modules.supervip.dao.CmSvipHistoryDao">
+
+    <sql id="cmSvipHistoryColumns">
+        a.id AS "id",
+		a.userId AS "userId",
+		a.packageId AS "packageId",
+		a.beginTime AS "beginTime",
+		a.endTime AS "endTime",
+		a.payWay AS "payWay",
+		a.payType AS "payType",
+		a.price AS "price",
+		a.userBeans AS "userBeans",
+		a.payTime AS "payTime"
+    </sql>
+
+    <sql id="cmSvipHistoryJoins">
+    </sql>
+
+    <select id="get" resultType="com.caimei.modules.supervip.entity.CmSvipHistory">
+        SELECT
+        <include refid="cmSvipHistoryColumns"/>
+        FROM cm_svip_history a
+        <include refid="cmSvipHistoryJoins"/>
+        WHERE a.id = #{id}
+    </select>
+
+    <select id="findList" resultType="com.caimei.modules.supervip.entity.CmSvipHistory">
+        SELECT
+        <include refid="cmSvipHistoryColumns"/>
+        FROM cm_svip_history a
+        <include refid="cmSvipHistoryJoins"/>
+        <where>
+
+            <if test="userId != null and userId != ''">
+                AND a.userId = #{userId}
+            </if>
+            <if test="packageId != null and packageId != ''">
+                AND a.packageId = #{packageId}
+            </if>
+            <if test="beginTime != null and beginTime != ''">
+                AND a.beginTime = #{beginTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND a.endTime = #{endTime}
+            </if>
+            <if test="payTime != null and payTime != ''">
+                AND a.payTime = #{payTime}
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+            </otherwise>
+        </choose>
+    </select>
+
+    <select id="findAllList" resultType="com.caimei.modules.supervip.entity.CmSvipHistory">
+        SELECT
+        <include refid="cmSvipHistoryColumns"/>
+        FROM cm_svip_history a
+        <include refid="cmSvipHistoryJoins"/>
+        <where>
+
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+            </otherwise>
+        </choose>
+    </select>
+
+
+    <select id="findHistory" resultType="com.caimei.modules.supervip.entity.CmSvipHistory">
+        select
+        cs.userId,
+        cs.packageId,
+        cb.name as clubName,
+        cb.linkMan1 as linkMan,
+        cb.contractMobile1 as mobile,
+        cs.price,
+        cs.payWay,
+        cs.payType,
+        cs.price,
+        cs.userBeans,
+        cs.payTime,
+        cs.endTime
+        from cm_svip_history cs
+        LEFT JOIN club cb ON cs.userId = cb.userId
+        where cs.userId = #{userId}
+        <if test="startPayTime !=null and startPayTime!='' and endPayTime !=null and endPayTime!=''">
+            and (payTime between #{startPayTime} and #{endPayTime})
+        </if>
+        <if test="startEndTime !=null and startEndTime!='' and endEndTime!=null and endEndTime!=''">
+            and (endTime between #{startEndTime} and #{endEndTime})
+        </if>
+        <if test="packageId !=null and packageId!=''">
+            and packageId=#{packageId}
+        </if>
+        <if test='status == "1"'>
+            and endTime > NOW()
+        </if>
+        <if test='status == "2"'>
+            and NOW() > endTime
+        </if>
+        <if test='status == "3"'>
+            and beginTime > NOW()
+        </if>
+    </select>
+
+    <select id="findEndTime" resultType="com.caimei.modules.supervip.entity.CmSvipHistory">
+        select beginTime, endTime, updateTime
+        from cm_svip_user
+        where userId = #{userId}
+          and endTime > now()
+    </select>
+
+
+    <select id="superFind" resultType="com.caimei.modules.supervip.entity.CmSvipHistory">
+        SELECT DISTINCT cb.name as clubName, cb.linkMan1 as linkMan, cb.contractMobile1 as mobile, cs.userId,
+        cs.packageId
+        FROM cm_svip_history cs
+        LEFT JOIN club cb ON cs.userId = cb.userId
+        LEFT JOIN cm_svip_user cu ON cs.userId = cu.userId
+        <where>
+            <if test="clubName!=null and clubName!=''">
+                and cb.name=#{clubName}
+            </if>
+            <if test="linkMan!=null and linkMan!=''">
+                and cb.linkMan1=#{linkMan} or linkMan2=#{linkMan}
+            </if>
+            <if test="mobile!=null and mobile!=''">
+                and cb.contractMobile1=#{mobile}
+            </if>
+            <if test="startPayTime !=null and startPayTime!='' and endPayTime !=null and endPayTime!=''">
+                and (payTime between #{startPayTime} and #{endPayTime})
+            </if>
+            <if test="startEndTime !=null and startEndTime!='' and endEndTime!=null and endEndTime!=''">
+                and (endTime between #{startEndTime} and #{endEndTime})
+            </if>
+            <if test="packageId !=null and packageId!=''">
+                and packageId=#{packageId}
+            </if>
+            <if test='status == "1"'>
+                and cu.endTime > NOW()
+            </if>
+            <if test='status == "2"'>
+                and now() > cu.endTime
+            </if>
+        </where>
+    </select>
+
+    <select id="findOutEndTime" resultType="com.caimei.modules.supervip.entity.CmSvipHistory">
+        select beginTime, endTime, updateTime
+        from cm_svip_user
+        where userId = #{userId}
+          and beginTime > now()
+    </select>
+
+
+</mapper>

+ 138 - 0
src/main/webapp/WEB-INF/views/modules/svip/cmSvipHistoryForm.jsp

@@ -0,0 +1,138 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>超级会员管理</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {
+            text-align: center;
+        }
+
+        .table td {
+            text-align: center;
+        }
+    </style>
+    <script type="text/javascript">
+        // $(document).ready(function() {
+        //     $(".clubName").text(getUrlParam("name")?getUrlParam("name"):'');
+        // });
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+        function getUrlParam(name) {
+            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", 'i'); //构造一个含有目标参数的正则表达式对象
+            var r = decodeURIComponent(window.location.search).substr(1).match(reg);  //匹配目标参数
+            if (r != null) return (r[2]);
+            return null; //返回参数值
+        }
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/svip/cmSvipHistory/">超级会员列表</a></li>
+    <li class="active"><a href="${ctx}/svip/cmSvipHistory/form?userId=${cmSvipHistory.userId}">购买记录</a></li>
+</ul>
+
+<form:form id="searchForm" modelAttribute="cmSvipHistory"
+           action="${ctx}/svip/cmSvipHistory/findHistory?userId=${cmSvipHistory.userId}" method="post"
+           class="breadcrumb form-search">
+    <div>
+        <p style="padding: 12px;"><b>机构名称:${clubName}</b><span class="clubName"></span></p>
+        <p style="padding: 12px;"><b>联系人:${linkMan}</b><span class="clubName"></span></p>
+        <p style="padding: 12px;"><b>手机号:${mobile}</b><span class="clubName"></span></p>
+    </div>
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <div class="ul-form">
+        <label>购买套餐:</label>
+        <form:select path="packageId" class="input-medium ">
+            <form:option value="" label="全部"/>
+            <form:option value="3" label="1个月"/>
+            <form:option value="2" label="3个月"/>
+            <form:option value="1" label="12个月"/>
+        </form:select>
+        <label>会员状态:</label>
+        <form:select path="status" class="input-medium ">
+            <form:option value="" label="全部"/>
+            <form:option value="1" label="已生效"/>
+            <form:option value="2" label="已过期"/>
+        </form:select>
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+        <label>购买时间:</label>
+        <input name="startPayTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
+               value="<fmt:formatDate value="${cmSvipHistory.startPayTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;
+        <input name="endPayTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
+               value="<fmt:formatDate value="${cmSvipHistory.endPayTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+        <br/>
+        <br/>
+        <label>到期时间:</label>
+        <input name="startEndTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
+               value="<fmt:formatDate value="${cmSvipHistory.startEndTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;
+        <input name="endEndTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
+               value="<fmt:formatDate value="${cmSvipHistory.endEndTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+        &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+        <div class="clearfix"></div>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th>购买套餐</th>
+        <th>购买价格</th>
+        <th>购买渠道</th>
+        <th>会员状态</th>
+        <th>购买时间</th>
+        <th>到期时间</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="cmSvipHistory">
+        <tr>
+            <td>
+                    <c:if test="${cmSvipHistory.packageId eq '1'}">12个月</c:if>
+                    <c:if test="${cmSvipHistory.packageId eq '2'}">3个月</c:if>
+                    <c:if test="${cmSvipHistory.packageId eq '3'}">1个月</c:if>
+            </td>
+            <td>
+                <c:if test="${cmSvipHistory.payWay eq '0'}">${cmSvipHistory.price}</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '1'}">${cmSvipHistory.price}</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '2'}">${cmSvipHistory.price}</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '3'}">${cmSvipHistory.price}</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '4'}"><fmt:formatNumber value="${cmSvipHistory.userBeans}" pattern="#" type="number"/>采美豆</c:if>
+            </td>
+            <td>
+                <c:if test="${cmSvipHistory.payWay eq '0'}">未知</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '1'}">线上</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '2'}">线下</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '3'}">余额抵扣</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '4'}">采美豆抵扣</c:if>
+            </td>
+            <td>
+
+                <c:if test="${cmSvipHistory.status eq '1'}"><font color="green">已生效</font> </c:if>
+                <c:if test="${cmSvipHistory.status eq '2'}"><font color="red">已过期</font> </c:if>
+                <c:if test="${cmSvipHistory.status eq '3'}"><font color="red">暂未生效</font> </c:if>
+            </td>
+            <td><fmt:formatDate value="${cmSvipHistory.payTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+            <td><fmt:formatDate value="${cmSvipHistory.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+<c:if test="${empty page.list}">
+    <p style="text-align: center;"><font color="#1e90ff">暂无数据……</font></p>
+</c:if>
+<div class="pagination">${page}</div>
+</body>
+</html>

+ 109 - 0
src/main/webapp/WEB-INF/views/modules/svip/cmSvipHistoryList.jsp

@@ -0,0 +1,109 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>超级会员管理</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {
+            text-align: center;
+        }
+
+        .table td {
+            text-align: center;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+
+        });
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li class="active"><a href="${ctx}/svip/cmSvipHistory/">超级会员列表</a></li>
+</ul>
+<form:form id="searchForm" modelAttribute="cmSvipHistory" action="${ctx}/svip/cmSvipHistory/" method="post"
+           class="breadcrumb form-search">
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <div class="ul-form">
+        <label>机构名称:</label>
+        <form:input path="clubName" htmlEscape="false" class="input-medium"/>
+        <label>联系人:</label>
+        <form:input path="linkMan" htmlEscape="false" class="input-medium"/>
+        <label>手机号:</label>
+        <form:input path="mobile" htmlEscape="false" class="input-medium"/>
+        <label>购买套餐:</label>
+        <form:select path="packageId" class="input-medium required">
+            <form:option value="" label="全部"/>
+            <form:option value="3" label="1个月"/>
+            <form:option value="2" label="3个月"/>
+            <form:option value="1" label="12个月"/>
+        </form:select>
+        <label>会员状态:</label>
+        <form:select path="status" class="input-medium required">
+            <form:option value="" label="全部"/>
+            <form:option value="1" label="已生效"/>
+            <form:option value="2" label="已过期"/>
+        </form:select>
+        <br/>
+        <br/>
+        <label>购买时间:</label>
+        <input name="startPayTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
+               value="<fmt:formatDate value="${cmSvipHistory.startPayTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;
+        <input name="endPayTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
+               value="<fmt:formatDate value="${cmSvipHistory.endPayTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+        <label>到期时间:</label>
+        <input name="startEndTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
+               value="<fmt:formatDate value="${cmSvipHistory.startEndTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;
+        <input name="endEndTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
+               value="<fmt:formatDate value="${cmSvipHistory.endEndTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+        &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+        <div class="clearfix"></div>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th>机构名称</th>
+        <th>联系人</th>
+        <th>手机号</th>
+        <th>会员状态</th>
+        <th>操作</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="cmSvipHistory">
+        <tr>
+            <td>${cmSvipHistory.clubName}</td>
+            <td>${cmSvipHistory.linkMan}</td>
+            <td>${cmSvipHistory.mobile}</td>
+            <td>
+                <c:if test="${cmSvipHistory.status eq '1'}"><font color="#7fff00">已生效</font> </c:if>
+                <c:if test="${cmSvipHistory.status eq '2'}"><font color="red">已过期</font> </c:if>
+                <c:if test="${cmSvipHistory.status eq '3'}"><font color="red">暂未生效</font> </c:if>
+            </td>
+            <td>
+                <a href="${ctx}/svip/cmSvipHistory/form?userId=${cmSvipHistory.userId}">购买记录</a>
+            </td>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
+</body>
+</html>