chore: 初始开源发布

iotlcm-app:小程序端 + 用户端服务。

- app/:uni-app 小程序前端(基于 unibest,MIT)
  - 微信 AppID → YOUR_WX_APPID,uni-app AppID → __UNI__YOURAPPID
  - 内网后端地址 → admin.iotlcm.example.com
  - 应用标题与 unibest 模板 README 重写(保留上游致谢与 MIT 声明)
- server/:GoFrame 用户端服务(基于 XiuAdmin,Apache-2.0)
  - module xiuadmin → git.5iot.com/iotlcm-public/iotlcm-app(360 文件)
  - 支付回调地址 → app.iotlcm.example.com,商户名与应用名泛化
  - 真实手机号 → 合法 11 位编造号(保留号段前 3 位 + 后 4 位)
  - 依赖号码尾部的断言同步更新
  - 补 server/LICENSE(Apache-2.0)
- 移除内部资产:CI 触发器
- 补根 README,LF 行尾 + .gitattributes

已知:TestSysDept_RefreshDeptAncestors 在源仓同一提交上同样失败,属既有缺陷。
This commit is contained in:
MiFaZhan
2026-10-26 14:01:25 +08:00
commit 2ed5dfa6a1
1013 changed files with 138466 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
.git
.idea
.env
xiujie-wechat/
*.log
resource/log/
resource/cache/
resource/upload/
resource/certs/
tmp/
*.exe
*.test
+44
View File
@@ -0,0 +1,44 @@
# Build context: server/
# Example:
# docker build -f Dockerfile -t iotlcm-app-server:latest .
FROM crpi-svwhn8x8nvask31h.cn-beijing.personal.cr.aliyuncs.com/xjzlpublic/golangalpine:1.25.7-alpine3.23 AS builder
ENV GIT_TERMINAL_PROMPT=0
ENV GOPRIVATE=git.xiujie.cn
ENV GOPROXY=https://goproxy.cn,direct
ENV TZ=Asia/Shanghai
WORKDIR /src/server
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
ARG BuildVersion=0.0.0
ARG BuildTime=
ARG CommitID=
RUN go build -v -o /out/iotlcm-app-server \
-ldflags "-X main.BuildVersion=${BuildVersion} -X main.CommitID=${CommitID} -X main.BuildTime=${BuildTime}" \
.
FROM crpi-svwhn8x8nvask31h.cn-beijing.personal.cr.aliyuncs.com/xjzlpublic/alpine AS runtime
ENV TZ=Asia/Shanghai
ENV APP_UPLOAD_DIR=/data/app/iotlcmadmin-web-svc/upload
WORKDIR /app
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
COPY --from=builder /out/iotlcm-app-server /app/iotlcm-app-server
COPY resource/public /app/resource/public
# The environment-specific config is mounted read-only by Docker Compose at runtime.
RUN mkdir -p "${APP_UPLOAD_DIR}" /app/config /app/resource/log/server /app/resource/log/server/sql /app/resource/cache /app/resource/certs
EXPOSE 8010
VOLUME ["/data/app/iotlcmadmin-web-svc/upload", "/app/resource/certs"]
CMD ["./iotlcm-app-server"]
+201
View File
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+7
View File
@@ -0,0 +1,7 @@
ROOT_DIR = $(shell pwd)
NAMESPACE = "default"
DEPLOY_NAME = "template-single"
DOCKER_NAME = "template-single"
include ./hack/hack-cli.mk
include ./hack/hack.mk
+4
View File
@@ -0,0 +1,4 @@
# GoFrame Template For SingleRepo
Quick Start:
- https://goframe.org/quick
+74
View File
@@ -0,0 +1,74 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package app
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
)
type IAppV1 interface {
Captcha(ctx context.Context, req *v1.CaptchaReq) (res *v1.CaptchaRes, err error)
SideCaptcha(ctx context.Context, req *v1.SideCaptchaReq) (res *v1.SideCaptchaRes, err error)
CheckSideCaptcha(ctx context.Context, req *v1.CheckSideCaptchaReq) (res *v1.CheckSideCaptchaRes, err error)
SendSms(ctx context.Context, req *v1.SendSmsReq) (res *v1.SendSmsRes, err error)
PhoneRegister(ctx context.Context, req *v1.PhoneRegisterReq) (res *v1.PhoneRegisterRes, err error)
PhoneLogin(ctx context.Context, req *v1.PhoneLoginReq) (res *v1.PhoneLoginRes, err error)
WechatLogin(ctx context.Context, req *v1.WechatLoginReq) (res *v1.WechatLoginRes, err error)
WechatBindPhone(ctx context.Context, req *v1.WechatBindPhoneReq) (res *v1.WechatBindPhoneRes, err error)
ForgotPassword(ctx context.Context, req *v1.ForgotPasswordReq) (res *v1.ForgotPasswordRes, err error)
BalanceRechargeSubmit(ctx context.Context, req *v1.BalanceRechargeSubmitReq) (res *v1.BalanceRechargeSubmitRes, err error)
BalanceRechargeStatus(ctx context.Context, req *v1.BalanceRechargeStatusReq) (res *v1.BalanceRechargeStatusRes, err error)
BalanceRechargeMockPay(ctx context.Context, req *v1.BalanceRechargeMockPayReq) (res *v1.BalanceRechargeMockPayRes, err error)
BalanceRechargeRefund(ctx context.Context, req *v1.BalanceRechargeRefundReq) (res *v1.BalanceRechargeRefundRes, err error)
BalanceRechargeWechatNotify(ctx context.Context, req *v1.BalanceRechargeWechatNotifyReq) (res *v1.BalanceRechargeWechatNotifyRes, err error)
BalanceRechargeWechatRefundNotify(ctx context.Context, req *v1.BalanceRechargeWechatRefundNotifyReq) (res *v1.BalanceRechargeWechatRefundNotifyRes, err error)
PublicQueryCard(ctx context.Context, req *v1.PublicQueryCardReq) (res *v1.PublicQueryCardRes, err error)
RecognizeCard(ctx context.Context, req *v1.RecognizeCardReq) (res *v1.RecognizeCardRes, err error)
CardList(ctx context.Context, req *v1.CardListReq) (res *v1.CardListRes, err error)
PackageList(ctx context.Context, req *v1.PackageListReq) (res *v1.PackageListRes, err error)
PublicPackageDetail(ctx context.Context, req *v1.PublicPackageDetailReq) (res *v1.PublicPackageDetailRes, err error)
CardDetail(ctx context.Context, req *v1.CardDetailReq) (res *v1.CardDetailRes, err error)
BindCard(ctx context.Context, req *v1.BindCardReq) (res *v1.BindCardRes, err error)
RestartCard(ctx context.Context, req *v1.RestartCardReq) (res *v1.RestartCardRes, err error)
StopCard(ctx context.Context, req *v1.StopCardReq) (res *v1.StopCardRes, err error)
StartCard(ctx context.Context, req *v1.StartCardReq) (res *v1.StartCardRes, err error)
LifecycleBatchSubmit(ctx context.Context, req *v1.LifecycleBatchSubmitReq) (res *v1.LifecycleBatchSubmitRes, err error)
LifecycleBatchStatus(ctx context.Context, req *v1.LifecycleBatchStatusReq) (res *v1.LifecycleBatchStatusRes, err error)
RenewPrepare(ctx context.Context, req *v1.RenewPrepareReq) (res *v1.RenewPrepareRes, err error)
RenewBatchPrepare(ctx context.Context, req *v1.RenewBatchPrepareReq) (res *v1.RenewBatchPrepareRes, err error)
RenewSubmit(ctx context.Context, req *v1.RenewSubmitReq) (res *v1.RenewSubmitRes, err error)
RenewBatchSubmit(ctx context.Context, req *v1.RenewBatchSubmitReq) (res *v1.RenewBatchSubmitRes, err error)
AllocateTargets(ctx context.Context, req *v1.AllocateTargetsReq) (res *v1.AllocateTargetsRes, err error)
AllocateBatchPrepare(ctx context.Context, req *v1.AllocateBatchPrepareReq) (res *v1.AllocateBatchPrepareRes, err error)
AllocateBatchSubmit(ctx context.Context, req *v1.AllocateBatchSubmitReq) (res *v1.AllocateBatchSubmitRes, err error)
ChangePrepare(ctx context.Context, req *v1.ChangePrepareReq) (res *v1.ChangePrepareRes, err error)
ChangeSubmit(ctx context.Context, req *v1.ChangeSubmitReq) (res *v1.ChangeSubmitRes, err error)
DiagnosisInfo(ctx context.Context, req *v1.DiagnosisInfoReq) (res *v1.DiagnosisInfoRes, err error)
DiagnosisFlow(ctx context.Context, req *v1.DiagnosisFlowReq) (res *v1.DiagnosisFlowRes, err error)
OpenDiagnosisInfo(ctx context.Context, req *v1.OpenDiagnosisInfoReq) (res *v1.OpenDiagnosisInfoRes, err error)
OpenDiagnosisFlow(ctx context.Context, req *v1.OpenDiagnosisFlowReq) (res *v1.OpenDiagnosisFlowRes, err error)
CustomerList(ctx context.Context, req *v1.CustomerListReq) (res *v1.CustomerListRes, err error)
CustomerDetail(ctx context.Context, req *v1.CustomerDetailReq) (res *v1.CustomerDetailRes, err error)
MessageList(ctx context.Context, req *v1.MessageListReq) (res *v1.MessageListRes, err error)
MessageDetail(ctx context.Context, req *v1.MessageDetailReq) (res *v1.MessageDetailRes, err error)
MessageRead(ctx context.Context, req *v1.MessageReadReq) (res *v1.MessageReadRes, err error)
OrderList(ctx context.Context, req *v1.OrderListReq) (res *v1.OrderListRes, err error)
OrderDetail(ctx context.Context, req *v1.OrderDetailReq) (res *v1.OrderDetailRes, err error)
UserInfo(ctx context.Context, req *v1.UserInfoReq) (res *v1.UserInfoRes, err error)
UpdateUserInfo(ctx context.Context, req *v1.UpdateUserInfoReq) (res *v1.UpdateUserInfoRes, err error)
BindWechat(ctx context.Context, req *v1.BindWechatReq) (res *v1.BindWechatRes, err error)
WarningConfigList(ctx context.Context, req *v1.WarningConfigListReq) (res *v1.WarningConfigListRes, err error)
WarningConfigSave(ctx context.Context, req *v1.WarningConfigSaveReq) (res *v1.WarningConfigSaveRes, err error)
WarningConfigNotify(ctx context.Context, req *v1.WarningConfigNotifyReq) (res *v1.WarningConfigNotifyRes, err error)
WarningConfigMeta(ctx context.Context, req *v1.WarningConfigMetaReq) (res *v1.WarningConfigMetaRes, err error)
WarningConfigBatchSave(ctx context.Context, req *v1.WarningConfigBatchSaveReq) (res *v1.WarningConfigBatchSaveRes, err error)
WarningConfigBatchNotify(ctx context.Context, req *v1.WarningConfigBatchNotifyReq) (res *v1.WarningConfigBatchNotifyRes, err error)
WorkOrderList(ctx context.Context, req *v1.WorkOrderListReq) (res *v1.WorkOrderListRes, err error)
WorkOrderDetail(ctx context.Context, req *v1.WorkOrderDetailReq) (res *v1.WorkOrderDetailRes, err error)
WorkOrderCreate(ctx context.Context, req *v1.WorkOrderCreateReq) (res *v1.WorkOrderCreateRes, err error)
WorkOrderUpload(ctx context.Context, req *v1.WorkOrderUploadReq) (res *v1.WorkOrderUploadRes, err error)
}
+87
View File
@@ -0,0 +1,87 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type CaptchaReq struct {
g.Meta `path:"/auth/captcha" method:"get" tags:"APP-授权" summary:"获取图形验证码"`
}
type CaptchaRes struct {
CaptchaID string `json:"captchaID" dc:"验证码ID"`
CaptchaImage string `json:"captchaImage" dc:"验证码图片Base64"`
}
type SideCaptchaReq struct {
g.Meta `path:"/auth/side-captcha" method:"post" tags:"APP-授权" summary:"获取滑块验证码"`
}
type SideCaptchaRes struct {
model.AppSideCaptchaModel
}
type CheckSideCaptchaReq struct {
g.Meta `path:"/auth/check-side-captcha" method:"post" tags:"APP-授权" summary:"验证滑块验证码"`
model.AppCheckSideCaptchaParam
}
type CheckSideCaptchaRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type SendSmsReq struct {
g.Meta `path:"/auth/sms" method:"post" tags:"APP-授权" summary:"发送短信验证码"`
model.AppSendSmsParam
}
type SendSmsRes struct {
model.AppSendSmsModel
}
type PhoneRegisterReq struct {
g.Meta `path:"/auth/register" method:"post" tags:"APP-授权" summary:"手机号注册"`
model.AppPhoneRegisterParam
}
type PhoneRegisterRes struct {
model.AppAuthTokenModel
}
type PhoneLoginReq struct {
g.Meta `path:"/auth/login" method:"post" tags:"APP-授权" summary:"账号登录"`
model.AppPhoneLoginParam
}
type PhoneLoginRes struct {
model.AppAuthTokenModel
}
type WechatLoginReq struct {
g.Meta `path:"/auth/wechat-login" method:"post" tags:"APP-授权" summary:"微信一键登录"`
model.AppWechatLoginParam
}
type WechatLoginRes struct {
model.AppWechatLoginModel
}
type WechatBindPhoneReq struct {
g.Meta `path:"/auth/wechat-bind-phone" method:"post" tags:"APP-授权" summary:"微信登录绑定手机号"`
model.AppWechatBindPhoneParam
}
type WechatBindPhoneRes struct {
model.AppWechatBindPhoneModel
}
type ForgotPasswordReq struct {
g.Meta `path:"/auth/forgot-password" method:"post" tags:"APP-授权" summary:"手机号找回密码"`
model.AppForgotPasswordParam
}
type ForgotPasswordRes struct {
Success bool `json:"success" dc:"是否成功"`
}
+55
View File
@@ -0,0 +1,55 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type BalanceRechargeSubmitReq struct {
g.Meta `path:"/balance/recharge-submit" method:"post" tags:"APP-余额" summary:"提交余额充值订单"`
model.AppBalanceRechargeSubmitParam
}
type BalanceRechargeSubmitRes struct {
*model.AppBalanceRechargeSubmitModel
}
type BalanceRechargeStatusReq struct {
g.Meta `path:"/balance/recharge-status" method:"get" tags:"APP-余额" summary:"查询余额充值订单支付状态"`
model.AppBalanceRechargeStatusParam
}
type BalanceRechargeStatusRes struct {
*model.AppBalanceRechargeStatusModel
}
type BalanceRechargeMockPayReq struct {
g.Meta `path:"/balance/recharge-mock-pay" method:"post" tags:"APP-余额" summary:"模拟余额充值支付成功"`
model.AppBalanceRechargeMockPayParam
}
type BalanceRechargeMockPayRes struct {
*model.AppBalanceRechargeStatusModel
}
type BalanceRechargeRefundReq struct {
g.Meta `path:"/balance/recharge-refund" method:"post" tags:"APP-余额" summary:"发起余额充值退款申请"`
model.AppBalanceRechargeRefundParam
}
type BalanceRechargeRefundRes struct {
*model.AppOrderModel
}
type BalanceRechargeWechatNotifyReq struct {
g.Meta `path:"/payment/wechat/notify" method:"post" tags:"APP-余额" summary:"微信支付余额充值异步通知"`
}
type BalanceRechargeWechatNotifyRes struct{}
type BalanceRechargeWechatRefundNotifyReq struct {
g.Meta `path:"/payment/wechat/refund-notify" method:"post" tags:"APP-余额" summary:"微信支付余额充值退款异步通知"`
}
type BalanceRechargeWechatRefundNotifyRes struct{}
+199
View File
@@ -0,0 +1,199 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type PublicQueryCardReq struct {
g.Meta `path:"/card/public-query" method:"post" tags:"APP-卡片" summary:"未登录公开查询卡信息"`
model.AppCardQueryParam
}
type PublicQueryCardRes struct {
Card *model.AppCardModel `json:"card" dc:"卡信息"`
}
type RecognizeCardReq struct {
g.Meta `path:"/card/recognize" method:"post" tags:"APP-卡片" summary:"拍照识别ICCID并公开查卡"`
}
type RecognizeCardRes struct {
*model.AppCardRecognitionModel
}
type CardListReq struct {
g.Meta `path:"/card/list" method:"get" tags:"APP-卡片" summary:"登录用户查询持有卡列表" x-check-permission:"cpa:terminal:user,cpm:iot:tSimCardInfo:list"`
model.AppCardListParam
}
type CardListRes struct {
Items []*model.AppCardModel `json:"items" dc:"卡列表"`
Total int `json:"total" dc:"总数"`
HasMore bool `json:"hasMore" dc:"是否还有下一页"`
}
type PackageListReq struct {
g.Meta `path:"/card/package-list" method:"get" tags:"APP-卡片" summary:"登录用户查询持有卡套餐列表" x-check-permission:"cpm:iot:tSimCardBindPkg:list,cpm:iot:tSimFlowPackageInfo:list,cpm:iot:tSimCardInfo:list"`
model.AppPackageListParam
}
type PackageListRes struct {
Items []*model.AppPackageModel `json:"items" dc:"套餐列表"`
Total int `json:"total" dc:"总数"`
}
type PublicPackageDetailReq struct {
g.Meta `path:"/card/public-package-detail" method:"post" tags:"APP-卡片" summary:"未登录公开查询当前套餐详情"`
model.AppPackagePublicDetailParam
}
type PublicPackageDetailRes struct {
Package *model.AppPackageModel `json:"package" dc:"套餐详情"`
}
type CardDetailReq struct {
g.Meta `path:"/card/detail" method:"get" tags:"APP-卡片" summary:"登录用户查询卡详情,非持有卡按公共查询返回" x-check-permission:"cpm:iot:tSimCardInfo:view,cpm:iot:tSimCardInfo:list"`
model.AppCardDetailParam
}
type CardDetailRes struct {
Card *model.AppCardModel `json:"card" dc:"卡信息"`
}
type BindCardReq struct {
g.Meta `path:"/card/bind" method:"post" tags:"APP-卡片" summary:"终端用户绑定卡" x-check-permission:"cpc:current:user"`
model.AppCardBindParam
}
type BindCardRes struct {
Card *model.AppCardModel `json:"card" dc:"卡信息"`
}
type RestartCardReq struct {
g.Meta `path:"/card/restart" method:"post" tags:"APP-卡片" summary:"登录用户重启卡" x-check-permission:"cpm:iot:tSimCardRestart:input:submit"`
model.AppCardRestartParam
}
type RestartCardRes struct {
*model.AppCardRestartModel
}
type StopCardReq struct {
g.Meta `path:"/card/stop" method:"post" tags:"APP-卡片" summary:"企业用户停机卡片" x-check-permission:"cpm:iot:tSimCardStop:input:submit"`
model.AppCardRestartParam
}
type StopCardRes struct {
*model.AppCardLifecycleModel
}
type StartCardReq struct {
g.Meta `path:"/card/start" method:"post" tags:"APP-卡片" summary:"企业用户复机卡片" x-check-permission:"cpm:iot:tSimCardStart:input:submit"`
model.AppCardRestartParam
}
type StartCardRes struct {
*model.AppCardLifecycleModel
}
type LifecycleBatchSubmitReq struct {
g.Meta `path:"/card/lifecycle-batch-submit" method:"post" tags:"APP-卡片" summary:"企业用户批量提交停机复机重启" x-check-permission:"cpm:iot:tSimCardStop:input:submit,cpm:iot:tSimCardStart:input:submit,cpm:iot:tSimCardRestart:input:submit"`
model.AppCardLifecycleParam
}
type LifecycleBatchSubmitRes struct {
*model.AppCardLifecycleModel
}
type LifecycleBatchStatusReq struct {
g.Meta `path:"/card/lifecycle-batch-status" method:"get" tags:"APP-卡片" summary:"查询卡片停机复机重启批次状态" x-check-permission:"cpm:iot:tSimCardStop:input:submit,cpm:iot:tSimCardStart:input:submit,cpm:iot:tSimCardRestart:input:submit"`
model.AppCardLifecycleStatusParam
}
type LifecycleBatchStatusRes struct {
*model.AppCardLifecycleModel
}
type RenewPrepareReq struct {
g.Meta `path:"/card/renew-prepare" method:"post" tags:"APP-卡片" summary:"登录用户查询套餐续费档位和价格" x-check-permission:"cpm:iot:tSimCardRenew:input:prepare,cpm:iot:tSimCardRenew:batch:confirm"`
model.AppCardRenewPrepareParam
}
type RenewPrepareRes struct {
*model.AppCardRenewPrepareModel
}
type RenewBatchPrepareReq struct {
g.Meta `path:"/card/renew-batch-prepare" method:"post" tags:"APP-卡片" summary:"登录用户批量查询套餐续费档位和价格" x-check-permission:"cpm:iot:tSimCardRenew:input:prepare,cpm:iot:tSimCardRenew:batch:confirm"`
model.AppCardRenewBatchPrepareParam
}
type RenewBatchPrepareRes struct {
*model.AppCardRenewPrepareModel
}
type RenewSubmitReq struct {
g.Meta `path:"/card/renew-submit" method:"post" tags:"APP-卡片" summary:"登录用户提交套餐续费订单" x-check-permission:"cpm:iot:tSimCardRenew:batch:confirm"`
model.AppCardRenewSubmitParam
}
type RenewSubmitRes struct {
*model.AppCardRenewSubmitModel
}
type RenewBatchSubmitReq struct {
g.Meta `path:"/card/renew-batch-submit" method:"post" tags:"APP-卡片" summary:"登录用户提交批量套餐续费订单" x-check-permission:"cpm:iot:tSimCardRenew:batch:confirm"`
model.AppCardRenewBatchSubmitParam
}
type RenewBatchSubmitRes struct {
*model.AppCardRenewSubmitModel
}
type AllocateTargetsReq struct {
g.Meta `path:"/card/allocate-targets" method:"get" tags:"APP-卡片" summary:"企业用户查询可划拨目标客户" x-check-permission:"cpm:iot:tSimCardAllocate:targets"`
model.AppCardAllocateTargetListParam
}
type AllocateTargetsRes struct {
Items []*model.AppCardAllocateTargetModel `json:"items" dc:"目标客户列表"`
Total int `json:"total" dc:"总数"`
}
type AllocateBatchPrepareReq struct {
g.Meta `path:"/card/allocate-batch-prepare" method:"post" tags:"APP-卡片" summary:"企业用户批量划拨预校验" x-check-permission:"cpm:iot:tSimCardAllocate:input:prepare"`
model.AppCardAllocateBatchPrepareParam
}
type AllocateBatchPrepareRes struct {
*model.AppCardAllocateBatchModel
}
type AllocateBatchSubmitReq struct {
g.Meta `path:"/card/allocate-batch-submit" method:"post" tags:"APP-卡片" summary:"企业用户提交批量划拨" x-check-permission:"cpm:iot:tSimCardAllocate:batch:submit"`
model.AppCardAllocateBatchSubmitParam
}
type AllocateBatchSubmitRes struct {
*model.AppCardAllocateBatchModel
}
type ChangePrepareReq struct {
g.Meta `path:"/card/change-prepare" method:"post" tags:"APP-卡片" summary:"企业用户套餐变更预校验" x-check-permission:"cpm:iot:tSimCardChange:input:prepare,cpm:iot:tSimCardChange:range:prepare,cpm:iot:tSimCardBindPkg:getChangePkg"`
model.AppCardChangePrepareParam
}
type ChangePrepareRes struct {
*model.AppCardChangePrepareModel
}
type ChangeSubmitReq struct {
g.Meta `path:"/card/change-submit" method:"post" tags:"APP-卡片" summary:"企业用户提交套餐变更" x-check-permission:"cpm:iot:tSimCardChange:batch:submit"`
model.AppCardChangeSubmitParam
}
type ChangeSubmitRes struct {
*model.AppCardChangeSubmitModel
}
+26
View File
@@ -0,0 +1,26 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type CustomerListReq struct {
g.Meta `path:"/customer/list" method:"get" tags:"APP-客户" summary:"企业用户查询下级客户列表" x-check-permission:"cpm:agent:dept:list,cpm:agent:tAgentEnterprise:list"`
model.AppCustomerListParam
}
type CustomerListRes struct {
Items []*model.AppCustomerModel `json:"items" dc:"客户列表"`
Total int `json:"total" dc:"总数"`
}
type CustomerDetailReq struct {
g.Meta `path:"/customer/detail" method:"get" tags:"APP-客户" summary:"企业用户查询客户详情" x-check-permission:"cpm:agent:tAgentEnterprise:view,cpm:agent:tAgentEnterprise:list"`
model.AppCustomerDetailParam
}
type CustomerDetailRes struct {
Customer *model.AppCustomerDetailModel `json:"customer" dc:"客户详情"`
}
+25
View File
@@ -0,0 +1,25 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type DiagnosisInfoReq struct {
g.Meta `path:"/diagnosis/info" method:"post" tags:"APP-智能诊断" summary:"查询SIM卡诊断信息"`
model.AppDiagnosisInfoParam
}
type DiagnosisInfoRes struct {
*model.AppDiagnosisInfoModel
}
type DiagnosisFlowReq struct {
g.Meta `path:"/diagnosis/flow" method:"post" tags:"APP-智能诊断" summary:"查询SIM卡流量趋势"`
model.AppDiagnosisFlowParam
}
type DiagnosisFlowRes struct {
*model.AppDiagnosisFlowModel
}
+33
View File
@@ -0,0 +1,33 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type MessageListReq struct {
g.Meta `path:"/message/list" method:"get" tags:"APP-消息中心" summary:"当前登录用户消息列表"`
model.AppMessageListParam
}
type MessageListRes struct {
Items []*model.AppMessageModel `json:"items" dc:"消息列表"`
Total int `json:"total" dc:"总数"`
}
type MessageDetailReq struct {
g.Meta `path:"/message/detail" method:"get" tags:"APP-消息中心" summary:"当前登录用户消息详情"`
model.AppMessageDetailParam
}
type MessageDetailRes struct {
Message *model.AppMessageModel `json:"message" dc:"消息详情"`
}
type MessageReadReq struct {
g.Meta `path:"/message/read" method:"post" tags:"APP-消息中心" summary:"标记当前登录用户消息为已读"`
model.AppMessageReadParam
}
type MessageReadRes struct{}
+25
View File
@@ -0,0 +1,25 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type OpenDiagnosisInfoReq struct {
g.Meta `path:"/open/diagnosis/info" method:"post" tags:"APP-开放诊断" summary:"免登录查询SIM卡诊断信息"`
model.AppOpenDiagnosisInfoParam
}
type OpenDiagnosisInfoRes struct {
*model.AppDiagnosisInfoModel
}
type OpenDiagnosisFlowReq struct {
g.Meta `path:"/open/diagnosis/flow" method:"post" tags:"APP-开放诊断" summary:"免登录查询SIM卡流量趋势"`
model.AppOpenDiagnosisFlowParam
}
type OpenDiagnosisFlowRes struct {
*model.AppDiagnosisFlowModel
}
+26
View File
@@ -0,0 +1,26 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type OrderListReq struct {
g.Meta `path:"/order/list" method:"get" tags:"APP-订单" summary:"登录用户查询自己的支付订单"`
model.AppOrderListParam
}
type OrderListRes struct {
Items []*model.AppOrderModel `json:"items" dc:"订单列表"`
Total int `json:"total" dc:"总数"`
}
type OrderDetailReq struct {
g.Meta `path:"/order/detail" method:"get" tags:"APP-订单" summary:"登录用户查询自己的支付订单详情"`
model.AppOrderDetailParam
}
type OrderDetailRes struct {
Order *model.AppOrderModel `json:"order" dc:"订单详情"`
}
+33
View File
@@ -0,0 +1,33 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type UserInfoReq struct {
g.Meta `path:"/user/info" method:"get" tags:"APP-用户" summary:"当前用户信息"`
}
type UserInfoRes struct {
model.AppUserInfoModel
}
type UpdateUserInfoReq struct {
g.Meta `path:"/user/info" method:"post" tags:"APP-用户" summary:"修改当前用户信息"`
model.AppUpdateUserInfoParam
}
type UpdateUserInfoRes struct {
model.AppUserInfoModel
}
type BindWechatReq struct {
g.Meta `path:"/user/wechat/bind" method:"post" tags:"APP-用户" summary:"绑定或更换微信用户"`
model.AppWechatBindParam
}
type BindWechatRes struct {
model.AppWechatBindModel
}
+60
View File
@@ -0,0 +1,60 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type WarningConfigListReq struct {
g.Meta `path:"/warning/config/list" method:"get" tags:"APP-预警" summary:"查询单卡预警配置" x-check-permission:"cpm:iot:simWarningConfig:list,cpm:iot:simWarningConfig:view,cpm:iot:tSimWarningConfig:input:submit"`
model.AppWarningConfigListParam
}
type WarningConfigListRes struct {
model.AppWarningConfigListModel
}
type WarningConfigSaveReq struct {
g.Meta `path:"/warning/config/save" method:"post" tags:"APP-预警" summary:"保存单卡预警配置" x-check-permission:"cpm:iot:simWarningConfig:save,cpm:iot:tSimWarningConfig:input:submit"`
model.AppWarningConfigSaveParam
}
type WarningConfigSaveRes struct {
model.AppWarningConfigSaveModel
}
type WarningConfigNotifyReq struct {
g.Meta `path:"/warning/config/notify" method:"post" tags:"APP-预警" summary:"设置单卡小程序预警通知" x-check-permission:"cpm:iot:simWarningConfig:save,cpm:iot:tSimWarningConfig:input:submit"`
model.AppWarningConfigNotifyParam
}
type WarningConfigNotifyRes struct {
model.AppWarningConfigNotifyModel
}
type WarningConfigMetaReq struct {
g.Meta `path:"/warning/config/meta" method:"get" tags:"APP-预警" summary:"查询预警订阅配置元信息" x-check-permission:"cpm:iot:simWarningConfig:list,cpm:iot:simWarningConfig:view,cpm:iot:tSimWarningConfig:input:submit"`
}
type WarningConfigMetaRes struct {
model.AppWarningConfigMetaModel
}
type WarningConfigBatchSaveReq struct {
g.Meta `path:"/warning/config/batch-save" method:"post" tags:"APP-预警" summary:"批量保存单卡预警配置" x-check-permission:"cpm:iot:simWarningConfig:save,cpm:iot:tSimWarningConfig:input:submit,cpm:iot:tSimWarningConfig:range:submit"`
model.AppWarningConfigBatchSaveParam
}
type WarningConfigBatchSaveRes struct {
model.AppWarningConfigBatchSaveModel
}
type WarningConfigBatchNotifyReq struct {
g.Meta `path:"/warning/config/batch-notify" method:"post" tags:"APP-预警" summary:"批量设置单卡小程序预警通知" x-check-permission:"cpm:iot:simWarningConfig:save,cpm:iot:tSimWarningConfig:input:submit,cpm:iot:tSimWarningConfig:range:submit"`
model.AppWarningConfigBatchNotifyParam
}
type WarningConfigBatchNotifyRes struct {
model.AppWarningConfigBatchNotifyModel
}
+44
View File
@@ -0,0 +1,44 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type WorkOrderListReq struct {
g.Meta `path:"/work-order/list" method:"get" tags:"APP-工单" summary:"当前登录用户工单列表" x-check-permission:"cpm:gen:tWoMain:list"`
model.AppWorkOrderListParam
}
type WorkOrderListRes struct {
Items []*model.AppWorkOrderModel `json:"items" dc:"工单列表"`
Total int `json:"total" dc:"总数"`
}
type WorkOrderDetailReq struct {
g.Meta `path:"/work-order/detail" method:"get" tags:"APP-工单" summary:"当前登录用户工单详情" x-check-permission:"cpm:gen:tWoMain:view,cpm:gen:tWoMain:list"`
model.AppWorkOrderDetailParam
}
type WorkOrderDetailRes struct {
WorkOrder *model.AppWorkOrderModel `json:"workOrder" dc:"工单详情"`
}
type WorkOrderCreateReq struct {
g.Meta `path:"/work-order/create" method:"post" tags:"APP-工单" summary:"提交工单" x-check-permission:"cpm:gen:tWoMain:edit"`
model.AppWorkOrderCreateParam
}
type WorkOrderCreateRes struct {
WorkOrder *model.AppWorkOrderModel `json:"workOrder" dc:"工单详情"`
}
type WorkOrderUploadReq struct {
g.Meta `path:"/work-order/upload" method:"post" tags:"APP-工单" summary:"上传工单附件"`
*model.SysOssUploadParam
}
type WorkOrderUploadRes struct {
*model.SysOssUploadModel
}
+16
View File
@@ -0,0 +1,16 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package common
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-app/api/common/v1"
)
type ICommonV1 interface {
SysOssUpload(ctx context.Context, req *v1.SysOssUploadReq) (res *v1.SysOssUploadRes, err error)
SysOssDownload(ctx context.Context, req *v1.SysOssDownloadReq) (res *v1.SysOssDownloadRes, err error)
}
+29
View File
@@ -0,0 +1,29 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type SysOssUploadReq struct {
g.Meta `path:"/oss/upload" method:"post" tags:"系统-存储管理" summary:"上传文件" x-check-permission:"cpm:system.oss.upload"`
*model.SysOssUploadParam
}
type SysOssUploadRes struct {
*model.SysOssUploadModel
}
type SysOssDownloadReq struct {
g.Meta `path:"/oss/download" method:"get" tags:"系统-存储管理" summary:"下载文件" x-check-permission:"cpm:system.oss.download"`
*model.SysOssDownloadParam
}
type SysOssDownloadRes struct {
*model.SysOssDownloadModel
}
+19
View File
@@ -0,0 +1,19 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package testdemo
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-app/api/gen/testdemo/v1"
)
type ITestdemoV1 interface {
TestDemoList(ctx context.Context, req *v1.TestDemoListReq) (res *v1.TestDemoListRes, err error)
TestDemoExport(ctx context.Context, req *v1.TestDemoExportReq) (res *v1.TestDemoExportRes, err error)
TestDemoView(ctx context.Context, req *v1.TestDemoViewReq) (res *v1.TestDemoViewRes, err error)
TestDemoEdit(ctx context.Context, req *v1.TestDemoEditReq) (res *v1.TestDemoEditRes, err error)
TestDemoDelete(ctx context.Context, req *v1.TestDemoDeleteReq) (res *v1.TestDemoDeleteRes, err error)
}
+59
View File
@@ -0,0 +1,59 @@
// Package testdemo
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version
package v1 //testdemo
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/genin"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
// ListReq 查询测试单表列表
type TestDemoListReq struct {
g.Meta `path:"/testDemo/list" method:"get" tags:"测试单表" summary:"获取测试单表列表" x-check-permission:"cpm:gen:testDemo:list"`
genin.TestDemoListParam
}
type TestDemoListRes struct {
response.PageResult
Items []*genin.TestDemoListModel `json:"items" dc:"数据列表"`
}
// ExportReq 导出测试单表列表
type TestDemoExportReq struct {
g.Meta `path:"/testDemo/export" method:"post" tags:"测试单表" summary:"导出测试单表列表" x-check-permission:"cpm:gen:testDemo:export"`
genin.TestDemoListParam
}
type TestDemoExportRes struct{}
// ViewReq 获取测试单表指定信息
type TestDemoViewReq struct {
g.Meta `path:"/testDemo/view" method:"get" tags:"测试单表" summary:"获取测试单表指定信息" x-check-permission:"cpm:gen:testDemo:view"`
genin.TestDemoViewParam
}
type TestDemoViewRes struct {
*genin.TestDemoViewModel
}
// EditReq 修改/新增测试单表
type TestDemoEditReq struct {
g.Meta `path:"/testDemo/edit" method:"post" tags:"测试单表" summary:"修改/新增测试单表" x-check-permission:"cpm:gen:testDemo:edit"`
genin.TestDemoEditParam
}
type TestDemoEditRes struct{}
// DeleteReq 删除测试单表
type TestDemoDeleteReq struct {
g.Meta `path:"/testDemo/delete" method:"post" tags:"测试单表" summary:"删除测试单表" x-check-permission:"cpm:gen:testDemo:delete"`
genin.TestDemoDeleteParam
}
type TestDemoDeleteRes struct{}
+20
View File
@@ -0,0 +1,20 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package testtree
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-app/api/gen/testtree/v1"
)
type ITesttreeV1 interface {
TestTreeList(ctx context.Context, req *v1.TestTreeListReq) (res *v1.TestTreeListRes, err error)
TestTreeExport(ctx context.Context, req *v1.TestTreeExportReq) (res *v1.TestTreeExportRes, err error)
TestTreeView(ctx context.Context, req *v1.TestTreeViewReq) (res *v1.TestTreeViewRes, err error)
TestTreeEdit(ctx context.Context, req *v1.TestTreeEditReq) (res *v1.TestTreeEditRes, err error)
TestTreeDelete(ctx context.Context, req *v1.TestTreeDeleteReq) (res *v1.TestTreeDeleteRes, err error)
TestTreeTreeOption(ctx context.Context, req *v1.TestTreeTreeOptionReq) (res *v1.TestTreeTreeOptionRes, err error)
}
+67
View File
@@ -0,0 +1,67 @@
// Package testtree
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version
package v1 //testtree
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/genin"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"git.5iot.com/iotlcm-public/iotlcm-app/utility/tree"
"github.com/gogf/gf/v2/frame/g"
)
// ListReq 查询测试树表列表
type TestTreeListReq struct {
g.Meta `path:"/testTree/list" method:"get" tags:"测试树表" summary:"获取测试树表列表" x-check-permission:"cpm:gen:testTree:list"`
genin.TestTreeListParam
}
type TestTreeListRes struct {
response.PageResult
Items []*genin.TestTreeListModel `json:"items" dc:"数据列表"`
}
// ExportReq 导出测试树表列表
type TestTreeExportReq struct {
g.Meta `path:"/testTree/export" method:"post" tags:"测试树表" summary:"导出测试树表列表" x-check-permission:"cpm:gen:testTree:export"`
genin.TestTreeListParam
}
type TestTreeExportRes struct{}
// ViewReq 获取测试树表指定信息
type TestTreeViewReq struct {
g.Meta `path:"/testTree/view" method:"get" tags:"测试树表" summary:"获取测试树表指定信息" x-check-permission:"cpm:gen:testTree:view"`
genin.TestTreeViewParam
}
type TestTreeViewRes struct {
*genin.TestTreeViewModel
}
// EditReq 修改/新增测试树表
type TestTreeEditReq struct {
g.Meta `path:"/testTree/edit" method:"post" tags:"测试树表" summary:"修改/新增测试树表" x-check-permission:"cpm:gen:testTree:edit"`
genin.TestTreeEditParam
}
type TestTreeEditRes struct{}
// DeleteReq 删除测试树表
type TestTreeDeleteReq struct {
g.Meta `path:"/testTree/delete" method:"post" tags:"测试树表" summary:"删除测试树表" x-check-permission:"cpm:gen:testTree:delete"`
genin.TestTreeDeleteParam
}
type TestTreeDeleteRes struct{}
// TreeOptionReq 获取测试树表关系树选项
type TestTreeTreeOptionReq struct {
g.Meta `path:"/testTree/treeOption" method:"get" tags:"测试树表" summary:"获取测试树表关系树选项" x-check-permission:"cpm:gen:testTree:treeOption"`
}
type TestTreeTreeOptionRes []tree.Node
+25
View File
@@ -0,0 +1,25 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package gen_codes
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-app/api/gen_codes/v1"
)
type IGenCodesV1 interface {
SysGenTableList(ctx context.Context, req *v1.SysGenTableListReq) (res *v1.SysGenTableListRes, err error)
SysGenTableView(ctx context.Context, req *v1.SysGenTableViewReq) (res *v1.SysGenTableViewRes, err error)
SysGenTableAdd(ctx context.Context, req *v1.SysGenTableAddReq) (res *v1.SysGenTableAddRes, err error)
SysGenTableEdit(ctx context.Context, req *v1.SysGenTableEditReq) (res *v1.SysGenTableEditRes, err error)
SysGenTableDelete(ctx context.Context, req *v1.SysGenTableDeleteReq) (res *v1.SysGenTableDeleteRes, err error)
SysGenTableSelects(ctx context.Context, req *v1.SysGenTableSelectsReq) (res *v1.SysGenTableSelectsRes, err error)
SysGenTableTableSelect(ctx context.Context, req *v1.SysGenTableTableSelectReq) (res *v1.SysGenTableTableSelectRes, err error)
SysGenTableColumnSelect(ctx context.Context, req *v1.SysGenTableColumnSelectReq) (res *v1.SysGenTableColumnSelectRes, err error)
SysGenTableColumnList(ctx context.Context, req *v1.SysGenTableColumnListReq) (res *v1.SysGenTableColumnListRes, err error)
SysGenTablePreview(ctx context.Context, req *v1.SysGenTablePreviewReq) (res *v1.SysGenTablePreviewRes, err error)
SysGenTableBuild(ctx context.Context, req *v1.SysGenTableBuildReq) (res *v1.SysGenTableBuildRes, err error)
}
+112
View File
@@ -0,0 +1,112 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysGenTableListReq struct {
g.Meta `path:"/genTable/list" method:"get" tags:"工具-代码生成" summary:"获取代码生成列表" x-check-permission:"cpm:tool:gen:list"`
*model.SysGenTableListParam
}
type SysGenTableListRes struct {
response.PageResult
Items []*model.SysGenTableListModel `json:"items"`
}
type SysGenTableViewReq struct {
g.Meta `path:"/genTable/view" method:"get" tags:"工具-代码生成" summary:"获取代码生成详情" x-check-permission:"cpm:tool:gen:query"`
*model.SysGenTableViewParam
}
type SysGenTableViewRes struct {
*model.SysGenTableViewModel
}
type SysGenTableAddReq struct {
g.Meta `path:"/genTable/add" method:"post" tags:"工具-代码生成" summary:"新增代码生成" x-check-permission:"cpm:tool:gen:import"`
*model.SysGenTableAddParam
}
type SysGenTableAddRes struct {
*model.SysGenTableAddModel
}
type SysGenTableEditReq struct {
g.Meta `path:"/genTable/edit" method:"post" tags:"工具-代码生成" summary:"修改代码生成" x-check-permission:"cpm:tool:gen:edit"`
*model.SysGenTableEditParam
}
type SysGenTableEditRes struct {
*model.SysGenTableEditModel
}
type SysGenTableDeleteReq struct {
g.Meta `path:"/genTable/delete" method:"post" tags:"工具-代码生成" summary:"删除代码生成" x-check-permission:"cpm:tool:gen:remove"`
*model.SysGenTableDeleteParam
}
type SysGenTableDeleteRes struct {
*model.SysGenTableDeleteModel
}
type SysGenTableSelectsReq struct {
g.Meta `path:"/genTable/selects" method:"get" tags:"工具-代码生成" summary:"获取代码生成选择项" x-check-permission:"cpm:tool:gen:list"`
}
type SysGenTableSelectsRes struct {
*model.SelectsModel
}
type SysGenTableTableSelectReq struct {
g.Meta `path:"/genTable/tableSelect" method:"get" tags:"工具-代码生成" summary:"获取代码生成表选择项" x-check-permission:"cpm:tool:gen:list"`
*model.GenCodesTableSelectParam
}
type SysGenTableTableSelectRes struct {
Items []*model.GenCodesTableSelectModel `json:"items"`
}
type SysGenTableColumnSelectReq struct {
g.Meta `path:"/genTable/columnSelect" method:"get" tags:"工具-代码生成" summary:"获取代码生成字段选择项" x-check-permission:"cpm:tool:gen:list"`
*model.GenCodesColumnSelectParam
}
type SysGenTableColumnSelectRes struct {
Items []*model.GenCodesColumnSelectModel `json:"items"`
}
type SysGenTableColumnListReq struct {
g.Meta `path:"/genTable/columnList" method:"get" tags:"工具-代码生成" summary:"获取代码生成字段列表" x-check-permission:"cpm:tool:gen:list"`
*model.GenCodesColumnListParam
}
type SysGenTableColumnListRes struct {
Items []*model.GenCodesColumnListModel `json:"items"`
}
type SysGenTablePreviewReq struct {
g.Meta `path:"/genTable/preview" method:"post" tags:"工具-代码生成" summary:"生成预览" x-check-permission:"cpm:tool:gen:preview"`
*model.GenCodesPreviewParam
}
type SysGenTablePreviewRes struct {
*model.GenCodesPreviewModel
}
type SysGenTableBuildReq struct {
g.Meta `path:"/genTable/build" method:"post" tags:"工具-代码生成" summary:"构建" x-check-permission:"cpm:tool:gen:code"`
*model.GenCodesBuildParam
}
type SysGenTableBuildRes struct {
*model.GenCodesBuildModel
}
+15
View File
@@ -0,0 +1,15 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package info
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-app/api/info/v1"
)
type IInfoV1 interface {
Info(ctx context.Context, req *v1.InfoReq) (res *v1.InfoRes, err error)
}
+15
View File
@@ -0,0 +1,15 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
type InfoReq struct {
g.Meta `path:"/info" method:"get" tags:"服务信息" summary:"服务信息"`
}
type InfoRes struct {
*model.InfoModel
}
+15
View File
@@ -0,0 +1,15 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package monitor
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-app/api/monitor/v1"
)
type IMonitorV1 interface {
RedisInfo(ctx context.Context, req *v1.RedisInfoReq) (res *v1.RedisInfoRes, err error)
}
+25
View File
@@ -0,0 +1,25 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"github.com/gogf/gf/v2/frame/g"
)
type RedisInfoReq struct {
g.Meta `path:"/cache" method:"get" tags:"监控-缓存监控" summary:"获取缓存监控信息" x-check-permission:"cpm:monitor:cache:list"`
}
type RedisInfoRes struct {
DBSize int `json:"dbSize"`
CommandStats []*CommandStats `json:"commandStats"`
Info map[string]string `json:"info"`
}
type CommandStats struct {
Name string `json:"name"`
Value string `json:"value"`
}
+134
View File
@@ -0,0 +1,134 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package system
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-app/api/system/v1"
)
type ISystemV1 interface {
Login(ctx context.Context, req *v1.LoginReq) (res *v1.LoginRes, err error)
RefreshToken(ctx context.Context, req *v1.RefreshTokenReq) (res *v1.RefreshTokenRes, err error)
Logout(ctx context.Context, req *v1.LogoutReq) (res *v1.LogoutRes, err error)
GetAccessCodes(ctx context.Context, req *v1.GetAccessCodesReq) (res *v1.GetAccessCodesRes, err error)
TenantList(ctx context.Context, req *v1.TenantListReq) (res *v1.TenantListRes, err error)
GetCaptcha(ctx context.Context, req *v1.GetCaptchaReq) (res *v1.GetCaptchaRes, err error)
SysClientList(ctx context.Context, req *v1.SysClientListReq) (res *v1.SysClientListRes, err error)
SysClientView(ctx context.Context, req *v1.SysClientViewReq) (res *v1.SysClientViewRes, err error)
SysClientAdd(ctx context.Context, req *v1.SysClientAddReq) (res *v1.SysClientAddRes, err error)
SysClientEdit(ctx context.Context, req *v1.SysClientEditReq) (res *v1.SysClientEditRes, err error)
SysClientDelete(ctx context.Context, req *v1.SysClientDeleteReq) (res *v1.SysClientDeleteRes, err error)
SysClientStatus(ctx context.Context, req *v1.SysClientStatusReq) (res *v1.SysClientStatusRes, err error)
GetConfigList(ctx context.Context, req *v1.GetConfigListReq) (res *v1.GetConfigListRes, err error)
AddConfig(ctx context.Context, req *v1.AddConfigReq) (res *v1.AddConfigRes, err error)
EditConfig(ctx context.Context, req *v1.EditConfigReq) (res *v1.EditConfigRes, err error)
DeleteConfig(ctx context.Context, req *v1.DeleteConfigReq) (res *v1.DeleteConfigRes, err error)
GetConfigById(ctx context.Context, req *v1.GetConfigByIdReq) (res *v1.GetConfigByIdRes, err error)
DeptList(ctx context.Context, req *v1.DeptListReq) (res *v1.DeptListRes, err error)
DeptTree(ctx context.Context, req *v1.DeptTreeReq) (res *v1.DeptTreeRes, err error)
DeptAdd(ctx context.Context, req *v1.DeptAddReq) (res *v1.DeptAddRes, err error)
DeptEdit(ctx context.Context, req *v1.DeptEditReq) (res *v1.DeptEditRes, err error)
DeptDelete(ctx context.Context, req *v1.DeptDeleteReq) (res *v1.DeptDeleteRes, err error)
DeptView(ctx context.Context, req *v1.DeptViewReq) (res *v1.DeptViewRes, err error)
SysDictTypeList(ctx context.Context, req *v1.SysDictTypeListReq) (res *v1.SysDictTypeListRes, err error)
SysDictTypeAdd(ctx context.Context, req *v1.SysDictTypeAddReq) (res *v1.SysDictTypeAddRes, err error)
SysDictTypeEdit(ctx context.Context, req *v1.SysDictTypeEditReq) (res *v1.SysDictTypeEditRes, err error)
SysDictTypeDelete(ctx context.Context, req *v1.SysDictTypeDeleteReq) (res *v1.SysDictTypeDeleteRes, err error)
SysDictTypeView(ctx context.Context, req *v1.SysDictTypeViewReq) (res *v1.SysDictTypeViewRes, err error)
SysDictDataList(ctx context.Context, req *v1.SysDictDataListReq) (res *v1.SysDictDataListRes, err error)
SysDictDataAdd(ctx context.Context, req *v1.SysDictDataAddReq) (res *v1.SysDictDataAddRes, err error)
SysDictDataEdit(ctx context.Context, req *v1.SysDictDataEditReq) (res *v1.SysDictDataEditRes, err error)
SysDictDataDelete(ctx context.Context, req *v1.SysDictDataDeleteReq) (res *v1.SysDictDataDeleteRes, err error)
SysDictDataView(ctx context.Context, req *v1.SysDictDataViewReq) (res *v1.SysDictDataViewRes, err error)
SysJobList(ctx context.Context, req *v1.SysJobListReq) (res *v1.SysJobListRes, err error)
SysJobView(ctx context.Context, req *v1.SysJobViewReq) (res *v1.SysJobViewRes, err error)
SysJobAdd(ctx context.Context, req *v1.SysJobAddReq) (res *v1.SysJobAddRes, err error)
SysJobUpdate(ctx context.Context, req *v1.SysJobUpdateReq) (res *v1.SysJobUpdateRes, err error)
SysJobUpdateStatus(ctx context.Context, req *v1.SysJobUpdateStatusReq) (res *v1.SysJobUpdateStatusRes, err error)
SysJobDelete(ctx context.Context, req *v1.SysJobDeleteReq) (res *v1.SysJobDeleteRes, err error)
SysJobExec(ctx context.Context, req *v1.SysJobExecReq) (res *v1.SysJobExecRes, err error)
ListLogininfor(ctx context.Context, req *v1.ListLogininforReq) (res *v1.ListLogininforRes, err error)
DeleteLogininfor(ctx context.Context, req *v1.DeleteLogininforReq) (res *v1.DeleteLogininforRes, err error)
MenuAll(ctx context.Context, req *v1.MenuAllReq) (res *v1.MenuAllRes, err error)
MenuList(ctx context.Context, req *v1.MenuListReq) (res *v1.MenuListRes, err error)
MenuView(ctx context.Context, req *v1.MenuViewReq) (res *v1.MenuViewRes, err error)
MenuAdd(ctx context.Context, req *v1.MenuAddReq) (res *v1.MenuAddRes, err error)
MenuUpdate(ctx context.Context, req *v1.MenuUpdateReq) (res *v1.MenuUpdateRes, err error)
MenuDelete(ctx context.Context, req *v1.MenuDeleteReq) (res *v1.MenuDeleteRes, err error)
MenuTree(ctx context.Context, req *v1.MenuTreeReq) (res *v1.MenuTreeRes, err error)
SysNoticeList(ctx context.Context, req *v1.SysNoticeListReq) (res *v1.SysNoticeListRes, err error)
SysNoticeAdd(ctx context.Context, req *v1.SysNoticeAddReq) (res *v1.SysNoticeAddRes, err error)
SysNoticeEdit(ctx context.Context, req *v1.SysNoticeEditReq) (res *v1.SysNoticeEditRes, err error)
SysNoticeDelete(ctx context.Context, req *v1.SysNoticeDeleteReq) (res *v1.SysNoticeDeleteRes, err error)
SysNoticeView(ctx context.Context, req *v1.SysNoticeViewReq) (res *v1.SysNoticeViewRes, err error)
SysUserOnlineList(ctx context.Context, req *v1.SysUserOnlineListReq) (res *v1.SysUserOnlineListRes, err error)
SysUserOnlineDelete(ctx context.Context, req *v1.SysUserOnlineDeleteReq) (res *v1.SysUserOnlineDeleteRes, err error)
GetOperLogList(ctx context.Context, req *v1.GetOperLogListReq) (res *v1.GetOperLogListRes, err error)
SysOssList(ctx context.Context, req *v1.SysOssListReq) (res *v1.SysOssListRes, err error)
SysOssView(ctx context.Context, req *v1.SysOssViewReq) (res *v1.SysOssViewRes, err error)
SysOssDelete(ctx context.Context, req *v1.SysOssDeleteReq) (res *v1.SysOssDeleteRes, err error)
SysOssConfigList(ctx context.Context, req *v1.SysOssConfigListReq) (res *v1.SysOssConfigListRes, err error)
SysOssConfigView(ctx context.Context, req *v1.SysOssConfigViewReq) (res *v1.SysOssConfigViewRes, err error)
SysOssConfigAdd(ctx context.Context, req *v1.SysOssConfigAddReq) (res *v1.SysOssConfigAddRes, err error)
SysOssConfigEdit(ctx context.Context, req *v1.SysOssConfigEditReq) (res *v1.SysOssConfigEditRes, err error)
SysOssConfigDelete(ctx context.Context, req *v1.SysOssConfigDeleteReq) (res *v1.SysOssConfigDeleteRes, err error)
PostList(ctx context.Context, req *v1.PostListReq) (res *v1.PostListRes, err error)
PostAdd(ctx context.Context, req *v1.PostAddReq) (res *v1.PostAddRes, err error)
PostEdit(ctx context.Context, req *v1.PostEditReq) (res *v1.PostEditRes, err error)
PostDelete(ctx context.Context, req *v1.PostDeleteReq) (res *v1.PostDeleteRes, err error)
PostView(ctx context.Context, req *v1.PostViewReq) (res *v1.PostViewRes, err error)
PostExport(ctx context.Context, req *v1.PostExportReq) (res *v1.PostExportRes, err error)
QrcodeLogin(ctx context.Context, req *v1.QrcodeLoginReq) (res *v1.QrcodeLoginRes, err error)
QrcodeLoginStatus(ctx context.Context, req *v1.QrcodeLoginStatusReq) (res *v1.QrcodeLoginStatusRes, err error)
QrcodeBind(ctx context.Context, req *v1.QrcodeBindReq) (res *v1.QrcodeBindRes, err error)
QrcodeBindStatus(ctx context.Context, req *v1.QrcodeBindStatusReq) (res *v1.QrcodeBindStatusRes, err error)
QrcodeScanCallback(ctx context.Context, req *v1.QrcodeScanCallbackReq) (res *v1.QrcodeScanCallbackRes, err error)
QrcodeRegisterAndBindOpenId(ctx context.Context, req *v1.QrcodeRegisterAndBindOpenIdReq) (res *v1.QrcodeRegisterAndBindOpenIdRes, err error)
QrcodeLoginAndBindOpenId(ctx context.Context, req *v1.QrcodeLoginAndBindOpenIdReq) (res *v1.QrcodeLoginAndBindOpenIdRes, err error)
QrcodeLoginSelectUser(ctx context.Context, req *v1.QrcodeLoginSelectUserReq) (res *v1.QrcodeLoginSelectUserRes, err error)
RoleList(ctx context.Context, req *v1.RoleListReq) (res *v1.RoleListRes, err error)
RoleAdd(ctx context.Context, req *v1.RoleAddReq) (res *v1.RoleAddRes, 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)
RoleView(ctx context.Context, req *v1.RoleViewReq) (res *v1.RoleViewRes, err error)
RoleDataScopeEdit(ctx context.Context, req *v1.RoleDataScopeEditReq) (res *v1.RoleDataScopeEditRes, err error)
SysSocialList(ctx context.Context, req *v1.SysSocialListReq) (res *v1.SysSocialListRes, err error)
SysSocialDelete(ctx context.Context, req *v1.SysSocialDeleteReq) (res *v1.SysSocialDeleteRes, err error)
SysNoticeUserList(ctx context.Context, req *v1.SysNoticeUserListReq) (res *v1.SysNoticeUserListRes, err error)
SysNoticeUserExport(ctx context.Context, req *v1.SysNoticeUserExportReq) (res *v1.SysNoticeUserExportRes, err error)
SysNoticeUserView(ctx context.Context, req *v1.SysNoticeUserViewReq) (res *v1.SysNoticeUserViewRes, err error)
SysNoticeUserEdit(ctx context.Context, req *v1.SysNoticeUserEditReq) (res *v1.SysNoticeUserEditRes, err error)
SysNoticeUserDelete(ctx context.Context, req *v1.SysNoticeUserDeleteReq) (res *v1.SysNoticeUserDeleteRes, err error)
SysNoticeUserStatus(ctx context.Context, req *v1.SysNoticeUserStatusReq) (res *v1.SysNoticeUserStatusRes, err error)
SysNoticeUserRead(ctx context.Context, req *v1.SysNoticeUserReadReq) (res *v1.SysNoticeUserReadRes, err error)
SysTenantList(ctx context.Context, req *v1.SysTenantListReq) (res *v1.SysTenantListRes, err error)
SysTenantAdd(ctx context.Context, req *v1.SysTenantAddReq) (res *v1.SysTenantAddRes, err error)
SysTenantEdit(ctx context.Context, req *v1.SysTenantEditReq) (res *v1.SysTenantEditRes, err error)
SysTenantDelete(ctx context.Context, req *v1.SysTenantDeleteReq) (res *v1.SysTenantDeleteRes, err error)
SysTenantStatus(ctx context.Context, req *v1.SysTenantStatusReq) (res *v1.SysTenantStatusRes, err error)
SysTenantView(ctx context.Context, req *v1.SysTenantViewReq) (res *v1.SysTenantViewRes, err error)
SysTenantSyncMenu(ctx context.Context, req *v1.SysTenantSyncMenuReq) (res *v1.SysTenantSyncMenuRes, err error)
SysTenantPackageList(ctx context.Context, req *v1.SysTenantPackageListReq) (res *v1.SysTenantPackageListRes, err error)
SysTenantPackageView(ctx context.Context, req *v1.SysTenantPackageViewReq) (res *v1.SysTenantPackageViewRes, err error)
SysTenantPackageStatus(ctx context.Context, req *v1.SysTenantPackageStatusReq) (res *v1.SysTenantPackageStatusRes, err error)
SysTenantPackageAdd(ctx context.Context, req *v1.SysTenantPackageAddReq) (res *v1.SysTenantPackageAddRes, err error)
SysTenantPackageEdit(ctx context.Context, req *v1.SysTenantPackageEditReq) (res *v1.SysTenantPackageEditRes, err error)
SysTenantPackageDelete(ctx context.Context, req *v1.SysTenantPackageDeleteReq) (res *v1.SysTenantPackageDeleteRes, err error)
UserInfo(ctx context.Context, req *v1.UserInfoReq) (res *v1.UserInfoRes, err error)
UserList(ctx context.Context, req *v1.UserListReq) (res *v1.UserListRes, err error)
AddUser(ctx context.Context, req *v1.AddUserReq) (res *v1.AddUserRes, err error)
UserProfile(ctx context.Context, req *v1.UserProfileReq) (res *v1.UserProfileRes, err error)
UpdateCurrentUser(ctx context.Context, req *v1.UpdateCurrentUserReq) (res *v1.UpdateCurrentUserRes, err error)
UpdateCurrentUserPassword(ctx context.Context, req *v1.UpdateCurrentUserPasswordReq) (res *v1.UpdateCurrentUserPasswordRes, err error)
UpdateUser(ctx context.Context, req *v1.UpdateUserReq) (res *v1.UpdateUserRes, err error)
DeleteUser(ctx context.Context, req *v1.DeleteUserReq) (res *v1.DeleteUserRes, err error)
GetUser(ctx context.Context, req *v1.GetUserReq) (res *v1.GetUserRes, err error)
ResetPassword(ctx context.Context, req *v1.ResetPasswordReq) (res *v1.ResetPasswordRes, err error)
GetUserListByDeptId(ctx context.Context, req *v1.GetUserListByDeptIdReq) (res *v1.GetUserListByDeptIdRes, err error)
UserRegister(ctx context.Context, req *v1.UserRegisterReq) (res *v1.UserRegisterRes, err error)
UserStatus(ctx context.Context, req *v1.UserStatusReq) (res *v1.UserStatusRes, err error)
}
+72
View File
@@ -0,0 +1,72 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"github.com/gogf/gf/v2/frame/g"
)
type LoginReq struct {
g.Meta `path:"/auth/login" method:"post" tags:"系统-授权" summary:"登录"`
TenantId string `json:"tenantId" v:"required#租户ID不能为空" dc:"租户ID"`
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
CaptchaID string `json:"captchaID" dc:"验证码ID"`
CaptchaValue string `json:"captchaValue" v:"required#验证码不能为空" dc:"验证码"`
}
type LoginRes struct {
ID int64 `json:"id" dc:"用户ID"`
Username string `json:"username" dc:"用户名"`
NickName string `json:"nickName" dc:"昵称"`
Avatar string `json:"avatar" dc:"头像"`
AccessToken string `json:"accessToken" dc:"访问令牌"`
}
type RefreshTokenReq struct {
g.Meta `path:"/auth/refresh" method:"post" tags:"系统-授权" summary:"刷新访问令牌"`
WithCredentials bool `json:"withCredentials" dc:"是否携带凭证"`
}
type RefreshTokenRes struct {
Data string `json:"data" dc:"新的访问令牌"`
Status int `json:"status" dc:"状态码"`
}
type LogoutReq struct {
g.Meta `path:"/auth/logout" method:"post" tags:"系统-授权" summary:"退出登录"`
WithCredentials bool `json:"withCredentials" dc:"是否携带凭证"`
}
type LogoutRes struct {
Data string `json:"data" dc:"退出登录"`
Status int `json:"status" dc:"状态码"`
}
type GetAccessCodesReq struct {
g.Meta `path:"/auth/codes" method:"get" tags:"系统-授权" summary:"获取用户权限码"`
IsCache bool `json:"isCache" dc:"是否从缓存中获取"`
}
type GetAccessCodesRes struct {
Data []string `json:"data" dc:"用户权限码"`
Status int `json:"status" dc:"状态码"`
}
type TenantListReq struct {
g.Meta `path:"/auth/getTenantList" method:"get" tags:"系统-授权" summary:"获取租户列表"`
}
type TenantListData struct {
CompanyName string `json:"companyName" dc:"企业名称"`
Domain string `json:"domain" dc:"域名"`
TenantId string `json:"tenantId" dc:"租户ID"`
}
type TenantListRes struct {
TenantEnabled bool `json:"tenantEnabled" dc:"是否启用租户"`
VoList []TenantListData `json:"voList" dc:"租户列表"`
}
+18
View File
@@ -0,0 +1,18 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import "github.com/gogf/gf/v2/frame/g"
// 获取验证码
type GetCaptchaReq struct {
g.Meta `path:"/captcha" method:"get" tags:"系统-授权" summary:"获取验证码"`
}
type GetCaptchaRes struct {
CaptchaID string `json:"captchaID" dc:"验证码ID"`
CaptchaImage string `json:"captchaImage" dc:"验证码图片"`
}
+68
View File
@@ -0,0 +1,68 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysClientListReq struct {
g.Meta `path:"/client/list" method:"get" tags:"系统-客户端管理" summary:"获取客户端列表" x-check-permission:"cpm:system:client:list"`
model.SysClientListParam
}
type SysClientListRes struct {
Items []*model.SysClientListModel `json:"items"`
response.PageResult
}
type SysClientViewReq struct {
g.Meta `path:"/client/view" method:"get" tags:"系统-客户端管理" summary:"获取客户端详情" x-check-permission:"cpm:system:client:query"`
*model.SysClientViewParam
}
type SysClientViewRes struct {
*model.SysClientViewModel
}
type SysClientAddReq struct {
g.Meta `path:"/client/add" method:"post" tags:"系统-客户端管理" summary:"添加客户端" x-check-permission:"cpm:system:client:add"`
*model.SysClientAddParam
}
type SysClientAddRes struct {
*model.SysClientAddModel
}
type SysClientEditReq struct {
g.Meta `path:"/client/edit" method:"post" tags:"系统-客户端管理" summary:"编辑客户端" x-check-permission:"cpm:system:client:edit"`
*model.SysClientEditParam
}
type SysClientEditRes struct {
*model.SysClientEditModel
}
type SysClientDeleteReq struct {
g.Meta `path:"/client/delete" method:"post" tags:"系统-客户端管理" summary:"删除客户端" x-check-permission:"cpm:system:client:remove"`
*model.SysClientDeleteParam
}
type SysClientDeleteRes struct {
*model.SysClientDeleteModel
}
type SysClientStatusReq struct {
g.Meta `path:"/client/status" method:"post" tags:"系统-客户端管理" summary:"修改客户端状态" x-check-permission:"cpm:system:client:edit"`
*model.SysClientStatusParam
}
type SysClientStatusRes struct {
*model.SysClientStatusModel
}
+59
View File
@@ -0,0 +1,59 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type GetConfigListReq struct {
g.Meta `path:"/config/list" method:"get" tags:"系统-配置管理" summary:"获取系统配置列表" x-check-permission:"cpm:system:config:list"`
model.SysConfigListParam
}
type GetConfigListRes struct {
response.PageResult
Data []*model.SysConfigListModel `json:"items" dc:"系统配置列表"`
}
type AddConfigReq struct {
g.Meta `path:"/config/add" method:"post" tags:"系统-配置管理" summary:"添加系统配置" x-check-permission:"cpm:system:config:add"`
model.SysConfigAddParam
}
type AddConfigRes struct {
model.SysConfigAddModel
}
type EditConfigReq struct {
g.Meta `path:"/config/edit" method:"post" tags:"系统-配置管理" summary:"编辑系统配置" x-check-permission:"cpm:system:config:edit"`
model.SysConfigEditParam
}
type EditConfigRes struct {
model.SysConfigEditModel
}
type DeleteConfigReq struct {
g.Meta `path:"/config/delete" method:"post" tags:"系统-配置管理" summary:"删除系统配置" x-check-permission:"cpm:system:config:remove"`
model.SysConfigDeleteParam
}
type DeleteConfigRes struct {
model.SysConfigDeleteModel
}
type GetConfigByIdReq struct {
g.Meta `path:"/config/view" method:"get" tags:"系统-配置管理" summary:"获取系统配置详情" x-check-permission:"cpm:system:config:query"`
model.SysConfigViewParam
}
type GetConfigByIdRes struct {
model.SysConfigViewModel
}
+70
View File
@@ -0,0 +1,70 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type DeptListReq struct {
g.Meta `path:"/dept/list" method:"get" tags:"系统-部门管理" summary:"获取部门列表" x-check-permission:"cpm:system:dept:list"`
request.PageInfo
model.SysDeptListParam
}
type DeptListRes struct {
response.PageResult
Data []*model.SysDeptListModel `json:"items" dc:"部门列表"`
}
type DeptTreeReq struct {
g.Meta `path:"/dept/tree" method:"get" tags:"系统-部门管理" summary:"获取部门树" x-check-permission:"cpm:system:dept:list"`
model.SysDeptTreeParam
}
type DeptTreeRes struct {
Data []*model.SysDeptTreeModel `json:"items" dc:"部门树"`
}
type DeptAddReq struct {
g.Meta `path:"/dept/add" method:"post" tags:"系统-部门管理" summary:"新增部门" x-check-permission:"cpm:system:dept:add"`
model.SysDeptAddModel
}
type DeptAddRes struct {
DeptId int64 `json:"deptId" dc:"部门id"`
}
type DeptEditReq struct {
g.Meta `path:"/dept/edit" method:"post" tags:"系统-部门管理" summary:"编辑部门" x-check-permission:"cpm:system:dept:edit"`
model.SysDeptEditModel
}
type DeptEditRes struct {
DeptId int64 `json:"deptId" dc:"部门id"`
}
type DeptDeleteReq struct {
g.Meta `path:"/dept/delete" method:"post" tags:"系统-部门管理" summary:"删除部门" x-check-permission:"cpm:system:dept:remove"`
model.SysDeptDeleteModel
}
type DeptDeleteRes struct {
DeptId int64 `json:"deptId" dc:"部门id"`
}
type DeptViewReq struct {
g.Meta `path:"/dept/view" method:"get" tags:"系统-部门管理" summary:"获取部门详情" x-check-permission:"cpm:system:dept:query"`
model.SysDeptViewModel
}
type DeptViewRes struct {
model.SysDeptViewModel
}
+108
View File
@@ -0,0 +1,108 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysDictTypeListReq struct {
g.Meta `path:"/dict/list" method:"get" tags:"系统-字典管理" summary:"字典类型列表" x-check-permission:"cpm:system:dict:list"`
model.SysDictTypeListParam
}
type SysDictTypeListRes struct {
response.PageResult
Items []model.SysDictTypeListModel `json:"items"`
}
type SysDictTypeAddReq struct {
g.Meta `path:"/dict-type/add" method:"post" tags:"系统-字典管理" summary:"新增字典类型" x-check-permission:"cpm:system:dict:add"`
model.SysDictTypeAddParam
}
type SysDictTypeAddRes struct {
model.SysDictTypeAddModel
}
type SysDictTypeEditReq struct {
g.Meta `path:"/dict-type/edit" method:"post" tags:"系统-字典管理" summary:"编辑字典类型" x-check-permission:"cpm:system:dict:edit"`
model.SysDictTypeEditParam
}
type SysDictTypeEditRes struct {
model.SysDictTypeEditModel
}
type SysDictTypeDeleteReq struct {
g.Meta `path:"/dict-type/delete" method:"post" tags:"系统-字典管理" summary:"删除字典类型" x-check-permission:"cpm:system:dict:remove"`
model.SysDictTypeDeleteParam
}
type SysDictTypeDeleteRes struct {
model.SysDictTypeDeleteModel
}
type SysDictTypeViewReq struct {
g.Meta `path:"/dict-type/view" method:"get" tags:"系统-字典管理" summary:"字典类型详情" x-check-permission:"cpm:system:dict:query"`
model.SysDictTypeViewParam
}
type SysDictTypeViewRes struct {
model.SysDictTypeViewModel
}
type SysDictDataListReq struct {
g.Meta `path:"/dict-data/list/{id}" method:"get" tags:"系统-字典管理" summary:"字典数据列表" `
request.PageInfo
model.SysDictDataListParam
}
type SysDictDataListRes struct {
response.PageResult
Items []model.SysDictDataListModel `json:"items"`
Type *model.SysDictTypeViewModel `json:"type"`
}
type SysDictDataAddReq struct {
g.Meta `path:"/dict-data/add" method:"post" tags:"系统-字典管理" summary:"新增字典数据" x-check-permission:"cpm:system:dict:add"`
model.SysDictDataAddParam
}
type SysDictDataAddRes struct {
model.SysDictDataAddModel
}
type SysDictDataEditReq struct {
g.Meta `path:"/dict-data/edit" method:"post" tags:"系统-字典管理" summary:"编辑字典数据" x-check-permission:"cpm:system:dict:edit"`
model.SysDictDataEditParam
}
type SysDictDataEditRes struct {
model.SysDictDataEditModel
}
type SysDictDataDeleteReq struct {
g.Meta `path:"/dict-data/delete" method:"post" tags:"系统-字典管理" summary:"删除字典数据" x-check-permission:"cpm:system:dict:remove"`
model.SysDictDataDeleteParam
}
type SysDictDataDeleteRes struct {
model.SysDictDataDeleteModel
}
type SysDictDataViewReq struct {
g.Meta `path:"/dict-data/view" method:"get" tags:"系统-字典管理" summary:"字典数据详情" x-check-permission:"cpm:system:dict:query"`
model.SysDictDataViewParam
}
type SysDictDataViewRes struct {
model.SysDictDataViewModel
}
+83
View File
@@ -0,0 +1,83 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
// 获取任务列表
type SysJobListReq struct {
g.Meta `path:"/job/list" method:"get" tags:"系统-任务管理" summary:"获取任务列表" x-check-permission:"cpm:system:job:list"`
model.SysJobListParam
request.PageInfo
}
type SysJobListRes struct {
Data []*model.SysJobListModel `json:"items" dc:"任务列表"`
response.PageResult
}
// 获取任务详情
type SysJobViewReq struct {
g.Meta `path:"/job/view" method:"get" tags:"系统-任务管理" summary:"获取任务详情" x-check-permission:"cpm:system:job:view"`
JobId int64 `v:"required" json:"jobId" dc:"任务ID"`
}
type SysJobViewRes struct {
model.SysJobViewModel
}
// 添加任务
type SysJobAddReq struct {
g.Meta `path:"/job/add" method:"post" tags:"系统-任务管理" summary:"添加任务" x-check-permission:"cpm:system:job:add"`
model.SysJobAddModel
}
type SysJobAddRes struct {
model.SysJobViewModel
}
// 更新任务
type SysJobUpdateReq struct {
g.Meta `path:"/job/update" method:"post" tags:"系统-任务管理" summary:"更新任务" x-check-permission:"cpm:system:job:update"`
model.SysJobUpdateModel
}
type SysJobUpdateRes struct {
model.SysJobViewModel
}
// 更新任务
type SysJobUpdateStatusReq struct {
g.Meta `path:"/job/status" method:"post" tags:"系统" summary:"更新任务状态" x-check-permission:"cpm:system:job:status"`
model.SysJobUpdateStatusModel
}
type SysJobUpdateStatusRes = SysJobUpdateRes
// 删除任务
type SysJobDeleteReq struct {
g.Meta `path:"/job/delete" method:"post" tags:"系统-任务管理" summary:"删除任务" x-check-permission:"cpm:system:job:delete"`
JobIds []int64 `json:"jobId" dc:"任务ID"`
}
type SysJobExecReq struct {
g.Meta `path:"/job/exec" method:"post" tags:"系统" summary:"执行任务" x-check-permission:"cpm:system:job:exec"`
JobId int64 `v:"required" json:"jobId" dc:"任务ID"`
}
type SysJobDeleteRes struct {
JobIds []int64 `json:"jobId" dc:"任务ID"`
}
type SysJobExecRes struct {
JobId int64 `json:"jobId" dc:"任务ID"`
}
+32
View File
@@ -0,0 +1,32 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type ListLogininforReq struct {
g.Meta `path:"/logininfor/list" method:"get" tags:"系统-日志管理" summary:"登录信息列表" x-check-permission:"cpm:monitor:logininfor:list"`
model.SysLogininforListParam
}
type ListLogininforRes struct {
Items []*model.SysLogininforListModel `json:"items"`
response.PageResult
}
type DeleteLogininforReq struct {
g.Meta `path:"/logininfor/delete" method:"post" tags:"系统-日志管理" summary:"删除登录信息" x-check-permission:"cpm:monitor:logininfor:remove"`
model.SysLogininforDeleteParam
}
type DeleteLogininforRes struct {
model.SysLogininforDeleteModel
}
+116
View File
@@ -0,0 +1,116 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
// 路由菜单
type RouteMenu struct {
Id int64 `json:"id" dc:"路由ID"`
ParentId int64 `json:"parentId" dc:"父路由ID"`
Path string `json:"path" dc:"路由路径"`
Redirect *string `json:"redirect,omitempty" dc:"重定向路径"`
Name string `json:"name" dc:"路由名称"` // 必须唯一
Component string `json:"component" dc:"组件路径"`
Meta *RouteMeta `json:"meta,omitempty" dc:"路由元数据"`
Children []*RouteMenu `json:"children,omitempty" dc:"子路由"`
}
// 路由元数据
// 对应 vue/packages/@core/base/typings/src/vue-router.d.ts
type RouteMeta struct {
Title string `json:"title" dc:"菜单标题"`
Icon *string `json:"icon,omitempty" dc:"菜单图标"`
Order *int `json:"order,omitempty" dc:"菜单排序"`
OpenInNewWindow *bool `json:"openInNewWindow,omitempty" dc:"是否在新窗口打开"`
NoBasicLayout *bool `json:"noBasicLayout,omitempty" dc:"是否不使用基础布局"`
HideInMenu *bool `json:"hideInMenu,omitempty" dc:"是否隐藏菜单"`
HideInBreadcrumb *bool `json:"hideInBreadcrumb,omitempty" dc:"是否隐藏面包屑"`
HideChildrenInMenu *bool `json:"hideChildrenInMenu,omitempty" dc:"是否隐藏子菜单"`
HideInTab *bool `json:"hideInTab,omitempty" dc:"是否隐藏标签页"`
MenuVisibleWithForbidden *bool `json:"menuVisibleWithForbidden,omitempty" dc:"菜单可见但访问会被重定向到403"`
IgnoreAccess *bool `json:"ignoreAccess,omitempty" dc:"忽略权限,直接可以访问"`
KeepAlive *bool `json:"keepAlive,omitempty" dc:"开启KeepAlive缓存"`
Link *string `json:"link,omitempty" dc:"外链-跳转路径"`
Query map[string]string `json:"query,omitempty" dc:"路由所携带的参数"`
IframeSrc *string `json:"iframeSrc,omitempty" dc:"iframe地址"`
MaxNumOfOpenTab *int `json:"maxNumOfOpenTab,omitempty" dc:"标签页最大打开数量"`
Badge *string `json:"badge,omitempty" dc:"徽标"`
BadgeType *string `json:"badgeType,omitempty" dc:"徽标类型"`
BadgeVariants *string `json:"badgeVariants,omitempty" dc:"徽标颜色"`
Authority []string `json:"authority,omitempty" dc:"需要特定的角色标识才可以访问"`
AffixTab *bool `json:"affixTab,omitempty" dc:"是否固定标签页"`
AffixTabOrder *int `json:"affixTabOrder,omitempty" dc:"固定标签页的顺序"`
ActiveIcon *string `json:"activeIcon,omitempty" dc:"激活图标"`
ActivePath *string `json:"activePath,omitempty" dc:"当前激活的菜单"`
}
// 获取用户所有菜单
type MenuAllReq struct {
g.Meta `path:"/menu/all" method:"get" tags:"系统-菜单管理" summary:"获取用户所有菜单" x-check-permission:""`
}
// type MenuAllRes struct {
// Data []RouteMenu `json:"data" dc:"菜单列表"`
// }
type MenuAllRes = []*RouteMenu
type MenuListReq struct {
g.Meta `path:"/menu/list" method:"get" tags:"系统-菜单管理" summary:"获取菜单列表" x-check-permission:"cpm:system:menu:list"`
model.SysMenuListParam
}
type MenuListRes struct {
Data []*model.SysMenuListModel `json:"items" dc:"菜单列表"`
Total int `json:"total" dc:"总数"`
}
type MenuViewReq struct {
g.Meta `path:"/menu/view" method:"get" tags:"系统-菜单管理" summary:"获取菜单详情" x-check-permission:"cpm:system:menu:query"`
MenuId int64 `json:"menuId" dc:"菜单ID"`
}
type MenuViewRes struct {
model.SysMenuViewModel
}
type MenuAddReq struct {
g.Meta `path:"/menu/add" method:"post" tags:"系统-菜单管理" summary:"添加菜单" x-check-permission:"cpm:system:menu:add"`
model.SysMenuAddModel
}
type MenuAddRes struct {
model.SysMenuViewModel
}
type MenuUpdateReq struct {
g.Meta `path:"/menu/update" method:"post" tags:"系统-菜单管理" summary:"更新菜单" x-check-permission:"cpm:system:menu:edit"`
model.SysMenuUpdateModel
}
type MenuUpdateRes struct {
model.SysMenuViewModel
}
type MenuDeleteReq struct {
g.Meta `path:"/menu/delete" method:"post" tags:"系统-菜单管理" summary:"删除菜单" x-check-permission:"cpm:system:menu:remove"`
MenuId int64 `json:"menuId" dc:"菜单ID"`
}
type MenuDeleteRes struct {
}
type MenuTreeReq struct {
g.Meta `path:"/menu/tree" method:"get" tags:"系统-菜单管理" summary:"获取菜单树" x-check-permission:""`
}
type MenuTreeRes struct {
Data []*model.SysMenuTreeModel `json:"items" dc:"菜单树"`
}
+59
View File
@@ -0,0 +1,59 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysNoticeListReq struct {
g.Meta `path:"/notice/list" method:"get" tags:"系统-公告管理" summary:"公告列表" x-check-permission:"cpm:system:notice:list"`
*model.SysNoticeListParam
}
type SysNoticeListRes struct {
response.PageResult
Items []*model.SysNoticeListModel `json:"items"`
}
type SysNoticeAddReq struct {
g.Meta `path:"/notice/add" method:"post" tags:"系统-公告管理" summary:"新增公告" x-check-permission:"cpm:system:notice:add"`
*model.SysNoticeAddParam
}
type SysNoticeAddRes struct {
*model.SysNoticeAddModel
}
type SysNoticeEditReq struct {
g.Meta `path:"/notice/edit" method:"post" tags:"系统-公告管理" summary:"编辑公告" x-check-permission:"cpm:system:notice:edit"`
*model.SysNoticeEditParam
}
type SysNoticeEditRes struct {
*model.SysNoticeEditModel
}
type SysNoticeDeleteReq struct {
g.Meta `path:"/notice/delete" method:"post" tags:"系统-公告管理" summary:"删除公告" x-check-permission:"cpm:system:notice:remove"`
*model.SysNoticeDeleteParam
}
type SysNoticeDeleteRes struct {
*model.SysNoticeDeleteModel
}
type SysNoticeViewReq struct {
g.Meta `path:"/notice/view" method:"get" tags:"系统-公告管理" summary:"查看公告" x-check-permission:"cpm:system:notice:query"`
*model.SysNoticeViewParam
}
type SysNoticeViewRes struct {
*model.SysNoticeViewModel
}
+33
View File
@@ -0,0 +1,33 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysUserOnlineListReq struct {
g.Meta `path:"/user-online/list" method:"get" tags:"监控-在线用户管理" summary:"系统用户在线列表" x-check-permission:"cpm:monitor:online:list"`
request.PageInfo
model.SysUserOnlineListParam
}
type SysUserOnlineListRes struct {
Items []*model.SysUserOnlineListModel `json:"items"`
response.PageResult
}
type SysUserOnlineDeleteReq struct {
g.Meta `path:"/user-online/delete" method:"post" tags:"监控-在线用户管理" summary:"系统用户在线删除" x-check-permission:"cpm:monitor:online:remove"`
Ids []int64 `json:"ids"`
}
type SysUserOnlineDeleteRes struct {
}
+25
View File
@@ -0,0 +1,25 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type GetOperLogListReq struct {
g.Meta `path:"/oper-log/list" method:"get" tags:"系统-日志管理" summary:"操作日志列表" x-check-permission:"cpm:monitor:operlog:list"`
model.SysOperLogListParam
request.PageInfo
}
type GetOperLogListRes struct {
Items []*model.SysOperLogListModel `json:"items"`
response.PageResult
}
+43
View File
@@ -0,0 +1,43 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysOssListReq struct {
g.Meta `path:"/oss/list" method:"get" tags:"系统-存储管理" summary:"获取OSS列表" x-check-permission:"cpm:system:oss:list"`
model.SysOssListParam
request.PageInfo
}
type SysOssListRes struct {
Items []*model.SysOssListModel `json:"items"`
response.PageResult
}
type SysOssViewReq struct {
g.Meta `path:"/oss/view" method:"get" tags:"系统-存储管理" summary:"查看文件" x-check-permission:"cpm:system:oss:query"`
*model.SysOssViewParam
}
type SysOssViewRes struct {
*model.SysOssViewModel
}
type SysOssDeleteReq struct {
g.Meta `path:"/oss/delete" method:"post" tags:"系统-存储管理" summary:"删除文件" x-check-permission:"cpm:system:oss:remove"`
*model.SysOssDeleteParam
}
type SysOssDeleteRes struct {
*model.SysOssDeleteModel
}
+54
View File
@@ -0,0 +1,54 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysOssConfigListReq struct {
g.Meta `path:"/oss-config/list" method:"get" tags:"系统-存储管理" summary:"获取存储配置列表" x-check-permission:"cpm:system:ossConfig:list"`
*model.SysOssConfigListParam
}
type SysOssConfigListRes struct {
response.PageResult
Items []*model.SysOssConfigListModel `json:"items"`
}
type SysOssConfigViewReq struct {
g.Meta `path:"/oss-config/view" method:"get" tags:"系统-存储管理" summary:"获取存储配置详情" x-check-permission:"cpm:system:ossConfig:list"`
*model.SysOssConfigViewParam
}
type SysOssConfigViewRes struct {
*model.SysOssConfigViewModel
}
type SysOssConfigAddReq struct {
g.Meta `path:"/oss-config/add" method:"post" tags:"系统-存储管理" summary:"新增存储配置" x-check-permission:"cpm:system:ossConfig:add"`
*model.SysOssConfigAddParam
}
type SysOssConfigAddRes struct {
*model.SysOssConfigAddModel
}
type SysOssConfigEditReq struct {
g.Meta `path:"/oss-config/edit" method:"post" tags:"系统-存储管理" summary:"编辑存储配置" x-check-permission:"cpm:system:ossConfig:edit"`
*model.SysOssConfigEditParam
}
type SysOssConfigEditRes struct {
*model.SysOssConfigEditModel
}
type SysOssConfigDeleteReq struct {
g.Meta `path:"/oss-config/delete" method:"post" tags:"系统-存储管理" summary:"删除存储配置" x-check-permission:"cpm:system:ossConfig:remove"`
*model.SysOssConfigDeleteParam
}
type SysOssConfigDeleteRes struct {
*model.SysOssConfigDeleteModel
}
+68
View File
@@ -0,0 +1,68 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type PostListReq struct {
g.Meta `path:"/post/list" method:"get" tags:"系统-岗位管理" summary:"获取岗位列表" x-check-permission:"cpm:system:post:list"`
*model.SysPostListParam
}
type PostListRes struct {
response.PageResult
Data []*model.SysPostListModel `json:"items" dc:"岗位列表"`
}
type PostAddReq struct {
g.Meta `path:"/post/add" method:"post" tags:"系统-岗位管理" summary:"新增岗位" x-check-permission:"cpm:system:post:add"`
*model.SysPostAddParam
}
type PostAddRes struct {
*model.SysPostAddModel
}
type PostEditReq struct {
g.Meta `path:"/post/edit" method:"post" tags:"系统-岗位管理" summary:"编辑岗位" x-check-permission:"cpm:system:post:edit"`
*model.SysPostEditParam
}
type PostEditRes struct {
*model.SysPostEditModel
}
type PostDeleteReq struct {
g.Meta `path:"/post/delete" method:"post" tags:"系统-岗位管理" summary:"删除岗位"`
*model.SysPostDeleteParam
}
type PostDeleteRes struct {
*model.SysPostDeleteModel
}
type PostViewReq struct {
g.Meta `path:"/post/view" method:"get" tags:"系统-岗位管理" summary:"获取岗位详情" x-check-permission:"cpm:system:post:list"`
*model.SysPostViewParam
}
type PostViewRes struct {
*model.SysPostViewModel
}
type PostExportReq struct {
g.Meta `path:"/post/export" method:"post" tags:"系统-岗位管理" summary:"导出岗位" x-check-permission:"cpm:system:post:export"`
*model.SysPostExportParam
}
type PostExportRes struct {
*model.SysPostExportModel
}
+83
View File
@@ -0,0 +1,83 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
// 获取登录二维码
type QrcodeLoginReq struct {
g.Meta `path:"/qrcode/login" method:"get" tags:"系统-二维码" summary:"获取登录二维码"`
}
type QrcodeLoginRes struct {
model.QrcodeLoginModel
}
// 获取登录二维码扫码结果
type QrcodeLoginStatusReq struct {
g.Meta `path:"/qrcode/login/status" method:"get" tags:"系统-二维码" summary:"获取登录二维码扫码状态"`
TempUserId string `json:"tempUserId" dc:"临时用户ID" v:"required#临时用户ID不能为空"`
}
type QrcodeLoginStatusRes struct {
model.QrcodeLoginModel
}
// 获取绑定二维码
type QrcodeBindReq struct {
g.Meta `path:"/qrcode/bind" method:"get" tags:"系统-二维码" summary:"获取绑定二维码"`
}
type QrcodeBindRes struct {
model.QrcodeCacheModel
}
// 获取绑定二维码扫码结果
type QrcodeBindStatusReq struct {
g.Meta `path:"/qrcode/bind/status" method:"get" tags:"系统-二维码" summary:"获取绑定二维码扫码状态"`
}
type QrcodeBindStatusRes struct {
model.QrcodeBindStatusModel
}
// 扫码成功回调
type QrcodeScanCallbackReq struct {
g.Meta `path:"/qrcode/scan/callback" method:"post" tags:"系统-二维码" summary:"扫码成功回调"`
model.QrcodeScanCallbackParam
}
type QrcodeScanCallbackRes struct {
}
// 注册并关联OpenId
type QrcodeRegisterAndBindOpenIdReq struct {
g.Meta `path:"/qrcode/registerAndBindOpenId" method:"post" tags:"系统-二维码" summary:"注册并关联OpenId"`
model.QrcodeRegisterAndBindOpenIdParam
}
type QrcodeRegisterAndBindOpenIdRes struct {
model.QrcodeLoginAndBindOpenIdModel
}
// 登录并关联OpenId
type QrcodeLoginAndBindOpenIdReq struct {
g.Meta `path:"/qrcode/loginAndBindOpenId" method:"post" tags:"系统-二维码" summary:"登录并关联OpenId"`
model.QrcodeLoginAndBindOpenIdParam
}
type QrcodeLoginAndBindOpenIdRes struct {
model.QrcodeLoginAndBindOpenIdModel
}
// 扫码后选择用户登录
type QrcodeLoginSelectUserReq struct {
g.Meta `path:"/qrcode/loginSelectUser" method:"post" tags:"系统-二维码" summary:"扫码后选择用户登录"`
model.QrcodeLoginSelectUserIdParam
}
type QrcodeLoginSelectUserRes struct {
model.QrcodeLoginAndBindOpenIdModel
}
+69
View File
@@ -0,0 +1,69 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type RoleListReq struct {
g.Meta `path:"/role/list" method:"get" tags:"系统-角色管理" summary:"获取角色列表" x-check-permission:"cpm:system:role:list"`
request.PageInfo
model.SysRoleListParam
}
type RoleListRes struct {
response.PageResult
Data []*model.SysRoleListModel `json:"items" dc:"角色列表"`
}
type RoleAddReq struct {
g.Meta `path:"/role/add" method:"post" tags:"系统-角色管理" summary:"新增角色" x-check-permission:"cpm:system:role:add"`
model.SysRoleAddParam
}
type RoleAddRes struct {
model.SysRoleAddModel
}
type RoleEditReq struct {
g.Meta `path:"/role/edit" method:"post" tags:"系统-角色管理" summary:"编辑角色" x-check-permission:"cpm:system:role:edit"`
model.SysRoleEditParam
}
type RoleEditRes struct {
model.SysRoleEditModel
}
type RoleDeleteReq struct {
g.Meta `path:"/role/delete" method:"post" tags:"系统-角色管理" summary:"删除角色" x-check-permission:"cpm:system:role:remove"`
model.SysRoleDeleteParam
}
type RoleDeleteRes struct {
model.SysRoleDeleteModel
}
type RoleViewReq struct {
g.Meta `path:"/role/view" method:"get" tags:"系统-角色管理" summary:"获取角色详情" x-check-permission:"cpm:system:role:query"`
model.SysRoleViewParam
}
type RoleViewRes struct {
model.SysRoleViewModel
}
type RoleDataScopeEditReq struct {
g.Meta `path:"/role/dataScope" method:"post" tags:"系统-角色管理" summary:"编辑角色数据权限" x-check-permission:"cpm:system:role:edit"`
model.SysRoleDataScopeEditParam
}
type RoleDataScopeEditRes struct {
}
+34
View File
@@ -0,0 +1,34 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysSocialListReq struct {
g.Meta `path:"/social/list" method:"get" tags:"系统-第三方授权管理" summary:"社交列表" x-check-permission:"cpc:current:user"`
model.SysSocialListParam
request.PageInfo
}
type SysSocialListRes struct {
Items []*model.SysSocialListModel `json:"items"`
response.PageResult
}
// 删除绑定关系
type SysSocialDeleteReq struct {
g.Meta `path:"/social/delete" method:"post" tags:"系统-第三方授权管理" summary:"删除社交" x-check-permission:"cpc:current:user"`
Id int64 `json:"id" dc:"主键"`
}
type SysSocialDeleteRes struct {
}
+75
View File
@@ -0,0 +1,75 @@
// Package sysnoticeuser
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version
package v1 //sysnoticeuser
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
// ListReq 查询用户通知公告表列表
type SysNoticeUserListReq struct {
g.Meta `path:"/sysNoticeUser/list" method:"get" tags:"系统-用户通知公告表" summary:"获取用户通知公告表列表" x-check-permission:"cpm:system:sysNoticeUser:list,cpc:current:user"`
model.SysNoticeUserListParam
}
type SysNoticeUserListRes struct {
response.PageResult
Items []*model.SysNoticeUserListModel `json:"items" dc:"数据列表"`
}
// ExportReq 导出用户通知公告表列表
type SysNoticeUserExportReq struct {
g.Meta `path:"/sysNoticeUser/export" method:"post" tags:"系统-用户通知公告表" summary:"导出用户通知公告表列表" x-check-permission:"cpm:system:sysNoticeUser:export,cpc:current:user"`
model.SysNoticeUserListParam
}
type SysNoticeUserExportRes struct{}
// ViewReq 获取用户通知公告表指定信息
type SysNoticeUserViewReq struct {
g.Meta `path:"/sysNoticeUser/view" method:"get" tags:"系统-用户通知公告表" summary:"获取用户通知公告表指定信息" x-check-permission:"cpm:system:sysNoticeUser:view,cpc:current:user"`
model.SysNoticeUserViewParam
}
type SysNoticeUserViewRes struct {
*model.SysNoticeUserViewModel
}
// EditReq 修改/新增用户通知公告表
type SysNoticeUserEditReq struct {
g.Meta `path:"/sysNoticeUser/edit" method:"post" tags:"系统-用户通知公告表" summary:"修改/新增用户通知公告表" x-check-permission:"cpm:system:sysNoticeUser:edit,cpc:current:user"`
model.SysNoticeUserEditParam
}
type SysNoticeUserEditRes struct{}
// DeleteReq 删除用户通知公告表
type SysNoticeUserDeleteReq struct {
g.Meta `path:"/sysNoticeUser/delete" method:"post" tags:"系统-用户通知公告表" summary:"删除用户通知公告表" x-check-permission:"cpm:system:sysNoticeUser:delete,cpc:current:user"`
model.SysNoticeUserDeleteParam
}
type SysNoticeUserDeleteRes struct{}
// StatusReq 更新用户通知公告表状态
type SysNoticeUserStatusReq struct {
g.Meta `path:"/sysNoticeUser/status" method:"post" tags:"系统-用户通知公告表" summary:"更新用户通知公告表状态" x-check-permission:"cpm:system:sysNoticeUser:status,cpc:current:user"`
model.SysNoticeUserStatusParam
}
type SysNoticeUserStatusRes struct{}
// ReadReq 已读
type SysNoticeUserReadReq struct {
g.Meta `path:"/sysNoticeUser/read" method:"post" tags:"系统-用户通知公告表" summary:"已读" x-check-permission:"cpm:system:sysNoticeUser:read,cpc:current:user"`
model.SysNoticeUserReadParam
}
type SysNoticeUserReadRes struct{}
+135
View File
@@ -0,0 +1,135 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysTenantListReq struct {
g.Meta `path:"/tenant/list" method:"get" tags:"系统-租户管理" summary:"租户列表" x-check-permission:"cpm:system:tenant:list"`
request.PageInfo
*model.SysTenantListParam
}
type SysTenantListRes struct {
response.PageResult
Items []*model.SysTenantListModel `json:"items"`
}
type SysTenantAddReq struct {
g.Meta `path:"/tenant/add" method:"post" tags:"系统-租户管理" summary:"租户添加" x-check-permission:"cpm:system:tenant:add"`
*model.SysTenantAddParam
}
type SysTenantAddRes struct {
*model.SysTenantAddModel
}
type SysTenantEditReq struct {
g.Meta `path:"/tenant/edit" method:"post" tags:"系统-租户管理" summary:"租户编辑" x-check-permission:"cpm:system:tenant:edit"`
*model.SysTenantEditParam
}
type SysTenantEditRes struct {
*model.SysTenantEditModel
}
type SysTenantDeleteReq struct {
g.Meta `path:"/tenant/delete" method:"post" tags:"系统-租户管理" summary:"租户删除" x-check-permission:"cpm:system:tenant:remove"`
*model.SysTenantDeleteParam
}
type SysTenantDeleteRes struct {
*model.SysTenantDeleteModel
}
type SysTenantStatusReq struct {
g.Meta `path:"/tenant/status" method:"post" tags:"系统-租户管理" summary:"租户状态" x-check-permission:"cpm:system:tenant:edit"`
*model.SysTenantStatusParam
}
type SysTenantStatusRes struct {
*model.SysTenantStatusModel
}
type SysTenantViewReq struct {
g.Meta `path:"/tenant/view" method:"get" tags:"系统-租户管理" summary:"租户详情" x-check-permission:"cpm:system:tenant:query"`
*model.SysTenantViewParam
}
type SysTenantViewRes struct {
*model.SysTenantViewModel
}
type SysTenantSyncMenuReq struct {
g.Meta `path:"/tenant/syncmenu" method:"post" tags:"系统-租户管理" summary:"同步租户菜单" x-check-permission:"cpm:system:tenant:syncmenu"`
*model.SysTenantSyncMenuParam
}
type SysTenantSyncMenuRes struct {
*model.SysTenantSyncMenuModel
}
type SysTenantPackageListReq struct {
g.Meta `path:"/tenant/package/list" method:"get" tags:"系统-租户管理" summary:"租户套餐列表" x-check-permission:"cpm:system:tenant:package:list"`
request.PageInfo
model.SysTenantPackageListParam
}
type SysTenantPackageListRes struct {
response.PageResult
Items []*model.SysTenantPackageListModel `json:"items"`
}
type SysTenantPackageViewReq struct {
g.Meta `path:"/tenant/package/view" method:"get" tags:"系统-租户管理" summary:"租户套餐详情" x-check-permission:"cpm:system:tenantPackage:query"`
*model.SysTenantPackageViewParam
}
type SysTenantPackageViewRes struct {
*model.SysTenantPackageViewModel
}
type SysTenantPackageStatusReq struct {
g.Meta `path:"/tenant/package/status" method:"post" tags:"系统-租户管理" summary:"租户套餐状态" x-check-permission:"cpm:system:tenantPackage:edit"`
*model.SysTenantPackageStatusParam
}
type SysTenantPackageStatusRes struct {
*model.SysTenantPackageStatusModel
}
type SysTenantPackageAddReq struct {
g.Meta `path:"/tenant/package/add" method:"post" tags:"系统-租户管理" summary:"租户套餐添加" x-check-permission:"cpm:system:tenantPackage:add"`
*model.SysTenantPackageAddParam
}
type SysTenantPackageAddRes struct {
*model.SysTenantPackageAddModel
}
type SysTenantPackageEditReq struct {
g.Meta `path:"/tenant/package/edit" method:"post" tags:"系统-租户管理" summary:"租户套餐编辑" x-check-permission:"cpm:system:tenantPackage:edit"`
*model.SysTenantPackageEditParam
}
type SysTenantPackageEditRes struct {
*model.SysTenantPackageEditModel
}
type SysTenantPackageDeleteReq struct {
g.Meta `path:"/tenant/package/delete" method:"post" tags:"系统-租户管理" summary:"租户套餐删除" x-check-permission:"cpm:system:tenantPackage:remove"`
*model.SysTenantPackageDeleteParam
}
type SysTenantPackageDeleteRes struct {
*model.SysTenantPackageDeleteModel
}
+141
View File
@@ -0,0 +1,141 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type UserInfo struct {
Id int64 `json:"id" dc:"用户ID"`
Username string `json:"userName" dc:"用户名"`
Nickname string `json:"realName" dc:"昵称"`
Avatar string `json:"avatar" dc:"头像"`
Email string `json:"email" dc:"邮箱"`
HomePath string `json:"homePath" dc:"首页路径"`
}
type UserInfoReq struct {
g.Meta `path:"/user/info" method:"get" tags:"系统-用户管理" summary:"获取当前用户信息" x-check-permission:"cpc:current:user"`
}
type UserInfoRes struct {
UserInfo
}
type UserListReq struct {
g.Meta `path:"/user/list" method:"get" tags:"系统-用户管理" summary:"获取用户列表" x-check-permission:"cpm:system:user:list"`
request.PageInfo
model.UserListParam
}
type UserListRes struct {
response.PageResult
Data []*model.SysUserListModel `json:"items" dc:"用户列表"`
}
type AddUserReq struct {
g.Meta `path:"/user/add" method:"post" tags:"系统-用户管理" summary:"新增用户" x-check-permission:"cpm:system:user:add"`
model.SysUserAddModel
}
type AddUserRes struct {
Data *model.SysUserViewModel `json:"data" dc:"用户信息"`
}
type UserProfileReq struct {
g.Meta `path:"/user/profile" method:"get" tags:"系统-用户管理" summary:"获取当前用户信息" x-check-permission:"cpc:current:user"`
}
type UserProfileRes struct {
User *model.UserProfileModel `json:"user" dc:"用户信息"`
}
type UpdateCurrentUserReq struct {
g.Meta `path:"/user/profile/update" method:"post" tags:"系统-用户管理" summary:"更新当前用户信息" x-check-permission:"cpc:current:user"`
model.UpdateCurrentUserModel
}
type UpdateCurrentUserRes struct {
UserInfo
}
type UpdateCurrentUserPasswordReq struct {
g.Meta `path:"/user/profile/password" method:"post" tags:"系统-用户管理" summary:"更新当前用户密码" x-check-permission:"cpc:current:user"`
model.UpdateCurrentUserPasswordModel
}
type UpdateCurrentUserPasswordRes struct {
}
type UpdateUserReq struct {
g.Meta `path:"/user/update" method:"post" tags:"系统-用户管理" summary:"更新用户信息" x-check-permission:"cpm:system:user:edit"`
model.SysUserUpdateModel
}
type UpdateUserRes struct {
model.SysUserViewModel
}
type DeleteUserReq struct {
g.Meta `path:"/user/delete" method:"post" tags:"系统-用户管理" summary:"删除用户" x-check-permission:"cpm:system:user:remove"`
UserId int64 `json:"userId" dc:"用户ID"`
UserIds []int64 `json:"userIds" dc:"用户ID列表"`
}
type DeleteUserRes struct {
}
type GetUserReq struct {
g.Meta `path:"/user/view" method:"get" tags:"系统-用户管理" summary:"获取用户信息" x-check-permission:"cpm:system:user:query"`
UserId int64 `json:"userId" dc:"用户ID"`
}
type GetUserRes struct {
model.SysUserViewModel
}
type ResetPasswordReq struct {
g.Meta `path:"/user/resetPassword" method:"post" tags:"系统-用户管理" summary:"重置用户密码" x-check-permission:"cpm:system:user:resetPwd"`
UserId int64 `json:"userId" dc:"用户ID"`
Password string `json:"password" dc:"新密码"`
}
type ResetPasswordRes struct {
}
type GetUserListByDeptIdReq struct {
g.Meta `path:"/user/listByDeptId" method:"get" tags:"系统-用户管理" summary:"获取部门用户列表" x-check-permission:"cpm:system:user:list"`
DeptId int64 `json:"deptId" dc:"部门ID"`
request.PageInfo
}
type GetUserListByDeptIdRes struct {
response.PageResult
Items []*model.SysUserMiniModel `json:"items" dc:"用户列表"`
}
// 用户注册
type UserRegisterReq struct {
g.Meta `path:"/user/register" method:"post" tags:"系统-用户管理" summary:"用户注册" x-check-permission:"cpm:system:user:register"`
model.SysUserRegisterModel
}
type UserRegisterRes struct {
}
// StatusReq 更新用户状态
type UserStatusReq struct {
g.Meta `path:"/user/status" method:"post" tags:"系统-用户管理" summary:"更新用户状态" x-check-permission:"cpm:system:user:edit"`
model.SysUserStatusParam
}
type UserStatusRes struct {
}
+289
View File
@@ -0,0 +1,289 @@
# config.yaml 配置文件
# @Link https://github.com/xiujiecn/xiu-admin
# @Copyright Copyright (c) 2025 LiXiujie
# @Author Lxj <li@xiujie.cn>
# @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
# 系统配置
system:
name: "IotLCM"
version: "1.0"
description: "IotLCM App Server"
gfmode: "dev"
upload:
local:
# path: "/data/app/iotlcmadmin-web-svc/upload"
# 本地开发环境
path: "resource/upload"
# 服务配置
server:
# 基本配置
address: ":8010"
# 接口文档
openapiPath: "/api.json" # OpenAPI接口文档地址
swaggerPath: "/swagger" # 内置SwaggerUI展示地址
# 静态服务配置
indexFiles: ["index.html","index.htm"] # 自动首页静态文件检索。默认为["index.html", "index.htm"]
indexFolder: false # 当访问静态文件目录时,是否展示目录下的文件列表。默认关闭,那么请求将返回403
serverRoot: "resource/public" # 静态文件服务的目录根路径,配置时自动开启静态文件服务。默认关闭
searchPaths: ["/resource/public"] # 提供静态文件服务时额外的文件搜索路径,当根路径找不到时则按照顺序在搜索目录查找。默认关闭
fileServerEnabled: true
initLoadMemoryDB: false # 是否初始化内存数据库,默认关闭
# 文件上传配置
maxHeaderBytes: "20KB"
clientMaxBodySize: "200MB"
readTimeout: "20m"
writeTimeout: "20m"
# 日志配置
logger:
path: "resource/log/server" # 日志文件路径。默认为空,表示关闭,仅输出到终端
file: "{Y-m-d-H}.log" # 日志文件格式。默认为"{Y-m-d}.log"
prefix: "" # 日志内容输出前缀。默认为空
level: "dev" # 日志输出级别
timeFormat: "2006-01-02T15:04:05" # 自定义日志输出的时间格式,使用Golang标准的时间格式配置
ctxKeys: [] # 自定义Context上下文变量名称,自动打印Context的变量到日志中。默认为空
header: true # 是否打印日志的头信息。默认true
stdout: true # 日志是否同时输出到终端。默认true
rotateSize: 0 # 按照日志文件大小对文件进行滚动切分。默认为0,表示关闭滚动切分特性
rotateExpire: 0 # 按照日志文件时间间隔对文件滚动切分。默认为0,表示关闭滚动切分特性
rotateBackupLimit: 0 # 按照切分的文件数量清理切分文件,当滚动切分特性开启时有效。默认为0,表示不备份,切分则删除
rotateBackupExpire: 0 # 按照切分的文件有效期清理切分文件,当滚动切分特性开启时有效。默认为0,表示不备份,切分则删除
rotateBackupCompress: 0 # 滚动切分文件的压缩比(0-9)。默认为0,表示不压缩
rotateCheckInterval: "1h" # 滚动切分的时间检测间隔,一般不需要设置。默认为1小时
stdoutColorDisabled: false # 关闭终端的颜色打印。默认开启
writerColorEnable: false # 日志文件是否带上颜色。默认false,表示不带颜色
# JWT配置
jwt:
signingKey: "${JWT_SIGNING_KEY}"
expiresTime: 7d
bufferTime: 1d
issuer: iotlcm # 发行人
# 验证码配置
captcha:
keyLong: 6
imgWidth: 240
imgHeight: 80
openCaptcha: 0
openCaptchaTimeout: 3600
# 注册验证码配置。短信服务接口见 F:\Work\数据\test\文档\lcm\sms.md
register:
sms:
url: "http://192.0.2.29:11190/api/v1/sms/send"
method: "POST"
headers: {}
bodyTemplate: '{"config":{"serviceType":"1","regionId":"cn-hangzhou","accessKeyId":"","accessKeySecret":"","signName":"","templateId":""},"params":{"phoneNumber":"{contact}","msgContent":"{\"code\":\"{code}\"}"}}'
successStatus: 200
database:
logger:
path: "resource/log/server/sql"
level: "all"
stdout: true
default: # 分组名称,可自定义,默认为default
link: "mysql:${DB_USER}:${DB_PASSWORD}@tcp(${DB_HOST}:3306)/db_iotlcm?charset=utf8mb4&parseTime=True&loc=Asia%2FShanghai"
debug: true #开启调试模式
charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。
dryRun: false #ORM空跑(只读不写)
maxIdle: 30 #连接池最大闲置的连接数
maxOpen: 100 #连接池最大打开的连接数
maxLifetime: 120 #(单位秒)连接对象可重复使用的时间长度
memorydb:
# link: "sqlite::@file(jieiotmem.db)?journal_mode=WAL"
link: "sqlite::@file(:memory:)"
# link: ""
debug: true
maxIdle: 1
maxOpen: 1
maxLifetime: 30
# 缓存配置
cache:
adapter: "redis" # 缓存适配器,支持:file|redis
fileDir: "resource/cache" # 缓存文件目录
# Redis 配置示例
redis:
# 单实例配置
default:
mode: "single" #redis模式,支持:single|cluster|sentinel
sentinelMasterName: "iotlcm-master" #哨兵模式主节点名称
address: 192.0.2.29:6379
db: 0
pass: "${REDIS_PASSWORD}"
minIdle: 5 #最小空闲连接数
maxIdle: 30 #允许闲置的最大连接数
maxActive: 5000 #最大活跃连接数
idleTimeout: "60s" #连接最大空闲时间,使用时间字符串例如30s/2m/2d
ClientName: "SystemCache"
rabbitmq:
enabled: true
# 示例:amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/
# dsn: "amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/"
dsn: "amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/"
workerBatchAsync:
enabled: true
queueName: "iotlcm.batch.execute"
failOnPublish: true
appBusinessAsync:
enabled: false
provider: "rabbitmq"
queueName: "iotlcm.app.business"
failOnPublish: false
payment:
balanceRecharge:
enabled: false
mock:
enabled: false
wechat:
enabled: true
envFile: ""
apiBase: "https://api.mch.weixin.qq.com"
mchId: "1723059989"
mchSerialNo: "32A3CB6381D743A4ADBF3885BB16882C6CE06D03"
apiV3Key: "ce9e5486d2979810f21d09f398d212e0"
privateKeyPath: "resource/certs/wechatpay_apiclient_key.pem"
notifyUrl: "https://app.iotlcm.example.com/api/v1/payment/wechat/notify"
notifyBaseUrl: "https://app.iotlcm.example.com"
refundNotifyUrl: "https://app.iotlcm.example.com/api/v1/payment/wechat/refund-notify"
timeoutMinutes: 5 #待支付时间(分钟)
platformPublicKeyId: "PUB_KEY_ID_0117230599892026052200111565002404"
platformPublicKeyPath: "resource/certs/wechatpay_platform_public_key.pem"
h5:
enabled: true
appId: "wx9e26905702c1a372"
appName: "物联网卡管理平台"
appUrl: "https://app.iotlcm.example.com"
payerClientIp: ""
mini:
enabled: true
appId: "wx9e26905702c1a372"
appSecret: "3ee708d13993282fed770ea1cab95d90"
appCardRecognition:
enabled: true
provider: "openai-compatible"
baseUrl: "https://xueyangai.com/v1"
endpoint: ""
model: "qwen3.7-flash"
apiKey: "sk-nAhIIyqOn7JvQp1ti8o24GcBLgWqBUFKBaDTwAmFYZm0Hycy"
timeout: "25s"
maxImageBytes: 8388608
maxTokens: 256
rateLimit:
enabled: true
count: 20
period: "1m"
appWarning:
wechatSubscribeTemplateId: "DMDP2PKktdtG1ES_3Ic1JcR0LGELQmWE6LunYyerHCY"
tsdb:
database: "TdEngine" #可选择 TdEngine、Influxdb
tdengine:
# type: "taosRestful" #http连接方式,端口是6041
# dsn: "root:taosdata@http(127.0.0.1:6041)/"
type: "taosWS" #websocket连接方式,端口是6041
# dsn: "root:taosdata@ws(127.0.0.1:6041)/"
dsn: "root:sdyz2026__@ws(192.0.2.29:6041)/"
dbName: "iotlcm"
maxOpenConns: 100
maxIdleConns: 10
# 路由配置
router:
# 不需要验证登录的路由地址
exceptLogin:
- /api/v1/system/auth/login
- /api/v1/system/auth/refresh
- /api/v1/system/captcha
- /api/v1/system/auth/getTenantList
- /api/v1/auth/captcha
- /api/v1/auth/side-captcha
- /api/v1/auth/check-side-captcha
- /api/v1/auth/sms
- /api/v1/auth/register
- /api/v1/auth/login
- /api/v1/auth/wechat-login
- /api/v1/auth/wechat-bind-phone
- /api/v1/auth/forgot-password
- /api/v1/card/public-query
- /api/v1/card/recognize
- /api/v1/card/public-package-detail
- /api/v1/diagnosis/info
- /api/v1/diagnosis/flow
- /api/v1/open/diagnosis/info
- /api/v1/open/diagnosis/flow
- /api/v1/payment/wechat/notify
- /api/v1/payment/wechat/refund-notify
- /openapi/v3/query/token
# 生成代码
xgen:
allowedIPs: [ "127.0.0.1", "*" ] # 白名单,*代表所有,只有允许的IP后台才能使用生成代码功能
selectDbs: [ "default" ] # 可选生成表的数据库配置名称,支持多库
disableTables: [ ] # 禁用的表,禁用以后将不会在选择表中看到
delimiters: [ "@{", "}" ] # 模板引擎变量分隔符号
# 生成应用模型,所有生成模板允许自定义,可以参考default模板进行改造
application:
# CRUD和关系树列表模板
crud:
templates:
# 默认的主包模板
- group: "default" # 分组名称
isAddon: false # 是否为插件模板 false|true
masterPackage: "gen" # 主包名称,需和controllerPath、logicPath、inputPath保持关联
templatePath: "./resource/generate/default/curd" # 模板路径
apiPath: "./api/gen" # goApi生成路径
controllerPath: "./internal/controller/gen" # 控制器生成路径
logicPath: "./internal/logic/gen" # 主要业务生成路径
inputPath: "./internal/model/genin" # 表单过滤器生成路径
routerPath: "./internal/router/genrouter" # 生成路由表路径
sqlPath: "./manifest/generate" # 生成sql语句路径
webApiPath: "../vue/apps/web-antd/src/api/gen" # webApi生成路径
webViewsPath: "../vue/apps/web-antd/src/views/gen" # web页面生成路径
# 默认的插件包模板,{$name}会自动替换成实际的插件名称
- group: "addon" # 分组名称
isAddon: true # 是否为插件模板 false|true
masterPackage: "sys" # 主包名称,需和controllerPath、logicPath、inputPath保持关联
templatePath: "./resource/generate/default/curd" # 模板路径
apiPath: "./addons/{$name}/api/admin" # goApi生成路径
controllerPath: "./addons/{$name}/controller/admin/sys" # 控制器生成路径
logicPath: "./addons/{$name}/logic/sys" # 主要业务生成路径
inputPath: "./addons/{$name}/model/input/sysin" # 表单过滤器生成路径
routerPath: "./addons/{$name}/router/genrouter" # 生成路由表路径
sqlPath: "./storage/data/generate/addons" # 生成sql语句路径
webApiPath: "../web/src/api/addons/{$name}" # webApi生成路径
webViewsPath: "../web/src/views/addons/{$name}" # web页面生成路径
upstream:
provider: "onelink_mock"
default:
# ClientNameList: "iotlcmupstreamproxy-http-svc"
# clientName: "iotlcm.example.com:8510"
clientName: "http://iotlcm.example.com:8110"
timeout: 10s
onelinkMock:
enabled: false
baseUrl: "https://iotlcm.example.com/onelink-mock/v5"
appid: "100059999270000006"
password: "577d2b16546cbac103df9e0ce38393b5014152c8e4d76d5636ea5ccc51319033"
timeout: "10s"
tokenTTL: 3600
accounts:
- name: "默认测试应用"
appid: "100059999270000006"
password: "577d2b16546cbac103df9e0ce38393b5014152c8e4d76d5636ea5ccc51319033"
latestToken: ""
tokenExpireAt: ""
isDefault: true
+269
View File
@@ -0,0 +1,269 @@
# config_default.yaml 配置文件
# @Link https://github.com/xiujiecn/xiu-admin
# @Copyright Copyright (c) 2025 LiXiujie
# @Author Lxj <li@xiujie.cn>
# @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
# 系统配置
system:
name: "XiuAdmin"
version: "1.0"
description: "XiuAdmin Server"
gfmode: "dev"
upload:
local:
path: "resource/upload"
# 服务配置
server:
# 基本配置
address: ":8199"
# 接口文档
openapiPath: "/api.json" # OpenAPI接口文档地址
swaggerPath: "/swagger" # 内置SwaggerUI展示地址
# 静态服务配置
indexFiles: ["index.html","index.htm"] # 自动首页静态文件检索。默认为["index.html", "index.htm"]
indexFolder: false # 当访问静态文件目录时,是否展示目录下的文件列表。默认关闭,那么请求将返回403
serverRoot: "resource/public" # 静态文件服务的目录根路径,配置时自动开启静态文件服务。默认关闭
searchPaths: ["/resource/public"] # 提供静态文件服务时额外的文件搜索路径,当根路径找不到时则按照顺序在搜索目录查找。默认关闭
fileServerEnabled: true
# 文件上传配置
maxHeaderBytes: "20KB"
clientMaxBodySize: "200MB"
# 日志配置
logger:
path: "resource/log/server" # 日志文件路径。默认为空,表示关闭,仅输出到终端
file: "{Y-m-d-H}.log" # 日志文件格式。默认为"{Y-m-d}.log"
prefix: "" # 日志内容输出前缀。默认为空
level: "dev" # 日志输出级别
timeFormat: "2006-01-02T15:04:05" # 自定义日志输出的时间格式,使用Golang标准的时间格式配置
ctxKeys: [] # 自定义Context上下文变量名称,自动打印Context的变量到日志中。默认为空
header: true # 是否打印日志的头信息。默认true
stdout: true # 日志是否同时输出到终端。默认true
rotateSize: 0 # 按照日志文件大小对文件进行滚动切分。默认为0,表示关闭滚动切分特性
rotateExpire: 0 # 按照日志文件时间间隔对文件滚动切分。默认为0,表示关闭滚动切分特性
rotateBackupLimit: 0 # 按照切分的文件数量清理切分文件,当滚动切分特性开启时有效。默认为0,表示不备份,切分则删除
rotateBackupExpire: 0 # 按照切分的文件有效期清理切分文件,当滚动切分特性开启时有效。默认为0,表示不备份,切分则删除
rotateBackupCompress: 0 # 滚动切分文件的压缩比(0-9)。默认为0,表示不压缩
rotateCheckInterval: "1h" # 滚动切分的时间检测间隔,一般不需要设置。默认为1小时
stdoutColorDisabled: false # 关闭终端的颜色打印。默认开启
writerColorEnable: false # 日志文件是否带上颜色。默认false,表示不带颜色
# JWT配置
jwt:
signingKey: "${JWT_SIGNING_KEY}"
expiresTime: 7d
bufferTime: 1d
issuer: xiujie # 发行人
# 验证码配置
captcha:
keyLong: 6
imgWidth: 240
imgHeight: 80
openCaptcha: 0
openCaptchaTimeout: 3600
# 注册验证码配置。短信服务接口见 F:\Work\数据\test\文档\lcm\sms.md
register:
sms:
url: "http://127.0.0.1:11190/api/v1/sms/send"
method: "POST"
headers: {}
bodyTemplate: '{"config":{"serviceType":"1","regionId":"cn-hangzhou","accessKeyId":"","accessKeySecret":"","signName":"","templateId":""},"params":{"phoneNumber":"{contact}","msgContent":"{\"code\":\"{code}\"}"}}'
successStatus: 200
database:
logger:
path: "resource/log/server/sql"
level: "all"
stdout: true
default: # 分组名称,可自定义,默认为default
link: "mysql:${DB_USER}:${DB_PASSWORD}@tcp(${DB_HOST}:3306)/iotlcm?charset=utf8mb4&parseTime=True&loc=Asia%2FShanghai"
debug: true #开启调试模式
charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。
dryRun: false #ORM空跑(只读不写)
maxIdle: 30 #连接池最大闲置的连接数
maxOpen: 100 #连接池最大打开的连接数
maxLifetime: 120 #(单位秒)连接对象可重复使用的时间长度
# 缓存配置
cache:
adapter: "redis" # 缓存适配器,支持:file|redis
fileDir: "resource/cache" # 缓存文件目录
# Redis 配置示例
redis:
# 单实例配置
default:
mode: "single" #redis模式,支持:single|cluster|sentinel
sentinelMasterName: "${REDIS_SENTINEL_MASTER}" #哨兵模式主节点名称
address: 192.0.2.200:6379
db: 0
pass: "${REDIS_PASSWORD}"
minIdle: 5 #最小空闲连接数
maxIdle: 30 #允许闲置的最大连接数
maxActive: 5000 #最大活跃连接数
idleTimeout: "60s" #连接最大空闲时间,使用时间字符串例如30s/2m/2d
ClientName: "SystemCache"
rabbitmq:
enabled: false
# 示例:amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/
dsn: ""
workerBatchAsync:
enabled: false
queueName: "iotlcm.batch.execute"
failOnPublish: true
payment:
mock:
enabled: false
wechat:
enabled: false
envFile: ""
apiBase: "https://api.mch.weixin.qq.com"
mchId: ""
mchSerialNo: ""
apiV3Key: ""
privateKeyPath: "resource/certs/wechatpay_apiclient_key.pem"
notifyUrl: ""
notifyBaseUrl: ""
refundNotifyUrl: ""
timeoutMinutes: 5
platformPublicKeyId: ""
platformPublicKeyPath: "resource/certs/wechatpay_platform_public_key.pem"
h5:
enabled: false
appId: ""
appName: ""
appUrl: ""
payerClientIp: ""
mini:
enabled: false
appId: ""
appSecret: ""
appCardRecognition:
enabled: false
provider: "openai-compatible"
baseUrl: "https://xueyangai.com/v1"
endpoint: ""
model: "qwen3.7-flash"
apiKey: "sk-nAhIIyqOn7JvQp1ti8o24GcBLgWqBUFKBaDTwAmFYZm0Hycy"
timeout: "25s"
maxImageBytes: 8388608
maxTokens: 256
rateLimit:
enabled: true
count: 20
period: "1m"
appWarning:
wechatSubscribeTemplateId: "DMDP2PKktdtG1ES_3Ic1JcR0LGELQmWE6LunYyerHCY"
appBusinessAsync:
enabled: false
provider: "rabbitmq"
queueName: "iotlcm.app.business"
failOnPublish: false
upstream:
provider: "onelink_mock"
default:
# 正式环境建议配置为上游代理 HTTP 服务名,例如 iotlcmupstreamproxy-http-svc:8510
clientName: ""
timeout: 10s
onelinkMock:
enabled: false
baseUrl: "https://iotlcm.example.com/onelink-mock/v5"
appid: ""
password: ""
timeout: "10s"
tokenTTL: 3600
accounts:
- name: "默认测试应用"
appid: ""
password: ""
latestToken: ""
tokenExpireAt: ""
isDefault: true
# Queue配置
queue:
type: "asynq" # 队列类型
asynq:
redis:
address: 192.0.2.200:6379
db: 0
pass: "${REDIS_PASSWORD}"
user:
concurrency: 10 # 最大同时执行的任务数量
logLevel: 4 # 日志级别 DebugLevel 1, InfoLevel 2, WarnLevel 3, ErrorLevel 4, FatalLevel 5
# 路由配置
router:
# 不需要验证登录的路由地址
exceptLogin:
- /api/v1/system/auth/login
- /api/v1/system/auth/refresh
- /api/v1/system/captcha
- /api/v1/system/auth/getTenantList
- /api/v1/auth/captcha
- /api/v1/auth/side-captcha
- /api/v1/auth/check-side-captcha
- /api/v1/auth/sms
- /api/v1/auth/register
- /api/v1/auth/login
- /api/v1/auth/wechat-login
- /api/v1/auth/wechat-bind-phone
- /api/v1/auth/forgot-password
- /api/v1/card/public-query
- /api/v1/card/recognize
- /api/v1/card/public-package-detail
- /api/v1/diagnosis/info
- /api/v1/diagnosis/flow
- /api/v1/open/diagnosis/info
- /api/v1/open/diagnosis/flow
- /api/v1/payment/wechat/notify
- /api/v1/payment/wechat/refund-notify
# 生成代码
xgen:
allowedIPs: [ "127.0.0.1", "*" ] # 白名单,*代表所有,只有允许的IP后台才能使用生成代码功能
selectDbs: [ "default" ] # 可选生成表的数据库配置名称,支持多库
disableTables: [ ] # 禁用的表,禁用以后将不会在选择表中看到
delimiters: [ "@{", "}" ] # 模板引擎变量分隔符号
# 生成应用模型,所有生成模板允许自定义,可以参考default模板进行改造
application:
# CRUD和关系树列表模板
crud:
templates:
# 默认的主包模板
- group: "default" # 分组名称
isAddon: false # 是否为插件模板 false|true
masterPackage: "gen" # 主包名称,需和controllerPath、logicPath、inputPath保持关联
templatePath: "./resource/generate/default/curd" # 模板路径
apiPath: "./api/gen/v1/" # goApi生成路径
controllerPath: "./internal/controller/gen" # 控制器生成路径
logicPath: "./internal/logic/gen" # 主要业务生成路径
inputPath: "./internal/model/genin" # 表单过滤器生成路径
routerPath: "./internal/router/genrouter" # 生成路由表路径
sqlPath: "./manifest/generate" # 生成sql语句路径
webApiPath: "./web/generate/api" # webApi生成路径
webViewsPath: "./web/generate/views" # web页面生成路径
# 默认的插件包模板,{$name}会自动替换成实际的插件名称
- group: "addon" # 分组名称
isAddon: true # 是否为插件模板 false|true
masterPackage: "sys" # 主包名称,需和controllerPath、logicPath、inputPath保持关联
templatePath: "./resource/generate/default/curd" # 模板路径
apiPath: "./addons/{$name}/api/admin" # goApi生成路径
controllerPath: "./addons/{$name}/controller/admin/sys" # 控制器生成路径
logicPath: "./addons/{$name}/logic/sys" # 主要业务生成路径
inputPath: "./addons/{$name}/model/input/sysin" # 表单过滤器生成路径
routerPath: "./addons/{$name}/router/genrouter" # 生成路由表路径
sqlPath: "./storage/data/generate/addons" # 生成sql语句路径
webApiPath: "../web/src/api/addons/{$name}" # webApi生成路径
webViewsPath: "../web/src/views/addons/{$name}" # web页面生成路径
+118
View File
@@ -0,0 +1,118 @@
module git.5iot.com/iotlcm-public/iotlcm-app
go 1.23.0
toolchain go1.23.5
require (
github.com/cloudwego/eino v0.9.19
github.com/cloudwego/eino-ext/components/model/openai v0.1.13
github.com/dromara/carbon/v2 v2.6.0
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.0
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.6
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.0
github.com/gogf/gf/v2 v2.9.6
github.com/golang-jwt/jwt/v4 v4.5.2
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.3
github.com/mileusna/useragent v1.3.5
github.com/mojocn/base64Captcha v1.3.8
github.com/olekukonko/tablewriter v1.1.0
github.com/pkg/errors v0.9.1
github.com/rabbitmq/amqp091-go v1.10.0
github.com/redis/go-redis/v9 v9.7.0
github.com/robfig/cron/v3 v3.0.1
github.com/shirou/gopsutil/v3 v3.24.5
github.com/taosdata/driver-go/v3 v3.8.0
github.com/wechatpay-apiv3/wechatpay-go v0.2.21
github.com/wenlng/go-captcha-assets v1.0.7
github.com/wenlng/go-captcha/v2 v2.0.5
github.com/xiujiecn/asynq v0.25.10
github.com/xuri/excelize/v2 v2.9.0
go.opentelemetry.io/otel v1.38.0
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
golang.org/x/net v0.40.0
golang.org/x/tools v0.31.0
gorm.io/gorm v1.25.12
)
require (
github.com/BurntSushi/toml v1.5.0 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/bytedance/gopkg v0.1.3 // indirect
github.com/bytedance/sonic v1.15.0 // indirect
github.com/bytedance/sonic/loader v0.5.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/clbanning/mxj/v2 v2.7.0 // indirect
github.com/cloudwego/base64x v0.1.6 // indirect
github.com/cloudwego/eino-ext/libs/acl/openai v0.1.17 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/eino-contrib/jsonschema v1.0.3 // indirect
github.com/emirpasic/gods/v2 v2.0.0-alpha // indirect
github.com/evanphx/json-patch v0.5.2 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/glebarez/go-sqlite v1.21.2 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/goph/emperror v0.17.2 // indirect
github.com/grokify/html-strip-tags-go v0.1.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.10 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/meguminnnnnnnnn/go-openai v0.1.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/nikolalohinski/gonja v1.5.3 // indirect
github.com/olekukonko/errors v1.1.0 // indirect
github.com/olekukonko/ll v0.0.9 // indirect
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.4 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 // indirect
github.com/yargevad/filepathx v1.0.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
golang.org/x/arch v0.11.0 // indirect
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/image v0.23.0 // indirect
golang.org/x/mod v0.24.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/text v0.25.0 // indirect
golang.org/x/time v0.8.0 // indirect
google.golang.org/protobuf v1.35.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/libc v1.22.5 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.5.0 // indirect
modernc.org/sqlite v1.23.1 // indirect
)
+394
View File
@@ -0,0 +1,394 @@
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/agiledragon/gomonkey v2.0.2+incompatible h1:eXKi9/piiC3cjJD1658mEE2o3NjkJ5vDLgYjCQu0Xlw=
github.com/agiledragon/gomonkey v2.0.2+incompatible/go.mod h1:2NGfXu1a80LLr2cmWXGBDaHEjb1idR6+FVlX5T3D9hw=
github.com/airbrake/gobrake v3.6.1+incompatible/go.mod h1:wM4gu3Cn0W0K7GUuVWnlXZU11AGBXMILnrdOU8Kn00o=
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
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/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/bugsnag/bugsnag-go v1.4.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M=
github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM=
github.com/bytedance/mockey v1.3.0 h1:ONLRdvhqmCfr9rTasUB8ZKCfvbdD2tohOg4u+4Q/ed0=
github.com/bytedance/mockey v1.3.0/go.mod h1:1BPHF9sol5R1ud/+0VEHGQq/+i2lN+GTsr3O2Q9IENY=
github.com/bytedance/sonic v1.15.0 h1:/PXeWFaR5ElNcVE84U0dOHjiMHQOwNIx3K4ymzh/uSE=
github.com/bytedance/sonic v1.15.0/go.mod h1:tFkWrPz0/CUCLEF4ri4UkHekCIcdnkqXw9VduqpJh0k=
github.com/bytedance/sonic/loader v0.5.0 h1:gXH3KVnatgY7loH5/TkeVyXPfESoqSBSBEiDd5VjlgE=
github.com/bytedance/sonic/loader v0.5.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo=
github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4=
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/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyME=
github.com/clbanning/mxj/v2 v2.7.0/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M=
github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU=
github.com/cloudwego/eino v0.9.19 h1:i71YUBK3nwY4L53dkzRgZpAcPSZ4v4eRponN7W9sDtk=
github.com/cloudwego/eino v0.9.19/go.mod h1:OBD1mrkfkt/pJa4rkg1P0VnaMeOVl7l8IAdEqY//3IQ=
github.com/cloudwego/eino-ext/components/model/openai v0.1.13 h1:5XHRTiTD5bt9KQrMHcfvuWNklEC3tpm3XHejdozt9vM=
github.com/cloudwego/eino-ext/components/model/openai v0.1.13/go.mod h1:mgIoqYYOc0eECCqvLbEYpOJrQNTNxkwXzSJzFU+v5sQ=
github.com/cloudwego/eino-ext/libs/acl/openai v0.1.17 h1:EeVcR1TslRA2IdNW1h/2LaGbPlffwGhQm99jM3zWZiI=
github.com/cloudwego/eino-ext/libs/acl/openai v0.1.17/go.mod h1:Zkcx6DPTR2NfWmtSXbhItswGw6hqUezNPhNcke0pOG8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/dromara/carbon/v2 v2.6.0 h1:LyRL5QHK6q37wjHjbBkuTGHXbdQKuYy3Isu0RhsxVWo=
github.com/dromara/carbon/v2 v2.6.0/go.mod h1:Baj3A1uBBctJmpZWJd6/+WWnmIuY2pobR6IOpB6xigc=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/eino-contrib/jsonschema v1.0.3 h1:2Kfsm1xlMV0ssY2nuxshS4AwbLFuqmPmzIjLVJ1Fsp0=
github.com/eino-contrib/jsonschema v1.0.3/go.mod h1:cpnX4SyKjWjGC7iN2EbhxaTdLqGjCi0e9DxpLYxddD4=
github.com/emirpasic/gods/v2 v2.0.0-alpha h1:dwFlh8pBg1VMOXWGipNMRt8v96dKAIvBehtCt6OtunU=
github.com/emirpasic/gods/v2 v2.0.0-alpha/go.mod h1:W0y4M2dtBB9U5z3YlghmpuUhiaZT2h6yoeE+C1sCp6A=
github.com/evanphx/json-patch v0.5.2 h1:xVCHIVMUu1wtM/VkR9jVZ45N3FhZfYMMYGorLCR8P3k=
github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9gAXWo=
github.com/glebarez/go-sqlite v1.21.2/go.mod h1:sfxdZyhQjTM2Wry3gVYWaW072Ri1WMdWJi0k6+3382k=
github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI=
github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.0 h1:1f7EeD0lfPHoXfaJDSL7cxRcSRelbsAKgF3MGXY+Uyo=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.0/go.mod h1:tToO1PjGkLIR+9DbJ0wrKicYma0H/EUHXOpwel6Dw+0=
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.6 h1:3QZvWIlz3dLjNELQU+5ZZZWuzEx9gsRFLU+qIKVUG6M=
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.6/go.mod h1:7EEAe8UYI5dLeuwCWN3HgC62OhjIYbkynaoavw1U/k4=
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.0 h1:EEZqu1PNRSmm+7Cqm9A/8+ObgfbMzhE1ps9Z3LD7HgM=
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.0/go.mod h1:LHrxY+2IzNTHVTPG/s5yaz1VmXbj+CQ7Hr5SeVkHiTw=
github.com/gogf/gf/v2 v2.9.6 h1:fQ6uPtS1Ra8qY+OuzPPZTlgksJ4eOXmTZ1/a2l3Idog=
github.com/gogf/gf/v2 v2.9.6/go.mod h1:Svl1N+E8G/QshU2DUbh/3J/AJauqCgUnxHurXWR4Qx0=
github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
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/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/goph/emperror v0.17.2 h1:yLapQcmEsO0ipe9p5TaN22djm3OFV/TfM/fcYP0/J18=
github.com/goph/emperror v0.17.2/go.mod h1:+ZbQ+fUNO/6FNiUo0ujtMjhgad9Xa6fQL9KhH4LNHic=
github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=
github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grokify/html-strip-tags-go v0.1.0 h1:03UrQLjAny8xci+R+qjCce/MYnpNXCtgzltlQbOBae4=
github.com/grokify/html-strip-tags-go v0.1.0/go.mod h1:ZdzgfHEzAfz9X6Xe5eBLVblWIxXfYSQ40S/VKrAOGpc=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY=
github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/meguminnnnnnnnn/go-openai v0.1.2 h1:iXombGGjqjBrmE9WaSidUhhi3YQhf42QTHvHLMkgvCA=
github.com/meguminnnnnnnnn/go-openai v0.1.2/go.mod h1:qs96ysDmxhE4BZoU45I43zcyfnaYxU3X+aRzLko/htY=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mileusna/useragent v1.3.5 h1:SJM5NzBmh/hO+4LGeATKpaEX9+b4vcGg2qXGLiNGDws=
github.com/mileusna/useragent v1.3.5/go.mod h1:3d8TOmwL/5I8pJjyVDteHtgDGcefrFUX4ccGOMKNYYc=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/mojocn/base64Captcha v1.3.8 h1:rrN9BhCwXKS8ht1e21kvR3iTaMgf4qPC9sRoV52bqEg=
github.com/mojocn/base64Captcha v1.3.8/go.mod h1:QFZy927L8HVP3+VV5z2b1EAEiv1KxVJKZbAucVgLUy4=
github.com/nikolalohinski/gonja v1.5.3 h1:GsA+EEaZDZPGJ8JtpeGN78jidhOlxeJROpqMT9fTj9c=
github.com/nikolalohinski/gonja v1.5.3/go.mod h1:RmjwxNiXAEqcq1HeK5SSMmqFJvKOfTfXhkJv6YBtPa4=
github.com/olekukonko/errors v1.1.0 h1:RNuGIh15QdDenh+hNvKrJkmxxjV4hcS50Db478Ou5sM=
github.com/olekukonko/errors v1.1.0/go.mod h1:ppzxA5jBKcO1vIpCXQ9ZqgDh8iwODz6OXIGKU8r5m4Y=
github.com/olekukonko/ll v0.0.9 h1:Y+1YqDfVkqMWuEQMclsF9HUR5+a82+dxJuL1HHSRpxI=
github.com/olekukonko/ll v0.0.9/go.mod h1:En+sEW0JNETl26+K8eZ6/W4UQ7CYSrrgg/EdIYT2H8g=
github.com/olekukonko/tablewriter v1.1.0 h1:N0LHrshF4T39KvI96fn6GT8HEjXRXYNDrDjKFDB7RIY=
github.com/olekukonko/tablewriter v1.1.0/go.mod h1:5c+EBPeSqvXnLLgkm9isDdzR3wjfBkHR9Nhfp3NWrzo=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0=
github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E=
github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/richardlehane/msoleps v1.0.4 h1:WuESlvhX3gH2IHcd8UqyCuFY5yiq/GR/yqaSM/9/g00=
github.com/richardlehane/msoleps v1.0.4/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/rollbar/rollbar-go v1.0.2/go.mod h1:AcFs5f0I+c71bpHlXNNDbOWJiKwjFDtISeXco0L5PKQ=
github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI=
github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk=
github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=
github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f h1:Z2cODYsUxQPofhpYRMQVwWz4yUVpHF+vPi+eUdruUYI=
github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f/go.mod h1:JqzWyvTuI2X4+9wOHmKSQCYxybB/8j6Ko43qVmXDuZg=
github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY=
github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec=
github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY=
github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60=
github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w=
github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/taosdata/driver-go/v3 v3.8.0 h1:qY1xFidspISuuZc0TAbeJWMtAdKJOSYQOXfepkUK6fI=
github.com/taosdata/driver-go/v3 v3.8.0/go.mod h1:S6OGOinfR0xxxaMGsvBi9cLkYxEIW1p6qqr8QJATTlg=
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/wechatpay-apiv3/wechatpay-go v0.2.21 h1:uIyMpzvcaHA33W/QPtHstccw+X52HO1gFdvVL9O6Lfs=
github.com/wechatpay-apiv3/wechatpay-go v0.2.21/go.mod h1:A254AUBVB6R+EqQFo3yTgeh7HtyqRRtN2w9hQSOrd4Q=
github.com/wenlng/go-captcha-assets v1.0.7 h1:tfF84A4un/i4p+TbRVHDqDPeQeatvddOfB2xbKvLVq8=
github.com/wenlng/go-captcha-assets v1.0.7/go.mod h1:zinRACsdYcL/S6pHgI9Iv7FKTU41d00+43pNX+b9+MM=
github.com/wenlng/go-captcha/v2 v2.0.5 h1:+1FpVwJZmLCqEHxOt+HvpUArFGo107nRxOeRVHkZhTc=
github.com/wenlng/go-captcha/v2 v2.0.5/go.mod h1:5hac1em3uXoyC5ipZ0xFv9umNM/waQvYAQdr0cx/h34=
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=
github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg=
github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=
github.com/xiujiecn/asynq v0.25.10 h1:TWy8i127GOZjXh3yTKGhjNfeThGP5O61RG92haPXX1o=
github.com/xiujiecn/asynq v0.25.10/go.mod h1:Nxtqdx+iW8gKpJHpxyNevTEq1E4eD2gQgcBISajdJQk=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d h1:llb0neMWDQe87IzJLS4Ci7psK/lVsjIS2otl+1WyRyY=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.9.0 h1:1tgOaEq92IOEumR1/JfYS/eR0KHOCsRv/rYXXh6YJQE=
github.com/xuri/excelize/v2 v2.9.0/go.mod h1:uqey4QBZ9gdMeWApPLdhm9x+9o2lq4iVmjiLfBS5hdE=
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 h1:hPVCafDV85blFTabnqKgNhDCkJX25eik94Si9cTER4A=
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
github.com/yargevad/filepathx v1.0.0 h1:SYcT+N3tYGi+NvazubCNlvgIPbzAk7i7y2dwg3I5FYc=
github.com/yargevad/filepathx v1.0.0/go.mod h1:BprfX/gpYNJHJfc35GjRRpVcwWXS89gGulUIU5tK3tA=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
golang.org/x/arch v0.11.0 h1:KXV8WWKCXm6tRpLirl2szsO5j/oOODwZf4hATmGVNs4=
golang.org/x/arch v0.11.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw=
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM=
golang.org/x/image v0.16.0/go.mod h1:ugSZItdV4nOxyqp56HmXwH0Ry0nBCpjnZdpDaIHdoPs=
golang.org/x/image v0.23.0 h1:HseQ7c2OpPKTPVzNjG5fwJsOTCiiwS4QdsYi5XU6H68=
golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY=
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/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
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-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg=
golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
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=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU=
golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io=
google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8=
gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=
modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE=
modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY=
modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ=
modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds=
modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU=
modernc.org/sqlite v1.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM=
modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk=
+18
View File
@@ -0,0 +1,18 @@
# CLI tool, only in development environment.
# https://goframe.org/docs/cli
gfcli:
gen:
dao:
- link: "mysql:${DB_USER}:${DB_PASSWORD}@tcp(${DB_HOST}:3306)/db_iotlcm?charset=utf8mb4&parseTime=True&loc=Asia%2FShanghai"
descriptionTag: true # 数据表字段注释
noModelComment: true
jsonCase: "CamelLower" # 生成json字段时,字段名使用驼峰命名
gJsonSupport: true
group: "default" # 分组,使用代码生成功能时必须填写
tablesEx: "sys_addons_install,_bak_*" # 排除系统扩展表和数据库备份表
docker:
build: "-a amd64 -s linux -p temp -ew"
tagPrefixes:
- my.image.pub/my-app
+15
View File
@@ -0,0 +1,15 @@
# Keep the CLI version aligned with github.com/gogf/gf/v2 in go.mod.
GF_CLI_VERSION ?= v2.9.6
GF_CMD ?= go run github.com/gogf/gf/cmd/gf/v2@$(GF_CLI_VERSION)
# Install the pinned CLI tool for developers who want a local executable.
.PHONY: cli
cli:
@go install github.com/gogf/gf/cmd/gf/v2@$(GF_CLI_VERSION)
# Validate the pinned CLI can run. Generation targets invoke GF_CMD directly,
# so a different gf executable earlier on PATH cannot silently take over.
.PHONY: cli.install
cli.install:
@$(GF_CMD) -v >/dev/null
+75
View File
@@ -0,0 +1,75 @@
.DEFAULT_GOAL := build
# Keep the GoFrame framework and CLI versions managed explicitly.
.PHONY: up
up: cli.install
@echo "GoFrame CLI is pinned by hack/hack-cli.mk; run 'go get github.com/gogf/gf/v2@<version>' explicitly when upgrading the framework."
# Build binary using configuration from hack/config.yaml.
.PHONY: build
build: cli.install
@$(GF_CMD) build -ew
# Parse api and generate controller/sdk.
.PHONY: ctrl
ctrl: cli.install
@$(GF_CMD) gen ctrl -m
# Generate Go files for DAO/DO/Entity.
.PHONY: dao
dao: cli.install
@$(GF_CMD) gen dao
# Parse current project go files and generate enums go file.
.PHONY: enums
enums: cli.install
@$(GF_CMD) gen enums
# Generate Go files for Service.
.PHONY: service
service: cli.install
@$(GF_CMD) gen service
# Build docker image.
.PHONY: image
image: cli.install
$(eval _TAG = $(shell git rev-parse --short HEAD))
ifneq (, $(shell git status --porcelain 2>/dev/null))
$(eval _TAG = $(_TAG).dirty)
endif
$(eval _TAG = $(if ${TAG}, ${TAG}, $(_TAG)))
$(eval _PUSH = $(if ${PUSH}, ${PUSH}, ))
@$(GF_CMD) docker ${_PUSH} -tn $(DOCKER_NAME):${_TAG};
# Build docker image and automatically push to docker repo.
.PHONY: image.push
image.push: cli.install
@make image PUSH=-p;
# Deploy image and yaml to current kubectl environment.
.PHONY: deploy
deploy: cli.install
$(eval _TAG = $(if ${TAG}, ${TAG}, develop))
@set -e; \
mkdir -p $(ROOT_DIR)/temp/kustomize;\
cd $(ROOT_DIR)/manifest/deploy/kustomize/overlays/${_ENV};\
kustomize build > $(ROOT_DIR)/temp/kustomize.yaml;\
kubectl apply -f $(ROOT_DIR)/temp/kustomize.yaml; \
if [ $(DEPLOY_NAME) != "" ]; then \
kubectl patch -n $(NAMESPACE) deployment/$(DEPLOY_NAME) -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(shell date +%s)\"}}}}}"; \
fi;
# Parsing protobuf files and generating go files.
.PHONY: pb
pb: cli.install
@$(GF_CMD) gen pb
# Generate protobuf files for database tables.
.PHONY: pbentity
pbentity: cli.install
@$(GF_CMD) gen pbentity
+112
View File
@@ -0,0 +1,112 @@
package ai
import (
"context"
"net/url"
"strings"
"time"
openaiModel "github.com/cloudwego/eino-ext/components/model/openai"
"github.com/cloudwego/eino/components/model"
"github.com/gogf/gf/v2/errors/gerror"
)
type OpenAICompatibleConfig struct {
APIKey string
BaseURL string
Endpoint string
Model string
Timeout time.Duration
MaxTokens int
JSONOutput bool
}
const ProviderOpenAICompatible = "openai-compatible"
type ChatModelConfig struct {
Provider string
APIKey string
BaseURL string
Endpoint string
Model string
Timeout time.Duration
MaxTokens int
JSONOutput bool
}
func NewChatModel(ctx context.Context, config ChatModelConfig) (model.BaseChatModel, error) {
provider := strings.ToLower(strings.TrimSpace(config.Provider))
if provider == "" {
provider = ProviderOpenAICompatible
}
switch provider {
case ProviderOpenAICompatible, "openai":
return NewOpenAICompatibleChatModel(ctx, OpenAICompatibleConfig{
APIKey: config.APIKey,
BaseURL: config.BaseURL,
Endpoint: config.Endpoint,
Model: config.Model,
Timeout: config.Timeout,
MaxTokens: config.MaxTokens,
JSONOutput: config.JSONOutput,
})
default:
return nil, gerror.Newf("暂不支持AI模型提供方:%s", provider)
}
}
func NewOpenAICompatibleChatModel(ctx context.Context, config OpenAICompatibleConfig) (model.BaseChatModel, error) {
apiKey := strings.TrimSpace(config.APIKey)
if apiKey == "" {
return nil, gerror.New("AI模型API Key不能为空")
}
modelName := strings.TrimSpace(config.Model)
if modelName == "" {
return nil, gerror.New("AI模型名称不能为空")
}
baseURL, err := ResolveOpenAIBaseURL(config.BaseURL, config.Endpoint)
if err != nil {
return nil, err
}
modelConfig := &openaiModel.ChatModelConfig{
APIKey: apiKey,
BaseURL: baseURL,
Model: modelName,
Timeout: config.Timeout,
}
if config.MaxTokens > 0 {
modelConfig.MaxTokens = &config.MaxTokens
}
if config.JSONOutput {
modelConfig.ResponseFormat = &openaiModel.ChatCompletionResponseFormat{
Type: openaiModel.ChatCompletionResponseFormatTypeJSONObject,
}
}
chatModel, err := openaiModel.NewChatModel(ctx, modelConfig)
if err != nil {
return nil, gerror.Wrap(err, "初始化Eino AI模型失败")
}
return chatModel, nil
}
func ResolveOpenAIBaseURL(baseURL string, endpoint string) (string, error) {
value := strings.TrimSpace(baseURL)
if value == "" {
value = strings.TrimSpace(endpoint)
}
if value == "" {
return "", gerror.New("AI模型BaseURL不能为空")
}
parsed, err := url.Parse(value)
if err != nil || parsed.Scheme == "" || parsed.Host == "" {
return "", gerror.New("AI模型BaseURL格式不正确")
}
parsed.Path = strings.TrimSuffix(strings.TrimRight(parsed.Path, "/"), "/chat/completions")
parsed.RawPath = ""
parsed.RawQuery = ""
parsed.Fragment = ""
return strings.TrimRight(parsed.String(), "/"), nil
}
+92
View File
@@ -0,0 +1,92 @@
package ai
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"time"
"github.com/cloudwego/eino/schema"
)
func TestResolveOpenAIBaseURL(t *testing.T) {
tests := []struct {
name string
baseURL string
endpoint string
want string
wantErr bool
}{
{name: "base url", baseURL: "https://xueyangai.com/v1/", want: "https://xueyangai.com/v1"},
{name: "legacy endpoint", endpoint: "https://xueyangai.com/v1/chat/completions", want: "https://xueyangai.com/v1"},
{name: "base url preferred", baseURL: "https://example.com/v1", endpoint: "https://legacy.example.com/v1/chat/completions", want: "https://example.com/v1"},
{name: "invalid", baseURL: "xueyangai.com/v1", wantErr: true},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got, err := ResolveOpenAIBaseURL(test.baseURL, test.endpoint)
if test.wantErr {
if err == nil {
t.Fatal("expected error")
}
return
}
if err != nil {
t.Fatalf("ResolveOpenAIBaseURL() error = %v", err)
}
if got != test.want {
t.Fatalf("ResolveOpenAIBaseURL() = %s, want %s", got, test.want)
}
})
}
}
func TestOpenAICompatibleChatModel(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
if request.URL.Path != "/v1/chat/completions" {
t.Errorf("path = %s, want /v1/chat/completions", request.URL.Path)
}
if request.Header.Get("Authorization") != "Bearer test-key" {
t.Errorf("authorization = %s", request.Header.Get("Authorization"))
}
var body map[string]any
if err := json.NewDecoder(request.Body).Decode(&body); err != nil {
t.Errorf("decode request: %v", err)
}
if body["model"] != "test-model" {
t.Errorf("model = %v, want test-model", body["model"])
}
writer.Header().Set("Content-Type", "application/json")
_, _ = writer.Write([]byte(`{"id":"chatcmpl-test","object":"chat.completion","created":1,"model":"test-model","choices":[{"index":0,"message":{"role":"assistant","content":"{\"ok\":true}"},"finish_reason":"stop"}],"usage":{"prompt_tokens":1,"completion_tokens":1,"total_tokens":2}}`))
}))
defer server.Close()
chatModel, err := NewOpenAICompatibleChatModel(context.Background(), OpenAICompatibleConfig{
APIKey: "test-key",
BaseURL: server.URL + "/v1",
Model: "test-model",
Timeout: 3 * time.Second,
MaxTokens: 64,
JSONOutput: true,
})
if err != nil {
t.Fatalf("NewOpenAICompatibleChatModel() error = %v", err)
}
response, err := chatModel.Generate(context.Background(), []*schema.Message{schema.UserMessage("hello")})
if err != nil {
t.Fatalf("Generate() error = %v", err)
}
if response.Content != `{"ok":true}` {
t.Fatalf("response content = %s", response.Content)
}
}
func TestNewChatModelRejectsUnsupportedProvider(t *testing.T) {
_, err := NewChatModel(context.Background(), ChatModelConfig{Provider: "unsupported"})
if err == nil {
t.Fatal("expected unsupported provider error")
}
}
+10
View File
@@ -0,0 +1,10 @@
// Package cmd
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package cmd
var (
Main = Http
)
+61
View File
@@ -0,0 +1,61 @@
// Package cmd
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package cmd
import (
"context"
"errors"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/library/cache"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/gmode"
)
// 系统初始化
func SystemInit(ctx context.Context) {
// 检查数据库连接
if err := CheckConnDB(ctx); err != nil {
panic(err)
}
// 设置gf运行模式
SetGFMode(ctx)
// 默认上海时区
if err := gtime.SetTimeZone("Asia/Shanghai"); err != nil {
g.Log().Fatalf(ctx, "时区设置异常 err: %+v", err)
return
}
// 设置缓存适配器
cache.SetAdapter(ctx)
}
// CheckConnDB 检查数据库连接
func CheckConnDB(ctx context.Context) error {
err := g.DB().PingMaster()
if err != nil {
return errors.New("连接到数据库失败")
}
return nil
}
// 设置gf运行模式
func SetGFMode(ctx context.Context) {
gfmode := g.Cfg().MustGet(ctx, "system.gfmode").String()
if len(gfmode) == 0 {
gfmode = gmode.NOT_SET
}
var modes = []string{gmode.DEVELOP, gmode.TESTING, gmode.STAGING, gmode.PRODUCT}
for _, mode := range modes {
if mode == gfmode {
gmode.Set(mode)
break
}
}
}
func DBHandle(ctx context.Context) {
}
+54
View File
@@ -0,0 +1,54 @@
package cmd
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/cmd/inithttp"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/library/websocket"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/router"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/tasks"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gcmd"
_ "git.5iot.com/iotlcm-public/iotlcm-app/internal/queues/httpqueues"
)
func init() {
inithttp.RegisterHttpInitFunc("initJobTask", initJobTask)
}
var Http = &gcmd.Command{
Name: "http",
Usage: "http",
Brief: "HTTP控制台服务",
Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
g.Log().Infof(ctx, "Http init start")
serverWg.Add(1)
s := g.Server()
go func() {
waitServerClose(ctx)
websocket.StopWebSocket(ctx)
s.Shutdown()
serverWg.Done()
}()
err = inithttp.InitHttp(ctx)
if err != nil {
g.Log().Errorf(ctx, "http init error: %v", err)
return err
}
dumpRouterMap := g.Cfg().MustGet(ctx, "server.dumpRouterMap", false).Bool()
s.SetDumpRouterMap(dumpRouterMap)
router.InitRouter(ctx, s)
websocket.StartWebSocket(ctx)
s.Run()
inithttp.CleanupHttp(ctx)
return nil
},
}
func initJobTask(ctx context.Context) error {
tasks.TasksInstance(ctx)
service.SysJob().InitRegister()
return nil
}
+46
View File
@@ -0,0 +1,46 @@
// Package cmd
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package cmd
import (
"context"
"errors"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/library/xgen"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gmode"
)
var (
initFuncList map[string]func(ctx context.Context) error
)
func RegisterInitFunc(name string, fn func(ctx context.Context) error) {
if initFuncList == nil {
initFuncList = make(map[string]func(ctx context.Context) error)
}
initFuncList[name] = fn
}
func InitSystemDeferFunc(ctx context.Context) error {
for name, fn := range initFuncList {
if fn == nil {
g.Log().Errorf(ctx, "InitSystemDeferFunc %s fn is nil.", name)
return errors.New("func is nil")
}
err := fn(ctx)
if err != nil {
g.Log().Errorf(ctx, "InitSystemDeferFunc %s err: %v", name, err)
return err
}
g.Log().Infof(ctx, "InitSystemDeferFunc %s success.", name)
}
// 初始化生成代码配置
if !gmode.IsProduct() {
xgen.Init(ctx)
}
return nil
}
+59
View File
@@ -0,0 +1,59 @@
package inithttp
import (
"context"
"sync"
"github.com/gogf/gf/v2/frame/g"
)
var (
httpInitFunc map[string]func(ctx context.Context) error
httpCleanupFunc map[string]func(ctx context.Context) error
rwLock sync.RWMutex
)
func RegisterHttpInitFunc(name string, fn func(ctx context.Context) error) {
rwLock.Lock()
defer rwLock.Unlock()
if httpInitFunc == nil {
httpInitFunc = make(map[string]func(ctx context.Context) error)
}
httpInitFunc[name] = fn
}
func RegisterHttpCleanupFunc(name string, fn func(ctx context.Context) error) {
rwLock.Lock()
defer rwLock.Unlock()
if httpCleanupFunc == nil {
httpCleanupFunc = make(map[string]func(ctx context.Context) error)
}
httpCleanupFunc[name] = fn
}
func InitHttp(ctx context.Context) error {
rwLock.RLock()
defer rwLock.RUnlock()
for name, fn := range httpInitFunc {
if err := fn(ctx); err != nil {
g.Log().Errorf(ctx, "httpInitFunc %s error: %v", name, err)
return err
} else {
g.Log().Infof(ctx, "httpInitFunc %s success", name)
}
}
return nil
}
func CleanupHttp(ctx context.Context) error {
rwLock.RLock()
defer rwLock.RUnlock()
for name, fn := range httpCleanupFunc {
if err := fn(ctx); err != nil {
g.Log().Errorf(ctx, "httpCleanupFunc %s error: %v", name, err)
} else {
g.Log().Infof(ctx, "httpCleanupFunc %s success", name)
}
}
return nil
}
+74
View File
@@ -0,0 +1,74 @@
// Package cmd
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package cmd
import (
"context"
"fmt"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/cmd/inithttp"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/consts"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/library/websocket"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
"time"
)
func init() {
inithttp.RegisterHttpInitFunc("InitMonitor", func(ctx context.Context) error {
InitMonitor()
return nil
})
}
func InitMonitor() {
go func() {
for {
RunMonitor()
time.Sleep(time.Second * 5)
}
}()
websocket.RegisterTagCallback(consts.WSTagMonitorServer, func(client *websocket.Client, tag string) {
RunMonitor()
})
}
func RunMonitor() {
ctx := context.Background()
hostInfo := service.MonitorServer().GetHostInfo(ctx)
websocket.SendToTag(consts.WSTagMonitorServer, &websocket.WResponse{
Event: fmt.Sprintf(consts.WSEventMonitorServer, consts.MonitorServerHost),
Data: hostInfo,
})
sysLoad := service.MonitorServer().GetSysLoad(ctx)
websocket.SendToTag(consts.WSTagMonitorServer, &websocket.WResponse{
Event: fmt.Sprintf(consts.WSEventMonitorServer, consts.MonitorServerSysLoad),
Data: sysLoad,
})
cpuInfo := service.MonitorServer().GetCpuInfo(ctx)
websocket.SendToTag(consts.WSTagMonitorServer, &websocket.WResponse{
Event: fmt.Sprintf(consts.WSEventMonitorServer, consts.MonitorServerCpu),
Data: cpuInfo,
})
memInfo := service.MonitorServer().GetMemInfo(ctx)
websocket.SendToTag(consts.WSTagMonitorServer, &websocket.WResponse{
Event: fmt.Sprintf(consts.WSEventMonitorServer, consts.MonitorServerMem),
Data: memInfo,
})
diskInfo := service.MonitorServer().GetDiskInfo(ctx)
websocket.SendToTag(consts.WSTagMonitorServer, &websocket.WResponse{
Event: fmt.Sprintf(consts.WSEventMonitorServer, consts.MonitorServerDisk),
Data: diskInfo,
})
netInfo := service.MonitorServer().GetNetStatusInfo(ctx)
websocket.SendToTag(consts.WSTagMonitorServer, &websocket.WResponse{
Event: fmt.Sprintf(consts.WSEventMonitorServer, consts.MonitorServerNet),
Data: netInfo,
})
goInfo := service.MonitorServer().GetGoInfo(ctx)
websocket.SendToTag(consts.WSTagMonitorServer, &websocket.WResponse{
Event: fmt.Sprintf(consts.WSEventMonitorServer, consts.MonitorServerGo),
Data: goInfo,
})
}
+58
View File
@@ -0,0 +1,58 @@
package cmd
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/consts"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/library/event"
"os"
"sync"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gproc"
)
var (
serverCloseSignal = make(chan struct{}, 1)
serverWg = sync.WaitGroup{}
once sync.Once
)
// 等待接收服务关闭信号
func waitServerClose(ctx context.Context) {
signalListen(ctx, handleSignalClose)
<-serverCloseSignal
}
// 等待所有服务关闭
func waitAllServerClose(ctx context.Context) {
serverWg.Wait()
}
// 处理服务关闭信号
func handleSignalClose(sig os.Signal) {
serverCloseEvent(gctx.GetInitCtx())
serverCloseSignal <- struct{}{}
}
// 监听信号
func signalListen(ctx context.Context, handler ...gproc.SigHandler) {
g.Go(ctx, func(ctx context.Context) {
// syscall.SIGINT,
// syscall.SIGQUIT,
// syscall.SIGKILL,
// syscall.SIGTERM,
// syscall.SIGABRT.
gproc.AddSigHandlerShutdown(handler...)
gproc.Listen()
}, func(ctx context.Context, exception error) {
g.Log().Fatalf(ctx, "信号监听异常 err: %+v", exception)
})
}
// serverCloseEvent 关闭事件
func serverCloseEvent(ctx context.Context) {
once.Do(func() {
event.EventsInstance().Emit(ctx, consts.EventKeyServerClose, nil)
})
}
+6
View File
@@ -0,0 +1,6 @@
package consts
const (
ConfigKeyAppRegisterDeptId = "iot.register.app.dept"
ConfigKeyAppRegisterRoleId = "iot.register.app.role"
)
+151
View File
@@ -0,0 +1,151 @@
package consts
const (
// 批次异步状态 batch_status
BatchAsyncStatusCreated = 0
BatchAsyncStatusPending = 1
BatchAsyncStatusProcessing = 2
BatchAsyncStatusSuccess = 3
BatchAsyncStatusFailed = 4
BatchAsyncStatusPartialSuccess = 5
// 兼容旧业务命名。
BatchStatusNormal = BatchAsyncStatusCreated
BatchStatusSuccess = BatchAsyncStatusSuccess
// 批次运行结果 run_result
BatchRunResultPending = 0
BatchRunResultRunning = 1
BatchRunResultSuccess = 2
BatchRunResultFailed = 3
BatchRunResultPartialSuccess = 4
// 批次明细状态 detail_status
BatchDetailStatusPending = 0
BatchDetailStatusRunning = 1
BatchDetailStatusSuccess = 2
BatchDetailStatusFailed = 3
BatchSourceTypeBatchSelect = 0
BatchTypePrepare = 4
BatchTypeAllocate = 3
BatchTypeRenew = 101
BatchTypeChange = 102
BatchTypeStart = 103
BatchTypeStop = 104
BatchTypeRestart = 105
BatchTypeDataStart = 109
BatchTypeDataStop = 110
BatchNoPrefixAllocate = "ALC"
BatchNoPrefixRenew = "REN"
BatchNoPrefixChange = "CHG"
BatchNoPrefixStart = "STR"
BatchNoPrefixStop = "STP"
BatchNoPrefixRestart = "RST"
BatchNoPrefixDataStart = "DOP"
BatchNoPrefixDataStop = "DST"
BatchNoPrefixWarning = "SWC"
BlankOutStatusNo = 1
)
const (
DownloadStatusPending = 0
DownloadStatusGenerated = 1
DownloadStatusRunning = 2
DownloadStatusFailed = 3
)
const (
ResourceTypeExcel = 1
ResourceExportSceneAllocate = 3
ResourceExportSceneRenew = 101
)
const (
ResourceBatchDownloadTaskSimCardAllocate = "卡划拨结果"
ResourceBatchDownloadTaskSimCardRenew = "卡续费结果"
SimCardAllocateSubDirImportExcel = "sim-card-allocate/import"
SimCardAllocateSubDirResultExcel = "sim-card-allocate/result"
SimCardRenewSubDirImportExcel = "sim-card-renew/import"
SimCardRenewSubDirResultExcel = "sim-card-renew/result"
)
const (
CustomerTypeAgent = 1
CustomerTypeTerminal = 2
OrderTypeCardSubscribe = 1
OrderTypeBalanceRecharge = 2
OrderStatusPendingPay = 0
OrderStatusCompleted = 5
OrderReturnStatusNone = 0
OrderReturnStatusPending = 1
OrderReturnStatusRunning = 2
OrderReturnStatusPartial = 3
OrderReturnStatusSuccess = 4
PayTypeBalance = 0
PayTypeOnline = 1
PayStatusUnpaid = 0
PayStatusPaid = 2
ShippingMethodNone = 3
ProductTypeCard = 1
ProductTypeBalance = 4
PayModeYearMonth = 1
PackageBusinessTypeSubscribe = 0
PackageBusinessTypeChange = 1
PackageBusinessTypeRenew = 2
PackageStatusNone = 0
PackageStatusPending = 1
PackageStatusEffective = 2
PackageStatusExpired = 3
EffectiveStatusPending = 0
EffectiveStatusEffective = 1
EffectiveStatusExpired = 2
EffectiveStatusTerminated = 3
EffectiveStatusVoided = 4
)
const (
V3ApiSimBossCardStatusPendingActivate = 1
V3ApiSimBossCardStatusActivated = 2
V3ApiSimBossCardStatusStopped = 4
)
const (
SimCardStatusOperTypeStop = "0"
SimCardStatusOperTypeStart = "1"
SimCardDataOperTypeStart = 0
SimCardDataOperTypeStop = 1
SimCardDataApnName = "CMIOT"
)
const (
ImportStatusSuccess = "success"
ImportStatusFailed = "failed"
)
const (
BalanceIncome = 0
BalanceExpense = 1
BalanceTransactionTypeRecharge = 0
BalanceTransactionTypeConsume = 1
BalanceTransactionChannelBalance = 0
BalanceTransactionChannelWechat = 2
BalanceTransactionChannelAlipay = 3
BalanceTransactionChannelMock = 9
)
+13
View File
@@ -0,0 +1,13 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts
const (
KeySysAuthToken = "login:%d:%s" // 系统认证token缓存 login:{userId}:{uuid}
KeySysAuthTokenReject = "login_reject:%d:%s:" // 系统认证token拒绝缓存 login_reject:{userId}:{uuid}
KeyLoginScanWechat = "login:scan:wechat:%d" // 系统二维码登录缓存 hash Key:SceneId field:tempUserId value:QrcodeCacheModel
KeyUserBindWechat = "user:bind:wechat:%d" // 系统二维码绑定缓存 hash Key:SceneId field:userId value:QrcodeCacheModel
)
+41
View File
@@ -0,0 +1,41 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts
import "github.com/gogf/gf/v2/errors/gcode"
var (
// 账号不存在
CodeUserNotFound = gcode.New(10001, "账号不存在", nil)
// 账号已删除
CodeUserDeleted = gcode.New(10002, "账号已删除", nil)
// 密码错误
CodeUserPasswordError = gcode.New(10003, "密码错误", nil)
// 账号已禁用
CodeUserDisabled = gcode.New(10004, "账号已禁用", nil)
// 账号已锁定
CodeUserLocked = gcode.New(10005, "账号已锁定", nil)
// 账号已过期
CodeUserExpired = gcode.New(10006, "账号已过期", nil)
// 验证码错误
CodeCaptchaError = gcode.New(10007, "验证码错误", nil)
// 用户名已存在
CodeUserExists = gcode.New(10008, "用户名已存在", nil)
// 部门不存在
CodeDeptNotFound = gcode.New(10009, "部门不存在", nil)
// 手机号已存在
CodePhoneExists = gcode.New(10010, "手机号已存在", nil)
// 邮箱已存在
CodeEmailExists = gcode.New(10011, "邮箱已存在", nil)
// 登录已过期
CodeLoginExpired = gcode.New(10012, "登录已过期", nil)
// 部门下有子部门,不能删除
CodeDeptHasSub = gcode.New(10013, "部门下有子部门,不能删除", nil)
// 没有权限
CodeNoPermission = gcode.New(10014, "没有权限", nil)
// 无效Token
CodeInvalidToken = gcode.New(10015, "无效Token", nil)
)
+21
View File
@@ -0,0 +1,21 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts
const (
ConfigOssUrlPath = "sys.oss.urlPath" // 上传文件Url路径 "http://ab.com/" 或 "/" 或 "resource/upload|http://ab.com/upload"
ConfigOssFileTypeKey = "sys.oss.fileType" // 上传文件类型
ConfigOssImgTypeKey = "sys.oss.imgType" // 上传图片类型
ConfigOssFileSizeKey = "sys.oss.fileSize" // 上传文件大小
ConfigOssImgSizeKey = "sys.oss.imgSize" // 上传图片大小
ConfigOnlineForceLogout = "sys.online.forceLogout" // 在线用户强制退出
ConfigOssNewFileTypePath = "sys.oss.newFileTypePath.%d" // 上传文件类型路径 ${newFileType}
)
const (
ConfigOnlineForceLogoutTrue = "true" // 在线用户强制退出
ConfigOnlineForceLogoutFalse = "false" // 在线用户强制退出
)
+10
View File
@@ -0,0 +1,10 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts
const (
ContextKey = "ContextKey" // 上下文变量存储键名,前后端系统共享
)
+6
View File
@@ -0,0 +1,6 @@
package consts
const (
DBNameDefault = "default"
DBNameMemory = "memorydb"
)
+55
View File
@@ -0,0 +1,55 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts
const (
EventKeyServerClose = "server_close" // 服务关闭 args=[]
)
const (
EventKeyUserLogin = "user_login" // 用户登录 args=[uid,]
EventKeyUserLogout = "user_logout" // 用户退出 args=[uid,]
EventKeyUserCreate = "user_create" // 用户创建 args=[uid,]
EventKeyUserDelete = "user_delete" // 用户删除 args=[uidArray,]
EventKeyUserUpdate = "user_update" // 用户更新 args=[uid,]
)
const (
EventKeyDBSysConfigUpdate = "db.sys_config_update" // 系统配置创建更新删除 args=[configId, tenantId,key?]
EventKeyDBSysConfigCreate = "db.sys_config_create" // 系统配置创建 args=[configId, tenantId,key?]
EventKeyDBSysConfigDelete = "db.sys_config_delete" // 系统配置删除 args=[configId, tenantId]
)
const (
EventKeyDBSysDeptCreate = "db.sys_dept_create" // 系统部门创建 args=[deptId,]
EventKeyDBSysDeptUpdate = "db.sys_dept_update" // 系统部门更新 args=[deptId,]
EventKeyDBSysDeptDelete = "db.sys_dept_delete" // 系统部门删除 args=[deptId[],]
)
const (
EventKeyDBSysTenantCreate = "db.sys_tenant_create" // 租户创建 args=[pk,]
EventKeyDBSysTenantUpdate = "db.sys_tenant_update" // 租户更新 args=[pk,]
EventKeyDBSysTenantDelete = "db.sys_tenant_delete" // 租户删除 args=[pk[],]
EventKeyDBSysRoleCreate = "db.sys_role_create" // 角色创建 args=[pk,]
EventKeyDBSysRoleUpdate = "db.sys_role_update" // 角色更新 args=[pk,]
EventKeyDBSysRoleDelete = "db.sys_role_delete" // 角色删除 args=[pk[],]
EventKeyDBSysMenuCreate = "db.sys_menu_create" // 菜单创建 args=[pk,]
EventKeyDBSysMenuUpdate = "db.sys_menu_update" // 菜单更新 args=[pk,]
EventKeyDBSysMenuDelete = "db.sys_menu_delete" // 菜单删除 args=[pk[],]
EventKeyDBSysPostCreate = "db.sys_post_create" // 岗位创建 args=[pk,]
EventKeyDBSysPostUpdate = "db.sys_post_update" // 岗位更新 args=[pk,]
EventKeyDBSysPostDelete = "db.sys_post_delete" // 岗位删除 args=[pk[],]
EventKeyDBSysDictDataCreate = "db.sys_dict_data_create" // 字典数据创建 args=[pk,]
EventKeyDBSysDictDataUpdate = "db.sys_dict_data_update" // 字典数据更新 args=[pk,]
EventKeyDBSysDictDataDelete = "db.sys_dict_data_delete" // 字典数据删除 args=[pk[],]
EventKeyDBSysDictTypeCreate = "db.sys_dict_type_create" // 字典类型创建 args=[pk,]
EventKeyDBSysDictTypeUpdate = "db.sys_dict_type_update" // 字典类型更新 args=[pk,]
EventKeyDBSysDictTypeDelete = "db.sys_dict_type_delete" // 字典类型删除 args=[pk[],]
)
+14
View File
@@ -0,0 +1,14 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts
const (
HTTPContentTypeXml = "text/xml"
HTTPContentTypeHtml = "text/html"
HTTPContentTypeStream = "text/event-stream"
HTTPContentTypeJson = "application/json"
HTTPContentTypeExcel = "application/octet-stream"
)
+15
View File
@@ -0,0 +1,15 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts
// 内存缓存KEY常量 注明 key组成和 过期时间 清理方式
const (
MemCacheDeptName = "dept_name_%d" // 部门名称缓存 部门id:name 24小时过期
MemCacheUserInfo = "user_info_%d" // 用户信息缓存 用户id:miniinfo 24小时过期 用户修改是清理
MemCacheUserAccessCodeList = "user_access_code_list_%d" // 用户访问码列表缓存 用户id:access_code_list 24小时过期 用户退出清理
MemCacheUserRoleDataAccessCodeList = "user_role_data_access_code_list_%d" // 用户角色数据访问码列表缓存 用户id:role_id:data_access_code_list 24小时过期 用户退出清理
MemCacheSystemConfig = "system_config_%s" // 系统配置缓存 租户ID:map[key]value 24小时过期
)
+20
View File
@@ -0,0 +1,20 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts
const (
QueueSysOptLog = "queue:sys_opt_log"
)
// 数据库变动类型
const (
DbChgTypeAdd = "add" // 数据库变动新增
DbChgTypeEdit = "edit" // 数据库变动编辑
DbChgTypeDel = "del" // 数据库变动删除
)
const (
BroadcastDbChg = "broadcast:db:chg" // 数据库配置表变动更新广播消息 obj{table_name,pk,type:add/edit/del,data:{主要字段数据}}
)
+150
View File
@@ -0,0 +1,150 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts
var (
// 默认系统租客编号,禁止修改编号
DefaultSystemTenantCode = "000000"
SuperAdminRoleId = int64(1)
)
var (
// 状态: 0正常 1停用
SysStatusNormal = "0"
SysStatusDisable = "1"
)
var (
// 菜单状态: 0正常 1停用
SysMenuStatusNormal = "0"
SysMenuStatusDisable = "1"
)
var (
// 菜单类型: M目录 C菜单 F按钮
SysMenuTypeDir = "M"
SysMenuTypeMenu = "C"
SysMenuTypeBtn = "F"
)
var (
// 菜单可见: 0显示 1隐藏
SysMenuVisibleShow = "0"
SysMenuVisibleHide = "1"
)
var (
// 菜单是否为外链: 0是 1否
SysMenuIsFrameNo = 1
SysMenuIsFrameYes = 0
)
var (
// 用户状态: 0正常 1停用
SysUserStatusNormal = "0"
SysUserStatusDisable = "1"
SysUserStatusLocked = "2"
SysUserStatusExpired = "3"
SysUserStatusDeleted = "4"
)
var (
// 角色菜单数据范围: 0继承角色数据范围
SysRoleMenuDataScopeRole = "0"
// 角色数据范围: 1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限 5仅本人数据权限 6本部门及以下或本人数据权限 7本组织及本组织下一级数据权限 8本组织下一级数据权限
SysRoleDataScopeAll = "1"
SysRoleDataScopeCustom = "2"
SysRoleDataScopeDept = "3"
SysRoleDataScopeDeptAndBelow = "4"
SysRoleDataScopePersonal = "5"
SysRoleDataScopeDeptAndBelowOrPersonal = "6"
SysRoleDataScopeOrgAndNextLevel = "7"
SysRoleDataScopeOrgNextLevel = "8"
)
var (
// 上传文件类型: 1文件 2图片
SysUploadFileTypeFile = "file"
SysUploadFileTypeImg = "img"
)
var (
// 新文件类型
SysUploadNewFileTypeUserFile = 1 // 用户文件
SysUploadNewFileTypeUserImg = 2 // 用户图片
SysUploadNewFileTypeDeviceFile = 3 // 设备文件 ${device_key}
)
var (
// 新文件类型路径
SysUploadNewFileTypePathUserFile = "user/file" // 用户文件
SysUploadNewFileTypePathUserImg = "user/img" // 用户图片
SysUploadNewFileTypePathDeviceFile = "device" // 设备文件 ${device_key}
)
var (
// 用户性别: 0男 1女 2未知
SysUserSexMale = "0"
SysUserSexFemale = "1"
SysUserSexUnknown = "2"
)
var (
// 用户类型: pc端 app端
SysUserTypeSys = "sys_user"
SysUserTypeAPP = "app_user"
)
var (
// AppTerminalDeptId 仅作为旧数据兜底默认部门;终端用户身份以 sys_config 的小程序角色和所属组织配置为准。
AppTerminalDeptId = int64(147)
)
var (
// 部门状态: 0正常 1停用
SysDeptStatusNormal = "0"
SysDeptStatusDisable = "1"
)
var (
// 任务状态: 0正常 1停用
SysJobStatusNormal = "0"
SysJobStatusDisable = "1"
)
var (
// 计划执行策略 0不限制并发 1限制并发
SysJobMisfirePolicyMulty = 1
SysJobMisfirePolicyOnce = 2
)
var (
// 权限码前缀 x-check-permission
SysCheckPermissionPrefix = "cp"
SysCheckPermissionRolePrefix = "cpr:" // 角色权限码前缀+角色权限
SysCheckPermissionMenuPrefix = "cpm:" // 菜单权限码前缀+菜单权限
SysCheckPermissionDeptPrefix = "cpd:" // 部门权限码前缀+部门编码
SysCheckPermissionPostPrefix = "cpp:" // 岗位权限码前缀+岗位编码
SysCheckPermissionUserPrefix = "cpu:" // 用户权限码前缀+用户名
SysCheckPermissionCurrentUser = "cpc:current:user" // 当前登录用户默认权限
SysCheckPermissionTerminalUser = "cpa:terminal:user" // 小程序终端用户专用权限
)
var StatusSlice = []int{0, 1}
var (
// 公告范围: 1全部 2指定组织 3指定用户
NoticeRangeAll = 1
NoticeRangeDept = 2
NoticeRangeUser = 3
)
var (
// 租户配置
ConfigKeyTenantDefaultRegisterDeptId = "iot.register.dept"
ConfigKeyTenantDefaultRegisterRoleId = "iot.register.role"
)
var (
// 微信平台
SourceWechatMp = "wechat_mp"
)
+23
View File
@@ -0,0 +1,23 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts
// 服务器监控信息
const (
MonitorServerHost = "host"
MonitorServerSysLoad = "sysLoad"
MonitorServerCpu = "cpu"
MonitorServerMem = "mem"
MonitorServerDisk = "disk"
MonitorServerNet = "net"
MonitorServerGo = "go"
)
// WEBSOCKET订阅Tag 服务器监控信息
const (
WSTagMonitorServer = "ws:tag:monitor:server" // WEBSOCKET订阅Tag 服务器监控信息
WSEventMonitorServer = "ws:event:monitor:server:%s" // WEBSOCKET订阅 服务器监控信息 %s in [host,sysLoad,cpu,disk,net,go]
)
@@ -0,0 +1,9 @@
package app
import apiApp "git.5iot.com/iotlcm-public/iotlcm-app/api/app"
type ControllerV1 struct{}
func NewV1() apiApp.IAppV1 {
return &ControllerV1{}
}
@@ -0,0 +1,81 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) Captcha(ctx context.Context, req *v1.CaptchaReq) (res *v1.CaptchaRes, err error) {
captchaID, captchaImage, err := service.AppAuth().Captcha(ctx)
if err != nil {
return nil, err
}
return &v1.CaptchaRes{
CaptchaID: captchaID,
CaptchaImage: captchaImage,
}, nil
}
func (c *ControllerV1) SideCaptcha(ctx context.Context, req *v1.SideCaptchaReq) (res *v1.SideCaptchaRes, err error) {
captcha, err := service.AppAuth().SideCaptcha(ctx)
if err != nil {
return nil, err
}
return &v1.SideCaptchaRes{AppSideCaptchaModel: *captcha}, nil
}
func (c *ControllerV1) CheckSideCaptcha(ctx context.Context, req *v1.CheckSideCaptchaReq) (res *v1.CheckSideCaptchaRes, err error) {
if err = service.AppAuth().CheckSideCaptcha(ctx, &req.AppCheckSideCaptchaParam); err != nil {
return nil, err
}
return &v1.CheckSideCaptchaRes{Success: true}, nil
}
func (c *ControllerV1) SendSms(ctx context.Context, req *v1.SendSmsReq) (res *v1.SendSmsRes, err error) {
sms, err := service.AppAuth().SendSms(ctx, &req.AppSendSmsParam)
if err != nil {
return nil, err
}
return &v1.SendSmsRes{AppSendSmsModel: *sms}, nil
}
func (c *ControllerV1) PhoneRegister(ctx context.Context, req *v1.PhoneRegisterReq) (res *v1.PhoneRegisterRes, err error) {
token, err := service.AppAuth().PhoneRegister(ctx, &req.AppPhoneRegisterParam)
if err != nil {
return nil, err
}
return &v1.PhoneRegisterRes{AppAuthTokenModel: *token}, nil
}
func (c *ControllerV1) PhoneLogin(ctx context.Context, req *v1.PhoneLoginReq) (res *v1.PhoneLoginRes, err error) {
token, err := service.AppAuth().PhoneLogin(ctx, &req.AppPhoneLoginParam)
if err != nil {
return nil, err
}
return &v1.PhoneLoginRes{AppAuthTokenModel: *token}, nil
}
func (c *ControllerV1) WechatLogin(ctx context.Context, req *v1.WechatLoginReq) (res *v1.WechatLoginRes, err error) {
data, err := service.AppAuth().WechatLogin(ctx, &req.AppWechatLoginParam)
if err != nil {
return nil, err
}
return &v1.WechatLoginRes{AppWechatLoginModel: *data}, nil
}
func (c *ControllerV1) WechatBindPhone(ctx context.Context, req *v1.WechatBindPhoneReq) (res *v1.WechatBindPhoneRes, err error) {
data, err := service.AppAuth().WechatBindPhone(ctx, &req.AppWechatBindPhoneParam)
if err != nil {
return nil, err
}
return &v1.WechatBindPhoneRes{AppWechatBindPhoneModel: *data}, nil
}
func (c *ControllerV1) ForgotPassword(ctx context.Context, req *v1.ForgotPasswordReq) (res *v1.ForgotPasswordRes, err error) {
if err = service.AppAuth().ForgotPassword(ctx, &req.AppForgotPasswordParam); err != nil {
return nil, err
}
return &v1.ForgotPasswordRes{Success: true}, nil
}
@@ -0,0 +1,89 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
)
func (c *ControllerV1) BalanceRechargeSubmit(ctx context.Context, req *v1.BalanceRechargeSubmitReq) (res *v1.BalanceRechargeSubmitRes, err error) {
order, err := service.AppCard().BalanceRechargeSubmit(ctx, &req.AppBalanceRechargeSubmitParam)
if err != nil {
return nil, err
}
return &v1.BalanceRechargeSubmitRes{AppBalanceRechargeSubmitModel: order}, nil
}
func (c *ControllerV1) BalanceRechargeStatus(ctx context.Context, req *v1.BalanceRechargeStatusReq) (res *v1.BalanceRechargeStatusRes, err error) {
status, err := service.AppCard().BalanceRechargeStatus(ctx, &req.AppBalanceRechargeStatusParam)
if err != nil {
return nil, err
}
return &v1.BalanceRechargeStatusRes{AppBalanceRechargeStatusModel: status}, nil
}
func (c *ControllerV1) BalanceRechargeMockPay(ctx context.Context, req *v1.BalanceRechargeMockPayReq) (res *v1.BalanceRechargeMockPayRes, err error) {
status, err := service.AppCard().BalanceRechargeMockPay(ctx, &req.AppBalanceRechargeMockPayParam)
if err != nil {
return nil, err
}
return &v1.BalanceRechargeMockPayRes{AppBalanceRechargeStatusModel: status}, nil
}
func (c *ControllerV1) BalanceRechargeRefund(ctx context.Context, req *v1.BalanceRechargeRefundReq) (res *v1.BalanceRechargeRefundRes, err error) {
order, err := service.AppCard().BalanceRechargeRefund(ctx, &req.AppBalanceRechargeRefundParam)
if err != nil {
return nil, err
}
return &v1.BalanceRechargeRefundRes{AppOrderModel: order}, nil
}
func (c *ControllerV1) BalanceRechargeWechatNotify(ctx context.Context, req *v1.BalanceRechargeWechatNotifyReq) (res *v1.BalanceRechargeWechatNotifyRes, err error) {
r := ghttp.RequestFromCtx(ctx)
if r == nil {
return nil, nil
}
if err = service.AppCard().BalanceRechargeWechatNotify(ctx); err != nil {
g.Log().Errorf(ctx, "微信支付余额充值回调处理失败: %v", err)
r.Response.Status = 500
r.Response.WriteJson(g.Map{
"code": "FAIL",
"message": err.Error(),
})
r.ExitAll()
return nil, nil
}
r.Response.WriteJson(g.Map{
"code": "SUCCESS",
"message": "成功",
})
r.ExitAll()
return nil, nil
}
func (c *ControllerV1) BalanceRechargeWechatRefundNotify(ctx context.Context, req *v1.BalanceRechargeWechatRefundNotifyReq) (res *v1.BalanceRechargeWechatRefundNotifyRes, err error) {
r := ghttp.RequestFromCtx(ctx)
if r == nil {
return nil, nil
}
if err = service.AppCard().BalanceRechargeWechatRefundNotify(ctx); err != nil {
g.Log().Errorf(ctx, "微信支付退款回调处理失败: %v", err)
r.Response.Status = 500
r.Response.WriteJson(g.Map{
"code": "FAIL",
"message": err.Error(),
})
r.ExitAll()
return nil, nil
}
r.Response.WriteJson(g.Map{
"code": "SUCCESS",
"message": "成功",
})
r.ExitAll()
return nil, nil
}
@@ -0,0 +1,180 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) PublicQueryCard(ctx context.Context, req *v1.PublicQueryCardReq) (res *v1.PublicQueryCardRes, err error) {
card, err := service.AppCard().PublicQuery(ctx, &req.AppCardQueryParam)
if err != nil {
return nil, err
}
return &v1.PublicQueryCardRes{Card: card}, nil
}
func (c *ControllerV1) RecognizeCard(ctx context.Context, req *v1.RecognizeCardReq) (res *v1.RecognizeCardRes, err error) {
result, err := service.AppCard().RecognizeCard(ctx)
if err != nil {
return nil, err
}
return &v1.RecognizeCardRes{AppCardRecognitionModel: result}, nil
}
func (c *ControllerV1) CardList(ctx context.Context, req *v1.CardListReq) (res *v1.CardListRes, err error) {
items, total, err := service.AppCard().List(ctx, &req.AppCardListParam)
if err != nil {
return nil, err
}
hasMore := len(items) >= req.PageSize
if req.IncludeTotal == nil || *req.IncludeTotal {
hasMore = req.Page*req.PageSize < total
}
return &v1.CardListRes{Items: items, Total: total, HasMore: hasMore}, nil
}
func (c *ControllerV1) PackageList(ctx context.Context, req *v1.PackageListReq) (res *v1.PackageListRes, err error) {
items, total, err := service.AppCard().PackageList(ctx, &req.AppPackageListParam)
if err != nil {
return nil, err
}
return &v1.PackageListRes{Items: items, Total: total}, nil
}
func (c *ControllerV1) PublicPackageDetail(ctx context.Context, req *v1.PublicPackageDetailReq) (res *v1.PublicPackageDetailRes, err error) {
pkg, err := service.AppCard().PublicPackageDetail(ctx, &req.AppPackagePublicDetailParam)
if err != nil {
return nil, err
}
return &v1.PublicPackageDetailRes{Package: pkg}, nil
}
func (c *ControllerV1) CardDetail(ctx context.Context, req *v1.CardDetailReq) (res *v1.CardDetailRes, err error) {
card, err := service.AppCard().Detail(ctx, &req.AppCardDetailParam)
if err != nil {
return nil, err
}
return &v1.CardDetailRes{Card: card}, nil
}
func (c *ControllerV1) BindCard(ctx context.Context, req *v1.BindCardReq) (res *v1.BindCardRes, err error) {
card, err := service.AppCard().Bind(ctx, &req.AppCardBindParam)
if err != nil {
return nil, err
}
return &v1.BindCardRes{Card: card}, nil
}
func (c *ControllerV1) RestartCard(ctx context.Context, req *v1.RestartCardReq) (res *v1.RestartCardRes, err error) {
restart, err := service.AppCard().Restart(ctx, &req.AppCardRestartParam)
if err != nil {
return nil, err
}
return &v1.RestartCardRes{AppCardRestartModel: restart}, nil
}
func (c *ControllerV1) StopCard(ctx context.Context, req *v1.StopCardReq) (res *v1.StopCardRes, err error) {
stop, err := service.AppCard().Stop(ctx, &req.AppCardRestartParam)
if err != nil {
return nil, err
}
return &v1.StopCardRes{AppCardLifecycleModel: stop}, nil
}
func (c *ControllerV1) StartCard(ctx context.Context, req *v1.StartCardReq) (res *v1.StartCardRes, err error) {
start, err := service.AppCard().Start(ctx, &req.AppCardRestartParam)
if err != nil {
return nil, err
}
return &v1.StartCardRes{AppCardLifecycleModel: start}, nil
}
func (c *ControllerV1) LifecycleBatchSubmit(ctx context.Context, req *v1.LifecycleBatchSubmitReq) (res *v1.LifecycleBatchSubmitRes, err error) {
submit, err := service.AppCard().LifecycleBatchSubmit(ctx, &req.AppCardLifecycleParam)
if err != nil {
return nil, err
}
return &v1.LifecycleBatchSubmitRes{AppCardLifecycleModel: submit}, nil
}
func (c *ControllerV1) LifecycleBatchStatus(ctx context.Context, req *v1.LifecycleBatchStatusReq) (res *v1.LifecycleBatchStatusRes, err error) {
status, err := service.AppCard().LifecycleBatchStatus(ctx, &req.AppCardLifecycleStatusParam)
if err != nil {
return nil, err
}
return &v1.LifecycleBatchStatusRes{AppCardLifecycleModel: status}, nil
}
func (c *ControllerV1) RenewPrepare(ctx context.Context, req *v1.RenewPrepareReq) (res *v1.RenewPrepareRes, err error) {
prepare, err := service.AppCard().RenewPrepare(ctx, &req.AppCardRenewPrepareParam)
if err != nil {
return nil, err
}
return &v1.RenewPrepareRes{AppCardRenewPrepareModel: prepare}, nil
}
func (c *ControllerV1) RenewBatchPrepare(ctx context.Context, req *v1.RenewBatchPrepareReq) (res *v1.RenewBatchPrepareRes, err error) {
prepare, err := service.AppCard().RenewBatchPrepare(ctx, &req.AppCardRenewBatchPrepareParam)
if err != nil {
return nil, err
}
return &v1.RenewBatchPrepareRes{AppCardRenewPrepareModel: prepare}, nil
}
func (c *ControllerV1) RenewSubmit(ctx context.Context, req *v1.RenewSubmitReq) (res *v1.RenewSubmitRes, err error) {
submit, err := service.AppCard().RenewSubmit(ctx, &req.AppCardRenewSubmitParam)
if err != nil {
return nil, err
}
return &v1.RenewSubmitRes{AppCardRenewSubmitModel: submit}, nil
}
func (c *ControllerV1) RenewBatchSubmit(ctx context.Context, req *v1.RenewBatchSubmitReq) (res *v1.RenewBatchSubmitRes, err error) {
submit, err := service.AppCard().RenewBatchSubmit(ctx, &req.AppCardRenewBatchSubmitParam)
if err != nil {
return nil, err
}
return &v1.RenewBatchSubmitRes{AppCardRenewSubmitModel: submit}, nil
}
func (c *ControllerV1) AllocateTargets(ctx context.Context, req *v1.AllocateTargetsReq) (res *v1.AllocateTargetsRes, err error) {
items, total, err := service.AppCard().AllocateTargets(ctx, &req.AppCardAllocateTargetListParam)
if err != nil {
return nil, err
}
return &v1.AllocateTargetsRes{Items: items, Total: total}, nil
}
func (c *ControllerV1) AllocateBatchPrepare(ctx context.Context, req *v1.AllocateBatchPrepareReq) (res *v1.AllocateBatchPrepareRes, err error) {
prepare, err := service.AppCard().AllocateBatchPrepare(ctx, &req.AppCardAllocateBatchPrepareParam)
if err != nil {
return nil, err
}
return &v1.AllocateBatchPrepareRes{AppCardAllocateBatchModel: prepare}, nil
}
func (c *ControllerV1) AllocateBatchSubmit(ctx context.Context, req *v1.AllocateBatchSubmitReq) (res *v1.AllocateBatchSubmitRes, err error) {
submit, err := service.AppCard().AllocateBatchSubmit(ctx, &req.AppCardAllocateBatchSubmitParam)
if err != nil {
return nil, err
}
return &v1.AllocateBatchSubmitRes{AppCardAllocateBatchModel: submit}, nil
}
func (c *ControllerV1) ChangePrepare(ctx context.Context, req *v1.ChangePrepareReq) (res *v1.ChangePrepareRes, err error) {
prepare, err := service.AppCard().ChangePrepare(ctx, &req.AppCardChangePrepareParam)
if err != nil {
return nil, err
}
return &v1.ChangePrepareRes{AppCardChangePrepareModel: prepare}, nil
}
func (c *ControllerV1) ChangeSubmit(ctx context.Context, req *v1.ChangeSubmitReq) (res *v1.ChangeSubmitRes, err error) {
submit, err := service.AppCard().ChangeSubmit(ctx, &req.AppCardChangeSubmitParam)
if err != nil {
return nil, err
}
return &v1.ChangeSubmitRes{AppCardChangeSubmitModel: submit}, nil
}
@@ -0,0 +1,24 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) CustomerList(ctx context.Context, req *v1.CustomerListReq) (res *v1.CustomerListRes, err error) {
items, total, err := service.AppUser().CustomerList(ctx, &req.AppCustomerListParam)
if err != nil {
return nil, err
}
return &v1.CustomerListRes{Items: items, Total: total}, nil
}
func (c *ControllerV1) CustomerDetail(ctx context.Context, req *v1.CustomerDetailReq) (res *v1.CustomerDetailRes, err error) {
customer, err := service.AppUser().CustomerDetail(ctx, &req.AppCustomerDetailParam)
if err != nil {
return nil, err
}
return &v1.CustomerDetailRes{Customer: customer}, nil
}
@@ -0,0 +1,24 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) DiagnosisInfo(ctx context.Context, req *v1.DiagnosisInfoReq) (res *v1.DiagnosisInfoRes, err error) {
info, err := service.AppDiagnosis().Info(ctx, &req.AppDiagnosisInfoParam)
if err != nil {
return nil, err
}
return &v1.DiagnosisInfoRes{AppDiagnosisInfoModel: info}, nil
}
func (c *ControllerV1) DiagnosisFlow(ctx context.Context, req *v1.DiagnosisFlowReq) (res *v1.DiagnosisFlowRes, err error) {
flow, err := service.AppDiagnosis().Flow(ctx, &req.AppDiagnosisFlowParam)
if err != nil {
return nil, err
}
return &v1.DiagnosisFlowRes{AppDiagnosisFlowModel: flow}, nil
}
@@ -0,0 +1,32 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) MessageList(ctx context.Context, req *v1.MessageListReq) (res *v1.MessageListRes, err error) {
items, total, err := service.AppMessage().List(ctx, &req.AppMessageListParam)
if err != nil {
return nil, err
}
return &v1.MessageListRes{Items: items, Total: total}, nil
}
func (c *ControllerV1) MessageDetail(ctx context.Context, req *v1.MessageDetailReq) (res *v1.MessageDetailRes, err error) {
message, err := service.AppMessage().Detail(ctx, &req.AppMessageDetailParam)
if err != nil {
return nil, err
}
return &v1.MessageDetailRes{Message: message}, nil
}
func (c *ControllerV1) MessageRead(ctx context.Context, req *v1.MessageReadReq) (res *v1.MessageReadRes, err error) {
err = service.AppMessage().Read(ctx, &req.AppMessageReadParam)
if err != nil {
return nil, err
}
return &v1.MessageReadRes{}, nil
}
@@ -0,0 +1,24 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) OpenDiagnosisInfo(ctx context.Context, req *v1.OpenDiagnosisInfoReq) (res *v1.OpenDiagnosisInfoRes, err error) {
info, err := service.AppDiagnosis().OpenInfo(ctx, &req.AppOpenDiagnosisInfoParam)
if err != nil {
return nil, err
}
return &v1.OpenDiagnosisInfoRes{AppDiagnosisInfoModel: info}, nil
}
func (c *ControllerV1) OpenDiagnosisFlow(ctx context.Context, req *v1.OpenDiagnosisFlowReq) (res *v1.OpenDiagnosisFlowRes, err error) {
flow, err := service.AppDiagnosis().OpenFlow(ctx, &req.AppOpenDiagnosisFlowParam)
if err != nil {
return nil, err
}
return &v1.OpenDiagnosisFlowRes{AppDiagnosisFlowModel: flow}, nil
}
@@ -0,0 +1,24 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) OrderList(ctx context.Context, req *v1.OrderListReq) (res *v1.OrderListRes, err error) {
items, total, err := service.AppOrder().List(ctx, &req.AppOrderListParam)
if err != nil {
return nil, err
}
return &v1.OrderListRes{Items: items, Total: total}, nil
}
func (c *ControllerV1) OrderDetail(ctx context.Context, req *v1.OrderDetailReq) (res *v1.OrderDetailRes, err error) {
order, err := service.AppOrder().Detail(ctx, &req.AppOrderDetailParam)
if err != nil {
return nil, err
}
return &v1.OrderDetailRes{Order: order}, nil
}
@@ -0,0 +1,32 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) UserInfo(ctx context.Context, req *v1.UserInfoReq) (res *v1.UserInfoRes, err error) {
user, err := service.AppUser().Info(ctx)
if err != nil {
return nil, err
}
return &v1.UserInfoRes{AppUserInfoModel: *user}, nil
}
func (c *ControllerV1) UpdateUserInfo(ctx context.Context, req *v1.UpdateUserInfoReq) (res *v1.UpdateUserInfoRes, err error) {
user, err := service.AppUser().UpdateInfo(ctx, &req.AppUpdateUserInfoParam)
if err != nil {
return nil, err
}
return &v1.UpdateUserInfoRes{AppUserInfoModel: *user}, nil
}
func (c *ControllerV1) BindWechat(ctx context.Context, req *v1.BindWechatReq) (res *v1.BindWechatRes, err error) {
data, err := service.AppUser().BindWechat(ctx, &req.AppWechatBindParam)
if err != nil {
return nil, err
}
return &v1.BindWechatRes{AppWechatBindModel: *data}, nil
}
@@ -0,0 +1,56 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) WarningConfigList(ctx context.Context, req *v1.WarningConfigListReq) (res *v1.WarningConfigListRes, err error) {
data, err := service.AppWarning().ConfigList(ctx, &req.AppWarningConfigListParam)
if err != nil {
return nil, err
}
return &v1.WarningConfigListRes{AppWarningConfigListModel: *data}, nil
}
func (c *ControllerV1) WarningConfigSave(ctx context.Context, req *v1.WarningConfigSaveReq) (res *v1.WarningConfigSaveRes, err error) {
data, err := service.AppWarning().ConfigSave(ctx, &req.AppWarningConfigSaveParam)
if err != nil {
return nil, err
}
return &v1.WarningConfigSaveRes{AppWarningConfigSaveModel: *data}, nil
}
func (c *ControllerV1) WarningConfigNotify(ctx context.Context, req *v1.WarningConfigNotifyReq) (res *v1.WarningConfigNotifyRes, err error) {
data, err := service.AppWarning().ConfigNotify(ctx, &req.AppWarningConfigNotifyParam)
if err != nil {
return nil, err
}
return &v1.WarningConfigNotifyRes{AppWarningConfigNotifyModel: *data}, nil
}
func (c *ControllerV1) WarningConfigMeta(ctx context.Context, req *v1.WarningConfigMetaReq) (res *v1.WarningConfigMetaRes, err error) {
data, err := service.AppWarning().ConfigMeta(ctx)
if err != nil {
return nil, err
}
return &v1.WarningConfigMetaRes{AppWarningConfigMetaModel: *data}, nil
}
func (c *ControllerV1) WarningConfigBatchSave(ctx context.Context, req *v1.WarningConfigBatchSaveReq) (res *v1.WarningConfigBatchSaveRes, err error) {
data, err := service.AppWarning().ConfigBatchSave(ctx, &req.AppWarningConfigBatchSaveParam)
if err != nil {
return nil, err
}
return &v1.WarningConfigBatchSaveRes{AppWarningConfigBatchSaveModel: *data}, nil
}
func (c *ControllerV1) WarningConfigBatchNotify(ctx context.Context, req *v1.WarningConfigBatchNotifyReq) (res *v1.WarningConfigBatchNotifyRes, err error) {
data, err := service.AppWarning().ConfigBatchNotify(ctx, &req.AppWarningConfigBatchNotifyParam)
if err != nil {
return nil, err
}
return &v1.WarningConfigBatchNotifyRes{AppWarningConfigBatchNotifyModel: *data}, nil
}
@@ -0,0 +1,40 @@
package app
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) WorkOrderList(ctx context.Context, req *v1.WorkOrderListReq) (res *v1.WorkOrderListRes, err error) {
items, total, err := service.AppWorkOrder().List(ctx, &req.AppWorkOrderListParam)
if err != nil {
return nil, err
}
return &v1.WorkOrderListRes{Items: items, Total: total}, nil
}
func (c *ControllerV1) WorkOrderDetail(ctx context.Context, req *v1.WorkOrderDetailReq) (res *v1.WorkOrderDetailRes, err error) {
workOrder, err := service.AppWorkOrder().Detail(ctx, &req.AppWorkOrderDetailParam)
if err != nil {
return nil, err
}
return &v1.WorkOrderDetailRes{WorkOrder: workOrder}, nil
}
func (c *ControllerV1) WorkOrderCreate(ctx context.Context, req *v1.WorkOrderCreateReq) (res *v1.WorkOrderCreateRes, err error) {
workOrder, err := service.AppWorkOrder().Create(ctx, &req.AppWorkOrderCreateParam)
if err != nil {
return nil, err
}
return &v1.WorkOrderCreateRes{WorkOrder: workOrder}, nil
}
func (c *ControllerV1) WorkOrderUpload(ctx context.Context, req *v1.WorkOrderUploadReq) (res *v1.WorkOrderUploadRes, err error) {
workOrderFile, err := service.AppWorkOrder().Upload(ctx)
if err != nil {
return nil, err
}
return &v1.WorkOrderUploadRes{SysOssUploadModel: workOrderFile}, nil
}
@@ -0,0 +1,5 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package common
@@ -0,0 +1,15 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package common
import (
"git.5iot.com/iotlcm-public/iotlcm-app/api/common"
)
type ControllerV1 struct{}
func NewV1() common.ICommonV1 {
return &ControllerV1{}
}
@@ -0,0 +1,31 @@
package common
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/common/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
"github.com/gogf/gf/v2/net/ghttp"
)
func (c *ControllerV1) SysOssUpload(ctx context.Context, req *v1.SysOssUploadReq) (res *v1.SysOssUploadRes, err error) {
info, err := service.SysOss().Upload(ctx, req.SysOssUploadParam)
if err != nil {
return nil, err
}
res = &v1.SysOssUploadRes{
SysOssUploadModel: info,
}
return
}
func (c *ControllerV1) SysOssDownload(ctx context.Context, req *v1.SysOssDownloadReq) (res *v1.SysOssDownloadRes, err error) {
if _, err = service.SysOss().Download(ctx, req.SysOssDownloadParam); err != nil {
return nil, err
}
if r := ghttp.RequestFromCtx(ctx); r != nil {
r.ExitAll()
}
return nil, nil
}
@@ -0,0 +1,69 @@
// Package gen
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version
package gen
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/gen/testdemo/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/genin"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
var (
TestDemo = cTestDemo{}
)
type cTestDemo struct{}
// List 查看测试单表列表
func (c *cTestDemo) TestDemoList(ctx context.Context, req *v1.TestDemoListReq) (res *v1.TestDemoListRes, err error) {
list, totalCount, err := service.GenTestDemo().List(ctx, &req.TestDemoListParam)
if err != nil {
return
}
if list == nil {
list = []*genin.TestDemoListModel{}
}
res = new(v1.TestDemoListRes)
res.Items = list
res.PageResult.Page = req.Page
res.PageResult.PageSize = req.PageSize
res.PageResult.Total = totalCount
return
}
// Export 导出测试单表列表
func (c *cTestDemo) TestDemoExport(ctx context.Context, req *v1.TestDemoExportReq) (res *v1.TestDemoExportRes, err error) {
err = service.GenTestDemo().Export(ctx, &req.TestDemoListParam)
return
}
// Edit 更新测试单表
func (c *cTestDemo) TestDemoEdit(ctx context.Context, req *v1.TestDemoEditReq) (res *v1.TestDemoEditRes, err error) {
err = service.GenTestDemo().Edit(ctx, &req.TestDemoEditParam)
return
}
// View 获取指定测试单表信息
func (c *cTestDemo) TestDemoView(ctx context.Context, req *v1.TestDemoViewReq) (res *v1.TestDemoViewRes, err error) {
data, err := service.GenTestDemo().View(ctx, &req.TestDemoViewParam)
if err != nil {
return
}
res = new(v1.TestDemoViewRes)
res.TestDemoViewModel = data
return
}
// Delete 删除测试单表
func (c *cTestDemo) TestDemoDelete(ctx context.Context, req *v1.TestDemoDeleteReq) (res *v1.TestDemoDeleteRes, err error) {
err = service.GenTestDemo().Delete(ctx, &req.TestDemoDeleteParam)
return
}
@@ -0,0 +1,85 @@
// Package gen
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version
package gen
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/gen/testtree/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/genin"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
var (
TestTree = cTestTree{}
)
type cTestTree struct{}
// List 查看测试树表列表
func (c *cTestTree) TestTreeList(ctx context.Context, req *v1.TestTreeListReq) (res *v1.TestTreeListRes, err error) {
list, totalCount, err := service.GenTestTree().List(ctx, &req.TestTreeListParam)
if err != nil {
return
}
if list == nil {
list = []*genin.TestTreeListModel{}
}
res = new(v1.TestTreeListRes)
res.Items = list
res.PageResult.Page = req.Page
res.PageResult.PageSize = req.PageSize
res.PageResult.Total = totalCount
return
}
// Export 导出测试树表列表
func (c *cTestTree) TestTreeExport(ctx context.Context, req *v1.TestTreeExportReq) (res *v1.TestTreeExportRes, err error) {
err = service.GenTestTree().Export(ctx, &req.TestTreeListParam)
return
}
// Edit 更新测试树表
func (c *cTestTree) TestTreeEdit(ctx context.Context, req *v1.TestTreeEditReq) (res *v1.TestTreeEditRes, err error) {
err = service.GenTestTree().Edit(ctx, &req.TestTreeEditParam)
return
}
// View 获取指定测试树表信息
func (c *cTestTree) TestTreeView(ctx context.Context, req *v1.TestTreeViewReq) (res *v1.TestTreeViewRes, err error) {
data, err := service.GenTestTree().View(ctx, &req.TestTreeViewParam)
if err != nil {
return
}
res = new(v1.TestTreeViewRes)
res.TestTreeViewModel = data
return
}
// Delete 删除测试树表
func (c *cTestTree) TestTreeDelete(ctx context.Context, req *v1.TestTreeDeleteReq) (res *v1.TestTreeDeleteRes, err error) {
err = service.GenTestTree().Delete(ctx, &req.TestTreeDeleteParam)
return
}
// TreeOption 获取测试树表关系树选项
func (c *cTestTree) TestTreeTreeOption(ctx context.Context, req *v1.TestTreeTreeOptionReq) (res *v1.TestTreeTreeOptionRes, err error) {
data, err := service.GenTestTree().TreeOption(ctx)
if err != nil {
return nil, err
}
if len(data) > 0 {
res = (*v1.TestTreeTreeOptionRes)(&data)
} else {
temp := make(v1.TestTreeTreeOptionRes, 0)
res = &temp
}
return
}
@@ -0,0 +1,5 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package gen_codes
@@ -0,0 +1,15 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package gen_codes
import (
"git.5iot.com/iotlcm-public/iotlcm-app/api/gen_codes"
)
type ControllerV1 struct{}
func NewV1() gen_codes.IGenCodesV1 {
return &ControllerV1{}
}
@@ -0,0 +1,127 @@
package gen_codes
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/gen_codes/v1"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/response"
"git.5iot.com/iotlcm-public/iotlcm-app/internal/service"
)
func (c *ControllerV1) SysGenTableList(ctx context.Context, req *v1.SysGenTableListReq) (res *v1.SysGenTableListRes, err error) {
items, total, err := service.SysGenTable().List(ctx, req.SysGenTableListParam)
if err != nil {
return nil, err
}
res = &v1.SysGenTableListRes{
Items: items,
PageResult: response.PageResult{
Page: req.Page,
PageSize: req.PageSize,
Total: total,
},
}
return res, nil
}
func (c *ControllerV1) SysGenTableView(ctx context.Context, req *v1.SysGenTableViewReq) (res *v1.SysGenTableViewRes, err error) {
item, err := service.SysGenTable().View(ctx, req.SysGenTableViewParam)
if err != nil {
return nil, err
}
res = &v1.SysGenTableViewRes{
SysGenTableViewModel: item,
}
return res, nil
}
func (c *ControllerV1) SysGenTableAdd(ctx context.Context, req *v1.SysGenTableAddReq) (res *v1.SysGenTableAddRes, err error) {
output, err := service.SysGenTable().Add(ctx, req.SysGenTableAddParam)
if err != nil {
return nil, err
}
res = &v1.SysGenTableAddRes{
SysGenTableAddModel: output,
}
return res, nil
}
func (c *ControllerV1) SysGenTableDelete(ctx context.Context, req *v1.SysGenTableDeleteReq) (res *v1.SysGenTableDeleteRes, err error) {
output, err := service.SysGenTable().Delete(ctx, req.SysGenTableDeleteParam)
if err != nil {
return nil, err
}
res = &v1.SysGenTableDeleteRes{
SysGenTableDeleteModel: output,
}
return res, nil
}
func (c *ControllerV1) SysGenTableSelects(ctx context.Context, req *v1.SysGenTableSelectsReq) (res *v1.SysGenTableSelectsRes, err error) {
output, err := service.SysGenTable().Selects(ctx)
if err != nil {
return nil, err
}
res = &v1.SysGenTableSelectsRes{
SelectsModel: output,
}
return res, nil
}
func (c *ControllerV1) SysGenTableTableSelect(ctx context.Context, req *v1.SysGenTableTableSelectReq) (res *v1.SysGenTableTableSelectRes, err error) {
output, err := service.SysGenTable().TableSelect(ctx, req.GenCodesTableSelectParam)
if err != nil {
return nil, err
}
res = &v1.SysGenTableTableSelectRes{
Items: output,
}
return res, nil
}
func (c *ControllerV1) SysGenTableColumnSelect(ctx context.Context, req *v1.SysGenTableColumnSelectReq) (res *v1.SysGenTableColumnSelectRes, err error) {
output, err := service.SysGenTable().ColumnSelect(ctx, req.GenCodesColumnSelectParam)
if err != nil {
return nil, err
}
res = &v1.SysGenTableColumnSelectRes{
Items: output,
}
return res, nil
}
func (c *ControllerV1) SysGenTablePreview(ctx context.Context, req *v1.SysGenTablePreviewReq) (res *v1.SysGenTablePreviewRes, err error) {
output, err := service.SysGenTable().Preview(ctx, req.GenCodesPreviewParam)
if err != nil {
return nil, err
}
res = &v1.SysGenTablePreviewRes{
GenCodesPreviewModel: output,
}
return res, nil
}
func (c *ControllerV1) SysGenTableBuild(ctx context.Context, req *v1.SysGenTableBuildReq) (res *v1.SysGenTableBuildRes, err error) {
output, err := service.SysGenTable().Build(ctx, req.GenCodesBuildParam)
if err != nil {
return nil, err
}
res = &v1.SysGenTableBuildRes{
GenCodesBuildModel: output,
}
return res, nil
}
func (c *ControllerV1) SysGenTableColumnList(ctx context.Context, req *v1.SysGenTableColumnListReq) (res *v1.SysGenTableColumnListRes, err error) {
output, err := service.SysGenTable().ColumnList(ctx, req.GenCodesColumnListParam)
if err != nil {
return nil, err
}
res = &v1.SysGenTableColumnListRes{
Items: output,
}
return res, nil
}
func (c *ControllerV1) SysGenTableEdit(ctx context.Context, req *v1.SysGenTableEditReq) (res *v1.SysGenTableEditRes, err error) {
output, err := service.SysGenTable().Edit(ctx, req.SysGenTableEditParam)
if err != nil {
return nil, err
}
res = &v1.SysGenTableEditRes{
SysGenTableEditModel: output,
}
return res, nil
}

Some files were not shown because too many files have changed in this diff Show More