irving
8558d203af
wip: media migration progress
2025-11-16 11:33:58 -05:00
irving
69909a3b83
test: 依線上優先規則調整排序驗證
Build and Push Backend / docker (push) Failing after 6s
2025-11-14 19:37:14 -05:00
irving
d7754a66af
test: 明確驗證全組合排序
2025-11-14 19:31:53 -05:00
irving
dbf1832f75
test: 覆蓋大規模店員排序情境
2025-11-14 10:35:23 -05:00
irving
e10b7bd3be
feat: 線上優先排序並更新測試
2025-11-14 10:31:16 -05:00
irving
25554bac84
test: 修復店員排序測試與收益扣回即時解鎖
2025-11-14 01:25:06 -05:00
irving
cec5e965f6
feat: 完成撤销收益扣回與限額改動
2025-11-14 00:58:12 -05:00
irving
cc76710858
feat: guard revocation for normal orders
Build and Push Backend / docker (push) Failing after 5s
2025-11-13 15:46:09 -05:00
irving
b51aac0cfa
fix test
2025-11-13 14:58:05 -05:00
irving
ee0fc4d1f6
feat: unify admin order keyword search
2025-11-13 14:58:05 -05:00
irving
49867a30dd
fix: stabilize order api tests
Build and Push Backend / docker (push) Failing after 5s
2025-11-11 22:22:48 -05:00
irving
51c4a5438d
feat: improve wechat order query coverage
2025-11-11 20:48:20 -05:00
irving
e616dd6a13
WIP
2025-11-10 23:42:00 -05:00
irving
ed0edf584a
Merge branch 'feat/performance-filtering'
2025-11-10 22:39:31 -05:00
irving
b9250566fb
test: cover clerk performance date ranges
2025-11-10 22:33:27 -05:00
irving
7b6943d391
fix: allow editing blind box pools referencing inactive gifts
Build and Push Backend / docker (push) Failing after 7s
2025-11-10 21:59:59 -05:00
irving
4fdcf6ddbd
fix test
Build and Push Backend / docker (push) Failing after 6s
2025-11-08 20:31:30 -05:00
irving
7d07e32271
feat: enrich withdrawal audit info
2025-11-08 20:09:07 -05:00
irving
438aef7af7
fix: ignore null level prices when updating commodity
2025-11-08 20:06:15 -05:00
irving
eaee5f5aa6
Merge branch 'feat/earnling-line-status'
Build and Push Backend / docker (push) Failing after 5s
2025-11-07 23:42:43 -05:00
irving
51ec9dd85b
完善后台订单筛选及接口测试
2025-11-07 23:42:15 -05:00
irving
9868fb1bb9
feat: 新增提现审计接口与保障用例
2025-11-07 23:41:39 -05:00
irving
d7d7c64c01
fix: exclude cancelled orders from performance stats
Build and Push Backend / docker (push) Failing after 4s
2025-11-07 00:29:58 -05:00
irving
a8cdb27e8e
新增店员等级排序功能
...
Build and Push Backend / docker (push) Failing after 6s
- 添加数据库迁移脚本,为 play_clerk_level_info 表新增 order_number 字段
- 更新测试数据种子,设置默认等级的排序号
- 新增店员用户API测试,验证按等级排序号和在线状态的排序逻辑
2025-11-04 21:20:42 -05:00
irving
da2902c61c
重构:优化订单通知消息标签,支持动态显示订单类型
...
- 新增 OrderMessageLabelResolver 用于解析订单场景标签
- 修改微信公众号下单通知,根据下单类型(随机单/指定单/打赏/礼物)显示对应标签
- 更新 WxCustomMpService 接口,传递 placeType 和 rewardType 参数
- 完善相关单元测试和 Mock 配置
2025-11-03 22:51:48 -05:00
irving
83112b406a
修复订单下单错误和余额扣款校验问题
Build and Push Backend / docker (push) Failing after 5s
2025-11-03 10:02:03 -05:00
irving
c463179e83
fix(order): 前置余额扣减并统一金额精度处理,补充余额校验与单测
...
- 抽取 validateSufficientBalance,统一使用 normalizeMoney 校验与比较,提升健壮性\n- AbstractOrderPlacementStrategy:在创建订单前根据 shouldDeduct 进行余额校验与扣减,使用上下文 orderId 记录流水,避免不一致\n- deductCustomerBalance:使用 amountToDeduct 变量并先归一化后运算,修正可能的精度问题\n- 调整/补充测试用例:扣减失败不插入订单、不保存用户信息;更新 selectById 调用次数校验
2025-11-02 16:03:59 -05:00
irving
79b516d81c
test: 添加微信端优惠券、订单评价、订单管理和提现的API测试
...
Build and Push Backend / docker (push) Failing after 5s
新增四个API集成测试类:
- WxCouponControllerApiTest: 测试优惠券领取、查询、使用限制和白名单逻辑
- WxCustomOrderEvaluationApiTest: 测试订单评价创建和查询功能
- WxOrderInfoControllerApiTest: 测试随机订单接单、续单申请和隐私字段处理
- WxWithdrawControllerApiTest: 测试收益余额查询、提现申请和收益明细过滤
提高微信端核心业务流程的测试覆盖率
2025-11-02 10:32:16 -05:00
irving
d01c8a4c6a
feat(wechat): 抽象通知发送器并完善自定义下单相关接口测试
2025-11-01 23:55:51 -04:00
irving
9f83103189
feat(order): 完善订单生命周期与投诉处理;补充单元测试
2025-11-01 23:55:47 -04:00
irving
60b4b0bd49
feat(shop): 优化商品与优惠券逻辑;修复礼品相关映射;补充接口测试
2025-11-01 23:55:41 -04:00
irving
c7684e3199
Merge branch 'api-test-1'
...
Build and Push Backend / docker (push) Failing after 5s
API test first run
2025-11-01 15:18:03 -04:00
irving
04b9960e35
API-test-in-progress
2025-11-01 15:16:45 -04:00
irving
b1fd515fb3
feat(order): 新增管理端完成订单能力(店员端触发)
...
Build and Push Backend / docker (push) Failing after 6s
- OrderConstant 新增角色 GROUP_LEADER、触发源 WX_CLERK_MGMT;补充映射
- IPlayOrderInfoService 新增 completeOrderByManagement 方法
- PlayOrderInfoServiceImpl:校验权限(仅运营/组长,组长仅限本组);ACCEPTED 自动切换为 IN_PROGRESS 后完成;抽取 completeOrderInternal;完善 GROUP_LEADER 的 Actor/Source 映射
- WxClerkController 新增 POST /wx/clerk/order/complete 接口,支持备注参数
- 新增请求体 PlayOrderCompleteVo
- 新增单测 PlayOrderInfoServiceImplTest 覆盖核心流程与边界
2025-11-01 15:07:59 -04:00
irving
f3480b6ba0
feat(apitest): 新增 API 测试环境与安全配置
...
- 新增 apitest 专用 MySQL 配置与 Docker 编排(docker/apitest-mysql.yml、docker/apitest-mysql/)
- 增加 ApiTestSecurityConfig / ApiTestSecurityProperties 与 ApiTestAuthenticationFilter
- 新增 application-apitest.yml 与相关测试目录(play-admin/src/test/java/com/starry/admin/api/)
- 调整根 pom 与 play-admin/pom 依赖,优化 SpringSecurityConfig 以兼容 apitest
2025-11-01 10:33:54 -04:00
irving
8f89955405
fix: fix performance salary calculation
Build and Push Backend / docker (push) Failing after 6s
2025-10-31 21:31:56 -04:00
irving
e7ccadaea0
refactor: 盲盒功能代码优化和完善
...
修复和改进:
- 修复字段映射:blind_box_gift_id -> blind_box_id
- 移除不必要的 @Version 乐观锁字段
- 优化 Mapper 方法:统一使用 listActiveEntries,简化查询逻辑
- 新增客户端接口:盲盒购买、奖励查询和兑现
- 增强权限校验:奖励兑现时验证客户身份
- 完善单元测试:增加客户身份验证测试用例
- 代码格式化:调整 import 顺序,优化代码结构
客户端 API:
- GET /wx/blind-box/config/list - 查询可用盲盒列表
- POST /wx/blind-box/order/purchase - 购买盲盒
- GET /wx/blind-box/reward/list - 查询我的盲盒奖励
- POST /wx/blind-box/reward/{id}/dispatch - 兑现盲盒奖励
其他优化:
- 增强 SQL 查询安全性,添加 deleted 字段过滤
- 优化店员提成计算逻辑
- 改进参数可选性(levelId 参数改为可选)
2025-10-31 02:48:03 -04:00
irving
422e781c60
feat: 实现盲盒功能模块
...
新增功能:
- 盲盒配置管理:支持盲盒的创建、编辑、上下架
- 盲盒奖池管理:支持奖池配置、Excel导入、权重抽奖、库存管理
- 盲盒购买流程:客户购买盲盒并抽取奖励
- 奖励兑现流程:客户可将盲盒奖励兑现为实际礼物订单
- 店员提成:奖励兑现时自动增加店员礼物提成
核心实现:
- BlindBoxService: 抽奖核心逻辑,支持权重算法和库存扣减
- BlindBoxDispatchService: 奖励兑现订单创建
- BlindBoxInventoryService: 奖池库存管理
- BlindBoxPoolAdminService: 奖池配置管理,支持批量导入
API接口:
- /play/blind-box/config: 盲盒配置CRUD
- /play/blind-box/pool: 奖池配置管理和导入
- /wx/blind-box: 客户端盲盒购买和奖励查询
数据库变更:
- blind_box_config: 盲盒配置表
- blind_box_pool: 盲盒奖池表
- blind_box_reward: 盲盒奖励记录表
- play_order_info: 新增 payment_source 和 source_reward_id 字段
其他改进:
- 订单模块支持盲盒支付来源,区分余额扣款和奖励抵扣
- 优惠券校验:盲盒相关订单不支持使用优惠券
- 完善单元测试覆盖
2025-10-31 02:46:51 -04:00
irving
c9439e1021
test: 补充优惠券库存相关单测
Build and Push Backend / docker (push) Failing after 6s
2025-10-31 00:10:40 -04:00
irving
48bdc9af33
重构收益与优惠券逻辑:统一使用 orderAmount,新增优惠券状态校验与过滤
...
- IPlayOrderInfoService/PlayOrderInfoServiceImpl/ClerkRevenueCalculator 将参数 finalAmount 更名为 orderAmount,避免语义混淆
- 预计收益计算兼容 null 与 0,防止 NPE 并明确边界
- 结算/回填:EarningsServiceImpl、EarningsBackfillServiceImpl 改为使用 orderMoney 兜底;0 金额允许,负数跳过
- 新增枚举:CouponOnlineState、CouponValidityPeriodType 用于券上下架与有效期判定
- IPlayCouponInfoService/Impl 增加 getCouponDetailRestrictionReason,支持已使用/过期/下架等状态校验
- WxCouponController 列表与下单查询增加状态/有效期/库存/白名单过滤逻辑
- OrderLifecycleServiceImpl 下单时校验优惠券状态,预计收益入参从 finalAmount 调整为 orderMoney
- 完善单元测试:订单生命周期、优惠券过滤、收益生成与回填等覆盖
2025-10-30 22:07:37 -04:00
irving
e29c5db276
重构订单下单逻辑,引入策略模式和命令模式
...
- 为OrderTriggerSource枚举添加详细注释说明
- 将IOrderLifecycleService接口的initiateOrder方法重构为placeOrder
- 新增OrderPlacementCommand、OrderPlacementResult、OrderAmountBreakdown等DTO
- 实现订单下单策略模式,支持不同类型订单的差异化处理
- 优化金额计算逻辑,完善优惠券折扣计算
- 改进余额扣减逻辑,增强异常处理
- 更新相关控制器使用新的下单接口
- 完善单元测试覆盖,确保代码质量
2025-10-30 21:12:37 -04:00
irving
7db9318a7b
feat: 完善订单生命周期幂等与日志追踪
2025-10-28 23:24:33 -04:00
irving
6dba6464f9
refactor(clerk-performance):make better performance analysis
Build and Push Backend / docker (push) Failing after 6s
2025-10-27 23:35:17 -04:00
irving
1ec92cc2ab
WIP
2025-10-27 22:53:40 -04:00
irving
6b2a1c2ba7
fix: correct order lifecycle refunds and add coverage
Build and Push Backend / docker (push) Failing after 5s
2025-10-27 00:12:07 -04:00
irving
8ece45da28
新增订单强制取消功能
...
- 新增管理后台强制取消进行中订单接口
- 实现已接单/服务中订单强制取消业务逻辑
- 支持自定义退款金额,默认退回全额支付金额
- 新增订单强制取消请求VO类及参数校验
- 新增单元测试验证强制取消功能的正确性
- 更新服务接口定义及文档注释
2025-10-25 12:15:26 -04:00
irving
08c0e2f7b1
test: format CouponWhitelistTest imports to satisfy Spotless
Build and Push Backend / docker (push) Failing after 5s
2025-10-07 00:04:47 -04:00
irving
5a50114b59
Refactor order creation with Builder pattern and type-safe enums
...
- Replace 20+ parameter method calls with Builder pattern in WxCustomController
- Add RewardType and CommodityType enums with database compatibility
- Update DTOs and service layer for enum conversion
- Fix all test cases with proper enum usage
- Ensure backward compatibility through service layer conversion
2025-09-06 23:20:44 -04:00
irving
295400b83e
重构订单创建逻辑:采用Builder模式替代20+参数方法
...
主要改进:
- 新增OrderCreationRequest及相关DTO类,使用Builder模式提升代码可读性
- 引入类型安全的枚举类OrderConstant,替代魔法字符串常量
- 重构PlayOrderInfoServiceImpl,新增基于Builder模式的createOrderInfo方法
- 保留原有方法并标记为@Deprecated,确保向后兼容性
- 完善单元测试覆盖,包含Mockito模拟和边界条件测试
- 优化包结构,将DTO类从vo包迁移到dto包
- 添加JUnit 5和Mockito测试依赖
- 移除实体类过度使用的Lombok注解,改用精简的自定义构造器
- 新增数据库开发工作流程文档
技术栈:
- Spring Boot 2.7.9
- MyBatis-Plus 3.5.3.2
- JUnit 5 + Mockito
- Lombok Builder模式
- 类型安全枚举设计
2025-09-06 22:58:14 -04:00