270 Commits

Author SHA1 Message Date
Anyon
f9da55e1b9 fix: 升级 layui 版本到 2.13.5 2026-03-18 13:08:11 +08:00
邹景立
8510c65124 fix: 完善 str2arr/arr2str 白名单匹配与空白处理 2026-03-04 13:52:46 +08:00
邹景立
87a69e2633 fix(wemall): 兼容 MySQL 5.7 的 CHECK 约束语法
- 新增 executeModifyWithCheck 统一处理 MODIFY + CHECK 语句
- 新增 supportsCheckConstraint 按数据库版本判断是否支持 CHECK
- MySQL < 8.0.16 / MariaDB < 10.2.1 时自动跳过 CHECK,仅执行 MODIFY
- 缓存版本检测结果,避免循环内重复查询数据库版本
2026-03-03 22:07:12 +08:00
邹景立
f040b20da3 fix(wechat): 修复网页授权登录在空查询参数下的 parse_str 类型报错
- getWebOauthInfo 中先解析 query 再做字符串兜底
- 避免 source 无 query 时 parse_str 接收 null/false 导致 TypeError
- 保持原有 code/rcode/state 参数解析逻辑不变
2026-03-03 22:06:58 +08:00
邹景立
283aab3e0d fix: 修改 ini_set 第二参数为 string 类型 2026-03-03 21:39:29 +08:00
Anyon
94121a014a fix: 修改 ini_set 第二参数为 string 类型 2026-03-02 18:02:04 +08:00
Anyon
c6c3184f73 fix(think-library): trace_file 参数类型改为 Throwable 以兼容 PHP Error
- 将 trace_file() 参数类型由 Exception 改为 \Throwable
- 解决 Library::load() 等处捕获 Error 时传入 trace_file 触发的 TypeError
- PHP 7+ 中 Error 与 Exception 均实现 Throwable,可统一记录到 trace 文件

Made-with: Cursor
2026-02-27 09:20:22 +08:00
Anyon
d5e9524a89 fix: Normalize README formatting and punctuation
Standardize README files: update think-library header to 'ThinkLibrary for ThinkAdmin', bold numbered feature headings for clarity, and normalize punctuation/line endings across multiple plugin READMEs (think-plugs-account, think-plugs-center, think-plugs-helper, think-plugs-payment, think-plugs-wechat, think-plugs-wemall, think-plugs-worker, think-plugs-wuma) for consistent style and readability.
2026-02-03 14:41:01 +08:00
邹景立
34104dad22 Update plugin headers and add rewrite-model script
Replace header text "Payment Plugin for ThinkAdmin" with "ThinkAdmin Plugin for ThinkAdmin" across project files (configs, controllers, plugins, php-cs-fixer, etc.) to unify branding. Add a new composer script "rewrite-model" to regenerate models and run php-cs-fixer. Also apply a minor newline fix in .copilot-commit-message-instructions.md.
2026-02-01 14:24:36 +08:00
邹景立
63523902db style: 为插件新增 .php-cs-fixer 配置
在多个插件目录(包括 plugin/think-library 及多个 think-plugs-*)新增 .php-cs-fixer.php 文件以统一 PHP 代码风格和头部注释。配置启用严格类型声明、并行运行、常用规则集(@PSR2/@Symfony/@PhpCsFixer 等)以及若干自定义规则,便于代码格式统一与自动修复;同时调整了 .copilot-commit-message-instructions.md 的换行样式。
2026-02-01 14:18:47 +08:00
邹景立
d2b499d14a refactor: 使用 BC Math 替换浮点运算以提高精度
将多处基于浮点的数值计算替换为 BC Math 字符串运算以避免浮点精度问题,涉及支付、退款、转账、比较与统计逻辑的重构。主要改动包括:

- 将比较与判断替换为 bccomp,累加与合并使用 bcadd,乘以 100 等使用 bcmul;
- 将部分初始数值与统计结果从数值类型改为字符串形式(如 '0.00'),并调整相关返回类型(如 Payment::paidAmount 改为返回 string);
- 修正订单/退款金额计算与超额校验逻辑以使用高精度算术;
- 更新微信支付相关 SDK 调用中金额乘 100 的计算以避免精度误差;
- 在若干插件中用高精度运算替换 floatval/int 转换(包括 SystemQueue、Wemall、Wuma 等);
- 更新文档(readme)添加 BC Math/高精度计算等说明并统一版权年份至 2014-2026;
- 新增 .copilot-commit-message-instructions.md(提交信息规范)。

