This commit is contained in:
2025-09-30 17:44:18 +08:00
parent 898339fd5d
commit f4b7e6e2df
393 changed files with 4530 additions and 2061 deletions

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminApiRowsExpectAutoSet = strings.Join(stringx.Remove(adminApiFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminApiRowsWithPlaceHolder = strings.Join(stringx.Remove(adminApiFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminApiIdPrefix = "cache:hm:adminApi:id:"
cacheHmAdminApiApiCodePrefix = "cache:hm:adminApi:apiCode:"
cacheHmAdminApiIdPrefix = "cache:tydata:adminApi:id:"
cacheHmAdminApiApiCodePrefix = "cache:tydata:adminApi:apiCode:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,9 +27,9 @@ var (
adminDictDataRowsExpectAutoSet = strings.Join(stringx.Remove(adminDictDataFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminDictDataRowsWithPlaceHolder = strings.Join(stringx.Remove(adminDictDataFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminDictDataIdPrefix = "cache:hm:adminDictData:id:"
cacheHmAdminDictDataDictTypeDictLabelPrefix = "cache:hm:adminDictData:dictType:dictLabel:"
cacheHmAdminDictDataDictTypeDictValuePrefix = "cache:hm:adminDictData:dictType:dictValue:"
cacheHmAdminDictDataIdPrefix = "cache:tydata:adminDicttydata:id:"
cacheHmAdminDictDataDictTypeDictLabelPrefix = "cache:tydata:adminDicttydata:dictType:dictLabel:"
cacheHmAdminDictDataDictTypeDictValuePrefix = "cache:tydata:adminDicttydata:dictType:dictValue:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminDictTypeRowsExpectAutoSet = strings.Join(stringx.Remove(adminDictTypeFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminDictTypeRowsWithPlaceHolder = strings.Join(stringx.Remove(adminDictTypeFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminDictTypeIdPrefix = "cache:hm:adminDictType:id:"
cacheHmAdminDictTypeDictTypePrefix = "cache:hm:adminDictType:dictType:"
cacheHmAdminDictTypeIdPrefix = "cache:tydata:adminDictType:id:"
cacheHmAdminDictTypeDictTypePrefix = "cache:tydata:adminDictType:dictType:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminMenuRowsExpectAutoSet = strings.Join(stringx.Remove(adminMenuFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminMenuRowsWithPlaceHolder = strings.Join(stringx.Remove(adminMenuFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminMenuIdPrefix = "cache:hm:adminMenu:id:"
cacheHmAdminMenuNamePathPrefix = "cache:hm:adminMenu:name:path:"
cacheHmAdminMenuIdPrefix = "cache:tydata:adminMenu:id:"
cacheHmAdminMenuNamePathPrefix = "cache:tydata:adminMenu:name:path:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminPromotionLinkRowsExpectAutoSet = strings.Join(stringx.Remove(adminPromotionLinkFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminPromotionLinkRowsWithPlaceHolder = strings.Join(stringx.Remove(adminPromotionLinkFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminPromotionLinkIdPrefix = "cache:hm:adminPromotionLink:id:"
cacheHmAdminPromotionLinkUrlPrefix = "cache:hm:adminPromotionLink:url:"
cacheHmAdminPromotionLinkIdPrefix = "cache:tydata:adminPromotionLink:id:"
cacheHmAdminPromotionLinkUrlPrefix = "cache:tydata:adminPromotionLink:url:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminPromotionLinkStatsHistoryRowsExpectAutoSet = strings.Join(stringx.Remove(adminPromotionLinkStatsHistoryFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminPromotionLinkStatsHistoryRowsWithPlaceHolder = strings.Join(stringx.Remove(adminPromotionLinkStatsHistoryFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminPromotionLinkStatsHistoryIdPrefix = "cache:hm:adminPromotionLinkStatsHistory:id:"
cacheHmAdminPromotionLinkStatsHistoryLinkIdStatsDatePrefix = "cache:hm:adminPromotionLinkStatsHistory:linkId:statsDate:"
cacheHmAdminPromotionLinkStatsHistoryIdPrefix = "cache:tydata:adminPromotionLinkStatsHistory:id:"
cacheHmAdminPromotionLinkStatsHistoryLinkIdStatsDatePrefix = "cache:tydata:adminPromotionLinkStatsHistory:linkId:statsDate:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminPromotionLinkStatsTotalRowsExpectAutoSet = strings.Join(stringx.Remove(adminPromotionLinkStatsTotalFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminPromotionLinkStatsTotalRowsWithPlaceHolder = strings.Join(stringx.Remove(adminPromotionLinkStatsTotalFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminPromotionLinkStatsTotalIdPrefix = "cache:hm:adminPromotionLinkStatsTotal:id:"
cacheHmAdminPromotionLinkStatsTotalLinkIdPrefix = "cache:hm:adminPromotionLinkStatsTotal:linkId:"
cacheHmAdminPromotionLinkStatsTotalIdPrefix = "cache:tydata:adminPromotionLinkStatsTotal:id:"
cacheHmAdminPromotionLinkStatsTotalLinkIdPrefix = "cache:tydata:adminPromotionLinkStatsTotal:linkId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminPromotionOrderRowsExpectAutoSet = strings.Join(stringx.Remove(adminPromotionOrderFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminPromotionOrderRowsWithPlaceHolder = strings.Join(stringx.Remove(adminPromotionOrderFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminPromotionOrderIdPrefix = "cache:hm:adminPromotionOrder:id:"
cacheHmAdminPromotionOrderOrderIdPrefix = "cache:hm:adminPromotionOrder:orderId:"
cacheHmAdminPromotionOrderIdPrefix = "cache:tydata:adminPromotionOrder:id:"
cacheHmAdminPromotionOrderOrderIdPrefix = "cache:tydata:adminPromotionOrder:orderId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminRoleApiRowsExpectAutoSet = strings.Join(stringx.Remove(adminRoleApiFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminRoleApiRowsWithPlaceHolder = strings.Join(stringx.Remove(adminRoleApiFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminRoleApiIdPrefix = "cache:hm:adminRoleApi:id:"
cacheHmAdminRoleApiRoleIdApiIdPrefix = "cache:hm:adminRoleApi:roleId:apiId:"
cacheHmAdminRoleApiIdPrefix = "cache:tydata:adminRoleApi:id:"
cacheHmAdminRoleApiRoleIdApiIdPrefix = "cache:tydata:adminRoleApi:roleId:apiId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminRoleMenuRowsExpectAutoSet = strings.Join(stringx.Remove(adminRoleMenuFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminRoleMenuRowsWithPlaceHolder = strings.Join(stringx.Remove(adminRoleMenuFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminRoleMenuIdPrefix = "cache:hm:adminRoleMenu:id:"
cacheHmAdminRoleMenuRoleIdMenuIdPrefix = "cache:hm:adminRoleMenu:roleId:menuId:"
cacheHmAdminRoleMenuIdPrefix = "cache:tydata:adminRoleMenu:id:"
cacheHmAdminRoleMenuRoleIdMenuIdPrefix = "cache:tydata:adminRoleMenu:roleId:menuId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminRoleRowsExpectAutoSet = strings.Join(stringx.Remove(adminRoleFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminRoleRowsWithPlaceHolder = strings.Join(stringx.Remove(adminRoleFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminRoleIdPrefix = "cache:hm:adminRole:id:"
cacheHmAdminRoleRoleCodePrefix = "cache:hm:adminRole:roleCode:"
cacheHmAdminRoleIdPrefix = "cache:tydata:adminRole:id:"
cacheHmAdminRoleRoleCodePrefix = "cache:tydata:adminRole:roleCode:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,9 +27,9 @@ var (
adminUserRowsExpectAutoSet = strings.Join(stringx.Remove(adminUserFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminUserRowsWithPlaceHolder = strings.Join(stringx.Remove(adminUserFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminUserIdPrefix = "cache:hm:adminUser:id:"
cacheHmAdminUserRealNamePrefix = "cache:hm:adminUser:realName:"
cacheHmAdminUserUsernamePrefix = "cache:hm:adminUser:username:"
cacheHmAdminUserIdPrefix = "cache:tydata:adminUser:id:"
cacheHmAdminUserRealNamePrefix = "cache:tydata:adminUser:realName:"
cacheHmAdminUserUsernamePrefix = "cache:tydata:adminUser:username:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
adminUserRoleRowsExpectAutoSet = strings.Join(stringx.Remove(adminUserRoleFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
adminUserRoleRowsWithPlaceHolder = strings.Join(stringx.Remove(adminUserRoleFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAdminUserRoleIdPrefix = "cache:hm:adminUserRole:id:"
cacheHmAdminUserRoleUserIdRoleIdPrefix = "cache:hm:adminUserRole:userId:roleId:"
cacheHmAdminUserRoleIdPrefix = "cache:tydata:adminUserRole:id:"
cacheHmAdminUserRoleUserIdRoleIdPrefix = "cache:tydata:adminUserRole:userId:roleId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentActiveStatRowsExpectAutoSet = strings.Join(stringx.Remove(agentActiveStatFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentActiveStatRowsWithPlaceHolder = strings.Join(stringx.Remove(agentActiveStatFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentActiveStatIdPrefix = "cache:hm:agentActiveStat:id:"
cacheHmAgentActiveStatAgentIdStatDatePrefix = "cache:hm:agentActiveStat:agentId:statDate:"
cacheHmAgentActiveStatIdPrefix = "cache:tydata:agentActiveStat:id:"
cacheHmAgentActiveStatAgentIdStatDatePrefix = "cache:tydata:agentActiveStat:agentId:statDate:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentAuditRowsExpectAutoSet = strings.Join(stringx.Remove(agentAuditFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentAuditRowsWithPlaceHolder = strings.Join(stringx.Remove(agentAuditFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentAuditIdPrefix = "cache:hm:agentAudit:id:"
cacheHmAgentAuditUserIdPrefix = "cache:hm:agentAudit:userId:"
cacheHmAgentAuditIdPrefix = "cache:tydata:agentAudit:id:"
cacheHmAgentAuditUserIdPrefix = "cache:tydata:agentAudit:userId:"
)
type (

View File

@@ -2,8 +2,8 @@ package model
import (
"context"
"tydata-server/common/globalkey"
"fmt"
"hm-server/common/globalkey"
"github.com/pkg/errors"
"github.com/zeromicro/go-zero/core/stores/cache"

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,9 +27,9 @@ var (
agentClosureRowsExpectAutoSet = strings.Join(stringx.Remove(agentClosureFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentClosureRowsWithPlaceHolder = strings.Join(stringx.Remove(agentClosureFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentClosureIdPrefix = "cache:hm:agentClosure:id:"
cacheHmAgentClosureAncestorIdDescendantIdPrefix = "cache:hm:agentClosure:ancestorId:descendantId:"
cacheHmAgentClosureDescendantIdDepthPrefix = "cache:hm:agentClosure:descendantId:depth:"
cacheHmAgentClosureIdPrefix = "cache:tydata:agentClosure:id:"
cacheHmAgentClosureAncestorIdDescendantIdPrefix = "cache:tydata:agentClosure:ancestorId:descendantId:"
cacheHmAgentClosureDescendantIdDepthPrefix = "cache:tydata:agentClosure:descendantId:depth:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,7 +27,7 @@ var (
agentCommissionDeductionRowsExpectAutoSet = strings.Join(stringx.Remove(agentCommissionDeductionFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentCommissionDeductionRowsWithPlaceHolder = strings.Join(stringx.Remove(agentCommissionDeductionFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentCommissionDeductionIdPrefix = "cache:hm:agentCommissionDeduction:id:"
cacheHmAgentCommissionDeductionIdPrefix = "cache:tydata:agentCommissionDeduction:id:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,7 +27,7 @@ var (
agentCommissionRowsExpectAutoSet = strings.Join(stringx.Remove(agentCommissionFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentCommissionRowsWithPlaceHolder = strings.Join(stringx.Remove(agentCommissionFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentCommissionIdPrefix = "cache:hm:agentCommission:id:"
cacheHmAgentCommissionIdPrefix = "cache:tydata:agentCommission:id:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentLinkRowsExpectAutoSet = strings.Join(stringx.Remove(agentLinkFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentLinkRowsWithPlaceHolder = strings.Join(stringx.Remove(agentLinkFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentLinkIdPrefix = "cache:hm:agentLink:id:"
cacheHmAgentLinkLinkIdentifierPrefix = "cache:hm:agentLink:linkIdentifier:"
cacheHmAgentLinkIdPrefix = "cache:tydata:agentLink:id:"
cacheHmAgentLinkLinkIdentifierPrefix = "cache:tydata:agentLink:linkIdentifier:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentMembershipConfigRowsExpectAutoSet = strings.Join(stringx.Remove(agentMembershipConfigFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentMembershipConfigRowsWithPlaceHolder = strings.Join(stringx.Remove(agentMembershipConfigFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentMembershipConfigIdPrefix = "cache:hm:agentMembershipConfig:id:"
cacheHmAgentMembershipConfigLevelNamePrefix = "cache:hm:agentMembershipConfig:levelName:"
cacheHmAgentMembershipConfigIdPrefix = "cache:tydata:agentMembershipConfig:id:"
cacheHmAgentMembershipConfigLevelNamePrefix = "cache:tydata:agentMembershipConfig:levelName:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,9 +27,9 @@ var (
agentMembershipRechargeOrderRowsExpectAutoSet = strings.Join(stringx.Remove(agentMembershipRechargeOrderFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentMembershipRechargeOrderRowsWithPlaceHolder = strings.Join(stringx.Remove(agentMembershipRechargeOrderFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentMembershipRechargeOrderIdPrefix = "cache:hm:agentMembershipRechargeOrder:id:"
cacheHmAgentMembershipRechargeOrderOrderNoPrefix = "cache:hm:agentMembershipRechargeOrder:orderNo:"
cacheHmAgentMembershipRechargeOrderPlatformOrderIdPrefix = "cache:hm:agentMembershipRechargeOrder:platformOrderId:"
cacheHmAgentMembershipRechargeOrderIdPrefix = "cache:tydata:agentMembershipRechargeOrder:id:"
cacheHmAgentMembershipRechargeOrderOrderNoPrefix = "cache:tydata:agentMembershipRechargeOrder:orderNo:"
cacheHmAgentMembershipRechargeOrderPlatformOrderIdPrefix = "cache:tydata:agentMembershipRechargeOrder:platformOrderId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentMembershipUserConfigRowsExpectAutoSet = strings.Join(stringx.Remove(agentMembershipUserConfigFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentMembershipUserConfigRowsWithPlaceHolder = strings.Join(stringx.Remove(agentMembershipUserConfigFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentMembershipUserConfigIdPrefix = "cache:hm:agentMembershipUserConfig:id:"
cacheHmAgentMembershipUserConfigAgentIdProductIdPrefix = "cache:hm:agentMembershipUserConfig:agentId:productId:"
cacheHmAgentMembershipUserConfigIdPrefix = "cache:tydata:agentMembershipUserConfig:id:"
cacheHmAgentMembershipUserConfigAgentIdProductIdPrefix = "cache:tydata:agentMembershipUserConfig:agentId:productId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,9 +27,9 @@ var (
agentRowsExpectAutoSet = strings.Join(stringx.Remove(agentFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentRowsWithPlaceHolder = strings.Join(stringx.Remove(agentFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentIdPrefix = "cache:hm:agent:id:"
cacheHmAgentMobilePrefix = "cache:hm:agent:mobile:"
cacheHmAgentUserIdPrefix = "cache:hm:agent:userId:"
cacheHmAgentIdPrefix = "cache:tydata:agent:id:"
cacheHmAgentMobilePrefix = "cache:tydata:agent:mobile:"
cacheHmAgentUserIdPrefix = "cache:tydata:agent:userId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentOrderRowsExpectAutoSet = strings.Join(stringx.Remove(agentOrderFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentOrderRowsWithPlaceHolder = strings.Join(stringx.Remove(agentOrderFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentOrderIdPrefix = "cache:hm:agentOrder:id:"
cacheHmAgentOrderOrderIdPrefix = "cache:hm:agentOrder:orderId:"
cacheHmAgentOrderIdPrefix = "cache:tydata:agentOrder:id:"
cacheHmAgentOrderOrderIdPrefix = "cache:tydata:agentOrder:orderId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,7 +27,7 @@ var (
agentPlatformDeductionRowsExpectAutoSet = strings.Join(stringx.Remove(agentPlatformDeductionFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentPlatformDeductionRowsWithPlaceHolder = strings.Join(stringx.Remove(agentPlatformDeductionFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentPlatformDeductionIdPrefix = "cache:hm:agentPlatformDeduction:id:"
cacheHmAgentPlatformDeductionIdPrefix = "cache:tydata:agentPlatformDeduction:id:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentProductConfigRowsExpectAutoSet = strings.Join(stringx.Remove(agentProductConfigFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentProductConfigRowsWithPlaceHolder = strings.Join(stringx.Remove(agentProductConfigFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentProductConfigIdPrefix = "cache:hm:agentProductConfig:id:"
cacheHmAgentProductConfigProductIdPrefix = "cache:hm:agentProductConfig:productId:"
cacheHmAgentProductConfigIdPrefix = "cache:tydata:agentProductConfig:id:"
cacheHmAgentProductConfigProductIdPrefix = "cache:tydata:agentProductConfig:productId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentRealNameRowsExpectAutoSet = strings.Join(stringx.Remove(agentRealNameFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentRealNameRowsWithPlaceHolder = strings.Join(stringx.Remove(agentRealNameFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentRealNameIdPrefix = "cache:hm:agentRealName:id:"
cacheHmAgentRealNameAgentIdPrefix = "cache:hm:agentRealName:agentId:"
cacheHmAgentRealNameIdPrefix = "cache:tydata:agentRealName:id:"
cacheHmAgentRealNameAgentIdPrefix = "cache:tydata:agentRealName:agentId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,7 +27,7 @@ var (
agentRewardsRowsExpectAutoSet = strings.Join(stringx.Remove(agentRewardsFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentRewardsRowsWithPlaceHolder = strings.Join(stringx.Remove(agentRewardsFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentRewardsIdPrefix = "cache:hm:agentRewards:id:"
cacheHmAgentRewardsIdPrefix = "cache:tydata:agentRewards:id:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentWalletRowsExpectAutoSet = strings.Join(stringx.Remove(agentWalletFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentWalletRowsWithPlaceHolder = strings.Join(stringx.Remove(agentWalletFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentWalletIdPrefix = "cache:hm:agentWallet:id:"
cacheHmAgentWalletAgentIdPrefix = "cache:hm:agentWallet:agentId:"
cacheHmAgentWalletIdPrefix = "cache:tydata:agentWallet:id:"
cacheHmAgentWalletAgentIdPrefix = "cache:tydata:agentWallet:agentId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentWithdrawalRowsExpectAutoSet = strings.Join(stringx.Remove(agentWithdrawalFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentWithdrawalRowsWithPlaceHolder = strings.Join(stringx.Remove(agentWithdrawalFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentWithdrawalIdPrefix = "cache:hm:agentWithdrawal:id:"
cacheHmAgentWithdrawalWithdrawNoPrefix = "cache:hm:agentWithdrawal:withdrawNo:"
cacheHmAgentWithdrawalIdPrefix = "cache:tydata:agentWithdrawal:id:"
cacheHmAgentWithdrawalWithdrawNoPrefix = "cache:tydata:agentWithdrawal:withdrawNo:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentWithdrawalTaxExemptionRowsExpectAutoSet = strings.Join(stringx.Remove(agentWithdrawalTaxExemptionFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentWithdrawalTaxExemptionRowsWithPlaceHolder = strings.Join(stringx.Remove(agentWithdrawalTaxExemptionFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentWithdrawalTaxExemptionIdPrefix = "cache:hm:agentWithdrawalTaxExemption:id:"
cacheHmAgentWithdrawalTaxExemptionAgentIdYearMonthPrefix = "cache:hm:agentWithdrawalTaxExemption:agentId:yearMonth:"
cacheHmAgentWithdrawalTaxExemptionIdPrefix = "cache:tydata:agentWithdrawalTaxExemption:id:"
cacheHmAgentWithdrawalTaxExemptionAgentIdYearMonthPrefix = "cache:tydata:agentWithdrawalTaxExemption:agentId:yearMonth:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
agentWithdrawalTaxRowsExpectAutoSet = strings.Join(stringx.Remove(agentWithdrawalTaxFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
agentWithdrawalTaxRowsWithPlaceHolder = strings.Join(stringx.Remove(agentWithdrawalTaxFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAgentWithdrawalTaxIdPrefix = "cache:hm:agentWithdrawalTax:id:"
cacheHmAgentWithdrawalTaxWithdrawalIdPrefix = "cache:hm:agentWithdrawalTax:withdrawalId:"
cacheHmAgentWithdrawalTaxIdPrefix = "cache:tydata:agentWithdrawalTax:id:"
cacheHmAgentWithdrawalTaxWithdrawalIdPrefix = "cache:tydata:agentWithdrawalTax:withdrawalId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,7 +27,7 @@ var (
authorizationDocumentRowsExpectAutoSet = strings.Join(stringx.Remove(authorizationDocumentFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
authorizationDocumentRowsWithPlaceHolder = strings.Join(stringx.Remove(authorizationDocumentFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmAuthorizationDocumentIdPrefix = "cache:hm:authorizationDocument:id:"
cacheHmAuthorizationDocumentIdPrefix = "cache:tydata:authorizationDocument:id:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,9 +27,9 @@ var (
exampleRowsExpectAutoSet = strings.Join(stringx.Remove(exampleFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
exampleRowsWithPlaceHolder = strings.Join(stringx.Remove(exampleFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmExampleIdPrefix = "cache:hm:example:id:"
cacheHmExampleApiIdPrefix = "cache:hm:example:apiId:"
cacheHmExampleFeatureIdPrefix = "cache:hm:example:featureId:"
cacheHmExampleIdPrefix = "cache:tydata:example:id:"
cacheHmExampleApiIdPrefix = "cache:tydata:example:apiId:"
cacheHmExampleFeatureIdPrefix = "cache:tydata:example:featureId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
featureRowsExpectAutoSet = strings.Join(stringx.Remove(featureFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
featureRowsWithPlaceHolder = strings.Join(stringx.Remove(featureFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmFeatureIdPrefix = "cache:hm:feature:id:"
cacheHmFeatureApiIdPrefix = "cache:hm:feature:apiId:"
cacheHmFeatureIdPrefix = "cache:tydata:feature:id:"
cacheHmFeatureApiIdPrefix = "cache:tydata:feature:apiId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,7 +27,7 @@ var (
globalNotificationsRowsExpectAutoSet = strings.Join(stringx.Remove(globalNotificationsFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
globalNotificationsRowsWithPlaceHolder = strings.Join(stringx.Remove(globalNotificationsFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmGlobalNotificationsIdPrefix = "cache:hm:globalNotifications:id:"
cacheHmGlobalNotificationsIdPrefix = "cache:tydata:globalNotifications:id:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
orderRowsExpectAutoSet = strings.Join(stringx.Remove(orderFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
orderRowsWithPlaceHolder = strings.Join(stringx.Remove(orderFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmOrderIdPrefix = "cache:hm:order:id:"
cacheHmOrderOrderNoPrefix = "cache:hm:order:orderNo:"
cacheHmOrderIdPrefix = "cache:tydata:order:id:"
cacheHmOrderOrderNoPrefix = "cache:tydata:order:orderNo:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,10 +27,10 @@ var (
orderRefundRowsExpectAutoSet = strings.Join(stringx.Remove(orderRefundFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
orderRefundRowsWithPlaceHolder = strings.Join(stringx.Remove(orderRefundFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmOrderRefundIdPrefix = "cache:hm:orderRefund:id:"
cacheHmOrderRefundOrderIdPrefix = "cache:hm:orderRefund:orderId:"
cacheHmOrderRefundPlatformRefundIdPrefix = "cache:hm:orderRefund:platformRefundId:"
cacheHmOrderRefundRefundNoPrefix = "cache:hm:orderRefund:refundNo:"
cacheHmOrderRefundIdPrefix = "cache:tydata:orderRefund:id:"
cacheHmOrderRefundOrderIdPrefix = "cache:tydata:orderRefund:orderId:"
cacheHmOrderRefundPlatformRefundIdPrefix = "cache:tydata:orderRefund:platformRefundId:"
cacheHmOrderRefundRefundNoPrefix = "cache:tydata:orderRefund:refundNo:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
productFeatureRowsExpectAutoSet = strings.Join(stringx.Remove(productFeatureFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
productFeatureRowsWithPlaceHolder = strings.Join(stringx.Remove(productFeatureFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmProductFeatureIdPrefix = "cache:hm:productFeature:id:"
cacheHmProductFeatureProductIdFeatureIdPrefix = "cache:hm:productFeature:productId:featureId:"
cacheHmProductFeatureIdPrefix = "cache:tydata:productFeature:id:"
cacheHmProductFeatureProductIdFeatureIdPrefix = "cache:tydata:productFeature:productId:featureId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
productRowsExpectAutoSet = strings.Join(stringx.Remove(productFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
productRowsWithPlaceHolder = strings.Join(stringx.Remove(productFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmProductIdPrefix = "cache:hm:product:id:"
cacheHmProductProductEnPrefix = "cache:hm:product:productEn:"
cacheHmProductIdPrefix = "cache:tydata:product:id:"
cacheHmProductProductEnPrefix = "cache:tydata:product:productEn:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
queryCleanupConfigRowsExpectAutoSet = strings.Join(stringx.Remove(queryCleanupConfigFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
queryCleanupConfigRowsWithPlaceHolder = strings.Join(stringx.Remove(queryCleanupConfigFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmQueryCleanupConfigIdPrefix = "cache:hm:queryCleanupConfig:id:"
cacheHmQueryCleanupConfigConfigKeyPrefix = "cache:hm:queryCleanupConfig:configKey:"
cacheHmQueryCleanupConfigIdPrefix = "cache:tydata:queryCleanupConfig:id:"
cacheHmQueryCleanupConfigConfigKeyPrefix = "cache:tydata:queryCleanupConfig:configKey:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,7 +27,7 @@ var (
queryCleanupDetailRowsExpectAutoSet = strings.Join(stringx.Remove(queryCleanupDetailFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
queryCleanupDetailRowsWithPlaceHolder = strings.Join(stringx.Remove(queryCleanupDetailFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmQueryCleanupDetailIdPrefix = "cache:hm:queryCleanupDetail:id:"
cacheHmQueryCleanupDetailIdPrefix = "cache:tydata:queryCleanupDetail:id:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,7 +27,7 @@ var (
queryCleanupLogRowsExpectAutoSet = strings.Join(stringx.Remove(queryCleanupLogFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
queryCleanupLogRowsWithPlaceHolder = strings.Join(stringx.Remove(queryCleanupLogFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmQueryCleanupLogIdPrefix = "cache:hm:queryCleanupLog:id:"
cacheHmQueryCleanupLogIdPrefix = "cache:tydata:queryCleanupLog:id:"
)
type (

View File

@@ -2,9 +2,9 @@ package model
import (
"context"
"tydata-server/common/globalkey"
"fmt"
"time"
"hm-server/common/globalkey"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/sqlx"

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
queryRowsExpectAutoSet = strings.Join(stringx.Remove(queryFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
queryRowsWithPlaceHolder = strings.Join(stringx.Remove(queryFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmQueryIdPrefix = "cache:hm:query:id:"
cacheHmQueryOrderIdPrefix = "cache:hm:query:orderId:"
cacheHmQueryIdPrefix = "cache:tydata:query:id:"
cacheHmQueryOrderIdPrefix = "cache:tydata:query:orderId:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,9 +27,9 @@ var (
userAuthRowsExpectAutoSet = strings.Join(stringx.Remove(userAuthFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
userAuthRowsWithPlaceHolder = strings.Join(stringx.Remove(userAuthFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmUserAuthIdPrefix = "cache:hm:userAuth:id:"
cacheHmUserAuthAuthTypeAuthKeyPrefix = "cache:hm:userAuth:authType:authKey:"
cacheHmUserAuthUserIdAuthTypePrefix = "cache:hm:userAuth:userId:authType:"
cacheHmUserAuthIdPrefix = "cache:tydata:userAuth:id:"
cacheHmUserAuthAuthTypeAuthKeyPrefix = "cache:tydata:userAuth:authType:authKey:"
cacheHmUserAuthUserIdAuthTypePrefix = "cache:tydata:userAuth:userId:authType:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
userRowsExpectAutoSet = strings.Join(stringx.Remove(userFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
userRowsWithPlaceHolder = strings.Join(stringx.Remove(userFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmUserIdPrefix = "cache:hm:user:id:"
cacheHmUserMobilePrefix = "cache:hm:user:mobile:"
cacheHmUserIdPrefix = "cache:tydata:user:id:"
cacheHmUserMobilePrefix = "cache:tydata:user:mobile:"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"time"
"hm-server/common/globalkey"
"tydata-server/common/globalkey"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
@@ -27,8 +27,8 @@ var (
userTempRowsExpectAutoSet = strings.Join(stringx.Remove(userTempFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
userTempRowsWithPlaceHolder = strings.Join(stringx.Remove(userTempFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheHmUserTempIdPrefix = "cache:hm:userTemp:id:"
cacheHmUserTempAuthTypeAuthKeyPrefix = "cache:hm:userTemp:authType:authKey:"
cacheHmUserTempIdPrefix = "cache:tydata:userTemp:id:"
cacheHmUserTempAuthTypeAuthKeyPrefix = "cache:tydata:userTemp:authType:authKey:"
)
type (

View File

@@ -91,6 +91,11 @@ const (
UserTypeAdmin = 2 // 管理员
)
// 管理员角色编码
const (
AdminRoleCodeSuper = "SUPER" // 超级管理员
)
// 代理状态
const (
AgentStatusNo = 0 // 非代理