|
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.yonge.cooleshow.biz.dal.config.HuifuConfiguration;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.StudentTime;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.*;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.UserOrderDetailVo;
|
|
|
import com.yonge.cooleshow.common.constant.SysConfigConstant;
|
|
@@ -22,6 +21,7 @@ import com.yonge.cooleshow.biz.dal.vo.res.OrderPayRes;
|
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
|
import com.yonge.cooleshow.common.exception.BizException;
|
|
|
import com.yonge.cooleshow.common.service.IdGeneratorService;
|
|
|
+import com.yonge.toolset.utils.string.StringUtil;
|
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -88,14 +88,14 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
orderCreate.put(GoodTypeEnum.VIDEO, recordService::buyVideoCourse);
|
|
|
|
|
|
//曲目购买
|
|
|
- orderCreate.put(GoodTypeEnum.MUSIC,musicSheetService::buyMusicSheetCheck);
|
|
|
+ orderCreate.put(GoodTypeEnum.MUSIC, musicSheetService::buyMusicSheetCheck);
|
|
|
|
|
|
|
|
|
/**********订单生成后******************/
|
|
|
|
|
|
|
|
|
//曲目购买
|
|
|
- orderAfter.put(GoodTypeEnum.MUSIC,musicSheetService::orderAfterSheet);
|
|
|
+ orderAfter.put(GoodTypeEnum.MUSIC, musicSheetService::orderAfterSheet);
|
|
|
|
|
|
/**********订单完成后******************/
|
|
|
//vip开通缴费
|
|
@@ -110,7 +110,7 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
|
|
|
|
|
|
//曲目购买
|
|
|
- orderSuccess.put(GoodTypeEnum.MUSIC,musicSheetService::buyMusicSheetSuccess);
|
|
|
+ orderSuccess.put(GoodTypeEnum.MUSIC, musicSheetService::buyMusicSheetSuccess);
|
|
|
|
|
|
/**********订单取消后******************/
|
|
|
//陪练课购买
|
|
@@ -121,7 +121,7 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
orderCancel.put(GoodTypeEnum.LIVE, courseGroupService::buyLiveCourseCancel);
|
|
|
|
|
|
// 曲目购买
|
|
|
- orderCancel.put(GoodTypeEnum.MUSIC,musicSheetService::buyMusicSheetCancel);
|
|
|
+ orderCancel.put(GoodTypeEnum.MUSIC, musicSheetService::buyMusicSheetCancel);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -145,6 +145,8 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
@Override
|
|
|
public UserOrderVo detailApp(UserOrder param) {
|
|
|
UserOrderVo userOrderVo = baseMapper.detailApp(param);
|
|
|
+ userOrderVo.setFeeAmt(null);
|
|
|
+ userOrderVo.setPlantformFee(null);
|
|
|
if (null != userOrderVo) {
|
|
|
List<UserOrderDetailVo> orderDetilList = orderDetailService.getOrderDetilListByOrderNo(userOrderVo.getOrderNo());
|
|
|
orderDetilList.forEach(o -> {
|
|
@@ -159,11 +161,24 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
@Override
|
|
|
public HttpResponseResult<Boolean> orderCancel(OrderPayReq payReq) {
|
|
|
UserOrderVo detail = detail(payReq.getOrderNo());
|
|
|
- orderCancel(detail);
|
|
|
+ if (null == detail) {
|
|
|
+ return HttpResponseResult.failed("未找到订单信息");
|
|
|
+ }
|
|
|
+ doOrderCancel(detail, OrderStatusEnum.CLOSE, StringUtil.isEmpty(payReq.getReason()) ? "用户取消订单" : payReq.getReason());
|
|
|
return HttpResponseResult.succeed(true);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public void setSuccessStatus() {
|
|
|
+ OrderSearch query = new OrderSearch();
|
|
|
+ query.setStatus("WAIT_PAY,PAYING");
|
|
|
+ List<UserOrderVo> userOrderVos = selectList(query);
|
|
|
+ for(UserOrderVo userOrderVo : userOrderVos){
|
|
|
+ orderSuccess(userOrderVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public IPage<UserOrderVo> selectPage(IPage<UserOrderVo> page, OrderSearch query) {
|
|
|
return page.setRecords(baseMapper.selectPage(page, query));
|
|
|
}
|
|
@@ -237,6 +252,15 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public HttpResponseResult<UserOrderVo> getPendingOrder(OrderSearch query) {
|
|
|
+ UserOrderVo userOrderVo = baseMapper.getPendingOrder(query);
|
|
|
+ if (null != userOrderVo) {
|
|
|
+ userOrderVo.setOrderDetailList(orderDetailService.getOrderDetilListByOrderNo(userOrderVo.getOrderNo()));
|
|
|
+ }
|
|
|
+ return HttpResponseResult.succeed(userOrderVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public HttpResponseResult<OrderPayRes> orderPaytoPaying(OrderPayReq payReq) {
|
|
|
//查询订单
|
|
|
UserOrderVo detail = detail(payReq.getOrderNo());
|
|
@@ -248,25 +272,108 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void orderCallback(String data) {
|
|
|
+ public void orderCallback(String data, String type) {
|
|
|
JSONObject hfRes = JSONObject.parseObject(data);
|
|
|
- if (PayStatusEnum.succeeded.getCode().equals(hfRes.getString("status"))) {
|
|
|
- //订单完成
|
|
|
- UserOrderVo detail = detail(hfRes.getString("order_no"));
|
|
|
- if (null == detail) {
|
|
|
- log.error("汇付支付回调,订单未找到。 req is {}", data);
|
|
|
+ if (type.equals("payment.succeeded")) {//支付成功
|
|
|
+ paymentSucceededHandle(hfRes);
|
|
|
+ } else if (type.equals("payment.failed")) {//支付失败
|
|
|
+ paymentFailedHandle(hfRes);
|
|
|
+ } else if (type.equals("payment.close.succeeded")) {//支付关单成功
|
|
|
+ paymentCloseSucceededHandle(hfRes);
|
|
|
+ } else if (type.equals("payment.close.failed")) {//支付关单失败
|
|
|
+ paymentCloseFailedHandle(hfRes);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /***
|
|
|
+ * 处理回调-支付成功
|
|
|
+ * @author liweifan
|
|
|
+ * @param: hfRes
|
|
|
+ * @updateTime 2022/4/27 15:09
|
|
|
+ */
|
|
|
+ private void paymentSucceededHandle(JSONObject hfRes) {
|
|
|
+ //订单完成
|
|
|
+ UserOrderVo detail = detail(hfRes.getString("order_no"));
|
|
|
+ if (null == detail) {
|
|
|
+ log.error("汇付支付回调,订单未找到。 req is {}", hfRes.toJSONString());
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!detail.getStatus().equals(OrderStatusEnum.PAID)
|
|
|
+ && !detail.getStatus().equals(OrderStatusEnum.WAIT_PAY)
|
|
|
+ && !detail.getStatus().equals(OrderStatusEnum.CLOSE)) {
|
|
|
+ orderSuccess(detail, hfRes);
|
|
|
+ } else {
|
|
|
+ log.error("汇付支付回调,订单状态异常。 req is {}", hfRes.toJSONString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /***
|
|
|
+ * 处理回调-支付失败
|
|
|
+ * @author liweifan
|
|
|
+ * @param: hfRes
|
|
|
+ * @updateTime 2022/4/27 15:09
|
|
|
+ */
|
|
|
+ private void paymentFailedHandle(JSONObject hfRes) {
|
|
|
+ //订单完成
|
|
|
+ UserOrderVo detail = detail(hfRes.getString("order_no"));
|
|
|
+
|
|
|
+ if (null == detail) {
|
|
|
+ log.error("汇付支付回调,订单未找到。 req is {}", hfRes.toJSONString());
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!detail.getStatus().equals(OrderStatusEnum.PAID)
|
|
|
+ && !detail.getStatus().equals(OrderStatusEnum.WAIT_PAY)
|
|
|
+ && !detail.getStatus().equals(OrderStatusEnum.CLOSE)) {
|
|
|
+
|
|
|
+ doOrderCancel(detail, OrderStatusEnum.FAIL, "支付失败");
|
|
|
+ //查询
|
|
|
+ UserOrderPayment orderPayment = orderPaymentService.detailByOrderNo(hfRes.getString("order_no"));
|
|
|
+ if (null == orderPayment) {
|
|
|
return;
|
|
|
}
|
|
|
- if (!detail.getStatus().equals(OrderStatusEnum.PAID)
|
|
|
- && !detail.getStatus().equals(OrderStatusEnum.WAIT_PAY)
|
|
|
- && !detail.getStatus().equals(OrderStatusEnum.CLOSE)) {
|
|
|
- orderSuccess(detail, hfRes);
|
|
|
- } else {
|
|
|
- log.error("汇付支付回调,订单状态异常。 req is {}", data);
|
|
|
- }
|
|
|
+ orderPayment.setPayFailMsg("支付回调失败");
|
|
|
+ orderPayment.setStatus(TradeStatusEnum.failed);
|
|
|
+ orderPayment.setUpdateTime(new Date());
|
|
|
+ orderPaymentService.updateById(orderPayment);
|
|
|
+ } else {
|
|
|
+ log.error("汇付支付回调,订单状态异常。 req is {}", hfRes.toJSONString());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /***
|
|
|
+ * 支付关单成功
|
|
|
+ * @author liweifan
|
|
|
+ * @param: hfRes
|
|
|
+ * @updateTime 2022/4/27 15:33
|
|
|
+ */
|
|
|
+ private void paymentCloseSucceededHandle(JSONObject hfRes) {
|
|
|
+ UserOrderPayment orderPayment = orderPaymentService.detailByTransNo(hfRes.getString("payment_id"));
|
|
|
+ if (null == orderPayment) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ orderPayment.setStatus(TradeStatusEnum.succeeded);
|
|
|
+ orderPayment.setUpdateTime(new Date());
|
|
|
+ orderPaymentService.updateById(orderPayment);
|
|
|
+ }
|
|
|
+
|
|
|
+ /***
|
|
|
+ * 支付关单失败
|
|
|
+ * @author liweifan
|
|
|
+ * @param: hfRes
|
|
|
+ * @updateTime 2022/4/27 15:33
|
|
|
+ */
|
|
|
+ private void paymentCloseFailedHandle(JSONObject hfRes) {
|
|
|
+ UserOrderPayment orderPayment = orderPaymentService.detailByTransNo(hfRes.getString("payment_id"));
|
|
|
+ if (null == orderPayment) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ orderPayment.setStatus(TradeStatusEnum.failed);
|
|
|
+ orderPayment.setPayFailMsg("支付关单回调失败-" + hfRes.getString("error_msg"));
|
|
|
+ orderPayment.setUpdateTime(new Date());
|
|
|
+ orderPaymentService.updateById(orderPayment);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void pollingOrder() {
|
|
|
//WAIT_PAY状态的订单,半个小时自动关闭
|
|
@@ -275,7 +382,7 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
for (UserOrderVo userOrder : orderList) {
|
|
|
//待支付订单直接取消
|
|
|
if (OrderStatusEnum.WAIT_PAY.equals(userOrder.getStatus())) {
|
|
|
- waitPayOrderHandle(userOrder);
|
|
|
+ doOrderCancel(userOrder, OrderStatusEnum.CLOSE, "订单超时");
|
|
|
}
|
|
|
if (OrderStatusEnum.PAYING.equals(userOrder.getStatus())) {
|
|
|
payingOrderHandle(userOrder);
|
|
@@ -284,16 +391,6 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
}
|
|
|
|
|
|
/***
|
|
|
- * 处理待支付订单
|
|
|
- * @author liweifan
|
|
|
- * @param: userOrder
|
|
|
- * @updateTime 2022/4/13 16:51
|
|
|
- */
|
|
|
- private void waitPayOrderHandle(UserOrderVo userOrder) {
|
|
|
- orderCancel(userOrder);
|
|
|
- }
|
|
|
-
|
|
|
- /***
|
|
|
* 处理支付中订单
|
|
|
* @author liweifan
|
|
|
* @param: userOrder
|
|
@@ -309,10 +406,11 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
try {
|
|
|
Map<String, Object> resMap = paymentSdk.queryPayment(orderPayment.getTransNo());
|
|
|
//支付成功
|
|
|
- if (PayStatusEnum.succeeded.getCode().equals(resMap.get("status").toString())) {
|
|
|
+ if (TradeStatusEnum.succeeded.getCode().equals(resMap.get("status").toString())) {
|
|
|
orderSuccess(userOrder);
|
|
|
} else {
|
|
|
- orderCancel(userOrder);
|
|
|
+ //关闭订单
|
|
|
+ doOrderCancel(userOrder, OrderStatusEnum.CLOSE, "订单超时");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
@@ -363,9 +461,8 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
return HttpResponseResult.succeed(orderPayRes);
|
|
|
} else {
|
|
|
//入订单付款表,同时修改订单状态
|
|
|
- orderCancel(detail);
|
|
|
+ doOrderCancel(detail, OrderStatusEnum.FAIL, "订单超时");
|
|
|
errOrderPayment(responseResult, payReq);
|
|
|
- baseMapper.updateStatusByOrderNo(payReq.getOrderNo(), OrderStatusEnum.FAIL.getCode());
|
|
|
return HttpResponseResult.failed(responseResult.getMsg());
|
|
|
}
|
|
|
|
|
@@ -391,10 +488,10 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
);
|
|
|
String pay_info = ((JSONObject) res.get("expend")).getString("pay_info");
|
|
|
orderPayment.setPayInfo(pay_info);
|
|
|
- orderPayment.setStatus(PayStatusEnum.pending);
|
|
|
+ orderPayment.setStatus(TradeStatusEnum.pending);
|
|
|
} else {
|
|
|
orderPayment.setPayFailMsg(responseResult.getMsg());
|
|
|
- orderPayment.setStatus(PayStatusEnum.failed);
|
|
|
+ orderPayment.setStatus(TradeStatusEnum.failed);
|
|
|
}
|
|
|
orderPaymentService.save(orderPayment);
|
|
|
return orderPayment;
|
|
@@ -417,7 +514,7 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
orderPayment.setPayChannel(payReq.getPayChannel());
|
|
|
}
|
|
|
orderPayment.setPayFailMsg(responseResult.getMsg());
|
|
|
- orderPayment.setStatus(PayStatusEnum.failed);
|
|
|
+ orderPayment.setStatus(TradeStatusEnum.failed);
|
|
|
orderPayment.setUpdateTime(new Date());
|
|
|
|
|
|
orderPaymentService.saveOrUpdate(orderPayment);
|
|
@@ -434,7 +531,7 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
*/
|
|
|
private HttpResponseResult<OrderPayRes> orderPayPaying(OrderPayReq payReq, UserOrderVo detail) {
|
|
|
UserOrderPayment orderPayment = orderPaymentService.detailByOrderNo(payReq.getOrderNo());
|
|
|
- if (PayStatusEnum.pending.equals(orderPayment.getStatus())) {
|
|
|
+ if (TradeStatusEnum.pending.equals(orderPayment.getStatus())) {
|
|
|
OrderPayRes orderPayRes = new OrderPayRes();
|
|
|
orderPayRes.setPay_info(orderPayment.getPayInfo());
|
|
|
orderPayRes.setPay_amt(orderPayment.getPayAmt().toString());
|
|
@@ -601,18 +698,35 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
* @updateTime 2022/4/13 17:23
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- void orderCancel(UserOrderVo userOrder) {
|
|
|
- userOrder.setStatus(OrderStatusEnum.CLOSE);
|
|
|
- userOrder.setUpdateTime(new Date());
|
|
|
- baseMapper.updateById(userOrder);
|
|
|
+ void doOrderCancel(UserOrderVo userOrder, OrderStatusEnum orderStatus, String reason) {
|
|
|
+ //已经取消过的订单,不能再取消
|
|
|
+ if (OrderStatusEnum.CLOSE.equals(userOrder.getStatus())
|
|
|
+ || OrderStatusEnum.FAIL.equals(userOrder.getStatus())) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //状态只能是关闭和失败
|
|
|
+ if (!OrderStatusEnum.CLOSE.equals(orderStatus)
|
|
|
+ && !OrderStatusEnum.FAIL.equals(orderStatus)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
UserOrderPayment orderPayment = orderPaymentService.detailByOrderNo(userOrder.getOrderNo());
|
|
|
if (null != orderPayment) {
|
|
|
//更新付款单
|
|
|
- orderPayment.setStatus(PayStatusEnum.failed);
|
|
|
- orderPayment.setPayFailMsg("交易取消");
|
|
|
+ orderPayment.setStatus(TradeStatusEnum.failed);
|
|
|
+ orderPayment.setPayFailMsg(StringUtil.isEmpty(reason) ? "交易取消" : reason);
|
|
|
orderPayment.setUpdateTime(new Date());
|
|
|
- orderPaymentService.updateById(orderPayment);
|
|
|
+ //发送支付关单请求
|
|
|
+ HttpResponseResult<Map<String, Object>> responseResult = paymentSdk.closePayment(userOrder.getTransNo(), reason, "");
|
|
|
+ if (!responseResult.getStatus()) {
|
|
|
+ orderPayment.setCloseStatus(TradeStatusEnum.failed);
|
|
|
+ orderPayment.setCloseFailMsg(responseResult.getMsg());
|
|
|
+ orderPaymentService.updateById(orderPayment);
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ orderPayment.setCloseStatus(TradeStatusEnum.pending);
|
|
|
+ orderPaymentService.updateById(orderPayment);
|
|
|
+ }
|
|
|
}
|
|
|
List<UserOrderDetailVo> orderDetailList = orderDetailService.getOrderDetilListByOrderNo(userOrder.getOrderNo());
|
|
|
for (UserOrderDetailVo orderDetailVo : orderDetailList) {
|
|
@@ -624,6 +738,10 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
userOrderVoConsumer.accept(orderDetailVo);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ userOrder.setStatus(orderStatus);
|
|
|
+ userOrder.setUpdateTime(new Date());
|
|
|
+ baseMapper.updateById(userOrder);
|
|
|
}
|
|
|
|
|
|
void orderSuccess(UserOrderVo detail) {
|
|
@@ -646,22 +764,21 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
updateById(detail);
|
|
|
//更新付款单
|
|
|
UserOrderPayment orderPayment = orderPaymentService.detailByOrderNo(detail.getOrderNo());
|
|
|
- orderPayment.setStatus(PayStatusEnum.succeeded);
|
|
|
- orderPayment.setArrivalTime(now);
|
|
|
- orderPayment.setUpdateTime(now);
|
|
|
- if (null != hfRes) {
|
|
|
- try {
|
|
|
- orderPayment.setPayAmt(new BigDecimal(hfRes.getString("pay_amt")));
|
|
|
- orderPayment.setFeeAmt(new BigDecimal(hfRes.getString("fee_amt")));
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- log.error("完成订单,付款单金额格式化失败,参数{}", hfRes.toJSONString());
|
|
|
+ if(null != orderPayment){
|
|
|
+ orderPayment.setStatus(TradeStatusEnum.succeeded);
|
|
|
+ orderPayment.setArrivalTime(now);
|
|
|
+ orderPayment.setUpdateTime(now);
|
|
|
+ if (null != hfRes) {
|
|
|
+ try {
|
|
|
+ orderPayment.setPayAmt(new BigDecimal(hfRes.getString("pay_amt")));
|
|
|
+ orderPayment.setFeeAmt(new BigDecimal(hfRes.getString("fee_amt")));
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ log.error("完成订单,付款单金额格式化失败,参数{}", hfRes.toJSONString());
|
|
|
+ }
|
|
|
}
|
|
|
+ orderPaymentService.updateById(orderPayment);
|
|
|
}
|
|
|
- orderPaymentService.updateById(orderPayment);
|
|
|
-
|
|
|
- //StudentTime studentTime = studentTimeService.getById(detail.getUserId());
|
|
|
-
|
|
|
List<UserOrderDetailVo> orderDetailList = orderDetailService.getOrderDetilListByOrderNo(detail.getOrderNo());
|
|
|
for (UserOrderDetailVo orderDetailVo : orderDetailList) {
|
|
|
orderDetailVo.setUserId(detail.getUserId());
|
|
@@ -671,16 +788,6 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
if (!Objects.isNull(userOrderVoConsumer)) {
|
|
|
userOrderVoConsumer.accept(orderDetailVo);
|
|
|
}
|
|
|
- //设置第一次购买时间
|
|
|
- //studentTimeService.setTimeByGoodType(studentTime,orderDetailVo.getGoodType());
|
|
|
}
|
|
|
-
|
|
|
- //记录第一次购买时间
|
|
|
- /*if(null == studentTime || null == studentTime.getUserId()){
|
|
|
- studentTime.setUserId(detail.getUserId());
|
|
|
- studentTimeService.save(studentTime);
|
|
|
- }else{
|
|
|
- studentTimeService.updateById(studentTime);
|
|
|
- }*/
|
|
|
}
|
|
|
}
|