初始化仓库
This commit is contained in:
parent
c181cc2700
commit
59a540080e
14
Dockerfile
14
Dockerfile
@ -8,11 +8,11 @@ RUN go env -w GO111MODULE=on && \
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
COPY fonchain-approval /app/fonchain-approval
|
||||
COPY fonchain-approval /app/fonchain-approval-fork
|
||||
|
||||
WORKDIR /app/fonchain-approval
|
||||
WORKDIR /app/fonchain-approval-fork
|
||||
RUN go mod download
|
||||
RUN go build -o /app/fonchain-approval/bin/approval cmd/app.go
|
||||
RUN go build -o /app/fonchain-approval-fork/bin/approval cmd/app.go
|
||||
|
||||
|
||||
FROM alpine
|
||||
@ -20,10 +20,10 @@ RUN apk update --no-cache && apk add --no-cache ca-certificates tzdata
|
||||
ENV TZ Asia/Shanghai
|
||||
WORKDIR /app/approval
|
||||
#通过名称引用
|
||||
COPY --from=builder /app/fonchain-approval/bin/approval ./bin/approval
|
||||
#COPY --from=builder /app/fonchain-approval/conf/ ./conf/
|
||||
COPY --from=builder /app/fonchain-approval/conf/ ./conf/
|
||||
COPY --from=builder /app/fonchain-approval/conf/ ../conf/
|
||||
COPY --from=builder /app/fonchain-approval-fork/bin/approval ./bin/approval
|
||||
#COPY --from=builder /app/fonchain-approval-fork/conf/ ./conf/
|
||||
COPY --from=builder /app/fonchain-approval-fork/conf/ ./conf/
|
||||
COPY --from=builder /app/fonchain-approval-fork/conf/ ../conf/
|
||||
|
||||
WORKDIR /app/approval/bin
|
||||
EXPOSE 20003
|
||||
|
@ -9,7 +9,7 @@
|
||||
### protot文件编译指令
|
||||
|
||||
```shell
|
||||
protoc --proto_path=. --proto_path=D:/go_workspace/src --go_out=./api/approval --govalidators_out=./api/approval --go-triple_out=./api/approval ./api/approval/approval.proto
|
||||
protoc --proto_path=. --proto_path=D:/go_workspace/src --go_out=./api/approvalFork --govalidators_out=./api/approvalFork --go-triple_out=./api/approvalFork ./api/approval/approvalFork.proto
|
||||
```
|
||||
|
||||
## 二、测试启动fontree-client
|
||||
|
@ -1,545 +0,0 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: api/approval/approval.proto
|
||||
|
||||
package approval
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
_ "github.com/mwitkow/go-proto-validators"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *CommonResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ChangeBundlePayRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *IsExistPayRightRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *IsExistPayRightResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *KeyInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateEhApplyIDRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateEhApplyIDResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UsedNumByUserRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UsedNumByUserResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *NowLevelByInfoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WorkFlowResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CommonRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateTypeRequest) Validate() error {
|
||||
for _, item := range this.KeyInfos {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("KeyInfos", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *TypeResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *AllTypeResponse) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateTypeGroupRequest) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AllGroupResponse) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *StatusRequest) Validate() error {
|
||||
if !(this.Status > 0) {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Status", fmt.Errorf(`70008`))
|
||||
}
|
||||
if !(this.Status < 4) {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Status", fmt.Errorf(`70008`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *StatusResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ListResponse) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ViewedRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InformationRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Information) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InformationResponse) Validate() error {
|
||||
if this.MySubmitInfo != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.MySubmitInfo); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("MySubmitInfo", err)
|
||||
}
|
||||
}
|
||||
if this.SubmitMeInfo != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.SubmitMeInfo); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("SubmitMeInfo", err)
|
||||
}
|
||||
}
|
||||
if this.DomainInfo != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.DomainInfo); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DomainInfo", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Bundle) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Show) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ApprovalWork) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Work) Validate() error {
|
||||
for _, item := range this.ApprovalWorks {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalWorks", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ApprovalExhibition) Validate() error {
|
||||
for _, item := range this.Artworks {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Artworks", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if this.ArtExhibitionDetail != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ArtExhibitionDetail); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ArtExhibitionDetail", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Exhibition) Validate() error {
|
||||
for _, item := range this.ApprovalExhibitions {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalExhibitions", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Artwork) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ArtExhibitionDetail) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BundlePayPrice) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
if this.Type == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Type", fmt.Errorf(`70009`))
|
||||
}
|
||||
for _, item := range this.CopyUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CopyUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if this.Work != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Work); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Work", err)
|
||||
}
|
||||
}
|
||||
if this.Show != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Show); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Show", err)
|
||||
}
|
||||
}
|
||||
if this.Exhibition != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Exhibition); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Exhibition", err)
|
||||
}
|
||||
}
|
||||
if this.Bundle != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Bundle); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Bundle", err)
|
||||
}
|
||||
}
|
||||
for _, item := range this.ApprovalUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.WorkFlows {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("WorkFlows", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.CustomizeInfo {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CustomizeInfo", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if this.BundlePayPrice != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.BundlePayPrice); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("BundlePayPrice", err)
|
||||
}
|
||||
}
|
||||
if this.ApprovalOA != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ApprovalOA); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalOA", err)
|
||||
}
|
||||
}
|
||||
if this.FinancialForm != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.FinancialForm); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("FinancialForm", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *WorkFlow) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DetailRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RemoveRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ApprovalResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RemoveResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ApprovalExhibitionRemove) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ApprovalExhibitionRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ApprovalExhibitionDetail) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CopyUser) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ApprovalUser) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SettingRequest) Validate() error {
|
||||
for _, item := range this.CopyUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CopyUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.ApprovalUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.CustomizeInfo {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CustomizeInfo", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DetailSettingRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SettingResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ApplyTime) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ApprovalOA) Validate() error {
|
||||
if this.LeaveApply != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.LeaveApply); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("LeaveApply", err)
|
||||
}
|
||||
}
|
||||
if this.OutWork != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.OutWork); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("OutWork", err)
|
||||
}
|
||||
}
|
||||
if this.MakeUp != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.MakeUp); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("MakeUp", err)
|
||||
}
|
||||
}
|
||||
if this.Turnover != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Turnover); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Turnover", err)
|
||||
}
|
||||
}
|
||||
if this.OverTime != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.OverTime); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("OverTime", err)
|
||||
}
|
||||
}
|
||||
if this.Leave != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Leave); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Leave", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *LeaveApply) Validate() error {
|
||||
for _, item := range this.CopyUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CopyUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.ApprovalUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *OutWorkApply) Validate() error {
|
||||
for _, item := range this.ApplyTimes {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApplyTimes", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.CopyUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CopyUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.ApprovalUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *MakeUpApply) Validate() error {
|
||||
for _, item := range this.ApplyTimes {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApplyTimes", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.CopyUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CopyUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.ApprovalUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *TurnoverApply) Validate() error {
|
||||
for _, item := range this.ApplyTimes {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApplyTimes", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.CopyUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CopyUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.ApprovalUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *OverTimeApply) Validate() error {
|
||||
for _, item := range this.ApplyTimes {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApplyTimes", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.CopyUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CopyUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.ApprovalUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Leave) Validate() error {
|
||||
for _, item := range this.ApplyTimes {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApplyTimes", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.CopyUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CopyUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.ApprovalUsers {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ApprovalUsers", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateApprovalOAUUIDReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateApprovalOAUUIDResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetNameRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetNameResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FinancialForm) Validate() error {
|
||||
for _, item := range this.CostInfo {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CostInfo", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.InvoiceInfo {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("InvoiceInfo", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CostInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InvoiceInfo) Validate() error {
|
||||
return nil
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,9 @@
|
||||
syntax = "proto3";
|
||||
package approval;
|
||||
import "github.com/mwitkow/go-proto-validators@v0.3.2/validator.proto";
|
||||
package approvalFork;
|
||||
|
||||
option go_package = "./;approval";
|
||||
option go_package = "./;approvalFork";
|
||||
|
||||
// The approval service definition.
|
||||
// The approval_fork service definition.
|
||||
service Approval {
|
||||
|
||||
rpc Create(CreateRequest) returns (ApprovalResponse) {};
|
||||
@ -25,7 +24,7 @@ service Approval {
|
||||
rpc IsExistPayRight(IsExistPayRightRequest) returns (IsExistPayRightResponse) {};//是否有
|
||||
rpc ChangeBundlePay(ChangeBundlePayRequest) returns (CommonResponse) {};//是否有
|
||||
|
||||
rpc CreateType(CreateTypeRequest) returns (TypeResponse) {};
|
||||
rpc CreateType(CreateTypeRequest) returns (TypeResponse) {}
|
||||
rpc DetailType(TypeResponse) returns (CreateTypeRequest) {};
|
||||
rpc UpdateType(CreateTypeRequest) returns (TypeResponse) {};
|
||||
rpc AllType(CommonRequest) returns (AllTypeResponse) {};
|
||||
@ -144,7 +143,7 @@ message StatusRequest {
|
||||
uint64 ID = 2 [json_name = "ID"];
|
||||
string Reply = 3 [json_name = "Reply"];
|
||||
uint64 WorkFlowId = 4 [json_name = "workFlowId"];
|
||||
uint64 Status = 5 [json_name = "status",(validator.field) = {int_lt: 4,int_gt: 0,human_error: "70008"}];
|
||||
uint64 Status = 5 [json_name = "status"];
|
||||
uint64 Level = 6 [json_name = "level"];
|
||||
string Title = 7 [json_name = "title"];
|
||||
uint64 UserId = 8 [json_name = "userId"];
|
||||
@ -156,7 +155,7 @@ message StatusResponse {
|
||||
}
|
||||
|
||||
message ListRequest {
|
||||
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
||||
string Domain = 1 [json_name = "domain" ];
|
||||
uint64 PageSize = 2 [json_name = "PageSize"]; //
|
||||
uint64 Page = 3 [json_name = "Page"]; //
|
||||
uint64 Status = 4 [json_name = "status"];//0待审批 1-审批成功 2-拒绝 4-是所有
|
||||
@ -314,9 +313,9 @@ message BundlePayPrice {
|
||||
|
||||
message CreateRequest {
|
||||
uint64 ID = 1 [json_name = "ID"];
|
||||
string Domain = 2 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
||||
string Domain = 2 [json_name = "domain" ];
|
||||
uint64 Status = 3 [json_name = "status"];
|
||||
string Type = 4 [json_name = "type",(validator.field) = {string_not_empty: true,human_error: "70009"} ];
|
||||
string Type = 4 [json_name = "type" ];
|
||||
uint64 SubmitterID = 7 [json_name = "submitterID"];//审批人
|
||||
string SubmitterName = 8 [json_name = "submitterName"];
|
||||
repeated CopyUser CopyUsers = 9 [json_name = "copyName"];//抄送人
|
@ -1,10 +1,10 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.10.1
|
||||
// source: api/approval/approval.proto
|
||||
// - protoc-gen-go-triple v1.0.5
|
||||
// - protoc v4.23.3
|
||||
// source: approvalFork.proto
|
||||
|
||||
package approval
|
||||
package approvalFork
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -92,7 +92,7 @@ func (c *ApprovalClientImpl) GetDubboStub(cc *triple.TripleConn) ApprovalClient
|
||||
}
|
||||
|
||||
func (c *ApprovalClientImpl) XXX_InterfaceName() string {
|
||||
return "approval.Approval"
|
||||
return "approvalFork.Approval"
|
||||
}
|
||||
|
||||
func NewApprovalClient(cc *triple.TripleConn) ApprovalClient {
|
||||
@ -365,7 +365,7 @@ func (s *UnimplementedApprovalServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &Approval_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedApprovalServer) XXX_InterfaceName() string {
|
||||
return "approval.Approval"
|
||||
return "approvalFork.Approval"
|
||||
}
|
||||
|
||||
func (UnimplementedApprovalServer) mustEmbedUnimplementedApprovalServer() {}
|
||||
@ -1081,7 +1081,7 @@ func _Approval_UpdateApprovalOAUUID_Handler(srv interface{}, ctx context.Context
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Approval_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "approval.Approval",
|
||||
ServiceName: "approvalFork.Approval",
|
||||
HandlerType: (*ApprovalServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
@ -1182,5 +1182,5 @@ var Approval_ServiceDesc = grpc_go.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "api/approval/approval.proto",
|
||||
Metadata: "approvalFork.proto",
|
||||
}
|
@ -21,8 +21,8 @@ import (
|
||||
"dubbo.apache.org/dubbo-go/v3/config"
|
||||
_ "dubbo.apache.org/dubbo-go/v3/filter/token"
|
||||
_ "dubbo.apache.org/dubbo-go/v3/imports"
|
||||
_ "github.com/fonchain_enterprise/fonchain-approval/pkg/common/filter"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/service"
|
||||
_ "github.com/fonchain_enterprise/fonchain-approval-fork/pkg/common/filter"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/service"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -4,7 +4,7 @@ DbHost = 127.0.0.1
|
||||
DbPort = 3306
|
||||
DbUser = root
|
||||
DbPassWord = 123456
|
||||
DbName = fontree-approval
|
||||
DbName = fontree-approval-fork
|
||||
|
||||
[redis]
|
||||
RedisDB =
|
||||
|
@ -14,7 +14,7 @@
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
-- 导出 表 fontree-approval.approval 结构
|
||||
-- 导出 表 fontree-approval-fork.approval 结构
|
||||
CREATE TABLE IF NOT EXISTS `approval` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`domain` varchar(50) NOT NULL COMMENT '环境变量',
|
||||
@ -40,7 +40,7 @@ CREATE TABLE IF NOT EXISTS `approval` (
|
||||
|
||||
-- 数据导出被取消选择。
|
||||
|
||||
-- 导出 表 fontree-approval.approval_exhibition 结构
|
||||
-- 导出 表 fontree-approval-fork.approval_exhibition 结构
|
||||
CREATE TABLE IF NOT EXISTS `approval_exhibition` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`deleted_at` int(11) NOT NULL COMMENT '删除时间',
|
||||
@ -57,7 +57,7 @@ CREATE TABLE IF NOT EXISTS `approval_exhibition` (
|
||||
|
||||
-- 数据导出被取消选择。
|
||||
|
||||
-- 导出 表 fontree-approval.approval_setting 结构
|
||||
-- 导出 表 fontree-approval-fork.approval_setting 结构
|
||||
CREATE TABLE IF NOT EXISTS `approval_setting` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`deleted_at` int(11) NOT NULL DEFAULT '0' COMMENT '删除标记',
|
||||
@ -73,7 +73,7 @@ CREATE TABLE IF NOT EXISTS `approval_setting` (
|
||||
|
||||
-- 数据导出被取消选择。
|
||||
|
||||
-- 导出 表 fontree-approval.approval_type 结构
|
||||
-- 导出 表 fontree-approval-fork.approval_type 结构
|
||||
CREATE TABLE IF NOT EXISTS `approval_type` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`domain` varchar(50) DEFAULT NULL COMMENT '环境Code',
|
||||
@ -89,7 +89,7 @@ CREATE TABLE IF NOT EXISTS `approval_type` (
|
||||
|
||||
-- 数据导出被取消选择。
|
||||
|
||||
-- 导出 表 fontree-approval.approval_work 结构
|
||||
-- 导出 表 fontree-approval-fork.approval_work 结构
|
||||
CREATE TABLE IF NOT EXISTS `approval_work` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`deleted_at` int(11) NOT NULL COMMENT '删除时间',
|
||||
@ -107,7 +107,7 @@ CREATE TABLE IF NOT EXISTS `approval_work` (
|
||||
|
||||
-- 数据导出被取消选择。
|
||||
|
||||
-- 导出 表 fontree-approval.approval_workflow 结构
|
||||
-- 导出 表 fontree-approval-fork.approval_workflow 结构
|
||||
CREATE TABLE IF NOT EXISTS `approval_workflow` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`deleted_at` int(11) DEFAULT NULL,
|
||||
@ -125,7 +125,7 @@ CREATE TABLE IF NOT EXISTS `approval_workflow` (
|
||||
|
||||
-- 数据导出被取消选择。
|
||||
|
||||
-- 导出 表 fontree-approval.bundle 结构
|
||||
-- 导出 表 fontree-approval-fork.bundle 结构
|
||||
CREATE TABLE IF NOT EXISTS `bundle` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`deleted_at` int(11) NOT NULL COMMENT '删除时间',
|
||||
@ -140,7 +140,7 @@ CREATE TABLE IF NOT EXISTS `bundle` (
|
||||
|
||||
-- 数据导出被取消选择。
|
||||
|
||||
-- 导出 表 fontree-approval.exhibition 结构
|
||||
-- 导出 表 fontree-approval-fork.exhibition 结构
|
||||
CREATE TABLE IF NOT EXISTS `exhibition` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`deleted_at` int(11) NOT NULL COMMENT '删除时间',
|
||||
@ -154,7 +154,7 @@ CREATE TABLE IF NOT EXISTS `exhibition` (
|
||||
|
||||
-- 数据导出被取消选择。
|
||||
|
||||
-- 导出 表 fontree-approval.show 结构
|
||||
-- 导出 表 fontree-approval-fork.show 结构
|
||||
CREATE TABLE IF NOT EXISTS `show` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`deleted_at` int(11) NOT NULL COMMENT '删除时间',
|
||||
@ -168,7 +168,7 @@ CREATE TABLE IF NOT EXISTS `show` (
|
||||
|
||||
-- 数据导出被取消选择。
|
||||
|
||||
-- 导出 表 fontree-approval.ssd 结构
|
||||
-- 导出 表 fontree-approval-fork.ssd 结构
|
||||
CREATE TABLE IF NOT EXISTS `ssd` (
|
||||
`id` int(11) DEFAULT NULL,
|
||||
`approval` int(11) DEFAULT NULL COMMENT '关联的申请',
|
||||
@ -181,7 +181,7 @@ CREATE TABLE IF NOT EXISTS `ssd` (
|
||||
|
||||
-- 数据导出被取消选择。
|
||||
|
||||
-- 导出 表 fontree-approval.work 结构
|
||||
-- 导出 表 fontree-approval-fork.work 结构
|
||||
CREATE TABLE IF NOT EXISTS `work` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`deleted_at` int(11) NOT NULL COMMENT '删除时间',
|
||||
|
2
docs/env/dev/conf.ini
vendored
2
docs/env/dev/conf.ini
vendored
@ -8,7 +8,7 @@ DbHost = mysql
|
||||
DbPort = 3306
|
||||
DbUser = root
|
||||
DbPassWord = 123456
|
||||
DbName = fontree-approval
|
||||
DbName = fontree-approval-fork
|
||||
|
||||
[redis]
|
||||
RedisDB =
|
||||
|
2
docs/env/k8s/conf.ini
vendored
2
docs/env/k8s/conf.ini
vendored
@ -8,7 +8,7 @@ DbHost="svc-fontree-mysql-service"
|
||||
DbPort="3306"
|
||||
DbUser="fonchain_opv"
|
||||
DbPassWord="IhQmhg8HZjDmU=Ove5PnA^D"
|
||||
DbName="fontree-approval"
|
||||
DbName="fontree-approval-fork"
|
||||
|
||||
[redis]
|
||||
RedisDB =
|
||||
|
2
docs/env/local/conf.ini
vendored
2
docs/env/local/conf.ini
vendored
@ -8,7 +8,7 @@ DbHost = 127.0.0.1
|
||||
DbPort = 3306
|
||||
DbUser = root
|
||||
DbPassWord = 123456
|
||||
DbName = fontree-approval
|
||||
DbName = fontree-approval-fork
|
||||
|
||||
[redis]
|
||||
RedisDB =
|
||||
|
2
docs/env/prod/conf.ini
vendored
2
docs/env/prod/conf.ini
vendored
@ -8,7 +8,7 @@ DbHost="172.16.100.30"
|
||||
DbPort="3306"
|
||||
DbUser="root"
|
||||
DbPassWord="IhQmhg8HZjDmU=Ove5PnA^D"
|
||||
DbName="fontree-approval"
|
||||
DbName="fontree-approval-fork"
|
||||
|
||||
[redis]
|
||||
RedisDB =
|
||||
|
2
docs/env/test/conf.ini
vendored
2
docs/env/test/conf.ini
vendored
@ -8,7 +8,7 @@ DbHost = mysql
|
||||
DbPort = 3306
|
||||
DbUser = root
|
||||
DbPassWord = 123456
|
||||
DbName = fontree-approval
|
||||
DbName = fontree-approval-fork
|
||||
|
||||
[redis]
|
||||
RedisDB =
|
||||
|
7
go.mod
7
go.mod
@ -1,14 +1,14 @@
|
||||
module github.com/fonchain_enterprise/fonchain-approval
|
||||
module github.com/fonchain_enterprise/fonchain-approval-fork
|
||||
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.2
|
||||
github.com/dubbogo/grpc-go v1.42.9
|
||||
github.com/dubbogo/triple v1.1.8
|
||||
github.com/gin-gonic/gin v1.8.1
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/mwitkow/go-proto-validators v0.3.2
|
||||
github.com/jinzhu/copier v0.3.5
|
||||
github.com/mwitkow/go-proto-validators v0.3.2
|
||||
github.com/pkg/errors v0.9.1
|
||||
google.golang.org/protobuf v1.28.0
|
||||
gopkg.in/ini.v1 v1.66.6
|
||||
@ -71,7 +71,6 @@ require (
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/vault/sdk v0.3.0 // indirect
|
||||
github.com/jinzhu/copier v0.3.5 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
|
@ -19,7 +19,7 @@ package filter
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/e"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/e"
|
||||
perrors "github.com/pkg/errors"
|
||||
"regexp"
|
||||
"strconv"
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/common/page"
|
||||
msg "github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/common/page"
|
||||
msg "github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"github.com/jinzhu/copier"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
@ -569,7 +569,7 @@ func (m *Approval) UpdateContent(in *approval.CreateRequest) error {
|
||||
return err
|
||||
}
|
||||
|
||||
//MyAllWorkApprovals 待阅读的和待我操作的
|
||||
// MyAllWorkApprovals 待阅读的和待我操作的
|
||||
func MyAllWorkApprovals(in *approval.ListRequest) ([]*Approval, int64) {
|
||||
var list []*Approval
|
||||
var ids []string
|
||||
|
@ -1,7 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
@ -2,8 +2,8 @@ package model
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
md52 "github.com/fonchain_enterprise/fonchain-approval/pkg/common/md5"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
md52 "github.com/fonchain_enterprise/fonchain-approval-fork/pkg/common/md5"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
|
@ -2,7 +2,7 @@ package model
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
)
|
||||
|
@ -2,8 +2,8 @@ package model
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
)
|
||||
@ -25,7 +25,7 @@ func (m *Bundle) TableName() string {
|
||||
return "bundle"
|
||||
}
|
||||
|
||||
func (m *Bundle) GetApproval(id uint64) (*Approval,error) {
|
||||
func (m *Bundle) GetApproval(id uint64) (*Approval, error) {
|
||||
|
||||
var entity *Approval
|
||||
if err := DB.
|
||||
@ -33,10 +33,10 @@ func (m *Bundle) GetApproval(id uint64) (*Approval,error) {
|
||||
Preload("ApprovalType").
|
||||
Preload("Bundle").
|
||||
First(&entity, id).Error; err != nil {
|
||||
return entity,err
|
||||
return entity, err
|
||||
}
|
||||
|
||||
return entity,nil
|
||||
return entity, nil
|
||||
}
|
||||
|
||||
func (m *Bundle) SaveApprovalContent(in *approval.CreateRequest, a *Approval) error {
|
||||
|
@ -2,8 +2,8 @@ package model
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
)
|
||||
|
@ -3,9 +3,9 @@ package model
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/common/collection"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/common/collection"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
)
|
||||
|
@ -3,9 +3,9 @@ package model
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/common/collection"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/common/collection"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
)
|
||||
@ -143,7 +143,7 @@ func (m *ExhibitionReward) UpdateApprovalContent(in *approval.CreateRequest, a *
|
||||
return m.UpdateContent(in, a)
|
||||
}
|
||||
|
||||
//UpdateContent 更新内容
|
||||
// UpdateContent 更新内容
|
||||
func (m *ExhibitionReward) UpdateContent(in *approval.CreateRequest, a *Approval) error {
|
||||
approvalExhibitions := in.Exhibition.ApprovalExhibitions
|
||||
var oldApprovalExhibitions []ApprovalReward
|
||||
|
@ -2,8 +2,8 @@ package model
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"github.com/jinzhu/copier"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
|
@ -5,9 +5,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gopkg.in/ini.v1"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/logger"
|
||||
|
@ -2,8 +2,8 @@ package model
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
)
|
||||
@ -24,7 +24,7 @@ func (m *Show) TableName() string {
|
||||
return "show"
|
||||
}
|
||||
|
||||
func (m *Show) GetApproval(id uint64) (*Approval,error) {
|
||||
func (m *Show) GetApproval(id uint64) (*Approval, error) {
|
||||
|
||||
var entity *Approval
|
||||
if err := DB.
|
||||
@ -32,10 +32,10 @@ func (m *Show) GetApproval(id uint64) (*Approval,error) {
|
||||
Preload("ApprovalType").
|
||||
Preload("Show").
|
||||
First(&entity, id).Error; err != nil {
|
||||
return entity,err
|
||||
return entity, err
|
||||
}
|
||||
|
||||
return entity,nil
|
||||
return entity, nil
|
||||
}
|
||||
|
||||
func (m *Show) SaveApprovalContent(in *approval.CreateRequest, a *Approval) error {
|
||||
|
@ -3,9 +3,9 @@ package model
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/common/collection"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/common/collection"
|
||||
m2 "github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
)
|
||||
@ -28,7 +28,7 @@ func (m *Work) TableName() string {
|
||||
return "work"
|
||||
}
|
||||
|
||||
func (m *Work) GetApproval(id uint64) (*Approval,error) {
|
||||
func (m *Work) GetApproval(id uint64) (*Approval, error) {
|
||||
|
||||
var entity *Approval
|
||||
if err := DB.
|
||||
@ -36,10 +36,10 @@ func (m *Work) GetApproval(id uint64) (*Approval,error) {
|
||||
Preload("ApprovalType").
|
||||
Preload("Work.ApprovalWorks").
|
||||
First(&entity, id).Error; err != nil {
|
||||
return entity,err
|
||||
return entity, err
|
||||
}
|
||||
|
||||
return entity,nil
|
||||
return entity, nil
|
||||
}
|
||||
|
||||
func (m *Work) SaveApprovalContent(in *approval.CreateRequest, a *Approval) error {
|
||||
|
@ -1,12 +1,12 @@
|
||||
package serializer
|
||||
|
||||
import (
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/e"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/model"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/e"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/model"
|
||||
)
|
||||
|
||||
//BuildApproval 处理单个detail返回
|
||||
// BuildApproval 处理单个detail返回
|
||||
func BuildApproval(entity *model.Approval, userId uint64) *approval.CreateRequest {
|
||||
var work *approval.Work
|
||||
var show *approval.Show
|
||||
@ -99,7 +99,7 @@ func BuildApproval(entity *model.Approval, userId uint64) *approval.CreateReques
|
||||
return response
|
||||
}
|
||||
|
||||
//BuildApprovals 处理单个detail返回
|
||||
// BuildApprovals 处理单个detail返回
|
||||
func BuildApprovals(list []*model.Approval, userId uint64) (details []*approval.CreateRequest) {
|
||||
|
||||
for _, item := range list {
|
||||
|
@ -1,12 +1,12 @@
|
||||
package serializer
|
||||
|
||||
import (
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/e"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/model"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/e"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/model"
|
||||
)
|
||||
|
||||
//BuildType 处理单个detail返回
|
||||
// BuildType 处理单个detail返回
|
||||
func BuildType(entity *model.ApprovalType) *approval.CreateTypeRequest {
|
||||
|
||||
response := &approval.CreateTypeRequest{
|
||||
@ -47,7 +47,7 @@ func BuildKeyInfo(infos model.KeyInfos) []*approval.KeyInfo {
|
||||
return keyInfos
|
||||
}
|
||||
|
||||
//BuildGroup 处理单个detail返回
|
||||
// BuildGroup 处理单个detail返回
|
||||
func BuildGroup(entity *model.ApprovalTypeGroup) *approval.CreateTypeGroupRequest {
|
||||
|
||||
response := &approval.CreateTypeGroupRequest{
|
||||
|
@ -1,12 +1,12 @@
|
||||
package serializer
|
||||
|
||||
import (
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/e"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/model"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/e"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/model"
|
||||
)
|
||||
|
||||
//BuildSetting 处理单个detail返回
|
||||
// BuildSetting 处理单个detail返回
|
||||
func BuildSetting(entity *model.ApprovalSetting) *approval.SettingRequest {
|
||||
var copyUsers []*approval.CopyUser
|
||||
var approvalUser []*approval.ApprovalUser
|
||||
|
@ -4,11 +4,11 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/common/page"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/model"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/serializer"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/common/page"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/m"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/model"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/serializer"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/e"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/model"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/e"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/model"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
@ -2,8 +2,8 @@ package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval/pkg/model"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/api/approval"
|
||||
"github.com/fonchain_enterprise/fonchain-approval-fork/pkg/model"
|
||||
)
|
||||
|
||||
func (a *ApprovalProvider) GetName(ctx context.Context, in *approval.GetNameRequest) (*approval.GetNameResponse, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user