first commit
This commit is contained in:
commit
6773f86bc5
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# 默认忽略的文件
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# 基于编辑器的 HTTP 客户端请求
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
1
.idea/.name
Normal file
1
.idea/.name
Normal file
@ -0,0 +1 @@
|
|||||||
|
tianyuan-api
|
12
.idea/dataSources.xml
Normal file
12
.idea/dataSources.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||||
|
<data-source source="LOCAL" name="redis" uuid="3a52f4bf-9976-427c-a324-6dbdf1b04e92">
|
||||||
|
<driver-ref>redis</driver-ref>
|
||||||
|
<synchronize>true</synchronize>
|
||||||
|
<jdbc-driver>jdbc.RedisDriver</jdbc-driver>
|
||||||
|
<jdbc-url>jdbc:redis://localhost:6379/0</jdbc-url>
|
||||||
|
<working-dir>$ProjectFileDir$</working-dir>
|
||||||
|
</data-source>
|
||||||
|
</component>
|
||||||
|
</project>
|
7
.idea/inspectionProfiles/Project_Default.xml
Normal file
7
.idea/inspectionProfiles/Project_Default.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="SqlDialectInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/tianyuan-api.iml" filepath="$PROJECT_DIR$/.idea/tianyuan-api.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/sqldialects.xml
Normal file
6
.idea/sqldialects.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="SqlDialectMappings">
|
||||||
|
<file url="file://$PROJECT_DIR$/apps/user/user.sql" dialect="MySQL" />
|
||||||
|
</component>
|
||||||
|
</project>
|
9
.idea/tianyuan-api.iml
Normal file
9
.idea/tianyuan-api.iml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="Go" enabled="true" />
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
78
aes.go
Normal file
78
aes.go
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"crypto/aes"
|
||||||
|
"crypto/cipher"
|
||||||
|
"crypto/rand"
|
||||||
|
"encoding/base64"
|
||||||
|
"encoding/hex"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PKCS7填充
|
||||||
|
func PKCS7Padding(ciphertext []byte, blockSize int) []byte {
|
||||||
|
padding := blockSize - len(ciphertext)%blockSize
|
||||||
|
padtext := bytes.Repeat([]byte{byte(padding)}, padding)
|
||||||
|
return append(ciphertext, padtext...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// AES CBC模式加密,Base64传入传出
|
||||||
|
func AesEncrypt(plainText, key []byte) (string, error) {
|
||||||
|
block, err := aes.NewCipher(key)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
blockSize := block.BlockSize()
|
||||||
|
plainText = PKCS7Padding(plainText, blockSize)
|
||||||
|
|
||||||
|
cipherText := make([]byte, blockSize+len(plainText))
|
||||||
|
iv := cipherText[:blockSize] // 使用前blockSize字节作为IV
|
||||||
|
_, err = io.ReadFull(rand.Reader, iv)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
mode := cipher.NewCBCEncrypter(block, iv)
|
||||||
|
mode.CryptBlocks(cipherText[blockSize:], plainText)
|
||||||
|
|
||||||
|
return base64.StdEncoding.EncodeToString(cipherText), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type Data struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Email string `json:"email"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
// 定义 AES 密钥
|
||||||
|
key, _ := hex.DecodeString("c58e5aa2f91ddd5e0947ffc119b029c4")
|
||||||
|
|
||||||
|
var data interface{}
|
||||||
|
|
||||||
|
data = map[string]interface{}{
|
||||||
|
"id_card": "45212220000827423X",
|
||||||
|
"mobile_no": "18276151590",
|
||||||
|
"name": "张荣宏",
|
||||||
|
"time_range": "5",
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将结构体转为 JSON 字符串
|
||||||
|
jsonData, err := json.Marshal(data)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("JSON 序列化错误:", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 对 JSON 数据进行加密
|
||||||
|
encryptedData, err := AesEncrypt(jsonData, key)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("加密错误:", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 输出加密后的结果
|
||||||
|
fmt.Println("加密后的数据:", encryptedData)
|
||||||
|
}
|
250
api.json
Normal file
250
api.json
Normal file
@ -0,0 +1,250 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"serviceId": "IVYZ0B03",
|
||||||
|
"sourceId": "G07-XM01",
|
||||||
|
"serviceName": "实名信息对比技术服务(两项)",
|
||||||
|
"dataDescription": "核验二要素是否一致",
|
||||||
|
"group_cn": "身份验证",
|
||||||
|
"group": "IVYZ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "IVYZ5733",
|
||||||
|
"sourceId": "G09-GX01",
|
||||||
|
"serviceName": "单人婚姻登记信息核验",
|
||||||
|
"dataDescription": "核验单人婚姻当前状态",
|
||||||
|
"group_cn": "身份验证",
|
||||||
|
"group": "IVYZ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "FLXGCA3D",
|
||||||
|
"sourceId": "G22-BJ03",
|
||||||
|
"serviceName": "个人综合涉诉",
|
||||||
|
"dataDescription": "查询个人涉诉信息",
|
||||||
|
"group_cn": "法律相关",
|
||||||
|
"group": "FLXG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "FLXG970F",
|
||||||
|
"sourceId": "G01-BJ01",
|
||||||
|
"serviceName": "风险人员核验",
|
||||||
|
"dataDescription": "包含所查人员涉稳、涉恐、肇事、闹事等风险等级",
|
||||||
|
"group_cn": "法律相关",
|
||||||
|
"group": "FLXG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "FLXG75FE",
|
||||||
|
"sourceId": "G04-HZ01",
|
||||||
|
"serviceName": "涉网风险",
|
||||||
|
"dataDescription": "全国公安部门的网络犯罪调查服务",
|
||||||
|
"group_cn": "法律相关",
|
||||||
|
"group": "FLXG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "QYGLB4C0",
|
||||||
|
"sourceId": "G05-HZ01",
|
||||||
|
"serviceName": "股东人企关系精准版",
|
||||||
|
"dataDescription": "返回与个人关联的法人-股东-高管-失信被执行-被行政处罚信息",
|
||||||
|
"group_cn": "企业相关",
|
||||||
|
"group": "QYGL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "QYGL8261",
|
||||||
|
"sourceId": "Q03-BI03",
|
||||||
|
"serviceName": "企业综合涉诉",
|
||||||
|
"dataDescription": "查询企业涉诉信息",
|
||||||
|
"group_cn": "企业相关",
|
||||||
|
"group": "QYGL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "FLXGDEC7",
|
||||||
|
"sourceId": "G23-BJ03",
|
||||||
|
"serviceName": "个人不良",
|
||||||
|
"dataDescription": "核验个人是否有涉毒、在逃等记录",
|
||||||
|
"group_cn": "法律相关",
|
||||||
|
"group": "FLXG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "FLXG5876",
|
||||||
|
"sourceId": "G03-XM02",
|
||||||
|
"serviceName": "易诉人",
|
||||||
|
"dataDescription": "核验是否为易诉人群",
|
||||||
|
"group_cn": "法律相关",
|
||||||
|
"group": "FLXG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "IVYZ9363",
|
||||||
|
"sourceId": "G10-GX01",
|
||||||
|
"serviceName": "双人婚姻状态识别",
|
||||||
|
"dataDescription": "核验双人婚姻关系",
|
||||||
|
"group_cn": "身份验证",
|
||||||
|
"group": "IVYZ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "IVYZ385E",
|
||||||
|
"sourceId": "G08-SC01",
|
||||||
|
"serviceName": "自然人生存状态标识",
|
||||||
|
"dataDescription": "核验自然人生存状态",
|
||||||
|
"group_cn": "身份验证",
|
||||||
|
"group": "IVYZ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "FLXG54F5",
|
||||||
|
"sourceId": "G03-HZ01",
|
||||||
|
"serviceName": "易诉人群识别",
|
||||||
|
"dataDescription": "识别用户是否为易诉人群",
|
||||||
|
"group_cn": "法律相关",
|
||||||
|
"group": "FLXG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "IVYZ2125",
|
||||||
|
"sourceId": "ZJ01-JS01",
|
||||||
|
"serviceName": "活体+人像核验组件",
|
||||||
|
"dataDescription": "集成活体+人像核验功能",
|
||||||
|
"group_cn": "身份验证",
|
||||||
|
"group": "IVYZ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "IVYZADEE",
|
||||||
|
"sourceId": "G06-JS01",
|
||||||
|
"serviceName": "身份证三要素比对",
|
||||||
|
"dataDescription": "人像核验功能",
|
||||||
|
"group_cn": "身份验证",
|
||||||
|
"group": "IVYZ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "QYGL45BD",
|
||||||
|
"sourceId": "Q01-JS01",
|
||||||
|
"serviceName": "企业法人四要素核验",
|
||||||
|
"dataDescription": "验证信用代码、企业名称、法人姓名和法人id是否一致",
|
||||||
|
"group_cn": "企业相关",
|
||||||
|
"group": "QYGL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "QYGL2ACD",
|
||||||
|
"sourceId": "Q02-JS01",
|
||||||
|
"serviceName": "企业三要素核验",
|
||||||
|
"dataDescription": "验证信用代码、企业名称和法人姓名是否一致",
|
||||||
|
"group_cn": "企业相关",
|
||||||
|
"group": "QYGL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "YYSY6F2E",
|
||||||
|
"sourceId": "G15-BJ02",
|
||||||
|
"serviceName": "运营商三要素核验(详版)",
|
||||||
|
"dataDescription": "核验三要素是否一致",
|
||||||
|
"group_cn": "运营商验证",
|
||||||
|
"group": "YYSY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "YYSY09CD",
|
||||||
|
"sourceId": "G16-BJ02",
|
||||||
|
"serviceName": "运营商三要素验证(简版)",
|
||||||
|
"dataDescription": "核验三要素是否一致",
|
||||||
|
"group_cn": "运营商验证",
|
||||||
|
"group": "YYSY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "YYSYBE08",
|
||||||
|
"sourceId": "G17-BJ02",
|
||||||
|
"serviceName": "运营商二要素核验(手机号、姓名)",
|
||||||
|
"dataDescription": "核验用户提交的二要素信息与运营商登记的是否一致",
|
||||||
|
"group_cn": "运营商验证",
|
||||||
|
"group": "YYSY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "YYSYD50F",
|
||||||
|
"sourceId": "G18-BJ02",
|
||||||
|
"serviceName": "运营商二要素核验(手机号、身份证)",
|
||||||
|
"dataDescription": "核验用户提交的二要素信息与运营商登记的是否一致",
|
||||||
|
"group_cn": "运营商验证",
|
||||||
|
"group": "YYSY"
|
||||||
|
},
|
||||||
|
{1111111111111111
|
||||||
|
"serviceId": "YYSYF7DB",
|
||||||
|
"sourceId": "G19-BJ02",
|
||||||
|
"serviceName": "手机二次卡",
|
||||||
|
"dataDescription": "可检测用户号码更换状态",
|
||||||
|
"group_cn": "运营商验证",
|
||||||
|
"group": "YYSY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "JRZQDCBE",
|
||||||
|
"sourceId": "G20-GZ01",
|
||||||
|
"serviceName": "银行卡四要素验证",
|
||||||
|
"dataDescription": "核验姓名、身份证号、银行卡号、手机号是否匹配",
|
||||||
|
"group_cn": "金融验证",
|
||||||
|
"group": "JRZQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "YYSY4B37",
|
||||||
|
"sourceId": "G02-BJ02",
|
||||||
|
"serviceName": "手机在网时长",
|
||||||
|
"dataDescription": "查询手机号使用的时间",
|
||||||
|
"group_cn": "运营商验证",
|
||||||
|
"group": "YYSY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "QYGL6F2D",
|
||||||
|
"sourceId": "G05-XM02",
|
||||||
|
"serviceName": "人企关联",
|
||||||
|
"dataDescription": "人企关联",
|
||||||
|
"group_cn": "企业相关",
|
||||||
|
"group": "QYGL"
|
||||||
|
},
|
||||||
|
{1111111111111111111111
|
||||||
|
"serviceId": "FLXG3D56",
|
||||||
|
"sourceId": "G26-BJ05",
|
||||||
|
"serviceName": "特殊名单验证",
|
||||||
|
"dataDescription": "特殊名单验证",
|
||||||
|
"group_cn": "法律相关",
|
||||||
|
"group": "FLXG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "JRZQ0A03",
|
||||||
|
"sourceId": "G27-BJ05",
|
||||||
|
"serviceName": "借贷意向验证",
|
||||||
|
"dataDescription": "借贷意向验证",
|
||||||
|
"group_cn": "金融验证",
|
||||||
|
"group": "JRZQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "JRZQ8203",
|
||||||
|
"sourceId": "G28-BJ05",
|
||||||
|
"serviceName": "借贷行为验证",
|
||||||
|
"dataDescription": "借贷行为验证",
|
||||||
|
"group_cn": "金融验证",
|
||||||
|
"group": "JRZQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "JRZQ4AA8",
|
||||||
|
"sourceId": "G29-BJ05",
|
||||||
|
"serviceName": "偿债压力指数",
|
||||||
|
"dataDescription": "偿债压力指数",
|
||||||
|
"group_cn": "金融验证",
|
||||||
|
"group": "JRZQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "FLXGC9D1",
|
||||||
|
"sourceId": "G30-BJ05",
|
||||||
|
"serviceName": "黑灰产等级",
|
||||||
|
"dataDescription": "黑灰产等级",
|
||||||
|
"group_cn": "法律相关",
|
||||||
|
"group": "FLXG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "FLXG9687",
|
||||||
|
"sourceId": "G31-BJ05",
|
||||||
|
"serviceName": "电诈风险预警-标准版",
|
||||||
|
"dataDescription": "电诈风险预警-标准版",
|
||||||
|
"group_cn": "法律相关",
|
||||||
|
"group": "FLXG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"serviceId": "FLXG162A",
|
||||||
|
"sourceId": "G32-BJ05",
|
||||||
|
"serviceName": "团伙欺诈排查(通用版)",
|
||||||
|
"dataDescription": "团伙欺诈排查(通用版)",
|
||||||
|
"group_cn": "法律相关",
|
||||||
|
"group": "FLXG"
|
||||||
|
}
|
||||||
|
]
|
31
apps/admin/Dockerfile
Normal file
31
apps/admin/Dockerfile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
FROM golang:alpine AS builder
|
||||||
|
|
||||||
|
LABEL stage=gobuilder
|
||||||
|
|
||||||
|
ENV CGO_ENABLED 0
|
||||||
|
ENV GOPROXY https://goproxy.cn,direct
|
||||||
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||||
|
|
||||||
|
RUN apk update --no-cache && apk add --no-cache tzdata
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
ADD go.mod .
|
||||||
|
ADD go.sum .
|
||||||
|
RUN go mod download
|
||||||
|
COPY . .
|
||||||
|
COPY apps/admin/etc /app/etc
|
||||||
|
RUN go build -ldflags="-s -w" -o /app/admin apps/admin/.\admin.go
|
||||||
|
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
|
||||||
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||||
|
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
|
||||||
|
ENV TZ Asia/Shanghai
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=builder /app/admin /app/admin
|
||||||
|
COPY --from=builder /app/etc /app/etc
|
||||||
|
|
||||||
|
CMD ["./admin", "-f", "etc/admin-api.yaml"]
|
154
apps/admin/admin.api
Normal file
154
apps/admin/admin.api
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
syntax = "v1"
|
||||||
|
|
||||||
|
info (
|
||||||
|
title: "Enterprise API"
|
||||||
|
desc: "API for managing enterprise reviews and authentication"
|
||||||
|
author: "Your Name"
|
||||||
|
date: "2024-09-25"
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
LoginReq {
|
||||||
|
Username string `json:"username"`
|
||||||
|
Password string `json:"password"`
|
||||||
|
}
|
||||||
|
LoginResp {}
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
GetPendingEnterpriseReq {
|
||||||
|
Page int64 `form:"page"`
|
||||||
|
PageSize int64 `form:"pageSize"`
|
||||||
|
}
|
||||||
|
GetPendingEnterpriseResp {
|
||||||
|
Total int64 `json:"total"`
|
||||||
|
List []EnterpriseItem `json:"list"`
|
||||||
|
}
|
||||||
|
ReviewEnterpriseReq {
|
||||||
|
EnterpriseID int64 `json:"enterpriseId"`
|
||||||
|
Status string `json:"status"`
|
||||||
|
Remarks string `json:"remarks"`
|
||||||
|
}
|
||||||
|
ReviewEnterpriseResp {}
|
||||||
|
)
|
||||||
|
|
||||||
|
type EnterpriseItem {
|
||||||
|
Id int64 `json:"id"` // 企业ID
|
||||||
|
EnterpriseName string `json:"enterpriseName"` // 企业名称
|
||||||
|
CreditCode string `json:"creditCode"` // 企业信用代码
|
||||||
|
LegalPerson string `json:"legalPerson"` // 法人
|
||||||
|
EnterpriseContact string `json:"enterpriseContact"` // 企业联系方式
|
||||||
|
AuthStatus string `json:"authStatus"` // 认证状态
|
||||||
|
BusinessLicense string `json:"businessLicense"`
|
||||||
|
CreatedAt string `json:"createdAt"` // 创建时间
|
||||||
|
UpdatedAt string `json:"updatedAt"` // 更新时间
|
||||||
|
}
|
||||||
|
|
||||||
|
type (
|
||||||
|
UserInfoResp {
|
||||||
|
username string `json:"username"`
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
@server (
|
||||||
|
group: auth
|
||||||
|
prefix: /api/admin/auth
|
||||||
|
)
|
||||||
|
service admin-api {
|
||||||
|
@handler login
|
||||||
|
post /login (LoginReq) returns (LoginResp)
|
||||||
|
}
|
||||||
|
|
||||||
|
@server (
|
||||||
|
group: user
|
||||||
|
prefix: /api/admin/user
|
||||||
|
middleware: AuthInterceptor
|
||||||
|
)
|
||||||
|
service admin-api {
|
||||||
|
@handler getUserInfo
|
||||||
|
get /info returns (UserInfoResp)
|
||||||
|
}
|
||||||
|
|
||||||
|
@server (
|
||||||
|
group: review
|
||||||
|
prefix: /api/admin/enterprise
|
||||||
|
middleware: AuthInterceptor
|
||||||
|
)
|
||||||
|
service admin-api {
|
||||||
|
@handler reviewEnterprise
|
||||||
|
post /review (ReviewEnterpriseReq) returns (ReviewEnterpriseResp)
|
||||||
|
|
||||||
|
@handler getPendingEnterprise
|
||||||
|
get /pending (GetPendingEnterpriseReq) returns (GetPendingEnterpriseResp)
|
||||||
|
}
|
||||||
|
|
||||||
|
type (
|
||||||
|
CreateProductReq {
|
||||||
|
ProductName string `json:"productName"`
|
||||||
|
ProductCode string `json:"productCode"`
|
||||||
|
ProductDescription string `json:"productDescription"`
|
||||||
|
ProductContent string `json:"productContent"`
|
||||||
|
ProductGroup string `json:"productGroup"`
|
||||||
|
ProductPrice float64 `json:"productPrice"`
|
||||||
|
}
|
||||||
|
UpdateProductReq {
|
||||||
|
ProductId int64 `json:"productId"`
|
||||||
|
ProductName string `json:"productName"`
|
||||||
|
ProductCode string `json:"productCode"`
|
||||||
|
ProductDescription string `json:"productDescription"`
|
||||||
|
ProductContent string `json:"productContent"`
|
||||||
|
ProductGroup string `json:"productGroup"`
|
||||||
|
ProductPrice float64 `json:"productPrice"`
|
||||||
|
}
|
||||||
|
DeleteProductReq {
|
||||||
|
ProductId int64 `json:"productId"`
|
||||||
|
}
|
||||||
|
GetProductByIdReq {
|
||||||
|
ProductId int64 `path:"productId"`
|
||||||
|
}
|
||||||
|
GetProductByIdResp {
|
||||||
|
ProductItem
|
||||||
|
}
|
||||||
|
GetProductListReq {
|
||||||
|
Page int64 `form:"page"`
|
||||||
|
PageSize int64 `form:"pageSize"`
|
||||||
|
}
|
||||||
|
GetProductListResp {
|
||||||
|
Total int64 `json:"total"`
|
||||||
|
List []ProductItem `json:"list"`
|
||||||
|
}
|
||||||
|
ProductItem {
|
||||||
|
ProductId int64 `json:"productId"`
|
||||||
|
ProductName string `json:"productName"`
|
||||||
|
ProductCode string `json:"productCode"`
|
||||||
|
ProductDescription string `json:"productDescription"`
|
||||||
|
ProductContent string `json:"productContent"`
|
||||||
|
ProductGroup string `json:"productGroup"`
|
||||||
|
ProductPrice float64 `json:"productPrice"`
|
||||||
|
CreatedAt string `json:"createdAt"`
|
||||||
|
UpdatedAt string `json:"updatedAt"`
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
@server (
|
||||||
|
group: product
|
||||||
|
prefix: /api/admin/product
|
||||||
|
middleware: AuthInterceptor
|
||||||
|
)
|
||||||
|
service admin-api {
|
||||||
|
@handler createProduct
|
||||||
|
post /create (CreateProductReq)
|
||||||
|
|
||||||
|
@handler updateProduct
|
||||||
|
post /update (UpdateProductReq)
|
||||||
|
|
||||||
|
@handler deleteProduct
|
||||||
|
post /delete (DeleteProductReq)
|
||||||
|
|
||||||
|
@handler getProductById
|
||||||
|
get /:productId (GetProductByIdReq) returns (GetProductByIdResp)
|
||||||
|
|
||||||
|
@handler getProductList
|
||||||
|
get /list (GetProductListReq) returns (GetProductListResp)
|
||||||
|
}
|
||||||
|
|
31
apps/admin/admin.go
Normal file
31
apps/admin/admin.go
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"flag"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/admin/internal/config"
|
||||||
|
"tianyuan-api/apps/admin/internal/handler"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/conf"
|
||||||
|
"github.com/zeromicro/go-zero/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
var configFile = flag.String("f", "etc/admin-api.yaml", "the config file")
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
flag.Parse()
|
||||||
|
|
||||||
|
var c config.Config
|
||||||
|
conf.MustLoad(*configFile, &c)
|
||||||
|
|
||||||
|
server := rest.MustNewServer(c.RestConf)
|
||||||
|
defer server.Stop()
|
||||||
|
|
||||||
|
ctx := svc.NewServiceContext(c)
|
||||||
|
handler.RegisterHandlers(server, ctx)
|
||||||
|
|
||||||
|
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
|
||||||
|
server.Start()
|
||||||
|
}
|
22
apps/admin/etc/admin-api.yaml
Normal file
22
apps/admin/etc/admin-api.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
Name: admin-api
|
||||||
|
Host: 0.0.0.0
|
||||||
|
Port: 10002
|
||||||
|
DataSource: "tianyuanapi:g3h98u0291j@tcp(127.0.0.1:3307)/tianyuanapi?charset=utf8mb4&parseTime=True&loc=Local"
|
||||||
|
AuthJWT:
|
||||||
|
AccessSecret: "Mf5Xph3PoyKzVpRw0Zy1+X4uR/tM7JvGMEV/5p2M/tU="
|
||||||
|
AccessExpire: 86400 # JWT过期时间
|
||||||
|
CacheRedis:
|
||||||
|
- Host: "127.0.0.1:6379"
|
||||||
|
Pass: "" # Redis 密码,如果未设置则留空
|
||||||
|
Type: "node" # 单节点模式
|
||||||
|
|
||||||
|
UserRpc:
|
||||||
|
Etcd:
|
||||||
|
Hosts:
|
||||||
|
- 127.0.0.1:2379
|
||||||
|
Key: user.rpc
|
||||||
|
SentinelRpc:
|
||||||
|
Etcd:
|
||||||
|
Hosts:
|
||||||
|
- 127.0.0.1:2379
|
||||||
|
Key: sentinel.rpc
|
22
apps/admin/internal/config/config.go
Normal file
22
apps/admin/internal/config/config.go
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||||
|
"github.com/zeromicro/go-zero/rest"
|
||||||
|
"github.com/zeromicro/go-zero/zrpc"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Config struct {
|
||||||
|
rest.RestConf
|
||||||
|
DataSource string // 数据库连接的 DSN 字符串
|
||||||
|
AuthJWT AuthConfig // JWT 鉴权相关配置
|
||||||
|
CacheRedis cache.CacheConf // 缓存配置,使用 go-zero 自带的缓存配置结构体
|
||||||
|
UserRpc zrpc.RpcClientConf
|
||||||
|
SentinelRpc zrpc.RpcClientConf
|
||||||
|
}
|
||||||
|
|
||||||
|
// AuthConfig 用于 JWT 鉴权配置
|
||||||
|
type AuthConfig struct {
|
||||||
|
AccessSecret string // JWT 密钥,用于签发 Token
|
||||||
|
AccessExpire int64 // Token 过期时间,单位为秒
|
||||||
|
}
|
40
apps/admin/internal/handler/auth/loginhandler.go
Normal file
40
apps/admin/internal/handler/auth/loginhandler.go
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package auth
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/admin/internal/logic/auth"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func LoginHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.LoginReq
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := auth.NewLoginLogic(r.Context(), svcCtx)
|
||||||
|
token, err := l.Login(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
http.SetCookie(w, &http.Cookie{
|
||||||
|
Name: "Authorization",
|
||||||
|
Value: token, // JWT 令牌
|
||||||
|
HttpOnly: true, // 防止 JavaScript 访问
|
||||||
|
Secure: false, // HTTPS 使用
|
||||||
|
SameSite: http.SameSiteLaxMode, // 防止 CSRF 攻击
|
||||||
|
Path: "/",
|
||||||
|
Expires: time.Now().Add(time.Duration(svcCtx.Config.AuthJWT.AccessExpire) * time.Second), // 过期时间
|
||||||
|
})
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/admin/internal/handler/product/createproducthandler.go
Normal file
30
apps/admin/internal/handler/product/createproducthandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package product
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/admin/internal/logic/product"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func CreateProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.CreateProductReq
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := product.NewCreateProductLogic(r.Context(), svcCtx)
|
||||||
|
err := l.CreateProduct(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/admin/internal/handler/product/deleteproducthandler.go
Normal file
30
apps/admin/internal/handler/product/deleteproducthandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package product
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/admin/internal/logic/product"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func DeleteProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.DeleteProductReq
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := product.NewDeleteProductLogic(r.Context(), svcCtx)
|
||||||
|
err := l.DeleteProduct(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/admin/internal/handler/product/getproductbyidhandler.go
Normal file
30
apps/admin/internal/handler/product/getproductbyidhandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package product
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/admin/internal/logic/product"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GetProductByIdHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.GetProductByIdReq
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := product.NewGetProductByIdLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.GetProductById(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/admin/internal/handler/product/getproductlisthandler.go
Normal file
30
apps/admin/internal/handler/product/getproductlisthandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package product
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/admin/internal/logic/product"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.GetProductListReq
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := product.NewGetProductListLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.GetProductList(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/admin/internal/handler/product/updateproducthandler.go
Normal file
30
apps/admin/internal/handler/product/updateproducthandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package product
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/admin/internal/logic/product"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func UpdateProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.UpdateProductReq
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := product.NewUpdateProductLogic(r.Context(), svcCtx)
|
||||||
|
err := l.UpdateProduct(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package review
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/admin/internal/logic/review"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GetPendingEnterpriseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.GetPendingEnterpriseReq
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := review.NewGetPendingEnterpriseLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.GetPendingEnterprise(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package review
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/admin/internal/logic/review"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func ReviewEnterpriseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.ReviewEnterpriseReq
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := review.NewReviewEnterpriseLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.ReviewEnterprise(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
96
apps/admin/internal/handler/routes.go
Normal file
96
apps/admin/internal/handler/routes.go
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
// Code generated by goctl. DO NOT EDIT.
|
||||||
|
// goctl 1.7.2
|
||||||
|
|
||||||
|
package handler
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
auth "tianyuan-api/apps/admin/internal/handler/auth"
|
||||||
|
product "tianyuan-api/apps/admin/internal/handler/product"
|
||||||
|
review "tianyuan-api/apps/admin/internal/handler/review"
|
||||||
|
user "tianyuan-api/apps/admin/internal/handler/user"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||||
|
server.AddRoutes(
|
||||||
|
[]rest.Route{
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/login",
|
||||||
|
Handler: auth.LoginHandler(serverCtx),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rest.WithPrefix("/api/admin/auth"),
|
||||||
|
)
|
||||||
|
|
||||||
|
server.AddRoutes(
|
||||||
|
rest.WithMiddlewares(
|
||||||
|
[]rest.Middleware{serverCtx.AuthInterceptor},
|
||||||
|
[]rest.Route{
|
||||||
|
{
|
||||||
|
Method: http.MethodGet,
|
||||||
|
Path: "/:productId",
|
||||||
|
Handler: product.GetProductByIdHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/create",
|
||||||
|
Handler: product.CreateProductHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/delete",
|
||||||
|
Handler: product.DeleteProductHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodGet,
|
||||||
|
Path: "/list",
|
||||||
|
Handler: product.GetProductListHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/update",
|
||||||
|
Handler: product.UpdateProductHandler(serverCtx),
|
||||||
|
},
|
||||||
|
}...,
|
||||||
|
),
|
||||||
|
rest.WithPrefix("/api/admin/product"),
|
||||||
|
)
|
||||||
|
|
||||||
|
server.AddRoutes(
|
||||||
|
rest.WithMiddlewares(
|
||||||
|
[]rest.Middleware{serverCtx.AuthInterceptor},
|
||||||
|
[]rest.Route{
|
||||||
|
{
|
||||||
|
Method: http.MethodGet,
|
||||||
|
Path: "/pending",
|
||||||
|
Handler: review.GetPendingEnterpriseHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/review",
|
||||||
|
Handler: review.ReviewEnterpriseHandler(serverCtx),
|
||||||
|
},
|
||||||
|
}...,
|
||||||
|
),
|
||||||
|
rest.WithPrefix("/api/admin/enterprise"),
|
||||||
|
)
|
||||||
|
|
||||||
|
server.AddRoutes(
|
||||||
|
rest.WithMiddlewares(
|
||||||
|
[]rest.Middleware{serverCtx.AuthInterceptor},
|
||||||
|
[]rest.Route{
|
||||||
|
{
|
||||||
|
Method: http.MethodGet,
|
||||||
|
Path: "/info",
|
||||||
|
Handler: user.GetUserInfoHandler(serverCtx),
|
||||||
|
},
|
||||||
|
}...,
|
||||||
|
),
|
||||||
|
rest.WithPrefix("/api/admin/user"),
|
||||||
|
)
|
||||||
|
}
|
21
apps/admin/internal/handler/user/getuserinfohandler.go
Normal file
21
apps/admin/internal/handler/user/getuserinfohandler.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
"tianyuan-api/apps/admin/internal/logic/user"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GetUserInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
l := user.NewGetUserInfoLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.GetUserInfo()
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
45
apps/admin/internal/logic/auth/loginlogic.go
Normal file
45
apps/admin/internal/logic/auth/loginlogic.go
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
package auth
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
jwtx "tianyuan-api/pkg/jwt"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type LoginLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *LoginLogic {
|
||||||
|
return &LoginLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *LoginLogic) Login(req *types.LoginReq) (token string, err error) {
|
||||||
|
if req.Username == "" || req.Password == "" {
|
||||||
|
return "", errors.New("用户名或密码不能为空")
|
||||||
|
}
|
||||||
|
|
||||||
|
if req.Username != "SkyWalker_8273" && req.Password != "mD$9tPzQ&1kB2z%L" {
|
||||||
|
return "", errors.New("密码错误")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生成 JWT token,调用封装好的函数
|
||||||
|
token, err = jwtx.GenerateJwtToken(1, l.svcCtx.Config.AuthJWT.AccessSecret, l.svcCtx.Config.AuthJWT.AccessExpire)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回成功的登录响应
|
||||||
|
return token, nil
|
||||||
|
}
|
40
apps/admin/internal/logic/product/createproductlogic.go
Normal file
40
apps/admin/internal/logic/product/createproductlogic.go
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package product
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
"tianyuan-api/apps/sentinel/client/product"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type CreateProductLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewCreateProductLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateProductLogic {
|
||||||
|
return &CreateProductLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *CreateProductLogic) CreateProduct(req *types.CreateProductReq) error {
|
||||||
|
_, err := l.svcCtx.ProductRpc.CreateProduct(l.ctx, &product.CreateProductRequest{
|
||||||
|
ProductName: req.ProductName,
|
||||||
|
ProductCode: req.ProductCode,
|
||||||
|
ProductDescription: req.ProductDescription,
|
||||||
|
ProductContent: req.ProductContent,
|
||||||
|
ProductPrice: req.ProductPrice,
|
||||||
|
ProductGroup: req.ProductGroup,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
36
apps/admin/internal/logic/product/deleteproductlogic.go
Normal file
36
apps/admin/internal/logic/product/deleteproductlogic.go
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
package product
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"tianyuan-api/apps/sentinel/client/product"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type DeleteProductLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewDeleteProductLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteProductLogic {
|
||||||
|
return &DeleteProductLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *DeleteProductLogic) DeleteProduct(req *types.DeleteProductReq) error {
|
||||||
|
_, err := l.svcCtx.ProductRpc.DeleteProduct(l.ctx, &product.DeleteProductRequest{
|
||||||
|
Id: req.ProductId,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
46
apps/admin/internal/logic/product/getproductbyidlogic.go
Normal file
46
apps/admin/internal/logic/product/getproductbyidlogic.go
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
package product
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"tianyuan-api/apps/sentinel/client/product"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetProductByIdLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGetProductByIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetProductByIdLogic {
|
||||||
|
return &GetProductByIdLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *GetProductByIdLogic) GetProductById(req *types.GetProductByIdReq) (resp *types.GetProductByIdResp, err error) {
|
||||||
|
productResp, err := l.svcCtx.ProductRpc.GetProductById(l.ctx, &product.GetRecordByIdRequest{
|
||||||
|
Id: req.ProductId,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &types.GetProductByIdResp{
|
||||||
|
ProductItem: types.ProductItem{
|
||||||
|
ProductId: productResp.Id,
|
||||||
|
ProductName: productResp.ProductName,
|
||||||
|
ProductCode: productResp.ProductCode,
|
||||||
|
ProductDescription: productResp.ProductDescription,
|
||||||
|
ProductContent: productResp.ProductContent,
|
||||||
|
ProductPrice: productResp.ProductPrice,
|
||||||
|
ProductGroup: productResp.ProductGroup,
|
||||||
|
},
|
||||||
|
}, nil
|
||||||
|
}
|
50
apps/admin/internal/logic/product/getproductlistlogic.go
Normal file
50
apps/admin/internal/logic/product/getproductlistlogic.go
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package product
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
"tianyuan-api/apps/sentinel/client/product"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetProductListLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGetProductListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetProductListLogic {
|
||||||
|
return &GetProductListLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *GetProductListLogic) GetProductList(req *types.GetProductListReq) (resp *types.GetProductListResp, err error) {
|
||||||
|
productList, err := l.svcCtx.ProductRpc.GetProductPageList(l.ctx, &product.PageListRequest{Page: req.Page, PageSize: req.PageSize})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
var list []types.ProductItem
|
||||||
|
|
||||||
|
for _, p := range productList.Products {
|
||||||
|
list = append(list, types.ProductItem{
|
||||||
|
ProductId: p.Id,
|
||||||
|
ProductName: p.ProductName,
|
||||||
|
ProductCode: p.ProductCode,
|
||||||
|
ProductDescription: p.ProductDescription,
|
||||||
|
ProductPrice: p.ProductPrice,
|
||||||
|
ProductGroup: p.ProductGroup,
|
||||||
|
CreatedAt: p.CreatedAt,
|
||||||
|
UpdatedAt: p.UpdatedAt,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
resp = &types.GetProductListResp{
|
||||||
|
Total: productList.Total,
|
||||||
|
List: list,
|
||||||
|
}
|
||||||
|
return resp, nil
|
||||||
|
}
|
42
apps/admin/internal/logic/product/updateproductlogic.go
Normal file
42
apps/admin/internal/logic/product/updateproductlogic.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package product
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"tianyuan-api/apps/sentinel/client/product"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UpdateProductLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewUpdateProductLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateProductLogic {
|
||||||
|
return &UpdateProductLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *UpdateProductLogic) UpdateProduct(req *types.UpdateProductReq) error {
|
||||||
|
_, err := l.svcCtx.ProductRpc.UpdateProduct(l.ctx, &product.UpdateProductRequest{
|
||||||
|
Id: req.ProductId,
|
||||||
|
ProductName: req.ProductName,
|
||||||
|
ProductCode: req.ProductCode,
|
||||||
|
ProductDescription: req.ProductDescription,
|
||||||
|
ProductContent: req.ProductContent,
|
||||||
|
ProductPrice: req.ProductPrice,
|
||||||
|
ProductGroup: req.ProductGroup,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package review
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"tianyuan-api/apps/user/client/enterprise"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetPendingEnterpriseLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGetPendingEnterpriseLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetPendingEnterpriseLogic {
|
||||||
|
return &GetPendingEnterpriseLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *GetPendingEnterpriseLogic) GetPendingEnterprise(req *types.GetPendingEnterpriseReq) (resp *types.GetPendingEnterpriseResp, err error) {
|
||||||
|
pendingEnterpriseList, err := l.svcCtx.EntRpc.GetPendingEnterprise(l.ctx, &enterprise.GetPendingEnterpriseReq{Page: req.Page, PageSize: req.PageSize})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
var list []types.EnterpriseItem
|
||||||
|
|
||||||
|
for _, ent := range pendingEnterpriseList.List {
|
||||||
|
list = append(list, types.EnterpriseItem{
|
||||||
|
Id: ent.Id,
|
||||||
|
EnterpriseName: ent.EnterpriseName,
|
||||||
|
EnterpriseContact: ent.EnterpriseContact,
|
||||||
|
CreditCode: ent.CreditCode,
|
||||||
|
LegalPerson: ent.LegalPerson,
|
||||||
|
AuthStatus: ent.AuthStatus,
|
||||||
|
BusinessLicense: ent.BusinessLicense,
|
||||||
|
UpdatedAt: ent.UpdatedAt,
|
||||||
|
CreatedAt: ent.CreatedAt,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
resp = &types.GetPendingEnterpriseResp{
|
||||||
|
Total: pendingEnterpriseList.Total,
|
||||||
|
List: list,
|
||||||
|
}
|
||||||
|
return resp, nil
|
||||||
|
}
|
37
apps/admin/internal/logic/review/reviewenterpriselogic.go
Normal file
37
apps/admin/internal/logic/review/reviewenterpriselogic.go
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
package review
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
"tianyuan-api/apps/user/client/enterprise"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ReviewEnterpriseLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewReviewEnterpriseLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ReviewEnterpriseLogic {
|
||||||
|
return &ReviewEnterpriseLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *ReviewEnterpriseLogic) ReviewEnterprise(req *types.ReviewEnterpriseReq) (resp *types.ReviewEnterpriseResp, err error) {
|
||||||
|
|
||||||
|
_, err = l.svcCtx.EntRpc.ReviewEnterprise(l.ctx, &enterprise.ReviewEnterpriseReq{
|
||||||
|
EnterpriseId: req.EnterpriseID,
|
||||||
|
Status: req.Status,
|
||||||
|
Remarks: req.Remarks,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &types.ReviewEnterpriseResp{}, nil
|
||||||
|
}
|
30
apps/admin/internal/logic/user/getuserinfologic.go
Normal file
30
apps/admin/internal/logic/user/getuserinfologic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/admin/internal/svc"
|
||||||
|
"tianyuan-api/apps/admin/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetUserInfoLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGetUserInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserInfoLogic {
|
||||||
|
return &GetUserInfoLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *GetUserInfoLogic) GetUserInfo() (resp *types.UserInfoResp, err error) {
|
||||||
|
return &types.UserInfoResp{
|
||||||
|
Username: "admin",
|
||||||
|
}, nil
|
||||||
|
}
|
54
apps/admin/internal/middleware/authinterceptormiddleware.go
Normal file
54
apps/admin/internal/middleware/authinterceptormiddleware.go
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
package middleware
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
"tianyuan-api/apps/admin/internal/config"
|
||||||
|
jwtx "tianyuan-api/pkg/jwt"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AuthInterceptorMiddleware struct {
|
||||||
|
Config config.Config
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewAuthInterceptorMiddleware(c config.Config) *AuthInterceptorMiddleware {
|
||||||
|
return &AuthInterceptorMiddleware{
|
||||||
|
Config: c,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *AuthInterceptorMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
// 从 Cookie 中获取 JWT
|
||||||
|
cookie, err := r.Cookie("Authorization")
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, errors.New("用户未登录"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
tokenStr := cookie.Value
|
||||||
|
// 验证并解析 JWT
|
||||||
|
userId, err := jwtx.ParseJwtToken(tokenStr, m.Config.AuthJWT.AccessSecret)
|
||||||
|
if err != nil {
|
||||||
|
// 设置过期的 Cookie 来删除无效的 Token
|
||||||
|
http.SetCookie(w, &http.Cookie{
|
||||||
|
Name: "Authorization",
|
||||||
|
Value: "",
|
||||||
|
Path: "/",
|
||||||
|
HttpOnly: true,
|
||||||
|
Expires: time.Unix(0, 0), // 过期时间设置为过去
|
||||||
|
})
|
||||||
|
logx.Error("Invalid JWT: ", err)
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, errors.New("未经授权的访问"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将 userId 存入 context,供后续逻辑使用
|
||||||
|
ctx := context.WithValue(r.Context(), "userId", userId)
|
||||||
|
next(w, r.WithContext(ctx))
|
||||||
|
}
|
||||||
|
}
|
28
apps/admin/internal/svc/servicecontext.go
Normal file
28
apps/admin/internal/svc/servicecontext.go
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package svc
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zeromicro/go-zero/rest"
|
||||||
|
"github.com/zeromicro/go-zero/zrpc"
|
||||||
|
"tianyuan-api/apps/admin/internal/config"
|
||||||
|
"tianyuan-api/apps/admin/internal/middleware"
|
||||||
|
"tianyuan-api/apps/sentinel/sentinel"
|
||||||
|
"tianyuan-api/apps/user/user"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ServiceContext struct {
|
||||||
|
Config config.Config
|
||||||
|
AuthInterceptor rest.Middleware
|
||||||
|
EntRpc user.EnterpriseClient
|
||||||
|
UserRpc user.UserClient
|
||||||
|
ProductRpc sentinel.ProductClient
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewServiceContext(c config.Config) *ServiceContext {
|
||||||
|
return &ServiceContext{
|
||||||
|
Config: c,
|
||||||
|
AuthInterceptor: middleware.NewAuthInterceptorMiddleware(c).Handle,
|
||||||
|
EntRpc: user.NewEnterpriseClient(zrpc.MustNewClient(c.UserRpc).Conn()),
|
||||||
|
UserRpc: user.NewUserClient(zrpc.MustNewClient(c.UserRpc).Conn()),
|
||||||
|
ProductRpc: sentinel.NewProductClient(zrpc.MustNewClient(c.SentinelRpc).Conn()),
|
||||||
|
}
|
||||||
|
}
|
100
apps/admin/internal/types/types.go
Normal file
100
apps/admin/internal/types/types.go
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
// Code generated by goctl. DO NOT EDIT.
|
||||||
|
// goctl 1.7.2
|
||||||
|
|
||||||
|
package types
|
||||||
|
|
||||||
|
type CreateProductReq struct {
|
||||||
|
ProductName string `json:"productName"`
|
||||||
|
ProductCode string `json:"productCode"`
|
||||||
|
ProductDescription string `json:"productDescription"`
|
||||||
|
ProductContent string `json:"productContent"`
|
||||||
|
ProductGroup string `json:"productGroup"`
|
||||||
|
ProductPrice float64 `json:"productPrice"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type DeleteProductReq struct {
|
||||||
|
ProductId int64 `json:"productId"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type EnterpriseItem struct {
|
||||||
|
Id int64 `json:"id"` // 企业ID
|
||||||
|
EnterpriseName string `json:"enterpriseName"` // 企业名称
|
||||||
|
CreditCode string `json:"creditCode"` // 企业信用代码
|
||||||
|
LegalPerson string `json:"legalPerson"` // 法人
|
||||||
|
EnterpriseContact string `json:"enterpriseContact"` // 企业联系方式
|
||||||
|
AuthStatus string `json:"authStatus"` // 认证状态
|
||||||
|
BusinessLicense string `json:"businessLicense"`
|
||||||
|
CreatedAt string `json:"createdAt"` // 创建时间
|
||||||
|
UpdatedAt string `json:"updatedAt"` // 更新时间
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetPendingEnterpriseReq struct {
|
||||||
|
Page int64 `form:"page"`
|
||||||
|
PageSize int64 `form:"pageSize"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetPendingEnterpriseResp struct {
|
||||||
|
Total int64 `json:"total"`
|
||||||
|
List []EnterpriseItem `json:"list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetProductByIdReq struct {
|
||||||
|
ProductId int64 `path:"productId"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetProductByIdResp struct {
|
||||||
|
ProductItem
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetProductListReq struct {
|
||||||
|
Page int64 `form:"page"`
|
||||||
|
PageSize int64 `form:"pageSize"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetProductListResp struct {
|
||||||
|
Total int64 `json:"total"`
|
||||||
|
List []ProductItem `json:"list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoginReq struct {
|
||||||
|
Username string `json:"username"`
|
||||||
|
Password string `json:"password"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoginResp struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProductItem struct {
|
||||||
|
ProductId int64 `json:"productId"`
|
||||||
|
ProductName string `json:"productName"`
|
||||||
|
ProductCode string `json:"productCode"`
|
||||||
|
ProductDescription string `json:"productDescription"`
|
||||||
|
ProductContent string `json:"productContent"`
|
||||||
|
ProductGroup string `json:"productGroup"`
|
||||||
|
ProductPrice float64 `json:"productPrice"`
|
||||||
|
CreatedAt string `json:"createdAt"`
|
||||||
|
UpdatedAt string `json:"updatedAt"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReviewEnterpriseReq struct {
|
||||||
|
EnterpriseID int64 `json:"enterpriseId"`
|
||||||
|
Status string `json:"status"`
|
||||||
|
Remarks string `json:"remarks"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReviewEnterpriseResp struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateProductReq struct {
|
||||||
|
ProductId int64 `json:"productId"`
|
||||||
|
ProductName string `json:"productName"`
|
||||||
|
ProductCode string `json:"productCode"`
|
||||||
|
ProductDescription string `json:"productDescription"`
|
||||||
|
ProductContent string `json:"productContent"`
|
||||||
|
ProductGroup string `json:"productGroup"`
|
||||||
|
ProductPrice float64 `json:"productPrice"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UserInfoResp struct {
|
||||||
|
Username string `json:"username"`
|
||||||
|
}
|
31
apps/api/Dockerfile
Normal file
31
apps/api/Dockerfile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
FROM golang:alpine AS builder
|
||||||
|
|
||||||
|
LABEL stage=gobuilder
|
||||||
|
|
||||||
|
ENV CGO_ENABLED 0
|
||||||
|
ENV GOPROXY https://goproxy.cn,direct
|
||||||
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||||
|
|
||||||
|
RUN apk update --no-cache && apk add --no-cache tzdata
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
ADD go.mod .
|
||||||
|
ADD go.sum .
|
||||||
|
RUN go mod download
|
||||||
|
COPY . .
|
||||||
|
COPY apps/api/etc /app/etc
|
||||||
|
RUN go build -ldflags="-s -w" -o /app/api apps/api/api.go
|
||||||
|
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
|
||||||
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||||
|
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
|
||||||
|
ENV TZ Asia/Shanghai
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=builder /app/api /app/api
|
||||||
|
COPY --from=builder /app/etc /app/etc
|
||||||
|
|
||||||
|
CMD ["./api", "-f", "etc/api-api.yaml"]
|
154
apps/api/api.api
Normal file
154
apps/api/api.api
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
syntax = "v1"
|
||||||
|
|
||||||
|
info (
|
||||||
|
title: "User Management API"
|
||||||
|
desc: "This API is designed for managing user information and authentication."
|
||||||
|
author: "Liang Zai"
|
||||||
|
version: "v1.0.0"
|
||||||
|
)
|
||||||
|
|
||||||
|
type request {
|
||||||
|
data string `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type response {
|
||||||
|
data string `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
@server (
|
||||||
|
group: IVYZ
|
||||||
|
prefix: /api/v1
|
||||||
|
middleware: ApiAuthInterceptor
|
||||||
|
)
|
||||||
|
service api-api {
|
||||||
|
@handler IVYZ0B03
|
||||||
|
post /IVYZ0B03 (request) returns (response)
|
||||||
|
|
||||||
|
@handler IVYZ5733
|
||||||
|
post /IVYZ5733 (request) returns (response)
|
||||||
|
|
||||||
|
@handler IVYZ9363
|
||||||
|
post /IVYZ9363 (request) returns (response)
|
||||||
|
|
||||||
|
@handler IVYZ385E
|
||||||
|
post /IVYZ385E (request) returns (response)
|
||||||
|
|
||||||
|
@handler IVYZ2125
|
||||||
|
post /IVYZ2125 (request) returns (response)
|
||||||
|
|
||||||
|
@handler IVYZADEE
|
||||||
|
post /IVYZADEE (request) returns (response)
|
||||||
|
}
|
||||||
|
|
||||||
|
@server (
|
||||||
|
group: FLXG
|
||||||
|
prefix: /api/v1
|
||||||
|
middleware: ApiAuthInterceptor
|
||||||
|
)
|
||||||
|
service api-api {
|
||||||
|
@handler FLXGCA3D
|
||||||
|
post /FLXGCA3D (request) returns (response)
|
||||||
|
|
||||||
|
@handler FLXG970F
|
||||||
|
post /FLXG970F (request) returns (response)
|
||||||
|
|
||||||
|
@handler FLXG75FE
|
||||||
|
post /FLXG75FE (request) returns (response)
|
||||||
|
|
||||||
|
@handler FLXGDEC7
|
||||||
|
post /FLXGDEC7 (request) returns (response)
|
||||||
|
|
||||||
|
@handler FLXG5876
|
||||||
|
post /FLXG5876 (request) returns (response)
|
||||||
|
|
||||||
|
@handler FLXG54F5
|
||||||
|
post /FLXG54F5 (request) returns (response)
|
||||||
|
|
||||||
|
@handler FLXGC9D1
|
||||||
|
post /FLXGC9D1 (request) returns (response)
|
||||||
|
|
||||||
|
@handler FLXG9687
|
||||||
|
post /FLXG9687 (request) returns (response)
|
||||||
|
|
||||||
|
@handler FLXG162A
|
||||||
|
post /FLXG162A (request) returns (response)
|
||||||
|
|
||||||
|
@handler FLXG3D56
|
||||||
|
post /FLXG3D56 (request) returns (response)
|
||||||
|
}
|
||||||
|
|
||||||
|
@server (
|
||||||
|
group: QYGL
|
||||||
|
prefix: /api/v1
|
||||||
|
middleware: ApiAuthInterceptor
|
||||||
|
)
|
||||||
|
service api-api {
|
||||||
|
@handler QYGLB4C0
|
||||||
|
post /QYGLB4C0 (request) returns (response)
|
||||||
|
|
||||||
|
@handler QYGL8261
|
||||||
|
post /QYGL8261 (request) returns (response)
|
||||||
|
|
||||||
|
@handler QYGL45BD
|
||||||
|
post /QYGL45BD (request) returns (response)
|
||||||
|
|
||||||
|
@handler QYGL2ACD
|
||||||
|
post /QYGL2ACD (request) returns (response)
|
||||||
|
|
||||||
|
@handler QYGL6F2D
|
||||||
|
post /QYGL6F2D (request) returns (response)
|
||||||
|
|
||||||
|
@handler QYGL51BC
|
||||||
|
post /QYGL51BC (request) returns (response)
|
||||||
|
}
|
||||||
|
|
||||||
|
@server (
|
||||||
|
group: YYSY
|
||||||
|
prefix: /api/v1
|
||||||
|
middleware: ApiAuthInterceptor
|
||||||
|
)
|
||||||
|
service api-api {
|
||||||
|
@handler YYSY6F2E
|
||||||
|
post /YYSY6F2E (request) returns (response)
|
||||||
|
|
||||||
|
@handler YYSY09CD
|
||||||
|
post /YYSY09CD (request) returns (response)
|
||||||
|
|
||||||
|
@handler YYSYBE08
|
||||||
|
post /YYSYBE08 (request) returns (response)
|
||||||
|
|
||||||
|
@handler YYSYD50F
|
||||||
|
post /YYSYD50F (request) returns (response)
|
||||||
|
|
||||||
|
@handler YYSYF7DB
|
||||||
|
post /YYSYF7DB (request) returns (response)
|
||||||
|
|
||||||
|
@handler YYSY4B37
|
||||||
|
post /YYSY4B37 (request) returns (response)
|
||||||
|
}
|
||||||
|
|
||||||
|
@server (
|
||||||
|
group: JRZQ
|
||||||
|
prefix: /api/v1
|
||||||
|
middleware: ApiAuthInterceptor
|
||||||
|
)
|
||||||
|
service api-api {
|
||||||
|
@handler JRZQDCBE
|
||||||
|
post /JRZQDCBE (request) returns (response)
|
||||||
|
|
||||||
|
@handler JRZQ0A03
|
||||||
|
post /JRZQ0A03 (request) returns (response)
|
||||||
|
|
||||||
|
@handler JRZQ8203
|
||||||
|
post /JRZQ8203 (request) returns (response)
|
||||||
|
|
||||||
|
@handler JRZQ4AA8
|
||||||
|
post /JRZQ4AA8 (request) returns (response)
|
||||||
|
|
||||||
|
@handler JRZQCEE8
|
||||||
|
post /JRZQCEE8 (request) returns (response)
|
||||||
|
|
||||||
|
@handler JRZQFEF8
|
||||||
|
post /JRZQFEF8 (request) returns (response)
|
||||||
|
}
|
||||||
|
|
31
apps/api/api.go
Normal file
31
apps/api/api.go
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"flag"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/config"
|
||||||
|
"tianyuan-api/apps/api/internal/handler"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/conf"
|
||||||
|
"github.com/zeromicro/go-zero/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
var configFile = flag.String("f", "etc/api-api.yaml", "the config file")
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
flag.Parse()
|
||||||
|
|
||||||
|
var c config.Config
|
||||||
|
conf.MustLoad(*configFile, &c)
|
||||||
|
|
||||||
|
server := rest.MustNewServer(c.RestConf)
|
||||||
|
defer server.Stop()
|
||||||
|
|
||||||
|
ctx := svc.NewServiceContext(c)
|
||||||
|
handler.RegisterHandlers(server, ctx)
|
||||||
|
|
||||||
|
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
|
||||||
|
server.Start()
|
||||||
|
}
|
51
apps/api/api.proto
Normal file
51
apps/api/api.proto
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package product;
|
||||||
|
|
||||||
|
option go_package = "./api";
|
||||||
|
|
||||||
|
service ProductService {
|
||||||
|
// 获取产品列表
|
||||||
|
rpc GetProducts(ProductListReq) returns (ProductListResp);
|
||||||
|
|
||||||
|
// 获取用户开通的产品列表
|
||||||
|
rpc GetUserProducts(UserProductListReq) returns (UserProductListResp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取产品列表的请求
|
||||||
|
message ProductListReq {}
|
||||||
|
|
||||||
|
// 获取产品列表的响应
|
||||||
|
message ProductListResp {
|
||||||
|
repeated ProductItem products = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 产品信息
|
||||||
|
message ProductItem {
|
||||||
|
int64 id = 1; // 产品ID
|
||||||
|
string product_name = 2; // 产品名称
|
||||||
|
string product_code = 3; // 产品编号
|
||||||
|
string product_description = 4; // 产品简介
|
||||||
|
string product_content = 5; // 产品内容
|
||||||
|
float product_price = 6; // 产品价格
|
||||||
|
string created_at = 7; // 产品创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取用户开通的产品列表的请求
|
||||||
|
message UserProductListReq {
|
||||||
|
int64 user_id = 1; // 用户ID
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取用户开通的产品列表的响应
|
||||||
|
message UserProductListResp {
|
||||||
|
repeated UserProductItem user_products = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用户产品信息
|
||||||
|
message UserProductItem {
|
||||||
|
int64 id = 1; // 用户产品ID
|
||||||
|
int64 user_id = 2; // 用户ID
|
||||||
|
int64 product_id = 3; // 产品ID
|
||||||
|
string activation_date = 4; // 激活时间
|
||||||
|
string expiration_date = 5; // 到期时间
|
||||||
|
}
|
20
apps/api/etc/api-api.yaml
Normal file
20
apps/api/etc/api-api.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Name: api-api
|
||||||
|
Host: 0.0.0.0
|
||||||
|
Port: 10003
|
||||||
|
DataSource: "tianyuanapi:g3h98u0291j@tcp(127.0.0.1:3307)/tianyuanapi?charset=utf8mb4&parseTime=True&loc=Local"
|
||||||
|
CacheRedis:
|
||||||
|
- Host: "127.0.0.1:6379"
|
||||||
|
Pass: "" # Redis 密码,如果未设置则留空
|
||||||
|
Type: "node" # 单节点模式
|
||||||
|
SentinelRpc:
|
||||||
|
Etcd:
|
||||||
|
Hosts:
|
||||||
|
- 127.0.0.1:2379
|
||||||
|
Key: sentinel.rpc
|
||||||
|
KqPusherConf:
|
||||||
|
Brokers:
|
||||||
|
- 127.0.0.1:9092
|
||||||
|
Topic: apirequest
|
||||||
|
WestConfig:
|
||||||
|
key: "121a1e41fc1690dd6b90afbcacd80cf4"
|
||||||
|
secretId: "449159"
|
24
apps/api/internal/config/config.go
Normal file
24
apps/api/internal/config/config.go
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||||
|
"github.com/zeromicro/go-zero/rest"
|
||||||
|
"github.com/zeromicro/go-zero/zrpc"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Config struct {
|
||||||
|
rest.RestConf
|
||||||
|
DataSource string // 数据库连接的 DSN 字符串
|
||||||
|
CacheRedis cache.CacheConf // 缓存配置,使用 go-zero 自带的缓存配置结构体
|
||||||
|
SentinelRpc zrpc.RpcClientConf
|
||||||
|
KqPusherConf KqPusherConf
|
||||||
|
WestConfig WestConfig
|
||||||
|
}
|
||||||
|
type KqPusherConf struct {
|
||||||
|
Brokers []string
|
||||||
|
Topic string
|
||||||
|
}
|
||||||
|
type WestConfig struct {
|
||||||
|
Key string
|
||||||
|
SecretId string
|
||||||
|
}
|
30
apps/api/internal/handler/FLXG/flxg162ahandler.go
Normal file
30
apps/api/internal/handler/FLXG/flxg162ahandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FLXG162AHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := FLXG.NewFLXG162ALogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.FLXG162A(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/FLXG/flxg3d56handler.go
Normal file
30
apps/api/internal/handler/FLXG/flxg3d56handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FLXG3D56Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := FLXG.NewFLXG3D56Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.FLXG3D56(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/FLXG/flxg54f5handler.go
Normal file
30
apps/api/internal/handler/FLXG/flxg54f5handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FLXG54F5Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := FLXG.NewFLXG54F5Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.FLXG54F5(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/FLXG/flxg5876handler.go
Normal file
30
apps/api/internal/handler/FLXG/flxg5876handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FLXG5876Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := FLXG.NewFLXG5876Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.FLXG5876(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/FLXG/flxg75fehandler.go
Normal file
30
apps/api/internal/handler/FLXG/flxg75fehandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FLXG75FEHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := FLXG.NewFLXG75FELogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.FLXG75FE(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/FLXG/flxg9687handler.go
Normal file
30
apps/api/internal/handler/FLXG/flxg9687handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FLXG9687Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := FLXG.NewFLXG9687Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.FLXG9687(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/FLXG/flxg970fhandler.go
Normal file
30
apps/api/internal/handler/FLXG/flxg970fhandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FLXG970FHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := FLXG.NewFLXG970FLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.FLXG970F(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/FLXG/flxgc9d1handler.go
Normal file
30
apps/api/internal/handler/FLXG/flxgc9d1handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FLXGC9D1Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := FLXG.NewFLXGC9D1Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.FLXGC9D1(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/FLXG/flxgca3dhandler.go
Normal file
30
apps/api/internal/handler/FLXG/flxgca3dhandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FLXGCA3DHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := FLXG.NewFLXGCA3DLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.FLXGCA3D(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/FLXG/flxgdec7handler.go
Normal file
30
apps/api/internal/handler/FLXG/flxgdec7handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/FLXG"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func FLXGDEC7Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := FLXG.NewFLXGDEC7Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.FLXGDEC7(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/IVYZ/ivyz0b03handler.go
Normal file
30
apps/api/internal/handler/IVYZ/ivyz0b03handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/IVYZ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func IVYZ0B03Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := IVYZ.NewIVYZ0B03Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.IVYZ0B03(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/IVYZ/ivyz2125handler.go
Normal file
30
apps/api/internal/handler/IVYZ/ivyz2125handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/IVYZ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func IVYZ2125Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := IVYZ.NewIVYZ2125Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.IVYZ2125(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/IVYZ/ivyz385ehandler.go
Normal file
30
apps/api/internal/handler/IVYZ/ivyz385ehandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/IVYZ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func IVYZ385EHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := IVYZ.NewIVYZ385ELogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.IVYZ385E(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/IVYZ/ivyz5733handler.go
Normal file
30
apps/api/internal/handler/IVYZ/ivyz5733handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/IVYZ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func IVYZ5733Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := IVYZ.NewIVYZ5733Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.IVYZ5733(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/IVYZ/ivyz9363handler.go
Normal file
30
apps/api/internal/handler/IVYZ/ivyz9363handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/IVYZ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func IVYZ9363Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := IVYZ.NewIVYZ9363Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.IVYZ9363(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/IVYZ/ivyzadeehandler.go
Normal file
30
apps/api/internal/handler/IVYZ/ivyzadeehandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/IVYZ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func IVYZADEEHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := IVYZ.NewIVYZADEELogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.IVYZADEE(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/JRZQ/jrzq0a03handler.go
Normal file
30
apps/api/internal/handler/JRZQ/jrzq0a03handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/JRZQ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func JRZQ0A03Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := JRZQ.NewJRZQ0A03Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.JRZQ0A03(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/JRZQ/jrzq4aa8handler.go
Normal file
30
apps/api/internal/handler/JRZQ/jrzq4aa8handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/JRZQ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func JRZQ4AA8Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := JRZQ.NewJRZQ4AA8Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.JRZQ4AA8(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/JRZQ/jrzq8203handler.go
Normal file
30
apps/api/internal/handler/JRZQ/jrzq8203handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/JRZQ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func JRZQ8203Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := JRZQ.NewJRZQ8203Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.JRZQ8203(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/JRZQ/jrzqcee8handler.go
Normal file
30
apps/api/internal/handler/JRZQ/jrzqcee8handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/JRZQ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func JRZQCEE8Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := JRZQ.NewJRZQCEE8Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.JRZQCEE8(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/JRZQ/jrzqdcbehandler.go
Normal file
30
apps/api/internal/handler/JRZQ/jrzqdcbehandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/JRZQ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func JRZQDCBEHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := JRZQ.NewJRZQDCBELogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.JRZQDCBE(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/JRZQ/jrzqfef8handler.go
Normal file
30
apps/api/internal/handler/JRZQ/jrzqfef8handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/JRZQ"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func JRZQFEF8Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := JRZQ.NewJRZQFEF8Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.JRZQFEF8(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/QYGL/qygl2acdhandler.go
Normal file
30
apps/api/internal/handler/QYGL/qygl2acdhandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package QYGL
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/QYGL"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func QYGL2ACDHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := QYGL.NewQYGL2ACDLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.QYGL2ACD(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/QYGL/qygl45bdhandler.go
Normal file
30
apps/api/internal/handler/QYGL/qygl45bdhandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package QYGL
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/QYGL"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func QYGL45BDHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := QYGL.NewQYGL45BDLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.QYGL45BD(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/QYGL/qygl51bchandler.go
Normal file
30
apps/api/internal/handler/QYGL/qygl51bchandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package QYGL
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/QYGL"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func QYGL51BCHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := QYGL.NewQYGL51BCLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.QYGL51BC(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/QYGL/qygl6f2dhandler.go
Normal file
30
apps/api/internal/handler/QYGL/qygl6f2dhandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package QYGL
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/QYGL"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func QYGL6F2DHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := QYGL.NewQYGL6F2DLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.QYGL6F2D(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/QYGL/qygl8261handler.go
Normal file
30
apps/api/internal/handler/QYGL/qygl8261handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package QYGL
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/QYGL"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func QYGL8261Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := QYGL.NewQYGL8261Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.QYGL8261(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/QYGL/qyglb4c0handler.go
Normal file
30
apps/api/internal/handler/QYGL/qyglb4c0handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package QYGL
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/QYGL"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func QYGLB4C0Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := QYGL.NewQYGLB4C0Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.QYGLB4C0(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/YYSY/yysy09cdhandler.go
Normal file
30
apps/api/internal/handler/YYSY/yysy09cdhandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package YYSY
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/YYSY"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func YYSY09CDHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := YYSY.NewYYSY09CDLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.YYSY09CD(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/YYSY/yysy4b37handler.go
Normal file
30
apps/api/internal/handler/YYSY/yysy4b37handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package YYSY
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/YYSY"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func YYSY4B37Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := YYSY.NewYYSY4B37Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.YYSY4B37(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/YYSY/yysy6f2ehandler.go
Normal file
30
apps/api/internal/handler/YYSY/yysy6f2ehandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package YYSY
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/YYSY"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func YYSY6F2EHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := YYSY.NewYYSY6F2ELogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.YYSY6F2E(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/YYSY/yysybe08handler.go
Normal file
30
apps/api/internal/handler/YYSY/yysybe08handler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package YYSY
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/YYSY"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func YYSYBE08Handler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := YYSY.NewYYSYBE08Logic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.YYSYBE08(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/YYSY/yysyd50fhandler.go
Normal file
30
apps/api/internal/handler/YYSY/yysyd50fhandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package YYSY
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/YYSY"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func YYSYD50FHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := YYSY.NewYYSYD50FLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.YYSYD50F(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
apps/api/internal/handler/YYSY/yysyf7dbhandler.go
Normal file
30
apps/api/internal/handler/YYSY/yysyf7dbhandler.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package YYSY
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||||||
|
"tianyuan-api/apps/api/internal/logic/YYSY"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
xhttp "github.com/zeromicro/x/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func YYSYF7DBHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var req types.Request
|
||||||
|
if err := httpx.Parse(r, &req); err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
l := YYSY.NewYYSYF7DBLogic(r.Context(), svcCtx)
|
||||||
|
resp, err := l.YYSYF7DB(&req)
|
||||||
|
if err != nil {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
|
||||||
|
} else {
|
||||||
|
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
234
apps/api/internal/handler/routes.go
Normal file
234
apps/api/internal/handler/routes.go
Normal file
@ -0,0 +1,234 @@
|
|||||||
|
// Code generated by goctl. DO NOT EDIT.
|
||||||
|
// goctl 1.7.2
|
||||||
|
|
||||||
|
package handler
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
FLXG "tianyuan-api/apps/api/internal/handler/FLXG"
|
||||||
|
IVYZ "tianyuan-api/apps/api/internal/handler/IVYZ"
|
||||||
|
JRZQ "tianyuan-api/apps/api/internal/handler/JRZQ"
|
||||||
|
QYGL "tianyuan-api/apps/api/internal/handler/QYGL"
|
||||||
|
YYSY "tianyuan-api/apps/api/internal/handler/YYSY"
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||||
|
server.AddRoutes(
|
||||||
|
rest.WithMiddlewares(
|
||||||
|
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
|
||||||
|
[]rest.Route{
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/FLXG162A",
|
||||||
|
Handler: FLXG.FLXG162AHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/FLXG3D56",
|
||||||
|
Handler: FLXG.FLXG3D56Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/FLXG54F5",
|
||||||
|
Handler: FLXG.FLXG54F5Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/FLXG5876",
|
||||||
|
Handler: FLXG.FLXG5876Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/FLXG75FE",
|
||||||
|
Handler: FLXG.FLXG75FEHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/FLXG9687",
|
||||||
|
Handler: FLXG.FLXG9687Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/FLXG970F",
|
||||||
|
Handler: FLXG.FLXG970FHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/FLXGC9D1",
|
||||||
|
Handler: FLXG.FLXGC9D1Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/FLXGCA3D",
|
||||||
|
Handler: FLXG.FLXGCA3DHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/FLXGDEC7",
|
||||||
|
Handler: FLXG.FLXGDEC7Handler(serverCtx),
|
||||||
|
},
|
||||||
|
}...,
|
||||||
|
),
|
||||||
|
rest.WithPrefix("/api/v1"),
|
||||||
|
)
|
||||||
|
|
||||||
|
server.AddRoutes(
|
||||||
|
rest.WithMiddlewares(
|
||||||
|
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
|
||||||
|
[]rest.Route{
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/IVYZ0B03",
|
||||||
|
Handler: IVYZ.IVYZ0B03Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/IVYZ2125",
|
||||||
|
Handler: IVYZ.IVYZ2125Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/IVYZ385E",
|
||||||
|
Handler: IVYZ.IVYZ385EHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/IVYZ5733",
|
||||||
|
Handler: IVYZ.IVYZ5733Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/IVYZ9363",
|
||||||
|
Handler: IVYZ.IVYZ9363Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/IVYZADEE",
|
||||||
|
Handler: IVYZ.IVYZADEEHandler(serverCtx),
|
||||||
|
},
|
||||||
|
}...,
|
||||||
|
),
|
||||||
|
rest.WithPrefix("/api/v1"),
|
||||||
|
)
|
||||||
|
|
||||||
|
server.AddRoutes(
|
||||||
|
rest.WithMiddlewares(
|
||||||
|
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
|
||||||
|
[]rest.Route{
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/JRZQ0A03",
|
||||||
|
Handler: JRZQ.JRZQ0A03Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/JRZQ4AA8",
|
||||||
|
Handler: JRZQ.JRZQ4AA8Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/JRZQ8203",
|
||||||
|
Handler: JRZQ.JRZQ8203Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/JRZQCEE8",
|
||||||
|
Handler: JRZQ.JRZQCEE8Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/JRZQDCBE",
|
||||||
|
Handler: JRZQ.JRZQDCBEHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/JRZQFEF8",
|
||||||
|
Handler: JRZQ.JRZQFEF8Handler(serverCtx),
|
||||||
|
},
|
||||||
|
}...,
|
||||||
|
),
|
||||||
|
rest.WithPrefix("/api/v1"),
|
||||||
|
)
|
||||||
|
|
||||||
|
server.AddRoutes(
|
||||||
|
rest.WithMiddlewares(
|
||||||
|
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
|
||||||
|
[]rest.Route{
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/QYGL2ACD",
|
||||||
|
Handler: QYGL.QYGL2ACDHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/QYGL45BD",
|
||||||
|
Handler: QYGL.QYGL45BDHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/QYGL51BC",
|
||||||
|
Handler: QYGL.QYGL51BCHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/QYGL6F2D",
|
||||||
|
Handler: QYGL.QYGL6F2DHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/QYGL8261",
|
||||||
|
Handler: QYGL.QYGL8261Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/QYGLB4C0",
|
||||||
|
Handler: QYGL.QYGLB4C0Handler(serverCtx),
|
||||||
|
},
|
||||||
|
}...,
|
||||||
|
),
|
||||||
|
rest.WithPrefix("/api/v1"),
|
||||||
|
)
|
||||||
|
|
||||||
|
server.AddRoutes(
|
||||||
|
rest.WithMiddlewares(
|
||||||
|
[]rest.Middleware{serverCtx.ApiAuthInterceptor},
|
||||||
|
[]rest.Route{
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/YYSY09CD",
|
||||||
|
Handler: YYSY.YYSY09CDHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/YYSY4B37",
|
||||||
|
Handler: YYSY.YYSY4B37Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/YYSY6F2E",
|
||||||
|
Handler: YYSY.YYSY6F2EHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/YYSYBE08",
|
||||||
|
Handler: YYSY.YYSYBE08Handler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/YYSYD50F",
|
||||||
|
Handler: YYSY.YYSYD50FHandler(serverCtx),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Method: http.MethodPost,
|
||||||
|
Path: "/YYSYF7DB",
|
||||||
|
Handler: YYSY.YYSYF7DBHandler(serverCtx),
|
||||||
|
},
|
||||||
|
}...,
|
||||||
|
),
|
||||||
|
rest.WithPrefix("/api/v1"),
|
||||||
|
)
|
||||||
|
}
|
30
apps/api/internal/logic/FLXG/flxg162alogic.go
Normal file
30
apps/api/internal/logic/FLXG/flxg162alogic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FLXG162ALogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFLXG162ALogic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG162ALogic {
|
||||||
|
return &FLXG162ALogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *FLXG162ALogic) FLXG162A(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
98
apps/api/internal/logic/FLXG/flxg3d56logic.go
Normal file
98
apps/api/internal/logic/FLXG/flxg3d56logic.go
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/hex"
|
||||||
|
"errors"
|
||||||
|
"tianyuan-api/apps/api/internal/validator"
|
||||||
|
"tianyuan-api/pkg/crypto"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FLXG3D56Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFLXG3D56Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG3D56Logic {
|
||||||
|
return &FLXG3D56Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *FLXG3D56Logic) FLXG3D56(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
//userId, ok := l.ctx.Value("userId").(int64)
|
||||||
|
//if !ok {
|
||||||
|
// return &types.Response{}, errors.New("系统错误,请联系管理员")
|
||||||
|
//}
|
||||||
|
secretKey, ok := l.ctx.Value("secretKey").(string)
|
||||||
|
if !ok {
|
||||||
|
return &types.Response{}, errors.New("系统错误,请联系管理员")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1、解密
|
||||||
|
key, err := hex.DecodeString(secretKey)
|
||||||
|
decryptData, err := crypto.AesDecrypt(req.Data, key)
|
||||||
|
if err != nil || len(decryptData) == 0 {
|
||||||
|
return nil, errors.New("参数解密失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2、校验
|
||||||
|
var data validator.FLXG3D56Request
|
||||||
|
|
||||||
|
if validatorErr := validator.ValidateAndParse(decryptData, &data); validatorErr != nil {
|
||||||
|
return nil, validatorErr
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3、西部加密
|
||||||
|
westConfig := l.svcCtx.Config.WestConfig
|
||||||
|
mobileNo, err := crypto.WestDexEncrypt(data.MobileNo, westConfig.Key)
|
||||||
|
if err != nil {
|
||||||
|
logx.Errorf("西部加密错误:%v", err)
|
||||||
|
return nil, errors.New("业务异常")
|
||||||
|
}
|
||||||
|
name, err := crypto.WestDexEncrypt(data.Name, westConfig.Key)
|
||||||
|
if err != nil {
|
||||||
|
logx.Errorf("西部加密错误:%v", err)
|
||||||
|
return nil, errors.New("业务异常")
|
||||||
|
}
|
||||||
|
idCard, err := crypto.WestDexEncrypt(data.IDCard, westConfig.Key)
|
||||||
|
if err != nil {
|
||||||
|
logx.Errorf("西部加密错误:%v", err)
|
||||||
|
return nil, errors.New("业务异常")
|
||||||
|
}
|
||||||
|
timeRange, err := crypto.WestDexEncrypt(data.TimeRange, westConfig.Key)
|
||||||
|
if err != nil {
|
||||||
|
logx.Errorf("西部加密错误:%v", err)
|
||||||
|
return nil, errors.New("业务异常")
|
||||||
|
}
|
||||||
|
// 4、发送请求到西部
|
||||||
|
westdexRequest := map[string]interface{}{
|
||||||
|
"id": idCard,
|
||||||
|
"cell": mobileNo,
|
||||||
|
"name": name,
|
||||||
|
"time_range": timeRange,
|
||||||
|
}
|
||||||
|
westResp, err := l.svcCtx.WestDexService.CallAPI("G26BJ05", westdexRequest)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5、响应解析
|
||||||
|
//var respData westmodel.G09GX01Response
|
||||||
|
//unmarshalErr := json.Unmarshal(westResp, &respData)
|
||||||
|
//if unmarshalErr != nil {
|
||||||
|
// return nil, unmarshalErr
|
||||||
|
//}
|
||||||
|
//crypto.AesEncrypt()
|
||||||
|
return &types.Response{
|
||||||
|
Data: string(westResp),
|
||||||
|
}, nil
|
||||||
|
}
|
30
apps/api/internal/logic/FLXG/flxg54f5logic.go
Normal file
30
apps/api/internal/logic/FLXG/flxg54f5logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FLXG54F5Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFLXG54F5Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG54F5Logic {
|
||||||
|
return &FLXG54F5Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *FLXG54F5Logic) FLXG54F5(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/FLXG/flxg5876logic.go
Normal file
30
apps/api/internal/logic/FLXG/flxg5876logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FLXG5876Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFLXG5876Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG5876Logic {
|
||||||
|
return &FLXG5876Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *FLXG5876Logic) FLXG5876(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/FLXG/flxg75felogic.go
Normal file
30
apps/api/internal/logic/FLXG/flxg75felogic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FLXG75FELogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFLXG75FELogic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG75FELogic {
|
||||||
|
return &FLXG75FELogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *FLXG75FELogic) FLXG75FE(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/FLXG/flxg9687logic.go
Normal file
30
apps/api/internal/logic/FLXG/flxg9687logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FLXG9687Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFLXG9687Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG9687Logic {
|
||||||
|
return &FLXG9687Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *FLXG9687Logic) FLXG9687(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/FLXG/flxg970flogic.go
Normal file
30
apps/api/internal/logic/FLXG/flxg970flogic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FLXG970FLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFLXG970FLogic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG970FLogic {
|
||||||
|
return &FLXG970FLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *FLXG970FLogic) FLXG970F(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/FLXG/flxgc9d1logic.go
Normal file
30
apps/api/internal/logic/FLXG/flxgc9d1logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FLXGC9D1Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFLXGC9D1Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXGC9D1Logic {
|
||||||
|
return &FLXGC9D1Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *FLXGC9D1Logic) FLXGC9D1(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/FLXG/flxgca3dlogic.go
Normal file
30
apps/api/internal/logic/FLXG/flxgca3dlogic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FLXGCA3DLogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFLXGCA3DLogic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXGCA3DLogic {
|
||||||
|
return &FLXGCA3DLogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *FLXGCA3DLogic) FLXGCA3D(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/FLXG/flxgdec7logic.go
Normal file
30
apps/api/internal/logic/FLXG/flxgdec7logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package FLXG
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FLXGDEC7Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFLXGDEC7Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXGDEC7Logic {
|
||||||
|
return &FLXGDEC7Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *FLXGDEC7Logic) FLXGDEC7(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/IVYZ/ivyz0b03logic.go
Normal file
30
apps/api/internal/logic/IVYZ/ivyz0b03logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type IVYZ0B03Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewIVYZ0B03Logic(ctx context.Context, svcCtx *svc.ServiceContext) *IVYZ0B03Logic {
|
||||||
|
return &IVYZ0B03Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *IVYZ0B03Logic) IVYZ0B03(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/IVYZ/ivyz2125logic.go
Normal file
30
apps/api/internal/logic/IVYZ/ivyz2125logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type IVYZ2125Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewIVYZ2125Logic(ctx context.Context, svcCtx *svc.ServiceContext) *IVYZ2125Logic {
|
||||||
|
return &IVYZ2125Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *IVYZ2125Logic) IVYZ2125(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/IVYZ/ivyz385elogic.go
Normal file
30
apps/api/internal/logic/IVYZ/ivyz385elogic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type IVYZ385ELogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewIVYZ385ELogic(ctx context.Context, svcCtx *svc.ServiceContext) *IVYZ385ELogic {
|
||||||
|
return &IVYZ385ELogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *IVYZ385ELogic) IVYZ385E(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/IVYZ/ivyz5733logic.go
Normal file
30
apps/api/internal/logic/IVYZ/ivyz5733logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type IVYZ5733Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewIVYZ5733Logic(ctx context.Context, svcCtx *svc.ServiceContext) *IVYZ5733Logic {
|
||||||
|
return &IVYZ5733Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *IVYZ5733Logic) IVYZ5733(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/IVYZ/ivyz9363logic.go
Normal file
30
apps/api/internal/logic/IVYZ/ivyz9363logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type IVYZ9363Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewIVYZ9363Logic(ctx context.Context, svcCtx *svc.ServiceContext) *IVYZ9363Logic {
|
||||||
|
return &IVYZ9363Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *IVYZ9363Logic) IVYZ9363(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/IVYZ/ivyzadeelogic.go
Normal file
30
apps/api/internal/logic/IVYZ/ivyzadeelogic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package IVYZ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type IVYZADEELogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewIVYZADEELogic(ctx context.Context, svcCtx *svc.ServiceContext) *IVYZADEELogic {
|
||||||
|
return &IVYZADEELogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *IVYZADEELogic) IVYZADEE(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/JRZQ/jrzq0a03logic.go
Normal file
30
apps/api/internal/logic/JRZQ/jrzq0a03logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type JRZQ0A03Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewJRZQ0A03Logic(ctx context.Context, svcCtx *svc.ServiceContext) *JRZQ0A03Logic {
|
||||||
|
return &JRZQ0A03Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *JRZQ0A03Logic) JRZQ0A03(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/JRZQ/jrzq4aa8logic.go
Normal file
30
apps/api/internal/logic/JRZQ/jrzq4aa8logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type JRZQ4AA8Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewJRZQ4AA8Logic(ctx context.Context, svcCtx *svc.ServiceContext) *JRZQ4AA8Logic {
|
||||||
|
return &JRZQ4AA8Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *JRZQ4AA8Logic) JRZQ4AA8(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/JRZQ/jrzq8203logic.go
Normal file
30
apps/api/internal/logic/JRZQ/jrzq8203logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type JRZQ8203Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewJRZQ8203Logic(ctx context.Context, svcCtx *svc.ServiceContext) *JRZQ8203Logic {
|
||||||
|
return &JRZQ8203Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *JRZQ8203Logic) JRZQ8203(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/JRZQ/jrzqcee8logic.go
Normal file
30
apps/api/internal/logic/JRZQ/jrzqcee8logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type JRZQCEE8Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewJRZQCEE8Logic(ctx context.Context, svcCtx *svc.ServiceContext) *JRZQCEE8Logic {
|
||||||
|
return &JRZQCEE8Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *JRZQCEE8Logic) JRZQCEE8(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/JRZQ/jrzqdcbelogic.go
Normal file
30
apps/api/internal/logic/JRZQ/jrzqdcbelogic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type JRZQDCBELogic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewJRZQDCBELogic(ctx context.Context, svcCtx *svc.ServiceContext) *JRZQDCBELogic {
|
||||||
|
return &JRZQDCBELogic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *JRZQDCBELogic) JRZQDCBE(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
30
apps/api/internal/logic/JRZQ/jrzqfef8logic.go
Normal file
30
apps/api/internal/logic/JRZQ/jrzqfef8logic.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package JRZQ
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tianyuan-api/apps/api/internal/svc"
|
||||||
|
"tianyuan-api/apps/api/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type JRZQFEF8Logic struct {
|
||||||
|
logx.Logger
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewJRZQFEF8Logic(ctx context.Context, svcCtx *svc.ServiceContext) *JRZQFEF8Logic {
|
||||||
|
return &JRZQFEF8Logic{
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *JRZQFEF8Logic) JRZQFEF8(req *types.Request) (resp *types.Response, err error) {
|
||||||
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user