Browse Source

Merge remote-tracking branch 'origin/developerA' into developerA

Aslee 3 years ago
parent
commit
f1bf761bd5
20 changed files with 394 additions and 188 deletions
  1. 38 0
      src/main/java/com/caimei/modules/coupon/entity/SvipCouponForm.java
  2. 3 3
      src/main/java/com/caimei/modules/coupon/entity/SvipCouponList.java
  3. 28 2
      src/main/java/com/caimei/modules/coupon/service/CmVipCouponService.java
  4. 9 2
      src/main/java/com/caimei/modules/coupon/web/CmVipCouponController.java
  5. 8 1
      src/main/java/com/caimei/modules/supers/dao/CmSvipPackageDao.java
  6. 31 3
      src/main/java/com/caimei/modules/supers/entity/CmSvipPackage.java
  7. 58 22
      src/main/java/com/caimei/modules/supers/service/CmSvipPackageService.java
  8. 10 7
      src/main/java/com/caimei/modules/supers/web/CmSvipPackageController.java
  9. 1 0
      src/main/java/com/caimei/modules/supervip/dao/CmSvipHistoryDao.java
  10. 3 3
      src/main/java/com/caimei/modules/supervip/entity/CmSvipHistory.java
  11. 28 7
      src/main/java/com/caimei/modules/supervip/service/CmSvipHistoryService.java
  12. 5 1
      src/main/java/com/caimei/modules/supervip/web/CmSvipHistoryController.java
  13. 16 10
      src/main/resources/mappings/modules/super/CmSvipHistoryMapper.xml
  14. 103 88
      src/main/resources/mappings/modules/super/CmSvipPackageMapper.xml
  15. 5 5
      src/main/resources/mappings/modules/super/SvipCouponListDao.xml
  16. 19 16
      src/main/webapp/WEB-INF/views/modules/super/cmSvipPackageForm.jsp
  17. 12 6
      src/main/webapp/WEB-INF/views/modules/svip/cmSvipCouponList.jsp
  18. 9 8
      src/main/webapp/WEB-INF/views/modules/svip/cmSvipHistoryForm.jsp
  19. 4 4
      src/main/webapp/WEB-INF/views/modules/svip/cmSvipHistoryList.jsp
  20. 4 0
      src/main/webapp/WEB-INF/views/modules/user/cmUserbeanshistoryList.jsp

+ 38 - 0
src/main/java/com/caimei/modules/coupon/entity/SvipCouponForm.java

@@ -23,6 +23,12 @@ public class SvipCouponForm extends DataEntity<SvipCouponForm> {
     private String productInfo2;        //商品json数据
     private String productInfo2;        //商品json数据
     private String productInfo3;        //商品json数据
     private String productInfo3;        //商品json数据
     private String productInfo4;        //商品json数据
     private String productInfo4;        //商品json数据
+
+    private String shopName1;
+    private String shopName2;
+    private String shopName3;
+    private String shopName4;
+
 //    /**
 //    /**
 //     * 网站活动页banner
 //     * 网站活动页banner
 //     */
 //     */
@@ -88,6 +94,38 @@ public class SvipCouponForm extends DataEntity<SvipCouponForm> {
     private Integer shopId3;
     private Integer shopId3;
     private Integer shopId4;
     private Integer shopId4;
 
 
+    public String getShopName1() {
+        return shopName1;
+    }
+
+    public void setShopName1(String shopName1) {
+        this.shopName1 = shopName1;
+    }
+
+    public String getShopName2() {
+        return shopName2;
+    }
+
+    public void setShopName2(String shopName2) {
+        this.shopName2 = shopName2;
+    }
+
+    public String getShopName3() {
+        return shopName3;
+    }
+
+    public void setShopName3(String shopName3) {
+        this.shopName3 = shopName3;
+    }
+
+    public String getShopName4() {
+        return shopName4;
+    }
+
+    public void setShopName4(String shopName4) {
+        this.shopName4 = shopName4;
+    }
+
     public String getProductInfo1() {
     public String getProductInfo1() {
         return productInfo1;
         return productInfo1;
     }
     }

+ 3 - 3
src/main/java/com/caimei/modules/coupon/entity/SvipCouponList.java

@@ -9,7 +9,7 @@ public class SvipCouponList extends DataEntity<SvipCouponList> {
     /** 生效月份 */
     /** 生效月份 */
 
 
     private String useTime;
     private String useTime;
-    private Integer status;
+    private String status;
     /** 单张优惠券id */
     /** 单张优惠券id */
     private Integer couponId;
     private Integer couponId;
     /** 一组优惠券id的String字符串,逗号隔开 */
     /** 一组优惠券id的String字符串,逗号隔开 */
@@ -45,11 +45,11 @@ public class SvipCouponList extends DataEntity<SvipCouponList> {
         this.useTime = useTime;
         this.useTime = useTime;
     }
     }
 
 
-    public Integer getStatus() {
+    public String getStatus() {
         return status;
         return status;
     }
     }
 
 
-    public void setStatus(Integer status) {
+    public void setStatus(String status) {
         this.status = status;
         this.status = status;
     }
     }
 
 

+ 28 - 2
src/main/java/com/caimei/modules/coupon/service/CmVipCouponService.java

@@ -179,7 +179,7 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
             Integer ids = Integer.valueOf(s);
             Integer ids = Integer.valueOf(s);
             CmCoupon coupon = listDao.findCoupon(ids);
             CmCoupon coupon = listDao.findCoupon(ids);
             vipCouponList.setCouponId(ids);
             vipCouponList.setCouponId(ids);
-            vipCouponList.setStatus(0);
+            vipCouponList.setStatus("0");
             coupon.setStatus("2");
             coupon.setStatus("2");
             coupon.setCouponsMode("0");
             coupon.setCouponsMode("0");
             cmCouponDao.update(coupon);
             cmCouponDao.update(coupon);
@@ -240,7 +240,7 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
                 form.setStatus("3");
                 form.setStatus("3");
             }
             }
             SvipCouponList vipStatus = listDao.findVipStatus(couponId1);
             SvipCouponList vipStatus = listDao.findVipStatus(couponId1);
-            if (vipStatus.getStatus() != 1) {
+            if (vipStatus.getStatus().equals("0")) {
                 form.setStatus("2");
                 form.setStatus("2");
             }
             }
             svipCoupon.setSvipCoupons(form);
             svipCoupon.setSvipCoupons(form);
