|
@@ -27,6 +27,7 @@ import com.zhongzheng.common.utils.wxpay.*;
|
|
import com.zhongzheng.modules.base.service.IShoppingCartService;
|
|
import com.zhongzheng.modules.base.service.IShoppingCartService;
|
|
import com.zhongzheng.modules.course.domain.Course;
|
|
import com.zhongzheng.modules.course.domain.Course;
|
|
import com.zhongzheng.modules.course.service.ICourseService;
|
|
import com.zhongzheng.modules.course.service.ICourseService;
|
|
|
|
+import com.zhongzheng.modules.exam.domain.ExamNumber;
|
|
import com.zhongzheng.modules.exam.service.IExamNoteService;
|
|
import com.zhongzheng.modules.exam.service.IExamNoteService;
|
|
|
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
@@ -50,8 +51,12 @@ import com.zhongzheng.modules.polyv.service.IPolyvVideoService;
|
|
import com.zhongzheng.modules.polyv.vo.PolyvVideoQuerVo;
|
|
import com.zhongzheng.modules.polyv.vo.PolyvVideoQuerVo;
|
|
import com.zhongzheng.modules.polyv.vo.PolyvVideoVo;
|
|
import com.zhongzheng.modules.polyv.vo.PolyvVideoVo;
|
|
import com.zhongzheng.modules.user.bo.OrderPossessUserAddBo;
|
|
import com.zhongzheng.modules.user.bo.OrderPossessUserAddBo;
|
|
|
|
+import com.zhongzheng.modules.user.bo.UserExamGoodsAddBo;
|
|
|
|
+import com.zhongzheng.modules.user.bo.UserExamGoodsSupplementAddBo;
|
|
import com.zhongzheng.modules.user.domain.User;
|
|
import com.zhongzheng.modules.user.domain.User;
|
|
import com.zhongzheng.modules.user.service.IOrderPossessUserService;
|
|
import com.zhongzheng.modules.user.service.IOrderPossessUserService;
|
|
|
|
+import com.zhongzheng.modules.user.service.IUserExamGoodsService;
|
|
|
|
+import com.zhongzheng.modules.user.service.IUserExamGoodsSupplementService;
|
|
import com.zhongzheng.modules.user.service.IUserService;
|
|
import com.zhongzheng.modules.user.service.IUserService;
|
|
import com.zhongzheng.modules.wx.service.IWxPayService;
|
|
import com.zhongzheng.modules.wx.service.IWxPayService;
|
|
import com.zhongzheng.modules.wx.vo.WxPayVo;
|
|
import com.zhongzheng.modules.wx.vo.WxPayVo;
|
|
@@ -101,6 +106,12 @@ public class WxPayServiceImpl implements IWxPayService {
|
|
@Autowired
|
|
@Autowired
|
|
private RedisCache redisCache;
|
|
private RedisCache redisCache;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IUserExamGoodsService userExamGoodsService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private IUserExamGoodsSupplementService userExamGoodsSupplementService;
|
|
|
|
+
|
|
private WXPayConstants.SignType signType;
|
|
private WXPayConstants.SignType signType;
|
|
|
|
|
|
// private String notifyUrl = "https://api.xyyxt.net/wx/pay/callback";
|
|
// private String notifyUrl = "https://api.xyyxt.net/wx/pay/callback";
|
|
@@ -323,7 +334,17 @@ public class WxPayServiceImpl implements IWxPayService {
|
|
GoodsVo goodsVo = iGoodsService.queryById(g.getGoodsId());
|
|
GoodsVo goodsVo = iGoodsService.queryById(g.getGoodsId());
|
|
//添加商品考试次数和补考次数
|
|
//添加商品考试次数和补考次数
|
|
if (goodsVo.getGoodsType().equals(1)){
|
|
if (goodsVo.getGoodsType().equals(1)){
|
|
-
|
|
|
|
|
|
+ if (userExamGoodsService.queryExamGoods(goodsVo.getGoodsId(),order.getUserId()) < 1){
|
|
|
|
+ ExamNumber examNumber = userExamGoodsService.queryExamGoodsVo(goodsVo.getGoodsId(),order.getUserId());
|
|
|
|
+ UserExamGoodsAddBo userExamGoodsAddBo = new UserExamGoodsAddBo();
|
|
|
|
+ userExamGoodsAddBo.setGoodsId(g.getGoodsId());
|
|
|
|
+ userExamGoodsAddBo.setExamNumber(examNumber.getExamNumber());
|
|
|
|
+ userExamGoodsAddBo.setDoNumber(examNumber.getDoNumber());
|
|
|
|
+ userExamGoodsService.insertByAddBo(userExamGoodsAddBo);
|
|
|
|
+ UserExamGoodsSupplementAddBo userExamGoodsSupplementAddBo = new UserExamGoodsSupplementAddBo();
|
|
|
|
+ userExamGoodsSupplementAddBo.setGoodsId(g.getGoodsId());
|
|
|
|
+ userExamGoodsSupplementService.insertByAddBo(userExamGoodsSupplementAddBo);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (goodsVo.getGoodsType().equals(4)){
|
|
if (goodsVo.getGoodsType().equals(4)){
|
|
|
|
|