Compare commits
No commits in common. '92dfbc48b6983a784aa71ee924ddf37594cee560' and '7f9822e81fb9afd5161593a752cebf7d0dcebeae' have entirely different histories.
92dfbc48b6
...
7f9822e81f
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GoLinterSettings">
|
||||
<option name="checkGoLinterExe" value="false" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SwUserDefinedSpecifications">
|
||||
<option name="specTypeByUrl">
|
||||
<map />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -1,22 +0,0 @@
|
||||
FROM testhub.szjixun.cn:9043/public/golang:1.20-alpine AS builder
|
||||
|
||||
LABEL stage=gobuilder
|
||||
ENV CGO_ENABLED 0
|
||||
ENV GOPROXY https://goproxy.cn,direct
|
||||
WORKDIR /build
|
||||
COPY chain-dci-server /app/chain-dci-server
|
||||
|
||||
#FROM 172.16.100.99:9006/alpine
|
||||
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
#RUN apk update --no-cache
|
||||
#RUN apk add --no-cache ca-certificates
|
||||
#RUN apk add --no-cache tzdata
|
||||
FROM testhub.szjixun.cn:9043/public/self-alpine
|
||||
COPY ./conf /app/conf
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
ENV MODE_ENV prod
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/chain-dci-server .
|
||||
EXPOSE 20117
|
||||
CMD ["/app/chain-dci-server"]
|
@ -1,30 +1,34 @@
|
||||
system:
|
||||
mode: dev #正式 prod #测试 test #开发 dev
|
||||
# config_source: configmap
|
||||
chainDci:
|
||||
host: 172.16.100.99
|
||||
port: 9007
|
||||
user: artuser
|
||||
password: C250PflXIWv2SQm8
|
||||
db_name: "chain_dci"
|
||||
Bccr:
|
||||
access_key_id: "ACsK4CQqzj5rGSKf"
|
||||
access_key_secret: "SJmH5eATWY26tJrVg8QyHaBGbLNCbj7y"
|
||||
end_point: "openapi.antchain.antgroup.com" # 正式的 endpoint
|
||||
# end_point: "openapi-sit.antchain.antgroup.com" # 测试式的 endpoint
|
||||
config_source: configmap
|
||||
#oaMeeting:
|
||||
# host: ${mysql.host|localhost}
|
||||
# port: ${mysql.port|3306}
|
||||
# user: ${mysql.user}
|
||||
# password: ${mysql.password}
|
||||
# db_name: ${oa-meeting.mysql.db_name}
|
||||
#aliYunRtc:
|
||||
# appid: ${aliyun-rtc.appid}
|
||||
# app_key: ${aliyun-rtc.app_key}
|
||||
#redis:
|
||||
# db: ${oa-meeting.redis.db}
|
||||
# addr: ${redis.addr}
|
||||
# password: ${redis.password}
|
||||
zapLog:
|
||||
level: "info"
|
||||
filename: "logs/chain-dci.log"
|
||||
max_size: 5
|
||||
max_age: 30
|
||||
max_backups: 30
|
||||
filename: "logs/oa-meeting.log"
|
||||
max_size: ${zap.max_size}
|
||||
max_age: ${zap.max_age}
|
||||
max_backups: ${zap.max_backups}
|
||||
snowflake:
|
||||
node_num: 4
|
||||
start_time: "2023-11-27"
|
||||
node_num: ${oa-meeting.snowflake.node_num}
|
||||
start_time: "2023-05-31"
|
||||
jaeger:
|
||||
addr: "127.0.0.1:6831"
|
||||
open: false
|
||||
addr: ${jaeger.host}
|
||||
open: ${oa-meeting.jaeger_open}
|
||||
#rabbitmq:
|
||||
# user: ${rabbitmq.user}
|
||||
# password: ${rabbitmq.password}
|
||||
# host: ${rabbitmq.host}
|
||||
# port: ${rabbitmq.port}
|
||||
# vhost: ${oa-meeting.rabbitmq.vhost}
|
@ -1,29 +0,0 @@
|
||||
system:
|
||||
mode: prod #正式 prod #测试 test #开发 dev
|
||||
# config_source: configmap
|
||||
Bccr:
|
||||
access_key_id: "ACsK4CQqzj5rGSKf"
|
||||
access_key_secret: "SJmH5eATWY26tJrVg8QyHaBGbLNCbj7y"
|
||||
end_point: "openapi.antchain.antgroup.com"
|
||||
#redis:
|
||||
# db: ${oa-meeting.redis.db}
|
||||
# addr: ${redis.addr}
|
||||
# password: ${redis.password}
|
||||
zapLog:
|
||||
level: "info"
|
||||
filename: "logs/chain-dci.log"
|
||||
max_size: 5
|
||||
max_age: 30
|
||||
max_backups: 30
|
||||
snowflake:
|
||||
node_num: 4
|
||||
start_time: "2023-11-27"
|
||||
jaeger:
|
||||
addr: "127.0.0.1:6831"
|
||||
open: false
|
||||
#rabbitmq:
|
||||
# user: ${rabbitmq.user}
|
||||
# password: ${rabbitmq.password}
|
||||
# host: ${rabbitmq.host}
|
||||
# port: ${rabbitmq.port}
|
||||
# vhost: ${oa-meeting.rabbitmq.vhost}
|
@ -1,68 +0,0 @@
|
||||
dubbo:
|
||||
metrics:
|
||||
enable: true # default is true
|
||||
path: /metrics # default is /metrics
|
||||
port: 9092 # default is 9090
|
||||
namespace: dubboDci # default is dubbo 作为数据上报 metrics 的前缀
|
||||
registries:
|
||||
demoZK:
|
||||
protocol: zookeeper
|
||||
timeout: 10s
|
||||
address: 172.16.100.93:2181
|
||||
protocols:
|
||||
triple: #triple
|
||||
name: tri
|
||||
port: 20201
|
||||
provider:
|
||||
filter: tracing
|
||||
services:
|
||||
DciProvider:
|
||||
interface: com.fontree.microservices.chain.dci
|
||||
retries: 0
|
||||
filter: tps,tracing
|
||||
tps.limiter: method-service
|
||||
tps.limit.strategy: fixedWindow
|
||||
tps.limit.rejected.handler: DefaultValueHandler
|
||||
tps.limit.interval: 1000 # 间隔时间
|
||||
tps.limit.rate: 30 # 间隔时间内次数
|
||||
warmup: 100 #预热时间
|
||||
logger:
|
||||
zap-config:
|
||||
level: info # 日志级别
|
||||
development: false
|
||||
disableCaller: false
|
||||
disableStacktrace: false
|
||||
encoding: "json"
|
||||
# zap encoder 配置
|
||||
encoderConfig:
|
||||
messageKey: "message"
|
||||
levelKey: "level"
|
||||
timeKey: "time"
|
||||
nameKey: "logger"
|
||||
callerKey: "caller"
|
||||
stacktraceKey: "stacktrace"
|
||||
lineEnding: ""
|
||||
levelEncoder: "capitalColor"
|
||||
timeEncoder: "iso8601"
|
||||
durationEncoder: "seconds"
|
||||
callerEncoder: "short"
|
||||
nameEncoder: ""
|
||||
EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"),
|
||||
EncodeDuration: zapcore.SecondsDurationEncoder,
|
||||
outputPaths:
|
||||
- "stderr"
|
||||
errorOutputPaths:
|
||||
- "stderr"
|
||||
lumberjack-config:
|
||||
# 写日志的文件名称
|
||||
filename: "runtime/logs/chain-dci.log"
|
||||
# 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB
|
||||
maxSize: 5
|
||||
# 日志保留的最大天数(只保留最近多少天的日志)
|
||||
maxAge: 30
|
||||
# 只保留最近多少个日志文件,用于控制程序总日志的大小
|
||||
maxBackups: 30
|
||||
# 是否使用本地时间,默认使用 UTC 时间
|
||||
localTime: true
|
||||
# 是否压缩日志文件,压缩方法 gzip
|
||||
compress: false
|
@ -1,23 +0,0 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"chain-dci/internal/model"
|
||||
"chain-dci/pkg/app"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func CreateFileInfo(tx *gorm.DB, info *model.FileInfo) error {
|
||||
if tx == nil {
|
||||
tx = app.ModuleClients.DciDB
|
||||
}
|
||||
err := tx.Model(&model.FileInfo{}).Create(&info).Error
|
||||
return err
|
||||
}
|
||||
|
||||
func UpdateFileInfo(tx *gorm.DB, info *model.FileInfo) error {
|
||||
if tx == nil {
|
||||
tx = app.ModuleClients.DciDB
|
||||
}
|
||||
err := tx.Model(&model.FileInfo{}).Where("id =?", info.Model.ID).Updates(&info).Error
|
||||
return err
|
||||
}
|
@ -0,0 +1 @@
|
||||
package model
|
@ -0,0 +1 @@
|
||||
package serializer
|
@ -0,0 +1,17 @@
|
||||
package serializer
|
||||
|
||||
import (
|
||||
"chain-dci/pb/dci"
|
||||
"github.com/alibabacloud-go/tea/tea"
|
||||
bccrClient "github.com/antchain-openapi-sdk-go/bccr/client"
|
||||
)
|
||||
|
||||
func UploadUrlResponseToRpc(in *bccrClient.GetUploadurlResponse) (out *dci.GetUploadUrlResponse) {
|
||||
out = new(dci.GetUploadUrlResponse)
|
||||
out.ReqMsgId = tea.ToString(in.ReqMsgId)
|
||||
out.ResultMsg = tea.ToString(in.ResultMsg)
|
||||
out.ResultCode = tea.ToString(in.ResultCode)
|
||||
out.Url = tea.ToString(in.Url)
|
||||
out.FileId = tea.ToString(in.FileId)
|
||||
return
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -1,545 +0,0 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.4
|
||||
// source: pb/dci.proto
|
||||
|
||||
package grpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// DciClient is the client API for Dci service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type DciClient interface {
|
||||
// 通用接口 用于文件上传
|
||||
GetUploadUrl(ctx context.Context, in *GetUploadUrlRequest, opts ...grpc.CallOption) (*GetUploadUrlResponse, error)
|
||||
// dci user
|
||||
AddDciUser(ctx context.Context, in *AddDciUserRequest, opts ...grpc.CallOption) (*AddDciUserResponse, error)
|
||||
UpdateDciUser(ctx context.Context, in *UpdateDciUserRequest, opts ...grpc.CallOption) (*UpdateDciUserResponse, error)
|
||||
QueryDciUser(ctx context.Context, in *QueryDciUserRequest, opts ...grpc.CallOption) (*QueryDciUserResponse, error)
|
||||
// dci work
|
||||
CreateDciPreregistration(ctx context.Context, in *CreateDciPreregistrationRequest, opts ...grpc.CallOption) (*CreateDciPreregistrationResponse, error)
|
||||
QueryDciPreregistration(ctx context.Context, in *QueryDciPreregistrationRequest, opts ...grpc.CallOption) (*QueryDciPreregistrationResponse, error)
|
||||
// 数登
|
||||
CreateDciRegistration(ctx context.Context, in *CreateDciRegistrationRequest, opts ...grpc.CallOption) (*CreateDciRegistrationResponse, error)
|
||||
QueryDciRegistration(ctx context.Context, in *QueryDciRegistrationRequest, opts ...grpc.CallOption) (*QueryDciRegistrationResponse, error)
|
||||
GetDciPayUrl(ctx context.Context, in *GetDciPayUrlRequest, opts ...grpc.CallOption) (*GetDciPayUrlResponse, error)
|
||||
QueryDciPay(ctx context.Context, in *QueryDciPayRequest, opts ...grpc.CallOption) (*QueryDciPayResponse, error)
|
||||
GetDciRegistrationcert(ctx context.Context, in *GetDciRegistrationcertRequest, opts ...grpc.CallOption) (*GetDciRegistrationcertResponse, error)
|
||||
RetryDciRegistration(ctx context.Context, in *RetryDciRegistrationRequest, opts ...grpc.CallOption) (*RetryDciRegistrationResponse, error)
|
||||
CloseDciRegistration(ctx context.Context, in *CloseDciRegistrationRequest, opts ...grpc.CallOption) (*CloseDciRegistrationResponse, error)
|
||||
}
|
||||
|
||||
type dciClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDciClient(cc grpc.ClientConnInterface) DciClient {
|
||||
return &dciClient{cc}
|
||||
}
|
||||
|
||||
func (c *dciClient) GetUploadUrl(ctx context.Context, in *GetUploadUrlRequest, opts ...grpc.CallOption) (*GetUploadUrlResponse, error) {
|
||||
out := new(GetUploadUrlResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/GetUploadUrl", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) AddDciUser(ctx context.Context, in *AddDciUserRequest, opts ...grpc.CallOption) (*AddDciUserResponse, error) {
|
||||
out := new(AddDciUserResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/AddDciUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) UpdateDciUser(ctx context.Context, in *UpdateDciUserRequest, opts ...grpc.CallOption) (*UpdateDciUserResponse, error) {
|
||||
out := new(UpdateDciUserResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/UpdateDciUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) QueryDciUser(ctx context.Context, in *QueryDciUserRequest, opts ...grpc.CallOption) (*QueryDciUserResponse, error) {
|
||||
out := new(QueryDciUserResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/QueryDciUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) CreateDciPreregistration(ctx context.Context, in *CreateDciPreregistrationRequest, opts ...grpc.CallOption) (*CreateDciPreregistrationResponse, error) {
|
||||
out := new(CreateDciPreregistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/CreateDciPreregistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) QueryDciPreregistration(ctx context.Context, in *QueryDciPreregistrationRequest, opts ...grpc.CallOption) (*QueryDciPreregistrationResponse, error) {
|
||||
out := new(QueryDciPreregistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/QueryDciPreregistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) CreateDciRegistration(ctx context.Context, in *CreateDciRegistrationRequest, opts ...grpc.CallOption) (*CreateDciRegistrationResponse, error) {
|
||||
out := new(CreateDciRegistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/CreateDciRegistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) QueryDciRegistration(ctx context.Context, in *QueryDciRegistrationRequest, opts ...grpc.CallOption) (*QueryDciRegistrationResponse, error) {
|
||||
out := new(QueryDciRegistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/QueryDciRegistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) GetDciPayUrl(ctx context.Context, in *GetDciPayUrlRequest, opts ...grpc.CallOption) (*GetDciPayUrlResponse, error) {
|
||||
out := new(GetDciPayUrlResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/GetDciPayUrl", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) QueryDciPay(ctx context.Context, in *QueryDciPayRequest, opts ...grpc.CallOption) (*QueryDciPayResponse, error) {
|
||||
out := new(QueryDciPayResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/QueryDciPay", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) GetDciRegistrationcert(ctx context.Context, in *GetDciRegistrationcertRequest, opts ...grpc.CallOption) (*GetDciRegistrationcertResponse, error) {
|
||||
out := new(GetDciRegistrationcertResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/GetDciRegistrationcert", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) RetryDciRegistration(ctx context.Context, in *RetryDciRegistrationRequest, opts ...grpc.CallOption) (*RetryDciRegistrationResponse, error) {
|
||||
out := new(RetryDciRegistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/RetryDciRegistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) CloseDciRegistration(ctx context.Context, in *CloseDciRegistrationRequest, opts ...grpc.CallOption) (*CloseDciRegistrationResponse, error) {
|
||||
out := new(CloseDciRegistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/CloseDciRegistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DciServer is the server API for Dci service.
|
||||
// All implementations must embed UnimplementedDciServer
|
||||
// for forward compatibility
|
||||
type DciServer interface {
|
||||
// 通用接口 用于文件上传
|
||||
GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error)
|
||||
// dci user
|
||||
AddDciUser(context.Context, *AddDciUserRequest) (*AddDciUserResponse, error)
|
||||
UpdateDciUser(context.Context, *UpdateDciUserRequest) (*UpdateDciUserResponse, error)
|
||||
QueryDciUser(context.Context, *QueryDciUserRequest) (*QueryDciUserResponse, error)
|
||||
// dci work
|
||||
CreateDciPreregistration(context.Context, *CreateDciPreregistrationRequest) (*CreateDciPreregistrationResponse, error)
|
||||
QueryDciPreregistration(context.Context, *QueryDciPreregistrationRequest) (*QueryDciPreregistrationResponse, error)
|
||||
// 数登
|
||||
CreateDciRegistration(context.Context, *CreateDciRegistrationRequest) (*CreateDciRegistrationResponse, error)
|
||||
QueryDciRegistration(context.Context, *QueryDciRegistrationRequest) (*QueryDciRegistrationResponse, error)
|
||||
GetDciPayUrl(context.Context, *GetDciPayUrlRequest) (*GetDciPayUrlResponse, error)
|
||||
QueryDciPay(context.Context, *QueryDciPayRequest) (*QueryDciPayResponse, error)
|
||||
GetDciRegistrationcert(context.Context, *GetDciRegistrationcertRequest) (*GetDciRegistrationcertResponse, error)
|
||||
RetryDciRegistration(context.Context, *RetryDciRegistrationRequest) (*RetryDciRegistrationResponse, error)
|
||||
CloseDciRegistration(context.Context, *CloseDciRegistrationRequest) (*CloseDciRegistrationResponse, error)
|
||||
mustEmbedUnimplementedDciServer()
|
||||
}
|
||||
|
||||
// UnimplementedDciServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedDciServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedDciServer) GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUploadUrl not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) AddDciUser(context.Context, *AddDciUserRequest) (*AddDciUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddDciUser not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) UpdateDciUser(context.Context, *UpdateDciUserRequest) (*UpdateDciUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateDciUser not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) QueryDciUser(context.Context, *QueryDciUserRequest) (*QueryDciUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryDciUser not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) CreateDciPreregistration(context.Context, *CreateDciPreregistrationRequest) (*CreateDciPreregistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateDciPreregistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) QueryDciPreregistration(context.Context, *QueryDciPreregistrationRequest) (*QueryDciPreregistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryDciPreregistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) CreateDciRegistration(context.Context, *CreateDciRegistrationRequest) (*CreateDciRegistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateDciRegistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) QueryDciRegistration(context.Context, *QueryDciRegistrationRequest) (*QueryDciRegistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryDciRegistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) GetDciPayUrl(context.Context, *GetDciPayUrlRequest) (*GetDciPayUrlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetDciPayUrl not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) QueryDciPay(context.Context, *QueryDciPayRequest) (*QueryDciPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryDciPay not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) GetDciRegistrationcert(context.Context, *GetDciRegistrationcertRequest) (*GetDciRegistrationcertResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetDciRegistrationcert not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) RetryDciRegistration(context.Context, *RetryDciRegistrationRequest) (*RetryDciRegistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RetryDciRegistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) CloseDciRegistration(context.Context, *CloseDciRegistrationRequest) (*CloseDciRegistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CloseDciRegistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) mustEmbedUnimplementedDciServer() {}
|
||||
|
||||
// UnsafeDciServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DciServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDciServer interface {
|
||||
mustEmbedUnimplementedDciServer()
|
||||
}
|
||||
|
||||
func RegisterDciServer(s grpc.ServiceRegistrar, srv DciServer) {
|
||||
s.RegisterService(&Dci_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Dci_GetUploadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUploadUrlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).GetUploadUrl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/GetUploadUrl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).GetUploadUrl(ctx, req.(*GetUploadUrlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_AddDciUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddDciUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).AddDciUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/AddDciUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).AddDciUser(ctx, req.(*AddDciUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_UpdateDciUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateDciUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).UpdateDciUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/UpdateDciUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).UpdateDciUser(ctx, req.(*UpdateDciUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_QueryDciUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryDciUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).QueryDciUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/QueryDciUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).QueryDciUser(ctx, req.(*QueryDciUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_CreateDciPreregistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateDciPreregistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).CreateDciPreregistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/CreateDciPreregistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).CreateDciPreregistration(ctx, req.(*CreateDciPreregistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_QueryDciPreregistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryDciPreregistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).QueryDciPreregistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/QueryDciPreregistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).QueryDciPreregistration(ctx, req.(*QueryDciPreregistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_CreateDciRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateDciRegistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).CreateDciRegistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/CreateDciRegistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).CreateDciRegistration(ctx, req.(*CreateDciRegistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_QueryDciRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryDciRegistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).QueryDciRegistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/QueryDciRegistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).QueryDciRegistration(ctx, req.(*QueryDciRegistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_GetDciPayUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetDciPayUrlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).GetDciPayUrl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/GetDciPayUrl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).GetDciPayUrl(ctx, req.(*GetDciPayUrlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_QueryDciPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryDciPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).QueryDciPay(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/QueryDciPay",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).QueryDciPay(ctx, req.(*QueryDciPayRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_GetDciRegistrationcert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetDciRegistrationcertRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).GetDciRegistrationcert(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/GetDciRegistrationcert",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).GetDciRegistrationcert(ctx, req.(*GetDciRegistrationcertRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_RetryDciRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RetryDciRegistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).RetryDciRegistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/RetryDciRegistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).RetryDciRegistration(ctx, req.(*RetryDciRegistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_CloseDciRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CloseDciRegistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).CloseDciRegistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/CloseDciRegistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).CloseDciRegistration(ctx, req.(*CloseDciRegistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Dci_ServiceDesc is the grpc.ServiceDesc for Dci service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Dci_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "dci.Dci",
|
||||
HandlerType: (*DciServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetUploadUrl",
|
||||
Handler: _Dci_GetUploadUrl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddDciUser",
|
||||
Handler: _Dci_AddDciUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateDciUser",
|
||||
Handler: _Dci_UpdateDciUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryDciUser",
|
||||
Handler: _Dci_QueryDciUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateDciPreregistration",
|
||||
Handler: _Dci_CreateDciPreregistration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryDciPreregistration",
|
||||
Handler: _Dci_QueryDciPreregistration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateDciRegistration",
|
||||
Handler: _Dci_CreateDciRegistration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryDciRegistration",
|
||||
Handler: _Dci_QueryDciRegistration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetDciPayUrl",
|
||||
Handler: _Dci_GetDciPayUrl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryDciPay",
|
||||
Handler: _Dci_QueryDciPay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetDciRegistrationcert",
|
||||
Handler: _Dci_GetDciRegistrationcert_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RetryDciRegistration",
|
||||
Handler: _Dci_RetryDciRegistration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CloseDciRegistration",
|
||||
Handler: _Dci_CloseDciRegistration_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "pb/dci.proto",
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package ant
|
||||
|
||||
import (
|
||||
dciConfig "chain-dci/config"
|
||||
"github.com/google/wire"
|
||||
antCloud "github.com/huyi-cn/antcloud-golang-sdk"
|
||||
)
|
||||
|
||||
var Provider = wire.NewSet(NewAntClient)
|
||||
|
||||
func NewAntClient() *antCloud.Client {
|
||||
// Endpoint 请参考 https://api.aliyun.com/product/rtc
|
||||
//bccrConfig := new(bccrClient.Config)
|
||||
//bccrConfig.SetEndpoint(dciConfig.Data.Dci.EndPoint)
|
||||
//bccrConfig.SetAccessKeyId(dciConfig.Data.Dci.AccessKey)
|
||||
//bccrConfig.SetAccessKeySecret(dciConfig.Data.Dci.AccessKeySecret)
|
||||
|
||||
client := antCloud.NewClient(dciConfig.Data.AntCloud.EndPoint, dciConfig.Data.AntCloud.AccessKey, dciConfig.Data.AntCloud.AccessKeySecret, nil)
|
||||
return client
|
||||
}
|
@ -1,24 +1,27 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
dciConfig "chain-dci/config"
|
||||
"github.com/dubbogo/gost/log/logger"
|
||||
"github.com/go-redis/redis"
|
||||
"github.com/google/wire"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
var RedisProvider = wire.NewSet(NewRedis)
|
||||
|
||||
// TODO 添加连接池
|
||||
func NewRedis() *redis.Client {
|
||||
//redisDb, _ := strconv.Atoi(dciConfig.Data.Redis.DB)
|
||||
//RedisClient := redis.NewClient(&redis.Options{
|
||||
// Addr: dciConfig.Data.Redis.Addr,
|
||||
// Password: dciConfig.Data.Redis.Password,
|
||||
// DB: redisDb,
|
||||
//})
|
||||
//_, err := RedisClient.Ping().Result()
|
||||
//if err != nil {
|
||||
// logger.Errorf("connRedis err", err)
|
||||
// panic(err)
|
||||
//}
|
||||
return nil
|
||||
redisDb, _ := strconv.Atoi(dciConfig.Data.Redis.DB)
|
||||
RedisClient := redis.NewClient(&redis.Options{
|
||||
Addr: dciConfig.Data.Redis.Addr,
|
||||
Password: dciConfig.Data.Redis.Password,
|
||||
DB: redisDb,
|
||||
})
|
||||
_, err := RedisClient.Ping().Result()
|
||||
if err != nil {
|
||||
logger.Errorf("connRedis err", err)
|
||||
panic(err)
|
||||
}
|
||||
return RedisClient
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
package err
|
||||
|
||||
var AmendType = map[string]string{
|
||||
"TOBE_AMEND": "待补正",
|
||||
"AMEND_CHECK_FAIL": "待补正审核不通过",
|
||||
"REPLACE_DCI": "需要替换DCI补正",
|
||||
"NO_NEED_REPLACE_DCI": "不需要替换DCI补正",
|
||||
}
|
@ -1 +0,0 @@
|
||||
package err
|
@ -1,6 +0,0 @@
|
||||
package err
|
||||
|
||||
var CertTypeMap = map[string]string{
|
||||
"IDENTITY_CARD": "身份证",
|
||||
"NATIONAL_LEGAL_MERGE": "统⼀社会信⽤代码",
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package err
|
||||
|
||||
var DciDigitalRegStatusEnum = map[string]string{
|
||||
"CHECK": "初审中",
|
||||
"CHECK_FAIL": "初审不通过",
|
||||
"PAY": "待支付",
|
||||
"REVIEW": "复审中",
|
||||
"TOBE_AMEND": "待补正",
|
||||
"AMEND_CHECK_FAIL": "待补正审核失败",
|
||||
"FINISH": "数登完成",
|
||||
"DISREGARD": "不予处理",
|
||||
"REGISTRATION_STOP": "申请停止",
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package err
|
||||
|
||||
var FailDetail = map[string]string{
|
||||
"CHECK_FAIL": "初审不通过",
|
||||
"TOBE_AMEND": "待补正",
|
||||
"AMEND_CHECK_FAIL": "待补正审核不通过",
|
||||
"DISREGARD": "不予受理",
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package err
|
||||
|
||||
var FontCopyrightEnum = map[string]string{
|
||||
"NO_NEED": "不涉及字体版权",
|
||||
"FREE_FONT": "公共免费字体",
|
||||
"ORIGINAL_FONT": "原创字体",
|
||||
"AUTHORIZED_FONT": "商用字体已授权",
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
package err
|
||||
|
||||
var InvoiceTypeEnum = map[string]string{
|
||||
"NORMAL": "普票",
|
||||
"SPECIAL": "专票",
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
package err
|
||||
|
||||
var OwnershipWay = map[string]string{
|
||||
"PERSON": "个人作品",
|
||||
"ENTERPRISE": "法人作品",
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package err
|
||||
|
||||
var PayStatus = map[string]string{
|
||||
"PAY_SUCCESS": "支付成功",
|
||||
"PAY_FAIL": "支付失败",
|
||||
"UNPAID": "待支付",
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package err
|
||||
|
||||
var PreRegistrationTrueWill = map[string]string{
|
||||
"PASSWORD": "密码验证",
|
||||
"CONFIRM_SMS": "用户短信验证",
|
||||
"LIVE_SMS": "指纹或视频人脸验证",
|
||||
"CERTIFICATE": "电子签名验证",
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package err
|
||||
|
||||
var PublicationStatus = map[string]string{
|
||||
"PUBLISHED": "作品已发表",
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package err
|
||||
|
||||
var ResultCode = map[string]string{
|
||||
"OK": "正常返回",
|
||||
"BAD_REQUEST": "请求参数错误",
|
||||
"PERMISSION_ERROR": "权限错误",
|
||||
"BUSINESS_ERROR": "业务内容错误",
|
||||
"SERVER_ERROR": "服务器错误",
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
package err
|
||||
|
||||
var ResultMsg = map[string]string{
|
||||
"PERMISSION_IS_NOT_EXIST": "权限未开通",
|
||||
"WORK_NAME_IS_NULL": "作品名称为空",
|
||||
"WORK_NAME_INVALID_LENGTH": "作品名称长度错误",
|
||||
"WORK_CATEGORY_INVALID": "作品类型错误",
|
||||
"WORK_FILE_ID_IS_NULL": "作品fileId为空",
|
||||
"WORK_FILE_NOT_EXIST": "作品文件不存在",
|
||||
"WORK_CREATION_INFO_IS_NULL": "作品创作信息为空",
|
||||
"WORK_CREATION_NATURE_INVALID": "作品创作性质错误",
|
||||
"WORK_CREATION_DATE_INVALID": "作品创作时间错误",
|
||||
"WORK_CREATION_CODE_IS_NULL": "作品创作地点为空",
|
||||
"WORK_PUBLICATION_INFO_IS_NULL": "作品发表信息为空",
|
||||
"WORK_PUBLICATION_STATUS_INVALID": "作品发表状态错误",
|
||||
"WORK_PUBLICATION_DATE_INVALID": "作品发表时间错误",
|
||||
"WORK_PUBLICATION_CODE_INVALID": "作品发表地点错误",
|
||||
"WORK_AUTHOR_NAME_IS_NULL": "作品作者名称为空",
|
||||
"WORK_RIGHT_INFO_IS_NULL": "作品权利信息为空",
|
||||
"WORK_RIGHT_SCOPE_INVALID": "作品权利范围错误",
|
||||
"WORK_RIGHT_OBTAIN_WAY_INVALID": "作品权利获取方式错误",
|
||||
"WORK_OWNERSHIP_WAY_INVALID": "作品权利归属方式错误",
|
||||
"PREREGISTRATION_TRUE_WILL_INVALID": "真实意愿表达错误",
|
||||
"ACCOUNT_BALANCE_STATUS_INVALID": "账号余额不足",
|
||||
"DCI_FILE_TYPE_INVALID": "dci文件类型错误",
|
||||
"DCI_COPYRIGHT_OWNER_ID_IS_NULL": "著作权人用户id为空",
|
||||
"DCI_COPYRIGHT_OWNER_ID_INVALID": "著作权人用户id无效",
|
||||
"DCI_CATEGORY_NOT_OPTIONAL": "DCI作品类型不可选",
|
||||
"DCI_FILE_SIZE_INVALID": "dci作品文件大小超限",
|
||||
"DCI_FILE_INVALID": "dci作品文件异常",
|
||||
"DCI_FILE_NAME_INVALID": "dci作品文件为空",
|
||||
"WORK_FILE_ID_INVALID": "dci作品文件id异常",
|
||||
"WORK_CREATION_CODE_INVALID": "作品创作地点无效",
|
||||
"CHANNEL_TERMINAL_INVALID": "渠道标签无效",
|
||||
"DCI_CONTENT_ALREADY_EXIST": "相同文件已发起过dci申领",
|
||||
"DCI_USER_ID_IS_NULL": "dci用户id为空",
|
||||
"DCI_USER_ID_INVALID": "dci用户id有误",
|
||||
"DCI_USER_CERT_FRONT_FILE_EMPTY": "dci证件正面文件入参为空",
|
||||
"DCI_USER_CERT_BACK_FILE_EMPTY": "dci证件背面文件入参为空",
|
||||
"DCI_USER_CERT_FRONT_FILE_NOT_EXIST": "dci证件正面文件不存在",
|
||||
"DCI_USER_CERT_BACK_FILE_NOT_EXIST": "dci用户证件背面文件不存在",
|
||||
"DCI_USER_PHONE_INVALID": "dci用户手机号无效",
|
||||
"DCI_USER_NAME_INVALID": "dci用户名错误",
|
||||
"DCI_USER_LEGAL_PERSON_CERT_NAME_EMPTY": "dci用户法人姓名无效",
|
||||
"DCI_USER_LEGAL_PERSON_CERT_TYPE_EMPTY": "dci用户法人证件类型无效",
|
||||
"DCI_USER_LEGAL_PERSON_CERT_NO_EMPTY": "dci用户法人证件号无效",
|
||||
"DCI_USER_LEGAL_PERSON_CERT_NO_INVALID": "dci用户法人证件号错误",
|
||||
"DCI_CERTIFICATE_START_TIME_INVALID": "dci证件开始时间错误",
|
||||
"DCI_CERTIFICATE_END_TIME_INVALID": "dci证件结束时间错误",
|
||||
"DCI_CERTIFICATE_FRONT_ID_INVALID": "dci证件正面文件d为空",
|
||||
"DCI_CERTIFICATE_FRONT_NOT_EXIST": "dci证件正面文件不存在",
|
||||
"DCI_CERTIFICATE_BACK_NOT_EXIST": "dci证件背面文件不存在",
|
||||
"DCI_IDENTITY_START_TIME_INVALID": "dci证件开始时间错误",
|
||||
"DCI_USER_AREA_INVALID": "dci用户所属地区错误,当前只支持CHINA_MAINLAND",
|
||||
"DCI_USER_ALREADY_EXIST": "已注册过dci用户",
|
||||
"DCI_CERTIFICATE_TYPE_INVALID": "dci证件类型错误",
|
||||
"DCI_CERTIFICATE_NUMBER_INVALID": "dci证件号错误",
|
||||
"DCI_CERTIFICATE_NUMBER_IS_NULL": "dci证件号为空",
|
||||
"DCI_USER_PHONE_IS_NULL": "dci用户手机号为空",
|
||||
"REPEAT_REQUEST_INTERCEPTION": "重复请求",
|
||||
"DCI_CONTENT_NOT_EXIST": "DCI作品不存在",
|
||||
"DCI_CONTENT_ID_INVALID": "dci申领id有误",
|
||||
"DCI_CONTENT_ID_IS_NULL": "dci申领id为空",
|
||||
"DCI_USER_NOT_EXIST": "dci用户不存在",
|
||||
"DCI_USER_NOT_MATCH": "dci用户不匹配",
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package err
|
||||
|
||||
var RightObtainWay = map[string]string{
|
||||
"ORIGINAL": "原创",
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package err
|
||||
|
||||
var RightScope = map[string]string{
|
||||
"ALL": "全选",
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
package err
|
||||
|
||||
var UserStatus = map[string]string{
|
||||
"NORMAL": "正常",
|
||||
"DISABLE": "停用",
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package err
|
||||
|
||||
var WorkCreationNature = map[string]string{
|
||||
"ORIGINAL": "原创",
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package err
|
||||
|
||||
var WorkStatus = map[string]string{
|
||||
"DCI_PRE_REG_AUDITING": "申领审核中",
|
||||
"DCI_PRE_REG_FINISH": "申领成功",
|
||||
"DCI_PRE_REG_FAIL": "申领失败",
|
||||
"DCI_PRE_REG_CANCEL": "dci撤销",
|
||||
"DCI_PRE_REG_TOBE_CONFIRM": "申领待确认,账户余额不足",
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package common
|
||||
|
||||
import "chain-dci/pkg/db"
|
||||
|
||||
func Init() {
|
||||
//db.DBMigration()
|
||||
db.DBMigration()
|
||||
}
|
||||
|
@ -1,18 +1,5 @@
|
||||
package msg
|
||||
|
||||
const (
|
||||
ErrFileIsEmpty = "未获取到相关文件"
|
||||
ErrCreateClientToken = "创建clientToken失败"
|
||||
ErrAddDciUser = "著作权人申领DCI信息失败"
|
||||
ErrUpdateDciUser = "著作权人更新DCI信息失败"
|
||||
ErrQueryDciUser = "著作权人查询DCI信息失败"
|
||||
ErrCreateDciPreregistration = "作品申领DCI失败"
|
||||
ErrQueryDciPreregistration = "作品查询DCI失败"
|
||||
ErrCreateDciRegistration = "发起数登申请失败"
|
||||
ErrQueryDciRegistration = "查询数登申请失败"
|
||||
ErrGetDciPayurl = "数登支付链接获取失败"
|
||||
ErrQueryDciPay = "数登支付查询失败"
|
||||
ErrGetDciRegistrationcert = "获取数登证书下载失败"
|
||||
ErrRetryDciRegistration = "补正申请失败"
|
||||
ErrCloseDciRegistration = "数登停止申请失败"
|
||||
ErrrFileIsEmpty = "未获取到相关文件"
|
||||
)
|
||||
|
Loading…
Reference in New Issue