|
@@ -960,35 +960,35 @@ public class RegisterServiceImpl implements RegisterService {
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public ResponseJson superVipByMoney(Integer userId,Integer packageId) throws ParseException {
|
|
public ResponseJson superVipByMoney(Integer userId,Integer packageId) throws ParseException {
|
|
- SuperVipDto endFlag = findEnd(userId);
|
|
|
|
- VipPackage pac = vipMapper.findUserPackage(packageId);
|
|
|
|
- Calendar cal = Calendar.getInstance();
|
|
|
|
- SuperVipPo superVip = new SuperVipPo();
|
|
|
|
- //flag=0未买过,-1过期,1有效,endTime过期时间
|
|
|
|
- if (endFlag.getVipFlag() == 0) {
|
|
|
|
- //svipuser表改生效时间,过期时间
|
|
|
|
- Integer duration = pac.getDuration();
|
|
|
|
- String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
|
|
- today += " 00:00:00";
|
|
|
|
- today= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(today);
|
|
|
|
- Date parse = new SimpleDateFormat("yyyy-MM-dd").parse(today);
|
|
|
|
- cal.setTime(parse);
|
|
|
|
- Date beginTime = cal.getTime();
|
|
|
|
- superVip.setBeginTime(beginTime);
|
|
|
|
- superVip.setUpdateTime(beginTime);
|
|
|
|
- cal.add(Calendar.MONTH,duration);
|
|
|
|
- superVip.setEndTime(cal.getTime());
|
|
|
|
- superVip.setUserId(userId);
|
|
|
|
- superVip.setDelFlag(0);
|
|
|
|
- vipMapper.addVip(superVip);
|
|
|
|
- //sviphistory表加入现金买会员历史
|
|
|
|
-
|
|
|
|
- //cm_discern_receipt加入收款记录
|
|
|
|
- }else if(endFlag.getVipFlag() == -1){
|
|
|
|
-
|
|
|
|
- }else if(endFlag.getVipFlag() == 1){
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+// SuperVipDto endFlag = findEnd(userId);
|
|
|
|
+// VipPackage pac = vipMapper.findUserPackage(packageId);
|
|
|
|
+// Calendar cal = Calendar.getInstance();
|
|
|
|
+// SuperVipPo superVip = new SuperVipPo();
|
|
|
|
+// //flag=0未买过,-1过期,1有效,endTime过期时间
|
|
|
|
+// if (endFlag.getVipFlag() == 0) {
|
|
|
|
+// //svipuser表改生效时间,过期时间
|
|
|
|
+// Integer duration = pac.getDuration();
|
|
|
|
+// String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
|
|
+// today += " 00:00:00";
|
|
|
|
+// today= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(today);
|
|
|
|
+// Date parse = new SimpleDateFormat("yyyy-MM-dd").parse(today);
|
|
|
|
+// cal.setTime(parse);
|
|
|
|
+// Date beginTime = cal.getTime();
|
|
|
|
+// superVip.setBeginTime(beginTime);
|
|
|
|
+// superVip.setUpdateTime(beginTime);
|
|
|
|
+// cal.add(Calendar.MONTH,duration);
|
|
|
|
+// superVip.setEndTime(cal.getTime());
|
|
|
|
+// superVip.setUserId(userId);
|
|
|
|
+// superVip.setDelFlag(0);
|
|
|
|
+// vipMapper.addVip(superVip);
|
|
|
|
+// //sviphistory表加入现金买会员历史
|
|
|
|
+//
|
|
|
|
+// //cm_discern_receipt加入收款记录
|
|
|
|
+// }else if(endFlag.getVipFlag() == -1){
|
|
|
|
+//
|
|
|
|
+// }else if(endFlag.getVipFlag() == 1){
|
|
|
|
+//
|
|
|
|
+// }
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
/**
|
|
/**
|