he2802 2 vuotta sitten
vanhempi
commit
34b4b03860

+ 7 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -493,7 +493,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,work_unit,idcard,name,education,apply_post,telphone;
+            String recent_photos, idcard_face_photo, idcard_national_photo,work_unit,idcard,name,education,apply_post,telphone,sex;
             LambdaUpdateWrapper<User> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
             objectLambdaUpdateWrapper.eq(User::getUserId, bo.getUserId());
             UserVo user = iUserService.queryById(bo.getUserId());
@@ -568,6 +568,12 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                     objectLambdaUpdateWrapper.set(User::getJob, apply_post);
                 }
             }
+            if (maps.containsKey("sex")) {
+                sex = JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue();
+                if(Validator.isNotEmpty(sex)){
+                    objectLambdaUpdateWrapper.set(User::getSex, sex.equals("男")?1:2);
+                }
+            }
             objectLambdaUpdateWrapper.set(User::getUpdateTime, DateUtils.getNowTime());
             iUserService.update(null, objectLambdaUpdateWrapper);
         }