@@ -291,6 +291,8 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
         }
         }
         if (coupon1.getCouponType() == 3) {
         if (coupon1.getCouponType() == 3) {
             form.setShopId1(coupon1.getShopId());
             form.setShopId1(coupon1.getShopId());
+            String shopName = vipDao.findShopName(coupon1.getShopId());
+            form.setShopName1(shopName);
         }
         }
 
 
         if (coupon2.getCouponType() == 0) {
         if (coupon2.getCouponType() == 0) {
@@ -301,6 +303,8 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
         }
         }
         if (coupon2.getCouponType() == 3) {
         if (coupon2.getCouponType() == 3) {
             form.setShopId2(coupon2.getShopId());
             form.setShopId2(coupon2.getShopId());
+            String shopName = vipDao.findShopName(coupon2.getShopId());
+            form.setShopName2(shopName);
         }
         }
 
 
         if (coupon3.getCouponType() == 0) {
         if (coupon3.getCouponType() == 0) {
@@ -311,6 +315,8 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
         }
         }
         if (coupon3.getCouponType() == 3) {
         if (coupon3.getCouponType() == 3) {
             form.setShopId3(coupon3.getShopId());
             form.setShopId3(coupon3.getShopId());
+            String shopName = vipDao.findShopName(coupon3.getShopId());
+            form.setShopName3(shopName);
         }
         }
 
 
         if (coupon4.getCouponType() == 0) {
         if (coupon4.getCouponType() == 0) {
@@ -321,6 +327,8 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
         }
         }
         if (coupon4.getCouponType() == 3) {
         if (coupon4.getCouponType() == 3) {
             form.setShopId4(coupon4.getShopId());
             form.setShopId4(coupon4.getShopId());
+            String shopName = vipDao.findShopName(coupon4.getShopId());
+            form.setShopName4(shopName);
         }
         }
 
 
         return form;
         return form;
@@ -337,4 +345,22 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
         SvipCouponForm form = getForm(couponIds);
         SvipCouponForm form = getForm(couponIds);
         return form;
         return form;
     }
     }
+
+    @Transactional(readOnly = false)
+    public void open(Integer couponId) {
+        SvipCouponList vip = listDao.findVipStatus(couponId);
+        String bindCoupon = vip.getBindCoupon();
+        String[] split = bindCoupon.split(",");
+        SvipCouponList vipCouponList = new SvipCouponList();
+        for (String s : split) {
+            Integer ids = Integer.valueOf(s);
+            CmCoupon coupon = listDao.findCoupon(ids);
+            vipCouponList.setCouponId(ids);
+            vipCouponList.setStatus("1");
+            coupon.setStatus("0");
+            coupon.setCouponsMode("0");
+            cmCouponDao.update(coupon);
+            listDao.updateVip(vipCouponList);
+        }
+    }
 }
 }

+ 9 - 2
src/main/java/com/caimei/modules/coupon/web/CmVipCouponController.java

