v1.1.0
Changelog
✨ Features
-
API
- Add log settings management with auto-clear and clear days configuration.
- Add referral percentage and "only first purchase" fields to user model and requests.
- Add reset sort endpoints for server and node.
- Add sort field to server model.
- Add traffic log details filtering and enhance traffic log structures.
- Define
OnlineUsertype with SID and IP fields. - Enhance server and node management with new request/response structures.
- Enhance server status handling with protocol support and refactor related logic.
- Implement daily traffic ranking for users and servers with error handling.
- Implement sorting functionality for nodes and servers.
- Migrate server and node data handling; update related structures and logic.
- Refactor cache key handling for server and user lists.
- Standardize timestamp field across log structures.
- Update log filtering to use
ResetSubscribetype for subscription logs. - Update server total data response to use
OnlineUsersand implement daily traffic statistics logging.
-
Client
- Add
subscribe_template.
- Add
-
Database
- Update user table to add referral percentage and "only first purchase" fields.
-
Log
- Add
UserSubscribeIdtoFilterSubscribeLogRequestfor enhanced filtering. - Add endpoints for retrieving and resetting subscribe traffic logs.
- Add logging for balance, gift amount, and commission adjustments.
- Add
-
Middleware
- Enhance user agent handling by querying client list in
PanDomainMiddleware.
- Enhance user agent handling by querying client list in
-
Model
- Add user counts struct and update queries for new and renewal users.
-
OAuth
- Add user agent and IP logging to registration and login processes.
-
PanDomain
- Update subscription logic to use V2 handler for improved functionality.
-
Payment
- Add support for CryptoSaaS payment platform and enhance configuration handling.
-
Protocol
- Add server protocol configuration query and enhance protocol options.
-
Quota
- Add quota task creation and querying endpoints with updated data structures.
- Enhance quota task management with new request structures and processing logic.
-
Routes
- Add handler for scheduled traffic statistics.
-
Server
- Implement server deletion logic with error handling.
- Implement server management handlers and database schema.
-
Subscribe
- Add
Languagefield to subscription models and update query logic. - Add user agent limit configuration to system settings.
- Implement user agent limit feature with configurable list.
- Add
-
Subscription
- Add
Languageparameter toGetSubscriptionrequest and update query logic. - Implement
FilterListmethod for subscription queries and update related logic.
- Add
-
Tags
- Add endpoint to query all node tags.
-
Traffic
- Add traffic statistics logging and scheduling.
-
UserList
- Enhance
GetServerUserListLogicwith improved node and tag handling.
- Enhance
-
Delete common
GetSubscription.
🐛 Bug Fixes
-
Balance
- Add timestamp to balance logs for payment, refund, and recharge transactions.
- Update
QueryUserBalanceLogresponse structure to include balance log list.
-
Database
- Add sort column to nodes table.
-
Email
- Convert
RegisterStartTimeandRegisterEndTimetotime.Timefor accurate query filtering. - Set
EmailTypeVerifyin task payload and update content type conversion. - Update task handling to use generic task model and improve error logging.
- Update task progress handling to use specific task ID for updates.
- Convert
-
Filter
- Refactor node list creation to use append and remove duplicates from tags.
-
Log
- Add traffic reset logging for subscription resets.
- Change
MessageLoglist to use value type for improved performance and memory efficiency. - Correct category in log settings update query.
- Correct comment for
CommissionTypeRefundto improve clarity. - Fix empty date issue.
- Insert reset traffic log during subscription activation.
- Optimize user traffic rank data handling.
- Remove unused
Idfield fromSystemLog. - Rename
OrderIdtoOrderNofor consistency. - Replace magic number with constant for gift type.
- Update sorting logic for server and user subscribe traffic logs.
- Update timestamp handling in login and registration logs.
-
Login
- Remove debug logs and error logging during user login process.
-
Middleware
- Remove duplicate elements from user agent list in
PanDomainMiddleware.
- Remove duplicate elements from user agent list in
-
Migration
- Add index for traffic log on timestamp, user_id, and subscribe_id.
-
Model
- Correct filter condition to use 'date' instead of 'data'.
- Enhance user statistics queries with new order and renewal order counts.
-
Node
- Add
ServerIdandEnabledfields to node update logic.
- Add
-
Order
- Improve error logging for database transaction and user cache updates.
- Simplify commission handling and improve payload parsing logic.
- Update commission calculation to actual payment amount minus gateway handling fee.
-
Preview
- Add
Preloadparameter toFilterNodeList.
- Add
-
Purchase
- Streamline error handling and improve JSON marshaling for temporary orders.
-
Push
- Initialize
onlineUsersas a map inpushOnlineUsersLogic.
- Initialize
-
Quota
- Correct time range queries for start and expire times.
- Remove redundant quota task status endpoint from admin marketing routes.
- Update taskInfo to include current subscription count.
- Update time handling using
UnixMillifor start time. - Correct subscriber ID query.
-
Reset
- Initialize
subsas a map inclearCachemethod.
- Initialize
-
Server
- Add server status handling based on last reported time.
- Encode
ServerKeyin base64 and update last reported time for nodes.
-
Statistics
- Correct server traffic data assignment in
QueryServerTotalDataLogic. - Optimize server ranking and yesterday's top 10 server traffic data assignment.
- Correct server traffic data assignment in
-
Subscribe
- Ensure active status and reset timestamps during traffic resets.
- Improve error handling and logging for subscription requests.
- Remove duplicate user agents in
SubscribeHandler. - Rename variable for clarity; add special handling for Stash user agent.
- Update
Idfield tag to useprimaryKeyand improve model queries and save method. - Update delete method to use
Whereclause.
-
Traffic
- Adjust start date for traffic statistics and improve log deletion comment.
-
Types
- Change
Contentfield type inMessageLogtointerface{}. - Update plugin options to include 'none'.
- Change
-
User
- Correct placement of
DeepCopyfor user info update logic.
- Correct placement of
-
UserList
- Correct node ID assignment and update query logic for tag filtering.
-
Worker
- Update task completion status handling in worker logic.
🔨 Refactor
- Remove deprecated application-related endpoints and types.
- Rename
OnlineUsertoServerOnlineUserfor clarity. - Consolidate logging models and update related logic.
- Remove
Reset Subscribe Traffic Logendpoint and related types. - Simplify node and tag filtering using
InSetfunction. - Streamline query construction for tag filtering.
- Simplify server ranking data construction in
QueryServerTotalDataLogic. - Replace V2 handler with a unified handler method for subscription logic.
- Remove deprecated swagger checks and generation.
- Rename
queryannouncementhandler.gotoqueryAnnouncementLogic.go.
📝 Documentation
- Rename function for clarity and add cache cleanup comment.
✨ Others
- Develop (#76)
- Merge branch 'master' into develop
- Renew
README.mdandreadme_zh.md
What's Changed
- Develop by @LeifDraven in #76
Full Changelog: v1.0.5...v1.1.0