ソースを参照

fix 班级复购合并

he2802 3 年 前
コミット
1c942001ee

+ 8 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeServiceImpl.java

@@ -2,6 +2,7 @@ package com.zhongzheng.modules.grade.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.convert.Convert;
+import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
@@ -34,6 +35,7 @@ import com.zhongzheng.modules.inform.service.IInformRemindService;
 import com.zhongzheng.modules.inform.service.IInformUserService;
 import com.zhongzheng.modules.inform.vo.InformRemindBusinessVo;
 import com.zhongzheng.modules.inform.vo.InformRemindVo;
+import com.zhongzheng.modules.order.mapper.OrderMapper;
 import com.zhongzheng.modules.system.domain.SysConfig;
 import com.zhongzheng.modules.user.bo.SubjectStudyRecordQueryBo;
 import com.zhongzheng.modules.user.bo.UserUpdateQueryBo;
@@ -107,6 +109,9 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
     @Autowired
     private IUserService iUserService;
 
+    @Autowired
+    private OrderMapper orderMapper;
+
     @Autowired
     private com.zhongzheng.modules.alisms.service.IAliSmsService IAliSmsService;
 
@@ -381,6 +386,9 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
             UserUpdateQueryBo userUpdateQueryBo = new UserUpdateQueryBo();
             userUpdateQueryBo.setUserId(classGradeStudentVo.getUserId());
             classGradeStudentVo.setUserUpdates(iUserUpdateService.queryList(userUpdateQueryBo));
+            if(Validator.isNotEmpty(classGradeStudentVo.getRebuyOrderGoodsId())&&classGradeStudentVo.getRebuyOrderGoodsId().longValue()>0){
+                classGradeStudentVo.setRebuy(orderMapper.getGradePeriod(classGradeStudentVo.getRebuyOrderGoodsId(),classGradeStudentVo.getUserId()));
+            }
         }
         return classGradeStudentVos;
     }

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassGradeStudentVo.java

@@ -159,4 +159,9 @@ public class ClassGradeStudentVo {
 	private Integer periodPlush;
 	@ApiModelProperty("官方学时推送次数")
 	private Integer periodStatusNum;
+	/** 复购老订单商品ID */
+	@Excel(name = "复购老订单商品ID")
+	@ApiModelProperty("复购老订单商品ID")
+	private Long rebuyOrderGoodsId;
+
 }

+ 1 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -151,6 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="officialStatusTime" column="official_status_time"/>
         <result property="interfacePushId" column="interface_push_id"/>
         <result property="periodPlush" column="period_plush"/>
+        <result property="rebuyOrderGoodsId" column="rebuy_order_goods_id"/>
     </resultMap>