♻️ 重构代码,加入登录等模块
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/model/entity"
|
||||
)
|
||||
|
||||
@@ -15,22 +15,22 @@ type AppleAccountRecord struct {
|
||||
|
||||
type CardInfoListReq struct {
|
||||
g.Meta `path:"/cardInfo/AppleCard/account/getList" tags:"苹果礼品卡账户" method:"get" summary:"获取苹果账户"`
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
Account string `json:"account" description:"账户"`
|
||||
}
|
||||
|
||||
type CardInfoListRes struct {
|
||||
commonapi.CommonPageRes[entity.V1CardAppleAccountInfo]
|
||||
commonApi.CommonPageRes[entity.V1CardAppleAccountInfo]
|
||||
}
|
||||
|
||||
type CardHistoryInfoListReq struct {
|
||||
g.Meta `path:"/cardInfo/AppleCard/account/getWalletList" tags:"苹果礼品卡账户" method:"get" summary:"获取苹果账户"`
|
||||
commonapi.CommonPageReq
|
||||
commonapi.CommonStrId
|
||||
commonApi.CommonPageReq
|
||||
commonApi.CommonStrId
|
||||
}
|
||||
|
||||
type CardHistoryInfoListRes struct {
|
||||
commonapi.CommonPageRes[entity.V1CardAppleAccountInfoHistory]
|
||||
commonApi.CommonPageRes[entity.V1CardAppleAccountInfoHistory]
|
||||
}
|
||||
|
||||
type CardInfoCreateReq struct {
|
||||
@@ -44,7 +44,7 @@ type CardInfoCreateRes struct {
|
||||
type CardInfoUpdateReq struct {
|
||||
g.Meta `path:"/cardInfo/AppleCard/account/update" tags:"苹果礼品卡账户" method:"put" summary:"修改苹果账户"`
|
||||
AppleAccountRecord
|
||||
commonapi.CommonStrId
|
||||
commonApi.CommonStrId
|
||||
}
|
||||
|
||||
type CardInfoUpdateRes struct {
|
||||
@@ -53,7 +53,7 @@ type CardInfoUpdateRes struct {
|
||||
|
||||
type CardInfoDeleteReq struct {
|
||||
g.Meta `path:"/cardInfo/AppleCard/account/delete" tags:"苹果礼品卡账户" method:"delete" summary:"删除苹果账户"`
|
||||
commonapi.CommonStrId
|
||||
commonApi.CommonStrId
|
||||
}
|
||||
|
||||
type CardInfoDeleteRes struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/model/entity"
|
||||
)
|
||||
|
||||
@@ -13,5 +13,5 @@ type RechargeHistoryListReq struct {
|
||||
}
|
||||
|
||||
type RechargeHistoryListRes struct {
|
||||
commonapi.CommonDataRes[entity.V1CardAppleHistoryInfo]
|
||||
commonApi.CommonDataRes[entity.V1CardAppleHistoryInfo]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/consts"
|
||||
"kami/internal/model/entity"
|
||||
|
||||
@@ -40,7 +40,7 @@ type RechargeSubmitQueryRes struct {
|
||||
// RechargeListReq 礼品卡订单记录
|
||||
type RechargeListReq struct {
|
||||
g.Meta `path:"/cardInfo/appleCard/rechargeOrder/list" tags:"苹果礼品卡充值" method:"get" summary:"获取充值记录列表"`
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
AccountID string `json:"accountId" description:"账户ID"`
|
||||
Attach string `json:"attach" description:"附加信息"`
|
||||
OrderNo string `json:"orderNo" description:"订单ID"`
|
||||
@@ -49,7 +49,7 @@ type RechargeListReq struct {
|
||||
}
|
||||
|
||||
type RechargeListRes struct {
|
||||
commonapi.CommonPageRes[entity.V1CardAppleRechargeInfo]
|
||||
commonApi.CommonPageRes[entity.V1CardAppleRechargeInfo]
|
||||
}
|
||||
|
||||
// RechargeHandlerReq 处理充值订单
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package auth
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"kami/api/auth/v1"
|
||||
)
|
||||
|
||||
type IAuthV1 interface {
|
||||
Login(ctx context.Context, req *v1.LoginReq) (res *v1.LoginRes, err error)
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
type LoginReq struct {
|
||||
g.Meta `path:"/user/login" tags:"登录" method:"post" summary:"软件登录"`
|
||||
UserName string `json:"UserName" v:"required"`
|
||||
Password string `json:"Password" v:"required"`
|
||||
}
|
||||
|
||||
type LoginRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
@@ -3,8 +3,7 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type MenuListReq struct {
|
||||
@@ -13,7 +12,7 @@ type MenuListReq struct {
|
||||
|
||||
type MenuListRes struct {
|
||||
g.Meta `json:"application/json"`
|
||||
commonapi.CommonDataRes[*SysAuthRule]
|
||||
commonApi.CommonDataRes[*SysAuthRule]
|
||||
}
|
||||
|
||||
type MenuCreateReq struct {
|
||||
@@ -36,7 +35,7 @@ type MenuUpdateRes struct {
|
||||
|
||||
type MenuDeleteReq struct {
|
||||
g.Meta `path:"/auth/menu/delete" tags:"菜单信息" method:"delete" summary:"删除菜单信息"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type MenuDeleteRes struct {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"kami/api/commonapi"
|
||||
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type SysAuthRule struct {
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
Name string `json:"name" description:"规则名称"`
|
||||
Title string `json:"title" description:"规则名称"`
|
||||
MenuType uint `json:"menuType" description:"类型 0目录 1菜单 2按钮"`
|
||||
@@ -32,5 +31,5 @@ type SysAuthRuleReq struct {
|
||||
|
||||
type SysAuthRuleWithID struct {
|
||||
SysAuthRuleReq
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
@@ -3,13 +3,12 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type RoleListReq struct {
|
||||
g.Meta `path:"/auth/role/getList" tags:"角色信息" method:"get" summary:"获取角色信息"`
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
}
|
||||
|
||||
type RoleListRes struct {
|
||||
@@ -26,7 +25,7 @@ type RoleCreateRes struct {
|
||||
|
||||
type RoleUpdateReq struct {
|
||||
g.Meta `path:"/auth/role/update" tags:"角色信息" method:"post" summary:"修改角色信息"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type RoleUpdateRes struct {
|
||||
@@ -35,7 +34,7 @@ type RoleUpdateRes struct {
|
||||
|
||||
type RoleDeleteReq struct {
|
||||
g.Meta `path:"/auth/role/delete" tags:"角色信息" method:"delete" summary:"删除角色信息"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type RoleDeleteRes struct {
|
||||
|
||||
@@ -3,12 +3,12 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type TenantListReq struct {
|
||||
g.Meta `path:"/auth/tenant/getList" tags:"用户信息" method:"get" summary:"获取用户信息"`
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
}
|
||||
|
||||
type TenantListRes struct {
|
||||
@@ -25,7 +25,7 @@ type TenantCreateRes struct {
|
||||
|
||||
type TenantUpdateReq struct {
|
||||
g.Meta `path:"/auth/tenant/update" tags:"用户信息" method:"post" summary:"修改用户信息"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type TenantUpdateRes struct {
|
||||
@@ -34,7 +34,7 @@ type TenantUpdateRes struct {
|
||||
|
||||
type TenantDeleteReq struct {
|
||||
g.Meta `path:"/auth/tenant/delete" tags:"用户信息" method:"delete" summary:"删除用户信息"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type TenantDeleteRes struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/model/entity"
|
||||
)
|
||||
|
||||
@@ -14,7 +14,7 @@ type EntranceListReq struct {
|
||||
|
||||
type EntranceListRes struct {
|
||||
g.Meta `json:"application/json"`
|
||||
commonapi.CommonPageRes[entity.V2RoadInfo]
|
||||
commonApi.CommonPageRes[entity.V2RoadInfo]
|
||||
}
|
||||
|
||||
type EntranceCreateReq struct {
|
||||
@@ -28,7 +28,7 @@ type EntranceCreateRes struct {
|
||||
|
||||
type EntranceUpdateReq struct {
|
||||
g.Meta `path:"/channel/entrance/update" tags:"通道信息" method:"post" summary:"修改通道信息"`
|
||||
commonapi.CommonStrId
|
||||
commonApi.CommonStrId
|
||||
Entrance
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ type EntranceUpdateRes struct {
|
||||
|
||||
type EntranceDeleteReq struct {
|
||||
g.Meta `path:"/channel/entrance/delete" tags:"通道信息" method:"delete" summary:"删除通道信息"`
|
||||
commonapi.CommonStrId
|
||||
commonApi.CommonStrId
|
||||
}
|
||||
|
||||
type EntranceDeleteRes struct {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package v1
|
||||
|
||||
import "kami/api/commonapi"
|
||||
import "kami/api/commonApi"
|
||||
|
||||
type EntranceParamsReq struct {
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
Name string `json:"name" description:"通道名称"`
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ type Entrance struct {
|
||||
}
|
||||
|
||||
type EntranceUserRoadWithIDReq struct {
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
EntranceUserRoadReq
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package commonapi
|
||||
package commonApi
|
||||
|
||||
type CommonStrId struct {
|
||||
ID string `json:"id" v:"required#缺失ID"`
|
||||
@@ -21,3 +21,7 @@ type CommonPageRes[T interface{}] struct {
|
||||
type CommonDataRes[T interface{}] struct {
|
||||
List []T `json:"list"`
|
||||
}
|
||||
|
||||
type Author struct {
|
||||
Authorization string `p:"Authorization" in:"header" dc:"Bearer {{token}}"`
|
||||
}
|
||||
@@ -3,12 +3,12 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type WalletListReq struct {
|
||||
g.Meta `path:"/auth/wallet/getList" tags:"钱包信息" method:"get" summary:"获取钱包信息"`
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
}
|
||||
|
||||
type WalletListRes struct {
|
||||
@@ -25,7 +25,7 @@ type WalletCreateRes struct {
|
||||
|
||||
type WalletUpdateReq struct {
|
||||
g.Meta `path:"/auth/wallet/update" tags:"钱包信息" method:"post" summary:"修改钱包信息"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type WalletUpdateRes struct {
|
||||
@@ -34,7 +34,7 @@ type WalletUpdateRes struct {
|
||||
|
||||
type WalletDeleteReq struct {
|
||||
g.Meta `path:"/auth/wallet/delete" tags:"钱包信息" method:"delete" summary:"删除钱包信息"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type WalletDeleteRes struct {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
type MenuLogListReq struct {
|
||||
g.Meta `path:"/auth/menuLog/getList" tags:"钱包流水" method:"get" summary:"获取钱包流水"`
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
}
|
||||
|
||||
type MenuLogListRes struct {
|
||||
@@ -25,7 +25,7 @@ type MenuLogCreateRes struct {
|
||||
|
||||
type MenuLogUpdateReq struct {
|
||||
g.Meta `path:"/auth/menuLog/update" tags:"钱包流水" method:"post" summary:"修改钱包流水"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type MenuLogUpdateRes struct {
|
||||
@@ -34,7 +34,7 @@ type MenuLogUpdateRes struct {
|
||||
|
||||
type MenuLogDeleteReq struct {
|
||||
g.Meta `path:"/auth/menuLog/delete" tags:"钱包流水" method:"delete" summary:"删除钱包流水"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type MenuLogDeleteRes struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type MerchantConfigListReq struct {
|
||||
@@ -13,7 +13,7 @@ type MerchantConfigListReq struct {
|
||||
|
||||
type MerchantConfigListRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonapi.CommonPageRes[MerchantInfoRecord]
|
||||
commonApi.CommonPageRes[MerchantInfoRecord]
|
||||
}
|
||||
|
||||
type MerchantConfigDetailReq struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type MerchantDeployListReq struct {
|
||||
@@ -13,7 +13,7 @@ type MerchantDeployListReq struct {
|
||||
|
||||
type MerchantDeployListRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonapi.CommonDataRes[MerchantDeployRecord]
|
||||
commonApi.CommonDataRes[MerchantDeployRecord]
|
||||
}
|
||||
|
||||
type MerchantDeployDeleteReq struct {
|
||||
@@ -47,7 +47,7 @@ type MerchantDeployUpdateRes struct {
|
||||
|
||||
type MerchantDeployGetDetailReq struct {
|
||||
g.Meta `path:"merchant/deploy/getDetail" tags:"商户部署信息" method:"get" summary:"获取商户部署通道信息"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type MerchantDeployGetDetailRes struct {
|
||||
|
||||
@@ -2,11 +2,11 @@ package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type MerchantListParamsReq struct {
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
MerchantName string `json:"merchantName" description:"商户名称"`
|
||||
MerchantUid string `json:"merchantUid" description:"商户uid"`
|
||||
}
|
||||
@@ -91,5 +91,5 @@ type MerchantDeployRateAdd struct {
|
||||
|
||||
type MerchantDeployRateUpdate struct {
|
||||
MerchantDeployRateAdd
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
type OrderFormListReq struct {
|
||||
g.Meta `path:"/order/orderForm/getList" tags:"实时订单" method:"get" summary:"获取实时订单"`
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
}
|
||||
|
||||
type OrderFormListRes struct {
|
||||
@@ -25,7 +25,7 @@ type OrderFormCreateRes struct {
|
||||
|
||||
type OrderFormUpdateReq struct {
|
||||
g.Meta `path:"/order/orderForm/update" tags:"实时订单" method:"post" summary:"修改实时订单"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type OrderFormUpdateRes struct {
|
||||
@@ -34,7 +34,7 @@ type OrderFormUpdateRes struct {
|
||||
|
||||
type OrderFormDeleteReq struct {
|
||||
g.Meta `path:"/order/orderForm/delete" tags:"实时订单" method:"delete" summary:"删除实时订单"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type OrderFormDeleteRes struct {
|
||||
|
||||
@@ -3,12 +3,12 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type OrderLogListReq struct {
|
||||
g.Meta `path:"/order/log/getList" tags:"订单流水" method:"get" summary:"获取订单流水"`
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
}
|
||||
|
||||
type OrderLogListRes struct {
|
||||
@@ -17,7 +17,7 @@ type OrderLogListRes struct {
|
||||
|
||||
type OrderLogDeleteReq struct {
|
||||
g.Meta `path:"/order/log/delete" tags:"订单流水" method:"delete" summary:"删除订单流水"`
|
||||
commonapi.CommonIntId
|
||||
commonApi.CommonIntId
|
||||
}
|
||||
|
||||
type OrderLogDeleteRes struct {
|
||||
|
||||
@@ -2,7 +2,7 @@ package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type OrderSummaryRecord struct {
|
||||
@@ -22,9 +22,9 @@ type OrderSummaryRecord struct {
|
||||
|
||||
type OrderSummaryGetListReq struct {
|
||||
g.Meta `path:"/orderInfo/summary/getList" tags:"订单汇总" method:"get" summary:"获取订单汇总"`
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
}
|
||||
|
||||
type OrderSummaryGetListRes struct {
|
||||
commonapi.CommonPageRes[OrderSummaryRecord]
|
||||
commonApi.CommonPageRes[OrderSummaryRecord]
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type SimpleAllGetRoadReq struct {
|
||||
@@ -11,7 +11,7 @@ type SimpleAllGetRoadReq struct {
|
||||
}
|
||||
|
||||
type SimpleAllGetRoadRes struct {
|
||||
commonapi.CommonDataRes[RoadSimpleInfo]
|
||||
commonApi.CommonDataRes[RoadSimpleInfo]
|
||||
}
|
||||
|
||||
type RoadSimpleInfo struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
)
|
||||
|
||||
type SimpleAllGetRoadReq struct {
|
||||
@@ -11,7 +11,7 @@ type SimpleAllGetRoadReq struct {
|
||||
}
|
||||
|
||||
type SimpleAllGetRoadRes struct {
|
||||
commonapi.CommonDataRes[RoadPoolSimpleInfo]
|
||||
commonApi.CommonDataRes[RoadPoolSimpleInfo]
|
||||
}
|
||||
|
||||
type RoadPoolSimpleInfo struct {
|
||||
|
||||
24
api/sysUser/sysUser.go
Normal file
24
api/sysUser/sysUser.go
Normal file
@@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
type ISysUserV1 interface {
|
||||
UserMenus(ctx context.Context, req *v1.UserMenusReq) (res *v1.UserMenusRes, err error)
|
||||
UserSearch(ctx context.Context, req *v1.UserSearchReq) (res *v1.UserSearchRes, err error)
|
||||
UserGetParams(ctx context.Context, req *v1.UserGetParamsReq) (res *v1.UserGetParamsRes, err error)
|
||||
UserAdd(ctx context.Context, req *v1.UserAddReq) (res *v1.UserAddRes, err error)
|
||||
UserEdit(ctx context.Context, req *v1.UserEditReq) (res *v1.UserEditRes, err error)
|
||||
UserGetEdit(ctx context.Context, req *v1.UserGetEditReq) (res *v1.UserGetEditRes, err error)
|
||||
UserResetPwd(ctx context.Context, req *v1.UserResetPwdReq) (res *v1.UserResetPwdRes, err error)
|
||||
UserStatus(ctx context.Context, req *v1.UserStatusReq) (res *v1.UserStatusRes, err error)
|
||||
UserDelete(ctx context.Context, req *v1.UserDeleteReq) (res *v1.UserDeleteRes, err error)
|
||||
UserGetByIds(ctx context.Context, req *v1.UserGetByIdsReq) (res *v1.UserGetByIdsRes, err error)
|
||||
}
|
||||
40
api/sysUser/v1/model.go
Normal file
40
api/sysUser/v1/model.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package v1
|
||||
|
||||
import "kami/internal/model/entity"
|
||||
|
||||
type LoginUserRes struct {
|
||||
Id uint64 `orm:"id,primary" json:"id"` //
|
||||
UserName string `orm:"user_name,unique" json:"userName"` // 用户名
|
||||
UserNickname string `orm:"user_nickname" json:"userNickname"` // 用户昵称
|
||||
UserPassword string `orm:"user_password" json:"userPassword"` // 登录密码;cmf_password加密
|
||||
UserSalt string `orm:"user_salt" json:"userSalt"` // 加密盐
|
||||
UserStatus uint `orm:"user_status" json:"userStatus"` // 用户状态;0:禁用,1:正常,2:未验证
|
||||
IsAdmin int `orm:"is_admin" json:"isAdmin"` // 是否后台管理员 1 是 0 否
|
||||
Avatar string `orm:"avatar" json:"avatar"` //头像
|
||||
DeptId uint64 `orm:"dept_id" json:"deptId"` //部门id
|
||||
}
|
||||
|
||||
// SysUserRoleDeptRes 带有部门、角色、岗位信息的用户数据
|
||||
type SysUserRoleDeptRes struct {
|
||||
*entity.V1SysUser
|
||||
RoleInfo []*SysUserRoleInfoRes `json:"roleInfo"`
|
||||
Post []*SysUserPostInfoRes `json:"post"`
|
||||
}
|
||||
|
||||
type SysUserRoleInfoRes struct {
|
||||
RoleId uint `json:"roleId"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type SysUserPostInfoRes struct {
|
||||
PostId int64 `json:"postId"`
|
||||
PostName string `json:"postName"`
|
||||
}
|
||||
|
||||
type SysUserSimpleRes struct {
|
||||
Id uint64 `orm:"id" json:"id"` //
|
||||
Avatar string `orm:"avatar" json:"avatar"` // 头像
|
||||
Sex int `orm:"sex" json:"sex"` // 性别
|
||||
UserName string `orm:"user_name" json:"userName"` // 用户名
|
||||
UserNickname string `orm:"user_nickname" json:"userNickname"` // 用户昵称
|
||||
}
|
||||
124
api/sysUser/v1/sysUser.go
Normal file
124
api/sysUser/v1/sysUser.go
Normal file
@@ -0,0 +1,124 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"kami/api/commonApi"
|
||||
v1 "kami/api/sys_user_login/v1"
|
||||
"kami/internal/model/entity"
|
||||
)
|
||||
|
||||
type UserMenusReq struct {
|
||||
g.Meta `path:"/user/getUserMenus" tags:"用户管理" method:"get" summary:"获取用户菜单"`
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
type UserMenusRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
MenuList []*v1.UserMenus `json:"menuList"`
|
||||
Permissions []string `json:"permissions"`
|
||||
}
|
||||
|
||||
// UserSearchReq 用户搜索请求参数
|
||||
type UserSearchReq struct {
|
||||
g.Meta `path:"/user/list" tags:"用户管理" method:"get" summary:"用户列表"`
|
||||
DeptId string `p:"deptId"` //部门id
|
||||
Mobile string `p:"mobile"`
|
||||
Status string `p:"status"`
|
||||
KeyWords string `p:"keyWords"`
|
||||
commonApi.CommonPageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
type UserSearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.CommonDataRes[*SysUserRoleDeptRes]
|
||||
}
|
||||
|
||||
type UserGetParamsReq struct {
|
||||
g.Meta `path:"/user/params" tags:"用户管理" method:"get" summary:"用户维护参数获取"`
|
||||
}
|
||||
|
||||
type UserGetParamsRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
RoleList []*entity.V1SysRole `json:"roleList"`
|
||||
}
|
||||
|
||||
// SetUserReq 添加修改用户公用请求字段
|
||||
type SetUserReq struct {
|
||||
RoleIds []int64 `p:"roleIds"`
|
||||
Status uint `p:"status"`
|
||||
IsAdmin int `p:"isAdmin"` // 是否后台管理员 1 是 0 否
|
||||
}
|
||||
|
||||
// UserAddReq 添加用户参数
|
||||
type UserAddReq struct {
|
||||
g.Meta `path:"/user/add" tags:"用户管理" method:"post" summary:"添加用户"`
|
||||
*SetUserReq
|
||||
UserName string `p:"userName" v:"required#用户账号不能为空"`
|
||||
Password string `p:"password" v:"required|password#密码不能为空|密码以字母开头,只能包含字母、数字和下划线,长度在6~18之间"`
|
||||
UserSalt string
|
||||
}
|
||||
|
||||
type UserAddRes struct {
|
||||
}
|
||||
|
||||
// UserEditReq 修改用户参数
|
||||
type UserEditReq struct {
|
||||
g.Meta `path:"/user/edit" tags:"用户管理" method:"put" summary:"修改用户"`
|
||||
*SetUserReq
|
||||
UserId int64 `p:"userId" v:"required#用户id不能为空"`
|
||||
}
|
||||
|
||||
type UserEditRes struct {
|
||||
}
|
||||
|
||||
type UserGetEditReq struct {
|
||||
g.Meta `path:"/user/getEdit" tags:"用户管理" method:"get" summary:"获取用户信息"`
|
||||
Id uint64 `p:"id"`
|
||||
}
|
||||
|
||||
type UserGetEditRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
User *entity.V1SysUser `json:"user"`
|
||||
CheckedRoleIds []uint `json:"checkedRoleIds"`
|
||||
CheckedPosts []int64 `json:"checkedPosts"`
|
||||
}
|
||||
|
||||
// UserResetPwdReq 重置用户密码状态参数
|
||||
type UserResetPwdReq struct {
|
||||
g.Meta `path:"/user/resetPwd" tags:"用户管理" method:"put" summary:"重置用户密码"`
|
||||
Id uint64 `p:"userId" v:"required#用户id不能为空"`
|
||||
Password string `p:"password" v:"required|password#密码不能为空|密码以字母开头,只能包含字母、数字和下划线,长度在6~18之间"`
|
||||
}
|
||||
|
||||
type UserResetPwdRes struct {
|
||||
}
|
||||
|
||||
// UserStatusReq 设置用户状态参数
|
||||
type UserStatusReq struct {
|
||||
g.Meta `path:"/user/setStatus" tags:"用户管理" method:"put" summary:"设置用户状态"`
|
||||
Id uint64 `p:"userId" v:"required#用户id不能为空"`
|
||||
UserStatus uint `p:"status" v:"required#用户状态不能为空"`
|
||||
}
|
||||
|
||||
type UserStatusRes struct {
|
||||
}
|
||||
|
||||
type UserDeleteReq struct {
|
||||
g.Meta `path:"/user/delete" tags:"用户管理" method:"delete" summary:"删除用户"`
|
||||
Ids []int `p:"ids" v:"required#ids不能为空"`
|
||||
}
|
||||
|
||||
type UserDeleteRes struct {
|
||||
}
|
||||
|
||||
type UserGetByIdsReq struct {
|
||||
g.Meta `path:"/user/getUsers" tags:"用户管理" method:"get" summary:"同时获取多个用户"`
|
||||
commonApi.Author
|
||||
Ids []int `p:"ids" v:"required#ids不能为空"`
|
||||
}
|
||||
|
||||
type UserGetByIdsRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
List []*SysUserSimpleRes `json:"list"`
|
||||
}
|
||||
20
api/sys_auth_rule/sys_auth_rule.go
Normal file
20
api/sys_auth_rule/sys_auth_rule.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package sys_auth_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"kami/api/sys_auth_rule/v1"
|
||||
)
|
||||
|
||||
type ISysAuthRuleV1 interface {
|
||||
RuleSearch(ctx context.Context, req *v1.RuleSearchReq) (res *v1.RuleSearchRes, err error)
|
||||
RuleAdd(ctx context.Context, req *v1.RuleAddReq) (res *v1.RuleAddRes, err error)
|
||||
RuleGetParams(ctx context.Context, req *v1.RuleGetParamsReq) (res *v1.RuleGetParamsRes, err error)
|
||||
RuleInfo(ctx context.Context, req *v1.RuleInfoReq) (res *v1.RuleInfoRes, err error)
|
||||
RuleUpdate(ctx context.Context, req *v1.RuleUpdateReq) (res *v1.RuleUpdateRes, err error)
|
||||
RuleDelete(ctx context.Context, req *v1.RuleDeleteReq) (res *v1.RuleDeleteRes, err error)
|
||||
}
|
||||
52
api/sys_auth_rule/v1/model.go
Normal file
52
api/sys_auth_rule/v1/model.go
Normal file
@@ -0,0 +1,52 @@
|
||||
package v1
|
||||
|
||||
type SysAuthRuleInfoRes struct {
|
||||
Id uint `orm:"id,primary" json:"id"` //
|
||||
Pid uint `orm:"pid" json:"pid"` // 父ID
|
||||
Name string `orm:"name,unique" json:"name"` // 规则名称
|
||||
Title string `orm:"title" json:"title"` // 规则名称
|
||||
Icon string `orm:"icon" json:"icon"` // 图标
|
||||
Condition string `orm:"condition" json:"condition"` // 条件
|
||||
Remark string `orm:"remark" json:"remark"` // 备注
|
||||
MenuType uint `orm:"menu_type" json:"menuType"` // 类型 0目录 1菜单 2按钮
|
||||
Weigh int `orm:"weigh" json:"weigh"` // 权重
|
||||
IsHide uint `orm:"is_hide" json:"isHide"` // 显示状态
|
||||
IsCached uint `orm:"is_cached" json:"isCached"` // 是否缓存
|
||||
IsAffix uint `orm:"is_affix" json:"isAffix"` //是否固定
|
||||
Path string `orm:"path" json:"path"` // 路由地址
|
||||
Redirect string `orm:"redirect" json:"redirect"` // 跳转路由
|
||||
Component string `orm:"component" json:"component"` // 组件路径
|
||||
IsIframe uint `orm:"is_iframe" json:"isIframe"` // 是否iframe
|
||||
IsLink uint `orm:"is_link" json:"isLink"` // 是否外链 1是 0否
|
||||
LinkUrl string `orm:"link_url" json:"linkUrl"` //链接地址
|
||||
}
|
||||
|
||||
// SysAuthRuleTreeRes 菜单树形结构
|
||||
type SysAuthRuleTreeRes struct {
|
||||
*SysAuthRuleInfoRes
|
||||
Children []*SysAuthRuleTreeRes `json:"children"`
|
||||
}
|
||||
|
||||
type UserMenu struct {
|
||||
Id uint `json:"id"`
|
||||
Pid uint `json:"pid"`
|
||||
Name string `json:"name"`
|
||||
Component string `json:"component"`
|
||||
Path string `json:"path"`
|
||||
*MenuMeta `json:"meta"`
|
||||
}
|
||||
|
||||
type UserMenus struct {
|
||||
*UserMenu `json:""`
|
||||
Children []*UserMenus `json:"children"`
|
||||
}
|
||||
|
||||
type MenuMeta struct {
|
||||
Icon string `json:"icon"`
|
||||
Title string `json:"title"`
|
||||
IsLink string `json:"isLink"`
|
||||
IsHide bool `json:"isHide"`
|
||||
IsKeepAlive bool `json:"isKeepAlive"`
|
||||
IsAffix bool `json:"isAffix"`
|
||||
IsIframe bool `json:"isIframe"`
|
||||
}
|
||||
104
api/sys_auth_rule/v1/sys_auth_rule.go
Normal file
104
api/sys_auth_rule/v1/sys_auth_rule.go
Normal file
@@ -0,0 +1,104 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/model/entity"
|
||||
)
|
||||
|
||||
type RuleSearchReq struct {
|
||||
g.Meta `path:"/menu/list" tags:"菜单管理" method:"get" summary:"菜单列表"`
|
||||
commonApi.Author
|
||||
Title string `p:"menuName" `
|
||||
Component string `p:"component"`
|
||||
}
|
||||
|
||||
type RuleListRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
Rules []*SysAuthRuleTreeRes `json:"rules"`
|
||||
}
|
||||
|
||||
type RuleAddReq struct {
|
||||
g.Meta `path:"/menu/add" tags:"菜单管理" method:"post" summary:"添加菜单"`
|
||||
commonApi.Author
|
||||
MenuType uint `p:"menuType" v:"min:0|max:2#菜单类型最小值为:min|菜单类型最大值为:max"`
|
||||
Pid uint `p:"parentId" v:"min:0"`
|
||||
Name string `p:"name" v:"required#请填写规则名称"`
|
||||
Title string `p:"menuName" v:"required|length:1,100#请填写标题|标题长度在:min到:max位"`
|
||||
Icon string `p:"icon"`
|
||||
Weigh int `p:"menuSort" `
|
||||
Condition string `p:"condition" `
|
||||
Remark string `p:"remark" `
|
||||
IsHide uint `p:"isHide"`
|
||||
Path string `p:"path"`
|
||||
Redirect string `p:"redirect"` // 路由重定向
|
||||
Roles []uint `p:"roles"` // 角色ids
|
||||
Component string `p:"component" v:"required-if:menuType,1#组件路径不能为空"`
|
||||
IsLink uint `p:"isLink"`
|
||||
IsIframe uint `p:"isIframe"`
|
||||
IsCached uint `p:"isKeepAlive"`
|
||||
IsAffix uint `p:"isAffix"`
|
||||
LinkUrl string `p:"linkUrl"`
|
||||
}
|
||||
|
||||
type RuleAddRes struct {
|
||||
}
|
||||
|
||||
type RuleGetParamsReq struct {
|
||||
g.Meta `path:"/menu/getParams" tags:"菜单管理" method:"get" summary:"获取添加、编辑菜单相关参数"`
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
type RuleGetParamsRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
Roles []*entity.V1SysRole `json:"roles"`
|
||||
Menus []*SysAuthRuleInfoRes `json:"menus"`
|
||||
}
|
||||
|
||||
type RuleInfoReq struct {
|
||||
g.Meta `path:"/menu/get" tags:"菜单管理" method:"get" summary:"获取菜单信息"`
|
||||
commonApi.Author
|
||||
Id uint `p:"required#菜单id必须"`
|
||||
}
|
||||
|
||||
type RuleInfoRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
Rule *entity.V1SysAuthRule `json:"rule"`
|
||||
RoleIds []uint `json:"roleIds"`
|
||||
}
|
||||
|
||||
type RuleUpdateReq struct {
|
||||
g.Meta `path:"/menu/update" tags:"菜单管理" method:"put" summary:"修改菜单"`
|
||||
commonApi.Author
|
||||
Id uint `p:"id" v:"required#id必须"`
|
||||
MenuType uint `p:"menuType" v:"min:0|max:2#菜单类型最小值为:min|菜单类型最大值为:max"`
|
||||
Pid uint `p:"parentId" v:"min:0"`
|
||||
Name string `p:"name" v:"required#请填写规则名称"`
|
||||
Title string `p:"menuName" v:"required|length:1,100#请填写标题|标题长度在:min到:max位"`
|
||||
Icon string `p:"icon"`
|
||||
Weigh int `p:"menuSort" `
|
||||
Condition string `p:"condition" `
|
||||
Remark string `p:"remark" `
|
||||
IsHide uint `p:"isHide"`
|
||||
Path string `p:"path"`
|
||||
Redirect string `p:"redirect"` // 路由重定向
|
||||
Roles []uint `p:"roles"` // 角色ids
|
||||
Component string `p:"component" v:"required-if:menuType,1#组件路径不能为空"`
|
||||
IsLink uint `p:"isLink"`
|
||||
IsIframe uint `p:"isIframe"`
|
||||
IsCached uint `p:"isKeepAlive"`
|
||||
IsAffix uint `p:"isAffix"`
|
||||
LinkUrl string `p:"linkUrl"`
|
||||
}
|
||||
|
||||
type RuleUpdateRes struct {
|
||||
}
|
||||
|
||||
type RuleDeleteReq struct {
|
||||
g.Meta `path:"/menu/delete" tags:"菜单管理" method:"delete" summary:"删除菜单"`
|
||||
commonApi.Author
|
||||
Ids []int `p:"ids" v:"required#菜单id必须"`
|
||||
}
|
||||
|
||||
type RuleDeleteRes struct {
|
||||
}
|
||||
20
api/sys_role/sys_role.go
Normal file
20
api/sys_role/sys_role.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package sys_role
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
type ISysRoleV1 interface {
|
||||
RoleList(ctx context.Context, req *v1.RoleListReq) (res *v1.RoleListRes, err error)
|
||||
RoleGetParams(ctx context.Context, req *v1.RoleGetParamsReq) (res *v1.RoleGetParamsRes, err error)
|
||||
RoleAdd(ctx context.Context, req *v1.RoleAddReq) (res *v1.RoleAddRes, err error)
|
||||
RoleGet(ctx context.Context, req *v1.RoleGetReq) (res *v1.RoleGetRes, err error)
|
||||
RoleEdit(ctx context.Context, req *v1.RoleEditReq) (res *v1.RoleEditRes, err error)
|
||||
RoleDelete(ctx context.Context, req *v1.RoleDeleteReq) (res *v1.RoleDeleteRes, err error)
|
||||
}
|
||||
1
api/sys_role/v1/model.go
Normal file
1
api/sys_role/v1/model.go
Normal file
@@ -0,0 +1 @@
|
||||
package v1
|
||||
73
api/sys_role/v1/sys_role.go
Normal file
73
api/sys_role/v1/sys_role.go
Normal file
@@ -0,0 +1,73 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"kami/api/commonApi"
|
||||
v1 "kami/api/sys_user_login/v1"
|
||||
"kami/internal/model/entity"
|
||||
)
|
||||
|
||||
type RoleListReq struct {
|
||||
g.Meta `path:"/role/list" tags:"角色管理" method:"get" summary:"角色列表"`
|
||||
RoleName string `p:"roleName"` //参数名称
|
||||
Status string `p:"roleStatus"` //状态
|
||||
commonApi.CommonPageReq
|
||||
}
|
||||
|
||||
type RoleListRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.CommonPageRes[*entity.V1SysRole]
|
||||
}
|
||||
|
||||
type RoleGetParamsReq struct {
|
||||
g.Meta `path:"/role/getParams" tags:"角色管理" method:"get" summary:"角色编辑参数"`
|
||||
}
|
||||
|
||||
type RoleGetParamsRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
Menu []*v1.SysAuthRuleInfoRes `json:"menu"`
|
||||
}
|
||||
|
||||
type RoleAddReq struct {
|
||||
g.Meta `path:"/role/add" tags:"角色管理" method:"post" summary:"添加角色"`
|
||||
Name string `p:"name" v:"required#角色名称不能为空"`
|
||||
Status uint `p:"status" `
|
||||
ListOrder uint `p:"listOrder" `
|
||||
Remark string `p:"remark" `
|
||||
MenuIds []uint `p:"menuIds"`
|
||||
}
|
||||
|
||||
type RoleAddRes struct {
|
||||
}
|
||||
|
||||
type RoleGetReq struct {
|
||||
g.Meta `path:"/role/get" tags:"角色管理" method:"get" summary:"获取角色信息"`
|
||||
Id uint `p:"id" v:"required#角色id不能为空"`
|
||||
}
|
||||
|
||||
type RoleGetRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
Role *entity.V1SysRole `json:"role"`
|
||||
MenuIds []int `json:"menuIds"`
|
||||
}
|
||||
|
||||
type RoleEditReq struct {
|
||||
g.Meta `path:"/role/edit" tags:"角色管理" method:"put" summary:"修改角色"`
|
||||
Id int64 `p:"id" v:"required#角色id必须"`
|
||||
Name string `p:"name" v:"required#角色名称不能为空"`
|
||||
Status uint `p:"status" `
|
||||
ListOrder uint `p:"listOrder" `
|
||||
Remark string `p:"remark" `
|
||||
MenuIds []uint `p:"menuIds"`
|
||||
}
|
||||
|
||||
type RoleEditRes struct {
|
||||
}
|
||||
|
||||
type RoleDeleteReq struct {
|
||||
g.Meta `path:"/role/delete" tags:"角色管理" method:"delete" summary:"删除角色"`
|
||||
Ids []int64 `p:"ids" v:"required#角色id不能为空"`
|
||||
}
|
||||
|
||||
type RoleDeleteRes struct {
|
||||
}
|
||||
16
api/sys_user_login/sys_user_login.go
Normal file
16
api/sys_user_login/sys_user_login.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package sys_user_login
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"kami/api/sys_user_login/v1"
|
||||
)
|
||||
|
||||
type ISysUserLoginV1 interface {
|
||||
UserLogin(ctx context.Context, req *v1.UserLoginReq) (res *v1.UserLoginRes, err error)
|
||||
UserLoginOut(ctx context.Context, req *v1.UserLoginOutReq) (res *v1.UserLoginOutRes, err error)
|
||||
}
|
||||
25
api/sys_user_login/v1/model.go
Normal file
25
api/sys_user_login/v1/model.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package v1
|
||||
|
||||
type UserMenu struct {
|
||||
Id uint `json:"id"`
|
||||
Pid uint `json:"pid"`
|
||||
Name string `json:"name"`
|
||||
Component string `json:"component"`
|
||||
Path string `json:"path"`
|
||||
*MenuMeta `json:"meta"`
|
||||
}
|
||||
|
||||
type UserMenus struct {
|
||||
*UserMenu `json:""`
|
||||
Children []*UserMenus `json:"children"`
|
||||
}
|
||||
|
||||
type MenuMeta struct {
|
||||
Icon string `json:"icon"`
|
||||
Title string `json:"title"`
|
||||
IsLink string `json:"isLink"`
|
||||
IsHide bool `json:"isHide"`
|
||||
IsKeepAlive bool `json:"isKeepAlive"`
|
||||
IsAffix bool `json:"isAffix"`
|
||||
IsIframe bool `json:"isIframe"`
|
||||
}
|
||||
40
api/sys_user_login/v1/sys_user_auth_rule_model.go
Normal file
40
api/sys_user_login/v1/sys_user_auth_rule_model.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package v1
|
||||
|
||||
// LoginUserRes 登录返回
|
||||
type LoginUserRes struct {
|
||||
Id uint64 `orm:"id,primary" json:"id"` //
|
||||
UserName string `orm:"user_name,unique" json:"userName"` // 用户名
|
||||
UserNickname string `orm:"user_nickname" json:"userNickname"` // 用户昵称
|
||||
UserPassword string `orm:"user_password" json:"userPassword"` // 登录密码;cmf_password加密
|
||||
UserSalt string `orm:"user_salt" json:"userSalt"` // 加密盐
|
||||
UserStatus uint `orm:"user_status" json:"userStatus"` // 用户状态;0:禁用,1:正常,2:未验证
|
||||
IsAdmin int `orm:"is_admin" json:"isAdmin"` // 是否后台管理员 1 是 0 否
|
||||
Avatar string `orm:"avatar" json:"avatar"` //头像
|
||||
DeptId uint64 `orm:"dept_id" json:"deptId"` //部门id
|
||||
}
|
||||
|
||||
type SysAuthRuleInfoRes struct {
|
||||
Id uint `orm:"id,primary" json:"id"` //
|
||||
Pid uint `orm:"pid" json:"pid"` // 父ID
|
||||
Name string `orm:"name,unique" json:"name"` // 规则名称
|
||||
Title string `orm:"title" json:"title"` // 规则名称
|
||||
Icon string `orm:"icon" json:"icon"` // 图标
|
||||
Condition string `orm:"condition" json:"condition"` // 条件
|
||||
Remark string `orm:"remark" json:"remark"` // 备注
|
||||
MenuType uint `orm:"menu_type" json:"menuType"` // 类型 0目录 1菜单 2按钮
|
||||
Weigh int `orm:"weigh" json:"weigh"` // 权重
|
||||
IsHide uint `orm:"is_hide" json:"isHide"` // 显示状态
|
||||
IsCached uint `orm:"is_cached" json:"isCached"` // 是否缓存
|
||||
IsAffix uint `orm:"is_affix" json:"isAffix"` //是否固定
|
||||
Path string `orm:"path" json:"path"` // 路由地址
|
||||
Redirect string `orm:"redirect" json:"redirect"` // 跳转路由
|
||||
Component string `orm:"component" json:"component"` // 组件路径
|
||||
IsIframe uint `orm:"is_iframe" json:"isIframe"` // 是否iframe
|
||||
IsLink uint `orm:"is_link" json:"isLink"` // 是否外链 1是 0否
|
||||
LinkUrl string `orm:"link_url" json:"linkUrl"` //链接地址
|
||||
}
|
||||
|
||||
type SysAuthRuleTreeRes struct {
|
||||
*SysAuthRuleInfoRes
|
||||
Children []*SysAuthRuleTreeRes `json:"children"`
|
||||
}
|
||||
27
api/sys_user_login/v1/sys_user_login.go
Normal file
27
api/sys_user_login/v1/sys_user_login.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type UserLoginReq struct {
|
||||
g.Meta `path:"/login" tags:"登录" method:"post" summary:"用户登录"`
|
||||
Username string `p:"username" v:"required#用户名不能为空"`
|
||||
Password string `p:"password" v:"required#密码不能为空"`
|
||||
VerifyCode string `p:"verifyCode" v:"required#验证码不能为空"`
|
||||
VerifyKey string `p:"verifyKey"`
|
||||
}
|
||||
|
||||
type UserLoginRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
UserInfo *LoginUserRes `json:"userInfo"`
|
||||
Token string `json:"token"`
|
||||
MenuList []*UserMenus `json:"menuList"`
|
||||
Permissions []string `json:"permissions"`
|
||||
}
|
||||
|
||||
type UserLoginOutReq struct {
|
||||
g.Meta `path:"/logout" tags:"登录" method:"get" summary:"退出登录"`
|
||||
//commonApi.Author
|
||||
}
|
||||
|
||||
type UserLoginOutRes struct {
|
||||
}
|
||||
@@ -3,9 +3,8 @@ package v1
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/model"
|
||||
|
||||
)
|
||||
|
||||
type CreateUserReq struct {
|
||||
@@ -22,7 +21,7 @@ type CreateUserRes struct {
|
||||
|
||||
type GetUserListReq struct {
|
||||
g.Meta `path:"/user/list" tags:"获取用户列表" method:"get" summary:"获取验证码接口"`
|
||||
commonapi.CommonPageReq
|
||||
commonApi.CommonPageReq
|
||||
}
|
||||
|
||||
type GetUserListRes struct {
|
||||
|
||||
2
go.mod
2
go.mod
@@ -19,6 +19,8 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/casbin/casbin/v2 v2.97.0 // indirect
|
||||
github.com/casbin/govaluate v1.1.1 // indirect
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||
github.com/richardlehane/mscfb v1.0.4 // indirect
|
||||
github.com/richardlehane/msoleps v1.0.3 // indirect
|
||||
|
||||
9
go.sum
9
go.sum
@@ -7,6 +7,12 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
|
||||
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
|
||||
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
|
||||
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
||||
github.com/casbin/casbin/v2 v2.97.0 h1:FFHIzY+6fLIcoAB/DKcG5xvscUo9XqRpBniRYhlPWkg=
|
||||
github.com/casbin/casbin/v2 v2.97.0/go.mod h1:jX8uoN4veP85O/n2674r2qtfSXI6myvxW85f6TH50fw=
|
||||
github.com/casbin/govaluate v1.1.0 h1:6xdCWIpE9CwHdZhlVQW+froUrCsjb6/ZYNcXODfLT+E=
|
||||
github.com/casbin/govaluate v1.1.0/go.mod h1:G/UnbIjZk/0uMNaLwZZmFQrR72tYRZWQkO70si/iR7A=
|
||||
github.com/casbin/govaluate v1.1.1 h1:J1rFKIBhiC5xr0APd5HP6rDL+xt+BRoyq1pa4o2i/5c=
|
||||
github.com/casbin/govaluate v1.1.1/go.mod h1:G/UnbIjZk/0uMNaLwZZmFQrR72tYRZWQkO70si/iR7A=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/clbanning/mxj v1.8.5-0.20200714211355-ff02cfb8ea28 h1:LdXxtjzvZYhhUaonAaAKArG3pyC67kGL3YY+6hGG8G4=
|
||||
@@ -44,6 +50,7 @@ github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17w
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/gomodule/redigo v1.8.5 h1:nRAxCa+SVsyjSBrtZmG/cqb6VbTmuRzpg/PoTFlpumc=
|
||||
github.com/gomodule/redigo v1.8.5/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
@@ -126,6 +133,7 @@ golang.org/x/image v0.16.0 h1:9kloLAKhUufZhA12l5fwnx2NZW39/we1UhBesW433jw=
|
||||
golang.org/x/image v0.16.0/go.mod h1:ugSZItdV4nOxyqp56HmXwH0Ry0nBCpjnZdpDaIHdoPs=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
@@ -162,6 +170,7 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
|
||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
|
||||
@@ -11,7 +11,7 @@ gfcli:
|
||||
prefix: v2
|
||||
path: "./internal"
|
||||
- link: "mysql:root:123456@tcp(127.0.0.1:3306)/juhe_pay"
|
||||
tables: "order_info,merchant_info,merchant_deploy_info,account_info,road_info,road_pool_info,card_apple_account_info,card_apple_account_info_history,card_apple_history_info,card_apple_recharge_info"
|
||||
tables: "order_info,merchant_info,merchant_deploy_info,account_info,road_info,road_pool_info,card_apple_account_info,card_apple_account_info_history,card_apple_history_info,card_apple_recharge_info,sys_user,sys_user_login_log,sys_role,sys_casbin_rule,sys_auth_rule"
|
||||
prefix: v1
|
||||
descriptionTag: true
|
||||
noModelComment: true
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"kami/internal/controller/order"
|
||||
"kami/utility/cron"
|
||||
|
||||
"kami/internal/controller/auth"
|
||||
"kami/internal/controller/channel"
|
||||
"kami/internal/controller/merchant"
|
||||
"kami/internal/controller/road"
|
||||
@@ -29,11 +28,11 @@ var Main = gcmd.Command{
|
||||
s.Group("/api", func(group *ghttp.RouterGroup) {
|
||||
group.Middleware(ghttp.MiddlewareCORS)
|
||||
group.Middleware(ghttp.MiddlewareHandlerResponse)
|
||||
group.Middleware(middleware.IFrameAuth)
|
||||
|
||||
group.Middleware(middleware.ErrorHandler)
|
||||
group.Middleware(middleware.IFrameAuth)
|
||||
|
||||
group.Bind(validation.NewV1())
|
||||
group.Bind(auth.NewV1())
|
||||
group.Bind(channel.NewV1())
|
||||
group.Bind(merchant.NewV1())
|
||||
group.Bind(road.NewV1())
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
v1 "kami/api/apple_card_info/v1"
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/model"
|
||||
"kami/internal/model/entity"
|
||||
"kami/internal/service"
|
||||
@@ -16,9 +16,9 @@ func (c *ControllerV1) CardHistoryInfoList(ctx context.Context, req *v1.CardHist
|
||||
CardHistoryInfoListReq: req,
|
||||
})
|
||||
res = &v1.CardHistoryInfoListRes{
|
||||
CommonPageRes: commonapi.CommonPageRes[entity.V1CardAppleAccountInfoHistory]{
|
||||
CommonPageRes: commonApi.CommonPageRes[entity.V1CardAppleAccountInfoHistory]{
|
||||
Total: total,
|
||||
CommonDataRes: commonapi.CommonDataRes[entity.V1CardAppleAccountInfoHistory]{
|
||||
CommonDataRes: commonApi.CommonDataRes[entity.V1CardAppleAccountInfoHistory]{
|
||||
List: data,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
v1 "kami/api/apple_card_info/v1"
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/model"
|
||||
"kami/internal/model/entity"
|
||||
"kami/internal/service"
|
||||
@@ -17,9 +17,9 @@ func (c *ControllerV1) CardInfoList(ctx context.Context, req *v1.CardInfoListReq
|
||||
Account: req.Account,
|
||||
})
|
||||
res = &v1.CardInfoListRes{
|
||||
CommonPageRes: commonapi.CommonPageRes[entity.V1CardAppleAccountInfo]{
|
||||
CommonPageRes: commonApi.CommonPageRes[entity.V1CardAppleAccountInfo]{
|
||||
Total: total,
|
||||
CommonDataRes: commonapi.CommonDataRes[entity.V1CardAppleAccountInfo]{
|
||||
CommonDataRes: commonApi.CommonDataRes[entity.V1CardAppleAccountInfo]{
|
||||
List: list,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@ package apple_card_info
|
||||
|
||||
import (
|
||||
"context"
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/model/entity"
|
||||
"kami/internal/service"
|
||||
|
||||
@@ -16,7 +16,7 @@ func (c *ControllerV1) RechargeHistoryList(ctx context.Context, req *v1.Recharge
|
||||
return
|
||||
}
|
||||
res = &v1.RechargeHistoryListRes{
|
||||
CommonDataRes: commonapi.CommonDataRes[entity.V1CardAppleHistoryInfo]{
|
||||
CommonDataRes: commonApi.CommonDataRes[entity.V1CardAppleHistoryInfo]{
|
||||
List: list,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/gogf/gf/v2/os/gcron"
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
v1 "kami/api/apple_card_info/v1"
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/consts"
|
||||
"kami/internal/err_handler"
|
||||
"kami/internal/model"
|
||||
@@ -96,7 +96,7 @@ func (c *ControllerV1) RechargeItunesCallback(ctx context.Context, req *v1.Recha
|
||||
req.Remark = fmt.Sprintf("%s,%s", req.Remark, "金额异议")
|
||||
} else {
|
||||
_ = appleAccountService.AddWalletAmount(ctx, model.AppleCardWalletInfo{
|
||||
CommonStrId: commonapi.CommonStrId{
|
||||
CommonStrId: commonApi.CommonStrId{
|
||||
ID: orderEntity.AccountId,
|
||||
},
|
||||
OrderNo: req.OrderNo,
|
||||
|
||||
@@ -3,7 +3,7 @@ package apple_card_info
|
||||
import (
|
||||
"context"
|
||||
v1 "kami/api/apple_card_info/v1"
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/err_handler"
|
||||
"kami/internal/model"
|
||||
"kami/internal/model/entity"
|
||||
@@ -24,9 +24,9 @@ func (c *ControllerV1) RechargeList(ctx context.Context, req *v1.RechargeListReq
|
||||
}
|
||||
|
||||
res = &v1.RechargeListRes{
|
||||
CommonPageRes: commonapi.CommonPageRes[entity.V1CardAppleRechargeInfo]{
|
||||
CommonPageRes: commonApi.CommonPageRes[entity.V1CardAppleRechargeInfo]{
|
||||
Total: total,
|
||||
CommonDataRes: commonapi.CommonDataRes[entity.V1CardAppleRechargeInfo]{
|
||||
CommonDataRes: commonApi.CommonDataRes[entity.V1CardAppleRechargeInfo]{
|
||||
List: list,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ func (c *ControllerV1) RechargeOrderModifyActualAmount(ctx context.Context, req
|
||||
//}
|
||||
//err = rechargeOrderService.UpdateActualAmount(ctx, req.OrderNo, req.ActualAmount, consts.AppleRechargeOrderSuccess)
|
||||
//_ = service.AppleAccount().AddWalletAmount(ctx, model.AppleCardWalletInfo{
|
||||
// CommonStrId: commonapi.CommonStrId{ID: orderEntity.AccountId},
|
||||
// CommonStrId: commonApi.CommonStrId{ID: orderEntity.AccountId},
|
||||
// Amount: req.ActualAmount,
|
||||
//}, nil)
|
||||
//if err != nil {
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"kami/internal/consts"
|
||||
"kami/internal/model"
|
||||
"kami/internal/service"
|
||||
"kami/utility/token"
|
||||
|
||||
"kami/api/auth/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) Login(ctx context.Context, req *v1.LoginReq) (res *v1.LoginRes, err error) {
|
||||
// 获取用户
|
||||
userService := service.SysUser()
|
||||
userCenter := service.UserCenter()
|
||||
userInfo, err := userService.GetUserByUserNameOrMobile(ctx, req.UserName)
|
||||
if err != nil {
|
||||
return res, gerror.New("用户不存在")
|
||||
}
|
||||
ok, err := userCenter.CheckPassword(ctx, req.Password, userInfo.Password)
|
||||
if err != nil {
|
||||
return res, gerror.New("密码错误")
|
||||
}
|
||||
if !ok {
|
||||
userService.LoginLog(ctx, model.LoginLogParams{
|
||||
Status: consts.LoginStatusFail,
|
||||
Username: userInfo.Username,
|
||||
Msg: "密码错误",
|
||||
})
|
||||
return res, gerror.New("密码错误")
|
||||
}
|
||||
// 生成token
|
||||
tokenStr, err := token.GenerateUserToken(ctx, userInfo.Id, userInfo.Username)
|
||||
if err != nil {
|
||||
return res, gerror.New("token生成失败")
|
||||
}
|
||||
userService.LoginLog(ctx, model.LoginLogParams{
|
||||
Status: consts.LoginStatusSuccess,
|
||||
Username: userInfo.Username,
|
||||
Msg: "登录成功",
|
||||
})
|
||||
return &v1.LoginRes{
|
||||
Token: tokenStr,
|
||||
}, err
|
||||
}
|
||||
@@ -4,11 +4,10 @@ import (
|
||||
"context"
|
||||
|
||||
"kami/api/channel/v1"
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/internal/model"
|
||||
"kami/internal/model/entity"
|
||||
"kami/internal/service"
|
||||
|
||||
)
|
||||
|
||||
func (c *ControllerV1) EntranceList(ctx context.Context, req *v1.EntranceListReq) (res *v1.EntranceListRes, err error) {
|
||||
@@ -19,9 +18,9 @@ func (c *ControllerV1) EntranceList(ctx context.Context, req *v1.EntranceListReq
|
||||
return res, err
|
||||
}
|
||||
res = &v1.EntranceListRes{
|
||||
CommonPageRes: commonapi.CommonPageRes[entity.V2RoadInfo]{
|
||||
CommonPageRes: commonApi.CommonPageRes[entity.V2RoadInfo]{
|
||||
Total: total,
|
||||
CommonDataRes: commonapi.CommonDataRes[entity.V2RoadInfo]{
|
||||
CommonDataRes: commonApi.CommonDataRes[entity.V2RoadInfo]{
|
||||
List: list,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@ package merchant
|
||||
import (
|
||||
"context"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
v1 "kami/api/merchant/v1"
|
||||
"kami/internal/model"
|
||||
"kami/internal/service"
|
||||
@@ -23,9 +23,9 @@ func (c *ControllerV1) MerchantConfigList(ctx context.Context, req *v1.MerchantC
|
||||
}
|
||||
|
||||
res = &v1.MerchantConfigListRes{
|
||||
CommonPageRes: commonapi.CommonPageRes[v1.MerchantInfoRecord]{
|
||||
CommonPageRes: commonApi.CommonPageRes[v1.MerchantInfoRecord]{
|
||||
Total: total,
|
||||
CommonDataRes: commonapi.CommonDataRes[v1.MerchantInfoRecord]{
|
||||
CommonDataRes: commonApi.CommonDataRes[v1.MerchantInfoRecord]{
|
||||
List: resList,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@ package merchant
|
||||
import (
|
||||
"context"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/api/merchant/v1"
|
||||
"kami/internal/service"
|
||||
)
|
||||
@@ -18,7 +18,7 @@ func (c *ControllerV1) MerchantDeployList(ctx context.Context, req *v1.MerchantD
|
||||
}
|
||||
|
||||
res = &v1.MerchantDeployListRes{
|
||||
CommonDataRes: commonapi.CommonDataRes[v1.MerchantDeployRecord]{
|
||||
CommonDataRes: commonApi.CommonDataRes[v1.MerchantDeployRecord]{
|
||||
List: resList,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package order
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/api/order/v1"
|
||||
"kami/internal/err_handler"
|
||||
"kami/internal/model"
|
||||
@@ -39,8 +39,8 @@ func (c *ControllerV1) OrderSummaryGetList(ctx context.Context, req *v1.OrderSum
|
||||
}
|
||||
|
||||
res = &v1.OrderSummaryGetListRes{
|
||||
CommonPageRes: commonapi.CommonPageRes[v1.OrderSummaryRecord]{
|
||||
CommonDataRes: commonapi.CommonDataRes[v1.OrderSummaryRecord]{
|
||||
CommonPageRes: commonApi.CommonPageRes[v1.OrderSummaryRecord]{
|
||||
CommonDataRes: commonApi.CommonDataRes[v1.OrderSummaryRecord]{
|
||||
List: returnList,
|
||||
},
|
||||
Total: total,
|
||||
|
||||
@@ -3,7 +3,7 @@ package road
|
||||
import (
|
||||
"context"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/api/road/v1"
|
||||
"kami/internal/service"
|
||||
)
|
||||
@@ -18,7 +18,7 @@ func (c *ControllerV1) SimpleAllGetRoad(ctx context.Context, req *v1.SimpleAllGe
|
||||
}
|
||||
|
||||
res = &v1.SimpleAllGetRoadRes{
|
||||
CommonDataRes: commonapi.CommonDataRes[v1.RoadSimpleInfo]{
|
||||
CommonDataRes: commonApi.CommonDataRes[v1.RoadSimpleInfo]{
|
||||
List: resList,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package road_pool
|
||||
import (
|
||||
"context"
|
||||
|
||||
"kami/api/commonapi"
|
||||
"kami/api/commonApi"
|
||||
"kami/api/road_pool/v1"
|
||||
"kami/internal/service"
|
||||
)
|
||||
@@ -18,7 +18,7 @@ func (c *ControllerV1) SimpleAllGetRoad(ctx context.Context, req *v1.SimpleAllGe
|
||||
}
|
||||
|
||||
res = &v1.SimpleAllGetRoadRes{
|
||||
CommonDataRes: commonapi.CommonDataRes[v1.RoadPoolSimpleInfo]{
|
||||
CommonDataRes: commonApi.CommonDataRes[v1.RoadPoolSimpleInfo]{
|
||||
List: tmpResList,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package auth
|
||||
package sysUser
|
||||
15
internal/controller/sysUser/sysUser_new.go
Normal file
15
internal/controller/sysUser/sysUser_new.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"kami/api/sysUser"
|
||||
)
|
||||
|
||||
type ControllerV1 struct{}
|
||||
|
||||
func NewV1() sysUser.ISysUserV1 {
|
||||
return &ControllerV1{}
|
||||
}
|
||||
14
internal/controller/sysUser/sysUser_v1_user_add.go
Normal file
14
internal/controller/sysUser/sysUser_v1_user_add.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserAdd(ctx context.Context, req *v1.UserAddReq) (res *v1.UserAddRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sysUser/sysUser_v1_user_delete.go
Normal file
14
internal/controller/sysUser/sysUser_v1_user_delete.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserDelete(ctx context.Context, req *v1.UserDeleteReq) (res *v1.UserDeleteRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sysUser/sysUser_v1_user_edit.go
Normal file
14
internal/controller/sysUser/sysUser_v1_user_edit.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserEdit(ctx context.Context, req *v1.UserEditReq) (res *v1.UserEditRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sysUser/sysUser_v1_user_get_by_ids.go
Normal file
14
internal/controller/sysUser/sysUser_v1_user_get_by_ids.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserGetByIds(ctx context.Context, req *v1.UserGetByIdsReq) (res *v1.UserGetByIdsRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sysUser/sysUser_v1_user_get_edit.go
Normal file
14
internal/controller/sysUser/sysUser_v1_user_get_edit.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserGetEdit(ctx context.Context, req *v1.UserGetEditReq) (res *v1.UserGetEditRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sysUser/sysUser_v1_user_get_params.go
Normal file
14
internal/controller/sysUser/sysUser_v1_user_get_params.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserGetParams(ctx context.Context, req *v1.UserGetParamsReq) (res *v1.UserGetParamsRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sysUser/sysUser_v1_user_menus.go
Normal file
14
internal/controller/sysUser/sysUser_v1_user_menus.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserMenus(ctx context.Context, req *v1.UserMenusReq) (res *v1.UserMenusRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sysUser/sysUser_v1_user_reset_pwd.go
Normal file
14
internal/controller/sysUser/sysUser_v1_user_reset_pwd.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserResetPwd(ctx context.Context, req *v1.UserResetPwdReq) (res *v1.UserResetPwdRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sysUser/sysUser_v1_user_search.go
Normal file
14
internal/controller/sysUser/sysUser_v1_user_search.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserSearch(ctx context.Context, req *v1.UserSearchReq) (res *v1.UserSearchRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sysUser/sysUser_v1_user_status.go
Normal file
14
internal/controller/sysUser/sysUser_v1_user_status.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sysUser
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sysUser/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserStatus(ctx context.Context, req *v1.UserStatusReq) (res *v1.UserStatusRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
5
internal/controller/sys_auth_rule/sys_auth_rule.go
Normal file
5
internal/controller/sys_auth_rule/sys_auth_rule.go
Normal file
@@ -0,0 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package sys_auth_rule
|
||||
15
internal/controller/sys_auth_rule/sys_auth_rule_new.go
Normal file
15
internal/controller/sys_auth_rule/sys_auth_rule_new.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package sys_auth_rule
|
||||
|
||||
import (
|
||||
"kami/api/sys_auth_rule"
|
||||
)
|
||||
|
||||
type ControllerV1 struct{}
|
||||
|
||||
func NewV1() sys_auth_rule.ISysAuthRuleV1 {
|
||||
return &ControllerV1{}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package sys_auth_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_auth_rule/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RuleAdd(ctx context.Context, req *v1.RuleAddReq) (res *v1.RuleAddRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package sys_auth_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_auth_rule/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RuleDelete(ctx context.Context, req *v1.RuleDeleteReq) (res *v1.RuleDeleteRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package sys_auth_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_auth_rule/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RuleGetParams(ctx context.Context, req *v1.RuleGetParamsReq) (res *v1.RuleGetParamsRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package sys_auth_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_auth_rule/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RuleInfo(ctx context.Context, req *v1.RuleInfoReq) (res *v1.RuleInfoRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package sys_auth_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_auth_rule/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RuleSearch(ctx context.Context, req *v1.RuleSearchReq) (res *v1.RuleSearchRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package sys_auth_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_auth_rule/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RuleUpdate(ctx context.Context, req *v1.RuleUpdateReq) (res *v1.RuleUpdateRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
5
internal/controller/sys_role/sys_role.go
Normal file
5
internal/controller/sys_role/sys_role.go
Normal file
@@ -0,0 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package sys_role
|
||||
15
internal/controller/sys_role/sys_role_new.go
Normal file
15
internal/controller/sys_role/sys_role_new.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package sys_role
|
||||
|
||||
import (
|
||||
"kami/api/sys_role"
|
||||
)
|
||||
|
||||
type ControllerV1 struct{}
|
||||
|
||||
func NewV1() sys_role.ISysRoleV1 {
|
||||
return &ControllerV1{}
|
||||
}
|
||||
14
internal/controller/sys_role/sys_role_v1_role_add.go
Normal file
14
internal/controller/sys_role/sys_role_v1_role_add.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_role
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleAdd(ctx context.Context, req *v1.RoleAddReq) (res *v1.RoleAddRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sys_role/sys_role_v1_role_delete.go
Normal file
14
internal/controller/sys_role/sys_role_v1_role_delete.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_role
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleDelete(ctx context.Context, req *v1.RoleDeleteReq) (res *v1.RoleDeleteRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sys_role/sys_role_v1_role_edit.go
Normal file
14
internal/controller/sys_role/sys_role_v1_role_edit.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_role
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleEdit(ctx context.Context, req *v1.RoleEditReq) (res *v1.RoleEditRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sys_role/sys_role_v1_role_get.go
Normal file
14
internal/controller/sys_role/sys_role_v1_role_get.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_role
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleGet(ctx context.Context, req *v1.RoleGetReq) (res *v1.RoleGetRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sys_role/sys_role_v1_role_get_params.go
Normal file
14
internal/controller/sys_role/sys_role_v1_role_get_params.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_role
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleGetParams(ctx context.Context, req *v1.RoleGetParamsReq) (res *v1.RoleGetParamsRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sys_role/sys_role_v1_role_list.go
Normal file
14
internal/controller/sys_role/sys_role_v1_role_list.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_role
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleList(ctx context.Context, req *v1.RoleListReq) (res *v1.RoleListRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
5
internal/controller/sys_rule/sys_rule.go
Normal file
5
internal/controller/sys_rule/sys_rule.go
Normal file
@@ -0,0 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package sys_rule
|
||||
@@ -1,15 +1,11 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package auth
|
||||
|
||||
import (
|
||||
"kami/api/auth"
|
||||
)
|
||||
package sys_rule
|
||||
|
||||
type ControllerV1 struct{}
|
||||
|
||||
func NewV1() auth.IAuthV1 {
|
||||
func NewV1() sys_rule.ISysRuleV1 {
|
||||
return &ControllerV1{}
|
||||
}
|
||||
14
internal/controller/sys_rule/sys_rule_v1_role_add.go
Normal file
14
internal/controller/sys_rule/sys_rule_v1_role_add.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleAdd(ctx context.Context, req *v1.RoleAddReq) (res *v1.RoleAddRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sys_rule/sys_rule_v1_role_delete.go
Normal file
14
internal/controller/sys_rule/sys_rule_v1_role_delete.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleDelete(ctx context.Context, req *v1.RoleDeleteReq) (res *v1.RoleDeleteRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sys_rule/sys_rule_v1_role_edit.go
Normal file
14
internal/controller/sys_rule/sys_rule_v1_role_edit.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleEdit(ctx context.Context, req *v1.RoleEditReq) (res *v1.RoleEditRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sys_rule/sys_rule_v1_role_get.go
Normal file
14
internal/controller/sys_rule/sys_rule_v1_role_get.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleGet(ctx context.Context, req *v1.RoleGetReq) (res *v1.RoleGetRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sys_rule/sys_rule_v1_role_get_params.go
Normal file
14
internal/controller/sys_rule/sys_rule_v1_role_get_params.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleGetParams(ctx context.Context, req *v1.RoleGetParamsReq) (res *v1.RoleGetParamsRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
14
internal/controller/sys_rule/sys_rule_v1_role_list.go
Normal file
14
internal/controller/sys_rule/sys_rule_v1_role_list.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sys_rule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_role/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) RoleList(ctx context.Context, req *v1.RoleListReq) (res *v1.RoleListRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
5
internal/controller/sys_user_login/sys_user_login.go
Normal file
5
internal/controller/sys_user_login/sys_user_login.go
Normal file
@@ -0,0 +1,5 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package sys_user_login
|
||||
15
internal/controller/sys_user_login/sys_user_login_new.go
Normal file
15
internal/controller/sys_user_login/sys_user_login_new.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package sys_user_login
|
||||
|
||||
import (
|
||||
"kami/api/sys_user_login"
|
||||
)
|
||||
|
||||
type ControllerV1 struct{}
|
||||
|
||||
func NewV1() sys_user_login.ISysUserLoginV1 {
|
||||
return &ControllerV1{}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package sys_user_login
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_user_login/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserLogin(ctx context.Context, req *v1.UserLoginReq) (res *v1.UserLoginRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package sys_user_login
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
|
||||
"kami/api/sys_user_login/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) UserLoginOut(ctx context.Context, req *v1.UserLoginOutReq) (res *v1.UserLoginOutRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
}
|
||||
115
internal/dao/internal/v_1_sys_auth_rule.go
Normal file
115
internal/dao/internal/v_1_sys_auth_rule.go
Normal file
@@ -0,0 +1,115 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// V1SysAuthRuleDao is the data access object for table sys_auth_rule.
|
||||
type V1SysAuthRuleDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of current DAO.
|
||||
columns V1SysAuthRuleColumns // columns contains all the column names of Table for convenient usage.
|
||||
}
|
||||
|
||||
// V1SysAuthRuleColumns defines and stores column names for table sys_auth_rule.
|
||||
type V1SysAuthRuleColumns struct {
|
||||
Id string //
|
||||
Pid string // 父ID
|
||||
Name string // 规则名称
|
||||
Title string // 规则名称
|
||||
Icon string // 图标
|
||||
Condition string // 条件
|
||||
Remark string // 备注
|
||||
MenuType string // 类型 0目录 1菜单 2按钮
|
||||
Weigh string // 权重
|
||||
IsHide string // 显示状态
|
||||
Path string // 路由地址
|
||||
Component string // 组件路径
|
||||
IsLink string // 是否外链 1是 0否
|
||||
ModuleType string // 所属模块
|
||||
ModelId string // 模型ID
|
||||
IsIframe string // 是否内嵌iframe
|
||||
IsCached string // 是否缓存
|
||||
Redirect string // 路由重定向地址
|
||||
IsAffix string // 是否固定
|
||||
LinkUrl string // 链接地址
|
||||
CreatedAt string // 创建日期
|
||||
UpdatedAt string // 修改日期
|
||||
}
|
||||
|
||||
// v1SysAuthRuleColumns holds the columns for table sys_auth_rule.
|
||||
var v1SysAuthRuleColumns = V1SysAuthRuleColumns{
|
||||
Id: "id",
|
||||
Pid: "pid",
|
||||
Name: "name",
|
||||
Title: "title",
|
||||
Icon: "icon",
|
||||
Condition: "condition",
|
||||
Remark: "remark",
|
||||
MenuType: "menu_type",
|
||||
Weigh: "weigh",
|
||||
IsHide: "is_hide",
|
||||
Path: "path",
|
||||
Component: "component",
|
||||
IsLink: "is_link",
|
||||
ModuleType: "module_type",
|
||||
ModelId: "model_id",
|
||||
IsIframe: "is_iframe",
|
||||
IsCached: "is_cached",
|
||||
Redirect: "redirect",
|
||||
IsAffix: "is_affix",
|
||||
LinkUrl: "link_url",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewV1SysAuthRuleDao creates and returns a new DAO object for table data access.
|
||||
func NewV1SysAuthRuleDao() *V1SysAuthRuleDao {
|
||||
return &V1SysAuthRuleDao{
|
||||
group: "default",
|
||||
table: "sys_auth_rule",
|
||||
columns: v1SysAuthRuleColumns,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of current DAO.
|
||||
func (dao *V1SysAuthRuleDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of current dao.
|
||||
func (dao *V1SysAuthRuleDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of current dao.
|
||||
func (dao *V1SysAuthRuleDao) Columns() V1SysAuthRuleColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the configuration group name of database of current dao.
|
||||
func (dao *V1SysAuthRuleDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
|
||||
func (dao *V1SysAuthRuleDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note that, you should not Commit or Rollback the transaction in function f
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *V1SysAuthRuleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
85
internal/dao/internal/v_1_sys_casbin_rule.go
Normal file
85
internal/dao/internal/v_1_sys_casbin_rule.go
Normal file
@@ -0,0 +1,85 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// V1SysCasbinRuleDao is the data access object for table sys_casbin_rule.
|
||||
type V1SysCasbinRuleDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of current DAO.
|
||||
columns V1SysCasbinRuleColumns // columns contains all the column names of Table for convenient usage.
|
||||
}
|
||||
|
||||
// V1SysCasbinRuleColumns defines and stores column names for table sys_casbin_rule.
|
||||
type V1SysCasbinRuleColumns struct {
|
||||
Ptype string //
|
||||
V0 string //
|
||||
V1 string //
|
||||
V2 string //
|
||||
V3 string //
|
||||
V4 string //
|
||||
V5 string //
|
||||
}
|
||||
|
||||
// v1SysCasbinRuleColumns holds the columns for table sys_casbin_rule.
|
||||
var v1SysCasbinRuleColumns = V1SysCasbinRuleColumns{
|
||||
Ptype: "ptype",
|
||||
V0: "v0",
|
||||
V1: "v1",
|
||||
V2: "v2",
|
||||
V3: "v3",
|
||||
V4: "v4",
|
||||
V5: "v5",
|
||||
}
|
||||
|
||||
// NewV1SysCasbinRuleDao creates and returns a new DAO object for table data access.
|
||||
func NewV1SysCasbinRuleDao() *V1SysCasbinRuleDao {
|
||||
return &V1SysCasbinRuleDao{
|
||||
group: "default",
|
||||
table: "sys_casbin_rule",
|
||||
columns: v1SysCasbinRuleColumns,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of current DAO.
|
||||
func (dao *V1SysCasbinRuleDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of current dao.
|
||||
func (dao *V1SysCasbinRuleDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of current dao.
|
||||
func (dao *V1SysCasbinRuleDao) Columns() V1SysCasbinRuleColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the configuration group name of database of current dao.
|
||||
func (dao *V1SysCasbinRuleDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
|
||||
func (dao *V1SysCasbinRuleDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note that, you should not Commit or Rollback the transaction in function f
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *V1SysCasbinRuleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
87
internal/dao/internal/v_1_sys_role.go
Normal file
87
internal/dao/internal/v_1_sys_role.go
Normal file
@@ -0,0 +1,87 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// V1SysRoleDao is the data access object for table sys_role.
|
||||
type V1SysRoleDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of current DAO.
|
||||
columns V1SysRoleColumns // columns contains all the column names of Table for convenient usage.
|
||||
}
|
||||
|
||||
// V1SysRoleColumns defines and stores column names for table sys_role.
|
||||
type V1SysRoleColumns struct {
|
||||
Id string //
|
||||
Status string // 状态;0:禁用;1:正常
|
||||
ListOrder string // 排序
|
||||
Name string // 角色名称
|
||||
Remark string // 备注
|
||||
DataScope string // 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// v1SysRoleColumns holds the columns for table sys_role.
|
||||
var v1SysRoleColumns = V1SysRoleColumns{
|
||||
Id: "id",
|
||||
Status: "status",
|
||||
ListOrder: "list_order",
|
||||
Name: "name",
|
||||
Remark: "remark",
|
||||
DataScope: "data_scope",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewV1SysRoleDao creates and returns a new DAO object for table data access.
|
||||
func NewV1SysRoleDao() *V1SysRoleDao {
|
||||
return &V1SysRoleDao{
|
||||
group: "default",
|
||||
table: "sys_role",
|
||||
columns: v1SysRoleColumns,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of current DAO.
|
||||
func (dao *V1SysRoleDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of current dao.
|
||||
func (dao *V1SysRoleDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of current dao.
|
||||
func (dao *V1SysRoleDao) Columns() V1SysRoleColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the configuration group name of database of current dao.
|
||||
func (dao *V1SysRoleDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
|
||||
func (dao *V1SysRoleDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note that, you should not Commit or Rollback the transaction in function f
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *V1SysRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
91
internal/dao/internal/v_1_sys_user.go
Normal file
91
internal/dao/internal/v_1_sys_user.go
Normal file
@@ -0,0 +1,91 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// V1SysUserDao is the data access object for table sys_user.
|
||||
type V1SysUserDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of current DAO.
|
||||
columns V1SysUserColumns // columns contains all the column names of Table for convenient usage.
|
||||
}
|
||||
|
||||
// V1SysUserColumns defines and stores column names for table sys_user.
|
||||
type V1SysUserColumns struct {
|
||||
Id string // ID
|
||||
Username string // 账号
|
||||
UserPassword string // 密码
|
||||
IsAdmin string // 是否是管理员
|
||||
Phone string // 手机号
|
||||
CreatedAt string //
|
||||
UpdatedAt string //
|
||||
DeletedAt string //
|
||||
UserStatus string // 用户状态
|
||||
UserSalt string //
|
||||
}
|
||||
|
||||
// v1SysUserColumns holds the columns for table sys_user.
|
||||
var v1SysUserColumns = V1SysUserColumns{
|
||||
Id: "id",
|
||||
Username: "username",
|
||||
UserPassword: "user_password",
|
||||
IsAdmin: "is_admin",
|
||||
Phone: "phone",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
UserStatus: "user_status",
|
||||
UserSalt: "user_salt",
|
||||
}
|
||||
|
||||
// NewV1SysUserDao creates and returns a new DAO object for table data access.
|
||||
func NewV1SysUserDao() *V1SysUserDao {
|
||||
return &V1SysUserDao{
|
||||
group: "default",
|
||||
table: "sys_user",
|
||||
columns: v1SysUserColumns,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of current DAO.
|
||||
func (dao *V1SysUserDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of current dao.
|
||||
func (dao *V1SysUserDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of current dao.
|
||||
func (dao *V1SysUserDao) Columns() V1SysUserColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the configuration group name of database of current dao.
|
||||
func (dao *V1SysUserDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
|
||||
func (dao *V1SysUserDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note that, you should not Commit or Rollback the transaction in function f
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *V1SysUserDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
97
internal/dao/internal/v_1_sys_user_login_log.go
Normal file
97
internal/dao/internal/v_1_sys_user_login_log.go
Normal file
@@ -0,0 +1,97 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// V1SysUserLoginLogDao is the data access object for table sys_user_login_log.
|
||||
type V1SysUserLoginLogDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of current DAO.
|
||||
columns V1SysUserLoginLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
}
|
||||
|
||||
// V1SysUserLoginLogColumns defines and stores column names for table sys_user_login_log.
|
||||
type V1SysUserLoginLogColumns struct {
|
||||
Id string //
|
||||
UserId string //
|
||||
LoginName string // 登录名
|
||||
IpAddr string // 登录IP
|
||||
LoginLocation string // 登录地点
|
||||
UserAgent string //
|
||||
Browser string //
|
||||
Os string //
|
||||
CreatedAt string // 登录时间
|
||||
Status string // 登录状态 1登录成功2登录失败
|
||||
Message string //
|
||||
LoginTime string // 登录时长
|
||||
Module string //
|
||||
}
|
||||
|
||||
// v1SysUserLoginLogColumns holds the columns for table sys_user_login_log.
|
||||
var v1SysUserLoginLogColumns = V1SysUserLoginLogColumns{
|
||||
Id: "id",
|
||||
UserId: "user_id",
|
||||
LoginName: "login_name",
|
||||
IpAddr: "ip_addr",
|
||||
LoginLocation: "login_location",
|
||||
UserAgent: "user_agent",
|
||||
Browser: "browser",
|
||||
Os: "os",
|
||||
CreatedAt: "created_at",
|
||||
Status: "status",
|
||||
Message: "message",
|
||||
LoginTime: "login_time",
|
||||
Module: "module",
|
||||
}
|
||||
|
||||
// NewV1SysUserLoginLogDao creates and returns a new DAO object for table data access.
|
||||
func NewV1SysUserLoginLogDao() *V1SysUserLoginLogDao {
|
||||
return &V1SysUserLoginLogDao{
|
||||
group: "default",
|
||||
table: "sys_user_login_log",
|
||||
columns: v1SysUserLoginLogColumns,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of current DAO.
|
||||
func (dao *V1SysUserLoginLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of current dao.
|
||||
func (dao *V1SysUserLoginLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of current dao.
|
||||
func (dao *V1SysUserLoginLogDao) Columns() V1SysUserLoginLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the configuration group name of database of current dao.
|
||||
func (dao *V1SysUserLoginLogDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
|
||||
func (dao *V1SysUserLoginLogDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
return dao.DB().Model(dao.table).Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note that, you should not Commit or Rollback the transaction in function f
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *V1SysUserLoginLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
27
internal/dao/v_1_sys_auth_rule.go
Normal file
27
internal/dao/v_1_sys_auth_rule.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"kami/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalV1SysAuthRuleDao is internal type for wrapping internal DAO implements.
|
||||
type internalV1SysAuthRuleDao = *internal.V1SysAuthRuleDao
|
||||
|
||||
// v1SysAuthRuleDao is the data access object for table sys_auth_rule.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
type v1SysAuthRuleDao struct {
|
||||
internalV1SysAuthRuleDao
|
||||
}
|
||||
|
||||
var (
|
||||
// V1SysAuthRule is globally public accessible object for table sys_auth_rule operations.
|
||||
V1SysAuthRule = v1SysAuthRuleDao{
|
||||
internal.NewV1SysAuthRuleDao(),
|
||||
}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
27
internal/dao/v_1_sys_casbin_rule.go
Normal file
27
internal/dao/v_1_sys_casbin_rule.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"kami/internal/dao/internal"
|
||||
)
|
||||
|
||||
// internalV1SysCasbinRuleDao is internal type for wrapping internal DAO implements.
|
||||
type internalV1SysCasbinRuleDao = *internal.V1SysCasbinRuleDao
|
||||
|
||||
// v1SysCasbinRuleDao is the data access object for table sys_casbin_rule.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
type v1SysCasbinRuleDao struct {
|
||||
internalV1SysCasbinRuleDao
|
||||
}
|
||||
|
||||
var (
|
||||
// V1SysCasbinRule is globally public accessible object for table sys_casbin_rule operations.
|
||||
V1SysCasbinRule = v1SysCasbinRuleDao{
|
||||
internal.NewV1SysCasbinRuleDao(),
|
||||
}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user