# -*- coding: utf-8 -*- """票 04:验证 fat jar 内嵌模块 jar 的新 toEntity 修复。 判别依据:OpportunityCustomerAddDTO.class 须含 'setOpportunityId' 字符串常量 (旧版纯 BeanUtils.copyProperties 无此方法引用)。""" import io, sys, os, time, zipfile sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') jar = r'e:\code\crm-backend-matt\crm-app\target\crm-app-1.0.0-SNAPSHOT.jar' print('fat jar mtime =', time.strftime('%m-%d %H:%M:%S', time.localtime(os.stat(jar).st_mtime))) z = zipfile.ZipFile(jar) nested = [n for n in z.namelist() if n.startswith('BOOT-INF/lib/crm-opportunity-')] print('[nested]', nested) inner = zipfile.ZipFile(z.open(nested[0])) names = [n for n in inner.namelist() if 'OpportunityCustomerAddDTO' in n] print('[dto entries]', names) data = inner.read(names[0]) fixed = b'setOpportunityId' in data print(f'dto class size={len(data)} contains setOpportunityId = {fixed}') print('VERDICT:', 'NEW-JAR-WITH-FIX' if fixed else 'OLD-JAR-FIX-MISSING')