2ed5dfa6a1
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 在源仓同一提交上同样失败,属既有缺陷。
70 lines
2.0 KiB
Go
70 lines
2.0 KiB
Go
// 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
|
|
}
|