luoweijian
dc8aadabb8
feat(customer): 票09-13 客户模块收尾(超期提醒/公海回收/saved-view/成员/关注/接口文档)+ 票14 review 修复
- 票09 跟进超期提醒:crm-rule 提醒配置端点(GET/PUT /api/rule/customer/reminder)
+ CustomerPendingNotice 待发作业;公海回收(超过领取时限自动回收)
- 票10 workspace saved-view 过滤器接入(customer.overview/mine/pool 三 scope)
+ FOCUSED 内置视图 + 列偏好联动
- 票11 商机侧硬依赖真实现:CustomerOpportunityQueryPort(pageByCustomer)
+ hasActiveOpportunity 守卫 + OpportunityOwnerSyncPort(归属变更联动商机)
- 票12 不符②③④⑤修复:成员管理写端点(MEMBER_ADD/REMOVE,两阶段整批校验)/
关注+重点标记(customer_focus 一行两态:行存在=关注、starred=重点,focus/unfocus/star/unstar/focus-batch)/
详情汇总卡 5 字段占位恒 null(grill Q18 契约)/ oplog action 筛选
- 票13 API-SUMMARY.md:9 Controller 55 端点按原型 14 界面分组 + 错误码 67001-67016 + 已知缺口 5 项
- 票14 code-review(Standards+Spec 双轴)修复:removeMember 补 @Transactional /
OpportunityMapper 两查询补 o.deleted=0 口径对齐 / CustomerFocusServiceImpl 去 implements Constants 改静态引用 /
TEMPLATE_NAME 上移 ICustomerImportService / API-SUMMARY 补 release-pool-batch
- 验证:三模块回归 521/0/0 + 全仓 BOM 扫描 688 文件零命中 + 8080 冒烟全链 code=0(starred 逐拍实锤)
3 days ago
luoweijian
915edfdb9a
feat(opportunity-board): group board by stage display name, drop status filter
- rule: validate display-name uniqueness within a template version on publish (64017)
- rule: add describeStageNames / resolveStageIdsByDisplayName batch contracts
- opportunity: board stops filtering by advancing(2), rows with current_stage_id go on board
- opportunity: boardStageSummary groups by display name, ordered full/empty viewport columns
- opportunity: boardCards takes stageName and returns oppStatus
- tests: rule unit tests + opportunity service tests + H2 board integration test
- docs: sync board Bruno collection (stageName param, oppStatus field, drop stageId)
6 days ago
luoweijian
042401c57b
feat(opportunity): 票11/12/13 线索转商机新建端口实现 + ADR-0029 技术债
实现 crm-lead 的 outbound port OpportunityCreationPort(此前定义未实现,
根因是 crm-opportunity 未依赖 crm-lead):
- OpportunityCreationPortImpl(同库同事务,ADR-0020):
· 票12 source_lead_id 唯一性预检(应用层友好报错 + DB uk 并发最终防线,
DuplicateKeyException 转译为 OpportunityCreationException)
· 票11 建商机主表:初始推进中(2) + 落归属/来源快照 + claimTime
· 票13 customerId 非空 → 建 is_primary_intended=1 主要意向客户子表 +
刷主表冗余 primary_customer_id/name(走法甲:customerId 可空则跳过,
不倒退现有自由文本转商机)
- 5 单测:唯一性命中/带客户建子表刷冗余/无客户跳过/初始态快照/并发uk转译
- crm-opportunity/pom.xml 依赖 crm-lead
- ADR-0029 记技术债:下游反向依赖上游,埋循环依赖雷(crm-lead 将来读商机即死循环),
当前同库单体阶段可接受,触发条件出现时改抽共享 port 契约模块并 supersede
省市 TODO:cmd 单 regionCode → 主表 province/city 两列 not null,暂同填占位,
待省市拆分专票。mvn -pl crm-opportunity -am test 152 全绿。
2 weeks ago
luoweijian
ecc3c49636
feat(opportunity): 票 03 商机主表落地(Opportunity 实体 + 5 态枚举 + Mapper 骨架)
TDD 三切片(红→绿各一轮,19 测试全绿):
- OpportunityStatus:轴 1 归属流转 5 态枚举(1待领取/2推进中/3暂缓中/4已关闭/5已转项目),
implements HasValueEnum<Integer>;只钉值域,迁移逻辑归票 04
- Opportunity:主表实体(票 03 三簇 + Amendment 1),同构 crm-lead/Lead 写法
* 簇 A 业务字段 12 列(含 project_amount decimal(14,2) 选填,Amendment 1)
* 簇 B 归属三层(owner_user_id/owner_dept_id/origin_dept_id)+ 两轴落点
(opp_status/current_stage_id/stage_template_id+版本号冗余)+ 来源快照 4 列
+ 单计时器 claim_time/last_valid_follow_time
* C3 主客户冗余快照 2 列、暂缓附加 4 列落主表(E4 写/E5 清空)
* 乐观锁 @Version version=0(切主客户票 13 / 状态 CAS 票 04 复用,接线归后续票)
* @DataScope(module=opportunity, owner_user_id, owner_dept_id)——module 已在
crm-auth DataInitializer 预注册,不触发 ADR-0006 启动拒绝
* 索引:UNIQUE(source_lead_id) + (owner_user_id,opp_status) + (owner_dept_id,opp_status)
* 不建:pool_id/dept_id/recycle_deadline/expected_deal_date(票 05/10 定稿排除)
- OpportunityMapper:骨架 extends CrmBaseMapper(同构 LeadMapper)
- 模块装配:根 pom modules/dependencyManagement + crm-app 聚合依赖
- CONTEXT.md 待细化小节勾销主表项
边界守住:子表归 07/08/09,customerId 契约归 11,关联客户表归 13,均未触碰。
验证:全量 BOM 扫描 0 命中;全反应堆 clean test 9 模块 SUCCESS。
2 weeks ago
luoweijian
b345c4dc7b
commit
3 weeks ago
luoweijian
ab9f64483c
refactor(crm-dict): judgement call #6 #7 — pom version extraction + VO independent fields
#6 mybatis-spring 版本提取到父 pom:
- 父 pom properties 新增 mybatis-spring.version=3.0.3
- 父 pom dependencyManagement 新增 mybatis-spring 依赖声明
- crm-dict/pom.xml 去掉 version 和 scope=compile(由父 pom 统一管理)
#7 VO extends 实体重构为独立字段:
- DictGroupVO:不 extends DictGroup,独立定义 9 个字段(排除审计字段和软删内部字段)
- DictItemVO:不 extends DictItem,独立定义 14 个字段
- DictGroupServiceImpl:DictGroup::getId -> DictGroupVO::getId(fillItemCount)
- DictItemServiceImpl:DictItem::getGroupId -> DictItemVO::getGroupId(enrich)
- DictGroupServiceTest:pageGroups 断言 DictGroup::getCode -> DictGroupVO::getCode
全量 48/48 测试通过。
1 month ago
luoweijian
3d55eeb196
feat(dict): data dictionary module — two-level flat model, CRUD/default/cache/permission/seed (ADR-0015)
- 4 tables (dict_group/dict_item/dict_group_default/dict_ref_count), delete_key soft-delete reuse
- DictGroup/DictItem full CRUD + force-delete + status toggle + enabled-list
- DictReferenceService: increment/decrement/batchApply/isReferenced, same-tx ref_count, no cache
- DictQueryService: Caffeine 10s cache + 2s negative cache for empty results, group.status join
- Default item: INSERT ON DUPLICATE KEY UPDATE, hibernate on group disable, auto-restore
- Permission seeds: 10 perm codes → sys_menu tree, bound to ROLE_ADMIN, no crm-auth import
- Built-in dict initializer: idempotent upsert, builtin=false never touched (US-41), value not overwritten
- 48 tests pass; full project compiles
1 month ago
luoweijian
8c4ebb4827
feat(crm-auth): Ticket 04 — 图标上传
- POST /api/resources/icon/upload(multipart/file)
- 格式校验:只允许 png/jpg/jpeg/gif/svg/webp
- 大小校验:≤500KB
- 调 crm-file FileApi 上传到 MinIO(bizDomain=resources/icon)
- 返回 FileInfoDTO(含 fileId)
- crm-auth pom.xml 加 crm-file 依赖
- TDD: 36 个单测,114 tests 全绿
1 month ago
luoweijian
73304b7734
commit
1 month ago
luoweijian
6329a6ba74
first-commit
1 month ago