|
@@ -1,6 +1,7 @@
|
|
package com.ym.mec.biz.service.impl;
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
@@ -1345,6 +1346,25 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
logger.error("产品协议生成失败", e);
|
|
logger.error("产品协议生成失败", e);
|
|
}
|
|
}
|
|
|
|
+ //解析student_goods_sell字段goodsJson,生成订单详情和sellOrder
|
|
|
|
+ StudentGoodsSellDto studentGoodsSellDto = studentGoodsSellDao.getStudentGoodsSellDto(studentPaymentOrder.getOrderNo());
|
|
|
|
+ if(Objects.nonNull(studentGoodsSellDto)){
|
|
|
|
+ if(StringUtils.isNotEmpty(studentGoodsSellDto.getGoodsJson())){
|
|
|
|
+ JSONObject jsonObject = JSON.parseObject(studentGoodsSellDto.getGoodsJson());
|
|
|
|
+ String orderItemList = jsonObject.getString("orderItemList");
|
|
|
|
+ if(StringUtils.isNotEmpty(orderItemList)){
|
|
|
|
+ List<GoodsOrderItemVO> goodsOrderItemVOS = JSON.parseArray(orderItemList, GoodsOrderItemVO.class);
|
|
|
|
+ long count = goodsOrderItemVOS.stream().filter(e -> StringUtils.isEmpty(e.getOrderSn())).count();
|
|
|
|
+ //如果有空的商品货号,不处理
|
|
|
|
+ if(count == 0l){
|
|
|
|
+ List<String> productSns = goodsOrderItemVOS.stream().map(e -> e.getProductSn()).distinct().collect(Collectors.toList());
|
|
|
|
+ for (GoodsOrderItemVO goodsVo : goodsOrderItemVOS) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
// 完全余额支付 不生成下面的记录
|
|
// 完全余额支付 不生成下面的记录
|
|
if (BigDecimal.ZERO.compareTo(studentPaymentOrder.getActualAmount()) == 0) return;
|
|
if (BigDecimal.ZERO.compareTo(studentPaymentOrder.getActualAmount()) == 0) return;
|
|
|
|
|