此改动旨在增强金融/金额相关业务的计算正确性与一致性,避免因浮点运算导致的金额误差。
2026-02-01 13:27:10 +08:00
邹景立
987ad41765 fix: Add .php-cs-fixer.php and update many files
Add PHP CS Fixer configuration (.php-cs-fixer.php) to enforce coding style and apply corresponding updates across the codebase. Numerous plugins (think-library and many think-plugs-*) and core config files (cache, database, phinx, worker) were updated along with controllers, services, models, storage adapters, helpers and tests to conform to style fixes and minor compatibility/refactors.
2026-02-01 02:01:37 +08:00
邹景立
6b3e985747 fix: Use BC Math for payments; fix wemall; add docs
Convert monetary/integral fields to string and switch arithmetic to BC Math to avoid floating-point errors; adjust return types to strings where appropriate (Balance, Integral, PaymentUsageTrait, IntegralPayment). Add input validation and safer comparisons in payment checks. Fix wemall logic and typos (early return for canceled/refunded orders, rename/logic fixes in UserRebate, initialize temporary $code variables, correct timestamp field name, adjust reward calculations to use bcmath, change wRebate signature). Add a database migration to enforce constraints, add new columns and indexes for wemall and payment tables. Also add business-feature documentation blocks across multiple plugin README files and update the project README.
2026-02-01 01:30:19 +08:00
Anyon
6bfa89f741 fix: 修正php8.5环境下的警告信息 2026-01-03 13:40:48 +08:00
邹景立
39f021fd88 fix: 升级 layui 版本到 2.13.3 2026-01-01 11:30:12 +08:00
Anyon
eed59e2413 fix: 更新文件加载 2025-12-30 16:52:45 +08:00
邹景立
9e012b9444 fix: 更新语言包 2025-11-21 21:52:49 +08:00
邹景立
7b56fd0522 fix: 升级 layui 版到 2.13.2 2025-11-21 21:45:30 +08:00
Anyon
e49fa0ac4e fix: 完善并增加多语言包 2025-11-17 12:37:22 +08:00
Anyon
2d3a9b5ef9 fix: 修复重复文件清理工具 2025-11-17 12:36:08 +08:00
Anyon
0297d3dfd5 fix: 更新layui版本到 2.13.0 2025-10-24 13:42:47 +08:00
Anyon
9ebdd2d7aa fix: 更新 layui 版本到 v2.12.0 2025-09-30 16:07:22 +08:00
Anyon
0c057fedb3 fix: 更新 layui 版本到 2.11.6 2025-09-06 16:23:52 +08:00
Anyon
6dc286a945 fix: 修复用户编号时的异常,不指令类型 2025-08-23 13:42:01 +08:00
邹景立
eacfd5c089
Merge pull request #14 from jonesshen/master
fix: 修复手机短信管理业务场景字段的模板处理问题
2025-08-21 20:11:57 +08:00
邹景立
acb2b05c26 fix: 进一步完善数据库同步工具包
fix: 修正代码注释

This reverts commit 373427a539459a7abe17479e89ed9d9d353fff67.
2025-08-17 22:20:59 +08:00
邹景立
71c4d6f7d1 fix: 优化查询器异常处理 2025-08-17 22:06:16 +08:00
邹景立
8ff44eea2f fix: 增加 _query 和 _vali 快捷方法 2025-08-17 22:05:39 +08:00
邹景立
62c838492f fix: 更新数据字段 name 索引了过长的问题 2025-08-16 22:12:52 +08:00
邹景立
f71d2d289d Update PhinxExtend.php 2025-08-16 00:17:06 +08:00
邹景立
47b93ca03a fix: 更新数据库同步脚本索引长度处理 2025-08-16 00:10:04 +08:00
邹景立
7cf5ba2c66 fix: 增加 longtext 长度处理 2025-08-15 23:22:20 +08:00
Jone Shen
9d0f3e852b fix: 修复手机短信管理业务场景字段的模板处理问题 2025-08-12 17:45:27 +08:00
Anyon
daedce4b9b fix: 更新 layui 版 2.11.5 2025-07-30 08:35:32 +08:00
Anyon
b37fb81c64 fix: 增加微信开放平台测试专用号 2025-07-08 11:04:48 +08:00
Anyon
b6b72371e6 fix: 更新 layui 版到 2.11.4 2025-07-03 09:18:52 +08:00
邹景立
861b299edb fix: 更新登录页面样式 2025-06-13 14:19:58 +08:00
邹景立
9b0d2b0426 fix: 更新 layui 版本到 2.11.2 2025-05-16 08:23:47 +08:00
邹景立
1e88916489 Update readme.md 2025-05-12 15:30:34 +08:00
邹景立
681b5decf8 Update readme.md 2025-05-08 21:53:04 +08:00
邹景立
b4eda5776c fix: 修改注释 2025-05-08 21:47:55 +08:00
邹景立
77157ba79b fix: 更新 layui 版本为 2.11.1 2025-05-06 23:54:47 +08:00
邹景立
6c312ac76e fix: 修复一处模板调用问题。 2025-05-06 23:52:36 +08:00
邹景立
32af86dd76 fix: 修改返利配置模板 2025-05-04 09:24:24 +08:00
邹景立
7260939674 同上 2025-05-04 09:14:02 +08:00
邹景立
2fc4fc3ae2 fix: 修改优化模板文件 2025-05-04 09:12:45 +08:00
邹景立
8fe550f83f fix: 样式扩展增加显示商品属性的方法 2025-05-03 12:36:23 +08:00
邹景立
7cbf6e6163 fix: 修正公众号切换显示异常 2025-05-03 12:20:42 +08:00
邹景立
324adce37e fix: 优化任务进度样式 2025-05-03 12:02:40 +08:00
邹景立
c18a05d05b fix: 升级 layui 版到 2.11.0 2025-05-03 12:02:17 +08:00