@@ -61,14 +61,21 @@ public class CmVipCouponController {
     public String close(Integer couponId1, RedirectAttributes redirectAttributes) {
     public String close(Integer couponId1, RedirectAttributes redirectAttributes) {
         vipCouponService.close(couponId1);
         vipCouponService.close(couponId1);
         addMessage(redirectAttributes, "关闭优惠券成功");
         addMessage(redirectAttributes, "关闭优惠券成功");
-        return "redirect:" + Global.getAdminPath() + "/svip/cmCoupon/list";
+        return "redirect:" + Global.getAdminPath() + "/vip/cmCoupon";
+    }
+
+    @RequestMapping(value = "open")
+    public String open(Integer couponId1, RedirectAttributes redirectAttributes) {
+        vipCouponService.open(couponId1);
+        addMessage(redirectAttributes, "开启优惠券成功");
+        return "redirect:" + Global.getAdminPath() + "/vip/cmCoupon";
     }
     }
 
 
     @RequestMapping(value = "delete")
     @RequestMapping(value = "delete")
     public String delete(Integer couponId1, RedirectAttributes redirectAttributes) {
     public String delete(Integer couponId1, RedirectAttributes redirectAttributes) {
         vipCouponService.deleteById(couponId1);
         vipCouponService.deleteById(couponId1);
         addMessage(redirectAttributes, "删除优惠券成功");
         addMessage(redirectAttributes, "删除优惠券成功");
-        return "redirect:" + Global.getAdminPath() + "/svip/cmCoupon/list";
+        return "redirect:" + Global.getAdminPath() + "/vip/cmCoupon";
     }
     }
 
 
     @RequestMapping(value = {"list", ""})
     @RequestMapping(value = {"list", ""})

+ 8 - 1
src/main/java/com/caimei/modules/supers/dao/CmSvipPackageDao.java

@@ -3,13 +3,20 @@ package com.caimei.modules.supers.dao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.caimei.modules.supers.entity.CmSvipPackage;
 import com.caimei.modules.supers.entity.CmSvipPackage;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 
 /**
 /**
  * 超级会员套餐配置DAO接口
  * 超级会员套餐配置DAO接口
+ *
  * @author zzj
  * @author zzj
  * @version 2021-10-09
  * @version 2021-10-09
  */
  */
 @MyBatisDao
 @MyBatisDao
 public interface CmSvipPackageDao extends CrudDao<CmSvipPackage> {
 public interface CmSvipPackageDao extends CrudDao<CmSvipPackage> {
-	
+
+    List<CmSvipPackage> findPackage();
+
+    void updatePrice(@Param("price") Double price, @Param("duration") Integer duration, @Param("proportion") Integer proportion);
 }
 }

+ 31 - 3
src/main/java/com/caimei/modules/supers/entity/CmSvipPackage.java

@@ -15,10 +15,14 @@ public class CmSvipPackage extends DataEntity<CmSvipPackage> {
 	
 	
 	private static final long serialVersionUID = 1L;
 	private static final long serialVersionUID = 1L;
 	private String name;		// 套餐名称
 	private String name;		// 套餐名称
-	private String price;		// 套餐价格
+	private String price;
+	private String price1;		// 套餐价格
+	private String price2;		// 套餐价格
+	private String price3;		// 套餐价格
 	private String duration;		// 套餐时长(月)
 	private String duration;		// 套餐时长(月)
 	private String proportion;		// 采美豆现金兑换比例
 	private String proportion;		// 采美豆现金兑换比例
 
 
+
 	public CmSvipPackage() {
 	public CmSvipPackage() {
 		super();
 		super();
 	}
 	}
@@ -35,7 +39,7 @@ public class CmSvipPackage extends DataEntity<CmSvipPackage> {
 	public void setName(String name) {
 	public void setName(String name) {
 		this.name = name;
 		this.name = name;
 	}
 	}
-	
+
 	public String getPrice() {
 	public String getPrice() {
 		return price;
 		return price;
 	}
 	}
@@ -43,7 +47,31 @@ public class CmSvipPackage extends DataEntity<CmSvipPackage> {
 	public void setPrice(String price) {
 	public void setPrice(String price) {
 		this.price = price;
 		this.price = price;
 	}
 	}
-	
+
+	public String getPrice1() {
+		return price1;
+	}
+
+	public void setPrice1(String price1) {
+		this.price1 = price1;
+	}
+
+	public String getPrice2() {
+		return price2;
+	}
+
+	public void setPrice2(String price2) {
+		this.price2 = price2;
+	}
+
+	public String getPrice3() {
+		return price3;
+	}
+
+	public void setPrice3(String price3) {
+		this.price3 = price3;
+	}
+
 	public String getDuration() {
 	public String getDuration() {
 		return duration;
 		return duration;
 	}
 	}

+ 58 - 22
src/main/java/com/caimei/modules/supers/service/CmSvipPackageService.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 
 import com.caimei.modules.supers.dao.CmSvipPackageDao;
 import com.caimei.modules.supers.dao.CmSvipPackageDao;
 import com.caimei.modules.supers.entity.CmSvipPackage;
 import com.caimei.modules.supers.entity.CmSvipPackage;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
@@ -14,33 +15,68 @@ import com.caimei.modules.supers.dao.CmSvipPackageDao;
 
 
 /**
 /**
  * 超级会员套餐配置Service
  * 超级会员套餐配置Service
+ *
  * @author zzj
  * @author zzj
  * @version 2021-10-09
  * @version 2021-10-09
  */
  */
 @Service
 @Service
 @Transactional(readOnly = true)
 @Transactional(readOnly = true)
 public class CmSvipPackageService extends CrudService<CmSvipPackageDao, CmSvipPackage> {
 public class CmSvipPackageService extends CrudService<CmSvipPackageDao, CmSvipPackage> {
+    @Autowired
+    private CmSvipPackageDao dao;
+
+    public CmSvipPackage get(String id) {
+        return super.get(id);
+    }
+
+    public List<CmSvipPackage> findList(CmSvipPackage cmSvipPackage) {
+        return super.findList(cmSvipPackage);
+    }
+
+    public Page<CmSvipPackage> findPage(Page<CmSvipPackage> page, CmSvipPackage cmSvipPackage) {
+        return super.findPage(page, cmSvipPackage);
+    }
+
+    public CmSvipPackage findPackage() {
+        //1套餐12,2套餐3月,3套餐1月
+        List<CmSvipPackage> aPackage = dao.findPackage();
+        CmSvipPackage vip = new CmSvipPackage();
+        for (CmSvipPackage cmSvipPackage : aPackage) {
+            if (cmSvipPackage.getDuration().equals("12")) {
+                vip.setPrice1(cmSvipPackage.getPrice());
+            }
+            if (cmSvipPackage.getDuration().equals("3")) {
+                vip.setPrice2(cmSvipPackage.getPrice());
+            }
+            if (cmSvipPackage.getDuration().equals("1")) {
+                vip.setPrice3(cmSvipPackage.getPrice());
+            }
+            vip.setProportion(cmSvipPackage.getProportion());
+        }
+        return vip;
+    }
+
+    @Transactional(readOnly = false)
+    public void save(CmSvipPackage cmSvipPackage) {
+        super.save(cmSvipPackage);
+    }
+
+    @Transactional(readOnly = false)
+    public void update(CmSvipPackage cmSvipPackage) {
+        //1套餐12,2套餐3月,3套餐1月
+        Double price1 = Double.valueOf(cmSvipPackage.getPrice1());
+        Double price2 = Double.valueOf(cmSvipPackage.getPrice2());
+        Double price3 = Double.valueOf(cmSvipPackage.getPrice3());
+        String p = cmSvipPackage.getProportion();
+        Integer proportion = Integer.valueOf(p);
+        dao.updatePrice(price1, 12, proportion);
+        dao.updatePrice(price2, 3, proportion);
+        dao.updatePrice(price3, 1, proportion);
+    }
+
+    @Transactional(readOnly = false)
+    public void delete(CmSvipPackage cmSvipPackage) {
+        super.delete(cmSvipPackage);
+    }
 
 
-	public CmSvipPackage get(String id) {
-		return super.get(id);
-	}
-	
-	public List<CmSvipPackage> findList(CmSvipPackage cmSvipPackage) {
-		return super.findList(cmSvipPackage);
-	}
-	
-	public Page<CmSvipPackage> findPage(Page<CmSvipPackage> page, CmSvipPackage cmSvipPackage) {
-		return super.findPage(page, cmSvipPackage);
-	}
-	
-	@Transactional(readOnly = false)
-	public void save(CmSvipPackage cmSvipPackage) {
-		super.save(cmSvipPackage);
-	}
-	
-	@Transactional(readOnly = false)
-	public void delete(CmSvipPackage cmSvipPackage) {
-		super.delete(cmSvipPackage);
-	}
-	
 }
 }

+ 10 - 7
src/main/java/com/caimei/modules/supers/web/CmSvipPackageController.java

@@ -46,9 +46,11 @@ public class CmSvipPackageController extends BaseController {
 
 
 	@RequestMapping(value = {"list", ""})
 	@RequestMapping(value = {"list", ""})
 	public String list(CmSvipPackage cmSvipPackage, HttpServletRequest request, HttpServletResponse response, Model model) {
 	public String list(CmSvipPackage cmSvipPackage, HttpServletRequest request, HttpServletResponse response, Model model) {
-		Page<CmSvipPackage> page = cmSvipPackageService.findPage(new Page<CmSvipPackage>(request, response), cmSvipPackage); 
-		model.addAttribute("page", page);
-		return "modules/super/cmSvipPackageList";
+//		Page<CmSvipPackage> page = cmSvipPackageService.findPage(new Page<CmSvipPackage>(request, response), cmSvipPackage);
+//		model.addAttribute("page", page);
+		cmSvipPackage = cmSvipPackageService.findPackage();
+		model.addAttribute("cmSvipPackage",cmSvipPackage);
+		return "modules/super/cmSvipPackageForm";
 	}
 	}
 
 
 
 
@@ -59,16 +61,17 @@ public class CmSvipPackageController extends BaseController {
 	}
 	}
 
 
 
 
-	@RequestMapping(value = "save")
-	public String save(CmSvipPackage cmSvipPackage, Model model, RedirectAttributes redirectAttributes) {
+	@RequestMapping(value = "update")
+	public String update(CmSvipPackage cmSvipPackage, Model model, RedirectAttributes redirectAttributes) {
 		if (!beanValidator(model, cmSvipPackage)){
 		if (!beanValidator(model, cmSvipPackage)){
 			return form(cmSvipPackage, model);
 			return form(cmSvipPackage, model);
 		}
 		}
-		cmSvipPackageService.save(cmSvipPackage);
+		cmSvipPackageService.update(cmSvipPackage);
 		addMessage(redirectAttributes, "保存超级会员套餐配置成功");
 		addMessage(redirectAttributes, "保存超级会员套餐配置成功");
 		return "redirect:"+Global.getAdminPath()+"/super/cmSvipPackage/?repage";
 		return "redirect:"+Global.getAdminPath()+"/super/cmSvipPackage/?repage";
 	}
 	}
-	
+
+
 
 
 	@RequestMapping(value = "delete")
 	@RequestMapping(value = "delete")
 	public String delete(CmSvipPackage cmSvipPackage, RedirectAttributes redirectAttributes) {
 	public String delete(CmSvipPackage cmSvipPackage, RedirectAttributes redirectAttributes) {

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

@@ -24,4 +24,5 @@ public interface CmSvipHistoryDao extends CrudDao<CmSvipHistory> {
 
 
     CmSvipHistory findOutEndTime(Long userId);
     CmSvipHistory findOutEndTime(Long userId);
 
 
+    Integer findPackage(Integer pac);
 }
 }

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

@@ -17,7 +17,7 @@ public class CmSvipHistory extends DataEntity<CmSvipHistory> {
 
 
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
     private Long userId;        // 用户ID
     private Long userId;        // 用户ID
-    private Long packageId;        // 超级会员套餐ID 12个月1 3个月2 1个月3
+    private Integer packageId;        // 超级会员套餐ID
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date beginTime;        // 生效时间
     private Date beginTime;        // 生效时间
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@@ -133,11 +133,11 @@ public class CmSvipHistory extends DataEntity<CmSvipHistory> {
         this.userId = userId;
         this.userId = userId;
     }
     }
 
 
-    public Long getPackageId() {
+    public Integer getPackageId() {
         return packageId;
         return packageId;
     }
     }
 
 
-    public void setPackageId(Long packageId) {
+    public void setPackageId(Integer packageId) {
         this.packageId = packageId;
         this.packageId = packageId;
     }
     }
 
 

+ 28 - 7
src/main/java/com/caimei/modules/supervip/service/CmSvipHistoryService.java

@@ -1,10 +1,12 @@
 package com.caimei.modules.supervip.service;
 package com.caimei.modules.supervip.service;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 import com.caimei.modules.supervip.dao.CmSvipHistoryDao;
 import com.caimei.modules.supervip.dao.CmSvipHistoryDao;
 import com.caimei.modules.supervip.entity.CmSvipHistory;
 import com.caimei.modules.supervip.entity.CmSvipHistory;
+import com.caimei.modules.utils.DateUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
@@ -32,17 +34,29 @@ public class CmSvipHistoryService extends CrudService<CmSvipHistoryDao, CmSvipHi
     }
     }
 
 
     public List<CmSvipHistory> findHistoryform(CmSvipHistory cmSvipHistory) {
     public List<CmSvipHistory> findHistoryform(CmSvipHistory cmSvipHistory) {
+        Integer packageId = cmSvipHistory.getPackageId();
+        if (packageId != 99 && packageId !=666) {
+            Integer aPackage = svipDao.findPackage(packageId);
+            cmSvipHistory.setPackageId(aPackage);
+        } else {
+            cmSvipHistory.setPackageId(null);
+        }
         List<CmSvipHistory> history = svipDao.findHistory(cmSvipHistory);
         List<CmSvipHistory> history = svipDao.findHistory(cmSvipHistory);
+        //1生效2过期3未生效
         for (CmSvipHistory svipHistory : history) {
         for (CmSvipHistory svipHistory : history) {
-            CmSvipHistory vp = svipDao.findEndTime(svipHistory.getUserId());
-            CmSvipHistory vps=svipDao.findOutEndTime(svipHistory.getUserId());
-            if (vp != null) {
+            Date beginTime = svipHistory.getBeginTime();
+            Date endTime = svipHistory.getEndTime();
+            //开始时间<现在
+            Date now = new Date();
+            if (beginTime.after(now)) {
+                svipHistory.setStatus("3");
+            }
+            if (beginTime.before(now) && endTime.after(now)) {
                 svipHistory.setStatus("1");
                 svipHistory.setStatus("1");
-            } else {
-                svipHistory.setStatus("2");
             }
             }
-            if(vps!=null){
-                svipHistory.setStatus("3");
+            //终止时间>现在
+            if (endTime.before(now)) {
+                svipHistory.setStatus("2");
             }
             }
         }
         }
         return history;
         return history;
@@ -51,6 +65,13 @@ public class CmSvipHistoryService extends CrudService<CmSvipHistoryDao, CmSvipHi
     @Override
     @Override
     public Page<CmSvipHistory> findPage(Page<CmSvipHistory> page, CmSvipHistory vip) {
     public Page<CmSvipHistory> findPage(Page<CmSvipHistory> page, CmSvipHistory vip) {
         Page<CmSvipHistory> pageReslut = super.findPage(page, vip);
         Page<CmSvipHistory> pageReslut = super.findPage(page, vip);
+        Integer packageId = vip.getPackageId();
+        if (packageId != 99 && packageId !=666) {
+            Integer aPackage = svipDao.findPackage(packageId);
+            vip.setPackageId(aPackage);
+        }else {
+            vip.setPackageId(null);
+        }
         List<CmSvipHistory> cmSvipHistories = svipDao.superFind(vip);
         List<CmSvipHistory> cmSvipHistories = svipDao.superFind(vip);
         for (CmSvipHistory cmSvipHistory : cmSvipHistories) {
         for (CmSvipHistory cmSvipHistory : cmSvipHistories) {
             CmSvipHistory vp = svipDao.findEndTime(cmSvipHistory.getUserId());
             CmSvipHistory vp = svipDao.findEndTime(cmSvipHistory.getUserId());

+ 5 - 1
src/main/java/com/caimei/modules/supervip/web/CmSvipHistoryController.java

@@ -49,6 +49,8 @@ public class CmSvipHistoryController extends BaseController {
 
 
     @RequestMapping(value = {"list", ""})
     @RequestMapping(value = {"list", ""})
     public String list(CmSvipHistory cmSvipHistory, HttpServletRequest request, HttpServletResponse response, Model model) {
     public String list(CmSvipHistory cmSvipHistory, HttpServletRequest request, HttpServletResponse response, Model model) {
+        //packageid赋值
+        cmSvipHistory.setPackageId(666);
         Page<CmSvipHistory> page = cmSvipHistoryService.findPage(new Page<CmSvipHistory>(request, response), cmSvipHistory);
         Page<CmSvipHistory> page = cmSvipHistoryService.findPage(new Page<CmSvipHistory>(request, response), cmSvipHistory);
         model.addAttribute("page", page);
         model.addAttribute("page", page);
         return "modules/svip/cmSvipHistoryList";
         return "modules/svip/cmSvipHistoryList";
@@ -58,6 +60,8 @@ public class CmSvipHistoryController extends BaseController {
     @RequestMapping(value = "form")
     @RequestMapping(value = "form")
     public String form(CmSvipHistory cmSvipHistory, HttpServletRequest request, HttpServletResponse response, Model model) {
     public String form(CmSvipHistory cmSvipHistory, HttpServletRequest request, HttpServletResponse response, Model model) {
         Page<CmSvipHistory> page = new Page<>(request, response);
         Page<CmSvipHistory> page = new Page<>(request, response);
+        //packageid赋值
+        cmSvipHistory.setPackageId(666);
         List<CmSvipHistory> pageResult = cmSvipHistoryService.findHistoryform(cmSvipHistory);
         List<CmSvipHistory> pageResult = cmSvipHistoryService.findHistoryform(cmSvipHistory);
         String mobile = "";
         String mobile = "";
         String linkMan = "";
         String linkMan = "";
@@ -78,7 +82,7 @@ public class CmSvipHistoryController extends BaseController {
 
 
 
 
     @RequestMapping(value = "findHistory")
     @RequestMapping(value = "findHistory")
-    public String save(CmSvipHistory cmSvipHistory, Model model, HttpServletRequest request, HttpServletResponse response,RedirectAttributes redirectAttributes) {
+    public String findHistory(CmSvipHistory cmSvipHistory, Model model, HttpServletRequest request, HttpServletResponse response,RedirectAttributes redirectAttributes) {
         Page<CmSvipHistory> page = new Page<>(request, response);
         Page<CmSvipHistory> page = new Page<>(request, response);
         List<CmSvipHistory> pageResult = cmSvipHistoryService.findHistoryform(cmSvipHistory);
         List<CmSvipHistory> pageResult = cmSvipHistoryService.findHistoryform(cmSvipHistory);
         String mobile = "";
         String mobile = "";

+ 16 - 10
src/main/resources/mappings/modules/super/CmSvipHistoryMapper.xml

@@ -83,24 +83,24 @@
         cb.name as clubName,
         cb.name as clubName,
         cb.linkMan1 as linkMan,
         cb.linkMan1 as linkMan,
         cb.contractMobile1 as mobile,
         cb.contractMobile1 as mobile,
+        cs.beginTime,
         cs.price,
         cs.price,
         cs.payWay,
         cs.payWay,
         cs.payType,
         cs.payType,
-        cs.price,
         cs.userBeans,
         cs.userBeans,
         cs.payTime,
         cs.payTime,
         cs.endTime
         cs.endTime
         from cm_svip_history cs
         from cm_svip_history cs
         LEFT JOIN club cb ON cs.userId = cb.userId
         LEFT JOIN club cb ON cs.userId = cb.userId
         where cs.userId = #{userId}
         where cs.userId = #{userId}
-        <if test="startPayTime !=null and startPayTime!='' and endPayTime !=null and endPayTime!=''">
+        <if test="startPayTime != null and startPayTime != '' and endPayTime != null and endPayTime != ''">
             and (payTime between #{startPayTime} and #{endPayTime})
             and (payTime between #{startPayTime} and #{endPayTime})
         </if>
         </if>
-        <if test="startEndTime !=null and startEndTime!='' and endEndTime!=null and endEndTime!=''">
+        <if test="startEndTime != null and startEndTime != '' and endEndTime != null and endEndTime != ''">
             and (endTime between #{startEndTime} and #{endEndTime})
             and (endTime between #{startEndTime} and #{endEndTime})
         </if>
         </if>
-        <if test="packageId !=null and packageId!=''">
-            and packageId=#{packageId}
+        <if test="packageId != null">
+            and packageId = #{packageId}
         </if>
         </if>
         <if test='status == "1"'>
         <if test='status == "1"'>
             and endTime > NOW()
             and endTime > NOW()
@@ -122,16 +122,16 @@
 
 
 
 
     <select id="superFind" resultType="com.caimei.modules.supervip.entity.CmSvipHistory">
     <select id="superFind" resultType="com.caimei.modules.supervip.entity.CmSvipHistory">
-        SELECT cb.name as clubName, cb.linkMan1 as linkMan, cb.contractMobile1 as mobile, cs.userId,
-        cs.packageId
+        SELECT cb.name as clubName, cb.linkMan1 as linkMan, cb.contractMobile1 as mobile,
+        cs.userId,cs.beginTime,cs.endTime,cs.packageId
         FROM cm_svip_history cs
         FROM cm_svip_history cs
         LEFT JOIN club cb ON cs.userId = cb.userId
         LEFT JOIN club cb ON cs.userId = cb.userId
         LEFT JOIN cm_svip_user cu ON cs.userId = cu.userId
         LEFT JOIN cm_svip_user cu ON cs.userId = cu.userId
         <where>
         <where>
-            <if test="clubName!=null and clubName!=''">
+            <if test="clubName != null and clubName != ''">
                 and cb.name like concat('%',#{clubName},'%')
                 and cb.name like concat('%',#{clubName},'%')
             </if>
             </if>
-            <if test="linkMan!=null and linkMan!=''">
+            <if test="linkMan != null and linkMan != ''">
                 and cb.linkMan1 like concat('%',#{linkMan},'%') or linkMan2 like concat('%',#{linkMan},'%')
                 and cb.linkMan1 like concat('%',#{linkMan},'%') or linkMan2 like concat('%',#{linkMan},'%')
             </if>
             </if>
             <if test="mobile != null and mobile != ''">
             <if test="mobile != null and mobile != ''">
@@ -141,7 +141,7 @@
                 and (payTime between #{startPayTime} and #{endPayTime})
                 and (payTime between #{startPayTime} and #{endPayTime})
             </if>
             </if>
             <if test="startEndTime !=null and startEndTime!='' and endEndTime!=null and endEndTime!=''">
             <if test="startEndTime !=null and startEndTime!='' and endEndTime!=null and endEndTime!=''">
-                and (endTime between #{startEndTime} and #{endEndTime})
+                and (cu.endTime between #{startEndTime} and #{endEndTime})
             </if>
             </if>
             <if test="packageId !=null and packageId!=''">
             <if test="packageId !=null and packageId!=''">
                 and packageId=#{packageId}
                 and packageId=#{packageId}
@@ -163,4 +163,10 @@
           and beginTime > now()
           and beginTime > now()
     </select>
     </select>
 
 
+    <select id="findPackage" resultType="java.lang.Integer">
+        select id
+        from cm_svip_package
+        where duration = #{pac}
+    </select>
+
 </mapper>
 </mapper>

+ 103 - 88
src/main/resources/mappings/modules/super/CmSvipPackageMapper.xml

@@ -1,96 +1,111 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?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">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.supers.dao.CmSvipPackageDao">
 <mapper namespace="com.caimei.modules.supers.dao.CmSvipPackageDao">
-    
-	<sql id="cmSvipPackageColumns">
-		a.id AS "id",
+
+    <sql id="cmSvipPackageColumns">
+        a.id AS "id",
 		a.name AS "name",
 		a.name AS "name",
 		a.price AS "price",
 		a.price AS "price",
 		a.duration AS "duration",
 		a.duration AS "duration",
 		a.proportion AS "proportion"
 		a.proportion AS "proportion"
-	</sql>
-	
-	<sql id="cmSvipPackageJoins">
-	</sql>
-    
-	<select id="get" resultType="CmSvipPackage">
-		SELECT 
-			<include refid="cmSvipPackageColumns"/>
-		FROM cm_svip_package a
-		<include refid="cmSvipPackageJoins"/>
-		WHERE a.id = #{id}
-	</select>
-	
-	<select id="findList" resultType="CmSvipPackage">
-		SELECT 
-			<include refid="cmSvipPackageColumns"/>
-		FROM cm_svip_package a
-		<include refid="cmSvipPackageJoins"/>
-		<where>
-			
-			<if test="name != null and name != ''">
-				AND a.name LIKE 
-					<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
-					<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
-					<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
-			</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="CmSvipPackage">
-		SELECT 
-			<include refid="cmSvipPackageColumns"/>
-		FROM cm_svip_package a
-		<include refid="cmSvipPackageJoins"/>
-		<where>
-			
-		</where>		
-		<choose>
-			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
-				ORDER BY ${page.orderBy}
-			</when>
-			<otherwise>
-			</otherwise>
-		</choose>
-	</select>
-	
-	<insert id="insert" parameterType="CmSvipPackage"  keyProperty="id" useGeneratedKeys="true">
-		INSERT INTO cm_svip_package(
-			id,
-			name,
-			price,
-			duration,
-			delFlag,
-			proportion
-		) VALUES (
-			#{id},
-			#{name},
-			#{price},
-			#{duration},
-			0,
-			#{proportion}
-		)
-	</insert>
-	
-	<update id="update">
-		UPDATE cm_svip_package SET 	
-			name = #{name},
-			price = #{price},
-			duration = #{duration},
-			proportion = #{proportion}
-		WHERE id = #{id}
-	</update>
-	
-	<delete id="delete">
-		DELETE FROM cm_svip_package
-		WHERE id = #{id}
-	</delete>
-	
+    </sql>
+
+    <sql id="cmSvipPackageJoins">
+    </sql>
+
+    <select id="get" resultType="CmSvipPackage">
+        SELECT
+        <include refid="cmSvipPackageColumns"/>
+        FROM cm_svip_package a
+        <include refid="cmSvipPackageJoins"/>
+        WHERE a.id = #{id}
+    </select>
+
+    <select id="findList" resultType="CmSvipPackage">
+        SELECT
+        <include refid="cmSvipPackageColumns"/>
+        FROM cm_svip_package a
+        <include refid="cmSvipPackageJoins"/>
+        <where>
+
+            <if test="name != null and name != ''">
+                AND a.name LIKE
+                <if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+                <if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+                <if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+            </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="CmSvipPackage">
+        SELECT
+        <include refid="cmSvipPackageColumns"/>
+        FROM cm_svip_package a
+        <include refid="cmSvipPackageJoins"/>
+        <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="findPackage" resultType="com.caimei.modules.supers.entity.CmSvipPackage">
+        select price, duration, proportion
+        from cm_svip_package
+    </select>
+
+    <insert id="insert" parameterType="CmSvipPackage" keyProperty="id" useGeneratedKeys="true">
+        INSERT INTO cm_svip_package(id,
+                                    name,
+                                    price,
+                                    duration,
+                                    delFlag,
+                                    proportion)
+        VALUES (#{id},
+                #{name},
+                #{price},
+                #{duration},
+                0,
+                #{proportion})
+    </insert>
+
+    <update id="update">
+        UPDATE cm_svip_package
+        SET name       = #{name},
+            price      = #{price},
+            duration   = #{duration},
+            proportion = #{proportion}
+        WHERE id = #{id}
+    </update>
+
+    <update id="updatePrice">
+        update cm_svip_package
+        set
+        <if test="price != null">
+            price = #{price},
+        </if>
+        <if test="proportion != null">
+            proportion = #{proportion}
+        </if>
+        where duration = #{duration}
+    </update>
+
+    <delete id="delete">
+        DELETE
+        FROM cm_svip_package
+        WHERE id = #{id}
+    </delete>
+
 </mapper>
 </mapper>

+ 5 - 5
src/main/resources/mappings/modules/super/SvipCouponListDao.xml

@@ -69,17 +69,17 @@
     <update id="updateVip">
     <update id="updateVip">
         UPDATE cm_svip_coupon
         UPDATE cm_svip_coupon
         SET
         SET
-        <if test="useTime !=null and useTime!=''">
+        <if test="useTime != null and useTime!=''">
             useTime = #{useTime},
             useTime = #{useTime},
         </if>
         </if>
-        <if test="delFlag !=null and delFlag!=''">
+        <if test="delFlag != null and delFlag!=''">
             delFlag = #{delFlag},
             delFlag = #{delFlag},
         </if>
         </if>
-        <if test="bindCoupon !=null and bindCoupon!=''">
+        <if test="bindCoupon != null and bindCoupon != ''">
             bindCoupon = #{bindCoupon},
             bindCoupon = #{bindCoupon},
         </if>
         </if>
-        <if test="status !=null and status!=''">
-            status =#{status},
+        <if test="status != null and status != ''">
+            status = #{status},
         </if>
         </if>
         UPDATED_TIME = now()
         UPDATED_TIME = now()
         WHERE couponId = #{couponId}
         WHERE couponId = #{couponId}

+ 19 - 16
src/main/webapp/WEB-INF/views/modules/super/cmSvipPackageForm.jsp

@@ -6,13 +6,12 @@
     <meta name="decorator" content="default"/>
     <meta name="decorator" content="default"/>
     <script type="text/javascript">
     <script type="text/javascript">
         $(document).ready(function () {
         $(document).ready(function () {
-
             //$("#name").focus();
             //$("#name").focus();
             $("#inputForm").validate({
             $("#inputForm").validate({
                 submitHandler: function (form) {
                 submitHandler: function (form) {
                     var places = $(".input-xlarge").val();
                     var places = $(".input-xlarge").val();
                     if (!(/(^[1-9]\d*$)/.test(places))) {
                     if (!(/(^[1-9]\d*$)/.test(places))) {
-                        alert("金额应为正整数");
+                        alert("金额应为正整数,如 100");
                         return false;
                         return false;
                     }
                     }
                     loading('正在提交,请稍等...');
                     loading('正在提交,请稍等...');
@@ -30,43 +29,47 @@
             });
             });
         });
         });
 
 
+
     </script>
     </script>
 </head>
 </head>
 <body>
 <body>
 <ul class="nav nav-tabs">
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/super/cmSvipPackage/">超级会员套餐配置列表</a></li>
-    <li class="active"><a
-            href="${ctx}/super/cmSvipPackage/form?id=${cmSvipPackage.id}">超级会员套餐配置${not empty cmSvipPackage.id?'编辑':'添加'}查看</a>
-    </li>
+    <li><a href="${ctx}/super/cmSvipPackage/">超级会员套餐配置</a></li>
 </ul>
 </ul>
 <br/>
 <br/>
-<form:form id="inputForm" modelAttribute="cmSvipPackage" action="${ctx}/super/cmSvipPackage/save" method="post"
+<form:form id="inputForm" modelAttribute="cmSvipPackage" action="${ctx}/super/cmSvipPackage/update" method="post"
            class="form-horizontal">
            class="form-horizontal">
     <form:hidden path="id"/>
     <form:hidden path="id"/>
     <sys:message content="${message}"/>
     <sys:message content="${message}"/>
+<%--    <div class="control-group">--%>
+<%--        <label class="control-label">套餐名称:</label>--%>
+<%--        <div class="controls">--%>
+<%--            <form:input path="name" htmlEscape="false" maxlength="50" class="input-lab"/>--%>
+<%--        </div>--%>
+<%--    </div>--%>
     <div class="control-group">
     <div class="control-group">
-        <label class="control-label">套餐名称:</label>
+        <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐1:</label>
         <div class="controls">
         <div class="controls">
-            <form:input path="name" htmlEscape="false" maxlength="50" class="input-lab"/>
+            12个月超级会员,售价:<form:input path="price1" htmlEscape="false" class="input-xlarge" style="width: 60px"/>
         </div>
         </div>
     </div>
     </div>
     <div class="control-group">
     <div class="control-group">
-        <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐价格:</label>
+        <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐2:</label>
         <div class="controls">
         <div class="controls">
-            <form:input path="price" htmlEscape="false" class="input-xlarge"/>
+            3个月超级会员,售价:<form:input path="price2" htmlEscape="false" class="input-xlarge" style="width: 60px"/>
         </div>
         </div>
     </div>
     </div>
+
     <div class="control-group">
     <div class="control-group">
-        <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐时长(月):</label>
+        <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐3:</label>
         <div class="controls">
         <div class="controls">
-            <form:input path="duration" htmlEscape="false" class="input-xlarge"/>
+            1个月超级会员,售价:<form:input path="price3" htmlEscape="false" class="input-xlarge" style="width: 60px"/>
         </div>
         </div>
     </div>
     </div>
-
     <div class="control-group">
     <div class="control-group">
-        <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>采美豆现金兑换比例:</label>
+        <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>采美豆兑换套餐:</label>
         <div class="controls">
         <div class="controls">
-            <form:input path="proportion" htmlEscape="false" class="input-xlarge"/>
+            采美豆兑换超会员套餐比例为<form:input path="proportion" htmlEscape="false" class="input-xlarge" style="width: 30px"/>:1
         </div>
         </div>
     </div>
     </div>
     <div class="form-actions">
     <div class="form-actions">

+ 12 - 6
src/main/webapp/WEB-INF/views/modules/svip/cmSvipCouponList.jsp

@@ -78,7 +78,7 @@
                     <c:if test="${cmCoupon.svipCoupons.categoryType1 eq '1'}">仅可购买产品类商品</c:if>
                     <c:if test="${cmCoupon.svipCoupons.categoryType1 eq '1'}">仅可购买产品类商品</c:if>
                 </c:if>
                 </c:if>
                 <c:if test="${cmCoupon.svipCoupons.couponType1 eq 3}">店铺券¥${cmCoupon.svipCoupons.couponAmount1},满${cmCoupon.svipCoupons.touchPrice1}可用,仅可购买店铺
                 <c:if test="${cmCoupon.svipCoupons.couponType1 eq 3}">店铺券¥${cmCoupon.svipCoupons.couponAmount1},满${cmCoupon.svipCoupons.touchPrice1}可用,仅可购买店铺
-                    ${cmCoupon.svipCoupons.shopId1}的商品
+                    ${cmCoupon.svipCoupons.shopName1} 的商品
                 </c:if>
                 </c:if>
                 <br/>
                 <br/>
                 优惠券2:
                 优惠券2:
@@ -91,7 +91,7 @@
                     <c:if test="${cmCoupon.svipCoupons.categoryType2 eq '1'}">仅可购买产品类商品</c:if>
                     <c:if test="${cmCoupon.svipCoupons.categoryType2 eq '1'}">仅可购买产品类商品</c:if>
                 </c:if>
                 </c:if>
                 <c:if test="${cmCoupon.svipCoupons.couponType2 eq 3}">店铺券¥${cmCoupon.svipCoupons.couponAmount2},满${cmCoupon.svipCoupons.touchPrice2}可用,仅可购买店铺
                 <c:if test="${cmCoupon.svipCoupons.couponType2 eq 3}">店铺券¥${cmCoupon.svipCoupons.couponAmount2},满${cmCoupon.svipCoupons.touchPrice2}可用,仅可购买店铺
-                    ${cmCoupon.svipCoupons.shopId2}的商品
+                    ${cmCoupon.svipCoupons.shopName2} 的商品
                 </c:if>
                 </c:if>
                 <br/>
                 <br/>
                 优惠券3:
                 优惠券3:
@@ -104,7 +104,7 @@
                     <c:if test="${cmCoupon.svipCoupons.categoryType3 eq '1'}">仅可购买产品类商品</c:if>
                     <c:if test="${cmCoupon.svipCoupons.categoryType3 eq '1'}">仅可购买产品类商品</c:if>
                 </c:if>
                 </c:if>
                 <c:if test="${cmCoupon.svipCoupons.couponType3 eq 3}">店铺券¥${cmCoupon.svipCoupons.couponAmount3},满${cmCoupon.svipCoupons.touchPrice3}可用,仅可购买店铺
                 <c:if test="${cmCoupon.svipCoupons.couponType3 eq 3}">店铺券¥${cmCoupon.svipCoupons.couponAmount3},满${cmCoupon.svipCoupons.touchPrice3}可用,仅可购买店铺
-                    ${cmCoupon.svipCoupons.shopId3}的商品
+                    ${cmCoupon.svipCoupons.shopName3} 的商品
                 </c:if>
                 </c:if>
                 <br/>
                 <br/>
                 优惠券4:
                 优惠券4:
@@ -117,7 +117,7 @@
                     <c:if test="${cmCoupon.svipCoupons.categoryType4 eq '1'}">仅可购买产品类商品</c:if>
                     <c:if test="${cmCoupon.svipCoupons.categoryType4 eq '1'}">仅可购买产品类商品</c:if>
                 </c:if>
                 </c:if>
                 <c:if test="${cmCoupon.svipCoupons.couponType4 eq 3}">店铺券¥${cmCoupon.svipCoupons.couponAmount4},满${cmCoupon.svipCoupons.touchPrice4}可用,仅可购买店铺
                 <c:if test="${cmCoupon.svipCoupons.couponType4 eq 3}">店铺券¥${cmCoupon.svipCoupons.couponAmount4},满${cmCoupon.svipCoupons.touchPrice4}可用,仅可购买店铺
-                    ${cmCoupon.svipCoupons.shopId4}的商品
+                    ${cmCoupon.svipCoupons.shopName4} 的商品
                 </c:if>
                 </c:if>
             </td>
             </td>
 
 
@@ -138,8 +138,14 @@
 
 
             <td>
             <td>
                 <a href="${ctx}/vip/cmCoupon/form?couponId1=${cmCoupon.svipCoupons.couponId1}">编辑</a>
                 <a href="${ctx}/vip/cmCoupon/form?couponId1=${cmCoupon.svipCoupons.couponId1}">编辑</a>
-                <a href="${ctx}/vip/cmCoupon/close?couponId1=${cmCoupon.svipCoupons.couponId1}"
-                   onclick="return confirmx('确定关闭该该月份的优惠券吗?关闭后该月份将不赠送优惠券?', this.href)">关闭</a>
+                <c:if test="${cmCoupon.svipCoupons.status ne '2'}">
+                    <a href="${ctx}/vip/cmCoupon/close?couponId1=${cmCoupon.svipCoupons.couponId1}"
+                       onclick="return confirmx('确定关闭该该月份的优惠券吗?关闭后该月份将不赠送优惠券?', this.href)">关闭</a>
+                </c:if>
+                <c:if test="${cmCoupon.svipCoupons.status eq '2'}">
+                    <a href="${ctx}/vip/cmCoupon/open?couponId1=${cmCoupon.svipCoupons.couponId1}"
+                       onclick="return confirmx('确定重新开启该月份的优惠券吗?', this.href)">开启</a>
+                </c:if>
                 <a href="${ctx}/vip/cmCoupon/delete?couponId1=${cmCoupon.svipCoupons.couponId1}"
                 <a href="${ctx}/vip/cmCoupon/delete?couponId1=${cmCoupon.svipCoupons.couponId1}"
                    onclick="return confirmx('确定删除该月份的优惠券吗?删除后该月份将不赠送优惠券', this.href)">删除</a>
                    onclick="return confirmx('确定删除该月份的优惠券吗?删除后该月份将不赠送优惠券', this.href)">删除</a>
             </td>
             </td>

+ 9 - 8
src/main/webapp/WEB-INF/views/modules/svip/cmSvipHistoryForm.jsp

@@ -42,19 +42,21 @@
            action="${ctx}/svip/cmSvipHistory/findHistory?userId=${cmSvipHistory.userId}" method="post"
            action="${ctx}/svip/cmSvipHistory/findHistory?userId=${cmSvipHistory.userId}" method="post"
            class="breadcrumb form-search">
            class="breadcrumb form-search">
     <div>
     <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>
+        <p style="padding: 12px;">
+            <b>机构名称:${clubName}</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <b>联系人:${linkMan}</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <b>手机号:${mobile}</b>
+            <span class="clubName"></span></p>
     </div>
     </div>
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="ul-form">
     <div class="ul-form">
         <label>购买套餐:</label>
         <label>购买套餐:</label>
         <form:select path="packageId" class="input-medium ">
         <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:option value="99" label="全部"/>
+            <form:option value="1" label="1个月"/>
+            <form:option value="3" label="3个月"/>
+            <form:option value="12" label="12个月"/>
         </form:select>
         </form:select>
         <label>会员状态:</label>
         <label>会员状态:</label>
         <form:select path="status" class="input-medium ">
         <form:select path="status" class="input-medium ">
@@ -121,7 +123,6 @@
             <td>
             <td>
                 <c:if test="${cmSvipHistory.status eq '1'}"><font color="green">已生效</font> </c:if>
                 <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 '2'}"><font color="red">已过期</font> </c:if>
-                <c:if test="${cmSvipHistory.status eq '3'}"><font color="red">暂未生效</font> </c:if>
             </td>
             </td>
             <td><fmt:formatDate value="${cmSvipHistory.payTime}" pattern="yyyy-MM-dd HH:mm:ss"/></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>
             <td><fmt:formatDate value="${cmSvipHistory.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>

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

@@ -43,10 +43,10 @@
         <form:input path="mobile" htmlEscape="false" class="input-medium"/>
         <form:input path="mobile" htmlEscape="false" class="input-medium"/>
         <label>购买套餐:</label>
         <label>购买套餐:</label>
         <form:select path="packageId" class="input-medium required">
         <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:option value="99" label="全部"/>
+            <form:option value="1" label="1个月"/>
+            <form:option value="3" label="3个月"/>
+            <form:option value="12" label="12个月"/>
         </form:select>
         </form:select>
         <label>会员状态:</label>
         <label>会员状态:</label>
         <form:select path="status" class="input-medium required">
         <form:select path="status" class="input-medium required">

+ 4 - 0
src/main/webapp/WEB-INF/views/modules/user/cmUserbeanshistoryList.jsp

@@ -52,6 +52,7 @@
 				<form:option value="11" label="退款回收"/>
 				<form:option value="11" label="退款回收"/>
 				<form:option value="12" label="登录奖励"/>
 				<form:option value="12" label="登录奖励"/>
 				<form:option value="13" label="查看商品资料"/>
 				<form:option value="13" label="查看商品资料"/>
+				<form:option value="14" label="购买超级会员"/>
 			</form:select>
 			</form:select>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
 			<div class="clearfix"></div>
 			<div class="clearfix"></div>
@@ -116,6 +117,9 @@
 					<c:if test="${userBeansHistory.beansType eq 13}">
 					<c:if test="${userBeansHistory.beansType eq 13}">
 						查看商品资料
 						查看商品资料
 					</c:if>
 					</c:if>
+					<c:if test="${userBeansHistory.beansType eq 14}">
+						购买超级会员
+					</c:if>
 				</td>
 				</td>
 			</tr>
 			</tr>
 		</c:forEach>
 		</c:forEach>