|
@@ -30,6 +30,7 @@ import com.jeeplus.sys.service.dto.UserDTO;
|
|
|
import com.jeeplus.sys.service.mapstruct.CertWrapper;
|
|
|
import com.jeeplus.sys.service.mapstruct.UserWrapper;
|
|
|
import com.jeeplus.sys.utils.UserUtils;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -343,6 +344,10 @@ public class UserService extends ServiceImpl <UserMapper, User> {
|
|
|
* @param userDTO
|
|
|
*/
|
|
|
public void saveOrUpdate(UserDTO userDTO) {
|
|
|
+ //当从用户信息页面进行添加时,加一个判断标识
|
|
|
+ if (StringUtils.isBlank(userDTO.getIsStaff())){
|
|
|
+ userDTO.setIsStaff("user");
|
|
|
+ }
|
|
|
ArrayList<UserDTO> users = new ArrayList<>();
|
|
|
User user = userWrapper.toEntity ( userDTO );
|
|
|
if(StringUtils.isNotBlank(userDTO.getManageOfficeIds())){
|
|
@@ -393,7 +398,8 @@ public class UserService extends ServiceImpl <UserMapper, User> {
|
|
|
//再次将人员信息存入到redis中
|
|
|
redisUtils.set(CacheNames.USER_CACHE_USER_ALL_INFO,"user:cache:user:all:info",allUserInfo);
|
|
|
}
|
|
|
- if (StringUtils.isNotBlank(userDTO.getId())){
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(userDTO.getId()) && !userDTO.getIsStaff().equals("staff")){
|
|
|
//将用户信息更新到入职表中
|
|
|
UserInfo staffUserInfoDTO = new UserInfo();
|
|
|
staffUserInfoDTO.setUserId(userDTO.getId());//用户id
|