mayi-upms/mayi-upms-biz/src/main/java/com/zf1976/mayi/upms/biz/service/SysUserService.java
@CacheEvict
        @Transactional
        public Void updateInfo(UpdateInfoDTO dto){
            // query whether the current user exists
            SysUser sysUser = super.lambdaQuery()
                                   .eq(SysUser::getId, dto.getId())
                                   .oneOpt()
                                   .orElseThrow(() -> new BusinessException(BusinessMsgState.DATA_NOT_FOUNT));
            // non-mobile phone numbers are not allowed
            if (!ValidateUtil.isPhone(dto.getPhone())) {
                throw new BusinessException(BusinessMsgState.NOT_PHONE);
            }

            sysUser.setPhone(dto.getPhone());
            sysUser.setGender(dto.getGender());
            sysUser.setNickName(dto.getNickName());
            super.savaOrUpdate(sysUser);
            return null;
        }
/**
         * personal center information modification
         *
         * @param dto dto
         * @return {@link Void}
         */
personal center information modification
@param dto dto
@return  Void
personal center information modification @param dto dto @return Void
@CacheEvict
        @Transactional
        public Void updateInfo(UpdateInfoDTO dto){
            SysUser sysUser = super.lambdaQuery()
                                   .eq(SysUser::getId, dto.getId())
                                   .oneOpt()
                                   .orElseThrow(() -> new BusinessException(BusinessMsgState.DATA_NOT_FOUNT));
            if (!ValidateUtil.isPhone(dto.getPhone())) {
                throw new BusinessException(BusinessMsgState.NOT_PHONE);
            }
            sysUser.setPhone(dto.getPhone());
            sysUser.setGender(dto.getGender());
            sysUser.setNickName(dto.getNickName());
            super.savaOrUpdate(sysUser);
            return null;
        }
@ CacheEvict @ Transactional public Void updateInfo ( UpdateInfoDTO dto ) { SysUser sysUser = super . lambdaQuery ( ) . eq ( SysUser :: getId , dto . getId ( ) ) . oneOpt ( ) . orElseThrow ( ( ) -> new BusinessException ( BusinessMsgState . DATA_NOT_FOUNT ) ) ; if ( ! ValidateUtil . isPhone ( dto . getPhone ( ) ) ) { throw new BusinessException ( BusinessMsgState . NOT_PHONE ) ; } sysUser . setPhone ( dto . getPhone ( ) ) ; sysUser . setGender ( dto . getGender ( ) ) ; sysUser . setNickName ( dto . getNickName ( ) ) ; super . savaOrUpdate ( sysUser ) ; return null ; }
personal center information modification
 @param dto dto
 @return {@link Void}
personal center information modification @param dto dto @return { @link Void }
// query whether the current user exists // non-mobile phone numbers are not allowed