59eb34976a
iotlcm-admin-svr:管理后台服务。 - Go module:iotlcm → git.5iot.com/iotlcm-public/iotlcm-admin-svr(729 文件) - 凭据与地址脱敏:JWT signingKey(含代码里的 MustGet 默认值)、 MySQL DSN、Redis 口令、告警邮件发件人邮箱全部改为占位; 私网 IP → 文档地址段;库名 xiujie_admin → iotlcm - 真实手机号/邮箱 → 合法 11 位编造号 / example.com - 移除内部资产:CI 触发器、过时 DDL(sql/db_iotlcm.sql)、 私有依赖 go get 行、明文 registry 登录口令 - 启动 banner 统一 IOTLCM 方块字 + 社区惯例署名 - Dockerfile 改用公共基础镜像 - 拼错的 RADEME.md → README.md,README 重写 - 需要真实数据库的用例改为可用 IOTLCM_TEST_WITH_DB=1 显式启用 - 补 Apache-2.0 LICENSE,LF 行尾 + .gitattributes 数据库 schema 不随本仓发布(生产 DDL 已过时),README 已说明。
179 lines
8.1 KiB
Go
179 lines
8.1 KiB
Go
// Package iotin
|
|
// @Link https://github.com/xiujiecn/xiu-admin
|
|
// @Copyright Copyright (c) 2026 LiXiujie
|
|
// @Author Lxj <li@xiujie.cn>
|
|
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
|
|
// @AutoGenerate Version
|
|
package model
|
|
|
|
import (
|
|
"context"
|
|
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/consts"
|
|
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/xgorm/hook"
|
|
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/entity"
|
|
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
|
|
"slices"
|
|
|
|
"github.com/gogf/gf/v2/errors/gerror"
|
|
"github.com/gogf/gf/v2/os/gtime"
|
|
)
|
|
|
|
// TCustWithdrawAccountUpdateFields 修改客户提现账户表字段过滤
|
|
type TCustWithdrawAccountUpdateFields struct {
|
|
DeptId int `json:"deptId" dc:"企业客户ID"`
|
|
AccountType int `json:"accountType" dc:"提现账号类型,1:支付宝,2:微信"`
|
|
AccountNo string `json:"accountNo" dc:"账号"`
|
|
AccountName string `json:"accountName" dc:"账户名称/真实姓名"`
|
|
Mobile string `json:"mobile" dc:"手机号"`
|
|
IsDefault int `json:"isDefault" dc:"是否默认账号:0-否 1-是"`
|
|
Enabled int `json:"enabled" dc:"是否启用:0-未启用 1-启用"`
|
|
Status int `json:"status" dc:"状态:0-禁用 1-正常"`
|
|
TenantId string `json:"tenantId" dc:"租户ID"`
|
|
UpdatedBy int64 `json:"updatedBy" dc:"更新者ID"`
|
|
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
|
}
|
|
|
|
// TCustWithdrawAccountInsertFields 新增客户提现账户表字段过滤
|
|
type TCustWithdrawAccountInsertFields struct {
|
|
DeptId int `json:"deptId" dc:"企业客户ID"`
|
|
AccountType int `json:"accountType" dc:"提现账号类型,1:支付宝,2:微信"`
|
|
AccountNo string `json:"accountNo" dc:"账号"`
|
|
AccountName string `json:"accountName" dc:"账户名称/真实姓名"`
|
|
Mobile string `json:"mobile" dc:"手机号"`
|
|
IsDefault int `json:"isDefault" dc:"是否默认账号:0-否 1-是"`
|
|
Enabled int `json:"enabled" dc:"是否启用:0-未启用 1-启用"`
|
|
Status int `json:"status" dc:"状态:0-禁用 1-正常"`
|
|
TenantId string `json:"tenantId" dc:"租户ID"`
|
|
CreatedDept int64 `json:"createdDept" dc:"创建部门ID"`
|
|
CreatedBy int64 `json:"createdBy" dc:"创建者ID"`
|
|
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
|
}
|
|
|
|
// TCustWithdrawAccountEditParam 修改/新增客户提现账户表
|
|
type TCustWithdrawAccountEditParam struct {
|
|
//entity.TCustWithdrawAccount
|
|
Id int64 `json:"id" dc:"主键ID"`
|
|
DeptId *int `json:"deptId" dc:"企业客户ID"`
|
|
AccountType *int `json:"accountType" dc:"提现账号类型,1:支付宝,2:微信"`
|
|
AccountNo *string `json:"accountNo" dc:"账号"`
|
|
AccountName *string `json:"accountName" dc:"账户名称/真实姓名"`
|
|
Mobile *string `json:"mobile" dc:"手机号"`
|
|
IsDefault *int `json:"isDefault" dc:"是否默认账号:0-否 1-是"`
|
|
Enabled *int `json:"enabled" dc:"是否启用:0-未启用 1-启用"`
|
|
Status *int `json:"status" dc:"状态:0-禁用 1-正常"`
|
|
TenantId *string `json:"tenantId" dc:"租户ID"`
|
|
CreatedDept *int64 `json:"createdDept" dc:"创建部门ID"`
|
|
CreatedBy *int64 `json:"createdBy" dc:"创建者ID"`
|
|
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
|
UpdatedBy *int64 `json:"updatedBy" dc:"更新者ID"`
|
|
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
|
}
|
|
|
|
func (in *TCustWithdrawAccountEditParam) Filter(ctx context.Context) (err error) {
|
|
|
|
return
|
|
}
|
|
|
|
type TCustWithdrawAccountEditModel struct{}
|
|
|
|
// TCustWithdrawAccountDeleteParam 删除客户提现账户表
|
|
type TCustWithdrawAccountDeleteParam struct {
|
|
Id interface{} `json:"id" v:"required#主键ID不能为空" dc:"主键ID"`
|
|
}
|
|
|
|
func (in *TCustWithdrawAccountDeleteParam) Filter(ctx context.Context) (err error) {
|
|
return
|
|
}
|
|
|
|
type TCustWithdrawAccountDeleteModel struct{}
|
|
|
|
// TCustWithdrawAccountViewParam 获取指定客户提现账户表信息
|
|
type TCustWithdrawAccountViewParam struct {
|
|
Id int64 `json:"id" v:"required#主键ID不能为空" dc:"主键ID"`
|
|
}
|
|
|
|
func (in *TCustWithdrawAccountViewParam) Filter(ctx context.Context) (err error) {
|
|
return
|
|
}
|
|
|
|
type TCustWithdrawAccountViewModel struct {
|
|
entity.TCustWithdrawAccount
|
|
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者ID摘要信息"`
|
|
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者ID摘要信息"`
|
|
}
|
|
|
|
// TCustWithdrawAccountListParam 获取客户提现账户表列表
|
|
type TCustWithdrawAccountListParam struct {
|
|
request.PageInfo
|
|
Id int64 `json:"id" dc:"主键ID"`
|
|
Status int `json:"status" dc:"状态:0-禁用 1-正常"`
|
|
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
|
|
}
|
|
|
|
func (in *TCustWithdrawAccountListParam) Filter(ctx context.Context) (err error) {
|
|
return
|
|
}
|
|
|
|
type TCustWithdrawAccountListModel struct {
|
|
Id int64 `json:"id" dc:"主键ID"`
|
|
DeptId int `json:"deptId" dc:"企业客户ID"`
|
|
AccountType int `json:"accountType" dc:"提现账号类型,1:支付宝,2:微信"`
|
|
AccountName string `json:"accountName" dc:"账户名称/真实姓名"`
|
|
Mobile string `json:"mobile" dc:"手机号"`
|
|
IsDefault int `json:"isDefault" dc:"是否默认账号:0-否 1-是"`
|
|
Enabled int `json:"enabled" dc:"是否启用:0-未启用 1-启用"`
|
|
Status int `json:"status" dc:"状态:0-禁用 1-正常"`
|
|
TenantId string `json:"tenantId" dc:"租户ID"`
|
|
CreatedDept int64 `json:"createdDept" dc:"创建部门ID"`
|
|
CreatedBy int64 `json:"createdBy" dc:"创建者ID"`
|
|
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者ID摘要信息"`
|
|
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
|
UpdatedBy int64 `json:"updatedBy" dc:"更新者ID"`
|
|
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者ID摘要信息"`
|
|
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
|
}
|
|
|
|
// TCustWithdrawAccountExportModel 导出客户提现账户表
|
|
type TCustWithdrawAccountExportModel struct {
|
|
Id int64 `json:"id" dc:"主键ID"`
|
|
DeptId int `json:"deptId" dc:"企业客户ID"`
|
|
AccountType int `json:"accountType" dc:"提现账号类型,1:支付宝,2:微信"`
|
|
AccountName string `json:"accountName" dc:"账户名称/真实姓名"`
|
|
Mobile string `json:"mobile" dc:"手机号"`
|
|
IsDefault int `json:"isDefault" dc:"是否默认账号:0-否 1-是"`
|
|
Enabled int `json:"enabled" dc:"是否启用:0-未启用 1-启用"`
|
|
Status int `json:"status" dc:"状态:0-禁用 1-正常"`
|
|
TenantId string `json:"tenantId" dc:"租户ID"`
|
|
CreatedDept int64 `json:"createdDept" dc:"创建部门ID"`
|
|
CreatedBy int64 `json:"createdBy" dc:"创建者ID"`
|
|
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
|
UpdatedBy int64 `json:"updatedBy" dc:"更新者ID"`
|
|
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
|
}
|
|
|
|
// TCustWithdrawAccountStatusParam 更新客户提现账户表状态
|
|
type TCustWithdrawAccountStatusParam struct {
|
|
Id int64 `json:"id" v:"required#主键ID不能为空" dc:"主键ID"`
|
|
Status int `json:"status" dc:"状态"`
|
|
}
|
|
|
|
func (in *TCustWithdrawAccountStatusParam) Filter(ctx context.Context) (err error) {
|
|
if in.Id <= 0 {
|
|
err = gerror.New("主键ID不能为空")
|
|
return
|
|
}
|
|
|
|
if in.Status <= 0 {
|
|
err = gerror.New("状态不能为空")
|
|
return
|
|
}
|
|
|
|
if !slices.Contains(consts.StatusSlice, in.Status) {
|
|
err = gerror.New("状态不正确")
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
type TCustWithdrawAccountStatusModel struct{}
|