he2802 1 жил өмнө
parent
commit
2d65f709f1

+ 32 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/UserPeriodServiceImpl.java

@@ -20,7 +20,10 @@ import com.zhongzheng.common.utils.SecurityUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ToolsUtils;
 import com.zhongzheng.common.utils.http.HttpUtils;
+import com.zhongzheng.modules.base.bo.UserProfileFit;
+import com.zhongzheng.modules.base.domain.UserProfile;
 import com.zhongzheng.modules.base.service.ICertificateTpService;
+import com.zhongzheng.modules.base.service.IUserProfileService;
 import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
 import com.zhongzheng.modules.course.bo.CourseChapterSectionQueryBo;
 import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
@@ -208,12 +211,18 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
     @Autowired
     private ICourseModuleService iCourseModuleService;
 
+    @Autowired
+    private IUserProfileService iUserProfileService;
+
     @Value("${oldStudySys.syncPath}")
     private String SYNC_PATH;
 
     @Value("${exam.subscribeSave}")
     private String EXAM_SUBSCRIBE_SAVE;
 
+    @Value("${aliyun.oss.endpoint}")
+    private String ALIYUN_OSS_ENDPOINT;
+
     @Override
     public UserPeriodVo queryById(Long id) {
         UserPeriod db = this.baseMapper.selectById(id);
@@ -736,7 +745,29 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
         studyRec.setCompanyName(userVo.getCompanyName());
         studyRec.setUnitContact(userVo.getUnitContact());
         studyRec.setUnitTel(userVo.getUnitTel());
-        
+        UserProfile profile = iUserProfileService.getOne(new LambdaQueryWrapper<UserProfile>()
+                .eq(UserProfile::getOrderGoodsId, gradeUser.getOrderGoodsId())
+                .eq(UserProfile::getTypeStatus, 1)
+                .eq(UserProfile::getCurrentStatus, 1)
+                .in(UserProfile::getStatus, new ArrayList<Integer>(Arrays.asList(1,2)))
+                .orderByDesc(UserProfile::getId)
+                .last("limit 1"));
+        if(Validator.isNotEmpty(profile)){
+            Map<String, String> maps = JSONObject.parseObject(profile.getKeyValue(), Map.class);
+            if(maps.containsKey("commitment_seal")){
+                String commitment_seal = ALIYUN_OSS_ENDPOINT + "/" + JSONObject.parseObject(String.valueOf(maps.get("commitment_seal")), UserProfileFit.class).getValue();
+                studyRec.setCommitmentSeal(commitment_seal);
+            }
+            if(maps.containsKey("school")){
+                String school = JSONObject.parseObject(String.valueOf(maps.get("school")), UserProfileFit.class).getValue();
+                studyRec.setSchool(school);
+            }
+            if(maps.containsKey("major")){
+                String major = JSONObject.parseObject(String.valueOf(maps.get("major")), UserProfileFit.class).getValue();
+                studyRec.setMajor(major);
+            }
+        }
+
         Long bmrq = 0L;
         if(Validator.isNotEmpty(classGrade.getClassStartTime())){
             if(classGrade.getClassStartTime().longValue()<orderGoods.getCreateTime().longValue()){