Browse Source

fix 资料同步

he2802 3 years ago
parent
commit
6846cc9bc9

+ 8 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -163,6 +163,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         if(Validator.isEmpty(bo.getOrderGoodsId())||bo.getOrderGoodsId()==0L){
             throw new CustomException("参数错误");
         }
+
         UserProfile add = BeanUtil.toBean(bo, UserProfile.class);
         validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
@@ -172,6 +173,8 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         add.setLastTime(DateUtils.getNowTime());
         add.setCurrentStatus(1L);
         add.setChangeStatus(1);
+        //同步身份证到用户信息
+        getUserPicInfo(add);
         return this.save(add);
     }
 
@@ -462,8 +465,6 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         sendAuidit(update);
         if (update.getStatus().equals(1)) {
             //审核通过同步身份证到用户信息
-            getUserPicInfo(update);
-
         }
         //审核承诺书发送消息
         sendAuiditSMS(update);
@@ -478,7 +479,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         String keyValue = bo.getKeyValue();
         if (Validator.isNotEmpty(keyValue)) {
             Map<String, String> maps = JSONObject.parseObject(keyValue, Map.class);
-            String recent_photos, idcard_face_photo, idcard_national_photo = null;
+            String recent_photos, idcard_face_photo, idcard_national_photo,work_unit = null;
             LambdaUpdateWrapper<User> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
             objectLambdaUpdateWrapper.eq(User::getUserId, bo.getUserId());
             if (maps.containsKey("recent_photos")) {
@@ -493,6 +494,10 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 idcard_national_photo = JSONObject.parseObject(String.valueOf(maps.get("idcard_national_photo")), UserProfileFit.class).getValue();
                 objectLambdaUpdateWrapper.set(User::getIdCardImg2, idcard_national_photo);
             }
+            if (maps.containsKey("work_unit")) {
+                work_unit = JSONObject.parseObject(String.valueOf(maps.get("work_unit")), UserProfileFit.class).getValue();
+                objectLambdaUpdateWrapper.set(User::getCompanyName, work_unit);
+            }
             objectLambdaUpdateWrapper.set(User::getUpdateTime, DateUtils.getNowTime());
             iUserService.update(null, objectLambdaUpdateWrapper);
         }

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -1011,13 +1011,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                 if (Validator.isNotEmpty(classPeriodStudentVo.getKeyValue())) {
                     JSONObject keyJSON = null;
                     try {
-                        keyJSON = JSON.parseObject(classPeriodStudentVo.getKeyValue());
+                       /* keyJSON = JSON.parseObject(classPeriodStudentVo.getKeyValue());
                         if (keyJSON.containsKey("recent_photos")) {
                             String recent_photos_data = keyJSON.getString("recent_photos");
                             JSONObject recent_photos_jsondata = JSON.parseObject(recent_photos_data);
                             String recent_photos = recent_photos_jsondata.getString("value");
                             classPeriodStudentVo.setOneInchPhotos(recent_photos);
-                        }
+                        }*/
                        /* if (keyJSON.containsKey("idcard_face_photo")) {
                             String idcard_face_photo_data = keyJSON.getString("idcard_face_photo");
                             JSONObject idcard_face_photo_jsondata = JSON.parseObject(idcard_face_photo_data);

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodStudentVo.java

@@ -197,4 +197,5 @@ public class ClassPeriodStudentVo {
 	private String idCardImg2Oss;
 
 	private String oneInchPhotosOss;
+
 }

+ 2 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -116,6 +116,7 @@
         <result property="periodStatusNum" column="period_status_num"/>
         <result property="serviceStartTime" column="service_start_time"/>
         <result property="serviceEndTime" column="service_end_time"/>
+        <result property="oneInchPhotos" column="one_inch_photos"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodUserVo" id="ClassPeriodUserVo">
@@ -305,6 +306,7 @@
         u.id_card,
         cgu.grade_id,
         u.telphone,
+        u.one_inch_photos,
         up.`status` as profile_status,
         g.class_hours as class_hours,
         g.study_start_time as study_start_time,