在沃尔玛充值卡账户模块中新增了分组统计接口,支持获取各分组的账户统计信息,包括总数、正常状态和异常状态的账户数量及金额。同时,优化了相关数据模型和服务逻辑,提升了系统的统计能力和数据处理效率。这些改进有助于增强用户对账户状态的监控和管理。 feat(card_info_walmart): 更新分组统计功能和数据模型 在沃尔玛充值卡账户模块中,增强了分组统计功能,支持按日期、类别和创建用户ID进行统计。同时,优化了相关数据模型,确保统计结果的准确性和完整性。这些改进提升了系统的统计能力和用户对账户状态的管理效率。 feat(card_info_walmart): 更新分组统计功能以支持数据库配置 在沃尔玛充值卡账户模块中,更新了分组统计功能,新增了数据库配置的支持,确保在不同数据库环境下的正确操作。这些改进提升了系统的灵活性和稳定性。 feat(card_info_walmart): 更新分组统计功能以支持数据库配置 在沃尔玛充值卡账户模块中,修改了分组统计功能,新增了数据库配置支持,确保在不同数据库环境下的正确操作。这些改进提升了系统的灵活性和稳定性。 feat(card_info_walmart): 新增订单导出功能 在沃尔玛充值卡账户模块中,新增了订单导出接口,支持将订单信息导出为Excel文件。此功能包括订单的详细信息,如卡号、卡密、商户订单号等,提升了用户对订单数据的管理和分析能力。 feat(card_info_walmart): 增强订单导出功能的错误处理 在沃尔玛充值卡账户模块中,优化了订单导出功能,新增了错误处理逻辑以确保在获取订单列表失败时能够正确返回错误信息。同时,添加了数据缓冲到本地的注释,提升了代码的可读性和维护性。 feat(card_info_walmart): 新增账户分组导出功能 在沃尔玛充值卡账户模块中,新增了账户分组导出接口,支持将账户分组信息导出为Excel文件。此功能包括上传人昵称、分组名称、正常账户数量等详细信息,提升了用户对账户数据的管理和分析能力。同时,更新了分组统计功能以支持用户权限验证,确保数据安全性。 fix(card_info_walmart): 修正创建用户ID字段名称 在沃尔玛充值卡账户模块中,修正了分组统计功能中创建用户ID字段的名称,从`created_user_id`更改为`create_user_id`,确保SQL查询的正确性。这一改动提升了数据查询的准确性。 feat(card_info_walmart): 更新账户分组和订单导出功能 在沃尔玛充值卡账户模块中,新增了账户分组实体的删除状态字段,并在分组统计和订单导出功能中优化了分页逻辑,确保在当前页和每页大小为零时的处理。同时,增强了对已删除账户的统计,提升了数据的准确性和完整性。这些改进有助于用户更好地管理和分析账户数据。 feat(card_info_walmart): 增强账户分组导出功能 在沃尔玛充值卡账户模块中,更新了账户分组导出功能,新增了已删除账户数量的统计,并将导出文件保存到本地。此改进提升了数据导出的完整性和用户体验,同时优化了导出逻辑,确保用户能够方便地下载所需数据。 feat(card_info_walmart): 更新账户信息模型和导出功能 在沃尔玛充值卡账户模块中,新增了账户分组名称、创建时间、更新时间和删除时间字段,增强了账户信息的完整性。同时,更新了账户导出功能,支持在导出文件中显示分组信息和删除状态,提升了用户对账户数据的管理和分析能力。 feat(card_info_walmart): 增强账户信息模型,新增时间戳字段 在沃尔玛充值卡账户模块中,更新了账户信息模型,新增了创建时间、更新时间和删除时间字段,以提升账户信息的完整性。同时,优化了获取账户摘要的逻辑,确保在处理账户信息时能够正确返回相关时间戳数据。这些改进有助于用户更好地管理和分析账户数据。 feat(card_info_walmart): 优化账户信息和摘要获取逻辑 在沃尔玛充值卡账户模块中,更新了账户信息模型,将`AccountInfo`字段改为指针类型,以提高内存效率。同时,优化了获取账户摘要的逻辑,确保在处理账户信息时能够正确返回相关数据。这些改进提升了代码的可读性和性能。 feat(card_info_walmart): 更新账户信息和导出功能 在沃尔玛充值卡账户模块中,优化了账户信息导出功能,新增了分组ID和账户ID字段,以提升导出数据的完整性。同时,更新了相关逻辑以支持根据分组ID进行查询,增强了数据处理的灵活性和准确性。这些改进有助于用户更好地管理和分析账户数据。 feat(card_info_walmart): 优化分组统计逻辑和测试用例 在沃尔玛充值卡账户模块中,优化了分组统计功能,使用了更高效的集合操作以获取唯一的分组ID。同时,更新了相关测试用例,简化了参数传递,提升了代码的可读性和测试的准确性。这些改进有助于提高数据处理的性能和测试的可靠性。 feat(sysUser): 更新获取所有用户接口的描述和逻辑 在用户管理模块中,修改了获取所有用户的请求描述,将“商户”更改为“用户”,以提高接口的准确性。同时,增强了获取用户列表的逻辑,添加了权限验证,确保用户信息的安全性,并在返回数据时过滤掉当前用户的信息。这些改进提升了接口的可用性和安全性。 feat(card_info_walmart): 新增用户ID字段并更新相关逻辑 在沃尔玛充值卡账户模块中,新增了多个请求和响应结构中的用户ID字段,以提升用户信息的管理能力。同时,更新了相关逻辑以支持用户ID的传递,确保在处理账户和分组信息时能够正确识别用户。这些改进增强了系统的灵活性和数据处理的准确性。 feat(card_info_walmart): 新增用户ID字段并更新相关逻辑 在沃尔玛充值卡账户模块中,新增了`UserId`字段到分组统计请求结构体,并在相关逻辑中更新以支持用户ID的传递。这些改进确保在处理分组统计时能够正确识别用户信息,提升了系统的灵活性和数据处理的准确性。
234 lines
10 KiB
Go
234 lines
10 KiB
Go
package v1
|
|
|
|
import (
|
|
"kami/api/commonApi"
|
|
v1 "kami/api/sysUser/v1"
|
|
"kami/internal/consts"
|
|
"kami/internal/model/entity"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
"github.com/gogf/gf/v2/os/gtime"
|
|
)
|
|
|
|
type AccountDeleteReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/delete" tags:"沃尔玛充值卡账户" method:"delete" summary:"删除沃尔玛充值卡"`
|
|
commonApi.CommonStrId
|
|
}
|
|
|
|
type AccountDeleteRes struct{}
|
|
|
|
type AccountListReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/getList" tags:"沃尔玛充值卡账户" method:"get" summary:"获取沃尔玛充值卡列表"`
|
|
commonApi.CommonPageReq
|
|
Name string `json:"name" description:"账户名称"`
|
|
NickName string `json:"nickName" description:"用户昵称"`
|
|
Cookie string `json:"cookie"`
|
|
CreatedUserName string `json:"CreatedUserName" description:"创建用户昵称"`
|
|
GroupId int `json:"groupId" description:"分组ID"`
|
|
UserId string `json:"userId" description:"用户ID"`
|
|
}
|
|
|
|
type AccountListRecord struct {
|
|
entity.V1CardRedeemAccountInfo
|
|
UploadUser struct {
|
|
Id string `json:"id"`
|
|
Username string `json:"username"`
|
|
Nickname string `json:"nickname"`
|
|
} `json:"uploadUser"`
|
|
}
|
|
|
|
type AccountListRes struct {
|
|
commonApi.CommonPageRes[AccountListRecord]
|
|
}
|
|
|
|
type AccountRecord struct {
|
|
Cookie string `json:"cookie" v:"required#状态不能为空" description:"cookie不能为空"`
|
|
Name string `json:"name" description:"别名"`
|
|
GroupId int `json:"groupId" description:"分组ID"`
|
|
MaxAmountLimit int `json:"maxAmountLimit" description:"最大充值限制" v:"required#最大充值金额不能为空"`
|
|
MaxCountLimit int `json:"maxCountLimit" description:"最大充值次数" v:"required#最大充值次数不能为空"`
|
|
Status int `json:"status" description:"状态"`
|
|
Remark string `json:"remark" description:"备注"`
|
|
}
|
|
|
|
type AccountCookieCheckReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/checkCookie" tags:"沃尔玛充值卡账户" method:"post" summary:"检测cookie是否可用"`
|
|
Cookie string `json:"cookie" v:"required#cookie不能为空" description:"cookie"`
|
|
}
|
|
|
|
type AccountLoadReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/load" tags:"沃尔玛充值卡账户" method:"post" summary:"导入沃尔玛账户"`
|
|
Cookie string `json:"cookie" v:"required#状态不能为空" description:"cookie不能为空"`
|
|
UserId string `json:"id" description:"" v:"required#用户id不能为空"`
|
|
Name string `json:"name" description:"别名" v:"required#名称不能为空"`
|
|
GroupName string `json:"groupName" description:"分组名称" v:"required#分组名称不能为空"`
|
|
Remark string `json:"remark" description:"备注"`
|
|
}
|
|
|
|
type AccountLoadRes struct {
|
|
}
|
|
|
|
type AccountCookieCheckRes struct {
|
|
Username string `json:"username" dc:"用户名"`
|
|
Nickname string `json:"nickname" dc:"昵称"`
|
|
Balance float64 `json:"balance" dc:"余额"`
|
|
IsExist bool `json:"isExist" dc:"是否存在系统中"`
|
|
IsAvailable bool `json:"isAvailable" dc:"是否可用"`
|
|
}
|
|
|
|
type AccountCreateReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/create" tags:"沃尔玛充值卡账户" method:"post" summary:"创建沃尔玛账户"`
|
|
AccountRecord
|
|
}
|
|
|
|
type AccountCreateRes struct{}
|
|
|
|
type AccountUpdateReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/update" tags:"沃尔玛充值卡账户" method:"put" summary:"修改沃尔玛账户"`
|
|
commonApi.CommonStrId
|
|
AccountRecord
|
|
}
|
|
|
|
type AccountUpdateRes struct {
|
|
}
|
|
|
|
type AccountWalletListReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/getWalletList" tags:"沃尔玛充值卡账户" method:"get" summary:"获取沃尔玛账户流水"`
|
|
commonApi.CommonPageReq
|
|
AccountId string `json:"accountId" v:"required#缺失ID"`
|
|
}
|
|
|
|
type AccountWalletListRes struct {
|
|
commonApi.CommonPageRes[*entity.V1CardRedeemAccountHistory]
|
|
}
|
|
|
|
type AccountUpdateStatusReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/updateStatus" tags:"沃尔玛充值卡账户" method:"put" summary:"修改沃尔玛账户状态"`
|
|
commonApi.CommonStrId
|
|
Status consts.RedeemAccountStatus `json:"status" v:"required#状态不能为空" description:"状态"`
|
|
}
|
|
|
|
type AccountUpdateStatusRes struct {
|
|
}
|
|
|
|
type AccountRefreshStatusReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/refreshStatus" tags:"沃尔玛充值卡账户" method:"put" summary:"刷新账号充值状态"`
|
|
commonApi.CommonStrId
|
|
}
|
|
|
|
type AccountRefreshStatusRes struct {
|
|
}
|
|
|
|
type DownloadTemplateReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/downloadTemplate" tags:"沃尔玛充值卡账户" method:"get" summary:"下载导入模板"`
|
|
}
|
|
|
|
type DownloadTemplateRes struct {
|
|
g.Meta `mime:"application/vnd.ms-excel"`
|
|
}
|
|
|
|
type AccountCookieBatchCheckReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/check" tags:"沃尔玛充值卡账户" method:"post" summary:"检查上传礼品卡是否正常"`
|
|
File *ghttp.UploadFile `v:"required#文件不能为空" json:"file" type:"file" description:"选择上传文件"`
|
|
}
|
|
|
|
type AccountCookieBatchInfo struct {
|
|
AccountCookieCheckRes
|
|
Name string `json:"name" dc:"别名"`
|
|
Cookie string `json:"cookie" dc:"cookie"`
|
|
MaxAmountLimit int `json:"maxAmountLimit" description:"最大充值限制"`
|
|
MaxCountLimit int `json:"maxCountLimit" description:"最大充值次数"`
|
|
}
|
|
|
|
type AccountCookieBatchCheckRes struct {
|
|
Msg string `json:"msg" description:"导入结果"`
|
|
List []*AccountCookieBatchInfo `json:"list" description:"导入结果"`
|
|
}
|
|
|
|
type AccountCookieBatchAddReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/batchAdd" tags:"沃尔玛充值卡账户" method:"post" summary:"检查礼品卡是否正常"`
|
|
List []*AccountCookieBatchInfo `json:"list" description:"导入结果"`
|
|
}
|
|
|
|
type AccountCookieBatchAddRes struct {
|
|
}
|
|
|
|
type DownloadReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/download" tags:"沃尔玛充值卡账户" method:"get" summary:"下载充值账户"`
|
|
UserId string `json:"userId" description:"用户ID"`
|
|
}
|
|
|
|
type DownloadRes struct {
|
|
g.Meta `mime:"application/vnd.ms-excel"`
|
|
}
|
|
|
|
type AccountDailySummaryReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/dailySummary" tags:"沃尔玛充值卡账户" method:"get" summary:"每日汇总"`
|
|
commonApi.CommonPageReq
|
|
Username string `json:"username" description:"用户"`
|
|
Date *gtime.Time `json:"date" description:"日期"`
|
|
}
|
|
|
|
type CardRedeemAccountSummary struct {
|
|
GroupId int `json:"groupId" orm:"group_id" description:""`
|
|
GroupName string `json:"groupName" orm:"group_name" description:""`
|
|
AccountInfo *AccountInfo `json:"accountInfo"`
|
|
Id int `json:"id" orm:"id" description:""`
|
|
AccountId string `json:"accountId" orm:"account_id" description:""`
|
|
AmountTotalSum float64 `json:"amountTotalSum" orm:"amount_total_sum" description:""`
|
|
AmountTodaySum float64 `json:"amountTodaySum" orm:"amount_today_sum" description:""`
|
|
AmountTotalCount int `json:"amountTotalCount" orm:"amount_total_count" description:""`
|
|
AmountTodayCount int `json:"amountTodayCount" orm:"amount_today_count" description:""`
|
|
Date *gtime.Time `json:"date" orm:"date" description:""`
|
|
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:""`
|
|
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:""`
|
|
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:""`
|
|
}
|
|
|
|
type AccountInfo struct {
|
|
g.Meta `orm:"table:card_redeem_account_info"`
|
|
GroupId int `json:"groupId" orm:"group_id" description:""`
|
|
UploadUser v1.SysUserRecord `json:"uploadUser" orm:"with:id=create_user_id"`
|
|
CreateUserId string `json:"createUserId" orm:"create_user_id" description:"创建人"`
|
|
Balance float64 `json:"balance" orm:"balance" description:"余额"`
|
|
Status int `json:"status" orm:"status" description:"状态 1.正常 0.禁用"`
|
|
MaxCountLimit int `json:"maxCountLimit" orm:"max_count_limit" description:"账号最大充值次数"`
|
|
MaxAmountLimit int `json:"maxAmountLimit" orm:"max_amount_limit" description:"最大充值限制"`
|
|
AmountTodayCount int `json:"amountTodayCount" orm:"amount_today_count" description:""`
|
|
Id string `json:"id" orm:"id" description:""`
|
|
Name string `json:"name" orm:"name" description:""`
|
|
Category string `json:"category" orm:"category" description:"账户类型"`
|
|
AmountTotalSum float64 `json:"amountTotalSum" orm:"amount_total_sum" description:"账单所有统计金额"`
|
|
AmountTodaySum float64 `json:"amountTodaySum" orm:"amount_today_sum" description:"账单今日统计金额"`
|
|
EffectiveBalance float64 `json:"effectiveBalance" orm:"effective_balance" description:"有效充值余额"`
|
|
AmountTotalCount int `json:"amountTotalCount" orm:"amount_total_count" description:""`
|
|
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:""`
|
|
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:""`
|
|
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:""`
|
|
}
|
|
|
|
type AccountDailySummaryRes struct {
|
|
commonApi.CommonPageRes[*CardRedeemAccountSummary]
|
|
}
|
|
|
|
type AccountSummaryDownloadReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/summaryDownload" tags:"沃尔玛充值卡账户" method:"get" summary:"下载充值账户"`
|
|
commonApi.CommonPageReq
|
|
Username string `json:"username" description:"用户"`
|
|
Date *gtime.Time `json:"date" description:"日期"`
|
|
}
|
|
|
|
type AccountSummaryDownloadRes struct {
|
|
g.Meta `mime:"application/vnd.ms-excel"`
|
|
}
|
|
|
|
type AccountStatusDetectReq struct {
|
|
g.Meta `path:"/cardInfo/walmart/account/statusDetect" tags:"沃尔玛充值卡账户" method:"get" summary:"检测账户状态"`
|
|
commonApi.CommonStrId
|
|
}
|
|
|
|
type AccountStatusDetectRes struct {
|
|
Status bool `json:"status" description:"状态"`
|
|
}
|