|
@@ -12,6 +12,7 @@ import com.miaxis.newgzpt.domain.GzptVideoVip;
|
|
import com.miaxis.newgzpt.dto.GzptVideoVipDTO;
|
|
import com.miaxis.newgzpt.dto.GzptVideoVipDTO;
|
|
import com.miaxis.newgzpt.service.IGzptUserInfoService;
|
|
import com.miaxis.newgzpt.service.IGzptUserInfoService;
|
|
import com.miaxis.newgzpt.service.IGzptVideoVipService;
|
|
import com.miaxis.newgzpt.service.IGzptVideoVipService;
|
|
|
|
+import com.miaxis.system.service.ISysUserService;
|
|
import com.miaxis.wx.domain.RefundRecord;
|
|
import com.miaxis.wx.domain.RefundRecord;
|
|
import com.miaxis.wx.domain.WxJsOrder;
|
|
import com.miaxis.wx.domain.WxJsOrder;
|
|
import com.miaxis.wx.domain.WxOrder;
|
|
import com.miaxis.wx.domain.WxOrder;
|
|
@@ -220,6 +221,19 @@ public class WxNotifyController {
|
|
wxJsOrderService.updateById(wxJsOrder);
|
|
wxJsOrderService.updateById(wxJsOrder);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// public static void main(String[] args) {
|
|
|
|
+// Date date = DateUtils.parseDate("2021-03-04");
|
|
|
|
+// Date now = new Date();
|
|
|
|
+//
|
|
|
|
+// if(date.compareTo(now)<0){
|
|
|
|
+// System.out.println("11111111111");
|
|
|
|
+// } else {
|
|
|
|
+//
|
|
|
|
+// System.out.println("33333333333");
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
|
|
@Transactional
|
|
@Transactional
|
|
public void writeVipDataToDb(WxJsOrder wxJsOrder) {
|
|
public void writeVipDataToDb(WxJsOrder wxJsOrder) {
|
|
@@ -229,7 +243,7 @@ public class WxNotifyController {
|
|
if ("科目二视频".equals(wxJsOrder.getGoodsName())){
|
|
if ("科目二视频".equals(wxJsOrder.getGoodsName())){
|
|
GzptVideoVipDTO gzptVideoVipDTO = new GzptVideoVipDTO();
|
|
GzptVideoVipDTO gzptVideoVipDTO = new GzptVideoVipDTO();
|
|
gzptVideoVipDTO.setUserId(wxJsOrder.getUserId());
|
|
gzptVideoVipDTO.setUserId(wxJsOrder.getUserId());
|
|
- GzptVideoVip gv = videoVipService.getGzptVideoVipByUserId(gzptVideoVipDTO);
|
|
|
|
|
|
+ GzptVideoVip gv = videoVipService.getGzptVideoVipByUserIdForLocal(gzptVideoVipDTO);
|
|
if(gv!=null) {
|
|
if(gv!=null) {
|
|
//修改会员信息
|
|
//修改会员信息
|
|
Date km2Date = gv.getSubject2();
|
|
Date km2Date = gv.getSubject2();
|
|
@@ -245,6 +259,11 @@ public class WxNotifyController {
|
|
gv.setSubject2(km2oneYear);
|
|
gv.setSubject2(km2oneYear);
|
|
videoVipService.updateGzptVideoVipByUserId(gv);
|
|
videoVipService.updateGzptVideoVipByUserId(gv);
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ long x = now.getTime() + oneYearLong;
|
|
|
|
+ Date km2oneYear = new Date(x);
|
|
|
|
+ gv.setSubject2(km2oneYear);
|
|
|
|
+ videoVipService.updateGzptVideoVipByUserId(gv);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
//新增会员信息
|
|
//新增会员信息
|
|
@@ -254,7 +273,6 @@ public class WxNotifyController {
|
|
long x = now.getTime() + oneYearLong;
|
|
long x = now.getTime() + oneYearLong;
|
|
Date km2oneYear = new Date(x);
|
|
Date km2oneYear = new Date(x);
|
|
videoVip.setSubject2(km2oneYear);
|
|
videoVip.setSubject2(km2oneYear);
|
|
- System.out.println(videoVip);
|
|
|
|
videoVipService.saveGzptVideoVip(videoVip);
|
|
videoVipService.saveGzptVideoVip(videoVip);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -277,6 +295,11 @@ public class WxNotifyController {
|
|
gv.setSubject3(km3oneYear);
|
|
gv.setSubject3(km3oneYear);
|
|
videoVipService.updateGzptVideoVipByUserId(gv);
|
|
videoVipService.updateGzptVideoVipByUserId(gv);
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ long x = now.getTime() + oneYearLong;
|
|
|
|
+ Date km3oneYear = new Date(x);
|
|
|
|
+ gv.setSubject3(km3oneYear);
|
|
|
|
+ videoVipService.updateGzptVideoVipByUserId(gv);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
//新增会员信息
|
|
//新增会员信息
|