Compare commits
No commits in common. "main" and "master" have entirely different histories.
37
.gitignore
vendored
37
.gitignore
vendored
@ -1,37 +0,0 @@
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
*.iml
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
|
||||
/cmd/logs/*.log
|
||||
/cmd/runtime/log/*.log
|
||||
/build/*
|
||||
conf/conf.ini
|
@ -1,9 +0,0 @@
|
||||
<?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>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/fonchain-artistinfo.iml" filepath="$PROJECT_DIR$/.idea/fonchain-artistinfo.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,128 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="ALL" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="853fcb60-a62b-4975-bc33-7fe9b5daba92" name="Changes" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="Go File" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="GOROOT" url="file://$USER_HOME$/.g/go" />
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProjectId" id="2LrJWBpeAE7xjhfmBJcHGq1aluW" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"DefaultGoTemplateProperty": "Go File",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.go.formatter.settings.were.checked": "true",
|
||||
"RunOnceActivity.go.migrated.go.modules.settings": "true",
|
||||
"RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"configurable..is.expanded": "false",
|
||||
"configurable.GoLibrariesConfigurable.is.expanded": "true",
|
||||
"go.import.settings.migrated": "true",
|
||||
"go.sdk.automatically.set": "true",
|
||||
"last_opened_file_path": "D:/jjxu/work/projects/fonchain-artistinfo/pb",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"settings.editor.selected.configurable": "editing.templates"
|
||||
}
|
||||
}</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="D:\jjxu\work\projects\fonchain-artistinfo\pb" />
|
||||
<recent name="D:\jjxu\work\projects\fonchain-artistinfo\conf" />
|
||||
<recent name="D:\jjxu\work\projects\fonchain-artistinfo\conf\xjjdev" />
|
||||
<recent name="D:\jjxu\work\projects\fonchain-artistinfo\conf\test" />
|
||||
<recent name="D:\jjxu\work\projects\fonchain-artistinfo" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="D:\jjxu\work\projects\fonchain-artistinfo\cmd\model\old" />
|
||||
<recent name="D:\jjxu\work\projects\fonchain-artistinfo\cmd\model" />
|
||||
<recent name="D:\jjxu\work\projects\fonchain-artistinfo\pb\old" />
|
||||
<recent name="D:\jjxu\work\projects\fonchain-artistinfo\pb" />
|
||||
<recent name="D:\jjxu\work\projects\fonchain-artistinfo\pb\artistinfo" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration name="go build app.go" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
|
||||
<module name="fonchain-artistinfo" />
|
||||
<working_directory value="$PROJECT_DIR$/cmd" />
|
||||
<kind value="FILE" />
|
||||
<package value="github.com/fonchain/fonchain-artistinfo/cmd" />
|
||||
<directory value="$PROJECT_DIR$" />
|
||||
<filePath value="$PROJECT_DIR$/cmd/app.go" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Go Build.go build app.go" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VgoProject">
|
||||
<environment>
|
||||
<map>
|
||||
<entry key="GOPROXY" value="https://goproxy.cn,direct" />
|
||||
</map>
|
||||
</environment>
|
||||
<settings-migrated>true</settings-migrated>
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<breakpoints>
|
||||
<line-breakpoint enabled="true" type="DlvLineBreakpoint">
|
||||
<url>file://$PROJECT_DIR$/cmd/internal/logic/artistinfo_artshowArtistSupplement.go</url>
|
||||
<line>58</line>
|
||||
<option name="timeStamp" value="18" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DlvLineBreakpoint">
|
||||
<url>file://$PROJECT_DIR$/cmd/internal/dao/artistInfo_user.go</url>
|
||||
<line>34</line>
|
||||
<option name="timeStamp" value="32" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
<watches-manager>
|
||||
<configuration name="GoApplicationRunConfiguration">
|
||||
<watch expression="*(*"[]*github.com/fonchain/fonchain-artistinfo/pb/artwork_query.ArtworkPreviewResponse")(824648763672)" />
|
||||
</configuration>
|
||||
</watches-manager>
|
||||
</component>
|
||||
</project>
|
20
.vscode/launch.json
vendored
20
.vscode/launch.json
vendored
@ -1,20 +0,0 @@
|
||||
{
|
||||
// 使用 IntelliSense 了解相关属性。
|
||||
// 悬停以查看现有属性的描述。
|
||||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch Package",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"env": {
|
||||
"GOPATH":"C:\\Users\\lenovo\\go",
|
||||
"GOOS":"windows"
|
||||
},
|
||||
"program": "${workspaceFolder}\\cmd",
|
||||
"args":[]
|
||||
}
|
||||
]
|
||||
}
|
22
.vscode/settings.json
vendored
22
.vscode/settings.json
vendored
@ -1,22 +0,0 @@
|
||||
{
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#fa1b49",
|
||||
"activityBar.background": "#fa1b49",
|
||||
"activityBar.foreground": "#e7e7e7",
|
||||
"activityBar.inactiveForeground": "#e7e7e799",
|
||||
"activityBarBadge.background": "#155e02",
|
||||
"activityBarBadge.foreground": "#e7e7e7",
|
||||
"commandCenter.border": "#e7e7e799",
|
||||
"sash.hoverBorder": "#fa1b49",
|
||||
"statusBar.background": "#dd0531",
|
||||
"statusBar.foreground": "#e7e7e7",
|
||||
"statusBarItem.hoverBackground": "#fa1b49",
|
||||
"statusBarItem.remoteBackground": "#dd0531",
|
||||
"statusBarItem.remoteForeground": "#e7e7e7",
|
||||
"titleBar.activeBackground": "#dd0531",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveBackground": "#dd053199",
|
||||
"titleBar.inactiveForeground": "#e7e7e799"
|
||||
},
|
||||
"peacock.color": "#dd0531"
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
go env -w GOOS=linux
|
||||
cd ./build
|
||||
del artistinfo-dev
|
||||
cd ..
|
||||
go build -ldflags "-s -w" -o ./build/artistinfo-dev ./cmd/app.go
|
||||
docker rmi artistinfo-dev
|
||||
docker rmi 121.229.45.214:9006/artistinfo-dev
|
||||
docker build . -f .\DockerfileWindowsTest -t artistinfo-dev
|
||||
docker tag artistinfo-dev 121.229.45.214:9006/artistinfo-dev
|
||||
docker push 121.229.45.214:9006/artistinfo-dev
|
||||
pause
|
29
Dockerfile
29
Dockerfile
@ -1,29 +0,0 @@
|
||||
FROM golang:1.18-alpine as builder
|
||||
|
||||
MAINTAINER GY "wangyitao@163.com"
|
||||
|
||||
RUN go env -w GO111MODULE=on && \
|
||||
go env -w GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY fonchain-artistinfo /app/fonchain-artistinfo
|
||||
ADD utils /app/utils
|
||||
#ADD electronic-contract /app/electronic-contract
|
||||
|
||||
|
||||
WORKDIR /app/fonchain-artistinfo
|
||||
RUN go mod download
|
||||
RUN go build -o /app/fonchain-artistinfo/bin/artistinfo cmd/app.go
|
||||
|
||||
FROM alpine
|
||||
RUN apk update --no-cache && apk add --no-cache ca-certificates tzdata
|
||||
ENV TZ Asia/Shanghai
|
||||
|
||||
WORKDIR /app/artistinfo
|
||||
#通过名称引用
|
||||
COPY --from=builder /app/fonchain-artistinfo/bin/artistinfo ./bin/artistinfo
|
||||
COPY --from=builder /app/fonchain-artistinfo/conf/ ./conf/
|
||||
COPY --from=builder /app/fonchain-artistinfo/conf/ ../conf/
|
||||
WORKDIR /app/artistinfo/bin
|
||||
CMD ["./artistinfo"]
|
@ -1,14 +0,0 @@
|
||||
FROM busybox:glibc
|
||||
|
||||
COPY ./docs/Shanghai /usr/share/zoneinfo/Asia/Shanghai
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
#ENV TZ Asia/Shanghai
|
||||
|
||||
WORKDIR /app/main-client
|
||||
#通过名称引用
|
||||
COPY ./build/app ./bin/mainServer
|
||||
COPY ./conf/ /app/conf/
|
||||
COPY ./conf/ ./conf/
|
||||
|
||||
WORKDIR /app/main-client/bin
|
||||
CMD ["./mainServer"]
|
@ -3,33 +3,31 @@ FROM golang:alpine AS builder
|
||||
LABEL stage=gobuilder
|
||||
#ENV DUBBO_GO_CONFIG_PATH ./conf/dubbogo.yaml
|
||||
#ENV MODE_ENV test
|
||||
ENV TZ Asia/Shanghai
|
||||
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
|
||||
#COPY ./utils ../utils
|
||||
#ADD ./fonchain-artist/go.mod .
|
||||
#ADD ./fonchain-artist/go.sum .
|
||||
#RUN go mod download
|
||||
#COPY ./fonchain-artist .
|
||||
#
|
||||
#RUN go build -ldflags "-s -w" -o /app/artistServer ./cmd/app.go
|
||||
COPY ./utils ../utils
|
||||
ADD ./fonchain-backup/go.mod .
|
||||
ADD ./fonchain-backup/go.sum .
|
||||
RUN go mod download
|
||||
COPY ./fonchain-backup .
|
||||
|
||||
COPY ./build/artistinfo-dev /app/artistinfo-dev
|
||||
RUN go build -ldflags "-s -w" -o /app/backup ./cmd/app.go
|
||||
|
||||
FROM 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
|
||||
COPY ./conf /app/conf
|
||||
COPY ./conf/test /conf
|
||||
COPY ./fonchain-backup/conf /app/conf
|
||||
COPY ./fonchain-backup/conf /conf
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
ENV MODE_ENV test
|
||||
ENV DUBBO_GO_CONFIG_PATH ./conf/dubbogo.yaml
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/artistinfo-dev .
|
||||
EXPOSE 20050
|
||||
CMD ["/app/artistinfo-dev"]
|
||||
COPY --from=builder /app/backup .
|
||||
EXPOSE 9021
|
||||
CMD ["/app/backup"]
|
||||
|
92
README.md
92
README.md
@ -1,92 +0,0 @@
|
||||
# fonchain-artistinfo
|
||||
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin http://192.168.31.6/bugmaker/fonchain-artistinfo.git
|
||||
git branch -M main
|
||||
git push -uf origin main
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](http://192.168.31.6/bugmaker/fonchain-artistinfo/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
***
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
15
cmd/app.go
15
cmd/app.go
@ -6,22 +6,17 @@ import (
|
||||
"dubbo.apache.org/dubbo-go/v3/config"
|
||||
|
||||
_ "dubbo.apache.org/dubbo-go/v3/imports"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/controller"
|
||||
"github.com/fonchain-artistserver/cmd/internal/controller"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/cache"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/m"
|
||||
_ "github.com/fonchain/fonchain-artistinfo/pkg/service"
|
||||
"github.com/fonchain-artistserver/pkg/cache"
|
||||
db "github.com/fonchain-artistserver/pkg/db"
|
||||
"github.com/fonchain-artistserver/pkg/m"
|
||||
)
|
||||
|
||||
// export DUBBO_GO_CONFIG_PATH= PATH_TO_SAMPLES/helloworld/go-server/conf/dubbogo.yaml
|
||||
func main() {
|
||||
fmt.Println("第一处")
|
||||
config.SetProviderService(&controller.ArtistInfoUserProvider{})
|
||||
config.SetProviderService(&controller.ArtistInfoArtworkProvider{})
|
||||
config.SetProviderService(&controller.ArtistInfoArtshowProvider{})
|
||||
config.SetProviderService(&controller.ArtistInfoContractProvider{})
|
||||
config.SetConsumerService(&controller.ArtistInfoStatementProvider{})
|
||||
config.SetProviderService(&controller.ArtistInfoProvider{})
|
||||
db.Init(m.SERVER_CONFIG)
|
||||
cache.InitRedis(m.SERVER_CONFIG)
|
||||
if err := config.Load(); err != nil {
|
||||
|
77
cmd/internal/controller/artisrInfo.go
Normal file
77
cmd/internal/controller/artisrInfo.go
Normal file
@ -0,0 +1,77 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain-artistserver/cmd/internal/logic"
|
||||
artistInfo "github.com/fonchain-artistserver/pb/artistinfo"
|
||||
)
|
||||
|
||||
type ArtistInfoProvider struct {
|
||||
artistInfo.UnimplementedArtistInfoServer
|
||||
artistInfoLogic *logic.ArtistInfo
|
||||
}
|
||||
|
||||
func (a *ArtistInfoProvider) GetUserInfo(ctx context.Context, req *artistInfo.GetUserInfoRequest) (rep *artistInfo.GetUserInfoRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistInfo.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.GetUserInfo(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoProvider) CreateUserInfo(ctx context.Context, req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.CreateUserInfoRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistInfo.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.CreateUserInfo(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoProvider) UpdateUserInfo(ctx context.Context, req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.UpdateUserInfoRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistInfo.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.UpdateUserInfo(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoProvider) UserUpdateTel(ctx context.Context, req *artistInfo.UserUpdateTelRequest) (rep *artistInfo.UserUpdateTelRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistInfo.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.UserUpdateTel(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoProvider) UserUpdateMsg(ctx context.Context, req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.UserUpdateMsgRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistInfo.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.UserUpdateMsg(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoProvider) Verifyfdd(ctx context.Context, req *artistInfo.VerifyfddRequest) (rep *artistInfo.VerifyfddRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistInfo.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.Verifyfdd(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoProvider) FinishVerify(ctx context.Context, req *artistInfo.FinishVerifyRequest) (rep *artistInfo.FinishVerifyRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistInfo.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.FinishVerify(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
@ -1,97 +0,0 @@
|
||||
// Package controller -----------------------------
|
||||
// @file : artwork.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/2/24 18:12
|
||||
// -------------------------------------------
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoArtwork"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
var _ artistInfoArtwork.ArtistInfoArtworkServer = new(ArtistInfoArtworkProvider)
|
||||
|
||||
type ArtistInfoArtworkProvider struct {
|
||||
artistInfoArtwork.UnimplementedArtistInfoArtworkServer
|
||||
artistInfoLogic logic.ArtistInfoArtworkLogic
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtworkProvider) ArtistArtworkStatic(ctx context.Context, request *artistInfoArtwork.ArtistArtworkStaticRequest) (*artistInfoArtwork.ArtistArtworkStaticResponse, error) {
|
||||
return a.artistInfoLogic.ArtworkStatic(request)
|
||||
}
|
||||
|
||||
// 进入画作补充信息的流程
|
||||
func (a ArtistInfoArtworkProvider) GenerateArtworkSupplementInfo(ctx context.Context, request *artistInfoArtwork.ArtworkUidsRequest) (*emptypb.Empty, error) {
|
||||
return a.artistInfoLogic.GenerateArtworkSupplementInfo(request)
|
||||
}
|
||||
|
||||
// 画作基本信息是否可编辑
|
||||
func (a ArtistInfoArtworkProvider) CheckArtworkBaseInfoEditable(ctx context.Context, request *artistInfoArtwork.ArtworkUidRequest) (*artistInfoArtwork.CheckArtworkEditableResponse, error) {
|
||||
if request.ArtworkUid == "" {
|
||||
return nil, errors.New("ArtworkUid 不能为空")
|
||||
}
|
||||
return a.artistInfoLogic.CheckArtworkEditable(request, 2)
|
||||
}
|
||||
|
||||
// 画作补充信息是否可编辑
|
||||
func (a ArtistInfoArtworkProvider) CheckArtworkSupplementInfoEditable(ctx context.Context, request *artistInfoArtwork.ArtworkUidRequest) (*artistInfoArtwork.CheckArtworkEditableResponse, error) {
|
||||
if request.ArtworkUid == "" {
|
||||
return nil, errors.New("ArtworkUid 不能为空")
|
||||
}
|
||||
return a.artistInfoLogic.CheckArtworkEditable(request, 3)
|
||||
}
|
||||
|
||||
// 更新画作审批状态
|
||||
func (a ArtistInfoArtworkProvider) UpdateArtworkAuditStatus(ctx context.Context, request *artistInfoArtwork.UpdateArtworkAuditStatusRequest) (*artistInfoArtwork.ArtworkCommonNoParams, error) {
|
||||
if request.FlowIndex != 2 && request.FlowIndex != 3 {
|
||||
return nil, errors.New("FlowIndex 不能为空")
|
||||
}
|
||||
return a.artistInfoLogic.UpdateArtworkAuditStatus(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtworkProvider) GetArtworkLockDetail(ctx context.Context, request *artistInfoArtwork.GetArtworkLockDetailRequest) (*artistInfoArtwork.ArtistLockInfo, error) {
|
||||
return a.artistInfoLogic.GetArtworkLockDetail(request)
|
||||
}
|
||||
|
||||
// CreateArtworkLockRecord 创建画作锁定记录
|
||||
func (a ArtistInfoArtworkProvider) CreateArtworkLockRecord(ctx context.Context, req *artistInfoArtwork.CreateArtworkLockRecordReq) (*artistInfoArtwork.ArtworkCommonNoParams, error) {
|
||||
if req.ArtworkUid == "" || req.ArtistUid == "" {
|
||||
return nil, errors.New("参数错误")
|
||||
}
|
||||
return a.artistInfoLogic.CreateArtworkLockRecord(req)
|
||||
}
|
||||
|
||||
// ArtworkLockAction 修改画作锁状态
|
||||
func (a ArtistInfoArtworkProvider) ArtworkLockAction(ctx context.Context, request *artistInfoArtwork.ArtworkLockActionRequest) (*artistInfoArtwork.ArtworkCommonNoParams, error) {
|
||||
return a.artistInfoLogic.ArtworkLockAction(request)
|
||||
}
|
||||
|
||||
// DeleteArtworkRecord 删除话走锁记录
|
||||
func (a ArtistInfoArtworkProvider) DeleteArtworkRecord(ctx context.Context, request *artistInfoArtwork.DeleteArtworkRecordRequest) (*artistInfoArtwork.ArtworkCommonNoParams, error) {
|
||||
return a.artistInfoLogic.DeleteArtworkRecord(request)
|
||||
}
|
||||
|
||||
// GetArtworkRecordUids 获取画作锁记录
|
||||
func (a ArtistInfoArtworkProvider) GetArtworkLockRecords(ctx context.Context, request *artistInfoArtwork.GetArtworkLockRecordsRequest) (*artistInfoArtwork.ArtworkLockList, error) {
|
||||
return a.artistInfoLogic.GetArtworkLockRecords(request)
|
||||
}
|
||||
|
||||
// GetArtworkLockHistoryGroup 查询画作历史记录,按照锁定时间分组
|
||||
func (a ArtistInfoArtworkProvider) GetArtworkLockHistoryGroup(ctx context.Context, request *artistInfoArtwork.GetArtworkLockHistoryRequest) (*artistInfoArtwork.GetArtworkLockHistoryResponse, error) {
|
||||
return a.artistInfoLogic.GetArtworkLockHistoryGroup(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtworkProvider) UpdateArtworkExtData(ctx context.Context, request *artistInfoArtwork.ArtworkExtData) (emp *emptypb.Empty, err error) {
|
||||
err = a.artistInfoLogic.UpdateArtworkExtData(request)
|
||||
return
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtworkProvider) GetArtworkExtDatas(ctx context.Context, request *artistInfoArtwork.GetArtworkExtDataRequest) (*artistInfoArtwork.GetArtworkExtDataResponse, error) {
|
||||
return a.artistInfoLogic.GetArtworkExtDatas(request)
|
||||
}
|
@ -1,265 +0,0 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoUser"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
||||
)
|
||||
|
||||
var _ artistInfoUser.ArtistInfoUserServer = new(ArtistInfoUserProvider)
|
||||
|
||||
type ArtistInfoUserProvider struct {
|
||||
artistInfoUser.UnimplementedArtistInfoUserServer
|
||||
artistInfoLogic *logic.ArtistInfoUser
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) GetInviteStaticList(ctx context.Context, request *artistInfoUser.GetInviteStaticListRequest) (*artistInfoUser.GetInviteStaticListResponse, error) {
|
||||
return a.artistInfoLogic.GetInviteStaticList(request)
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) GetInviterUserList(ctx context.Context, request *artistInfoUser.GetInviterUserListRequest) (*artistInfoUser.GetInvitedUserListResponse, error) {
|
||||
return a.artistInfoLogic.GetInviterUserList(request)
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) GetInvitedUserList(ctx context.Context, request *artistInfoUser.GetInvitedUserListRequest) (*artistInfoUser.GetInvitedUserListResponse, error) {
|
||||
return a.artistInfoLogic.GetInvitedUserList(request)
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) FindUsersUserView(ctx context.Context, request *artistInfoUser.FindUsersRequest) (*artistInfoUser.FindUsersUserViewResponse, error) {
|
||||
return a.artistInfoLogic.FindUsersUserView(request)
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) FindUsers(ctx context.Context, request *artistInfoUser.FindUsersRequest) (*artistInfoUser.FindUsersResponse, error) {
|
||||
return a.artistInfoLogic.FindUserList(request)
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) RegisterUser(ctx context.Context, req *artistInfoUser.RegisterUserRequest) (rep *artistInfoUser.RegisterUserRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
//新增邀请码判断 by JJXu 2023-03-07
|
||||
//if req.UserInviteCode == "" {
|
||||
// return nil, errors.New("邀请码不能为空")
|
||||
//}
|
||||
if rep, err = a.artistInfoLogic.RegisterUser(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) UpdateIdCard(ctx context.Context, in *artistInfoUser.UpdateIdCardRequest) (rep *artistInfoUser.CommonNoParams, err error) {
|
||||
var thisUser model.User
|
||||
db.DB.Unscoped().Where("mgmt_acc_id = ?", in.MgmtAccId).Preload("RealNameInfo").Find(&thisUser)
|
||||
thisUser.DeletedAt = 0
|
||||
if thisUser.RealNameInfo == nil {
|
||||
thisUser.RealNameInfo = &model.RealName{}
|
||||
}
|
||||
if in.Name != "" {
|
||||
thisUser.RealNameInfo.Name = in.Name
|
||||
}
|
||||
if in.IdNum != "" {
|
||||
thisUser.RealNameInfo.IdNum = in.IdNum
|
||||
}
|
||||
if in.Age != 0 {
|
||||
thisUser.RealNameInfo.Age = int(in.Age)
|
||||
}
|
||||
if in.Sex != "" {
|
||||
thisUser.RealNameInfo.Sex = model.SexType(in.Sex)
|
||||
}
|
||||
if in.Address != "" {
|
||||
thisUser.RealNameInfo.Address = in.Address
|
||||
}
|
||||
if in.IdCardFront != "" {
|
||||
thisUser.RealNameInfo.IdCardFront = in.IdCardFront
|
||||
}
|
||||
if in.IdCardBack != "" {
|
||||
thisUser.RealNameInfo.IdCardBack = in.IdCardBack
|
||||
}
|
||||
if in.Birthday != "" {
|
||||
thisUser.RealNameInfo.Birthday = in.Birthday
|
||||
}
|
||||
err = db.DB.Session(&gorm.Session{FullSaveAssociations: true}).Clauses(clause.OnConflict{UpdateAll: true}).Save(&thisUser).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) GetUser(ctx context.Context, req *artistInfoUser.GetUserRequest) (rep *artistInfoUser.GetUserRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistinfoUser.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.GetUser(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) GetUserById(ctx context.Context, req *artistInfoUser.GetUserByIdRequest) (rep *artistInfoUser.GetUserByIdRespond, err error) {
|
||||
return a.artistInfoLogic.GetUserById(req)
|
||||
}
|
||||
|
||||
//func (a *ArtistInfoUserProvider ) UpdateRealName(ctx context.Context, req *artistinfoUser.UpdateRealNameRequest) (rep *artistinfoUser.UpdateRealNameRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// // backup := &artistinfoUser.GetUserInfoRespond{}
|
||||
// if rep, err = a.artistInfoLogic.UpdateRealName(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
|
||||
func (a *ArtistInfoUserProvider) FinishVerify(ctx context.Context, req *artistInfoUser.FinishVerifyRequest) (rep *artistInfoUser.FinishVerifyRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistinfoUser.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.FinishVerify(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) UserLock(ctx context.Context, req *artistInfoUser.UserLockRequest) (rep *artistInfoUser.UserLockRespond, err error) {
|
||||
return a.artistInfoLogic.UserLock(req)
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) CheckUserLock(ctx context.Context, req *artistInfoUser.CheckUserLockRequest) (rep *artistInfoUser.CheckUserLockRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistinfoUser.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.CheckUserLock(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) ArtistSupplyList(ctx context.Context, req *artistInfoUser.ArtistSupplyListRequest) (rep *artistInfoUser.ArtistSupplyListRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistinfoUser.GetUserInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.ArtistSupplyList(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) CheckInvitedCode(ctx context.Context, req *artistInfoUser.CheckInvitedCodeRequest) (rep *artistInfoUser.GetUserRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistinfoUser.CheckInvitedCodeInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.CheckInvitedCode(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) UnFinishList(ctx context.Context, req *artistInfoUser.UnFinishListRequest) (rep *artistInfoUser.UnFinishListRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistinfoUser.UnFinishListInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.UnFinishList(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) GetUserMsg(ctx context.Context, req *artistInfoUser.GetUserMsgRequest) (rep *artistInfoUser.GetUserMsgRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
// backup := &artistinfoUser.GetUserMsgInfoRespond{}
|
||||
if rep, err = a.artistInfoLogic.GetUserMsg(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
// 绑定邀请人和受邀请人的账号,并加入到次数统计
|
||||
func (a *ArtistInfoUserProvider) BindInviteInvitedAccount(ctx context.Context, in *artistInfoUser.BindInviteInvitedAccountRequest) (res *artistInfoUser.BindInviteInvitedAccountRespond, err error) {
|
||||
// 查询被邀请人是否存在
|
||||
var invitedUser model.User
|
||||
if err = db.DB.Debug().Where("BINARY invited_code = ? OR id = ?", in.InvitedCode, in.InvitedUserId).First(&invitedUser).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
return nil, errors.New("被邀请人不存在")
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
// 查询邀请人是否存在
|
||||
var inviteUser model.User
|
||||
if err = db.DB.Debug().Where("BINARY invited_code = ?", in.InviteCode).First(&inviteUser).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
return nil, errors.New("邀请人不存在")
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
fmt.Println("邀请人userId:", inviteUser.ID)
|
||||
fmt.Println("被邀请人userId:", invitedUser.ID)
|
||||
var data model.Invite
|
||||
// 受邀请者只能绑定一个邀请人
|
||||
if err = db.DB.Debug().Where("BINARY invited_code = ?", in.InvitedCode).Find(&data).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if data.ID == 0 {
|
||||
//数据不存在则创建
|
||||
data.UserId = int32(inviteUser.ID)
|
||||
data.InvitedId = int32(invitedUser.ID)
|
||||
data.InvitedCode = invitedUser.InviteCode
|
||||
data.InviteCode = inviteUser.InviteCode
|
||||
if err = db.DB.Debug().Create(&data).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else if data.InviteCode == in.InviteCode {
|
||||
//如果数据存在则刷新更新时间
|
||||
if err = db.DB.Debug().Save(&data).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// 添加到次数统计
|
||||
var countData model.UserInvited
|
||||
if err = db.DB.Where("BINARY invite_code = ? AND BINARY invited_code = BINARY ?", in.InviteCode, in.InvitedCode).Find(&countData).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if countData.ID == 0 {
|
||||
countData = model.UserInvited{
|
||||
UserId: int32(inviteUser.ID),
|
||||
InvitedUserId: in.InvitedUserId, //受邀请人的画家宝用户id
|
||||
Count: 1,
|
||||
InvitedCode: in.InvitedCode,
|
||||
InviteCode: in.InviteCode,
|
||||
}
|
||||
if err = db.DB.Create(&countData).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
countData.Count += 1
|
||||
if err = db.DB.Model(model.UserInvited{}).Where("id = ?", countData.ID).Update("count", countData.Count).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) BindArtistId(ctx context.Context, in *artistInfoUser.BindArtistIdRequest) (*artistInfoUser.BindArtistIdResp, error) {
|
||||
var updateData = map[string]any{
|
||||
"mgmt_artist_id": in.ArtistId,
|
||||
"mgmt_artist_uid": in.ArtistUid,
|
||||
//"fdd_state": 2,
|
||||
}
|
||||
if err := db.DB.Model(model.User{}).Where("mgmt_acc_id = ?", in.UserId).Updates(&updateData).Error; err != nil {
|
||||
return &artistInfoUser.BindArtistIdResp{Error: err.Error()}, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) FindUser(ctx context.Context, in *artistInfoUser.FindUserRequest) (*artistInfoUser.UserInfo, error) {
|
||||
return a.artistInfoLogic.FindUser(in)
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) UpdateUserData(ctx context.Context, in *artistInfoUser.UserInfo) (*artistInfoUser.CommonNoParams, error) {
|
||||
return a.artistInfoLogic.UpdateUserData(in)
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) PreSaveArtistInfo(ctx context.Context, in *artistInfoUser.PreSaveArtistInfoData) (res *artistInfoUser.CommonNoParams, er error) {
|
||||
return a.artistInfoLogic.PreSaveArtistInfo(in)
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUserProvider) GetPreSaveArtistInfo(ctx context.Context, in *artistInfoUser.GetPreSaveArtistInfoRequest) (res *artistInfoUser.PreSaveArtistInfoData, err error) {
|
||||
return a.artistInfoLogic.GetPreSaveArtistInfo(in)
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
// Package controller -----------------------------
|
||||
// @file : artshowVideo.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/2 10:52
|
||||
// -------------------------------------------
|
||||
package controller
|
||||
|
||||
import (
|
||||
context "context"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// 画展包视频
|
||||
var _ artistinfoArtshow.ArtistInfoArtshowServer = new(ArtistInfoArtshowProvider)
|
||||
|
||||
type ArtistInfoArtshowProvider struct {
|
||||
artistinfoArtshow.UnimplementedArtistInfoArtshowServer
|
||||
videoLogic logic.ArtshowVideoLogic
|
||||
artistIndexLogic logic.ArtshowArtistIndexLogic
|
||||
artistSupplementLogic logic.ArtshowArtistSupplementLogic
|
||||
artshowLogic logic.ArtshowLogic
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) GetArtshowHistroyList(ctx context.Context, request *artistinfoArtshow.GetArtshowHistroyListRequest) (*artistinfoArtshow.GetArtshowHistroyListResponse, error) {
|
||||
return a.artshowLogic.GetArtshowHistroyList(request)
|
||||
}
|
||||
|
||||
// ----------------- 画展包-画家补充信息
|
||||
func (a ArtistInfoArtshowProvider) GetArtistSupplementDetail(ctx context.Context, request *artistinfoArtshow.GetArtistSupplementDetailRequest) (*artistinfoArtshow.ArtistSupplementInfo, error) {
|
||||
return a.artistSupplementLogic.GetSupplementDetail(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) GetArtistSupplementList(ctx context.Context, request *artistinfoArtshow.GetArtistSupplementListRequest) (*artistinfoArtshow.GetArtistSupplementListResponse, error) {
|
||||
return a.artistSupplementLogic.GetSupplementList(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) CreateArtistSupplement(ctx context.Context, info *artistinfoArtshow.ArtistSupplementInfo) (*emptypb.Empty, error) {
|
||||
return nil, a.artistSupplementLogic.CreateSupplement(info)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) BatchCreateArtistSupplement(ctx context.Context, request *artistinfoArtshow.BatchCreateArtistSupplementRequest) (*emptypb.Empty, error) {
|
||||
return nil, a.artistSupplementLogic.BatchCreateSupplement(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) AuditArtistSupplement(ctx context.Context, request *artistinfoArtshow.AuditArtistSupplementRequest) (*emptypb.Empty, error) {
|
||||
return a.artistSupplementLogic.AuditSupplement(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) UpdateArtistSupplement(ctx context.Context, request *artistinfoArtshow.UpdateArtistSupplementRequest) (*emptypb.Empty, error) {
|
||||
return a.artistSupplementLogic.UpdateSupplement(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) DeletedArtistSupplement(ctx context.Context, request *artistinfoArtshow.DeletedArtistSupplementRequest) (*emptypb.Empty, error) {
|
||||
return a.artistSupplementLogic.DeletedSupplement(request)
|
||||
}
|
||||
|
||||
// ----------------- 画展包-画家指数
|
||||
func (a ArtistInfoArtshowProvider) GetArtistIndexDetail(ctx context.Context, request *artistinfoArtshow.GetArtistIndexDetailRequest) (*artistinfoArtshow.ArtistIndexInfo, error) {
|
||||
return a.artistIndexLogic.GetArtistIndexDetail(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) GetArtistIndexList(ctx context.Context, request *artistinfoArtshow.GetArtistIndexListRequest) (*artistinfoArtshow.GetArtistIndexListResponse, error) {
|
||||
return a.artistIndexLogic.GetArtistIndexList(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) CreateArtistIndex(ctx context.Context, info *artistinfoArtshow.ArtistIndexInfo) (*emptypb.Empty, error) {
|
||||
return nil, a.artistIndexLogic.CreateArtistIndex(info)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) BatchCreateArtistIndex(ctx context.Context, request *artistinfoArtshow.BatchCreateArtistIndexRequest) (*emptypb.Empty, error) {
|
||||
return nil, a.artistIndexLogic.BatchCreateArtistIndex(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) AuditArtistIndex(ctx context.Context, request *artistinfoArtshow.AuditArtistIndexRequest) (*emptypb.Empty, error) {
|
||||
return a.artistIndexLogic.AuditArtistIndex(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) UpdateArtistIndex(ctx context.Context, request *artistinfoArtshow.UpdateArtistIndexRequest) (*emptypb.Empty, error) {
|
||||
return a.artistIndexLogic.UpdateArtistIndex(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) DeletedArtistIndex(ctx context.Context, request *artistinfoArtshow.DeletedArtistIndexRequest) (*emptypb.Empty, error) {
|
||||
return a.artistIndexLogic.DeletedArtistIndex(request)
|
||||
}
|
||||
|
||||
// ----------------- 画展包-视频资料
|
||||
func (a ArtistInfoArtshowProvider) GetArtshowVideoDetail(ctx context.Context, request *artistinfoArtshow.GetArtshowVideoDetailRequest) (*artistinfoArtshow.ArtshowVideoInfo, error) {
|
||||
return a.videoLogic.GetArtshowVideoDetail(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) BatchCreateArtshowVideo(ctx context.Context, request *artistinfoArtshow.BatchCreateArtshowVideoRequest) (*emptypb.Empty, error) {
|
||||
return nil, a.videoLogic.BatchCreateArtshowVideo(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) CreateArtshowVideo(ctx context.Context, info *artistinfoArtshow.ArtshowVideoInfo) (*emptypb.Empty, error) {
|
||||
return nil, a.videoLogic.CreateArtshowVideo(info)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) GetArtshowVideoList(ctx context.Context, requst *artistinfoArtshow.GetArtshowVideoListRequst) (*artistinfoArtshow.GetArtshowVideoListResponse, error) {
|
||||
return a.videoLogic.GetArtshowVideoList(requst)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) AuditArtshowVideo(ctx context.Context, request *artistinfoArtshow.AuditArtshowVideoRequest) (*emptypb.Empty, error) {
|
||||
return a.videoLogic.AuditArtshowVideo(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) UpdateArtshowVideo(ctx context.Context, request *artistinfoArtshow.UpdateArtshowVideoRequest) (*emptypb.Empty, error) {
|
||||
return a.videoLogic.UpdateArtshowVideo(request)
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtshowProvider) DeletedArtshowVideo(ctx context.Context, request *artistinfoArtshow.DeletedArtshowVideoRequest) (*emptypb.Empty, error) {
|
||||
return a.videoLogic.DeletedArtshowVideo(request)
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
package controller
|
||||
|
||||
// import (
|
||||
// "context"
|
||||
|
||||
// "github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
||||
// "github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
||||
// emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
// )
|
||||
|
||||
// //go:generate mockgen -destination .\artistinfoStatement_triple.pb.go -package controller -source ..\..\..\pb\artistinfoStatement\artistinfoStatement_triple.pb.go StatementServer
|
||||
|
||||
// type StatementServerProvider struct {
|
||||
// artistinfoStatement.UnimplementedStatementServer
|
||||
// logic logic.StatementServerLogic
|
||||
// }
|
||||
|
||||
// func (s *StatementServerProvider) CreateStatementBatch(ctx context.Context, in *artistinfoStatement.StatementBatchRequest) (res *artistinfoStatement.CreateStatementBatchResponse, err error) {
|
||||
// return s.logic.CreateStatementBatch(in)
|
||||
// }
|
||||
|
||||
// func (s *StatementServerProvider) BatchCreateStatementBatch(ctx context.Context, in *artistinfoStatement.BatchCreateStatementBatchRequest) (*emptypb.Empty, error) {
|
||||
// return s.logic.BatchCreateStatementBatch(in)
|
||||
// }
|
||||
|
||||
// func (s *StatementServerProvider) GetStatementBatchList(ctx context.Context, in *artistinfoStatement.GetStatementBatchListRequest) (*artistinfoStatement.GetStatementBatchListResponse, error) {
|
||||
// return s.logic.GetStatementBatchList(in)
|
||||
// }
|
||||
|
||||
// func (s *StatementServerProvider) CreateStatementDetail(ctx context.Context, in *artistinfoStatement.StatementDetailRequest) (*artistinfoStatement.CreateStatementDetailResponse, error) {
|
||||
// return s.logic.CreateStatementDetail(in)
|
||||
// }
|
||||
|
||||
// func (s *StatementServerProvider) BatchCreateStatementDetail(ctx context.Context, in *artistinfoStatement.BatchCreateStatementDetailRequest) (*emptypb.Empty, error) {
|
||||
// return s.logic.BatchCreateStatementDetail(in)
|
||||
// }
|
||||
|
||||
// func (s *StatementServerProvider) GetStatementDetailList(ctx context.Context, in *artistinfoStatement.GetStatementDetailListRequest) (*artistinfoStatement.GetStatementDetailListResponse, error) {
|
||||
// return s.logic.GetStatementDetailList(in)
|
||||
// }
|
||||
|
||||
// func (s *StatementServerProvider) GetStatementBatchTimeMenus(ctx context.Context, in *artistinfoStatement.GetStatementBatchListRequest) (*artistinfoStatement.GetStatementBatchTimeMenusResponse, error) {
|
||||
// return s.logic.GetStatementBatchTimeMenus(in)
|
||||
// }
|
@ -1,107 +0,0 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
||||
contract "github.com/fonchain/fonchain-artistinfo/pb/contract"
|
||||
)
|
||||
|
||||
type ArtistInfoContractProvider struct {
|
||||
contract.UnimplementedArtistContractServer
|
||||
contractLogic *logic.Contract
|
||||
}
|
||||
|
||||
func (c *ArtistInfoContractProvider) CreateContract(ctx context.Context, req *contract.CreateContractRequest) (rep *contract.CreateContractRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = c.contractLogic.CreateContract(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (c *ArtistInfoContractProvider) ContractListMgmt(ctx context.Context, req *contract.ContractListMgmtRequest) (rep *contract.ContractListMgmtRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = c.contractLogic.ContractListMgmt(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (c *ArtistInfoContractProvider) ContractList(ctx context.Context, req *contract.ContractListRequest) (rep *contract.ContractListRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = c.contractLogic.ContractList(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (c *ArtistInfoContractProvider) SignContract(ctx context.Context, req *contract.SignContractRequest) (rep *contract.SignContractRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = c.contractLogic.SignContract(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (c *ArtistInfoContractProvider) FinishContract(ctx context.Context, req *contract.FinishContractRequest) (rep *contract.FinishContractRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = c.contractLogic.FinishContract(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (c *ArtistInfoContractProvider) GetContractInfoByContractUid(ctx context.Context, req *contract.GetContractInfoByContractUidRequest) (rep *contract.GetContractInfoByContractUidRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = c.contractLogic.GetContractInfoByContractUid(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
// func (c *ContractProvider) ContractTxList(ctx context.Context, req *contract.ContractTxListRequest) (rep *contract.ContractTxListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = c.contractLogic.ContractTxList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
// }
|
||||
|
||||
// func (c *ContractProvider) ContractList(ctx context.Context, req *contract.ContractListRequest) (rep *contract.ContractListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = c.contractLogic.ContractList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
// }
|
||||
// func (c *ContractProvider) GetContract(ctx context.Context, req *contract.GetContractRequest) (rep *contract.ContractData, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = c.contractLogic.GetContract(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
// }
|
||||
// func (c *ContractProvider) ContractTxList(ctx context.Context, req *contract.ContractTxListRequest) (rep *contract.ContractTxListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = c.contractLogic.ContractTxList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
// }
|
||||
|
||||
// func (c *ContractProvider) UpdateContract(ctx context.Context, req *contract.UpdateContractRequest) (rep *contract.UpdateContractRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = c.contractLogic.UpdateContract(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
// }
|
||||
// func (c *ContractProvider) UpdateContractTx(ctx context.Context, req *contract.UpdateContractTxRequest) (rep *contract.UpdateContractTxRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = c.contractLogic.UpdateContractTx(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
// }
|
@ -1,38 +0,0 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
||||
statement "github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
||||
)
|
||||
|
||||
type ArtistInfoStatementProvider struct {
|
||||
statement.UnimplementedStatementServer
|
||||
statementLogic *logic.Statement
|
||||
}
|
||||
|
||||
func (c *ArtistInfoStatementProvider) StatementList(ctx context.Context, req *statement.StatementListRequest) (rep *statement.StatementListRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = c.statementLogic.StatementList(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (c *ArtistInfoStatementProvider) GetTxInfoByBatchUid(ctx context.Context, req *statement.GetTxInfoByBatchUidRequest) (rep *statement.GetTxInfoByBatchUidRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = c.statementLogic.GetTxInfoByBatchUid(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (c *ArtistInfoStatementProvider) GetCopyInfoByBatchUid(ctx context.Context, req *statement.GetCopyInfoByBatchUidRequest) (rep *statement.GetCopyInfoByBatchUidRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = c.statementLogic.GetCopyInfoByBatchUid(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
package controller
|
||||
|
||||
//
|
||||
//type SupplyProvider struct {
|
||||
// supplyinfo.UnimplementedSupplyInfoServer
|
||||
// SupplyLogic *logic.Supply
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetSupplyInfoList(ctx context.Context, req *supplyinfo.GetSupplyInfoListRequest) (rep *supplyinfo.GetSupplyInfoListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetSupplyInfoList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetSupplyInfo(ctx context.Context, req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetSupplyInfo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) UpdateSupplyInfo(ctx context.Context, req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.UpdateSupplyInfo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetVideoList(ctx context.Context, req *supplyinfo.GetVideoListRequest) (rep *supplyinfo.GetVideoListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetVideoList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetVideo(ctx context.Context, req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetVideo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) UpdateVideo(ctx context.Context, req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.UpdateVideo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetExam(ctx context.Context, req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetExam(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetExamList(ctx context.Context, req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetExamList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) UpdateExam(ctx context.Context, req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.UpdateExam(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetArtistInfoList(ctx context.Context, req *supplyinfo.GetArtistInfoListRequest) (rep *supplyinfo.GetArtistInfoListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetArtistInfoList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetArtistInfo(ctx context.Context, req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetArtistInfo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) UpdateArtistInfo(ctx context.Context, req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.UpdateArtistInfo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
441
cmd/internal/dao/artistInfo.go
Normal file
441
cmd/internal/dao/artistInfo.go
Normal file
@ -0,0 +1,441 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/fonchain-artistserver/cmd/model"
|
||||
artistInfo "github.com/fonchain-artistserver/pb/artistinfo"
|
||||
"github.com/fonchain-artistserver/pkg/cache"
|
||||
db "github.com/fonchain-artistserver/pkg/db"
|
||||
"github.com/fonchain-artistserver/pkg/m"
|
||||
"github.com/fonchain-artistserver/pkg/util"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func User(req *artistInfo.GetUserInfoRequest) (rep *artistInfo.GetUserInfoRespond, err error) {
|
||||
rep = &artistInfo.GetUserInfoRespond{}
|
||||
service := rep.Data
|
||||
var user model.User
|
||||
if err = db.DB.First(&user, "id = ?", int32(req.Id)).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var realName model.RealName
|
||||
if err = db.DB.First(&realName, "id = ?", user.RealNameID).Error; err != nil {
|
||||
zap.L().Error("get realName info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var artworkList []model.Artwork
|
||||
if err = db.DB.Where("artist_id = ? ", int32(req.Id)).Find(&artworkList).Error; err != nil {
|
||||
zap.L().Error("get artworkList info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, v := range artworkList {
|
||||
if v.State == 3 {
|
||||
service.Ruler = service.Ruler + v.Ruler
|
||||
}
|
||||
}
|
||||
|
||||
service.TelNum = user.TelNum
|
||||
service.CertificateNum = user.CertificateNum
|
||||
if user.CertificateImg != "" {
|
||||
service.CertificateImg = fmt.Sprintf("%v?v=%d", user.CertificateImg, user.UpdatedAt.Unix())
|
||||
}
|
||||
service.RealName = realName.Name
|
||||
service.PenName = user.PenName
|
||||
service.Age = int32(util.IdCardTurnAge(realName.IDNum))
|
||||
service.IdCard = realName.IDNum
|
||||
|
||||
service.StageName = user.StageName
|
||||
service.WxAccount = user.WxAccount
|
||||
service.JoinAssoTime = user.JoinAssoTime
|
||||
service.IdCardFront = fmt.Sprintf("%v?v=%d", realName.IdcardFront, realName.UpdatedAt.Unix())
|
||||
service.IdCardBack = fmt.Sprintf("%v?v=%d", realName.IdcardBack, realName.UpdatedAt.Unix())
|
||||
var conAddressArr []string
|
||||
err = json.Unmarshal([]byte(user.ConAddress), &conAddressArr)
|
||||
if err != nil {
|
||||
zap.L().Error("conAddressArr unmarshal err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_UNMARSHAL)
|
||||
return nil, err
|
||||
}
|
||||
service.ConAddress = conAddressArr
|
||||
service.InvitedCode = user.InvitedCode
|
||||
|
||||
var invited model.Invite
|
||||
if err = db.DB.Where("user_id=?", user.ID).First(&invited).Error; err != nil {
|
||||
//如果查询不到,返回相应的错误
|
||||
if err.Error() == "record not found" {
|
||||
user.InvitedCode = ""
|
||||
}
|
||||
//数据库操作异常
|
||||
zap.L().Error("get invite info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var invitedUser model.User
|
||||
if err = db.DB.Where("id=?", invited.InvitedId).First(&invitedUser).Error; err != nil {
|
||||
//如果查询不到,返回相应的错误
|
||||
if err.Error() == "record not found" {
|
||||
user.InvitedCode = ""
|
||||
return nil, err
|
||||
}
|
||||
//数据库操作异常
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
service.InvitedName = invitedUser.Name
|
||||
service.Sex = user.Sex
|
||||
service.FddState = user.FddState
|
||||
service.CustomerId = user.CustomerId
|
||||
service.Photo = fmt.Sprintf("%v?v=%d", user.Photo, user.UpdatedAt.Unix())
|
||||
if user.Video != "" {
|
||||
service.Video = fmt.Sprintf("%v?v=%d", user.Video, user.UpdatedAt.Unix())
|
||||
}
|
||||
service.QrCodeImg = fmt.Sprintf("https://cdn.fontree.cn/artistmgmt/static/qrcode/%v.png", user.InvitedCode)
|
||||
// service.QrCodeImgDownload = fmt.Sprintf("https://cdn.fontree.cn/artistmgmt/static/qrcode/%v-2.png", user.InvitedCode)
|
||||
// service.QrCodeImgDownload=("http://192.168.1.18:9400/qrcodebg.png")
|
||||
service.QrCodeImgDownload = fmt.Sprintf("https://cdn.fontree.cn/artistmgmt/static/qrcode/%v-2.png", user.InvitedCode)
|
||||
rep.Data = service
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
// Update 用户修改信息
|
||||
func Create(req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.CreateUserInfoRespond, err error) {
|
||||
rep = &artistInfo.CreateUserInfoRespond{}
|
||||
// user := rep.User
|
||||
var user model.User
|
||||
// user := rep.User
|
||||
if err = db.DB.First(&user, "id = ?", int32(req.Id)).Error; err != nil {
|
||||
//数据库操作异常
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var realNameFind model.RealName
|
||||
if err = db.DB.First(&realNameFind, "id_num = ?", req.UserUpdateInfoService.IdCard).Error; err != nil {
|
||||
zap.L().Error("get realName info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
} else {
|
||||
if realNameFind.ID != 0 {
|
||||
return nil, errors.New(m.ERROR_ALREADY_AUTH)
|
||||
}
|
||||
}
|
||||
|
||||
var realname = model.RealName{
|
||||
Name: req.UserUpdateInfoService.RealName,
|
||||
IDNum: req.UserUpdateInfoService.IdCard,
|
||||
TelNum: req.UserUpdateInfoService.TelNum,
|
||||
IdcardFront: req.UserUpdateInfoService.IdCardFront,
|
||||
IdcardBack: req.UserUpdateInfoService.IdCardBack,
|
||||
}
|
||||
if err = db.DB.Save(&realname).Error; err != nil {
|
||||
zap.L().Error("save realName info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err = db.DB.First(&realname, "id_num=?", realname.IDNum).Error; err != nil {
|
||||
zap.L().Error("get realName info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
user.ID = int32(req.Id)
|
||||
user.Name = req.UserUpdateInfoService.RealName
|
||||
user.PenName = req.UserUpdateInfoService.PenName
|
||||
user.RealNameID = int32(realname.ID)
|
||||
user.StageName = req.UserUpdateInfoService.StageName
|
||||
user.Age = int32(util.IdCardTurnAge(realname.IDNum))
|
||||
user.Sex = int32(req.UserUpdateInfoService.Sex)
|
||||
user.JoinAssoTime = req.UserUpdateInfoService.JoinAssoTime
|
||||
user.CertificateNum = req.UserUpdateInfoService.CertificateNum
|
||||
conAddessByte, err := json.Marshal(req.UserUpdateInfoService.ConAddress)
|
||||
if err != nil {
|
||||
zap.L().Error("conAddress marshal err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_MARSHAL)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
user.ConAddress = string(conAddessByte)
|
||||
user.CreateAt = time.Now().Unix()
|
||||
user.Photo = req.UserUpdateInfoService.Photo
|
||||
user.WxAccount = req.UserUpdateInfoService.WxAccount
|
||||
user.CertificateImg = req.UserUpdateInfoService.CertificateImg
|
||||
user.Video = req.UserUpdateInfoService.Video
|
||||
user.IsRealName = true
|
||||
var invite model.Invite
|
||||
if err = db.DB.Where("user_id = ?", user.ID).First(&invite).Error; err != nil {
|
||||
zap.L().Error("get invite info err", zap.Error(err))
|
||||
if err.Error() == "record not found" {
|
||||
} else {
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if invite.ID == 0 {
|
||||
res, err := CheckInvitedCode(req.UserUpdateInfoService.InvitedCode)
|
||||
if err != nil {
|
||||
Createinvite(user.ID, res.ID)
|
||||
}
|
||||
}
|
||||
user.ID = int32(req.Id)
|
||||
if err = db.DB.Save(user).Error; err != nil {
|
||||
zap.L().Error("save user info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
copyOpt := util.CopyOption{
|
||||
Src: &user,
|
||||
Dst: rep.User,
|
||||
}
|
||||
util.CopyStructSuper(copyOpt)
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
// 用户修改信息
|
||||
func GetUserInfoSelf(id int64) (rep *model.UserUpdateInfoService, err error) {
|
||||
rep = &model.UserUpdateInfoService{}
|
||||
var user model.User
|
||||
if err = db.DB.First(&user, "id = ?", int32(id)).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
var realName model.RealName
|
||||
if err = db.DB.First(&realName, "id = ?", user.RealNameID).Error; err != nil {
|
||||
zap.L().Error("get realName info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
var artworkList []model.Artwork
|
||||
if err = db.DB.Where("artist_id = ? ", uint(id)).Find(&artworkList).Error; err != nil {
|
||||
zap.L().Error("get artworkList info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range artworkList {
|
||||
if v.State == 3 {
|
||||
rep.Ruler = rep.Ruler + int32(v.Ruler)
|
||||
}
|
||||
}
|
||||
|
||||
rep.TelNum = user.TelNum
|
||||
rep.CertificateNum = user.CertificateNum
|
||||
if user.CertificateImg != "" {
|
||||
rep.CertificateImg = fmt.Sprintf("%v?v=%d", user.CertificateImg, user.UpdatedAt.Unix())
|
||||
}
|
||||
rep.RealName = realName.Name
|
||||
rep.PenName = user.PenName
|
||||
rep.Age = int32(util.IdCardTurnAge(realName.IDNum))
|
||||
|
||||
rep.IdCard = realName.IDNum
|
||||
rep.StageName = user.StageName
|
||||
rep.WxAccount = user.WxAccount
|
||||
rep.JoinAssoTime = user.JoinAssoTime
|
||||
rep.IdCardFront = fmt.Sprintf("%v?v=%d", realName.IdcardFront, realName.UpdatedAt.Unix())
|
||||
rep.IdCardBack = fmt.Sprintf("%v?v=%d", realName.IdcardBack, realName.UpdatedAt.Unix())
|
||||
var conAddressArr []string
|
||||
err = json.Unmarshal([]byte(user.ConAddress), &conAddressArr)
|
||||
if err != nil {
|
||||
zap.L().Error("conAddressArr unmarshal err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_UNMARSHAL)
|
||||
return nil, err
|
||||
}
|
||||
rep.ConAddress = conAddressArr
|
||||
rep.InvitedCode = user.InvitedCode
|
||||
|
||||
var invited model.Invite
|
||||
if err = db.DB.Where("user_id=?", user.ID).First(&invited).Error; err != nil {
|
||||
zap.L().Error("get invited info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
var invitedUser model.User
|
||||
if err = db.DB.Where("id=?", invited.InvitedId).First(&invitedUser).Error; err != nil {
|
||||
zap.L().Error("get invitedUser info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_UNMARSHAL)
|
||||
return
|
||||
}
|
||||
rep.InvitedName = invitedUser.Name
|
||||
rep.Sex = user.Sex
|
||||
rep.FddState = user.FddState
|
||||
rep.CustomerId = user.CustomerId
|
||||
rep.Photo = fmt.Sprintf("%v?v=%d", user.Photo, user.UpdatedAt.Unix())
|
||||
if user.Video != "" {
|
||||
rep.Video = fmt.Sprintf("%v?v=%d", user.Video, user.UpdatedAt.Unix())
|
||||
}
|
||||
rep.QrCodeImg = fmt.Sprintf("https://cdn.fontree.cn/artistmgmt/static/qrcode/%v.png", user.InvitedCode)
|
||||
rep.QrCodeImgDownload = fmt.Sprintf("https://cdn.fontree.cn/artistmgmt/static/qrcode/%v-2.png", user.InvitedCode)
|
||||
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func Update(req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.UpdateUserInfoRespond, err error) {
|
||||
rep = &artistInfo.UpdateUserInfoRespond{}
|
||||
var user model.User
|
||||
if err = db.DB.First(&user, "id = ?", int32(req.Id)).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
user.PenName = req.UserUpdateInfoService.PenName
|
||||
user.Photo = req.UserUpdateInfoService.Photo
|
||||
user.Video = req.UserUpdateInfoService.Video
|
||||
user.CertificateImg = req.UserUpdateInfoService.CertificateImg
|
||||
conAddessByte, err := json.Marshal(req.UserUpdateInfoService.ConAddress)
|
||||
if err != nil {
|
||||
zap.L().Error("conAddress marshal err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_MARSHAL)
|
||||
return nil, err
|
||||
}
|
||||
user.ConAddress = string(conAddessByte)
|
||||
user.WxAccount = req.UserUpdateInfoService.WxAccount
|
||||
user.CertificateNum = req.UserUpdateInfoService.CertificateNum
|
||||
if err = db.DB.Save(&user).Error; err != nil {
|
||||
zap.L().Error("save user info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return
|
||||
}
|
||||
|
||||
var realName model.RealName
|
||||
if err = db.DB.First(&realName, "id = ?", user.RealNameID).Error; err != nil {
|
||||
zap.L().Error("get RealName info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
realName.IdcardBack = req.UserUpdateInfoService.IdCardBack
|
||||
realName.IdcardFront = req.UserUpdateInfoService.IdCardFront
|
||||
if err = db.DB.Save(&realName).Error; err != nil {
|
||||
zap.L().Error("save realName info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return
|
||||
}
|
||||
copyOpt := util.CopyOption{
|
||||
Src: &user,
|
||||
Dst: rep.User,
|
||||
}
|
||||
util.CopyStructSuper(copyOpt)
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateTel(req *artistInfo.UserUpdateTelRequest) (rep *artistInfo.UserUpdateTelRespond, err error) {
|
||||
rep = &artistInfo.UserUpdateTelRespond{}
|
||||
var user model.User
|
||||
if err = db.DB.First(&user, int32(req.Id)).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
str := cache.RedisClient.Get(req.TelNum)
|
||||
verCode := str.Val()
|
||||
if verCode != req.VerCode {
|
||||
zap.L().Error("verCode err", zap.Error(err))
|
||||
err = errors.New(m.ERRORCODE)
|
||||
return
|
||||
}
|
||||
if user.TelNum == req.TelNum {
|
||||
zap.L().Error("TelNum err", zap.Error(err))
|
||||
err = errors.New(m.ERROT_SAME_TEL)
|
||||
return
|
||||
}
|
||||
user.TelNum = req.TelNum
|
||||
if err = db.DB.Save(&user).Error; err != nil {
|
||||
zap.L().Error("save user info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return
|
||||
}
|
||||
rep.TelNum = user.TelNum
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateMsg(req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.UserUpdateMsgRespond, err error) {
|
||||
var user model.User
|
||||
user.IsRealName = true
|
||||
user.ID = int32(req.Id)
|
||||
if err = db.DB.Model(&user).Update("is_read", 1).Error; err != nil {
|
||||
zap.L().Error("user update failed", zap.Error(err))
|
||||
err = errors.New(m.UPDATE_FAILED)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func VerifyFdd(req *artistInfo.VerifyfddRequest) (rep *artistInfo.VerifyfddRespond, err error) {
|
||||
rep = &artistInfo.VerifyfddRespond{}
|
||||
var user model.User
|
||||
if err = db.DB.Where("id = ?", int32(req.Id)).First(&user).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
if user.FddState != 2 {
|
||||
return
|
||||
}
|
||||
rep.Ready = true
|
||||
return
|
||||
}
|
||||
|
||||
func FinishVerify(req *artistInfo.FinishVerifyRequest) (rep *artistInfo.FinishVerifyRespond, err error) {
|
||||
rep = &artistInfo.FinishVerifyRespond{}
|
||||
var user model.User
|
||||
user.ID = int32(req.Id)
|
||||
if err = db.DB.Model(&user).Update("fdd_state", 2).Error; err != nil {
|
||||
zap.L().Error("user update failed", zap.Error(err))
|
||||
err = errors.New(m.UPDATE_FAILED)
|
||||
return
|
||||
}
|
||||
copyOpt := util.CopyOption{
|
||||
Src: &user,
|
||||
Dst: rep.User,
|
||||
}
|
||||
util.CopyStructSuper(copyOpt)
|
||||
return
|
||||
}
|
||||
|
||||
func CheckInvitedCode(invitedCode string) (user *model.User, err error) {
|
||||
user = &model.User{}
|
||||
//找到用户
|
||||
if err := db.DB.Where("invited_code =?", invitedCode).Find(user).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
if user.ID == 0 {
|
||||
err = errors.New(m.INVITE_CODE_INVALID)
|
||||
return nil, err
|
||||
}
|
||||
return user, nil
|
||||
}
|
||||
|
||||
func Createinvite(userId, invitedId int32) (invite *model.Invite, err error) {
|
||||
invite = &model.Invite{}
|
||||
invite.UserId = userId
|
||||
invite.InvitedId = invitedId
|
||||
if err := db.DB.Create(&invite).Error; err != nil {
|
||||
zap.L().Error("create invite info err", zap.Error(err))
|
||||
err = errors.New(m.CREATE_ERROR)
|
||||
return nil, err
|
||||
}
|
||||
return invite, nil
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,119 +0,0 @@
|
||||
// Package dao -----------------------------
|
||||
// @file : artistinfo_artshow_artistIndex.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/3 0:20
|
||||
// -------------------------------------------
|
||||
package dao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var ArtistinfoArtshowArtistIndex = new(artistinfoArtshowArtistIndex)
|
||||
|
||||
type artistinfoArtshowArtistIndex struct{}
|
||||
|
||||
func (a artistinfoArtshowArtistIndex) BatchCreateData(datas []model.ArtshowArtistIndex) error {
|
||||
//return db.DB.Create(&datas).Error
|
||||
tx := db.DB.Begin()
|
||||
for _, v := range datas {
|
||||
err := a.CreateData(&v, tx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
tx.Commit()
|
||||
return nil
|
||||
}
|
||||
func (a artistinfoArtshowArtistIndex) CreateData(data *model.ArtshowArtistIndex, tx ...*gorm.DB) error {
|
||||
var txdb *gorm.DB
|
||||
if tx != nil {
|
||||
txdb = tx[0]
|
||||
} else {
|
||||
txdb = db.DB
|
||||
}
|
||||
var exist = model.ArtshowArtistIndex{}
|
||||
db.DB.Where("artist_uid = ? AND status = 2 AND class= ?", data.ArtistUid, data.Class).Find(&exist)
|
||||
if exist.ID != 0 {
|
||||
return errors.New(fmt.Sprintf("主题[%s]已存在", data.Title))
|
||||
}
|
||||
return txdb.Create(&data).Error
|
||||
}
|
||||
|
||||
func (a artistinfoArtshowArtistIndex) UpdateData(data *model.ArtshowArtistIndex) error {
|
||||
return db.DB.Where("id = ?", data.ID).Updates(&data).Error
|
||||
}
|
||||
|
||||
func (a artistinfoArtshowArtistIndex) DeletedData(id ...int64) (err error) {
|
||||
if len(id) == 1 {
|
||||
err = db.DB.Where("id = ?", id[0]).Delete(&model.ArtshowArtistIndex{}).Error
|
||||
} else if len(id) > 0 {
|
||||
err = db.DB.Where("id = ?", id).Delete(&model.ArtshowArtistIndex{}).Error
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (a artistinfoArtshowArtistIndex) GetData(id int64) (data *model.ArtshowArtistIndex, err error) {
|
||||
err = db.DB.Where("id = ?", id).First(&data).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (a artistinfoArtshowArtistIndex) GetDataList(req *artistinfoArtshow.GetArtistIndexListRequest) (datas []model.ArtshowArtistIndex, total int64, err error) {
|
||||
datas = []model.ArtshowArtistIndex{}
|
||||
var tx = db.DB.Model(model.ArtshowArtistIndex{})
|
||||
if req.ArtistUid != "" {
|
||||
tx = tx.Where("artist_uid = ?", req.ArtistUid)
|
||||
}
|
||||
if req.LockTime != "" {
|
||||
tx = tx.Where("lock_time = ?", req.LockTime)
|
||||
}
|
||||
if req.Status != 0 {
|
||||
tx = tx.Where("status = ?", req.Status)
|
||||
}
|
||||
if req.AuditStatus != 0 {
|
||||
tx = tx.Where("audit_status = ?", req.AuditStatus)
|
||||
}
|
||||
//if req.AuditMark1 != "" {
|
||||
// tx = tx.Where("audit_mark1 = ?", req.AuditMark1)
|
||||
//}
|
||||
//if req.AuditMark2 != "" {
|
||||
// tx = tx.Where("audit_mark2 = ?", req.AuditMark2)
|
||||
//}
|
||||
err = tx.Count(&total).Scopes(db.Pagination(req.Page, req.PageSize)).Find(&datas).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (a artistinfoArtshowArtistIndex) Audit(auditStatus model.AuditStatus, mark1, mark2 string, ids ...int64) (err error) {
|
||||
tx := db.DB.Begin()
|
||||
err = tx.Model(model.ArtshowArtistIndex{}).Where("id in ?", ids).Update("audit_status", auditStatus).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = tx.Model(model.ArtshowArtistIndex{}).Where("id in ?", ids).Update("audit_mark1", mark1).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = tx.Model(model.ArtshowArtistIndex{}).Where("id in ?", ids).Update("audit_mark2", mark2).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
tx.Commit()
|
||||
return
|
||||
}
|
||||
|
||||
func (a artistinfoArtshowArtistIndex) GetArtistIndexDetail(in *artistinfoArtshow.GetArtistIndexDetailRequest) (rep model.ArtshowArtistIndex, err error) {
|
||||
var tx = db.DB.Model(model.ArtshowArtistIndex{})
|
||||
if in.Id != 0 {
|
||||
tx = tx.Where("id = ?", in.Id)
|
||||
}
|
||||
//var data model.ArtshowArtistIndex
|
||||
err = tx.First(&rep).Error
|
||||
return
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
// Package dao -----------------------------
|
||||
// @file : artistinfo_artshow_artistIndex.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/3 0:20
|
||||
// -------------------------------------------
|
||||
package dao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var ArtistSupplement = new(artistSupplement)
|
||||
|
||||
type artistSupplement struct{}
|
||||
|
||||
func (a artistSupplement) BatchCreateData(datas []model.ArtshowArtistSupplement) error {
|
||||
//return db.DB.Create(&datas).Error
|
||||
tx := db.DB.Begin()
|
||||
for _, v := range datas {
|
||||
err := a.CreateData(&v, tx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
tx.Commit()
|
||||
return nil
|
||||
}
|
||||
func (a artistSupplement) CreateData(data *model.ArtshowArtistSupplement, tx ...*gorm.DB) error {
|
||||
var txdb *gorm.DB
|
||||
if tx != nil {
|
||||
txdb = tx[0]
|
||||
} else {
|
||||
txdb = db.DB
|
||||
}
|
||||
var exist = model.ArtshowArtistSupplement{}
|
||||
db.DB.Where("artist_uid = ? AND status = 2", data.ArtistUid).Find(&exist)
|
||||
if exist.ID != 0 {
|
||||
return errors.New(fmt.Sprintf("画家补充信息已存在"))
|
||||
}
|
||||
return txdb.Create(&data).Error
|
||||
}
|
||||
|
||||
func (a artistSupplement) UpdateData(data *model.ArtshowArtistSupplement) error {
|
||||
return db.DB.Updates(&data).Error
|
||||
|
||||
}
|
||||
|
||||
func (a artistSupplement) DeletedData(id ...int64) (err error) {
|
||||
if len(id) == 1 {
|
||||
err = db.DB.Where("id = ?", id[0]).Delete(&model.ArtshowArtistSupplement{}).Error
|
||||
} else if len(id) > 0 {
|
||||
err = db.DB.Where("id = ?", id).Delete(&model.ArtshowArtistSupplement{}).Error
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (a artistSupplement) GetData(id int64) (data *model.ArtshowArtistSupplement, err error) {
|
||||
err = db.DB.Where("id = ?", id).First(&data).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (a artistSupplement) GetDataList(req *artistinfoArtshow.GetArtistSupplementListRequest) (datas []model.ArtshowArtistSupplement, total int64, err error) {
|
||||
datas = []model.ArtshowArtistSupplement{}
|
||||
var tx = db.DB.Model(model.ArtshowArtistSupplement{})
|
||||
if req.ArtistUid != "" {
|
||||
tx = tx.Where("artist_uid = ?", req.ArtistUid)
|
||||
}
|
||||
if req.LockTime != "" {
|
||||
tx = tx.Where("lock_time = ?", req.LockTime)
|
||||
}
|
||||
if req.Status != 0 {
|
||||
tx = tx.Where("status = ?", req.Status)
|
||||
}
|
||||
if req.AuditStatus != 0 {
|
||||
tx = tx.Where("audit_status = ?", req.AuditStatus)
|
||||
}
|
||||
if req.ArtistName != "" {
|
||||
tx = tx.Where(fmt.Sprintf("artist_name LIKE '%%%v%%'", req.ArtistName))
|
||||
}
|
||||
fmt.Sprintln("req.ArtistName ", req.ArtistName)
|
||||
//if req.AuditMark1 != "" {
|
||||
// tx = tx.Where("audit_mark1 = ?", req.AuditMark1)
|
||||
//}
|
||||
//if req.AuditMark2 != "" {
|
||||
// tx = tx.Where("audit_mark2 = ?", req.AuditMark2)
|
||||
//}
|
||||
err = tx.Count(&total).Scopes(db.Pagination(req.Page, req.PageSize)).Find(&datas).Error
|
||||
return
|
||||
}
|
||||
func (a artistSupplement) Audit(auditStatus model.AuditStatus, mark1, mark2 string, ids ...int64) (err error) {
|
||||
tx := db.DB.Begin()
|
||||
err = tx.Model(model.ArtshowArtistSupplement{}).Where("id in ?", ids).Update("audit_status", auditStatus).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = tx.Model(model.ArtshowArtistSupplement{}).Where("id in ?", ids).Update("audit_mark1", mark1).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = tx.Model(model.ArtshowArtistSupplement{}).Where("id in ?", ids).Update("audit_mark2", mark2).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
tx.Commit()
|
||||
return
|
||||
}
|
||||
|
||||
func (a artistSupplement) GetSupplementDetail(in *artistinfoArtshow.GetArtistSupplementDetailRequest) (rep model.ArtshowArtistSupplement, err error) {
|
||||
var tx = db.DB.Model(model.ArtshowArtistSupplement{})
|
||||
if in.Id != 0 {
|
||||
tx = tx.Where("id = ?", in.Id)
|
||||
}
|
||||
//var data model.ArtshowArtistSupplement
|
||||
err = tx.First(&rep).Error
|
||||
return
|
||||
}
|
@ -1,141 +0,0 @@
|
||||
// Package dao -----------------------------
|
||||
// @file : artistinfo_artshow.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/2 12:06
|
||||
// -------------------------------------------
|
||||
package dao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var ArtistinfoArtshowVideo = new(artistinfoArtshowVideo)
|
||||
|
||||
type artistinfoArtshowVideo struct{}
|
||||
|
||||
func (a artistinfoArtshowVideo) BatchCreateData(datas []model.ArtshowVideoRecord) error {
|
||||
//return db.DB.Create(&datas).Error
|
||||
tx := db.DB.Begin()
|
||||
for _, v := range datas {
|
||||
var exist model.ArtshowVideoRecord
|
||||
db.DB.Where("artist_uid = ? AND lock_time =?", v.ArtistUid, v.LockTime).Find(&exist)
|
||||
if exist.ID != 0 {
|
||||
continue
|
||||
}
|
||||
err := a.CreateData(&v, tx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
tx.Commit()
|
||||
return nil
|
||||
}
|
||||
func (a artistinfoArtshowVideo) CreateData(data *model.ArtshowVideoRecord, tx ...*gorm.DB) error {
|
||||
var txdb *gorm.DB
|
||||
if tx != nil {
|
||||
txdb = tx[0]
|
||||
} else {
|
||||
txdb = db.DB
|
||||
}
|
||||
var exist = model.ArtshowVideoRecord{}
|
||||
db.DB.Where("artist_uid = ? AND status = 2", data.ArtistUid).Find(&exist)
|
||||
if exist.ID != 0 {
|
||||
return errors.New("数据已存在")
|
||||
}
|
||||
return txdb.Create(&data).Error
|
||||
}
|
||||
|
||||
func (a artistinfoArtshowVideo) UpdateData(data *model.ArtshowVideoRecord) error {
|
||||
return db.DB.Updates(&data).Error
|
||||
|
||||
}
|
||||
|
||||
func (a artistinfoArtshowVideo) DeletedData(id ...int64) (err error) {
|
||||
if len(id) == 1 {
|
||||
err = db.DB.Where("id = ?", id[0]).Delete(&model.ArtshowVideoRecord{}).Error
|
||||
} else if len(id) > 0 {
|
||||
err = db.DB.Where("id = ?", id).Delete(&model.ArtshowVideoRecord{}).Error
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (a artistinfoArtshowVideo) GetData(id int64) (data *model.ArtshowVideoRecord, err error) {
|
||||
err = db.DB.Where("id = ?", id).First(data).Error
|
||||
return
|
||||
}
|
||||
|
||||
func (a artistinfoArtshowVideo) GetDataList(req *artistinfoArtshow.GetArtshowVideoListRequst) (datas []model.ArtshowVideoRecord, total int64, err error) {
|
||||
datas = []model.ArtshowVideoRecord{}
|
||||
var tx = db.DB.Model(model.ArtshowVideoRecord{})
|
||||
if req.ArtistUid != "" {
|
||||
tx = tx.Where("artist_uid = ?", req.ArtistUid)
|
||||
}
|
||||
if req.LockTime != "" {
|
||||
tx = tx.Where("lock_time = ?", req.LockTime)
|
||||
}
|
||||
if req.ArtistName != "" {
|
||||
// tx = tx.Clauses(clause.Like{
|
||||
// Column: "artist_name",
|
||||
// Value: "%" + req.ArtistName + "%",
|
||||
// })
|
||||
var searchName = "%" + req.ArtistName + "%"
|
||||
tx = tx.Where("artist_name LIKE ? OR artist_uid LIKE ?", searchName, searchName)
|
||||
}
|
||||
if req.Status != 0 {
|
||||
tx = tx.Where("status = ?", req.Status)
|
||||
}
|
||||
//if req.VideoUrl != "" {
|
||||
// tx = tx.Where("video_url = ?", req.VideoUrl)
|
||||
//}
|
||||
if req.AuditStatus != 0 {
|
||||
tx = tx.Where("audit_status = ?", req.AuditStatus)
|
||||
}
|
||||
//if req.AuditMark1 != "" {
|
||||
// tx = tx.Where("audit_mark1 = ?", req.AuditMark1)
|
||||
//}
|
||||
//if req.AuditMark2 != "" {
|
||||
// tx = tx.Where("audit_mark2 = ?", req.AuditMark2)
|
||||
//}
|
||||
err = tx.Count(&total).Scopes(db.Pagination(req.Page, req.PageSize)).Find(&datas).Error
|
||||
return
|
||||
}
|
||||
func (a artistinfoArtshowVideo) Audit(auditStatus model.AuditStatus, mark1, mark2 string, ids ...int64) (err error) {
|
||||
tx := db.DB.Begin()
|
||||
err = tx.Model(model.ArtshowVideoRecord{}).Where("id in ?", ids).Update("audit_status", auditStatus).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = tx.Model(model.ArtshowVideoRecord{}).Where("id in ?", ids).Update("audit_mark1", mark1).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = tx.Model(model.ArtshowVideoRecord{}).Where("id in ?", ids).Update("audit_mark2", mark2).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
tx.Commit()
|
||||
return
|
||||
}
|
||||
func (a artistinfoArtshowVideo) GetArtshowVideoDetail(in *artistinfoArtshow.GetArtshowVideoDetailRequest) (rep model.ArtshowVideoRecord, err error) {
|
||||
var tx = db.DB.Model(model.ArtshowVideoRecord{})
|
||||
//if in.ArtistUid != "" {
|
||||
// tx = tx.Where("artist_uid =?", in.ArtistUid)
|
||||
//}
|
||||
//if in.LockTime != "" {
|
||||
// tx = tx.Where("lock_time = ?", in.LockTime)
|
||||
//}
|
||||
//if in.Status != 0 {
|
||||
// tx = tx.Where("status = ?", in.Status)
|
||||
//}
|
||||
if in.Id != 0 {
|
||||
tx = tx.Where("id = ?", in.Id)
|
||||
}
|
||||
err = tx.First(&rep).Error
|
||||
return
|
||||
}
|
@ -1,361 +0,0 @@
|
||||
// Package dao -----------------------------
|
||||
// @file : artwork.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/2/24 18:23
|
||||
// -------------------------------------------
|
||||
package dao
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoArtwork"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artwork_query"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/service"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func CreateArtworkLockRecord(in *model.ArtworkLockRecord) error {
|
||||
var data = model.ArtworkLockRecord{
|
||||
ArtistUid: in.ArtistUid,
|
||||
ArtworkUid: in.ArtworkUid,
|
||||
Status: in.Status,
|
||||
LockTime: in.LockTime,
|
||||
}
|
||||
return db.DB.Create(&data).Error
|
||||
}
|
||||
|
||||
func UpdateArtworkLockRecord(in *model.ArtworkLockRecord) error {
|
||||
var data = model.ArtworkLockRecord{
|
||||
ArtistUid: in.ArtistUid,
|
||||
ArtworkUid: in.ArtworkUid,
|
||||
Status: in.Status,
|
||||
LockTime: in.LockTime,
|
||||
BaseAuditStatus: in.BaseAuditStatus,
|
||||
BaseAuditMark: in.BaseAuditMark,
|
||||
BaseAuditMark2: in.BaseAuditMark2,
|
||||
SupplementAuditStatus: in.SupplementAuditStatus,
|
||||
SupplementAuditMark: in.SupplementAuditMark,
|
||||
SupplementAuditMark2: in.SupplementAuditMark2,
|
||||
}
|
||||
var thisData model.ArtworkLockRecord
|
||||
err := db.DB.Where("artist_uid = ?", in.ArtworkUid).First(&thisData).Error
|
||||
if err != nil {
|
||||
if err != gorm.ErrRecordNotFound {
|
||||
return errors.New("画作数据未找到")
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
data.Model = model.Model{
|
||||
ID: thisData.ID,
|
||||
CreatedAt: thisData.CreatedAt,
|
||||
}
|
||||
return db.DB.Updates(&data).Error
|
||||
}
|
||||
|
||||
func DeletedArtworkLockRecord(artworkUid ...string) error {
|
||||
if len(artworkUid) == 0 {
|
||||
return nil
|
||||
} else if len(artworkUid) == 1 {
|
||||
return db.DB.Where("artwork_uid = ? AND status != 2 ", artworkUid[0]).Delete(&model.ArtworkLockRecord{}).Error
|
||||
} else {
|
||||
return db.DB.Where("artwork_uid in ? AND status != 2 ", artworkUid).Delete(&model.ArtworkLockRecord{}).Error
|
||||
}
|
||||
}
|
||||
|
||||
func BatchLockArtworks(artistUid string, lockTime string) error {
|
||||
var artworkUids []string
|
||||
db.DB.Model(model.ArtworkLockRecord{}).
|
||||
Where("status = 1 AND lock_time=''").Where(" artist_uid = ?", artistUid).
|
||||
Pluck("artwork_uid", &artworkUids)
|
||||
if artworkUids == nil {
|
||||
return nil
|
||||
}
|
||||
if lockTime == "" {
|
||||
lockTime = stime.TimeToString(time.Now(), stime.Format_Normal_YMDhms)
|
||||
}
|
||||
var updateMap = map[string]any{
|
||||
"status": 2,
|
||||
"lock_time": lockTime,
|
||||
"base_audit_status": model.AuditType_Pending, //基本数据审批
|
||||
"audit_flow_index": 2, //进入基本信息审批流程
|
||||
}
|
||||
return db.DB.Model(model.ArtworkLockRecord{}).Where("artwork_uid in ?", artworkUids).Updates(&updateMap).Error
|
||||
}
|
||||
|
||||
func BatchUnlockArtworks(artistUid string) error {
|
||||
//var artworkUids []string
|
||||
// 查询用户当前锁定的时间点
|
||||
//var nowLockTime string
|
||||
//err := db.DB.Model(model.ArtworkLockRecord{}).Select("MAX(lock_time)").Where("artist_uid = %s AND lock_time !='' AND STATUS =2", artistUid).Scan(&nowLockTime).Error
|
||||
//if err != nil {
|
||||
// return err
|
||||
//}
|
||||
////查询此时间节点内的所有画作
|
||||
//db.DB.Model(model.ArtworkLockRecord{}).
|
||||
// //Where("lock_time = (SELECT MAX(lock_time) FROM artwork_lock_record where artist_uid = %s AND lock_time !='' AND STATUS =2)", artistUid).
|
||||
// //Joins("LEFT JOIN (lock_time = (select max(lock_time) form artwork_lock_record WHERE artist_uid = ?) lt", artistUid).
|
||||
// //Where(fmt.Sprintf("lock_time = (select max(lock_time) form artwork_lock_record WHERE artist_uid = %s)", artistUid)).
|
||||
// Where("status = 2").
|
||||
// Pluck("artwork_uid", &artworkUids)
|
||||
//if artworkUids == nil {
|
||||
// return nil
|
||||
//}
|
||||
return db.DB.Model(model.ArtworkLockRecord{}).Where("artist_uid = ? AND status =2 AND lock_time !=''", artistUid).Update("status", 3).Error
|
||||
}
|
||||
|
||||
func GetArtworkLockDetail(artworkUid string) (data model.ArtworkLockRecord, err error) {
|
||||
err = db.DB.Where("artwork_uid = ?", artworkUid).First(&data).Error
|
||||
return
|
||||
}
|
||||
|
||||
func GetArtworkLockRecords(req *artistInfoArtwork.GetArtworkLockRecordsRequest) (resp *artistInfoArtwork.ArtworkLockList, err error) {
|
||||
var (
|
||||
datas = []model.ArtworkLockRecord{}
|
||||
tx = db.DB.Model(model.ArtworkLockRecord{}).Order("lock_time desc")
|
||||
)
|
||||
if req.Page == 0 || req.PageSize == 0 {
|
||||
req.Page = 1
|
||||
req.PageSize = -1
|
||||
}
|
||||
resp = &artistInfoArtwork.ArtworkLockList{}
|
||||
if req.ArtistUid != "" {
|
||||
tx = tx.Where("artist_uid = ?", req.ArtistUid)
|
||||
}
|
||||
switch req.QueryType {
|
||||
case artistInfoArtwork.ArtworkQueryMode_NowPreSaveArtwork: //当前暂存的画作
|
||||
tx = tx.Where("status = 1")
|
||||
case artistInfoArtwork.ArtworkQueryMode_NowLockedArtwork: //当前已锁定的画作
|
||||
tx = tx.Where("status = 2")
|
||||
case artistInfoArtwork.ArtworkQueryMode_NowPreSaveAndLocked: //当前暂存和已锁定的画作(也就是用户端画作管理中的数据)
|
||||
tx = tx.Where("status =1 OR status =2")
|
||||
case artistInfoArtwork.ArtworkQueryMode_NowAuditFlowOfBase: //当前处于基本信息审批阶段的画作(包括进入其它流程的画作)
|
||||
tx = tx.Where("status = 1 OR status=2") // 现要求暂存和锁定的画作都能进行审批和展示
|
||||
case artistInfoArtwork.ArtworkQueryMode_NowAuditFlowOfSupplementing: //当前处于补充信息审批阶段的画作
|
||||
tx = tx.Where("status =2 AND audit_flow_index = 3")
|
||||
case artistInfoArtwork.ArtworkQueryMode_AllUnlockArtwork: //所有已解锁的画作(历史画作)
|
||||
tx = tx.Where("status = 3").Order("lock_time desc")
|
||||
//case artistInfoArtwork.ArtworkQueryMode_AllHistoryArtwork: //所有历史画作
|
||||
// tx = tx.Where("status > 1")
|
||||
case artistInfoArtwork.ArtworkQueryMode_AllAuditPassArtwork: //所有审核通过的画作
|
||||
tx = tx.Where("supplement_audit_status = 4").Order("lock_time desc")
|
||||
case artistInfoArtwork.ArtworkQueryMode_BaseAuditPassed: //基本画作审批通过的画作
|
||||
tx = tx.Where("base_audit_status = 4").Order("lock_time desc")
|
||||
}
|
||||
if req.BaseAuditStatus != 0 {
|
||||
if req.BaseAuditStatus == 2 {
|
||||
//现要求暂存的画作也支持在待审核列表展示和审批
|
||||
tx = tx.Where("base_audit_status = ? OR base_audit_status =1", req.BaseAuditStatus)
|
||||
} else if req.BaseAuditStatus != 1 { //排除暂存状态,需求修改后,这个字段的暂存状态无法作为判断条件了
|
||||
tx = tx.Where("base_audit_status = ?", req.BaseAuditStatus)
|
||||
}
|
||||
|
||||
}
|
||||
if req.SupplementAuditStatus != 0 {
|
||||
tx = tx.Where("supplement_audit_status = ?", req.SupplementAuditStatus)
|
||||
}
|
||||
if len(req.ArtworkUids) > 0 {
|
||||
tx = tx.Where("artwork_uid in ?", req.ArtworkUids)
|
||||
}
|
||||
err = tx.Count(&resp.Total).Scopes(db.Pagination(req.Page, req.PageSize)).Find(&datas).Error
|
||||
for _, v := range datas {
|
||||
resp.Data = append(resp.Data, &artistInfoArtwork.ArtistLockInfo{
|
||||
ArtistUid: v.ArtistUid,
|
||||
ArtworkUid: v.ArtworkUid,
|
||||
Status: v.Status,
|
||||
LockTime: v.LockTime,
|
||||
BaseAuditStatus: int32(v.BaseAuditStatus),
|
||||
BaseAuditMark: v.BaseAuditMark,
|
||||
BaseAuditMark2: v.BaseAuditMark2,
|
||||
SupplementAuditStatus: int32(v.SupplementAuditStatus),
|
||||
SupplementAuditMark: v.SupplementAuditMark,
|
||||
SupplementAuditMark2: v.SupplementAuditMark2,
|
||||
AuditFlowIndex: int32(v.AuditFlowIndex),
|
||||
CreatedAt: v.CreatedAt.Unix(),
|
||||
UpdatedAt: v.UpdatedAt.Unix(),
|
||||
DeletedAt: int64(v.DeletedAt),
|
||||
})
|
||||
}
|
||||
|
||||
resp.Page = req.Page
|
||||
if req.PageSize == -1 {
|
||||
resp.PageSize = int64(len(datas))
|
||||
} else {
|
||||
resp.PageSize = req.PageSize
|
||||
}
|
||||
return
|
||||
}
|
||||
func HasBeenLocked(artistUid string) bool {
|
||||
//检查是否已经被锁定
|
||||
var hasLocked int64
|
||||
db.DB.Model(model.ArtworkLockRecord{}).Where("artist_uid = ? AND status = 2", artistUid).Count(&hasLocked)
|
||||
if hasLocked > 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// UpdateAuditStatus 更新审批状态
|
||||
// flowIndex 2=基本信息审批 3=补充信息审批
|
||||
func UpdateAuditStatus(artworkUid string, auditStatus int64, remark1 string, remark2 string, flowIndex int64) error {
|
||||
var thisData model.ArtworkLockRecord
|
||||
err := db.DB.Model(model.ArtworkLockRecord{}).Where("artwork_uid = ?", artworkUid).First(&thisData).Error
|
||||
if err != nil {
|
||||
if err != gorm.ErrRecordNotFound {
|
||||
return errors.New("画作数据未找到")
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
switch flowIndex {
|
||||
case 2:
|
||||
thisData.BaseAuditStatus = model.AuditStatus(auditStatus)
|
||||
thisData.BaseAuditMark = remark1
|
||||
thisData.BaseAuditMark2 = remark2
|
||||
case 3:
|
||||
thisData.SupplementAuditStatus = model.AuditStatus(auditStatus)
|
||||
thisData.SupplementAuditMark = remark1
|
||||
thisData.SupplementAuditMark2 = remark2
|
||||
}
|
||||
return db.DB.Save(&thisData).Error
|
||||
}
|
||||
|
||||
func BatchUpdateAuditStatus(artworkUids []string, auditStatus int64, remark1 string, remark2 string, flowIndex int64) error {
|
||||
for _, uid := range artworkUids {
|
||||
if err := UpdateAuditStatus(uid, auditStatus, remark1, remark2, flowIndex); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func GenerateArtworkSupplementInfo(artworkUids []string) error {
|
||||
var datas = []model.ArtworkLockRecord{}
|
||||
db.DB.Where("artwork_uid in ?", artworkUids).Find(&datas)
|
||||
for _, v := range datas {
|
||||
if v.BaseAuditStatus != 4 {
|
||||
return errors.New("存在基本信息未审批通过的画作,操作取消!")
|
||||
}
|
||||
}
|
||||
var updateData = map[string]any{
|
||||
"audit_flow_index": 3,
|
||||
"supplement_audit_status": 5,
|
||||
}
|
||||
return db.DB.Model(model.ArtworkLockRecord{}).Where("artwork_uid in ?", artworkUids).Updates(&updateData).Error
|
||||
}
|
||||
|
||||
func PassedArtworkStatic(request *artistInfoArtwork.ArtistArtworkStaticRequest, uids []string) (res []model.ViewPassedArtworkStatic, err error) {
|
||||
res = []model.ViewPassedArtworkStatic{}
|
||||
var tx = db.DB.Model(&model.ViewPassedArtworkStatic{})
|
||||
err = tx.Where("artist_uid in ?", uids).Scopes(db.Pagination(request.Page, request.PageSize)).Find(&res).Error
|
||||
return
|
||||
}
|
||||
|
||||
// CountArtworkTotalWhichAuditPassed 单个统计画家已通过的画作数量和已通过的平尺数,统计的是基本画作审批通过的画作数量
|
||||
func CountArtworkTotalWhichAuditPassed(artistUid string) (rulerPassedTotal int64, artworkPassedCount int64) {
|
||||
artworkList, err := GetArtworkLockRecords(&artistInfoArtwork.GetArtworkLockRecordsRequest{
|
||||
ArtistUid: artistUid,
|
||||
QueryType: artistInfoArtwork.ArtworkQueryMode_BaseAuditPassed,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("service.GrpcArtistInfoArtworkImpl.GetArtworkLockRecords Error:", err.Error())
|
||||
return 0, 0
|
||||
}
|
||||
if len(artworkList.Data) == 0 {
|
||||
fmt.Println("service.GrpcArtistInfoArtworkImpl.GetArtworkLockRecords :画作数量为0")
|
||||
return 0, 0
|
||||
}
|
||||
var artworkUids = []string{}
|
||||
for _, v := range artworkList.Data {
|
||||
artworkUids = append(artworkUids, v.ArtworkUid)
|
||||
}
|
||||
//搜索画作信息
|
||||
var (
|
||||
defultPageSize int32 = 500
|
||||
nowPageIndex int32
|
||||
artworkNumber int32
|
||||
artworkRulerTotal int32
|
||||
artworkTotal int32
|
||||
)
|
||||
for {
|
||||
nowPageIndex++
|
||||
res, err := service.ArtworkQueryImpl.ArtworkPreviewList(context.Background(), &artwork_query.ArtworkPreviewListRequest{
|
||||
Page: nowPageIndex,
|
||||
PageSize: defultPageSize,
|
||||
ArtistUid: artistUid,
|
||||
ArtworkUids: artworkUids,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return 0, 0
|
||||
}
|
||||
if artworkNumber == 0 {
|
||||
artworkNumber = res.Page.Total
|
||||
artworkTotal += res.Page.Total
|
||||
}
|
||||
artworkNumber -= defultPageSize
|
||||
for _, v := range res.Data {
|
||||
artworkRulerTotal += v.Ruler
|
||||
}
|
||||
if artworkNumber <= 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return int64(artworkRulerTotal), int64(artworkTotal)
|
||||
}
|
||||
|
||||
// CountAllArtworkTotal 单个统计画家所有的画作数量和平尺数
|
||||
func CountAllArtworkTotal(artistUid string) (artworkTotal int64, artworkRulerTotal int64) {
|
||||
//查询画家宝中的画作总数
|
||||
var artworkUids []string
|
||||
db.DB.Model(model.ArtworkLockRecord{}).Where("artist_uid = ?", artistUid).Pluck("artwork_uid", &artworkUids)
|
||||
artworkTotal = int64(len(artworkUids))
|
||||
//查询此画家的所有画作
|
||||
artworkList, err := service.ArtworkQueryImpl.ArtworkPreviewList(context.Background(), &artwork_query.ArtworkPreviewListRequest{
|
||||
Page: 1,
|
||||
PageSize: -1,
|
||||
ArtistUid: artistUid,
|
||||
ArtworkUids: artworkUids,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("画作列表查询失败", err.Error())
|
||||
return 0, 0
|
||||
}
|
||||
for _, v := range artworkList.Data {
|
||||
artworkRulerTotal += int64(v.Ruler)
|
||||
}
|
||||
return artworkTotal, artworkRulerTotal
|
||||
}
|
||||
|
||||
func UpdateArtworkExtData(request *artistInfoArtwork.ArtworkExtData) (err error) {
|
||||
if request.ArtworkUid == "" {
|
||||
return errors.New("画作uid不能为空")
|
||||
}
|
||||
err = db.DB.Model(model.ArtworkLockRecord{}).Where("artwork_uid = ?", request.ArtworkUid).Update("national_exhibition", request.NationalExhibition).Error
|
||||
return
|
||||
}
|
||||
func GetArtworkExtDatas(request *artistInfoArtwork.GetArtworkExtDataRequest) (data *artistInfoArtwork.GetArtworkExtDataResponse, err error) {
|
||||
data = &artistInfoArtwork.GetArtworkExtDataResponse{
|
||||
Data: []*artistInfoArtwork.ArtworkExtData{},
|
||||
}
|
||||
if request.ArtworkUid != "" {
|
||||
request.ArtworkUids = append(request.ArtworkUids, request.ArtworkUid)
|
||||
}
|
||||
for _, v := range request.ArtworkUids {
|
||||
var artworkData = artistInfoArtwork.ArtworkExtData{ArtworkUid: v}
|
||||
var findData model.ArtworkLockRecord
|
||||
if err = db.DB.Where("artwork_uid = ?", v).Find(&findData).Error; err != nil {
|
||||
return
|
||||
}
|
||||
artworkData.NationalExhibition = int64(findData.NationalExhibition)
|
||||
data.Data = append(data.Data, &artworkData)
|
||||
}
|
||||
return
|
||||
}
|
@ -1,160 +0,0 @@
|
||||
package dao
|
||||
|
||||
// import (
|
||||
// "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
// "github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
||||
// )
|
||||
|
||||
// =====================================
|
||||
//
|
||||
// 对账单批次
|
||||
// func CreateStatementBatch(in *artistinfoStatement.StatementBatchRequest) (res model.StatementBatch, err error) {
|
||||
// res = model.StatementBatch{
|
||||
// StType: in.StType,
|
||||
// ArtistUid: in.ArtistUid,
|
||||
// ArtistRealName: in.ArtistRealName,
|
||||
// FlowStatus: in.FlowStatus,
|
||||
// BatchTime: in.BatchTime,
|
||||
// MinPrice: in.MinPrice,
|
||||
// GuaranteePrice: in.GuaranteePrice,
|
||||
// FileUrl: in.FileUrl,
|
||||
// }
|
||||
// err = db.DB.Clauses(clause.OnConflict{
|
||||
// Columns: []clause.Column{{Name: "st_type"}, {Name: "artist_uid"}, {Name: "batch_time"}},
|
||||
// UpdateAll: true,
|
||||
// }).Create(&res).Error
|
||||
// return
|
||||
// }
|
||||
|
||||
// func BatchCreateStatementBatch(in *artistinfoStatement.BatchCreateStatementBatchRequest) error {
|
||||
// var datas = []model.StatementBatch{}
|
||||
// for _, in := range in.Data {
|
||||
// datas = append(datas, model.StatementBatch{
|
||||
// StType: in.StType,
|
||||
// ArtistUid: in.ArtistUid,
|
||||
// ArtistRealName: in.ArtistRealName,
|
||||
// FlowStatus: in.FlowStatus,
|
||||
// BatchTime: in.BatchTime,
|
||||
// MinPrice: in.MinPrice,
|
||||
// GuaranteePrice: in.GuaranteePrice,
|
||||
// FileUrl: in.FileUrl,
|
||||
// })
|
||||
// }
|
||||
// err := db.DB.Clauses(clause.OnConflict{
|
||||
// Columns: []clause.Column{{Name: "st_type"}, {Name: "artist_uid"}, {Name: "batch_time"}},
|
||||
// UpdateAll: true,
|
||||
// }).Create(&datas).Error
|
||||
// return err
|
||||
// }
|
||||
|
||||
// func GetStatementBatchList(in *artistinfoStatement.GetStatementBatchListRequest) (res []model.StatementBatch, total int64, err error) {
|
||||
// res = []model.StatementBatch{}
|
||||
// var orm = db.DB.Model(model.StatementBatch{}).Order("created_at desc").Preload("ArtworkList")
|
||||
// if in.Condition.StType != 0 {
|
||||
// orm = orm.Where("st_type = ?", in.Condition.StType)
|
||||
// }
|
||||
// if in.Condition.ArtistUid != "" {
|
||||
// orm = orm.Where("artist_uid = ?", in.Condition.ArtistUid)
|
||||
// }
|
||||
// if in.Condition.ArtistRealName != "" {
|
||||
// orm = orm.Where("artist_real_name = ?", in.Condition.ArtistRealName)
|
||||
// }
|
||||
// if in.Condition.FlowStatus != 0 {
|
||||
// orm = orm.Where("flow_status = ?", in.Condition.FlowStatus)
|
||||
// }
|
||||
// if in.Condition.BatchTime != "" {
|
||||
// orm = orm.Where("batch_time = ?", in.Condition.BatchTime)
|
||||
// }
|
||||
// if in.Condition.MinPrice != 0 {
|
||||
// orm = orm.Where("min_price = ?", in.Condition.MinPrice)
|
||||
// }
|
||||
// if in.Condition.GuaranteePrice != 0 {
|
||||
// orm = orm.Where("guarantee_price = ?", in.Condition.GuaranteePrice)
|
||||
// }
|
||||
// if in.Condition.Id != 0 {
|
||||
// orm = orm.Where("id = ?", in.Condition.Id)
|
||||
// }
|
||||
// if in.Condition.FileUrl != "" {
|
||||
// orm = orm.Where("file_url = ?", in.Condition.FileUrl)
|
||||
// }
|
||||
// if len(in.Ids) > 0 {
|
||||
// orm = orm.Where("id in ?", in.Ids)
|
||||
// }
|
||||
// if len(in.BatchTimeList) > 0 {
|
||||
// orm = orm.Where("batch_time in ?", in.BatchTimeList)
|
||||
// }
|
||||
// err = orm.Count(&total).Scopes(db.Pagination(in.Page, in.PageSize)).Find(&res).Error
|
||||
// return
|
||||
// }
|
||||
|
||||
// func GetStatementBatchTimeMenus(in *artistinfoStatement.GetStatementBatchListRequest) (res []string, err error) {
|
||||
// res = []string{}
|
||||
// err = db.DB.Model(model.StatementBatch{}).Pluck("batch_time", &res).Error
|
||||
// return
|
||||
// }
|
||||
|
||||
// //=====================================
|
||||
// // 对账单详情
|
||||
|
||||
// func CreateStatementDetail(in *artistinfoStatement.StatementDetailRequest) (res model.StatementDetail, err error) {
|
||||
// res = model.StatementDetail{
|
||||
// BatchId: in.BatchId,
|
||||
// TfNum: in.TfNum,
|
||||
// ArtworkName: in.ArtworkName,
|
||||
// Ruler: in.Ruler,
|
||||
// SaleNo: in.SaleNo,
|
||||
// CompleteDate: in.CompleteDate,
|
||||
// }
|
||||
// err = db.DB.Clauses(clause.OnConflict{
|
||||
// Columns: []clause.Column{{Name: "tf_num"}, {Name: "batch_id"}},
|
||||
// UpdateAll: true,
|
||||
// }).Create(&res).Error
|
||||
// return
|
||||
// }
|
||||
|
||||
// func BatchCreateStatementDetail(in *artistinfoStatement.BatchCreateStatementDetailRequest) error {
|
||||
// var datas = []model.StatementDetail{}
|
||||
// for _, in := range in.Data {
|
||||
// datas = append(datas, model.StatementDetail{
|
||||
// BatchId: in.BatchId,
|
||||
// TfNum: in.TfNum,
|
||||
// ArtworkName: in.ArtworkName,
|
||||
// Ruler: in.Ruler,
|
||||
// SaleNo: in.SaleNo,
|
||||
// CompleteDate: in.CompleteDate,
|
||||
// })
|
||||
// }
|
||||
// err := db.DB.Clauses(clause.OnConflict{
|
||||
// Columns: []clause.Column{{Name: "tf_num"}, {Name: "batch_id"}},
|
||||
// UpdateAll: true,
|
||||
// }).Create(&datas).Error
|
||||
// return err
|
||||
// }
|
||||
|
||||
// func GetStatementDetailList(in *artistinfoStatement.GetStatementDetailListRequest) (res []model.StatementDetail, total int64, err error) {
|
||||
// res = []model.StatementDetail{}
|
||||
// var orm = db.DB.Model(model.StatementDetail{}).Order("created_at desc")
|
||||
// if in.Condition.BatchId != 0 {
|
||||
// orm = orm.Where("batch_id = ?", in.Condition.BatchId)
|
||||
// }
|
||||
// if in.Condition.TfNum != "" {
|
||||
// orm = orm.Where("tf_num = ?", in.Condition.TfNum)
|
||||
// }
|
||||
// if in.Condition.ArtworkName != "" {
|
||||
// orm = orm.Where("artwork_name like = ?", "%"+in.Condition.ArtworkName+"%")
|
||||
// }
|
||||
// if in.Condition.Ruler != "" {
|
||||
// orm = orm.Where("ruler = ?", in.Condition.Ruler)
|
||||
// }
|
||||
// if in.Condition.SaleNo != "" {
|
||||
// orm = orm.Where("sale_no = ?", in.Condition.SaleNo)
|
||||
// }
|
||||
// if in.Condition.CompleteDate != "" {
|
||||
// orm = orm.Where("complete_date = ?", in.Condition.CompleteDate)
|
||||
// }
|
||||
// if in.Condition.Id != 0 {
|
||||
// orm = orm.Where("id = ?", in.Condition.Id)
|
||||
// }
|
||||
// err = orm.Count(&total).Scopes(db.Pagination(in.Page, in.PageSize)).Find(&res).Error
|
||||
// return
|
||||
// }
|
@ -1,468 +0,0 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
contract "github.com/fonchain/fonchain-artistinfo/pb/contract"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/m"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func GetArtistInfoByArtistUid(artistUid string) (user model.User, err error) {
|
||||
if err = db.DB.Where("mgmt_artist_uid = ?", artistUid).Preload("RealNameInfo").Find(&user).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetMgmtContractByArtistUid(artistUid string, contractType int32) (err error) {
|
||||
var contract model.Contract
|
||||
if err = db.DB.Where("artist_uid = ? AND type = ?", artistUid, contractType).First(&contract).Error; err != nil && err != gorm.ErrRecordNotFound {
|
||||
zap.L().Error("get contract info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
//err 为空则查询到,返回画作合同已存在的错误
|
||||
if err == nil {
|
||||
err = errors.New(m.ARTWORK_CONTRACT_EXISTS)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func CreateArtistContract(tx *gorm.DB, contract *model.Contract) (err error) {
|
||||
fmt.Println("第一处1111222")
|
||||
if err = tx.Create(contract).Error; err != nil {
|
||||
zap.L().Error("create contract err", zap.Error(err))
|
||||
err = errors.New(m.CREATE_ERROR)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetMgmtContractByArtworkUid(artworkUid string, artworkType int32) (err error) {
|
||||
//画作有合同类型是2,6的都是 点击过"著作权代理转让服务合同"的
|
||||
var contract model.Contract
|
||||
|
||||
if err = db.DB.Where("artwork_uid LiKE ? AND type = ?", "%"+artworkUid+"%", artworkType).First(&contract).Error; err != nil && err != gorm.ErrRecordNotFound {
|
||||
zap.L().Error("get contract info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
//err 为空则查询到,返回画作合同已存在的错误
|
||||
if err == nil {
|
||||
err = errors.New(m.ARTWORK_CONTRACT_EXISTS)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func CreateArtworkContract(tx *gorm.DB, artworkUid []string, artistUid string, contractType int32, latestLockTime string) (err error) {
|
||||
var uid uuid.UUID
|
||||
if uid, err = uuid.NewV4(); err != nil {
|
||||
err = errors.New(m.ERROR_UID)
|
||||
return
|
||||
}
|
||||
|
||||
//将画作切片转换成字符串格式便于保存
|
||||
ArtworkUid := strings.Join(artworkUid, ",")
|
||||
contract := &model.Contract{
|
||||
Uid: uid.String(),
|
||||
ArtistUid: artistUid,
|
||||
ArtworkUid: ArtworkUid,
|
||||
Type: contractType,
|
||||
State: 1,
|
||||
Status: 2,
|
||||
LockTime: latestLockTime,
|
||||
}
|
||||
if err = tx.Create(contract).Error; err != nil {
|
||||
zap.L().Error("create contract err", zap.Error(err))
|
||||
err = errors.New(m.CREATE_ERROR)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetArtistNoByUid(artistUid string) (err error) {
|
||||
var user model.User
|
||||
if err = db.DB.Where("mgmt_artist_uid = ?", artistUid).First(&user).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetContractList(artistUid string, pageSize, offset, status int32) (contracts []*contract.Contracts, err error) {
|
||||
|
||||
var contractSlice []model.Contract
|
||||
if err = db.DB.Where("artist_uid = ? AND status = ?", artistUid, status).Order("ID asc").Limit(int(pageSize)).Offset(int(offset)).Find(&contractSlice).Error; err != nil {
|
||||
zap.L().Error("get contracts info err", zap.Error(err))
|
||||
err = errors.New(m.CREATE_ERROR)
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range contractSlice {
|
||||
contcontract := &contract.Contracts{
|
||||
ContractUid: v.Uid,
|
||||
ArtistUid: v.ArtistUid,
|
||||
ArtworkUid: v.ArtworkUid,
|
||||
ContractId: v.ContractId,
|
||||
TransactionId: v.TransactionId,
|
||||
Type: v.Type,
|
||||
ViewUrl: v.ViewUrl,
|
||||
DownloadUrl: v.DownloadUrl,
|
||||
State: v.State,
|
||||
Status: int32(v.Status),
|
||||
LockTime: v.LockTime,
|
||||
}
|
||||
|
||||
contracts = append(contracts, contcontract)
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
func GetArtistInfoById(artistUid string) (user model.User, err error) {
|
||||
if err = db.DB.Where("mgmt_artist_uid = ?", artistUid).First(&user).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func ContractList(artist_uid string, state int32) (contractData []*contract.Contracts, err error) {
|
||||
|
||||
// if state != 0 {
|
||||
// if state == 2 {
|
||||
// state = 3
|
||||
// }
|
||||
// }
|
||||
|
||||
var contracts []model.Contract
|
||||
if err = db.DB.Where("artist_uid = ? AND type != 4 AND type != 7 AND state = ?", artist_uid, state).Find(&contracts).Error; err != nil {
|
||||
zap.L().Error("get contracts info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range contracts {
|
||||
|
||||
Contract := &contract.Contracts{
|
||||
ContractUid: v.Uid,
|
||||
ArtistUid: v.ArtistUid,
|
||||
ArtworkUid: v.ArtworkUid,
|
||||
ContractId: v.ContractId,
|
||||
TransactionId: v.TransactionId,
|
||||
Type: v.Type,
|
||||
ViewUrl: v.ViewUrl,
|
||||
DownloadUrl: v.DownloadUrl,
|
||||
State: v.State,
|
||||
Status: int32(v.Status),
|
||||
LockTime: v.LockTime,
|
||||
SignTime: v.SignTime,
|
||||
}
|
||||
|
||||
contractData = append(contractData, Contract)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetContractInfo(contractUid string) (contractInfo model.Contract, err error) {
|
||||
if err = db.DB.Where("uid = ?", contractUid).First(&contractInfo).Error; err != nil {
|
||||
zap.L().Error("get contract info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateContract(tx *gorm.DB, req *contract.SignContractRequest) (err error) {
|
||||
//对账单这边只有TransactionId需要改变
|
||||
if req.ViewPdfUrl == "" {
|
||||
if err = tx.Model(&model.Contract{}).Where("uid = ?", req.ContractUid).Updates(model.Contract{TransactionId: req.TransactionId, State: 1}).Error; err != nil {
|
||||
zap.L().Error("update contract info err", zap.Error(err))
|
||||
err = errors.New(m.UPDATE_FAILED)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if err = tx.Model(&model.Contract{}).Where("uid = ?", req.ContractUid).Updates(model.Contract{ViewUrl: req.ViewPdfUrl, DownloadUrl: req.DownloadUrl, ContractId: req.ContractNo, TransactionId: req.TransactionId, State: 1}).Error; err != nil {
|
||||
zap.L().Error("update contract info err", zap.Error(err))
|
||||
err = errors.New(m.UPDATE_FAILED)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateContractTx(tx *gorm.DB, contractUid, transactionId string) (err error) {
|
||||
if err = tx.Model(&model.Contract{}).Where("artist_uid = ?", contractUid).Updates(model.Contract{TransactionId: transactionId, State: 1}).Error; err != nil {
|
||||
zap.L().Error("update contract info err", zap.Error(err))
|
||||
err = errors.New(m.UPDATE_FAILED)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func FinishContract(tx *gorm.DB, transactionId, contractUid string) (contracts *contract.Contracts, err error) {
|
||||
|
||||
var modelContract model.Contract
|
||||
if transactionId != "" {
|
||||
if err = tx.Where("transaction_id = ?", transactionId).First(&modelContract).Error; err != nil {
|
||||
zap.L().Error("get contract info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if err = tx.Where("uid = ?", contractUid).First(&modelContract).Error; err != nil {
|
||||
zap.L().Error("get contract info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
}
|
||||
now := time.Now()
|
||||
|
||||
if err = db.DB.Model(&modelContract).Updates(model.Contract{State: 2, SignTime: now.Format("2006-01-02")}).Error; err != nil {
|
||||
zap.L().Error("update user contract failed", zap.Error(err))
|
||||
err = errors.New(m.UPDATE_FAILED)
|
||||
return
|
||||
}
|
||||
|
||||
contracts = &contract.Contracts{
|
||||
ArtistUid: modelContract.ArtistUid,
|
||||
ArtworkUid: modelContract.ArtworkUid,
|
||||
ContractUid: modelContract.ContractId,
|
||||
TransactionId: modelContract.TransactionId,
|
||||
Type: modelContract.Type,
|
||||
ViewUrl: modelContract.ViewUrl,
|
||||
DownloadUrl: modelContract.DownloadUrl,
|
||||
State: modelContract.State,
|
||||
Status: modelContract.Status,
|
||||
LockTime: modelContract.LockTime,
|
||||
SignTime: modelContract.SignTime,
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func ContractTxList(uid string, state int32) (contracts []model.Contract, err error) {
|
||||
if err = db.DB.Where("artist_uid = ? AND (type = 4 or type = 7) ADN state = ?", uid, state).Find(&contracts).Error; err != nil {
|
||||
zap.L().Error("get contracts info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
// func UpdateArtworkState(tx *gorm.DB, id int32) (err error) { //无用
|
||||
// var artworkState model.ArtworkState
|
||||
// if err = tx.Where("artwork_id = ? and state = ? ", id, 7).First(&artworkState).Error; err != nil {
|
||||
// if err == gorm.ErrRecordNotFound {
|
||||
// artworkState.ArtworkId = id
|
||||
// artworkState.State = 7
|
||||
// if err = tx.Create(&artworkState).Error; err != nil {
|
||||
// zap.L().Error("create artworkState err", zap.Error(err))
|
||||
// err = errors.New(m.CREATE_ERROR)
|
||||
// return
|
||||
// }
|
||||
// } else {
|
||||
// zap.L().Error("find artworkState info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_DATA_NOT_EXISTS)
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// if err = tx.Model(&model.Artwork{}).Where("id = ? ", id).Update("flow_state", 7).Error; err != nil {
|
||||
// zap.L().Error("Artwork Update Err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_DATA_NOT_EXISTS)
|
||||
// return
|
||||
// }
|
||||
|
||||
// return
|
||||
// }
|
||||
|
||||
// func ContractList(req *contract.ContractListRequest) (rep *contract.ContractListRespond, err error) {
|
||||
// rep = &contract.ContractListRespond{}
|
||||
// var Data []*contract.ContractData
|
||||
|
||||
// var user model.User
|
||||
// if err = db.DB.Where("id = ? ", req.ID).First(&user).Error; err != nil {
|
||||
// zap.L().Error("get user info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return
|
||||
// }
|
||||
|
||||
// var realName model.RealName
|
||||
// if err = db.DB.Where("id = ? ", user.RealNameId).First(&realName).Error; err != nil {
|
||||
// zap.L().Error("get realName info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return
|
||||
// }
|
||||
|
||||
// var args []interface{}
|
||||
// var sqlWhere = "user_id = ? and type !=4 "
|
||||
// args = append(args, req.ID)
|
||||
|
||||
// if req.State != 0 {
|
||||
// sqlWhere += " and state = ? "
|
||||
// if req.State == 2 {
|
||||
// req.State = 3
|
||||
// }
|
||||
// args = append(args, req.State)
|
||||
// }
|
||||
|
||||
// var contractModel []model.Contract
|
||||
// if err = db.DB.Where(sqlWhere, args...).Find(&contractModel).Error; err != nil {
|
||||
// zap.L().Error("get contractModels info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return
|
||||
// }
|
||||
|
||||
// for _, v := range contractModel {
|
||||
// contract := &contract.ContractData{}
|
||||
// contract.ID = uint64(v.ID)
|
||||
// contract.ContractId = v.ContractId
|
||||
// contract.DownloadUrl = v.DownloadUrl
|
||||
// contract.MgmtUserId = v.MgmtUserId
|
||||
// contract.State = int64(v.State)
|
||||
// contract.TransactionId = v.TransactionId
|
||||
// contract.Type = int64(v.Type)
|
||||
// contract.UserId = int64(v.UserId)
|
||||
// contract.ViewUrl = v.ViewUrl
|
||||
// contract.ExpirationTime = v.CreatedAt.Add(86400 * time.Second).Format("2006-01-02 15:04:05")
|
||||
// contract.SignTime = v.UpdatedAt.Format("2006-01-02")
|
||||
// Data = append(Data, contract)
|
||||
// }
|
||||
|
||||
// rep.Data = Data
|
||||
|
||||
// return
|
||||
// }
|
||||
|
||||
// func ContractTxList(req *contract.ContractTxListRequest) (rep *contract.ContractTxListRespond, err error) {
|
||||
// rep = &contract.ContractTxListRespond{}
|
||||
// var Data []*contract.ContractData
|
||||
|
||||
// var user model.User
|
||||
// if err = db.DB.Where("id = ? ", int32(req.ID)).First(&user).Error; err != nil {
|
||||
// zap.L().Error("get user info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return
|
||||
// }
|
||||
// // todo
|
||||
// //var realName model.RealName
|
||||
// //if err = db.DB.Where("id = ? ", user.RealNameID).First(&realName).Error; err != nil {
|
||||
// // zap.L().Error("get realName info err", zap.Error(err))
|
||||
// // err = errors.New(m.ERROR_SELECT)
|
||||
// // return
|
||||
// //}
|
||||
// //
|
||||
// //var args []interface{}
|
||||
// //var sqlWhere = " card_id = ? and (type = 4 or type = 7) "
|
||||
// //args = append(args, realName.IDNum)
|
||||
// //if req.State != 0 {
|
||||
// // sqlWhere += " and state = ? "
|
||||
// // args = append(args, req.State)
|
||||
// //}
|
||||
// //
|
||||
// //var contractModel []model.Contract
|
||||
// //if err = db.DB.Where(sqlWhere, args...).Find(&contractModel).Error; err != nil {
|
||||
// // zap.L().Error("get contractModels info err", zap.Error(err))
|
||||
// // err = errors.New(m.ERROR_SELECT)
|
||||
// // return
|
||||
// //}
|
||||
// //
|
||||
// //for _, v := range contractModel {
|
||||
// // contractTmp := &contract.ContractData{}
|
||||
// // contractTmp.ID = uint64(v.ID)
|
||||
// // contractTmp.ContractId = v.ContractId
|
||||
// // contractTmp.DownloadUrl = v.DownloadUrl
|
||||
// // contractTmp.MgmtUserId = v.MgmtUserId
|
||||
// // contractTmp.State = int64(v.State)
|
||||
// // contractTmp.TransactionId = v.TransactionId
|
||||
// // contractTmp.Type = int64(v.Type)
|
||||
// // var b string
|
||||
// // if v.Type == 4 {
|
||||
// // b = "物权"
|
||||
// // }
|
||||
// // if v.Type == 7 {
|
||||
// // b = "版权"
|
||||
// // }
|
||||
// // contractTmp.BatchName = b + v.BatchName[0:4] + "年" + v.BatchName[4:6] + "月" + v.BatchName[6:11] + "年" + v.BatchName[11:13] + "月"
|
||||
// // contractTmp.UserId = int64(v.UserId)
|
||||
// // contractTmp.ViewUrl = v.ViewUrl
|
||||
// // contractTmp.ExpirationTime = v.CreatedAt.Add(86400 * time.Second).Format("2006-01-02 15:04:05")
|
||||
// // contractTmp.SignTime = v.UpdatedAt.Format("2006-01-02")
|
||||
// // Data = append(Data, contractTmp)
|
||||
// //}
|
||||
|
||||
// rep.Data = Data
|
||||
|
||||
// return
|
||||
// }
|
||||
|
||||
// func GetContract(id int32) (rep *contract.ContractData, err error) {
|
||||
// var con model.Contract
|
||||
// if err = db.DB.Where("id = ? ", id).First(&con).Error; err != nil {
|
||||
// zap.L().Error("get contract info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return
|
||||
// }
|
||||
// rep.ID = uint64(con.ID)
|
||||
// rep.UserId = int64(con.UserId)
|
||||
// rep.CardId = con.CardId
|
||||
// rep.MgmtUserId = con.MgmtUserId
|
||||
// rep.ArtworkId = con.ArtworkId
|
||||
// rep.ContractId = con.ContractId
|
||||
// rep.TransactionId = con.TransactionId
|
||||
// rep.Type = int64(con.Type)
|
||||
// rep.BatchName = con.BatchName
|
||||
// rep.ViewUrl = con.ViewUrl
|
||||
// rep.DownloadUrl = con.DownloadUrl
|
||||
// rep.State = int64(con.State)
|
||||
|
||||
// return
|
||||
// }
|
||||
|
||||
// // 更新交易id
|
||||
// func UpdateContract(req *contract.UpdateContractRequest) error {
|
||||
// //数据库操作异常
|
||||
// var con model.Contract
|
||||
// if err := db.DB.Model(&con).Updates(&model.Contract{ContractId: req.ContractId, ViewUrl: req.ViewUrl, DownloadUrl: req.DownloadUrl}).Error; err != nil {
|
||||
// //在线和下载的链接
|
||||
// return err
|
||||
// }
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// // 更新交易id
|
||||
// func UpdateContractTx(txId string, contractId int32) (err error) {
|
||||
// var con model.Contract
|
||||
// con.ID = contractId
|
||||
// if err = db.DB.Model(&con).Update("transaction_id", txId).Error; err != nil { //改变交易id
|
||||
// return
|
||||
// }
|
||||
// if err = db.DB.Model(&con).Update("state", 1).Error; err != nil { //更新合约状态 // 1:待生成 2 待签署 3 签署完成
|
||||
// return
|
||||
// }
|
||||
// return
|
||||
// }
|
@ -1,104 +0,0 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
statement "github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/m"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func StatementList(artistUid string, state int32) (contractData []*statement.Contracts, err error) {
|
||||
|
||||
var contracts []model.Contract
|
||||
if err = db.DB.Where("artist_uid = ? AND state = ?", artistUid, state).Where("type == 4 OR type == 7").Find(&contracts).Error; err != nil {
|
||||
zap.L().Error("get contracts info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range contracts {
|
||||
Contract := &statement.Contracts{
|
||||
ContractUid: v.Uid,
|
||||
ArtistUid: v.ArtistUid,
|
||||
ArtworkUid: v.ArtworkUid,
|
||||
ContractId: v.ContractId,
|
||||
TransactionId: v.TransactionId,
|
||||
Type: v.Type,
|
||||
ViewUrl: v.ViewUrl,
|
||||
DownloadUrl: v.DownloadUrl,
|
||||
State: v.State,
|
||||
Status: int32(v.Status),
|
||||
LockTime: v.LockTime,
|
||||
SignTime: v.SignTime,
|
||||
BatchTime: v.BatchTime,
|
||||
BatchUid: v.BatchUid,
|
||||
}
|
||||
|
||||
contractData = append(contractData, Contract)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetTxArtistNameByBatchUid(batchUid string) (artworkTx model.ArtworkTx, err error) {
|
||||
if err = db.DB.Where("uid = ?", batchUid).Find(&artworkTx).Error; err != nil {
|
||||
zap.L().Error("get artworkTx info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetArtworkTxDetailByBatchUid(batchUid string) (artworkTxDetail []model.ArtworkTxDetail, err error) {
|
||||
if err = db.DB.Where("batch_uid = ?", batchUid).Find(&artworkTxDetail).Error; err != nil {
|
||||
zap.L().Error("get artworkTxDetail infos err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetArtworkSoldTxDetailByBatchUid(batchUid string) (artworkSoldTxDetail []model.ArtworkSoldTxDetail, err error) {
|
||||
if err = db.DB.Where("batch_uid = ?", batchUid).Find(&artworkSoldTxDetail).Error; err != nil {
|
||||
zap.L().Error("get artworkSoldTxDetail infos err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetCopyArtistNameByBatchUid(batchUid string) (artworkCopy model.ArtworkCopy, err error) {
|
||||
if err = db.DB.Where("uid = ?", batchUid).Find(&artworkCopy).Error; err != nil {
|
||||
zap.L().Error("get artworkCopy info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetArtworkCopyDetailByBatchUid(batchUid string) (artworkCopyDetail []model.ArtworkCopyDetail, err error) {
|
||||
if err = db.DB.Where("batch_uid = ?", batchUid).Find(&artworkCopyDetail).Error; err != nil {
|
||||
zap.L().Error("get artworkCopyDetail infos err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetArtworkSoldCopyDetailByBatchUid(batchUid string) (artworkSoldCopyDetail []model.ArtworkSoldCopyDetail, err error) {
|
||||
if err = db.DB.Where("batch_uid = ?", batchUid).Find(&artworkSoldCopyDetail).Error; err != nil {
|
||||
zap.L().Error("get artworkSoldCopyDetail infos err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
@ -1,388 +0,0 @@
|
||||
package dao
|
||||
|
||||
//
|
||||
//func GetSupplyInfoList(id, num int32) (rep *supplyinfo.GetSupplyInfoListRespond, err error) {
|
||||
// rep = &supplyinfo.GetSupplyInfoListRespond{}
|
||||
// var datas []*supplyinfo.GetSupplyInfoData
|
||||
//
|
||||
// var supplyInfoList []model.SupplyInfo
|
||||
// if err := db.DB.Where("user_id = ? and types <= ?", id, num).Find(&supplyInfoList).Error; err != nil {
|
||||
// zap.L().Error("get supplyInfo infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// for i, v := range supplyInfoList {
|
||||
// supplyInfoList[i].CreateTime = v.CreatedAt.Format("2006-01-02")
|
||||
// data := &supplyinfo.GetSupplyInfoData{}
|
||||
// data.ID = uint64(supplyInfoList[i].ID)
|
||||
// data.ArtworkId = supplyInfoList[i].ArtworkId
|
||||
// data.ArtistId = supplyInfoList[i].ArtistId
|
||||
// data.UserId = uint64(supplyInfoList[i].UserId)
|
||||
// data.Name = supplyInfoList[i].Name
|
||||
// data.ModelYear = supplyInfoList[i].ModelYear
|
||||
// data.Photo = supplyInfoList[i].Photo
|
||||
// data.ArtistPhoto = supplyInfoList[i].ArtistPhoto
|
||||
// data.Width = uint64(supplyInfoList[i].Width)
|
||||
// data.Height = uint64(supplyInfoList[i].Height)
|
||||
// data.Ruler = uint64(supplyInfoList[i].Ruler)
|
||||
// data.ExhibitInfo = supplyInfoList[i].ExhibitInfo
|
||||
// data.ExhibitPic1 = supplyInfoList[i].ExhibitPic1
|
||||
// data.ExhibitPic2 = supplyInfoList[i].ExhibitPic2
|
||||
// data.CreateTime = supplyInfoList[i].CreateTime
|
||||
// data.Introduct = supplyInfoList[i].Introduct
|
||||
// data.NetworkTrace = supplyInfoList[i].NetworkTrace
|
||||
// data.CreateAddress = supplyInfoList[i].CreateAddress
|
||||
// data.Url = supplyInfoList[i].Url
|
||||
// data.Types = supplyInfoList[i].State
|
||||
// data.Remark = supplyInfoList[i].Remark
|
||||
// data.Remark2 = supplyInfoList[i].Remark2
|
||||
// data.Enable = supplyInfoList[i].Enable
|
||||
// datas = append(datas, data)
|
||||
// }
|
||||
// rep.Data = datas
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetSupplyInfo(req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error) {
|
||||
// rep = &supplyinfo.GetSupplyInfoData{}
|
||||
//
|
||||
// var supplyInfoTmp model.SupplyInfo
|
||||
// if err := db.DB.Where("id = ?", req.Id).Find(&supplyInfoTmp).Error; err != nil {
|
||||
// zap.L().Error("get supplyInfo infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
// rep.ID = uint64(supplyInfoTmp.ID)
|
||||
// rep.ArtworkId = supplyInfoTmp.ArtworkId
|
||||
// rep.ArtistId = supplyInfoTmp.ArtistId
|
||||
// rep.UserId = uint64(supplyInfoTmp.UserId)
|
||||
// rep.Name = supplyInfoTmp.Name
|
||||
// rep.ModelYear = supplyInfoTmp.ModelYear
|
||||
// rep.Photo = supplyInfoTmp.Photo
|
||||
// rep.ArtistPhoto = supplyInfoTmp.ArtistPhoto
|
||||
// rep.Width = uint64(supplyInfoTmp.Width)
|
||||
// rep.Height = uint64(supplyInfoTmp.Height)
|
||||
// rep.Ruler = uint64(supplyInfoTmp.Ruler)
|
||||
// rep.ExhibitInfo = supplyInfoTmp.ExhibitInfo
|
||||
// rep.ExhibitPic1 = supplyInfoTmp.ExhibitPic1
|
||||
// rep.ExhibitPic2 = supplyInfoTmp.ExhibitPic2
|
||||
// rep.CreateTime = supplyInfoTmp.CreateTime
|
||||
// rep.Introduct = supplyInfoTmp.Introduct
|
||||
// rep.NetworkTrace = supplyInfoTmp.NetworkTrace
|
||||
// rep.CreateAddress = supplyInfoTmp.CreateAddress
|
||||
// rep.Url = supplyInfoTmp.Url
|
||||
// rep.Types = supplyInfoTmp.State
|
||||
// rep.Remark = supplyInfoTmp.Remark
|
||||
// rep.Remark2 = supplyInfoTmp.Remark2
|
||||
// rep.Enable = supplyInfoTmp.Enable
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func UpdateSupplyInfo(req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error) {
|
||||
// var SupplyInfo model.SupplyInfo
|
||||
// if err := db.DB.Where("id = ? ", req.ID).Find(&SupplyInfo).Error; err != nil {
|
||||
// zap.L().Error("get supplyInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// SupplyInfo.CreateTime = req.CreateTime
|
||||
// SupplyInfo.ModelYear = req.ModelYear
|
||||
// SupplyInfo.NetworkTrace = req.NetworkTrace
|
||||
// SupplyInfo.Url = req.Url
|
||||
// SupplyInfo.Introduct = req.Introduct
|
||||
// SupplyInfo.State = req.Types
|
||||
// SupplyInfo.ExhibitInfo = req.ExhibitInfo
|
||||
// SupplyInfo.ExhibitPic1 = req.ExhibitPic1
|
||||
// SupplyInfo.ExhibitPic2 = req.ExhibitPic2
|
||||
//
|
||||
// if err = db.DB.Save(&SupplyInfo).Error; err != nil {
|
||||
// zap.L().Error("save supplyInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.SAVE_ERROR)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetVideoList(id int32) (rep *supplyinfo.GetVideoListRespond, err error) {
|
||||
// rep = &supplyinfo.GetVideoListRespond{}
|
||||
// var datas []*supplyinfo.GetVideoListData
|
||||
//
|
||||
// var ExhVideo []model.ExhVideo
|
||||
// if err := db.DB.Where("user_id = ? and types <=4", id).Find(&ExhVideo).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// for _, v := range ExhVideo {
|
||||
// var data supplyinfo.GetVideoListData
|
||||
// data.ID = uint64(v.ID)
|
||||
// data.UserId = uint64(v.UserId)
|
||||
// data.Url = v.Url
|
||||
// data.Types = v.State
|
||||
// data.Remark = v.Remark
|
||||
// data.Remark2 = v.Remark2
|
||||
// data.Enable = v.Enable
|
||||
//
|
||||
// datas = append(datas, &data)
|
||||
// }
|
||||
//
|
||||
// rep.Data = datas
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetVideo(req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error) {
|
||||
// rep = &supplyinfo.GetVideoListData{}
|
||||
//
|
||||
// var ExhVideo model.ExhVideo
|
||||
// if err := db.DB.Where("id = ?", req.ID).First(&ExhVideo).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// rep.ID = uint64(ExhVideo.ID)
|
||||
// rep.UserId = uint64(ExhVideo.UserId)
|
||||
// rep.Url = ExhVideo.Url
|
||||
// rep.Types = ExhVideo.State
|
||||
// rep.Remark = ExhVideo.Remark
|
||||
// rep.Remark2 = ExhVideo.Remark2
|
||||
// rep.Enable = ExhVideo.Enable
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func UpdateVideo(req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error) {
|
||||
// rep = &supplyinfo.UpdateVideoRespond{}
|
||||
//
|
||||
// var ExhVideo model.ExhVideo
|
||||
// if err := db.DB.Where("id = ? ", req.ID).First(&ExhVideo).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// ExhVideo.Url = req.Url
|
||||
// ExhVideo.State = req.Types
|
||||
//
|
||||
// if err := db.DB.Save(&ExhVideo).Error; err != nil {
|
||||
// zap.L().Error("save exhVideo info err", zap.Error(err))
|
||||
// err = errors.New(m.SAVE_ERROR)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetExam(req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error) {
|
||||
// rep = &supplyinfo.GetExamListData{}
|
||||
//
|
||||
// var ExhExam model.ExhExam
|
||||
// if err := db.DB.Where("id = ?", req.ID).First(&ExhExam).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// rep.ID = uint64(ExhExam.ID)
|
||||
// rep.UserId = uint64(ExhExam.UserId)
|
||||
// rep.Title = ExhExam.Title
|
||||
// rep.Class = ExhExam.Class
|
||||
// rep.TitleScore = uint64(ExhExam.TitleScore)
|
||||
// rep.Score = ExhExam.Score
|
||||
// rep.Types = ExhExam.State
|
||||
// rep.Remark = ExhExam.Remark
|
||||
// rep.Remark2 = ExhExam.Remark2
|
||||
// rep.Enable = ExhExam.Enable
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetExamList(req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error) {
|
||||
// rep = &supplyinfo.GetExamListRespond{}
|
||||
// var datas []*supplyinfo.GetExamListData
|
||||
//
|
||||
// var ExhExam []model.ExhExam
|
||||
// if err := db.DB.Where("user_id = ? and types <=4", req.ID).Find(&ExhExam).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// for _, v := range ExhExam {
|
||||
// var data supplyinfo.GetExamListData
|
||||
//
|
||||
// data.ID = uint64(v.ID)
|
||||
// data.UserId = uint64(v.UserId)
|
||||
// data.Title = v.Title
|
||||
// data.Class = v.Class
|
||||
// data.TitleScore = uint64(v.TitleScore)
|
||||
// data.Score = v.Score
|
||||
// data.Types = v.State
|
||||
// data.Remark = v.Remark
|
||||
// data.Remark2 = v.Remark2
|
||||
// data.Enable = v.Enable
|
||||
//
|
||||
// datas = append(datas, &data)
|
||||
// }
|
||||
//
|
||||
// rep.Data = datas
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func UpdateExam(req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error) {
|
||||
// rep = &supplyinfo.UpdateExamRespond{}
|
||||
//
|
||||
// var ExhExam model.ExhExam
|
||||
// if err := db.DB.Where("id = ? ", req.ID).First(&ExhExam).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// ExhExam.Score = req.Score
|
||||
// ExhExam.Class = req.Class
|
||||
// ExhExam.State = req.Types
|
||||
// ExhExam.Title = req.Title
|
||||
// ExhExam.Class = req.Class
|
||||
// ExhExam.TitleScore = uint(req.TitleScore)
|
||||
// ExhExam.Score = req.Score
|
||||
// ExhExam.State = req.Types
|
||||
// ExhExam.Remark = req.Remark
|
||||
// ExhExam.Remark2 = req.Remark2
|
||||
//
|
||||
// var score map[string]int32
|
||||
// var titleScore int32
|
||||
//
|
||||
// json.Unmarshal([]byte(req.Score), &score)
|
||||
//
|
||||
// for _, v := range score {
|
||||
// titleScore = titleScore + v
|
||||
// }
|
||||
//
|
||||
// ExhExam.TitleScore = uint(titleScore)
|
||||
//
|
||||
// if err = db.DB.Save(&ExhExam).Error; err != nil {
|
||||
// zap.L().Error("save supplyInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.SAVE_ERROR)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// if req.Types == "2" {
|
||||
// type titleScore struct {
|
||||
// UserId uint
|
||||
// Score int
|
||||
// }
|
||||
//
|
||||
// var tmp []model.ExhExam
|
||||
// if err = db.DB.Where("class = ?", req.Class).Order("title_score desc").Find(&tmp).Error; err != nil {
|
||||
// zap.L().Error("get exhExam infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// var ranking int
|
||||
// for k, v := range tmp {
|
||||
// if v.UserId == uint(req.UserId) {
|
||||
// ranking = k
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// percent := (ranking + 1) / len(tmp) * 100
|
||||
// rep.Percent = int32(percent)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetArtistInfoList(id int32) (rep *supplyinfo.GetArtistInfoListRespond, err error) {
|
||||
// rep = &supplyinfo.GetArtistInfoListRespond{}
|
||||
// var datas []*supplyinfo.GetArtistInfoListData
|
||||
//
|
||||
// var artistInfoTmp []old.ArtistInfo
|
||||
// if err = db.DB.Where("user_id = ? and state <=4 ", id).Find(&artistInfoTmp).Error; err != nil {
|
||||
// zap.L().Error("get artistInfo infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// for k, v := range artistInfoTmp {
|
||||
// artistInfoTmp[k].Model.ID = v.ID
|
||||
// data := &supplyinfo.GetArtistInfoListData{}
|
||||
//
|
||||
// data.ID = uint64(artistInfoTmp[k].ID)
|
||||
// data.UserId = uint64(artistInfoTmp[k].UserId)
|
||||
// data.ArtistId = artistInfoTmp[k].ArtistId
|
||||
// data.BankAccount = artistInfoTmp[k].BankAccount
|
||||
// data.BankName = artistInfoTmp[k].BankName
|
||||
// data.Introduct = artistInfoTmp[k].Introduct
|
||||
// data.CountryArtLevel = artistInfoTmp[k].CountryArtLevel
|
||||
// data.ArtistCertPic = artistInfoTmp[k].ArtistCertPic
|
||||
// data.Remark = artistInfoTmp[k].Remark
|
||||
// data.Remark2 = artistInfoTmp[k].Remark2
|
||||
// data.State = uint64(artistInfoTmp[k].State)
|
||||
//
|
||||
// datas = append(datas, data)
|
||||
// }
|
||||
//
|
||||
// rep.Data = datas
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetArtistInfo(req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error) {
|
||||
// rep = &supplyinfo.GetArtistInfoListData{}
|
||||
//
|
||||
// var artistInfoTmp old.ArtistInfo
|
||||
// if err := db.DB.Where("id = ?", req.ID).Find(&artistInfoTmp).Error; err != nil {
|
||||
// zap.L().Error("get artistInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
// rep.ID = uint64(artistInfoTmp.ID)
|
||||
// rep.UserId = uint64(artistInfoTmp.UserId)
|
||||
// rep.ArtistId = artistInfoTmp.ArtistId
|
||||
// rep.BankAccount = artistInfoTmp.BankAccount
|
||||
// rep.BankName = artistInfoTmp.BankName
|
||||
// rep.Introduct = artistInfoTmp.Introduct
|
||||
// rep.CountryArtLevel = artistInfoTmp.CountryArtLevel
|
||||
// rep.ArtistCertPic = artistInfoTmp.ArtistCertPic
|
||||
// rep.Remark = artistInfoTmp.Remark
|
||||
// rep.Remark2 = artistInfoTmp.Remark2
|
||||
// rep.State = uint64(artistInfoTmp.State)
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func UpdateArtistInfo(req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error) {
|
||||
// rep = &supplyinfo.UpdateArtistInfoRespond{}
|
||||
//
|
||||
// var artistInfoTmp old.ArtistInfo
|
||||
// if err := db.DB.Where("id = ? ", req.ID).Find(&artistInfoTmp).Error; err != nil {
|
||||
// zap.L().Error("get artistInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// artistInfoTmp.BankAccount = req.BankAccount
|
||||
// artistInfoTmp.BankName = req.BankName
|
||||
// artistInfoTmp.Introduct = req.Introduct
|
||||
// artistInfoTmp.State = uint(req.State)
|
||||
// artistInfoTmp.CountryArtLevel = req.CountryArtLevel
|
||||
// artistInfoTmp.ArtistCertPic = req.ArtistCertPic
|
||||
//
|
||||
// if err = db.DB.Save(&artistInfoTmp).Error; err != nil {
|
||||
// zap.L().Error("save supplyInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.SAVE_ERROR)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// return
|
||||
//}
|
151
cmd/internal/logic/artistInfo.go
Normal file
151
cmd/internal/logic/artistInfo.go
Normal file
@ -0,0 +1,151 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/fonchain-artistserver/cmd/internal/dao"
|
||||
"github.com/fonchain-artistserver/cmd/model"
|
||||
artistInfo "github.com/fonchain-artistserver/pb/artistinfo"
|
||||
"github.com/fonchain-artistserver/pkg/m"
|
||||
"github.com/fonchain-artistserver/pkg/util"
|
||||
fdd "github.com/fonchain/electronic-contract/server"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type IArtistInfo interface {
|
||||
GetUserInfo(req *artistInfo.GetUserInfoRequest) (rep *artistInfo.GetUserInfoRespond, err error)
|
||||
CreateUserInfo(req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.CreateUserInfoRespond, err error)
|
||||
UpdateUserInfo(req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.UpdateUserInfoRespond, err error)
|
||||
UserUpdateTel(req *artistInfo.UserUpdateTelRequest) (rep *artistInfo.UserUpdateTelRespond, err error)
|
||||
UserUpdateMsg(req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.UserUpdateMsgRespond, err error)
|
||||
Verifyfdd(req *artistInfo.VerifyfddRequest) (rep *artistInfo.VerifyfddRespond, err error)
|
||||
FinishVerify(req *artistInfo.FinishVerifyRequest) (rep *artistInfo.FinishVerifyRespond, err error)
|
||||
}
|
||||
|
||||
func NewArtistInfo() IArtistInfo {
|
||||
return &ArtistInfo{}
|
||||
}
|
||||
|
||||
type ArtistInfo struct{}
|
||||
|
||||
func (a *ArtistInfo) GetUserInfo(req *artistInfo.GetUserInfoRequest) (rep *artistInfo.GetUserInfoRespond, err error) {
|
||||
rep, err = dao.User(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfo) CreateUserInfo(req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.CreateUserInfoRespond, err error) {
|
||||
// rep = &artistInfo.CreateUserInfoRespond{}
|
||||
util.CreateArtistInfo(req.Id)
|
||||
|
||||
rep, err = dao.Create(req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
fddClient, err := fdd.NewFddClient()
|
||||
if err != nil {
|
||||
zap.L().Error("newFddClient err", zap.Error(err))
|
||||
return
|
||||
}
|
||||
|
||||
userInfos, err := dao.GetUserInfoSelf(req.Id)
|
||||
if err != nil {
|
||||
zap.L().Error("getUserInfoSelf err", zap.Error(err))
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
err = util.CreateQrCode(userInfos.InvitedCode, userInfos.RealName)
|
||||
if err != nil {
|
||||
zap.L().Error("createQrCode err", zap.Error(err))
|
||||
return
|
||||
}
|
||||
|
||||
_, b, err := fddClient.PersonVerify(userInfos.CustomerId, "1", req.UserUpdateInfoService.RealName, req.UserUpdateInfoService.IdCard, req.UserUpdateInfoService.TelNum, fmt.Sprintf("%v/contractreturn?id=%d&htmltype=%s&envtype=%s", m.ReturnUrl, req.Id, req.UserUpdateInfoService.HtmlType, req.UserUpdateInfoService.EnvType))
|
||||
|
||||
if err != nil {
|
||||
zap.L().Error("fddClient personVerify err", zap.Error(err))
|
||||
return
|
||||
}
|
||||
url, err := base64.StdEncoding.DecodeString(b)
|
||||
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
rep.Url = string(url)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfo) UpdateUserInfo(req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.UpdateUserInfoRespond, err error) {
|
||||
util.CreateArtistInfo(req.Id)
|
||||
req.UserUpdateInfoService.Photo = strings.Split(req.UserUpdateInfoService.Photo, "?v=")[0]
|
||||
//转移画家视频
|
||||
req.UserUpdateInfoService.CertificateImg = strings.Split(req.UserUpdateInfoService.CertificateImg, "?v=")[0]
|
||||
//转移画家视频
|
||||
req.UserUpdateInfoService.Video = strings.Split(req.UserUpdateInfoService.Video, "?v=")[0]
|
||||
//转移身份证正面
|
||||
req.UserUpdateInfoService.IdCardFront = strings.Split(req.UserUpdateInfoService.IdCardFront, "?v=")[0]
|
||||
req.UserUpdateInfoService.IdCardBack = strings.Split(req.UserUpdateInfoService.IdCardBack, "?v=")[0]
|
||||
rep, err = dao.Update(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfo) UserUpdateTel(req *artistInfo.UserUpdateTelRequest) (rep *artistInfo.UserUpdateTelRespond, err error) {
|
||||
rep, err = dao.UpdateTel(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfo) UserUpdateMsg(req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.UserUpdateMsgRespond, err error) {
|
||||
rep, err = dao.UpdateMsg(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfo) Verifyfdd(req *artistInfo.VerifyfddRequest) (rep *artistInfo.VerifyfddRespond, err error) {
|
||||
rep, err = dao.VerifyFdd(req)
|
||||
if err != nil {
|
||||
if !rep.Ready {
|
||||
fddClient, err := fdd.NewFddClient()
|
||||
if err != nil {
|
||||
zap.L().Error("newFddClient err", zap.Error(err))
|
||||
return rep, err
|
||||
}
|
||||
|
||||
userInfo, err := dao.GetUserInfoSelf(req.Id)
|
||||
if err != nil {
|
||||
zap.L().Error("getUserInfoSelf err", zap.Error(err))
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
err = util.CreateQrCode(userInfo.InvitedCode, userInfo.RealName)
|
||||
if err != nil {
|
||||
zap.L().Error("createQrCode err", zap.Error(err))
|
||||
return rep, err
|
||||
}
|
||||
|
||||
//注意!!!userUpdateInfoService没有值!!!!
|
||||
var userUpdateInfoService model.UserUpdateInfoService
|
||||
_, b, err := fddClient.PersonVerify(userInfo.CustomerId, "1", userUpdateInfoService.RealName, userUpdateInfoService.IdCard, userUpdateInfoService.TelNum, fmt.Sprintf("%v/contractreturn?id=%d&htmltype=%s&envtype=%s", m.ReturnUrl, req.Id, userUpdateInfoService.HtmlType, userUpdateInfoService.EnvType))
|
||||
if err != nil {
|
||||
zap.L().Error("fddClient personVerify err", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
url, err := base64.StdEncoding.DecodeString(b)
|
||||
if err != nil {
|
||||
zap.L().Error("base64 decodeString err", zap.Error(err))
|
||||
}
|
||||
rep.Url = string(url)
|
||||
} else {
|
||||
rep.Url = ""
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfo) FinishVerify(req *artistInfo.FinishVerifyRequest) (rep *artistInfo.FinishVerifyRespond, err error) {
|
||||
rep, err = dao.FinishVerify(req)
|
||||
return
|
||||
}
|
@ -1,208 +0,0 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artist"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoUser"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/service"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
)
|
||||
|
||||
type IArtistInfo interface {
|
||||
RegisterUser(req *artistInfoUser.RegisterUserRequest) (rep *artistInfoUser.RegisterUserRespond, err error)
|
||||
GetUserById(req *artistInfoUser.GetUserByIdRequest) (rep *artistInfoUser.GetUserByIdRespond, err error)
|
||||
GetUser(req *artistInfoUser.GetUserRequest) (rep *artistInfoUser.GetUserRespond, err error)
|
||||
// CreateUserInfo(req *artistInfoUser.CreateUserInfoRequest) (rep *artistInfoUser.CreateUserInfoRespond, err error)
|
||||
// UpdateRealName(req *artistInfoUser.UpdateRealNameRequest) (rep *artistInfoUser.UpdateRealNameRespond, err error)
|
||||
FinishVerify(req *artistInfoUser.FinishVerifyRequest) (rep *artistInfoUser.FinishVerifyRespond, err error)
|
||||
CheckUserLock(req *artistInfoUser.CheckUserLockRequest) (rep *artistInfoUser.CheckUserLockRespond, err error)
|
||||
ArtistSupplyList(req *artistInfoUser.ArtistSupplyListRequest) (rep *artistInfoUser.ArtistSupplyListRespond, err error)
|
||||
FindUser(req *artistInfoUser.FindUserRequest) (rep *artistInfoUser.UserInfo, err error)
|
||||
UpdateUserData(req *artistInfoUser.UserInfo) (rep *artistInfoUser.CommonNoParams, err error)
|
||||
}
|
||||
|
||||
func NewArtistInfo() IArtistInfo {
|
||||
return &ArtistInfoUser{}
|
||||
}
|
||||
|
||||
type ArtistInfoUser struct{}
|
||||
|
||||
func (a *ArtistInfoUser) GetUser(req *artistInfoUser.GetUserRequest) (rep *artistInfoUser.GetUserRespond, err error) {
|
||||
rep, err = dao.GetUser(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUser) RegisterUser(req *artistInfoUser.RegisterUserRequest) (rep *artistInfoUser.RegisterUserRespond, err error) {
|
||||
rep, err = dao.RegisterUser(req)
|
||||
return
|
||||
}
|
||||
func (a *ArtistInfoUser) CreateUserInfo(req *artistInfoUser.CreateUserInfoRequest) (rep *artistInfoUser.CreateUserInfoRespond, err error) {
|
||||
fmt.Println("第二处")
|
||||
rep, err = dao.CreateUserInfo(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUser) GetUserById(req *artistInfoUser.GetUserByIdRequest) (userInfo *artistInfoUser.GetUserByIdRespond, err error) {
|
||||
userInfo, err = dao.GetUserById(req)
|
||||
return
|
||||
}
|
||||
|
||||
//func (a *ArtistInfoUser) UpdateRealName(req *artistInfoUser.UpdateRealNameRequest) (rep *artistInfoUser.UpdateRealNameRespond, err error) {
|
||||
// rep, err = dao.UpdateRealName(req)
|
||||
// return
|
||||
//}
|
||||
|
||||
func (a *ArtistInfoUser) FinishVerify(req *artistInfoUser.FinishVerifyRequest) (rep *artistInfoUser.FinishVerifyRespond, err error) {
|
||||
rep, err = dao.FinishVerify(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUser) CheckUserLock(req *artistInfoUser.CheckUserLockRequest) (rep *artistInfoUser.CheckUserLockRespond, err error) {
|
||||
err = dao.CheckUserLock(int64(req.Id))
|
||||
return
|
||||
}
|
||||
func (a *ArtistInfoUser) ArtistSupplyList(req *artistInfoUser.ArtistSupplyListRequest) (rep *artistInfoUser.ArtistSupplyListRespond, err error) {
|
||||
rep, err = dao.ArtistSupplyList(req)
|
||||
return
|
||||
}
|
||||
func (a *ArtistInfoUser) UserLock(req *artistInfoUser.UserLockRequest) (rep *artistInfoUser.UserLockRespond, err error) {
|
||||
rep, err = dao.UserLock(req)
|
||||
return
|
||||
}
|
||||
func (a *ArtistInfoUser) CheckInvitedCode(req *artistInfoUser.CheckInvitedCodeRequest) (rep *artistInfoUser.GetUserRespond, err error) {
|
||||
rep, err = dao.CheckInvitedCode(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUser) UnFinishList(req *artistInfoUser.UnFinishListRequest) (rep *artistInfoUser.UnFinishListRespond, err error) {
|
||||
rep, err = dao.UnFinishList(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUser) GetUserMsg(req *artistInfoUser.GetUserMsgRequest) (rep *artistInfoUser.GetUserMsgRespond, err error) {
|
||||
rep, err = dao.GetUserMsg(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUser) FindUser(req *artistInfoUser.FindUserRequest) (rep *artistInfoUser.UserInfo, err error) {
|
||||
return dao.FindUser(req)
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUser) FindUserList(req *artistInfoUser.FindUsersRequest) (rep *artistInfoUser.FindUsersResponse, err error) {
|
||||
res, total, err := dao.FindUserList(req)
|
||||
rep = &artistInfoUser.FindUsersResponse{Data: res, Page: &artistInfoUser.UserCommonPageInfo{
|
||||
Page: req.Page,
|
||||
PageSize: req.PageSize,
|
||||
Total: total,
|
||||
}}
|
||||
return
|
||||
}
|
||||
func (a *ArtistInfoUser) FindUsersUserView(req *artistInfoUser.FindUsersRequest) (rep *artistInfoUser.FindUsersUserViewResponse, err error) {
|
||||
res, total, err := dao.GetViewUserList(req)
|
||||
var returnData []*artistInfoUser.UserView
|
||||
var artistUidList = []string{}
|
||||
|
||||
for _, v := range res {
|
||||
if v.ArtistUid != "" {
|
||||
artistUidList = append(artistUidList, v.ArtistUid)
|
||||
}
|
||||
returnData = append(returnData, &artistInfoUser.UserView{
|
||||
UserId: v.UserId,
|
||||
AccId: v.AccId,
|
||||
ArtistUid: v.ArtistUid,
|
||||
TelNum: v.TelNum,
|
||||
InviteCode: v.InviteCode,
|
||||
Account: v.Account,
|
||||
Photo: v.Photo,
|
||||
IsRealName: v.IsRealName,
|
||||
FddState: v.FddState,
|
||||
IsRead: v.IsRead,
|
||||
IsLock: v.IsLock,
|
||||
RealName: v.RealName,
|
||||
IdNum: v.IdNum,
|
||||
Sex: string(v.Sex),
|
||||
Age: v.Age,
|
||||
//Address: v.RealAddress,
|
||||
IdcardBack: v.IdcardBack,
|
||||
IdcardFront: v.IdcardFront,
|
||||
InviterInviteCode: v.InviterInviteCode,
|
||||
InviterRealName: v.InviterRealName,
|
||||
JoinAssoTime: v.JoinAssoTime,
|
||||
DeletedAt: v.DeletedAt,
|
||||
UpdatedAt: stime.TimeToString(v.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
CertificateNum: v.CertificateNum,
|
||||
CertificateImg: v.CertificateImg,
|
||||
LatestLockTime: v.LatestLockTime,
|
||||
WxAccount: v.WxAccount,
|
||||
BankName: v.BankName,
|
||||
BankNum: v.BankNum,
|
||||
ArtistProfile: v.ArtistProfile,
|
||||
//PenName: "",
|
||||
//StageName: "",
|
||||
})
|
||||
}
|
||||
if artistUidList != nil {
|
||||
var artistDatas *artist.ArtistListResponse
|
||||
artistDatas, err = service.GrpcArtistImpl.ArtistList(context.Background(), &artist.ArtistListRequest{
|
||||
Page: 1,
|
||||
PageSize: int32(len(artistUidList)),
|
||||
Uids: artistUidList,
|
||||
Gender: -1,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("错误:GrpcArtistImpl.GetInfoByUuids ", err.Error())
|
||||
return nil, err
|
||||
}
|
||||
for _, artistValue := range artistDatas.Data {
|
||||
for i, user := range returnData {
|
||||
if artistValue.Uid == user.ArtistUid {
|
||||
returnData[i].CertificateNum = artistValue.CaaCertNum
|
||||
returnData[i].BankNum = artistValue.BankNum
|
||||
returnData[i].BankName = artistValue.BankName
|
||||
returnData[i].PenName = artistValue.PenName
|
||||
returnData[i].StageName = artistValue.StageName
|
||||
returnData[i].Address = strings.Split(artistValue.Address, ",")
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
rep = &artistInfoUser.FindUsersUserViewResponse{Data: returnData, Page: &artistInfoUser.UserCommonPageInfo{
|
||||
Page: req.Page,
|
||||
PageSize: req.PageSize,
|
||||
Total: total,
|
||||
}}
|
||||
return
|
||||
}
|
||||
func (a *ArtistInfoUser) UpdateUserData(req *artistInfoUser.UserInfo) (rep *artistInfoUser.CommonNoParams, err error) {
|
||||
rep, err = dao.UpdateUserData(req)
|
||||
return
|
||||
}
|
||||
func (a *ArtistInfoUser) PreSaveArtistInfo(in *artistInfoUser.PreSaveArtistInfoData) (rep *artistInfoUser.CommonNoParams, err error) {
|
||||
rep, err = dao.PreSaveArtistInfo(in)
|
||||
return
|
||||
}
|
||||
func (a *ArtistInfoUser) GetPreSaveArtistInfo(in *artistInfoUser.GetPreSaveArtistInfoRequest) (res *artistInfoUser.PreSaveArtistInfoData, err error) {
|
||||
res, err = dao.GetPreSaveArtistInfo(in)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUser) GetInvitedUserList(in *artistInfoUser.GetInvitedUserListRequest) (res *artistInfoUser.GetInvitedUserListResponse, err error) {
|
||||
res, err = dao.GetInvitedUserList(in)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *ArtistInfoUser) GetInviterUserList(in *artistInfoUser.GetInviterUserListRequest) (res *artistInfoUser.GetInvitedUserListResponse, err error) {
|
||||
res, err = dao.GetInviterUserList(in)
|
||||
return
|
||||
}
|
||||
func (a *ArtistInfoUser) GetInviteStaticList(in *artistInfoUser.GetInviteStaticListRequest) (res *artistInfoUser.GetInviteStaticListResponse, err error) {
|
||||
res, err = dao.GetInviteStaticList(in)
|
||||
return
|
||||
}
|
@ -1,205 +0,0 @@
|
||||
// Package logic -----------------------------
|
||||
// @file : artistinfo_artshow.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/7 15:55
|
||||
// -------------------------------------------
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artwork_query"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/service"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ArtshowLogic struct{}
|
||||
|
||||
func (a ArtshowLogic) GetArtshowHistroyList(request *artistinfoArtshow.GetArtshowHistroyListRequest) (data *artistinfoArtshow.GetArtshowHistroyListResponse, err error) {
|
||||
data = &artistinfoArtshow.GetArtshowHistroyListResponse{}
|
||||
|
||||
//查询数据
|
||||
var (
|
||||
//画家补充信息
|
||||
artistSupplementList = []model.ArtshowArtistSupplement{}
|
||||
//画家指数
|
||||
artistIndexList = []model.ArtshowArtistIndex{}
|
||||
//画展视频资料
|
||||
artshowVideoList = []model.ArtshowVideoRecord{}
|
||||
//画作补充信息基本列表
|
||||
artworBaseList = []model.ArtworkLockRecord{}
|
||||
//画作补充信息列表
|
||||
artworkSupplementList = []*artwork_query.ArtworkPreviewResponse{}
|
||||
)
|
||||
var (
|
||||
//画家补充信息
|
||||
db_artistSupplement = db.DB.Model(&model.ArtshowArtistSupplement{}).Where("status = 3 AND artist_uid = ?", request.ArtistUid).Order("lock_time desc")
|
||||
//画家指数
|
||||
db_artistIndex = db.DB.Model(&model.ArtshowArtistIndex{}).Where("status = 3 AND artist_uid = ?", request.ArtistUid).Order("lock_time desc")
|
||||
//画展视频资料
|
||||
db_artshowVideo = db.DB.Model(&model.ArtshowVideoRecord{}).Where("status = 3 AND artist_uid = ?", request.ArtistUid).Order("lock_time desc")
|
||||
//画作补充信息基本列表
|
||||
db_artworBase = db.DB.Model(&model.ArtworkLockRecord{}).Where("status = 3 AND artist_uid = ?", request.ArtistUid).Order("lock_time desc")
|
||||
)
|
||||
if request.AuditStatus != 0 {
|
||||
db_artistSupplement = db_artistSupplement.Where("audit_status = ?", request.AuditStatus)
|
||||
db_artistIndex = db_artistIndex.Where("audit_status = ?", request.AuditStatus)
|
||||
db_artshowVideo = db_artshowVideo.Where("audit_status = ?", request.AuditStatus)
|
||||
db_artworBase = db_artworBase.Where("supplement_audit_status = ?", request.AuditStatus)
|
||||
}
|
||||
|
||||
err = db_artistSupplement.Find(&artistSupplementList).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = db_artistIndex.Find(&artistIndexList).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = db_artshowVideo.Find(&artshowVideoList).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = db_artworBase.Find(&artworBaseList).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// 查询画作补充信息
|
||||
artworkUidList := []string{}
|
||||
for _, v := range artworBaseList {
|
||||
artworkUidList = append(artworkUidList, v.ArtworkUid)
|
||||
}
|
||||
artworkSupplementRes, err := service.ArtworkQueryImpl.ArtworkPreviewList(context.Background(), &artwork_query.ArtworkPreviewListRequest{
|
||||
Page: 1,
|
||||
PageSize: -1,
|
||||
ArtworkUids: artworkUidList,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
artworkSupplementList = artworkSupplementRes.Data
|
||||
|
||||
// 使用画家补充信息的锁定时间进行分组,然后补充剩余数据
|
||||
var dataGroups = []*artistinfoArtshow.TimeGroup{}
|
||||
var thisTime = ""
|
||||
var thisIndex = -1
|
||||
for count, v := range artistSupplementList {
|
||||
if thisTime == "" || v.LockTime != thisTime {
|
||||
thisTime = v.LockTime
|
||||
thisIndex++
|
||||
}
|
||||
var isAdd = true
|
||||
if request.PageSize > -1 {
|
||||
if int64(count) >= request.PageSize*(request.Page-1) && int64(count) < request.PageSize*request.Page {
|
||||
isAdd = true
|
||||
} else {
|
||||
isAdd = false
|
||||
}
|
||||
}
|
||||
if isAdd {
|
||||
dataGroups = append(dataGroups, &artistinfoArtshow.TimeGroup{
|
||||
Time: thisTime,
|
||||
ArtworkSupplementList: []*artistinfoArtshow.ArtworkSupplementData{},
|
||||
ArtistSupplementList: []*artistinfoArtshow.ArtistSupplementData{},
|
||||
ArtistIndexList: []*artistinfoArtshow.ArtistIndexData{},
|
||||
ArtistVideoList: []*artistinfoArtshow.ArtistVideoData{},
|
||||
})
|
||||
|
||||
dataGroups[thisIndex].ArtistSupplementList = append(dataGroups[thisIndex].ArtistSupplementList, &artistinfoArtshow.ArtistSupplementData{
|
||||
ArtistUid: v.ArtistUid,
|
||||
Status: v.Status,
|
||||
LockTime: v.LockTime,
|
||||
AuditStatus: int64(v.AuditStatus),
|
||||
AuditMark1: v.AuditMark1,
|
||||
AuditMark2: v.AuditMark2,
|
||||
ArtistName: v.ArtistName,
|
||||
ArtistProfile: v.ArtistProfile,
|
||||
CountryArtLevel: v.CountryArtLevel,
|
||||
ArtistCertPic: v.ArtistCertPic,
|
||||
BankNum: v.BankNum,
|
||||
BankName: v.BankName,
|
||||
Id: v.ID,
|
||||
CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: stime.TimeToString(time.Unix(v.CreatedAt.Unix(), 0), stime.Format_Normal_YMDhms),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
for i, group := range dataGroups {
|
||||
//补充画家指数
|
||||
for _, v := range artistIndexList {
|
||||
if v.LockTime == group.Time {
|
||||
dataGroups[i].ArtistIndexList = append(dataGroups[i].ArtistIndexList, &artistinfoArtshow.ArtistIndexData{
|
||||
ArtistUid: v.ArtistUid,
|
||||
Title: v.Title,
|
||||
Class: v.Class,
|
||||
TitleScore: v.TitleScore,
|
||||
Score: v.Score,
|
||||
Types: v.Types,
|
||||
Status: v.Status,
|
||||
LockTime: v.LockTime,
|
||||
AuditMark1: v.AuditMark1,
|
||||
AuditMark2: v.AuditMark2,
|
||||
AuditStatus: int64(v.AuditStatus),
|
||||
Id: v.ID,
|
||||
CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: fmt.Sprintf("%d", v.DeletedAt),
|
||||
})
|
||||
}
|
||||
}
|
||||
//补充视频信息
|
||||
for _, v := range artshowVideoList {
|
||||
if v.LockTime == group.Time {
|
||||
dataGroups[i].ArtistVideoList = append(dataGroups[i].ArtistVideoList, &artistinfoArtshow.ArtistVideoData{
|
||||
Id: v.ID,
|
||||
ArtistUid: v.ArtistUid,
|
||||
LockTime: v.LockTime,
|
||||
VideoUrl: v.VideoUrl,
|
||||
AuditStatus: int64(v.AuditStatus),
|
||||
AuditMark1: v.AuditMark1,
|
||||
AuditMark2: v.AuditMark2,
|
||||
ArtistName: v.ArtistName,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
for _, v := range artworBaseList {
|
||||
if v.LockTime == group.Time {
|
||||
for _, artowrkSupplement := range artworkSupplementList {
|
||||
if v.ArtworkUid == artowrkSupplement.ArtworkUid {
|
||||
dataGroups[i].ArtworkSupplementList = append(dataGroups[i].ArtworkSupplementList, &artistinfoArtshow.ArtworkSupplementData{
|
||||
ArtistUid: v.ArtistUid,
|
||||
Status: v.Status,
|
||||
LockTime: v.LockTime,
|
||||
AuditStatus: int64(v.SupplementAuditStatus),
|
||||
AuditMark1: v.SupplementAuditMark,
|
||||
AuditMark2: v.SupplementAuditMark2,
|
||||
ArtworkName: artowrkSupplement.ArtworkName,
|
||||
CreatedDate: artowrkSupplement.CreateDate,
|
||||
CreatedAddress: artowrkSupplement.CreatedAddress,
|
||||
CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(v.DeletedAt),
|
||||
ArtworkUuid: artowrkSupplement.ArtworkUid,
|
||||
Length: artowrkSupplement.Length,
|
||||
Width: artowrkSupplement.Width,
|
||||
Ruler: artowrkSupplement.Ruler,
|
||||
HdPic: artowrkSupplement.HdPic,
|
||||
ArtistPhoto: artowrkSupplement.ArtistPhoto,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
data.Data = dataGroups
|
||||
fmt.Printf("%+v\n", dataGroups)
|
||||
return
|
||||
}
|
@ -1,144 +0,0 @@
|
||||
// Package logic -----------------------------
|
||||
// @file : artistinfo_artshowVideo.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/2 11:51
|
||||
// -------------------------------------------
|
||||
package logic
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoUser"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type ArtshowArtistIndexLogic struct{}
|
||||
|
||||
func (a ArtshowArtistIndexLogic) BatchCreateArtistIndex(request *artistinfoArtshow.BatchCreateArtistIndexRequest) error {
|
||||
var datas = []model.ArtshowArtistIndex{}
|
||||
for _, v := range request.ArtistUids {
|
||||
userInfo, err := NewArtistInfo().FindUser(&artistInfoUser.FindUserRequest{
|
||||
MgmtArtistUid: v,
|
||||
IsArtist: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if userInfo.Id == 0 {
|
||||
return errors.New(fmt.Sprintf("用户%s不存在", v))
|
||||
}
|
||||
datas = append(datas,
|
||||
//Status=2(锁定) AuditStatus=5(待补充)
|
||||
model.ArtshowArtistIndex{LockTime: userInfo.LatestLockTime, ArtistUid: v, Class: "exhibition", Title: "艺术家-展览", Types: "2", Status: 2, AuditStatus: 5},
|
||||
model.ArtshowArtistIndex{LockTime: userInfo.LatestLockTime, ArtistUid: v, Class: "seniority", Title: "艺术家-资历", Types: "1", Status: 2, AuditStatus: 5},
|
||||
model.ArtshowArtistIndex{LockTime: userInfo.LatestLockTime, ArtistUid: v, Class: "specialized", Title: "艺术家-专业", Types: "1", Status: 2, AuditStatus: 5},
|
||||
model.ArtshowArtistIndex{LockTime: userInfo.LatestLockTime, ArtistUid: v, Class: "Influence", Title: "艺术家-影响力", Types: "1", Status: 2, AuditStatus: 5},
|
||||
model.ArtshowArtistIndex{LockTime: userInfo.LatestLockTime, ArtistUid: v, Class: "collect", Title: "艺术家-收藏", Types: "1", Status: 2, AuditStatus: 5},
|
||||
)
|
||||
}
|
||||
return dao.ArtistinfoArtshowArtistIndex.BatchCreateData(datas)
|
||||
}
|
||||
|
||||
func (a ArtshowArtistIndexLogic) CreateArtistIndex(request *artistinfoArtshow.ArtistIndexInfo) error {
|
||||
return dao.ArtistinfoArtshowArtistIndex.CreateData(&model.ArtshowArtistIndex{
|
||||
LockTime: request.LockTime,
|
||||
ArtistUid: request.ArtistUid,
|
||||
Class: request.Class,
|
||||
Title: request.Title,
|
||||
Types: request.Types,
|
||||
Status: 2,
|
||||
})
|
||||
}
|
||||
func (a ArtshowArtistIndexLogic) GetArtistIndexDetail(request *artistinfoArtshow.GetArtistIndexDetailRequest) (rep *artistinfoArtshow.ArtistIndexInfo, err error) {
|
||||
data, err := dao.ArtistinfoArtshowArtistIndex.GetData(request.Id)
|
||||
if err != nil {
|
||||
if gorm.ErrRecordNotFound == err {
|
||||
err = errors.New("找不到数据")
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
rep = &artistinfoArtshow.ArtistIndexInfo{
|
||||
ArtistUid: data.ArtistUid,
|
||||
Title: data.Title,
|
||||
Class: data.Class,
|
||||
TitleScore: data.TitleScore,
|
||||
Score: data.Score,
|
||||
Types: data.Types,
|
||||
Status: data.Status,
|
||||
LockTime: data.LockTime,
|
||||
AuditMark1: data.AuditMark1,
|
||||
AuditMark2: data.AuditMark2,
|
||||
AuditStatus: int64(data.AuditStatus),
|
||||
Id: data.ID,
|
||||
CreatedAt: stime.TimeToString(data.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(data.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(data.DeletedAt),
|
||||
Editable: data.Editable(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (a ArtshowArtistIndexLogic) GetArtistIndexList(request *artistinfoArtshow.GetArtistIndexListRequest) (res *artistinfoArtshow.GetArtistIndexListResponse, err error) {
|
||||
res = &artistinfoArtshow.GetArtistIndexListResponse{}
|
||||
datas, total, err := dao.ArtistinfoArtshowArtistIndex.GetDataList(request)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res.Page = &artistinfoArtshow.VideoPagination{
|
||||
Page: request.Page,
|
||||
PageSize: request.PageSize,
|
||||
Total: total,
|
||||
}
|
||||
for _, v := range datas {
|
||||
res.Data = append(res.Data, &artistinfoArtshow.ArtistIndexInfo{
|
||||
ArtistUid: v.ArtistUid,
|
||||
Title: v.Title,
|
||||
Class: v.Class,
|
||||
TitleScore: v.TitleScore,
|
||||
Score: v.Score,
|
||||
Types: v.Types,
|
||||
Status: v.Status,
|
||||
LockTime: v.LockTime,
|
||||
AuditMark1: v.AuditMark1,
|
||||
AuditMark2: v.AuditMark2,
|
||||
AuditStatus: int64(v.AuditStatus),
|
||||
Id: v.ID,
|
||||
CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(v.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(v.DeletedAt),
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (a ArtshowArtistIndexLogic) AuditArtistIndex(request *artistinfoArtshow.AuditArtistIndexRequest) (*emptypb.Empty, error) {
|
||||
err := dao.ArtistinfoArtshowArtistIndex.Audit(model.AuditStatus(request.AuditStatus), request.AuditMark1, request.AuditMark2, request.ArtistIndexIds...)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (a ArtshowArtistIndexLogic) UpdateArtistIndex(request *artistinfoArtshow.UpdateArtistIndexRequest) (*emptypb.Empty, error) {
|
||||
err := dao.ArtistinfoArtshowArtistIndex.UpdateData(&model.ArtshowArtistIndex{
|
||||
Model: model.Model{ID: request.Id},
|
||||
TitleScore: request.TitleScore,
|
||||
Score: request.Score,
|
||||
AuditStatus: model.AuditType_Pending,
|
||||
})
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (a ArtshowArtistIndexLogic) DeletedArtistIndex(request *artistinfoArtshow.DeletedArtistIndexRequest) (*emptypb.Empty, error) {
|
||||
var ids = []int64{}
|
||||
if request.Id != 0 {
|
||||
ids = append(ids, request.Id)
|
||||
} else if len(request.Ids) > 0 {
|
||||
ids = append(ids, request.Ids...)
|
||||
}
|
||||
err := dao.ArtistinfoArtshowArtistIndex.DeletedData(ids...)
|
||||
return nil, err
|
||||
}
|
@ -1,149 +0,0 @@
|
||||
// Package logic -----------------------------
|
||||
// @file : artistinfo_artshowVideo.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/2 11:51
|
||||
// -------------------------------------------
|
||||
package logic
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoUser"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type ArtshowArtistSupplementLogic struct{}
|
||||
|
||||
func (a ArtshowArtistSupplementLogic) BatchCreateSupplement(request *artistinfoArtshow.BatchCreateArtistSupplementRequest) error {
|
||||
var datas = []model.ArtshowArtistSupplement{}
|
||||
for _, v := range request.ArtistUids {
|
||||
userInfo, err := NewArtistInfo().FindUser(&artistInfoUser.FindUserRequest{
|
||||
MgmtArtistUid: v,
|
||||
IsArtist: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if userInfo.Id == 0 {
|
||||
return errors.New(fmt.Sprintf("用户%s不存在", v))
|
||||
}
|
||||
datas = append(datas,
|
||||
model.ArtshowArtistSupplement{LockTime: userInfo.LatestLockTime, ArtistUid: v, ArtistName: userInfo.RealName.Name, Status: 2, AuditStatus: 5},
|
||||
)
|
||||
}
|
||||
return dao.ArtistSupplement.BatchCreateData(datas)
|
||||
}
|
||||
|
||||
func (a ArtshowArtistSupplementLogic) CreateSupplement(request *artistinfoArtshow.ArtistSupplementInfo) error {
|
||||
return dao.ArtistSupplement.CreateData(&model.ArtshowArtistSupplement{
|
||||
ArtistUid: request.ArtistUid,
|
||||
Status: 2, //锁定
|
||||
AuditStatus: 5, //待补充
|
||||
LockTime: request.LockTime,
|
||||
ArtistName: request.ArtistName,
|
||||
ArtistProfile: request.ArtistProfile,
|
||||
CountryArtLevel: request.CountryArtLevel,
|
||||
ArtistCertPic: request.ArtistCertPic,
|
||||
BankNum: request.BankNum,
|
||||
BankName: request.BankName,
|
||||
})
|
||||
}
|
||||
func (a ArtshowArtistSupplementLogic) GetSupplementDetail(request *artistinfoArtshow.GetArtistSupplementDetailRequest) (rep *artistinfoArtshow.ArtistSupplementInfo, err error) {
|
||||
data, err := dao.ArtistSupplement.GetData(request.Id)
|
||||
if err != nil {
|
||||
if gorm.ErrRecordNotFound == err {
|
||||
err = errors.New("找不到数据")
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
rep = &artistinfoArtshow.ArtistSupplementInfo{
|
||||
ArtistUid: data.ArtistUid,
|
||||
Status: data.Status,
|
||||
LockTime: data.LockTime,
|
||||
AuditStatus: int64(data.AuditStatus),
|
||||
AuditMark1: data.AuditMark1,
|
||||
AuditMark2: data.AuditMark2,
|
||||
ArtistName: data.ArtistName,
|
||||
ArtistProfile: data.ArtistProfile,
|
||||
CountryArtLevel: data.CountryArtLevel,
|
||||
ArtistCertPic: data.ArtistCertPic,
|
||||
BankNum: data.BankNum,
|
||||
BankName: data.BankName,
|
||||
Id: data.ID,
|
||||
CreatedAt: stime.TimeToString(data.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(data.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(data.DeletedAt),
|
||||
Editable: data.Editable(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (a ArtshowArtistSupplementLogic) GetSupplementList(request *artistinfoArtshow.GetArtistSupplementListRequest) (res *artistinfoArtshow.GetArtistSupplementListResponse, err error) {
|
||||
res = &artistinfoArtshow.GetArtistSupplementListResponse{}
|
||||
datas, total, err := dao.ArtistSupplement.GetDataList(request)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res.Page = &artistinfoArtshow.VideoPagination{
|
||||
Page: request.Page,
|
||||
PageSize: request.PageSize,
|
||||
Total: total,
|
||||
}
|
||||
for _, v := range datas {
|
||||
res.Data = append(res.Data, &artistinfoArtshow.ArtistSupplementInfo{
|
||||
ArtistUid: v.ArtistUid,
|
||||
ArtistName: v.ArtistName,
|
||||
ArtistProfile: v.ArtistProfile,
|
||||
CountryArtLevel: v.CountryArtLevel,
|
||||
ArtistCertPic: v.ArtistCertPic,
|
||||
BankNum: v.BankNum,
|
||||
BankName: v.BankName,
|
||||
Status: v.Status,
|
||||
LockTime: v.LockTime,
|
||||
AuditMark1: v.AuditMark1,
|
||||
AuditMark2: v.AuditMark2,
|
||||
AuditStatus: int64(v.AuditStatus),
|
||||
Id: v.ID,
|
||||
CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(v.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(v.DeletedAt),
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (a ArtshowArtistSupplementLogic) AuditSupplement(request *artistinfoArtshow.AuditArtistSupplementRequest) (*emptypb.Empty, error) {
|
||||
err := dao.ArtistSupplement.Audit(model.AuditStatus(request.AuditStatus), request.AuditMark1, request.AuditMark2, request.ArtistSupplementIds...)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (a ArtshowArtistSupplementLogic) UpdateSupplement(request *artistinfoArtshow.UpdateArtistSupplementRequest) (*emptypb.Empty, error) {
|
||||
err := dao.ArtistSupplement.UpdateData(&model.ArtshowArtistSupplement{
|
||||
Model: model.Model{ID: request.Id},
|
||||
ArtistProfile: request.ArtistProfile,
|
||||
CountryArtLevel: request.CountryArtLevel,
|
||||
ArtistCertPic: request.ArtistCertPic,
|
||||
BankNum: request.BankNum,
|
||||
BankName: request.BankName,
|
||||
AuditStatus: model.AuditType_Pending,
|
||||
})
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (a ArtshowArtistSupplementLogic) DeletedSupplement(request *artistinfoArtshow.DeletedArtistSupplementRequest) (*emptypb.Empty, error) {
|
||||
var ids = []int64{}
|
||||
if request.Id != 0 {
|
||||
ids = append(ids, request.Id)
|
||||
} else if len(request.Ids) > 0 {
|
||||
ids = append(ids, request.Ids...)
|
||||
}
|
||||
err := dao.ArtistSupplement.DeletedData(ids...)
|
||||
return nil, err
|
||||
}
|
@ -1,134 +0,0 @@
|
||||
// Package logic -----------------------------
|
||||
// @file : artistinfo_artshowVideo.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/2 11:51
|
||||
// -------------------------------------------
|
||||
package logic
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type ArtshowVideoLogic struct{}
|
||||
|
||||
func (a ArtshowVideoLogic) BatchCreateArtshowVideo(request *artistinfoArtshow.BatchCreateArtshowVideoRequest) error {
|
||||
var datas = []model.ArtshowVideoRecord{}
|
||||
for _, v := range request.Data {
|
||||
datas = append(datas, model.ArtshowVideoRecord{
|
||||
ArtistUid: v.ArtistUid,
|
||||
LockTime: v.LockTime,
|
||||
ArtistName: v.ArtistName,
|
||||
VideoUrl: v.VideoUrl,
|
||||
AuditStatus: model.AuditStatus(v.AuditStatus),
|
||||
AuditMark1: v.AuditMark1,
|
||||
AuditMark2: v.AuditMark2,
|
||||
Status: v.Status,
|
||||
})
|
||||
}
|
||||
return dao.ArtistinfoArtshowVideo.BatchCreateData(datas)
|
||||
}
|
||||
func (a ArtshowVideoLogic) CreateArtshowVideo(request *artistinfoArtshow.ArtshowVideoInfo) error {
|
||||
return dao.ArtistinfoArtshowVideo.CreateData(&model.ArtshowVideoRecord{
|
||||
ArtistUid: request.ArtistUid,
|
||||
LockTime: request.LockTime,
|
||||
ArtistName: request.ArtistName,
|
||||
VideoUrl: request.VideoUrl,
|
||||
AuditStatus: model.AuditStatus(request.AuditStatus),
|
||||
AuditMark1: request.AuditMark1,
|
||||
AuditMark2: request.AuditMark2,
|
||||
Status: request.Status,
|
||||
})
|
||||
}
|
||||
func (a ArtshowVideoLogic) GetArtshowVideoDetail(request *artistinfoArtshow.GetArtshowVideoDetailRequest) (rep *artistinfoArtshow.ArtshowVideoInfo, err error) {
|
||||
data, err := dao.ArtistinfoArtshowVideo.GetArtshowVideoDetail(request)
|
||||
if err != nil {
|
||||
if gorm.ErrRecordNotFound == err {
|
||||
err = errors.New("找不到数据")
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
rep = &artistinfoArtshow.ArtshowVideoInfo{
|
||||
Id: data.ID,
|
||||
ArtistUid: data.ArtistUid,
|
||||
LockTime: data.LockTime,
|
||||
VideoUrl: data.VideoUrl,
|
||||
AuditStatus: int64(data.AuditStatus),
|
||||
AuditMark1: data.AuditMark1,
|
||||
AuditMark2: data.AuditMark2,
|
||||
CreatedAt: stime.TimeToString(data.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(data.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(data.DeletedAt),
|
||||
ArtistName: data.ArtistName,
|
||||
Status: data.Status,
|
||||
Editable: data.Editable(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (a ArtshowVideoLogic) GetArtshowVideoList(request *artistinfoArtshow.GetArtshowVideoListRequst) (res *artistinfoArtshow.GetArtshowVideoListResponse, err error) {
|
||||
res = &artistinfoArtshow.GetArtshowVideoListResponse{}
|
||||
datas, total, err := dao.ArtistinfoArtshowVideo.GetDataList(request)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res.Page = &artistinfoArtshow.VideoPagination{
|
||||
Page: request.Page,
|
||||
PageSize: request.PageSize,
|
||||
Total: total,
|
||||
}
|
||||
for _, v := range datas {
|
||||
res.Data = append(res.Data, &artistinfoArtshow.ArtshowVideoInfo{
|
||||
Id: v.ID,
|
||||
ArtistUid: v.ArtistUid,
|
||||
LockTime: v.LockTime,
|
||||
VideoUrl: v.VideoUrl,
|
||||
AuditStatus: int64(v.AuditStatus),
|
||||
AuditMark1: v.AuditMark1,
|
||||
AuditMark2: v.AuditMark2,
|
||||
CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
UpdatedAt: stime.TimeToString(v.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
DeletedAt: int64(v.DeletedAt),
|
||||
Status: v.Status,
|
||||
ArtistName: v.ArtistName,
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (a ArtshowVideoLogic) AuditArtshowVideo(request *artistinfoArtshow.AuditArtshowVideoRequest) (*emptypb.Empty, error) {
|
||||
err := dao.ArtistinfoArtshowVideo.Audit(model.AuditStatus(request.AuditStatus), request.AuditMark1, request.AuditMark2, request.ArtshowVideoIds...)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (a ArtshowVideoLogic) UpdateArtshowVideo(request *artistinfoArtshow.UpdateArtshowVideoRequest) (*emptypb.Empty, error) {
|
||||
err := dao.ArtistinfoArtshowVideo.UpdateData(&model.ArtshowVideoRecord{
|
||||
Model: model.Model{ID: request.Id},
|
||||
ArtistUid: request.ArtistUid,
|
||||
LockTime: request.LockTime,
|
||||
ArtistName: request.ArtistName,
|
||||
VideoUrl: request.VideoUrl,
|
||||
AuditStatus: model.AuditStatus(request.AuditStatus),
|
||||
AuditMark1: request.AuditMark1,
|
||||
AuditMark2: request.AuditMark2,
|
||||
})
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (a ArtshowVideoLogic) DeletedArtshowVideo(request *artistinfoArtshow.DeletedArtshowVideoRequest) (*emptypb.Empty, error) {
|
||||
var ids = []int64{}
|
||||
if request.Id != 0 {
|
||||
ids = append(ids, request.Id)
|
||||
} else if len(request.Ids) > 0 {
|
||||
ids = append(ids, request.Ids...)
|
||||
}
|
||||
err := dao.ArtistinfoArtshowVideo.DeletedData(ids...)
|
||||
return nil, err
|
||||
}
|
@ -1,338 +0,0 @@
|
||||
// Package logic -----------------------------
|
||||
// @file : artistinfo_artwork.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/2/24 22:26
|
||||
// -------------------------------------------
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artist"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoArtwork"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoUser"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artwork_query"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/m"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/service"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
type IArtistInfoArtwork interface {
|
||||
GetArtworkLockDetail(request *artistInfoArtwork.GetArtworkLockDetailRequest) (res *artistInfoArtwork.ArtistLockInfo, err error)
|
||||
CreateArtworkLockRecord(req *artistInfoArtwork.CreateArtworkLockRecordReq) (res *artistInfoArtwork.ArtworkCommonNoParams, err error)
|
||||
ArtworkLockAction(req *artistInfoArtwork.ArtworkLockActionRequest) (res *artistInfoArtwork.ArtworkCommonNoParams, err error)
|
||||
GetArtworkLockRecords(req *artistInfoArtwork.GetArtworkLockRecordsRequest) (res *artistInfoArtwork.ArtworkLockList, err error)
|
||||
GetArtworkLockHistoryGroup(request *artistInfoArtwork.GetArtworkLockHistoryRequest) (res *artistInfoArtwork.GetArtworkLockHistoryResponse, err error)
|
||||
DeleteArtworkRecord(req *artistInfoArtwork.DeleteArtworkRecordRequest) (res *artistInfoArtwork.ArtworkCommonNoParams, err error)
|
||||
}
|
||||
|
||||
var _ IArtistInfoArtwork = new(ArtistInfoArtworkLogic)
|
||||
|
||||
type ArtistInfoArtworkLogic struct{}
|
||||
|
||||
func (a ArtistInfoArtworkLogic) GetArtworkLockDetail(request *artistInfoArtwork.GetArtworkLockDetailRequest) (res *artistInfoArtwork.ArtistLockInfo, err error) {
|
||||
data, err := dao.GetArtworkLockDetail(request.ArtworkUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
res = &artistInfoArtwork.ArtistLockInfo{
|
||||
ArtistUid: data.ArtistUid,
|
||||
ArtworkUid: data.ArtworkUid,
|
||||
Status: data.Status,
|
||||
LockTime: data.LockTime,
|
||||
CreatedAt: data.CreatedAt.Unix(),
|
||||
UpdatedAt: data.UpdatedAt.Unix(),
|
||||
DeletedAt: int64(data.DeletedAt),
|
||||
BaseAuditStatus: int32(data.BaseAuditStatus),
|
||||
BaseAuditMark: data.BaseAuditMark,
|
||||
BaseAuditMark2: data.BaseAuditMark2,
|
||||
SupplementAuditStatus: int32(data.SupplementAuditStatus),
|
||||
SupplementAuditMark: data.SupplementAuditMark,
|
||||
SupplementAuditMark2: data.SupplementAuditMark2,
|
||||
AuditFlowIndex: int32(data.AuditFlowIndex),
|
||||
BaseEditable: data.BaseEditable(),
|
||||
SupplementEditable: data.SupplementEditable(),
|
||||
}
|
||||
return
|
||||
}
|
||||
func (ArtistInfoArtworkLogic) CreateArtworkLockRecord(req *artistInfoArtwork.CreateArtworkLockRecordReq) (res *artistInfoArtwork.ArtworkCommonNoParams, err error) {
|
||||
err = dao.CreateArtworkLockRecord(&model.ArtworkLockRecord{
|
||||
ArtistUid: req.ArtistUid,
|
||||
ArtworkUid: req.ArtworkUid,
|
||||
Status: req.Status,
|
||||
LockTime: req.LockTime,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (ArtistInfoArtworkLogic) ArtworkLockAction(req *artistInfoArtwork.ArtworkLockActionRequest) (res *artistInfoArtwork.ArtworkCommonNoParams, err error) {
|
||||
switch req.Lock {
|
||||
case 2:
|
||||
err = dao.BatchLockArtworks(req.ArtistUid, req.LockTime)
|
||||
case 3:
|
||||
err = dao.BatchUnlockArtworks(req.ArtistUid)
|
||||
default:
|
||||
err = errors.New("lock值错误")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (ArtistInfoArtworkLogic) GetArtworkLockRecords(req *artistInfoArtwork.GetArtworkLockRecordsRequest) (res *artistInfoArtwork.ArtworkLockList, err error) {
|
||||
res = &artistInfoArtwork.ArtworkLockList{}
|
||||
res, err = dao.GetArtworkLockRecords(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtworkLogic) GetArtworkLockHistoryGroup(request *artistInfoArtwork.GetArtworkLockHistoryRequest) (res *artistInfoArtwork.GetArtworkLockHistoryResponse, err error) {
|
||||
// 查询解锁的画作
|
||||
unlockArtworkList, err := dao.GetArtworkLockRecords(&artistInfoArtwork.GetArtworkLockRecordsRequest{
|
||||
ArtistUid: request.ArtistUid,
|
||||
QueryType: artistInfoArtwork.ArtworkQueryMode_AllUnlockArtwork,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(unlockArtworkList.Data) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
res = &artistInfoArtwork.GetArtworkLockHistoryResponse{}
|
||||
var artworkUidList []string
|
||||
for _, v := range unlockArtworkList.Data {
|
||||
artworkUidList = append(artworkUidList, v.ArtworkUid)
|
||||
}
|
||||
fmt.Println("artworkUidList", artworkUidList)
|
||||
//查询画作预览列表
|
||||
previewListRes, err := service.ArtworkQueryImpl.ArtworkPreviewList(context.Background(), &artwork_query.ArtworkPreviewListRequest{
|
||||
Page: 1,
|
||||
PageSize: -1,
|
||||
// ArtworkUids: artworkUidList,
|
||||
ArtistUid: request.ArtistUid,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fmt.Println("previewListRes count", len(previewListRes.Data))
|
||||
var thisLockTime = ""
|
||||
var groupIndex = -1
|
||||
for _, v := range unlockArtworkList.Data {
|
||||
var newGroup bool
|
||||
if thisLockTime != v.LockTime {
|
||||
thisLockTime = v.LockTime
|
||||
newGroup = true
|
||||
groupIndex++
|
||||
}
|
||||
if newGroup {
|
||||
res.GroupList = append(res.GroupList, &artistInfoArtwork.ArtworkLockRecord{
|
||||
LockGroup: v.LockTime,
|
||||
DataList: make([]*artistInfoArtwork.ArtworkPreviewInfo, 0),
|
||||
})
|
||||
}
|
||||
//// 方案1: 画作在画作系统被删除了,继续展示,只是数据只有artowrkUid,其它的都没了,查询详情会报错not found
|
||||
// var thisArtwork = &artistInfoArtwork.ArtworkPreviewInfo{
|
||||
// ArtistUuid: v.ArtistUid,
|
||||
// ArtworkUid: v.ArtworkUid,
|
||||
// LockStatus: int32(v.Status),
|
||||
// BaseAuditStatus: v.BaseAuditStatus,
|
||||
// BaseAuditMark: v.BaseAuditMark,
|
||||
// BaseAuditMark2: v.BaseAuditMark2,
|
||||
// SupplementAuditStatus: v.SupplementAuditStatus,
|
||||
// SupplementAuditMark: v.SupplementAuditMark,
|
||||
// SupplementAuditMark2: v.SupplementAuditMark2,
|
||||
// AuditFlowIndex: v.AuditFlowIndex,
|
||||
// CreatedAt: v.CreatedAt,
|
||||
// UpdatedAt: v.UpdatedAt,
|
||||
// DeletedAt: v.DeletedAt,
|
||||
// }
|
||||
// for _, artwork := range previewListRes.Data {
|
||||
// if artwork.ArtworkUid == v.ArtworkUid {
|
||||
// thisArtwork.ArtworkName = artwork.ArtworkName
|
||||
// thisArtwork.Length = artwork.Length
|
||||
// thisArtwork.Width = artwork.Width
|
||||
// thisArtwork.Ruler = artwork.Ruler
|
||||
// thisArtwork.CreatedAddress = strings.Split(artwork.CreatedAddress, ",")
|
||||
// thisArtwork.ArtistPhoto = artwork.ArtistPhoto
|
||||
// thisArtwork.HdPic = artwork.HdPic
|
||||
// thisArtwork.ArtworkUid = artwork.ArtworkUid
|
||||
// thisArtwork.CreatedDate = artwork.CreateDate
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// res.GroupList[groupIndex].DataList = append(res.GroupList[groupIndex].DataList, thisArtwork)
|
||||
|
||||
//// 方案2:画作如果被画作系统删除,则不展示被删除的内容
|
||||
for _, artwork := range previewListRes.Data {
|
||||
if artwork.ArtworkUid == v.ArtworkUid {
|
||||
res.GroupList[groupIndex].DataList = append(res.GroupList[groupIndex].DataList, &artistInfoArtwork.ArtworkPreviewInfo{
|
||||
ArtworkName: artwork.ArtworkName,
|
||||
Length: artwork.Length,
|
||||
Width: artwork.Width,
|
||||
Ruler: artwork.Ruler,
|
||||
CreatedAddress: strings.Split(artwork.CreatedAddress, ","),
|
||||
ArtistPhoto: artwork.ArtistPhoto,
|
||||
HdPic: artwork.HdPic,
|
||||
CreatedDate: artwork.CreateDate,
|
||||
LockStatus: int32(v.Status),
|
||||
ArtistUuid: v.ArtistUid,
|
||||
ArtworkUid: v.ArtworkUid,
|
||||
BaseAuditStatus: v.BaseAuditStatus,
|
||||
BaseAuditMark: v.BaseAuditMark,
|
||||
BaseAuditMark2: v.BaseAuditMark2,
|
||||
SupplementAuditStatus: v.SupplementAuditStatus,
|
||||
SupplementAuditMark: v.SupplementAuditMark,
|
||||
SupplementAuditMark2: v.SupplementAuditMark2,
|
||||
AuditFlowIndex: v.AuditFlowIndex,
|
||||
CreatedAt: v.CreatedAt,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
DeletedAt: v.DeletedAt,
|
||||
})
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (ArtistInfoArtworkLogic) DeleteArtworkRecord(req *artistInfoArtwork.DeleteArtworkRecordRequest) (res *artistInfoArtwork.ArtworkCommonNoParams, err error) {
|
||||
//检查画作锁定情况
|
||||
for _, v := range req.ArtworkUids {
|
||||
if dao.HasBeenLocked(v) {
|
||||
return nil, errors.New(m.ERROR_ISLOCK)
|
||||
}
|
||||
}
|
||||
err = dao.DeletedArtworkLockRecord(req.ArtworkUids...)
|
||||
return
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtworkLogic) UpdateArtworkAuditStatus(request *artistInfoArtwork.UpdateArtworkAuditStatusRequest) (res *artistInfoArtwork.ArtworkCommonNoParams, err error) {
|
||||
if request.ArtworkUid != "" {
|
||||
err = dao.UpdateAuditStatus(request.ArtworkUid, request.AuditStatus, request.AuditMark, request.AuditMark2, request.FlowIndex)
|
||||
|
||||
} else if request.ArtworkUids != nil && len(request.ArtworkUids) > 0 {
|
||||
err = dao.BatchUpdateAuditStatus(request.ArtworkUids, request.AuditStatus, request.AuditMark, request.AuditMark2, request.FlowIndex)
|
||||
} else {
|
||||
return nil, errors.New("画作uid不能为空")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// CheckArtworkEditable 检查画作的可编辑状态
|
||||
// followIndex 2:基本信息审核 3补充信息审核
|
||||
func (a ArtistInfoArtworkLogic) CheckArtworkEditable(request *artistInfoArtwork.ArtworkUidRequest, followIndex int) (res *artistInfoArtwork.CheckArtworkEditableResponse, err error) {
|
||||
res = &artistInfoArtwork.CheckArtworkEditableResponse{}
|
||||
lockDetail, err := dao.GetArtworkLockDetail(request.ArtworkUid)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if followIndex == 2 {
|
||||
res.Editable = lockDetail.BaseEditable()
|
||||
} else if followIndex == 3 {
|
||||
res.Editable = lockDetail.SupplementEditable()
|
||||
}
|
||||
return
|
||||
}
|
||||
func (a ArtistInfoArtworkLogic) GenerateArtworkSupplementInfo(request *artistInfoArtwork.ArtworkUidsRequest) (*emptypb.Empty, error) {
|
||||
//更新画作流程
|
||||
err := dao.GenerateArtworkSupplementInfo(request.ArtworkUids)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtworkLogic) ArtworkStatic(request *artistInfoArtwork.ArtistArtworkStaticRequest) (res *artistInfoArtwork.ArtistArtworkStaticResponse, err error) {
|
||||
//查询画家宝中认证成功的用户
|
||||
userList, total, err := dao.GetViewUserList(&artistInfoUser.FindUsersRequest{
|
||||
// ArtistRealName: request.ArtistKeyWords,
|
||||
Keyword: request.ArtistKeyWords,
|
||||
Page: int32(request.Page),
|
||||
PageSize: int32(request.PageSize),
|
||||
IsArtist: true,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(userList) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
var artistUids []string
|
||||
for _, v := range userList {
|
||||
artistUids = append(artistUids, v.ArtistUid)
|
||||
}
|
||||
//查询对应的画家信息
|
||||
var gender int32 = -1
|
||||
if request.ArtistGender == 1 {
|
||||
gender = 0
|
||||
} else if request.ArtistGender == 2 {
|
||||
gender = 1
|
||||
}
|
||||
//查询匹配的画家数据列表
|
||||
artistList, err := service.GrpcArtistImpl.ArtistList(context.Background(), &artist.ArtistListRequest{
|
||||
// Keyword: request.ArtistKeyWords,
|
||||
Page: 1,
|
||||
PageSize: -1,
|
||||
Gender: gender,
|
||||
Uids: artistUids, //直接搜会导致Count值不对,手动筛选
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
//查询这些画家审核通过的画作数据统计
|
||||
res = &artistInfoArtwork.ArtistArtworkStaticResponse{
|
||||
Page: int64(artistList.Page),
|
||||
PageSize: int64(request.PageSize),
|
||||
Total: total,
|
||||
}
|
||||
viewDatas, err := dao.PassedArtworkStatic(&artistInfoArtwork.ArtistArtworkStaticRequest{Page: 1, PageSize: -1}, artistUids)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for i, v := range viewDatas {
|
||||
var (
|
||||
penName string
|
||||
stageName string
|
||||
artworkTotal int64
|
||||
rulerTotal int64
|
||||
passedRulerTotal int64
|
||||
passedArtworkTotal int64
|
||||
)
|
||||
//统计画家素有画作的总数和总平尺数
|
||||
artworkTotal, rulerTotal = dao.CountAllArtworkTotal(v.ArtistUid)
|
||||
//统计审核通过的画作总数和平尺总数
|
||||
passedRulerTotal, passedArtworkTotal = dao.CountArtworkTotalWhichAuditPassed(v.ArtistUid)
|
||||
//补充画家信息
|
||||
for _, artistData := range artistList.Data {
|
||||
if artistData.Uid == v.ArtistUid {
|
||||
penName = artistData.PenName
|
||||
stageName = artistData.StageName
|
||||
}
|
||||
}
|
||||
//补充画作信息
|
||||
res.Data = append(res.Data, &artistInfoArtwork.ArtistArtworkStaticStaticData{
|
||||
Idx: int64(i + 1),
|
||||
IsLock: v.IsLock,
|
||||
ArtistUid: v.ArtistUid,
|
||||
LatestLockTime: v.LatestLockTime,
|
||||
LatestUpdatedAt: stime.TimeToString(v.LatestUpdatedAt, stime.Format_Normal_YMDhms),
|
||||
RealName: v.RealName,
|
||||
PenName: penName,
|
||||
StageName: stageName,
|
||||
ArtworkTotal: artworkTotal,
|
||||
RulerTotal: rulerTotal,
|
||||
PassedRulerTotal: passedRulerTotal,
|
||||
PassedArtworkTotal: passedArtworkTotal,
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (a ArtistInfoArtworkLogic) UpdateArtworkExtData(request *artistInfoArtwork.ArtworkExtData) error {
|
||||
return dao.UpdateArtworkExtData(request)
|
||||
}
|
||||
func (a ArtistInfoArtworkLogic) GetArtworkExtDatas(request *artistInfoArtwork.GetArtworkExtDataRequest) (*artistInfoArtwork.GetArtworkExtDataResponse, error) {
|
||||
return dao.GetArtworkExtDatas(request)
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
package logic
|
||||
|
||||
// import (
|
||||
// "github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
// "github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
||||
// "github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
// "google.golang.org/protobuf/types/known/emptypb"
|
||||
// )
|
||||
|
||||
// type StatementServerLogic struct{}
|
||||
|
||||
// func (s *StatementServerLogic) CreateStatementBatch(in *artistinfoStatement.StatementBatchRequest) (res *artistinfoStatement.CreateStatementBatchResponse, err error) {
|
||||
// res = &artistinfoStatement.CreateStatementBatchResponse{}
|
||||
// data, err := dao.CreateStatementBatch(in)
|
||||
// res.Id = data.ID
|
||||
// return
|
||||
// }
|
||||
|
||||
// func (s *StatementServerLogic) BatchCreateStatementBatch(in *artistinfoStatement.BatchCreateStatementBatchRequest) (*emptypb.Empty, error) {
|
||||
// return nil, dao.BatchCreateStatementBatch(in)
|
||||
// }
|
||||
|
||||
// func (s *StatementServerLogic) GetStatementBatchList(in *artistinfoStatement.GetStatementBatchListRequest) (res *artistinfoStatement.GetStatementBatchListResponse, err error) {
|
||||
// datas, total, err := dao.GetStatementBatchList(in)
|
||||
|
||||
// res = &artistinfoStatement.GetStatementBatchListResponse{
|
||||
// Page: &artistinfoStatement.StatementPageInfo{
|
||||
// Page: in.Page,
|
||||
// PageSize: in.PageSize,
|
||||
// Total: total,
|
||||
// },
|
||||
// Data: []*artistinfoStatement.StatementBatchRequest{},
|
||||
// }
|
||||
// for _, v := range datas {
|
||||
// res.Data = append(res.Data, &artistinfoStatement.StatementBatchRequest{
|
||||
// StType: v.StType,
|
||||
// ArtistUid: v.ArtistUid,
|
||||
// ArtistRealName: v.ArtistRealName,
|
||||
// FlowStatus: v.FlowStatus,
|
||||
// BatchTime: v.BatchTime,
|
||||
// MinPrice: v.MinPrice,
|
||||
// GuaranteePrice: v.GuaranteePrice,
|
||||
// Id: v.ID,
|
||||
// CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
// UpdatedAt: stime.TimeToString(v.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
// DeletedAt: int64(v.DeletedAt),
|
||||
// FileUrl: v.FileUrl,
|
||||
// })
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
|
||||
// func (s *StatementServerLogic) CreateStatementDetail(in *artistinfoStatement.StatementDetailRequest) (res *artistinfoStatement.CreateStatementDetailResponse, err error) {
|
||||
// res = &artistinfoStatement.CreateStatementDetailResponse{}
|
||||
// data, err := dao.CreateStatementDetail(in)
|
||||
// res.Id = data.ID
|
||||
// return
|
||||
// }
|
||||
|
||||
// func (s *StatementServerLogic) BatchCreateStatementDetail(in *artistinfoStatement.BatchCreateStatementDetailRequest) (*emptypb.Empty, error) {
|
||||
// return nil, dao.BatchCreateStatementDetail(in)
|
||||
// }
|
||||
|
||||
// func (s *StatementServerLogic) GetStatementDetailList(in *artistinfoStatement.GetStatementDetailListRequest) (res *artistinfoStatement.GetStatementDetailListResponse, err error) {
|
||||
// datas, total, err := dao.GetStatementDetailList(in)
|
||||
// res = &artistinfoStatement.GetStatementDetailListResponse{
|
||||
// Data: []*artistinfoStatement.StatementDetailRequest{},
|
||||
// Page: &artistinfoStatement.StatementPageInfo{
|
||||
// Page: in.Page,
|
||||
// PageSize: in.PageSize,
|
||||
// Total: total,
|
||||
// },
|
||||
// }
|
||||
// for _, v := range datas {
|
||||
// res.Data = append(res.Data, &artistinfoStatement.StatementDetailRequest{
|
||||
// BatchId: v.BatchId,
|
||||
// TfNum: v.TfNum,
|
||||
// ArtworkName: v.ArtworkName,
|
||||
// Ruler: v.Ruler,
|
||||
// SaleNo: v.SaleNo,
|
||||
// CompleteDate: v.CompleteDate,
|
||||
// Id: v.ID,
|
||||
// CreatedAt: stime.TimeToString(v.CreatedAt, stime.Format_Normal_YMDhms),
|
||||
// UpdatedAt: stime.TimeToString(v.UpdatedAt, stime.Format_Normal_YMDhms),
|
||||
// DeletedAt: int64(v.DeletedAt),
|
||||
// })
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
|
||||
// func (s *StatementServerLogic) GetStatementBatchTimeMenus(in *artistinfoStatement.GetStatementBatchListRequest) (res *artistinfoStatement.GetStatementBatchTimeMenusResponse, err error) {
|
||||
// res = &artistinfoStatement.GetStatementBatchTimeMenusResponse{}
|
||||
// res.Data, err = dao.GetStatementBatchTimeMenus(in)
|
||||
// return
|
||||
// }
|
@ -1,810 +0,0 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artist"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artwork"
|
||||
contract "github.com/fonchain/fonchain-artistinfo/pb/contract"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/m"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/service"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type IContract interface {
|
||||
CreateContract(req *contract.CreateContractRequest) (rep *contract.CreateContractRespond, err error)
|
||||
ContractListMgmt(req *contract.ContractListMgmtRequest) (rep *contract.ContractListMgmtRespond, err error)
|
||||
ContractList(req *contract.ContractListRequest) (rep *contract.ContractListRespond, err error)
|
||||
SignContract(req *contract.SignContractRequest) (rep *contract.SignContractRespond, err error)
|
||||
FinishContract(req *contract.FinishContractRequest) (rep *contract.FinishContractRespond, err error)
|
||||
GetContractInfoByContractUid(req *contract.GetContractInfoByContractUidRequest) (rep *contract.GetContractInfoByContractUidRespond, err error)
|
||||
// ContractTxList(req *contract.ContractTxListRequest) (rep *contract.ContractTxListRespond, err error)
|
||||
|
||||
// ContractList(req *contract.ContractListRequest) (rep *contract.ContractListRespond, err error)
|
||||
// UpdateContract(req *contract.UpdateContractRequest) (rep *contract.UpdateContractRespond, err error)
|
||||
// UpdateContractTx(req *contract.UpdateContractTxRequest) (rep *contract.UpdateContractTxRespond, err error)
|
||||
// GetContract(req *contract.GetContractRequest) (rep *contract.ContractData, err error)
|
||||
}
|
||||
|
||||
func NewContract() IContract {
|
||||
return &Contract{}
|
||||
}
|
||||
|
||||
type Contract struct {
|
||||
}
|
||||
|
||||
func (a *Contract) CreateContract(req *contract.CreateContractRequest) (rep *contract.CreateContractRespond, err error) {
|
||||
rep = &contract.CreateContractRespond{}
|
||||
|
||||
//遇到错误数据库回滚
|
||||
tx := db.DB.Begin()
|
||||
|
||||
userInfo, err := dao.GetArtistInfoByArtistUid(req.ArtistUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println("第二处111111111111111")
|
||||
switch req.Type {
|
||||
//1 画家合同(不涉及画家的画作)
|
||||
case 1:
|
||||
|
||||
//查看画家合同是否已经存在,不存在继续
|
||||
if err = dao.GetMgmtContractByArtistUid(req.ArtistUid, req.Type); err == gorm.ErrRecordNotFound {
|
||||
fmt.Println("第一处111")
|
||||
var uid uuid.UUID
|
||||
if uid, err = uuid.NewV4(); err != nil {
|
||||
err = errors.New(m.ERROR_UID)
|
||||
return
|
||||
}
|
||||
|
||||
//创建画家合同
|
||||
contract := &model.Contract{
|
||||
Uid: uid.String(),
|
||||
ArtistUid: req.ArtistUid,
|
||||
Type: 1,
|
||||
State: 1,
|
||||
Status: 2,
|
||||
LockTime: userInfo.LatestLockTime,
|
||||
}
|
||||
|
||||
if err = dao.CreateArtistContract(tx, contract); err != nil {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
fmt.Println("第一处112")
|
||||
return
|
||||
}
|
||||
|
||||
case 2:
|
||||
for _, v := range req.ArtworkUid {
|
||||
//查看画作合同是否已经存在,不存在继续,类型2、6
|
||||
if err = dao.GetMgmtContractByArtworkUid(v, 2); err == gorm.ErrRecordNotFound {
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
||||
if err = dao.GetMgmtContractByArtworkUid(v, 6); err == gorm.ErrRecordNotFound {
|
||||
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
//创建画家画作合同,类型2,如果批次选择多个画作的话,那么多个画在一个合同中
|
||||
if err = dao.CreateArtworkContract(tx, req.ArtworkUid, req.ArtistUid, 2, userInfo.LatestLockTime); err != nil {
|
||||
tx.Rollback()
|
||||
return
|
||||
}
|
||||
|
||||
//创建画家画作合同,类型6
|
||||
if err = dao.CreateArtworkContract(tx, req.ArtworkUid, req.ArtistUid, 6, userInfo.LatestLockTime); err != nil {
|
||||
tx.Rollback()
|
||||
return
|
||||
}
|
||||
|
||||
case 3:
|
||||
for _, v := range req.ArtworkUid {
|
||||
//查看画作合同是否已经存在,不存在继续,类型3
|
||||
if err = dao.GetMgmtContractByArtworkUid(v, 3); err == gorm.ErrRecordNotFound {
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
//创建画家画作合同,类型3,每个画作一个合同
|
||||
for _, v := range req.ArtworkUid {
|
||||
var artworkUid []string
|
||||
artworkUid = append(artworkUid, v)
|
||||
if err = dao.CreateArtworkContract(tx, artworkUid, req.ArtistUid, 3, userInfo.LatestLockTime); err != nil {
|
||||
tx.Rollback()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
case 5:
|
||||
for _, v := range req.ArtworkUid {
|
||||
//查看画作合同是否已经存在,不存在继续,类型5
|
||||
if err = dao.GetMgmtContractByArtworkUid(v, 5); err == gorm.ErrRecordNotFound {
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
//创建画家画作合同,类型5
|
||||
for _, v := range req.ArtworkUid {
|
||||
var artworkUid []string
|
||||
artworkUid = append(artworkUid, v)
|
||||
if err = dao.CreateArtworkContract(tx, artworkUid, req.ArtistUid, 5, userInfo.LatestLockTime); err != nil {
|
||||
tx.Rollback()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
err = errors.New("type值出错!")
|
||||
return rep, err
|
||||
}
|
||||
|
||||
tx.Commit()
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Contract) ContractListMgmt(req *contract.ContractListMgmtRequest) (rep *contract.ContractListMgmtRespond, err error) {
|
||||
rep = &contract.ContractListMgmtRespond{}
|
||||
|
||||
//查看是否有该画家
|
||||
_, err = dao.GetArtistInfoByArtistUid(req.ArtistUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
//合同分页查询操作
|
||||
if req.Page < 1 {
|
||||
req.Page = 1
|
||||
}
|
||||
if req.Num < 1 {
|
||||
req.Num = 15
|
||||
}
|
||||
offset := (req.Page - 1) * req.Num
|
||||
|
||||
//获取该用户的所有合同
|
||||
contracts, err := dao.GetContractList(req.ArtistUid, req.Num, offset, req.Status)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
rep.Data = contracts
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Contract) ContractList(req *contract.ContractListRequest) (rep *contract.ContractListRespond, err error) {
|
||||
|
||||
//查看是否有该画家
|
||||
user, err := dao.GetArtistInfoById(req.ArtistUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println("user:", user)
|
||||
|
||||
ContractData, err := dao.ContractList(user.MgmtArtistUid, req.State)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
rep = &contract.ContractListRespond{
|
||||
Data: ContractData,
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Contract) SignContract(req *contract.SignContractRequest) (rep *contract.SignContractRespond, err error) {
|
||||
rep = &contract.SignContractRespond{}
|
||||
|
||||
fmt.Println("SignContractReq", req)
|
||||
tx := db.DB.Begin()
|
||||
//更新合同状态并获取合同信息
|
||||
err = dao.UpdateContract(tx, req)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
}
|
||||
|
||||
tx.Commit()
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Contract) FinishContract(req *contract.FinishContractRequest) (rep *contract.FinishContractRespond, err error) {
|
||||
rep = &contract.FinishContractRespond{}
|
||||
|
||||
tx := db.DB.Begin()
|
||||
//更新合同状态并获取合同信息
|
||||
contract, err := dao.FinishContract(tx, req.TransactionId, req.ContractUid)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rep.Contract = contract
|
||||
|
||||
tx.Commit()
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Contract) GetContractInfoByContractUid(req *contract.GetContractInfoByContractUidRequest) (rep *contract.GetContractInfoByContractUidRespond, err error) {
|
||||
|
||||
rep = &contract.GetContractInfoByContractUidRespond{}
|
||||
|
||||
contractInfo, err := dao.GetContractInfo(req.ContractUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
contract := &contract.Contracts{
|
||||
ContractUid: contractInfo.Uid,
|
||||
ArtistUid: contractInfo.ArtistUid,
|
||||
ArtworkUid: contractInfo.ArtworkUid,
|
||||
ContractId: contractInfo.ContractId,
|
||||
TransactionId: contractInfo.TransactionId,
|
||||
Type: contractInfo.Type,
|
||||
ViewUrl: contractInfo.ViewUrl,
|
||||
DownloadUrl: contractInfo.DownloadUrl,
|
||||
State: contractInfo.State,
|
||||
Status: contractInfo.Status,
|
||||
LockTime: contractInfo.LockTime,
|
||||
SignTime: contractInfo.SignTime,
|
||||
BatchTime: contractInfo.BatchTime,
|
||||
BatchUid: contractInfo.BatchUid,
|
||||
StType: contractInfo.StType,
|
||||
}
|
||||
|
||||
rep.Data = contract
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// func (a *Contract) SignContract(req *contract.SignContractRequest) (rep *contract.SignContractRespond, err error) {
|
||||
// rep = &contract.SignContractRespond{}
|
||||
|
||||
// //遇到错误数据库回滚
|
||||
// tx := db.DB.Begin()
|
||||
|
||||
// //根据合同uid获取具体合同信息
|
||||
// contractInfo, err := dao.GetContractInfo(req.ContractUid)
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
|
||||
// // //根据画家id获取画家具体信息
|
||||
// // artistDetailResponse, customerId, err := GetArtistInfoById(req.ArtistUid)
|
||||
// // if err != nil {
|
||||
// // return rep, err
|
||||
// // }
|
||||
|
||||
// //返回画家信息
|
||||
// artistDetailResponse, err := dao.GetArtistInfoByArtistUid(req.ArtistUid)
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
|
||||
// var (
|
||||
// realName string
|
||||
// address string
|
||||
// idNum string
|
||||
// telNum string
|
||||
// )
|
||||
// if artistDetailResponse.RealNameInfo != nil {
|
||||
// realName = artistDetailResponse.RealNameInfo.Name
|
||||
// address = artistDetailResponse.RealNameInfo.Address
|
||||
// idNum = artistDetailResponse.RealNameInfo.IdNum
|
||||
// telNum = artistDetailResponse.RealNameInfo.TelNum
|
||||
// } else {
|
||||
// fmt.Printf("用户%s 实名信息为空", artistDetailResponse.MgmtArtistUid)
|
||||
// }
|
||||
|
||||
// if contractInfo.Type != 4 && contractInfo.Type != 7 {
|
||||
|
||||
// switch contractInfo.Type {
|
||||
// case 1:
|
||||
// var ContractNo = fmt.Sprintf("TF_%d", time.Now().UnixNano())
|
||||
// endTime := time.Now().AddDate(1, 0, -1)
|
||||
// parameterMap := make((map[string]string), 0)
|
||||
|
||||
// // 一、 模板填充
|
||||
// parameterMap["PartyAName"] = realName
|
||||
// parameterMap["PartyAAddress"] = address
|
||||
// parameterMap["PartyAIdentityCard"] = idNum
|
||||
// parameterMap["PartyATelNum"] = artistDetailResponse.TelNum
|
||||
// parameterMap["PartyBRule"] = "240"
|
||||
// parameterMap["SettleNum"] = "2"
|
||||
// parameterMap["SettleSec"] = "100"
|
||||
// parameterMap["ActivityNum"] = "2"
|
||||
// parameterMap["SettlerTypeFour"] = "2"
|
||||
// parameterMap["PowerDay"] = "5"
|
||||
// parameterMap["EffectStartYear"] = fmt.Sprintf("%d", time.Now().Year())
|
||||
// parameterMap["EffectStartMonth"] = fmt.Sprintf("%d", time.Now().Month())
|
||||
// parameterMap["EffectStartDay"] = fmt.Sprintf("%d", time.Now().Day())
|
||||
// parameterMap["EffectEndYear"] = fmt.Sprintf("%d", endTime.Year())
|
||||
// parameterMap["EffectEndMonth"] = fmt.Sprintf("%d", endTime.Month())
|
||||
// parameterMap["EffectEndDay"] = fmt.Sprintf("%d", endTime.Day())
|
||||
// parameterMap["PartyBLegal"] = "胡婷"
|
||||
|
||||
// //将map转换为string类型
|
||||
// parameterMapType, err := json.Marshal(parameterMap)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// generateContractRequest := &contractMicroservice.GenerateContractRequest{
|
||||
// TemplateId: "一手画市场18",
|
||||
// ContractId: ContractNo,
|
||||
// ParameterMap: string(parameterMapType),
|
||||
// }
|
||||
|
||||
// fmt.Println("合同111")
|
||||
// generateContractResponse, err := service.ContractImpl.GenerateContract(context.Background(), generateContractRequest)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// //二、 自动签署
|
||||
// extSignAutoRequest := &contractMicroservice.ExtSignAutoRequest{
|
||||
// TransactionId: fmt.Sprintf("TFAU_%d", time.Now().UnixNano()),
|
||||
// ContractId: ContractNo,
|
||||
// CustomerId: "1A958BFD01E6551D06381DA6C0B19259",
|
||||
// DocTitle: fmt.Sprintf("TFAU_%d", time.Now().UnixNano()),
|
||||
// SignKeyword: "受托方(乙方)",
|
||||
// SignatureId: "1668589742383450",
|
||||
// KeyX: "120",
|
||||
// KeyY: "0",
|
||||
// }
|
||||
|
||||
// fmt.Println("合同11")
|
||||
// _, err = service.ContractImpl.ExtSignAuto(context.Background(), extSignAutoRequest)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// fmt.Println("合同1")
|
||||
// //更新合同表,将合同的下载、在线、id保存
|
||||
// err = dao.UpdateContract(tx, contractInfo.Uid, generateContractResponse.ViewPdfUrl, generateContractResponse.DownloadUrl, ContractNo)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
// fmt.Println("合同2")
|
||||
|
||||
// case 2:
|
||||
|
||||
// var ContractNo = fmt.Sprintf("TF_%d", time.Now().UnixNano())
|
||||
// var parameterMap = make(map[string]string)
|
||||
// endTime := time.Now().AddDate(1, 0, -1)
|
||||
// parameterMap["contractNo"] = ContractNo
|
||||
// parameterMap["partyAName"] = realName
|
||||
// parameterMap["partyAAddress"] = address
|
||||
// parameterMap["partyAIdentityCard"] = idNum
|
||||
// parameterMap["partyATelNum"] = telNum
|
||||
// parameterMap["settleNum"] = "2"
|
||||
// parameterMap["settleSecOne"] = "0"
|
||||
// parameterMap["settleSecTwo"] = "100"
|
||||
// parameterMap["activityNum"] = "2"
|
||||
// parameterMap["settlerTypeFour"] = "2"
|
||||
// parameterMap["powerDay"] = "5"
|
||||
// parameterMap["effectStartYear"] = fmt.Sprintf("%d", time.Now().Year())
|
||||
// parameterMap["effectStartMonth"] = fmt.Sprintf("%d", time.Now().Month())
|
||||
// parameterMap["effectStartDay"] = fmt.Sprintf("%d", time.Now().Day())
|
||||
// parameterMap["effectEndYear"] = fmt.Sprintf("%d", endTime.Year())
|
||||
// parameterMap["effectEndMonth"] = fmt.Sprintf("%d", endTime.Month())
|
||||
// parameterMap["effectEndDay"] = fmt.Sprintf("%d", endTime.Day())
|
||||
// parameterMap["PartyBLegal"] = "邬侨华"
|
||||
|
||||
// //将map转换为string类型
|
||||
// parameterMapType, err := json.Marshal(parameterMap)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// generateContractRequest := &contractMicroservice.GenerateContractRequest{
|
||||
// TemplateId: "著作权代理转让服务合同20",
|
||||
// ContractId: ContractNo,
|
||||
// ParameterMap: string(parameterMapType),
|
||||
// }
|
||||
// generateContractResponse, err := service.ContractImpl.GenerateContract(context.Background(), generateContractRequest)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// //二、 自动签署
|
||||
// extSignAutoRequest := &contractMicroservice.ExtSignAutoRequest{
|
||||
// TransactionId: fmt.Sprintf("TFAU_%d", time.Now().UnixNano()),
|
||||
// ContractId: ContractNo,
|
||||
// CustomerId: "F49C748A0C06431BC620354F4491BD37",
|
||||
// DocTitle: fmt.Sprintf("TFAU_%d", time.Now().UnixNano()),
|
||||
// SignKeyword: "受托方(乙方)",
|
||||
// SignatureId: "1668589763366246",
|
||||
// KeyX: "120",
|
||||
// KeyY: "0",
|
||||
// }
|
||||
|
||||
// _, err = service.ContractImpl.ExtSignAuto(context.Background(), extSignAutoRequest)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// //更新合同表,将合同的下载、在线、id保存
|
||||
// err = dao.UpdateContract(tx, contractInfo.Uid, generateContractResponse.ViewPdfUrl, generateContractResponse.DownloadUrl, ContractNo)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// case 3:
|
||||
// var ContractNo = fmt.Sprintf("TF_%d", time.Now().UnixNano())
|
||||
|
||||
// //获取画作信息
|
||||
// artworkDetailResponse, err := GetArtworkProfileByArtworkUid(contractInfo.ArtworkUid)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// var parameterMap = make(map[string]string)
|
||||
// parameterMap["partyAName"] = realName
|
||||
// parameterMap["partyAIdCard"] = idNum
|
||||
// parameterMap["artworkName"] = artworkDetailResponse.ProfileInfo.ArtworkName
|
||||
// parameterMap["year"] = fmt.Sprintf("%d", time.Now().Year())
|
||||
// parameterMap["month"] = fmt.Sprintf("%d", time.Now().Month())
|
||||
// parameterMap["day"] = fmt.Sprintf("%d", time.Now().Day())
|
||||
|
||||
// //将map转换为string类型
|
||||
// parameterMapType, err := json.Marshal(parameterMap)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// generateContractRequest := &contractMicroservice.GenerateContractRequest{
|
||||
// TemplateId: "登记授权委托书18",
|
||||
// ContractId: ContractNo,
|
||||
// ParameterMap: string(parameterMapType),
|
||||
// }
|
||||
// generateContractResponse, err := service.ContractImpl.GenerateContract(context.Background(), generateContractRequest)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// //更新合同表,将合同的下载、在线、id保存
|
||||
// err = dao.UpdateContract(tx, contractInfo.Uid, generateContractResponse.ViewPdfUrl, generateContractResponse.DownloadUrl, ContractNo)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// case 5:
|
||||
|
||||
// //获取画作信息
|
||||
// artworkDetailResponse, err := GetArtworkProfileByArtworkUid(contractInfo.ArtworkUid)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// var ContractNo = fmt.Sprintf("TF_%d", time.Now().UnixNano())
|
||||
|
||||
// var parameterMap = make(map[string]string)
|
||||
// parameterMap["artworkName"] = artworkDetailResponse.ProfileInfo.ArtworkName
|
||||
// parameterMap["year"] = fmt.Sprintf("%d", time.Now().Year())
|
||||
// parameterMap["month"] = fmt.Sprintf("%d", time.Now().Month())
|
||||
// parameterMap["day"] = fmt.Sprintf("%d", time.Now().Day())
|
||||
|
||||
// //将map转换为string类型
|
||||
// parameterMapType, err := json.Marshal(parameterMap)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// generateContractRequest := &contractMicroservice.GenerateContractRequest{
|
||||
// TemplateId: "作品登记承诺书16",
|
||||
// ContractId: ContractNo,
|
||||
// ParameterMap: string(parameterMapType),
|
||||
// }
|
||||
// generateContractResponse, err := service.ContractImpl.GenerateContract(context.Background(), generateContractRequest)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// //更新合同表,将合同的下载、在线、id保存
|
||||
// err = dao.UpdateContract(tx, contractInfo.Uid, generateContractResponse.ViewPdfUrl, generateContractResponse.DownloadUrl, ContractNo)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// case 6:
|
||||
// ArtistUids := strings.Split(contractInfo.ArtistUid, ",")
|
||||
|
||||
// type dynamic struct {
|
||||
// InsertWay int `json:"insertWay"`
|
||||
// Keyword string `json:"keyword"`
|
||||
// CellHeight float64 `json:"cellHeight"`
|
||||
// ColWidthPercent []int `json:"colWidthPercent"`
|
||||
// TheFirstHeader string `json:"theFirstHeader"`
|
||||
// CellHorizontalAlignment int `json:"cellHorizontalAlignment"`
|
||||
// CellVerticalAlignment int `json:"cellVerticalAlignment"`
|
||||
// Headers []string `json:"headers"`
|
||||
// Datas [][]string `json:"datas"`
|
||||
// }
|
||||
// var dynamicList []dynamic
|
||||
// var dynamicOne dynamic
|
||||
|
||||
// dynamicOne.InsertWay = 1
|
||||
// dynamicOne.Keyword = "附表 1"
|
||||
// dynamicOne.CellHeight = 16.0
|
||||
// dynamicOne.ColWidthPercent = []int{6, 6, 20, 10, 10}
|
||||
// // dynamicOne.TheFirstHeader =
|
||||
// dynamicOne.CellHorizontalAlignment = 1
|
||||
// dynamicOne.CellVerticalAlignment = 5
|
||||
// dynamicOne.Headers = []string{"序号", "作品名称", "哈希值", "著作权取得方式(原始/继受)", "继受取得的证明文件"}
|
||||
|
||||
// for k, v := range ArtistUids {
|
||||
// //获取画作信息
|
||||
// artworkDetailResponse, err := GetArtworkProfileByArtworkUid(v)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// var tmps []string
|
||||
// tmps = append(tmps, fmt.Sprintf("%d", k+1))
|
||||
// tmps = append(tmps, artworkDetailResponse.ProfileInfo.ArtistName) //获取画作名字
|
||||
// tmps = append(tmps, artworkDetailResponse.DigiInfo.CopyrightHash) //获取版权hash
|
||||
// tmps = append(tmps, "原始")
|
||||
// tmps = append(tmps, "")
|
||||
// dynamicOne.Datas = append(dynamicOne.Datas, tmps)
|
||||
// }
|
||||
|
||||
// dynamicList = append(dynamicList, dynamicOne)
|
||||
|
||||
// dyByte, err := json.Marshal(dynamicList)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// ContractNo := fmt.Sprintf("TF_%d", time.Now().UnixNano()+1000)
|
||||
|
||||
// //一、 模板填充
|
||||
// var parameterMap = make(map[string]string)
|
||||
// parameterMap["partyBLegal"] = artistDetailResponse.RealNameInfo.Name
|
||||
|
||||
// //将map转换为string类型
|
||||
// parameterMapType, err := json.Marshal(parameterMap)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// var viewPdfUrl string
|
||||
// var downloadUrl string
|
||||
|
||||
// generateContractRequest := &contractMicroservice.GenerateContractRequest{
|
||||
// ContractId: ContractNo,
|
||||
// ParameterMap: string(parameterMapType),
|
||||
// DynamicTables: string(dyByte),
|
||||
// }
|
||||
|
||||
// if len(ArtistUids) > 30 {
|
||||
|
||||
// return rep, errors.New("选择画作条数过多")
|
||||
|
||||
// } else if len(ArtistUids) <= 15 {
|
||||
// generateContractRequest.TemplateId = "著作权代理转让服务合同——附表152"
|
||||
// generateContractResponse, err := service.ContractImpl.GenerateContract(context.Background(), generateContractRequest)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// viewPdfUrl = generateContractResponse.ViewPdfUrl
|
||||
// downloadUrl = generateContractResponse.DownloadUrl
|
||||
|
||||
// } else {
|
||||
// generateContractRequest.TemplateId = "著作权代理转让服务合同——附表302"
|
||||
// generateContractResponse, err := service.ContractImpl.GenerateContract(context.Background(), generateContractRequest)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// viewPdfUrl = generateContractResponse.ViewPdfUrl
|
||||
// downloadUrl = generateContractResponse.DownloadUrl
|
||||
// }
|
||||
|
||||
// //二、 自动签署
|
||||
// extSignAutoRequest := &contractMicroservice.ExtSignAutoRequest{
|
||||
// TransactionId: fmt.Sprintf("TFAU_%d", time.Now().UnixNano()+1000),
|
||||
// ContractId: ContractNo,
|
||||
// CustomerId: "F49C748A0C06431BC620354F4491BD37",
|
||||
// DocTitle: fmt.Sprintf("TFAU_%d", time.Now().UnixNano()),
|
||||
// SignKeyword: "受托方(乙方)",
|
||||
// SignatureId: "1668589763366246",
|
||||
// KeyX: "120",
|
||||
// KeyY: "0",
|
||||
// }
|
||||
|
||||
// _, err = service.ContractImpl.ExtSignAuto(context.Background(), extSignAutoRequest)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// //更新合同表,将合同的下载、在线、id保存
|
||||
// err = dao.UpdateContract(tx, contractInfo.Uid, viewPdfUrl, downloadUrl, ContractNo)
|
||||
// if err != nil {
|
||||
// tx.Rollback()
|
||||
// return rep, err
|
||||
// }
|
||||
// default:
|
||||
// return rep, errors.New("type出错")
|
||||
// }
|
||||
// }
|
||||
|
||||
// //上面数据库没有错误就执行,上面修改的值下面会使用到
|
||||
// tx.Commit()
|
||||
|
||||
// transactionId := fmt.Sprintf("TFTX_%d", time.Now().UnixNano())
|
||||
|
||||
// var signKeyword string
|
||||
|
||||
// //从新根据合同id获取具体合同信息
|
||||
// contractInfo, err = dao.GetContractInfo(req.ContractUid)
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
|
||||
// if contractInfo.Type == 1 || contractInfo.Type == 2 || contractInfo.Type == 6 {
|
||||
|
||||
// signKeyword = "委托方(甲方)"
|
||||
// }
|
||||
// if contractInfo.Type == 3 {
|
||||
// signKeyword = "委托人签字:"
|
||||
// }
|
||||
// if contractInfo.Type == 4 {
|
||||
// signKeyword = "画家签字:"
|
||||
// }
|
||||
// if contractInfo.Type == 5 {
|
||||
// signKeyword = "申请人(签章):"
|
||||
// }
|
||||
// signShowTime := "1"
|
||||
// if contractInfo.Type == 5 || contractInfo.Type == 3 || contractInfo.Type == 6 {
|
||||
// signShowTime = "2"
|
||||
// }
|
||||
|
||||
// // 手动签署
|
||||
// extSignRequest := &contractMicroservice.ExtSignRequest{
|
||||
// TransactionId: transactionId,
|
||||
// ContractId: contractInfo.ContractId,
|
||||
// CustomerId: artistDetailResponse.CustomerId,
|
||||
// ReturnUrl: fmt.Sprintf("%v/contractwrite?htmltype=%s&envtype=%s&token= %s", "192.168.10.7", req.HtmlType, req.EnvType, req.Token),
|
||||
// DocTitle: contractInfo.ContractId,
|
||||
// OpenEnvironment: "0",
|
||||
// MobileSignType: "2",
|
||||
// SignKeyword: signKeyword,
|
||||
// Keyx: "100",
|
||||
// Keyy: "-5",
|
||||
// SignatureShowTime: signShowTime,
|
||||
// PcHandSignature: "2",
|
||||
// }
|
||||
|
||||
// jumpCommonResponse, err := service.ContractImpl.ExtSign(context.Background(), extSignRequest)
|
||||
// if err != nil {
|
||||
// return rep, err
|
||||
// }
|
||||
|
||||
// err = dao.UpdateContractTx(tx, contractInfo.Uid, transactionId)
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
// rep.JumpUrl = jumpCommonResponse.JumpUrl
|
||||
|
||||
// return rep, nil
|
||||
// }
|
||||
|
||||
// func (a *Contract) ContractTxList(req *contract.ContractTxListRequest) (rep *contract.ContractTxListRespond, err error) {
|
||||
|
||||
// rep = &contract.ContractTxListRespond{}
|
||||
// var datas []*contract.Contracts
|
||||
|
||||
// artistDetailResponse, _, err := GetArtistInfoById(req.ID)
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
|
||||
// contracts, err := dao.ContractTxList(artistDetailResponse.ProfileInfo.Uid, req.State)
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
|
||||
// data := &contract.Contracts{}
|
||||
// for _, v := range contracts {
|
||||
// data.ArtistUid = v.ArtistUid
|
||||
// data.ArtworkUid = v.ArtworkUid
|
||||
// data.ContractId = v.ContractId
|
||||
// data.TransactionId = v.TransactionId
|
||||
// data.Type = v.Type
|
||||
// data.ViewUrl = v.ViewUrl
|
||||
// data.DownloadUrl = v.DownloadUrl
|
||||
// //时间戳转时间
|
||||
// data.ExpirationTime = time.Unix(int64(v.CreatedAt), 0).Format("2006/01/02 15:04:05")
|
||||
// data.SignTime = v.SignTime
|
||||
// datas = append(datas, data)
|
||||
|
||||
// }
|
||||
|
||||
// rep.Data = datas
|
||||
|
||||
// return
|
||||
// }
|
||||
|
||||
// 根据画作uid获取画作信息
|
||||
func GetArtworkProfileByArtworkUid(artworkUid string) (artworkProfileInfo *artwork.ArtworkDetailResponse, err error) {
|
||||
artworkProfileInfo = &artwork.ArtworkDetailResponse{}
|
||||
|
||||
artworkDetailRequest := &artwork.ArtworkDetailRequest{
|
||||
ArtworkUuid: artworkUid,
|
||||
Type: "1",
|
||||
}
|
||||
artworkDetailResponse, err := service.ArtworkImpl.ArtworkDetail(context.Background(), artworkDetailRequest)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return artworkDetailResponse, nil
|
||||
}
|
||||
|
||||
// 根据画家id获取画家具体信息
|
||||
func GetArtistInfoById(artistUid string) (artistDetailResponse *artist.DetailResponse, customerId string, err error) {
|
||||
artistDetailResponse = &artist.DetailResponse{}
|
||||
|
||||
artistInfo, err := dao.GetArtistInfoById(artistUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
detailRequest := &artist.DetailRequest{
|
||||
Uid: artistInfo.MgmtArtistUid,
|
||||
}
|
||||
artistDetailResponse, err = service.GrpcArtistImpl.ArtistDetail(context.Background(), detailRequest)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
customerId = artistInfo.CustomerId
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// func (a *Contract) ContractList(req *contract.ContractListRequest) (rep *contract.ContractListRespond, err error) {
|
||||
|
||||
// rep, err = dao.ContractList(req)
|
||||
|
||||
// return
|
||||
// }
|
||||
|
||||
// func (a *Contract) GetContract(req *contract.GetContractRequest) (rep *contract.ContractData, err error) {
|
||||
|
||||
// rep, err = dao.GetContract(int32(req.Id))
|
||||
|
||||
// return
|
||||
// }
|
||||
// func (a *Contract) ContractTxList(req *contract.ContractTxListRequest) (rep *contract.ContractTxListRespond, err error) {
|
||||
|
||||
// rep, err = dao.ContractTxList(req)
|
||||
|
||||
// return
|
||||
// }
|
||||
|
||||
// func (a *Contract) UpdateContract(req *contract.UpdateContractRequest) (rep *contract.UpdateContractRespond, err error) {
|
||||
// rep = &contract.UpdateContractRespond{}
|
||||
// err = dao.UpdateContract(req)
|
||||
|
||||
// return
|
||||
// }
|
||||
|
||||
// func (a *Contract) UpdateContractTx(req *contract.UpdateContractTxRequest) (rep *contract.UpdateContractTxRespond, err error) {
|
||||
// rep = &contract.UpdateContractTxRespond{}
|
||||
// err = dao.UpdateContractTx(req.TransactionId, int32(req.ID))
|
||||
|
||||
// return
|
||||
// }
|
@ -1,140 +0,0 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
statement "github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement"
|
||||
)
|
||||
|
||||
type IStatement interface {
|
||||
StatementList(req *statement.StatementListRequest) (rep *statement.StatementListRespond, err error)
|
||||
GetTxInfoByBatchUid(req *statement.GetTxInfoByBatchUidRequest) (rep *statement.GetTxInfoByBatchUidRespond, err error)
|
||||
GetCopyInfoByBatchUid(req *statement.GetCopyInfoByBatchUidRequest) (rep *statement.GetCopyInfoByBatchUidRespond, err error)
|
||||
}
|
||||
|
||||
func NewStatement() IStatement {
|
||||
return &Statement{}
|
||||
}
|
||||
|
||||
type Statement struct {
|
||||
}
|
||||
|
||||
func (a *Statement) StatementList(req *statement.StatementListRequest) (rep *statement.StatementListRespond, err error) {
|
||||
//查看是否有该画家
|
||||
user, err := dao.GetArtistInfoById(req.ArtistUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
ContractData, err := dao.StatementList(user.MgmtArtistUid, req.State)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
rep = &statement.StatementListRespond{
|
||||
Data: ContractData,
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Statement) GetTxInfoByBatchUid(req *statement.GetTxInfoByBatchUidRequest) (rep *statement.GetTxInfoByBatchUidRespond, err error) {
|
||||
|
||||
rep = &statement.GetTxInfoByBatchUidRespond{}
|
||||
|
||||
//获取画家名
|
||||
artworkTx, err := dao.GetTxArtistNameByBatchUid(req.BatchUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
rep.ArtistName = artworkTx.ArtistName
|
||||
|
||||
//获取物权画作详细信息
|
||||
artworkTxDetails, err := dao.GetArtworkTxDetailByBatchUid(req.BatchUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
rep.ArtistName = artworkTx.ArtistName
|
||||
|
||||
//获取物权画作被售卖详细信息
|
||||
artworkSoldTxDetails, err := dao.GetArtworkSoldTxDetailByBatchUid(req.BatchUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
artworkTxDetail := new(statement.ArtworkTxDetail)
|
||||
artworkSoldTxDetail := new(statement.ArtworkSoldTxDetail)
|
||||
|
||||
for _, v := range artworkTxDetails {
|
||||
artworkTxDetail.TfNum = v.TfNum
|
||||
artworkTxDetail.ArtworkName = v.ArtworkName
|
||||
artworkTxDetail.Ruler = v.Ruler
|
||||
artworkTxDetail.MinPrice = v.MinPrice
|
||||
artworkTxDetail.GuaranteePrice = v.GuaranteePrice
|
||||
rep.ArtworkTxDetail = append(rep.ArtworkTxDetail, artworkTxDetail)
|
||||
}
|
||||
|
||||
for _, v := range artworkSoldTxDetails {
|
||||
artworkSoldTxDetail.TfNum = v.TfNum
|
||||
artworkSoldTxDetail.ArtworkName = v.ArtworkName
|
||||
artworkSoldTxDetail.Ruler = v.Ruler
|
||||
artworkSoldTxDetail.SaleNo = v.SaleNo
|
||||
artworkSoldTxDetail.CompleteDate = v.CompleteDate
|
||||
artworkSoldTxDetail.MinPrice = v.MinPrice
|
||||
artworkSoldTxDetail.SalePrice = v.SalePrice
|
||||
artworkSoldTxDetail.GuaranteePrice = v.GuaranteePrice
|
||||
rep.ArtworkSoldTxDetail = append(rep.ArtworkSoldTxDetail, artworkSoldTxDetail)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Statement) GetCopyInfoByBatchUid(req *statement.GetCopyInfoByBatchUidRequest) (rep *statement.GetCopyInfoByBatchUidRespond, err error) {
|
||||
|
||||
rep = &statement.GetCopyInfoByBatchUidRespond{}
|
||||
|
||||
//获取画家名
|
||||
artworkTx, err := dao.GetCopyArtistNameByBatchUid(req.BatchUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
rep.ArtistName = artworkTx.ArtistName
|
||||
|
||||
//获取版权画作详细信息
|
||||
artworkTxDetails, err := dao.GetArtworkCopyDetailByBatchUid(req.BatchUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
rep.ArtistName = artworkTx.ArtistName
|
||||
|
||||
//获取版权画作被售卖详细信息
|
||||
artworkSoldTxDetails, err := dao.GetArtworkSoldCopyDetailByBatchUid(req.BatchUid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
artworkCopyDetail := new(statement.ArtworkCopyDetail)
|
||||
artworkSoldCopyDetail := new(statement.ArtworkSoldCopyDetail)
|
||||
|
||||
for _, v := range artworkTxDetails {
|
||||
artworkCopyDetail.TfNum = v.TfNum
|
||||
artworkCopyDetail.ArtworkName = v.ArtworkName
|
||||
artworkCopyDetail.Ruler = v.Ruler
|
||||
artworkCopyDetail.MinPrice = v.MinPrice
|
||||
artworkCopyDetail.GuaranteePrice = v.GuaranteePrice
|
||||
rep.ArtworkCopyDetail = append(rep.ArtworkCopyDetail, artworkCopyDetail)
|
||||
}
|
||||
|
||||
for _, v := range artworkSoldTxDetails {
|
||||
artworkSoldCopyDetail.TfNum = v.TfNum
|
||||
artworkSoldCopyDetail.ArtworkName = v.ArtworkName
|
||||
artworkSoldCopyDetail.Ruler = v.Ruler
|
||||
artworkSoldCopyDetail.SaleNo = v.SaleNo
|
||||
artworkSoldCopyDetail.CompleteDate = v.CompleteDate
|
||||
artworkSoldCopyDetail.MinPrice = v.MinPrice
|
||||
artworkSoldCopyDetail.SalePrice = v.SalePrice
|
||||
artworkSoldCopyDetail.GuaranteePrice = v.GuaranteePrice
|
||||
rep.ArtworkSoldCopyDetail = append(rep.ArtworkSoldCopyDetail, artworkSoldCopyDetail)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
package logic
|
||||
|
||||
//
|
||||
//type ISupply interface {
|
||||
// GetSupplyInfoList(req *supplyinfo.GetSupplyInfoListRequest) (rep *supplyinfo.GetSupplyInfoListRespond, err error)
|
||||
// GetSupplyInfo(req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error)
|
||||
// UpdateSupplyInfo(req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error)
|
||||
// GetVideoList(req *supplyinfo.GetVideoListRequest) (rep *supplyinfo.GetVideoListRespond, err error)
|
||||
// GetVideo(req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error)
|
||||
// UpdateVideo(req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error)
|
||||
// GetExam(req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error)
|
||||
// GetExamList(req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error)
|
||||
// UpdateExam(req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error)
|
||||
// GetArtistInfoList(req *supplyinfo.GetArtistInfoListRequest) (rep *supplyinfo.GetArtistInfoListRespond, err error)
|
||||
// GetArtistInfo(req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error)
|
||||
// UpdateArtistInfo(req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error)
|
||||
//}
|
||||
//
|
||||
//func NewSupply() ISupply {
|
||||
// return &Supply{}
|
||||
//}
|
||||
//
|
||||
//type Supply struct {
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetSupplyInfoList(req *supplyinfo.GetSupplyInfoListRequest) (rep *supplyinfo.GetSupplyInfoListRespond, err error) {
|
||||
// rep, err = dao.GetSupplyInfoList(int32(req.ArtistId), int32(req.Types))
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetSupplyInfo(req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error) {
|
||||
// rep, err = dao.GetSupplyInfo(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) UpdateSupplyInfo(req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error) {
|
||||
// rep, err = dao.UpdateSupplyInfo(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetVideoList(req *supplyinfo.GetVideoListRequest) (rep *supplyinfo.GetVideoListRespond, err error) {
|
||||
// rep, err = dao.GetVideoList(int32(req.UserId))
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetVideo(req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error) {
|
||||
// rep, err = dao.GetVideo(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) UpdateVideo(req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error) {
|
||||
// rep, err = dao.UpdateVideo(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetExam(req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error) {
|
||||
// rep, err = dao.GetExam(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetExamList(req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error) {
|
||||
// rep, err = dao.GetExamList(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) UpdateExam(req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error) {
|
||||
// rep, err = dao.UpdateExam(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetArtistInfoList(req *supplyinfo.GetArtistInfoListRequest) (rep *supplyinfo.GetArtistInfoListRespond, err error) {
|
||||
// rep, err = dao.GetArtistInfoList(int32(req.UserId))
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetArtistInfo(req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error) {
|
||||
// rep, err = dao.GetArtistInfo(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) UpdateArtistInfo(req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error) {
|
||||
// rep, err = dao.UpdateArtistInfo(req)
|
||||
// return
|
||||
//}
|
@ -1,69 +0,0 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/old/logic"
|
||||
artwork2 "github.com/fonchain/fonchain-artistinfo/pb/old/artwork"
|
||||
)
|
||||
|
||||
type ArtWorkProvider struct {
|
||||
artwork2.UnimplementedArtworkServer
|
||||
artWorkLogic *logic.Artwork
|
||||
}
|
||||
|
||||
func (a *ArtWorkProvider) ArtworkAdd(ctx context.Context, req *artwork2.ArtworkAddRequest) (rep *artwork2.ArtworkAddRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.artWorkLogic.ArtworkAdd(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtWorkProvider) UpdateArtwork(ctx context.Context, req *artwork2.UpdateArtworkRequest) (rep *artwork2.UpdateArtworkRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.artWorkLogic.UpdateArtwork(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtWorkProvider) DelArtwork(ctx context.Context, req *artwork2.DelArtworkRequest) (rep *artwork2.DelArtworkRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.artWorkLogic.DelArtwork(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtWorkProvider) GetArtworkList(ctx context.Context, req *artwork2.GetArtworkListRequest) (rep *artwork2.GetArtworkListRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.artWorkLogic.GetArtworkList(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtWorkProvider) GetArtwork(ctx context.Context, req *artwork2.GetArtworkRequest) (rep *artwork2.GetArtworkRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.artWorkLogic.GetArtwork(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtWorkProvider) UploadArtwork(ctx context.Context, req *artwork2.UploadArtworkRequest) (rep *artwork2.UploadArtworkRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.artWorkLogic.UploadArtwork(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *ArtWorkProvider) ApproveArtwork(ctx context.Context, req *artwork2.ApproveArtworkRequest) (rep *artwork2.ApproveArtworkRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.artWorkLogic.ApproveArtwork(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
@ -1,280 +0,0 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model/old"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/old/artwork"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/m"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func ArtworkAdd(res *artwork.ArtworkAddRequest) (req *artwork.ArtworkAddRespond, err error) {
|
||||
CreataAddByte, err := json.Marshal(res.CreateAddress)
|
||||
if err != nil {
|
||||
zap.L().Error("marshal createAddress failed", zap.Error(err))
|
||||
err = errors.New(m.ERROR_MARSHAL)
|
||||
return
|
||||
}
|
||||
artwork := &old.Artwork{
|
||||
ArtistId: res.ArtistId,
|
||||
Name: res.Name,
|
||||
ModelYear: res.ModelYear,
|
||||
Photo: res.Photo,
|
||||
ArtistPhoto: res.ArtistPhoto,
|
||||
CreateAddress: string(CreataAddByte),
|
||||
Width: int32(res.Width),
|
||||
AgeOfCreation: res.AgeOfCreation,
|
||||
Height: int32(res.Height),
|
||||
Ruler: int32(res.Ruler),
|
||||
Introduct: res.Introduct,
|
||||
NetworkTrace: res.NetworkTrace,
|
||||
Url: res.Url,
|
||||
State: int32(res.State),
|
||||
}
|
||||
|
||||
if err = db.DB.Create(&artwork).Error; err != nil {
|
||||
zap.L().Error("create artwork info err", zap.Error(err))
|
||||
err = errors.New(m.CREATE_ERROR)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateArtwork(data *artwork.UpdateArtworkRequest) (err error) {
|
||||
var artwork old.Artwork
|
||||
artwork.ID = int32(data.ID)
|
||||
if err = db.DB.First(&artwork).Error; err != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
userId, err := GetUserId(data.ArtistId)
|
||||
if err != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
CreataAddByte, _ := json.Marshal(data.CreateAddress)
|
||||
artwork.ID = int32(data.ID)
|
||||
artwork.ArtistId = uint64(userId)
|
||||
artwork.Name = data.Name
|
||||
artwork.ModelYear = data.ModelYear
|
||||
artwork.Photo = data.Photo
|
||||
artwork.ArtistPhoto = data.ArtistPhoto
|
||||
artwork.Width = int32(data.Width)
|
||||
artwork.AgeOfCreation = data.AgeOfCreation
|
||||
artwork.CreateAddress = string(CreataAddByte)
|
||||
artwork.Height = int32(data.Height)
|
||||
artwork.Ruler = int32(data.Ruler)
|
||||
artwork.Introduct = data.Introduct
|
||||
artwork.NetworkTrace = data.NetworkTrace
|
||||
artwork.Url = data.Url
|
||||
artwork.State = 1
|
||||
|
||||
if err = db.DB.Save(&artwork).Error; err != nil {
|
||||
zap.L().Error("save artwork info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func DelArtwork(id int32) (err error) {
|
||||
if err = db.DB.Where("id = ?", id).Delete(&old.Artwork{}).Error; err != nil {
|
||||
zap.L().Error("delete artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_DELETE)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
func ApproveArtwork(req *artwork.ApproveArtworkRequest) (rep *artwork.ApproveArtworkRespond, err error) {
|
||||
|
||||
var artwork old.Artwork
|
||||
artwork.ID = req.ArtworkId
|
||||
var state int32
|
||||
if req.IsApprove {
|
||||
state = 5
|
||||
} else {
|
||||
state = 4
|
||||
}
|
||||
if err = db.DB.Model(&artwork).Updates(old.Artwork{State: state, Remark: req.Remark, Remark2: req.Remark2, ArtworkId: req.MgmtArtworkId}).Where("id", req.ArtworkId).Error; err != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
func GetArtworkList(req *artwork.GetArtworkListRequest) (rep *artwork.GetArtworkListRespond, err error) {
|
||||
rep = &artwork.GetArtworkListRespond{}
|
||||
var datas []*artwork.UpdateArtworkRequest
|
||||
fmt.Println("111")
|
||||
var artworkList []old.Artwork
|
||||
//找到用户 p[]
|
||||
if err = db.DB.Order("created_at desc").Where("artist_id = ?", req.ID).Find(&artworkList).Error; err != nil {
|
||||
fmt.Println("222")
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
fmt.Println("333")
|
||||
for k, v := range artworkList {
|
||||
artworkList[k].CreateTime = v.CreatedAt.Format("2006-01-02")
|
||||
var data artwork.UpdateArtworkRequest
|
||||
var createAddressByte []string
|
||||
json.Unmarshal([]byte(artworkList[k].CreateAddress), &createAddressByte)
|
||||
data.ID = uint64(artworkList[k].ID)
|
||||
// data.ArtistId = uint64(artworkList[k].ArtistId)
|
||||
data.Name = artworkList[k].Name
|
||||
data.ModelYear = artworkList[k].ModelYear
|
||||
data.Photo = artworkList[k].Photo
|
||||
data.ArtistPhoto = artworkList[k].ArtistPhoto
|
||||
data.Width = uint64(artworkList[k].Width)
|
||||
data.CreateAddress = createAddressByte
|
||||
data.Height = uint64(artworkList[k].Height)
|
||||
data.Ruler = uint64(artworkList[k].Ruler)
|
||||
data.Introduct = artworkList[k].Introduct
|
||||
data.AgeOfCreation = artworkList[k].AgeOfCreation
|
||||
data.CreateAt = artworkList[k].CreateTime
|
||||
data.NetworkTrace = artworkList[k].NetworkTrace
|
||||
data.Url = artworkList[k].Url
|
||||
data.State = uint64(artworkList[k].State)
|
||||
datas = append(datas, &data)
|
||||
}
|
||||
rep.Data = datas
|
||||
return
|
||||
}
|
||||
|
||||
func GetArtwork(id int32) (rep *artwork.GetArtworkRespond, err error) {
|
||||
rep = &artwork.GetArtworkRespond{}
|
||||
|
||||
var artworkRes old.Artwork
|
||||
if err = db.DB.Where("id = ?", id).First(&artworkRes).Error; err != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
|
||||
artworkRes.CreateTime = artworkRes.CreatedAt.Format("2006-01-02")
|
||||
//var createAddressByte []string
|
||||
//json.Unmarshal([]byte(artworkRes.CreateAddress), &createAddressByte)
|
||||
rep.ID = uint64(artworkRes.ID)
|
||||
// rep.ArtistId = uint64(artworkRes.ArtistId)
|
||||
rep.Name = artworkRes.Name
|
||||
rep.ModelYear = artworkRes.ModelYear
|
||||
rep.Photo = artworkRes.Photo
|
||||
rep.ArtistPhoto = artworkRes.ArtistPhoto
|
||||
rep.Width = uint64(artworkRes.Width)
|
||||
if artworkRes.CreateAddress == "" {
|
||||
artworkRes.CreateAddress = "[]"
|
||||
}
|
||||
rep.CreateAddress = artworkRes.CreateAddress
|
||||
rep.Height = uint64(artworkRes.Height)
|
||||
rep.Ruler = uint64(artworkRes.Ruler)
|
||||
rep.Introduct = artworkRes.Introduct
|
||||
rep.AgeOfCreation = artworkRes.AgeOfCreation
|
||||
rep.CreateAt = artworkRes.CreateTime
|
||||
rep.NetworkTrace = artworkRes.NetworkTrace
|
||||
rep.Url = artworkRes.Url
|
||||
rep.State = uint64(artworkRes.State)
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func UploadArtwork(Id uint64) (err error) {
|
||||
var artwork old.Artwork
|
||||
if err = db.DB.Find(&artwork, "id = ?", Id).Error; err != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
artwork.State = 1
|
||||
|
||||
if err = db.DB.Save(&artwork).Error; err != nil {
|
||||
zap.L().Error("save artwork info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetMgmtArtworkList(req *artwork.GetMgmtArtworkListRequest) (rep *artwork.GetMgmtArtworkListRespond, err error) {
|
||||
var datas []*artwork.UpdateArtworkRequest
|
||||
//id, err := GetUserId(req.ArtistId)
|
||||
//if err != nil {
|
||||
// zap.L().Error("get artwork info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return
|
||||
//}
|
||||
var args []interface{}
|
||||
var sqlWhere = " (state >=1 and state <=3) "
|
||||
if req.Name != "" {
|
||||
sqlWhere += ` and name like ? `
|
||||
args = append(args, "%"+req.Name+"%")
|
||||
}
|
||||
// if req.BatchId != 0 {
|
||||
// sqlWhere += `and c.batch_id = ? `
|
||||
// args = append(args, req.BatchId)
|
||||
// }
|
||||
if req.ArtistId != 0 {
|
||||
sqlWhere += ` artist_id = ? `
|
||||
args = append(args, req.ArtistId)
|
||||
}
|
||||
if req.State != 0 {
|
||||
sqlWhere += ` and state = ? `
|
||||
args = append(args, req.State)
|
||||
}
|
||||
//找到用户
|
||||
var artworkCount int64
|
||||
|
||||
if db.DB.Where(sqlWhere, args...).Count(&artworkCount).Error != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
rep.Count = uint64(artworkCount)
|
||||
var artworkList []old.Artwork
|
||||
//找到用户
|
||||
sqlWhere = sqlWhere + " limit ?,? "
|
||||
args = append(args, (req.Page-1)*req.PageSize)
|
||||
args = append(args, req.PageSize)
|
||||
if err = db.DB.Order("created_at desc").Where(sqlWhere, args...).Find(&artworkList).Error; err != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
}
|
||||
for k, v := range artworkList {
|
||||
artworkList[k].CreateTime = v.CreatedAt.Format("2006-01-02")
|
||||
var data artwork.UpdateArtworkRequest
|
||||
var createAddressByte []string
|
||||
json.Unmarshal([]byte(artworkList[k].CreateAddress), &createAddressByte)
|
||||
data.Name = artworkList[k].Name
|
||||
data.ModelYear = artworkList[k].ModelYear
|
||||
data.Photo = artworkList[k].Photo
|
||||
data.ArtistPhoto = artworkList[k].ArtistPhoto
|
||||
data.CreateAt = artworkList[k].CreateTime
|
||||
data.NetworkTrace = artworkList[k].NetworkTrace
|
||||
data.Url = artworkList[k].Url
|
||||
data.State = uint64(artworkList[k].State)
|
||||
datas = append(datas, &data)
|
||||
}
|
||||
rep.Data = datas
|
||||
return
|
||||
}
|
||||
|
||||
func GetUserId(artistId string) (int64, error) {
|
||||
var user model.User
|
||||
if err := db.DB.First(&user, "id = ?", artistId).Error; err != nil {
|
||||
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return 0, err
|
||||
}
|
||||
return user.ID, nil
|
||||
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
// Package logic -----------------------------
|
||||
// @file : artwork.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/2/25 0:12
|
||||
// -------------------------------------------
|
||||
package logic
|
||||
|
||||
import (
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/old/dao"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/old/artwork"
|
||||
)
|
||||
|
||||
type IArtWork interface {
|
||||
ArtworkAdd(req *artwork.ArtworkAddRequest) (rep *artwork.ArtworkAddRespond, err error)
|
||||
UpdateArtwork(req *artwork.UpdateArtworkRequest) (rep *artwork.UpdateArtworkRespond, err error)
|
||||
DelArtwork(req *artwork.DelArtworkRequest) (rep *artwork.DelArtworkRespond, err error)
|
||||
GetArtworkList(req *artwork.GetArtworkListRequest) (rep *artwork.GetArtworkListRespond, err error)
|
||||
GetArtwork(req *artwork.GetArtworkRequest) (rep *artwork.GetArtworkRespond, err error)
|
||||
UploadArtwork(req *artwork.UploadArtworkRequest) (rep *artwork.UploadArtworkRespond, err error)
|
||||
}
|
||||
|
||||
func NewArtWork() IArtWork {
|
||||
return &Artwork{}
|
||||
}
|
||||
|
||||
type Artwork struct {
|
||||
}
|
||||
|
||||
func (a *Artwork) ArtworkAdd(req *artwork.ArtworkAddRequest) (rep *artwork.ArtworkAddRespond, err error) {
|
||||
rep = &artwork.ArtworkAddRespond{}
|
||||
_, err = dao.ArtworkAdd(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Artwork) UpdateArtwork(req *artwork.UpdateArtworkRequest) (rep *artwork.UpdateArtworkRespond, err error) {
|
||||
err = dao.UpdateArtwork(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Artwork) DelArtwork(req *artwork.DelArtworkRequest) (rep *artwork.DelArtworkRespond, err error) {
|
||||
rep = &artwork.DelArtworkRespond{}
|
||||
|
||||
if err = dao.DelArtwork(int32(req.Id)); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Artwork) GetArtworkList(req *artwork.GetArtworkListRequest) (rep *artwork.GetArtworkListRespond, err error) {
|
||||
rep, err = dao.GetArtworkList(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Artwork) GetArtwork(req *artwork.GetArtworkRequest) (rep *artwork.GetArtworkRespond, err error) {
|
||||
rep, err = dao.GetArtwork(int32(req.ID))
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Artwork) UploadArtwork(req *artwork.UploadArtworkRequest) (rep *artwork.UploadArtworkRespond, err error) {
|
||||
|
||||
err = dao.UploadArtwork(req.ID)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Artwork) ApproveArtwork(req *artwork.ApproveArtworkRequest) (rep *artwork.ApproveArtworkRespond, err error) {
|
||||
|
||||
rep, err = dao.ApproveArtwork(req)
|
||||
return
|
||||
}
|
4
cmd/logs/artist_server.log
Normal file
4
cmd/logs/artist_server.log
Normal file
@ -0,0 +1,4 @@
|
||||
{"level":"\u001b[34mINFO\u001b[0m","time":"2022-12-02T11:22:57.799+0800","caller":"config/root_config.go:150","message":"[Config Center] Config center doesn't start"}
|
||||
{"level":"\u001b[34mINFO\u001b[0m","time":"2022-12-02T11:24:08.395+0800","caller":"config/root_config.go:150","message":"[Config Center] Config center doesn't start"}
|
||||
{"level":"\u001b[34mINFO\u001b[0m","time":"2022-12-02T11:39:34.056+0800","caller":"config/root_config.go:150","message":"[Config Center] Config center doesn't start"}
|
||||
{"level":"\u001b[34mINFO\u001b[0m","time":"2022-12-02T11:48:17.606+0800","caller":"config/root_config.go:150","message":"[Config Center] Config center doesn't start"}
|
@ -1,5 +0,0 @@
|
||||
package model
|
||||
|
||||
type OperationRecord struct {
|
||||
Model
|
||||
}
|
19
cmd/model/artistinfo.go
Normal file
19
cmd/model/artistinfo.go
Normal file
@ -0,0 +1,19 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// User 用户模型
|
||||
type ArtistInfo struct {
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null" json:"id"`
|
||||
UserId int32 `gorm:"not null default:0" json:"userId"`
|
||||
ArtistId string `gorm:"type:varchar(256) default ''"`
|
||||
BankAccount string `gorm:"type:varchar(25) not null" json:"bankAccount"`
|
||||
BankName string `gorm:"type:varchar(25) not null" json:"bankName"`
|
||||
Introduct string `gorm:"type:varchar(2048) not null" json:"introduct"`
|
||||
CountryArtLevel string `gorm:"type:varchar(256) default ''"`
|
||||
ArtistCertPic string `gorm:"type:varchar(256) default ''"`
|
||||
State int32 `gorm:"not null default:0" json:"state"`
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
// Package model -----------------------------
|
||||
// @file : artshow_artistIndex.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/2 23:11
|
||||
// -------------------------------------------
|
||||
package model
|
||||
|
||||
// 画家指数
|
||||
type ArtshowArtistIndex struct {
|
||||
Model
|
||||
ArtistUid string `gorm:"column:artist_uid;comment:画家uid" json:"artistUid"`
|
||||
Title string `gorm:"column:title;comment:" json:"title"` //艺术家-展览(exhibition) 、 艺术家-资历(seniority) 、艺术家-专业(specialized) 、艺术家-影响力(Influence)、艺术家-收藏(collect)
|
||||
Class string `gorm:"column:class;comment:指数类别" json:"class"` //exhibition 、seniority 、specialized 、Influence 、collect
|
||||
TitleScore float32 `gorm:"column:title_score;comment:总分" json:"titleScore"`
|
||||
Score string `gorm:"column:score;comment:前端定义的分数列表" json:"score"` //
|
||||
Types string `gorm:"column:types;comment:" json:"types"`
|
||||
Status int64 `json:"status" gorm:"column:status;default:2;comment:2=锁定 3=解锁"` //跟随用户的锁定和解锁状态,用于控制数据的展示
|
||||
LockTime string `json:"lockTime" gorm:"column:lock_time;comment:锁定时间"`
|
||||
AuditStatus AuditStatus `json:"auditStatus" gorm:"column:audit_status;default:5;comment:审核状态:2= 待审核,3= 审核失败,4= 审核通过,5= 待补充"`
|
||||
AuditMark1 string `json:"auditMark1" gorm:"column:audit_mark1;comment:审核备注1"`
|
||||
AuditMark2 string `json:"auditMark2" gorm:"column:audit_mark2;comment:审核备注2"`
|
||||
}
|
||||
|
||||
func (a ArtshowArtistIndex) TableName() string {
|
||||
return "artshow_artist_index"
|
||||
}
|
||||
func (a *ArtshowArtistIndex) Editable() bool {
|
||||
if a.Status == 1 {
|
||||
return true
|
||||
}
|
||||
if a.Status == 2 && (a.AuditStatus == AuditType_Failed || a.AuditStatus == AuditType_Pending || a.AuditStatus == AuditType_Supplemented) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
// Package model -----------------------------
|
||||
// @file : artshow.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/2 9:32
|
||||
// -------------------------------------------
|
||||
package model
|
||||
|
||||
type ArtshowArtistSupplement struct {
|
||||
Model
|
||||
//通过这两个字段弱关联 artwork_lock_record表中对应的画作
|
||||
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:"`
|
||||
Status int64 `json:"status" gorm:"column:status;default:2;comment:2=锁定 3=解锁"` //跟随用户的锁定和解锁状态,用于控制数据的展示
|
||||
LockTime string `json:"lockTime" gorm:"column:lock_time;comment:"`
|
||||
|
||||
//审批字段
|
||||
AuditStatus AuditStatus `json:"auditStatus" gorm:"column:audit_status;comment:审核状态:2= 待审核,3= 审核失败,4= 审核通过,5= 待补充"`
|
||||
AuditMark1 string `json:"auditMark1" gorm:"column:audit_mark1;comment:审核备注1"`
|
||||
AuditMark2 string `json:"auditMark2" gorm:"column:audit_mark2;comment:审核备注2"`
|
||||
|
||||
ArtistName string `json:"artistName" gorm:"column:artist_name;comment:"`
|
||||
ArtistProfile string `json:"artistProfile" gorm:"column:artist_profile;type:text;comment:个人简介"`
|
||||
CountryArtLevel int64 `json:"countryArtLevel" gorm:"column:country_art_level;default:1;comment:国家美术师级别: 1=无 2=1级 3=2级"`
|
||||
ArtistCertPic string `json:"artistCertPic" gorm:"column:artist_cert_pic;comment:国家美术师证书"`
|
||||
BankNum string `json:"bank_num" gorm:"column:bank_num;comment:开户行"`
|
||||
BankName string `json:"bank_name" gorm:"column:bank_name;comment:银行卡账号"`
|
||||
}
|
||||
|
||||
func (a ArtshowArtistSupplement) TableName() string {
|
||||
return "artshow_artist_supplement"
|
||||
}
|
||||
func (a *ArtshowArtistSupplement) Editable() bool {
|
||||
if a.Status == 1 {
|
||||
return true
|
||||
}
|
||||
if a.Status == 2 && (a.AuditStatus == AuditType_Failed || a.AuditStatus == AuditType_Pending || a.AuditStatus == AuditType_Supplemented) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
// Package model -----------------------------
|
||||
// @file : artshow.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/2 9:32
|
||||
// -------------------------------------------
|
||||
package model
|
||||
|
||||
type ArtshowVideoRecord struct {
|
||||
Model
|
||||
//通过这两个字段弱关联 artwork_lock_record表中对应的画作
|
||||
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:"`
|
||||
Status int64 `json:"status" gorm:"column:status;default:2;comment:2=锁定 3=解锁"` //跟随用户的锁定和解锁状态,用于控制数据的展示
|
||||
LockTime string `json:"lockTime" gorm:"column:lock_time;comment:"`
|
||||
|
||||
//AccountId int64 `json:"accountId" gorm:"column:account_id;comment:"`
|
||||
ArtistName string `json:"artistName" gorm:"column:artist_name;comment:"`
|
||||
VideoUrl string `json:"videoUrl" gorm:"column:video_url;type:varchar(2000);comment:"`
|
||||
|
||||
//审批字段
|
||||
AuditStatus AuditStatus `json:"auditStatus" gorm:"column:audit_status;comment:审核状态:2= 待审核,3= 审核失败,4= 审核通过,5= 待补充"`
|
||||
AuditMark1 string `json:"auditMark1" gorm:"column:audit_mark1;comment:审核备注1"`
|
||||
AuditMark2 string `json:"auditMark2" gorm:"column:audit_mark2;comment:审核备注2"`
|
||||
}
|
||||
|
||||
func (a ArtshowVideoRecord) TableName() string {
|
||||
return "artshow_video_record"
|
||||
}
|
||||
func (a *ArtshowVideoRecord) Editable() bool {
|
||||
if a.Status == 1 {
|
||||
return true
|
||||
}
|
||||
if a.Status == 2 && (a.AuditStatus == AuditType_Failed || a.AuditStatus == AuditType_Pending || a.AuditStatus == AuditType_Supplemented) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
31
cmd/model/artwork.go
Normal file
31
cmd/model/artwork.go
Normal file
@ -0,0 +1,31 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// User 用户模型
|
||||
type Artwork struct {
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null" json:"id"`
|
||||
ArtistId int32 `gorm:"not null" json:"artistId"`
|
||||
Name string `gorm:"type:varchar(256) not null" json:"name"`
|
||||
ArtworkId string `gorm:"type:varchar(256) default ''" json:"artworkId"`
|
||||
ModelYear string `gorm:"type:varchar(256) not null" json:"modelYear"`
|
||||
Photo string `gorm:"type:varchar(1024) not null" json:"photo"`
|
||||
BatchId int32 `gorm:"not null" json:"batchId"`
|
||||
ArtistPhoto string `gorm:"type:varchar(1024) not null" json:"artistPhoto"`
|
||||
CreateAddress string `gorm:"type:varchar(256) not null" json:"createAddress"`
|
||||
Width int32 `gorm:"not null" json:"width"`
|
||||
Height int32 `gorm:"not null" json:"height"`
|
||||
Ruler int32 `gorm:"not null" json:"ruler"`
|
||||
AgeOfCreation string `gorm:"type:varchar(56) default ''" json:"ageOfCreation"`
|
||||
CreateTime string `gorm:"type:varchar(20) not null" json:"createTime"`
|
||||
Introduct string `gorm:"type:varchar(2048) not null" json:"introduct"`
|
||||
NetworkTrace bool `gorm:"not null" json:"networkTrace"`
|
||||
FlowState int32 `gorm:"default 0"`
|
||||
Url string `gorm:"type:varchar(512) not null" json:"url"`
|
||||
Remark string `gorm:"type:varchar(256) default ''" json:"remark"`
|
||||
Remark2 string `gorm:"type:varchar(256) default ''" json:"remark2"`
|
||||
State int32 `gorm:"not null" json:"state"` //1未上传2已上传3已通过4未通过
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
// Package model -----------------------------
|
||||
// @file : artworkEx.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/2/28 8:58
|
||||
// -------------------------------------------
|
||||
package model
|
||||
|
||||
import "fmt"
|
||||
|
||||
// 画展补充信息审批表
|
||||
//type ArtExhibitionAudit struct {
|
||||
// Model
|
||||
// //ArtworkUid string `json:"artworkUid" gorm:"column:artwork_uid;comment:画作uid"`
|
||||
// //ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:画家uid"`
|
||||
// //UserId int64 `json:"userId" gorm:"column:user_id;comment:画家宝用户id"`
|
||||
// LockTime string `json:"lockTime" gorm:"column:lock_time;comment:锁定时间"`
|
||||
// AuditType auditType `json:"auditType" gorm:"column:audit_type;comment:审批类型"`
|
||||
// AuditModel
|
||||
//}
|
||||
//
|
||||
//func (a ArtExhibitionAudit) TableName() string {
|
||||
// return "art_exhibition_audit"
|
||||
//}
|
||||
|
||||
//// 画作信息补充审批
|
||||
//type AuditArtworkExt struct {
|
||||
// AuditInfo ArtExhibitionAudit `json:"AuditInfo" gorm:"polymorphic:Owner;polymorphicValue:AuditType_ArtworkExt"`
|
||||
//}
|
||||
//
|
||||
//// 画家视频资料补充审批
|
||||
//type AuditArtistVideo struct {
|
||||
// ArtworkId
|
||||
// AuditInfo ArtExhibitionAudit `json:"AuditInfo" gorm:"polymorphic:Owner;polymorphicValue:AuditType_ArtistVideo"`
|
||||
//}
|
||||
//
|
||||
//// 画家信息补充审批
|
||||
//type AuditArtistExt struct {
|
||||
// AuditInfo ArtExhibitionAudit `json:"AuditInfo" gorm:"polymorphic:Owner;polymorphicValue:AuditType_ArtistExt"`
|
||||
//}
|
||||
//
|
||||
//// 画家指数补充审批
|
||||
//type AuditArtistIndex struct {
|
||||
// AuditInfo ArtExhibitionAudit `json:"AuditInfo" gorm:"polymorphic:Owner;polymorphicValue:AuditType_ArtistIndex"`
|
||||
//}
|
||||
|
||||
// ======================================
|
||||
// auditType 审批类型
|
||||
type auditType int
|
||||
|
||||
const (
|
||||
AuditType_ArtworkExt auditType = iota + 1
|
||||
AuditType_ArtistVideo
|
||||
AuditType_ArtistIndex
|
||||
AuditType_ArtistExt
|
||||
)
|
||||
|
||||
var auditTypeMapper = map[auditType]string{
|
||||
AuditType_ArtworkExt: "画作信息补充审批",
|
||||
AuditType_ArtistVideo: "画家视频资料补充审批",
|
||||
AuditType_ArtistIndex: "画家指数补充审批",
|
||||
AuditType_ArtistExt: "画家信息补充审批",
|
||||
}
|
||||
|
||||
func (a auditType) String() string {
|
||||
if str, ok := auditTypeMapper[a]; ok {
|
||||
return str
|
||||
} else {
|
||||
return fmt.Sprintf("未知的审批类型:%d", int(a))
|
||||
}
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
package model
|
||||
|
||||
type AuditStatus int64
|
||||
|
||||
const (
|
||||
AuditType_preSave AuditStatus = 1 //1= 暂存
|
||||
AuditType_Pending AuditStatus = 2 //2= 待审核
|
||||
AuditType_Failed AuditStatus = 3 //3= 审核失败
|
||||
AuditType_Pass AuditStatus = 4 //4= 审核通过
|
||||
AuditType_Supplemented AuditStatus = 5 //5= 待补充
|
||||
)
|
||||
|
||||
var auditStatusMaper = map[AuditStatus]string{
|
||||
AuditType_preSave: "暂存",
|
||||
AuditType_Pending: "待审核",
|
||||
AuditType_Failed: "审核失败",
|
||||
AuditType_Pass: "审核通过",
|
||||
AuditType_Supplemented: "待补充",
|
||||
}
|
||||
|
||||
func (a AuditStatus) String() string {
|
||||
if a == 0 {
|
||||
return "无"
|
||||
}
|
||||
str, ok := auditStatusMaper[a]
|
||||
if !ok {
|
||||
return "未知"
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
// 此表作为画家宝中的画作中间表的主表(画作主要数据保存在画作微服务中),请悉知
|
||||
type ArtworkLockRecord struct {
|
||||
Model
|
||||
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;type:varchar(191);comment:画家uid"`
|
||||
ArtworkUid string `json:"artworkUid" gorm:"column:artwork_uid;type:varchar(191);comment:画作uid"`
|
||||
Status int64 `json:"status" gorm:"column:status;default:1;comment:1=准备/暂存 2=锁定 3=解锁"` //这个锁的目的是配合下面的LockTime 对画作进行历史记录查询时的分组
|
||||
LockTime string `json:"lockTime" gorm:"column:lock_time;comment:锁定时间"`
|
||||
|
||||
//用户锁定后(Status=2)才能进入流程.
|
||||
AuditFlowIndex int64 `json:"auditFlowIndex" gorm:"column:audit_flow_index;default:1;comment:当前的审批流程 1:无 2:基本信息审核 3补充信息审核"`
|
||||
// 画作基本信息审批
|
||||
// -- 画作上传,审核状态为[暂存1] -- 后台锁定用户,所有Status为1的画作设置为[锁定2],并生成锁定时间 ,审核状态为 [待审核3] -- 后台审批不通过,审核状态改为[不通过3] -- 用户修改画作后,状态再次改为[待审核2]直至审批通过
|
||||
BaseAuditStatus AuditStatus `json:"baseAuditStatus" gorm:"column:base_audit_status;default:1;comment:画作基本信息审核状态 1:暂存 2:待审核 3:审核不通过 4:审核通过"`
|
||||
BaseAuditMark string `json:"baseAuditMark" gorm:"column:base_audit_mark;comment:画作基本信息审核审核备注1"`
|
||||
BaseAuditMark2 string `json:"baseAuditMark2" gorm:"column:base_audit_mark2;comment:画作基本信息审核审核备注2"`
|
||||
// ↓
|
||||
// 画作基本信息审批通过后,后台点击[生成补充信息按钮] AuditFlowIndex字段变为3 , 进入画作补充信息审批
|
||||
// ↓
|
||||
//画作补充信息审批记录
|
||||
// 后台点击[生成补充信息按钮],审核状态为[待补充5]-- 用户更新补充信息,状态改为[待审核2] -- 后台审批不通过,审核状态改为[不通过3] -- 用户修改画作后,状态再次改为[待审核2]直至审批通过
|
||||
SupplementAuditStatus AuditStatus `json:"supplementAuditStatus" gorm:"column:supplement_audit_status;default:0;comment:补充信息审核状态 0无 5待补充 2.待审核 3:审核不通过 4:审核通过"` // 注意没有暂存状态
|
||||
SupplementAuditMark string `json:"supplementAuditMark" gorm:"column:supplement_audit_mark;comment:补充信息审核备注1"`
|
||||
SupplementAuditMark2 string `json:"supplementAuditMark2" gorm:"column:supplement_audit_mark2;comment:补充信息审核备注2"`
|
||||
//UserInfo User `gorm:"foreignKey:ArtistUid;reference:MgmtArtistUid"`
|
||||
|
||||
//画作新增字段(此类字段只在画家宝中展示)
|
||||
NationalExhibition int `json:"nationalExhibition" gorm:"column:national_exhibition;default:1;comment:是否入选国家画展 1=无(默认) 2=入围 3=入选 4=入围+入选"`
|
||||
}
|
||||
|
||||
func (a *ArtworkLockRecord) TableName() string {
|
||||
return "artwork_lock_record"
|
||||
}
|
||||
|
||||
//func (a *ArtworkLockRecord) BeforeUpdate(tx *gorm.DB) (err error) {
|
||||
// var thisData ArtworkLockRecord
|
||||
// tx.Where("artwork_uid = ?", a.ArtworkUid).First(&thisData)
|
||||
// //如果是审核状态不通过的情况下更新画作信息,则自动变为待审核
|
||||
// if thisData.BaseAuditStatus == 3 && a.BaseAuditStatus == 0 && a.SupplementAuditStatus == 0 {
|
||||
// a.BaseAuditStatus = 2
|
||||
// }
|
||||
// if thisData.SupplementAuditStatus == 3 && a.BaseAuditStatus == 0 && a.SupplementAuditStatus == 0 {
|
||||
// a.SupplementAuditStatus = 2
|
||||
// }
|
||||
// return
|
||||
//}
|
||||
|
||||
// 基本信息是否可编辑
|
||||
func (a *ArtworkLockRecord) BaseEditable() bool {
|
||||
if a.Status == 1 {
|
||||
return true
|
||||
}
|
||||
if a.Status == 2 && (a.BaseAuditStatus == AuditType_Failed || a.BaseAuditStatus == AuditType_Pending || a.BaseAuditStatus == AuditType_Supplemented) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 补充信息是否可编辑
|
||||
func (a *ArtworkLockRecord) SupplementEditable() bool {
|
||||
//&& a.BaseAuditStatus == AuditType_Pass todo 是否要流程通过基本信息
|
||||
if a.Status == 2 && (a.SupplementAuditStatus == AuditType_Supplemented || a.SupplementAuditStatus == AuditType_Failed || a.SupplementAuditStatus == AuditType_Pending) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
package old
|
||||
package model
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// User 用户模型
|
||||
//User 用户模型
|
||||
type ArtworkBatch struct {
|
||||
model.Model
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
BatchId int32 `gorm:"not null"`
|
||||
ArtistId int32 `gorm:"not null"`
|
14
cmd/model/artworkstate.go
Normal file
14
cmd/model/artworkstate.go
Normal file
@ -0,0 +1,14 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
//考核 用户模型
|
||||
type ArtworkState struct {
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
ArtworkId int32 `gorm:"default:0"`
|
||||
State int32 `gorm:"default:0"`
|
||||
Pic string `gorm:"type:varchar(256) default ''"`
|
||||
}
|
15
cmd/model/bank.go
Normal file
15
cmd/model/bank.go
Normal file
@ -0,0 +1,15 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
//User 用户模型
|
||||
type Bank struct {
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
UserId int32 `gorm:" not null"`
|
||||
BankAccount string `gorm:"type:varchar(25) not null"`
|
||||
BankName string `gorm:"type:varchar(25) not null"`
|
||||
Enable bool `gorm:"not null"`
|
||||
}
|
@ -1,33 +1,23 @@
|
||||
package model
|
||||
|
||||
import "gorm.io/plugin/soft_delete"
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// Contract 用户模型
|
||||
type Contract struct {
|
||||
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Uid string `gorm:"column:uid;type:varchar(100);comment:合同表的唯一表示;NOT NULL" json:"uid"`
|
||||
ArtistUid string `gorm:"column:artist_uid;type:varchar(100);comment:画家uid;NOT NULL" json:"artist_uid"`
|
||||
ArtworkUid string `gorm:"column:artwork_uid;type:varchar(1000);comment:画作uid" json:"artwork_uid"`
|
||||
ContractId string `gorm:"column:contract_id;type:varchar(300);comment:合同id" json:"contract_id"`
|
||||
TransactionId string `gorm:"column:transaction_id;type:varchar(300);comment:交易id" json:"transaction_id"`
|
||||
Type int32 `gorm:"column:type;type:int(1);comment:合同类型 (1);NOT NULL" json:"type"`
|
||||
ViewUrl string `gorm:"column:view_url;type:varchar(500);comment:在线查看合同链接" json:"view_url"`
|
||||
DownloadUrl string `gorm:"column:download_url;type:varchar(500);comment:合同下载链接" json:"download_url"`
|
||||
State int32 `gorm:"column:state;type:int(1);comment:合同状态,1:未签署2:已签署;NOT NULL" json:"state"` //1 未签署 2 已签署
|
||||
Status int32 `gorm:"column:status;default:2;comment:2=锁定 3=解锁" json:"status" ` //跟随用户的锁定和解锁状态,用于控制数据的展示
|
||||
LockTime string `gorm:"column:lock_time;comment:锁定时间" json:"lockTime"`
|
||||
SignTime string `gorm:"column:sign_time;comment:签署时间" json:"sign_time"`
|
||||
BatchTime string `gorm:"column:batch_time;comment:批次时间" json:"batch_time"`
|
||||
BatchUid string `gorm:"column:batch_uid;comment:批次ID" json:"batch_uid"`
|
||||
StType int32 `gorm:"column:st_type;unqiueIndex:sttype_uid_batchtime_idx;comment:对账单类型 1=版权 2=物权;"`
|
||||
ArtworkTx *ArtworkTx `gorm:"foreignKey:BatchUid;references:Uid"` //当前批次的物权委托单
|
||||
ArtworkCopy *ArtworkCopy `gorm:"foreignKey:BatchUid;references:Uid"` //当前批次的版权委托单
|
||||
ArtworkTxDetail []ArtworkTxDetail `gorm:"foreignKey:BatchUid;references:BatchUid"` //当前批次的物权委托单详情
|
||||
ArtworkSoldTxDetail []ArtworkSoldTxDetail `gorm:"foreignKey:BatchUid;references:BatchUid"` //当前批次的已被售卖物权委托单详情
|
||||
ArtworkCopyDetail []ArtworkCopyDetail `gorm:"foreignKey:BatchUid;references:BatchUid"` //当前批次的版权委托单详情
|
||||
ArtworkSoldCopyDetail []ArtworkSoldCopyDetail `gorm:"foreignKey:BatchUid;references:BatchUid"` //当前批次的已被售卖版权委托单详情
|
||||
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
||||
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
||||
DeletedAt soft_delete.DeletedAt
|
||||
OldMgmtDataId int32 `gorm:"column:old_mgmt_data_id"` //老画家宝中的id
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
UserId int `gorm:"not null"`
|
||||
CardId string `gorm:"type:varchar(256) default ''"`
|
||||
MgmtUserId string `gorm:"not null"`
|
||||
ArtworkId string `gorm:"type:varchar(256) default ''"`
|
||||
ContractId string `gorm:"type:varchar(256) default ''"`
|
||||
TransactionId string `gorm:"type:varchar(256) default '' "`
|
||||
Type int `gorm:"not null"`
|
||||
BatchId int `gorm:"not null"`
|
||||
BatchName string `gorm:"type:varchar(256) default '' "`
|
||||
ViewUrl string `gorm:"type:varchar(256) default ''"`
|
||||
DownloadUrl string `gorm:"type:varchar(256) default ''"`
|
||||
State int `gorm:"not null"`
|
||||
}
|
||||
|
19
cmd/model/exhexam.go
Normal file
19
cmd/model/exhexam.go
Normal file
@ -0,0 +1,19 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
//考核 用户模型
|
||||
type ExhExam struct {
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
UserId int32 `gorm:"default:0"`
|
||||
Title string `gorm:"type:varchar(64) default ''"`
|
||||
Class string `gorm:"type:varchar(25) default ''"`
|
||||
TitleScore int32 `gorm:"default:0"`
|
||||
Score string `gorm:"type:varchar(1024) default ''"`
|
||||
Types string `gorm:"type:varchar(25) default ''"`
|
||||
Remarks string `gorm:"type:varchar(1024) default ''"`
|
||||
Enable bool `gorm:"default:0"`
|
||||
}
|
16
cmd/model/exhvideo.go
Normal file
16
cmd/model/exhvideo.go
Normal file
@ -0,0 +1,16 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// User 用户模型
|
||||
type ExhVideo struct {
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null "`
|
||||
UserId int32 `gorm:"not null default:0"`
|
||||
Url string `gorm:"type:varchar(256) default ''"`
|
||||
Types string `gorm:"type:varchar(25) default ''"`
|
||||
Remarks string `gorm:"type:varchar(1024) default ''"`
|
||||
Enable bool `gorm:"default:false"`
|
||||
}
|
@ -1,17 +1,15 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// User 用户模型
|
||||
type Invite struct {
|
||||
Model
|
||||
UserId int32 `gorm:"column:user_id;comment:邀请人账号id"`
|
||||
UserInfo *User `gorm:"foreignKey:id;reference:UserId"`
|
||||
InvitedId int32 `gorm:"column:invited_id;default:0;comment:受邀请画家宝用户id"`
|
||||
InviteCode string `gorm:"column:invite_code;type:varchar(191);comment:邀请人的邀请码"`
|
||||
InvitedCode string `gorm:"column:invited_code;type:varchar(191);comment:受邀请人的邀请码"`
|
||||
}
|
||||
|
||||
func (i Invite) TableName() string {
|
||||
return "invite"
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null default 0"`
|
||||
UserId int32 `gorm:"not null default 0"`
|
||||
InvitedId int32 `gorm:"not null default 0"`
|
||||
}
|
||||
|
||||
type InvitedCodeService struct {
|
||||
|
@ -1,19 +0,0 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Model struct {
|
||||
ID int64 `gorm:"primarykey;" json:"id" form:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at" json:"updatedAt"`
|
||||
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:bigint" json:"deletedAt"`
|
||||
}
|
||||
|
||||
type AuditModel struct {
|
||||
AuditStatus int64 `json:"auditStatus" gorm:"column:audit_status;default:1;comment:审核状态 1:待审核/暂存 2:审核通过 3:审核不通过"`
|
||||
AuditMark string `json:"auditMark" gorm:"column:audit_mark;comment:审核备注"`
|
||||
AuditMark2 string `json:"auditMark2" gorm:"column:audit_mark2;comment:审核备注2"`
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// User 用户模型
|
||||
type ArtistInfo struct {
|
||||
model.Model
|
||||
UserId uint `gorm:"not null default:0" json:"userId"`
|
||||
ArtistId string `gorm:"type:varchar(256) default ''" json:"artistId"`
|
||||
BankAccount string `gorm:"type:varchar(25) not null" json:"bankAccount"`
|
||||
BankName string `gorm:"type:varchar(25) not null" json:"bankName"`
|
||||
Introduct string `gorm:"type:text not null" json:"introduct"`
|
||||
CountryArtLevel string `gorm:"type:varchar(256) default ''" json:"countryArtLevel"`
|
||||
ArtistCertPic string `gorm:"type:varchar(256) default ''" json:"artistCertPic"`
|
||||
Remark string `gorm:"type:varchar(256) default ''" json:"remark"`
|
||||
Remark2 string `gorm:"type:varchar(256) default ''" json:"remark2"`
|
||||
State uint `gorm:"not null default:0" json:"state"`
|
||||
}
|
||||
|
||||
func (a ArtistInfo) TableName() string {
|
||||
return "sys_artist_info"
|
||||
}
|
@ -1,153 +0,0 @@
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// User 用户模型
|
||||
type Artwork struct {
|
||||
model.Model
|
||||
ID int32 `gorm:"not null" json:"id"`
|
||||
ArtistId uint64 `gorm:"not null" json:"artistId"`
|
||||
Name string `gorm:"type:varchar(256) not null" json:"name"`
|
||||
ArtworkId string `gorm:"type:varchar(256) default ''" json:"artworkId"`
|
||||
ModelYear string `gorm:"type:varchar(256) not null" json:"modelYear"`
|
||||
Photo string `gorm:"type:varchar(1024) not null" json:"photo"`
|
||||
BatchId int32 `gorm:"not null" json:"batchId"`
|
||||
ArtistPhoto string `gorm:"type:varchar(1024) not null" json:"artistPhoto"`
|
||||
CreateAddress string `gorm:"type:varchar(256) not null" json:"createAddress"`
|
||||
Width int32 `gorm:"not null" json:"width"`
|
||||
Height int32 `gorm:"not null" json:"height"`
|
||||
Ruler int32 `gorm:"not null" json:"ruler"`
|
||||
AgeOfCreation string `gorm:"type:varchar(56) default ''" json:"ageOfCreation"`
|
||||
CreateTime string `gorm:"type:varchar(20) not null" json:"createTime"`
|
||||
Introduct string `gorm:"type:varchar(2048) not null" json:"introduct"`
|
||||
NetworkTrace bool `gorm:"not null" json:"networkTrace"`
|
||||
FlowState int32 `gorm:"default 0"`
|
||||
Url string `gorm:"type:varchar(512) not null" json:"url"`
|
||||
Remark string `gorm:"type:varchar(256) default ''" json:"remark"`
|
||||
Remark2 string `gorm:"type:varchar(256) default ''" json:"remark2"`
|
||||
State int32 `gorm:"not null" json:"state"` //1未上传2已上传3已通过4未通过
|
||||
}
|
||||
|
||||
type ArtworkStateService struct {
|
||||
ID int32 `form:"id" json:"id"`
|
||||
ArtworkId int32 `form:"artworkId" json:"artworkId"`
|
||||
State int32 `form:"state" json:"state"`
|
||||
Pic string `form:"pic" json:"pic"`
|
||||
}
|
||||
|
||||
type ArtworkStateData struct {
|
||||
State int32 `json:"state"`
|
||||
Timestamp string `json:"timestamp"`
|
||||
Pic string `json:"pic"`
|
||||
}
|
||||
|
||||
// 画作
|
||||
type ArtworkList struct {
|
||||
Uid string `json:"uid"` //画作唯一标志
|
||||
Seqnum string `json:"seqnum2"`
|
||||
TFnum string `json:"tfnum"` // 泰丰编号
|
||||
Num int64 `json:"seqnum"` // 画作序号,从1开始自增,以批次为单位
|
||||
ArtistId string `json:"artistId"` //画家id
|
||||
ArtistName string `json:"artistName"` //画家名
|
||||
BatchId string `json:"batchId"` //批次id
|
||||
BatchNum int64 `json:"batchNum"` //批次号
|
||||
BatchType int64 `json:"batchType"` //批次类型
|
||||
OutBatchId string `json:"outBatchId"` // 出库批次id
|
||||
IsOutbound int64 `json:"isOutbound"` // 是否出库,1-已出库,2-未出库
|
||||
//泰丰,丰链公共字段
|
||||
Name string `json:"name"` //画作名称
|
||||
CopyrightName string `json:"copyrightName"`
|
||||
Belong int64 `json:"belong"` //画作隶属,1-泰丰,2-丰链
|
||||
ArtistPhoto string `json:"artistPhoto"` //画家与画作合影
|
||||
SmallPic string `json:"smallPic"` //画作小图
|
||||
SmallPicArtist string `json:"smallPicArtist"` //画作小图画家提供
|
||||
PhotoPic string `json:"photoPic"` //手机拍摄图(信息登记人员内部拍摄)
|
||||
IsSign int64 `json:"isSign"` //是否有落款,1-有,2-无
|
||||
IsSeal int64 `json:"isSeal"` //是否有人名章,1-有,2-无
|
||||
Quality int64 `json:"quality"` //画作品相,1-完好,2-有破损,3-其他
|
||||
IncompletePic string `json:"incompletePic"` // 残缺图片url
|
||||
CopyrightPic string `json:"copyrightPic"` // 版权图
|
||||
Length int64 `json:"length"` //画作长度,厘米
|
||||
Width int64 `json:"width"` //画作宽度,厘米
|
||||
Ruler int64 `json:"ruler"` //画作平尺数
|
||||
ModelYear string `json:"modelYear"` //年款
|
||||
NetworkTrace *NetworkTrace `json:"networkTrace"` //网络痕迹
|
||||
ArtworkState int64 `json:"artworkState"` //实体画作状态,1-丰链,2-托裱,3-泰丰,4-其他
|
||||
PhotoState *PhotoState `json:"photoState"` //拍摄情况
|
||||
ArtworkPic string `json:"artworkPic"` //图片上传
|
||||
Hash *Hash `json:"hash"` //哈希值登记
|
||||
Copyright *Copyright `json:"copyright"` //版权登记
|
||||
IsExcellentArtwork int64 `json:"isExcellent"` //是否优秀画作,1-是,2-否(优秀画作将留在丰链)
|
||||
ScreenNum int64 `json:"screenNum"` //条屏数量
|
||||
Abstract string `json:"abstract"` // 简介
|
||||
MountMode string `json:"mountMode"` // 装裱方式
|
||||
Material string `json:"material"` // 画作材质
|
||||
SignPic string `json:"signPic"` // 落款图
|
||||
SealPic string `json:"sealPic"` // 人名章图
|
||||
SignDate string `json:"signDate"` // 签约日期
|
||||
CreatedDate string `json:"createDate"` // 创作日期
|
||||
CreatedAddress string `json:"createAddress"` // 创作地点
|
||||
//优秀画作是从泰丰批次中选一个出来的
|
||||
//丰链独有字段
|
||||
ArriveTime string `json:"arriveTime"` //画作到达时间,精确到日
|
||||
ArtworkType int64 `json:"artworkType"` //画作类型,1-优秀画作,2-赠画,3-卷轴,4-普通画作
|
||||
GiftInfo string `json:"giftInfo"` //赠画信息
|
||||
Scroll *Scroll `json:"scroll"` //卷轴信息
|
||||
Resume string `json:"resume"` //画家简介
|
||||
RecentPhoto string `json:"recentPhoto"` // 画家近照url
|
||||
Comment string `json:"comment"` // 画作备注
|
||||
|
||||
// 6.7
|
||||
ArtCat string `json:"artCat"` // 艺术类别
|
||||
ArtMeansOfExpression string `json:"artMeansOfExpression"` // 表现形式
|
||||
ArtSub string `json:"artSub"` // 艺术主题
|
||||
ArtStyle string `json:"artStyle"` // 风格
|
||||
ArtColor string `json:"artColor"` // 颜色
|
||||
Size string `json:"size"` // 画作尺寸描述 {"1":"大","2":"中","3":"小"}
|
||||
ArtHorizontal string `json:"artHorizontal"` // 幅式
|
||||
TagIds []string `json:"tagIds"` // 艺术品标签 逗号隔开
|
||||
Aucrecords string `json:"aucrecords"`
|
||||
PastCollectors string `json:"pastCollectors"`
|
||||
Pastpub string `json:"pastpub"`
|
||||
PastTradFroms string `json:"pastTradFroms"`
|
||||
|
||||
// 画家提供名称
|
||||
CustomName string `json:"customName"`
|
||||
BatchState string `json:"batchState"` //画作已入库图片
|
||||
DigitizationState string `json:"digitizationState"` //画作已数字化图片
|
||||
AuthenticateState string `json:"authenticateState"` //已鉴证
|
||||
}
|
||||
|
||||
type NetworkTrace struct {
|
||||
IsExist int64 `json:"isExist"` //1-有,2-无,3-有痕已无
|
||||
FirstPublic string `json:"firstPublic"` //首次发表url
|
||||
FirstName string `json:"firstName"` //首次命名url
|
||||
Comment string `json:"comment"`
|
||||
}
|
||||
|
||||
type PhotoState struct {
|
||||
IsPhoto int `json:"isPhoto"` //是否已拍摄,1-是,2-否
|
||||
PhotoTime string `json:"photoTime"` //拍摄日期
|
||||
Comment string `json:"comment"` //备注
|
||||
}
|
||||
|
||||
type Hash struct {
|
||||
PropertyHash string `json:"property"` //物权哈希值
|
||||
CopyrightHash string `json:"copyright"` //版权哈希值
|
||||
PropertyHashLocation string `json:"pLocation"` //物权哈希值位置
|
||||
PropertyHashContext string `json:"pComment"` //物权哈希值备注
|
||||
}
|
||||
|
||||
type Copyright struct {
|
||||
Proxy string `json:"proxy"` //画作授权委托书(扫描件)(jpg,pdf)
|
||||
CopyrightCert string `json:"cert"` //版权证书(pdf)
|
||||
Type int64 `json:"type"` //版权类型,1-国家版权,2-江苏省版权
|
||||
}
|
||||
|
||||
type Scroll struct {
|
||||
IsNew int64 `json:"isNew"` //新卷轴还是老卷轴,1-新,2-旧
|
||||
SendTime string `json:"sendTime"` //寄出卷轴日期
|
||||
SendNum string `json:"sendNum"` //寄出卷轴单号
|
||||
ReceiveTime string `json:"receiveTime"` //收到卷轴日期
|
||||
ReceiveNum string `json:"receiveNum"` //收到卷轴单号
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// 画家指数
|
||||
type ArtworkExExam struct {
|
||||
model.Model
|
||||
UserId uint `gorm:"column:user_id;default:0;comment:账号id" json:"userId"`
|
||||
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:"`
|
||||
Title string `gorm:"column:title;type:varchar(64);default:''" json:"title"`
|
||||
Class string `gorm:"column:class;type:varchar(25);default:''" json:"class"`
|
||||
TitleScore uint `gorm:"column:title_score;default:0" json:"titleScore"`
|
||||
Score string `gorm:"column:score;type:varchar(1024);default:''" json:"score"`
|
||||
State string `gorm:"column:state;type:varchar(25);default:''" json:"state"`
|
||||
Remark string `gorm:"column:remark;type:varchar(1024);default:''" json:"remark"`
|
||||
Remark2 string `gorm:"column:remark2;type:varchar(1024);default:''" json:"remark2"`
|
||||
Enable bool `gorm:"column:enable;default:0" json:"enable"`
|
||||
}
|
||||
|
||||
func (e ArtworkExExam) TableName() string {
|
||||
return "artwork_ex_exam"
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// ExhVideo 视频资料
|
||||
type ExhVideo struct {
|
||||
model.Model
|
||||
UserId uint `gorm:"not null default:0"`
|
||||
Url string `gorm:"type:varchar(256) default ''"`
|
||||
State string `gorm:"type:varchar(25) default ''"`
|
||||
Remark string `gorm:"type:varchar(1024) default ''" json:"remark"`
|
||||
Remark2 string `gorm:"type:varchar(1024) default ''" json:"remark2"`
|
||||
Enable bool `gorm:"default:false"`
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// 考核 用户模型
|
||||
type ArtworkState struct {
|
||||
model.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
ArtworkId int32 `gorm:"default:0"`
|
||||
State int32 `gorm:"default:0"`
|
||||
Pic string `gorm:"type:varchar(256) default ''"`
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// User 用户模型
|
||||
type Bank struct {
|
||||
model.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
UserId int32 `gorm:" not null"`
|
||||
BankAccount string `gorm:"type:varchar(25) not null"`
|
||||
BankName string `gorm:"type:varchar(25) not null"`
|
||||
Enable bool `gorm:"not null"`
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package old
|
||||
|
||||
import "gorm.io/plugin/soft_delete"
|
||||
|
||||
// Contract 用户模型
|
||||
type Contract struct {
|
||||
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Uid string `gorm:"column:uid;type:varchar(100);comment:合同表的唯一表示;NOT NULL" json:"uid"`
|
||||
ArtistUid string `gorm:"column:artist_uid;type:varchar(100);comment:画家uid;NOT NULL" json:"artist_uid"`
|
||||
ArtworkUid string `gorm:"column:artwork_uid;type:varchar(100);comment:画作uid" json:"artwork_uid"`
|
||||
ContractId string `gorm:"column:contract_id;type:varchar(100);comment:合同id" json:"contract_id"`
|
||||
TransactionId string `gorm:"column:transaction_id;type:varchar(100);comment:交易id" json:"transaction_id"`
|
||||
Type int32 `gorm:"column:type;type:int(1);comment:合同类型;NOT NULL" json:"type"`
|
||||
ViewUrl string `gorm:"column:view_url;type:varchar(500);comment:在线查看合同链接" json:"view_url"`
|
||||
DownloadUrl string `gorm:"column:download_url;type:varchar(500);comment:合同下载链接" json:"download_url"`
|
||||
State int32 `gorm:"column:state;type:int(1);comment:合同状态;NOT NULL" json:"state"`
|
||||
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
||||
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
||||
DeletedAt soft_delete.DeletedAt
|
||||
}
|
@ -1,33 +1,15 @@
|
||||
package model
|
||||
|
||||
// 实名认证模型
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
//实名认证模型
|
||||
type RealName struct {
|
||||
Model
|
||||
Name string `gorm:"not null"`
|
||||
IdNum string `gorm:"type:varchar(18) not null"`
|
||||
// TelNum string `gorm:"type:varchar(11) not null"`
|
||||
IdCardFront string `gorm:"column:idcard_front;comment:身份证正面"`
|
||||
IdCardBack string `gorm:"column:idcard_back;comment:身份证反面"`
|
||||
Age int `gorm:"column:age"`
|
||||
Sex SexType `gorm:"column:sex"`
|
||||
Birthday string `gorm:"column:birthday"`
|
||||
Address string `gorm:"column:address"`
|
||||
}
|
||||
|
||||
func (r RealName) TableName() string {
|
||||
return "real_name"
|
||||
}
|
||||
|
||||
type SexType string
|
||||
|
||||
func (s SexType) ConvertInt32() int32 {
|
||||
switch s {
|
||||
case "男":
|
||||
return 1
|
||||
case "女":
|
||||
return 2
|
||||
default: //其它
|
||||
return 3
|
||||
}
|
||||
|
||||
gorm.Model
|
||||
Name string `gorm:"not null"`
|
||||
IDNum string `gorm:"type:varchar(18) not null"`
|
||||
TelNum string `gorm:"type:varchar(11) not null"`
|
||||
IdcardFront string `gorm:"type:varchar(256) not null"`
|
||||
IdcardBack string `gorm:"type:varchar(256) not null"`
|
||||
}
|
||||
|
@ -1,93 +0,0 @@
|
||||
package model
|
||||
|
||||
import "gorm.io/plugin/soft_delete"
|
||||
|
||||
//对账单画作物权
|
||||
type ArtworkTx struct {
|
||||
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作物权表的唯一表示,即批次Uid;NOT NULL" json:"uid"`
|
||||
ArtistUid string `gorm:"column:artist_uid;type:varchar(100);comment:画家Uid;NOT NULL" json:"artist_uid"`
|
||||
ArtistName string `gorm:"column:artist_name;type:varchar(100);comment:画家名;NOT NULL" json:"artist_name"`
|
||||
BatchTime string `gorm:"column:batch_time;comment:批次时间" json:"batch_time"`
|
||||
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
||||
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
||||
DeletedAt soft_delete.DeletedAt
|
||||
}
|
||||
|
||||
// 对账单画作物权委托详情(该画家一个批次的全部画作)
|
||||
type ArtworkTxDetail struct {
|
||||
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作物权详情表的唯一表示;NOT NULL" json:"uid"`
|
||||
BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作物权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"`
|
||||
TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号"`
|
||||
ArtworkName string `gorm:"column:artwork_name;comment:画作名称"`
|
||||
Ruler string `gorm:"column:ruler;comment:平尺"`
|
||||
MinPrice float32 `gorm:"column:min_price;comment:委托销售底价"`
|
||||
GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;"`
|
||||
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
||||
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
||||
DeletedAt soft_delete.DeletedAt
|
||||
}
|
||||
|
||||
// 对账单画作物权销售委托详情(该画家一个批次的全部已被售卖了的画作)
|
||||
type ArtworkSoldTxDetail struct {
|
||||
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作物权详情表的唯一表示;NOT NULL" json:"uid"`
|
||||
BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作物权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"`
|
||||
TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号"`
|
||||
ArtworkName string `gorm:"column:artwork_name;comment:画作名称"`
|
||||
Ruler string `gorm:"column:ruler;comment:平尺"`
|
||||
SaleNo string `gorm:"column:sale_no;comment:销售单号"`
|
||||
CompleteDate string `gorm:"column:complete_date;comment:成交日期"`
|
||||
MinPrice float32 `gorm:"column:min_price;comment:委托销售底价"`
|
||||
SalePrice float32 `gorm:"column:sale_price;comment:画作售价"`
|
||||
GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;"`
|
||||
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
||||
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
||||
DeletedAt soft_delete.DeletedAt
|
||||
}
|
||||
|
||||
//对账单画作版权
|
||||
type ArtworkCopy struct {
|
||||
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作版权表的唯一表示,即批次Uid;NOT NULL" json:"uid"`
|
||||
ArtistUid string `gorm:"column:artist_uid;type:varchar(100);comment:画家Uid;NOT NULL" json:"artist_uid"`
|
||||
ArtistName string `gorm:"column:artist_name;type:varchar(100);comment:画家名;NOT NULL" json:"artist_name"`
|
||||
BatchTime string `gorm:"column:batch_time;comment:批次时间" json:"batch_time"`
|
||||
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
||||
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
||||
DeletedAt soft_delete.DeletedAt
|
||||
}
|
||||
|
||||
// 对账单画作版权委托详情(该画家一个批次的全部画作)
|
||||
type ArtworkCopyDetail struct {
|
||||
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作版权详情表的唯一表示;NOT NULL" json:"uid"`
|
||||
BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作版权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"`
|
||||
TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号"`
|
||||
ArtworkName string `gorm:"column:artwork_name;comment:画作名称"`
|
||||
Ruler string `gorm:"column:ruler;comment:平尺"`
|
||||
MinPrice float32 `gorm:"column:min_price;comment:委托销售底价"`
|
||||
GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;"`
|
||||
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
||||
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
||||
DeletedAt soft_delete.DeletedAt
|
||||
}
|
||||
|
||||
// 对账单画作版权委托售卖详情(该画家一个批次的全部已被售卖了的画作)
|
||||
type ArtworkSoldCopyDetail struct {
|
||||
ID int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Uid string `gorm:"column:uid;type:varchar(100);comment:对账单画作版权详情表的唯一表示;NOT NULL" json:"uid"`
|
||||
BatchUid string `gorm:"column:batch_uid;type:varchar(100);comment:对账单画作版权表的唯一表示,即批次Uid;NOT NULL" json:"batch_uid"`
|
||||
TfNum string `gorm:"column:tf_num;unqiueIndex:batchid_tfnum_idx;comment:"泰丰画作编号"`
|
||||
ArtworkName string `gorm:"column:artwork_name;comment:画作名称"`
|
||||
Ruler string `gorm:"column:ruler;comment:平尺"`
|
||||
SaleNo string `gorm:"column:sale_no;comment:销售单号"`
|
||||
CompleteDate string `gorm:"column:complete_date;comment:成交日期"`
|
||||
MinPrice float32 `gorm:"column:min_price;comment:委托销售底价"`
|
||||
SalePrice float32 `gorm:"column:sale_price;comment:画作售价"`
|
||||
GuaranteePrice float32 `gorm:"column:guarantee_price;comment:已收取保证金;"`
|
||||
CreatedAt int32 `gorm:"column:created_at;autoCreateTime"`
|
||||
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
|
||||
DeletedAt soft_delete.DeletedAt
|
||||
}
|
@ -1,21 +1,23 @@
|
||||
package old
|
||||
package model
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// SupplyInfo 画作信息补充
|
||||
//User 用户模型
|
||||
type SupplyInfo struct {
|
||||
model.Model
|
||||
ID uint `gorm:"not null"`
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
ArtworkId string `gorm:"type:varchar(256) default ''"`
|
||||
ArtistId string `gorm:"type:varchar(256) default ''"`
|
||||
UserId uint `gorm:" not null"`
|
||||
UserId int32 `gorm:" not null"`
|
||||
Name string `gorm:"type:varchar(256) default ''"`
|
||||
ModelYear string `gorm:"type:varchar(256) default ''"`
|
||||
Photo string `gorm:"type:varchar(2048) default ''"`
|
||||
ArtistPhoto string `gorm:"type:varchar(2048) default ''"`
|
||||
Width uint `gorm:"default:0"`
|
||||
Height uint `gorm:"default:0"`
|
||||
Ruler uint `gorm:"default:0"`
|
||||
Width int32 `gorm:"default:0"`
|
||||
Height int32 `gorm:"default:0"`
|
||||
Ruler int32 `gorm:"default:0"`
|
||||
ExhibitInfo string `gorm:"type:varchar(1024) default ''"`
|
||||
ExhibitPic1 string `gorm:"type:varchar(1024) default ''"`
|
||||
ExhibitPic2 string `gorm:"type:varchar(1024) default ''"`
|
||||
@ -25,9 +27,7 @@ type SupplyInfo struct {
|
||||
NetworkTrace bool `gorm:"default:false"`
|
||||
CreateAddress string `gorm:"type:varchar(256) not null" json:"createAddress"`
|
||||
Url string `gorm:"type:varchar(1024) default ''"`
|
||||
State string `gorm:"type:varchar(25) default ''"`
|
||||
Remark string `gorm:"type:varchar(1024) default ''" json:"remark"`
|
||||
Remark2 string `gorm:"type:varchar(1024) default ''" json:"remark2"`
|
||||
|
||||
Enable bool `gorm:"default:false"`
|
||||
Types string `gorm:"type:varchar(25) default ''"`
|
||||
Remarks string `gorm:"type:varchar(1024) default ''"`
|
||||
Enable bool `gorm:"default:false"`
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
// Package model -----------------------------
|
||||
// @file : temp_artwork_ext_data.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/2/28 11:51
|
||||
// -------------------------------------------
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ArtworkExtData struct {
|
||||
Id int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"Id"` //type:int32 comment:
|
||||
ArtworkId int32 `gorm:"column:artwork_id" json:"ArtworkId"` //type:int32
|
||||
ArtworkUuid string `gorm:"column:artwork_uuid" json:"ArtworkUuid"` //type:string comment:画作的uuid
|
||||
ArtType int32 `gorm:"column:art_type" json:"ArtType"` //type:string comment:艺术类别
|
||||
ArtTitle int32 `gorm:"column:art_title" json:"ArtTitle"` //type:string comment:艺术主题
|
||||
ArtStyle int32 `gorm:"column:art_style" json:"ArtStyle"` //type:string comment:风格
|
||||
Color int32 `gorm:"column:color" json:"Color"` //type:string comment:颜色
|
||||
PenTechniques string `gorm:"column:pen_techniques" json:"PenTechniques"` //type:string comment:笔墨技法
|
||||
ArtIdea string `gorm:"column:art_idea" json:"ArtIdea"` //type:string comment:绘画思想
|
||||
ExpressIdea string `gorm:"column:express_idea" json:"ExpressIdea"` //type:string comment:表达思想
|
||||
ArtStory string `gorm:"column:art_story" json:"ArtStory"` //type:string comment:创作背景故事
|
||||
FirstPublish string `gorm:"column:first_publish" json:"FirstPublish"` //type:string comment:首次发表
|
||||
FirstPublishImg string `gorm:"column:first_publish_img" json:"FirstPublishImg"` //type:string comment:首次发表截图
|
||||
FirstName string `gorm:"column:first_name" json:"FirstName"` //type:string comment:首次命名
|
||||
FirstNameImg string `gorm:"column:first_name_img" json:"FirstNameImg"` //type:string comment:首次命名截图
|
||||
CopyrightHash string `gorm:"column:copyright_hash" json:"CopyrightHash"` //type:string comment:版权哈希
|
||||
RealrightHash string `gorm:"column:realright_hash" json:"RealrightHash"` //type:string comment:物权哈希
|
||||
SprayPosition string `gorm:"column:spray_position" json:"SprayPosition"` //type:string comment:喷涂位置
|
||||
SprayRemark string `gorm:"column:spray_remark" json:"SprayRemark"` //type:string comment:喷涂备注
|
||||
AuthDataHash string `gorm:"column:auth_data_hash" json:"AuthData"` //type:string comment:鉴证数据
|
||||
DigiShootDate string `gorm:"column:digi_shoot_date" json:"DigiShootDate"` //type:string comment:数字化拍摄时间
|
||||
DigiMakeDate string `gorm:"column:digi_make_date" json:"DigiMakeDate"` //type:string comment:数字化后期制作时间
|
||||
DigiArtImg string `gorm:"column:digi_art_img" json:"DigiArtImg"` //type:string comment:数字化画作图
|
||||
DigiArtCopyrightImg string `gorm:"column:digi_art_copyright_img" json:"DigiArtCopyrightImg"` //type:string comment:数字化画作版权图
|
||||
DigiCopyrightInfo string `gorm:"column:digi_copyright_info" json:"DigiCopyrightInfo"` //type:string comment:数字化画作版权信息
|
||||
DigiCopyrightFile string `gorm:"column:digi_copyright_file" json:"DigiCopyrightFile"` //type:string comment:数字化画作版权文件
|
||||
Tags string `gorm:"column:tags" json:"Tags"` //type:string comment:选择标签
|
||||
ThirdComment string `gorm:"column:third_comment" json:"ThirdComment"` //type:string comment:第三方评价
|
||||
AuthTime string `gorm:"column:auth_time;comment:鉴证时间" json:"auth_time"`
|
||||
AuthImg string `gorm:"column:auth_img" json:"AuthImg"` //type:string comment:鉴证图
|
||||
Status int32 `gorm:"column:status;type:tinyint(4);default:1;comment:状态 正常 2 删除;NOT NULL" json:"status"`
|
||||
CreatedAt time.Time `gorm:"column:created_at" json:"CreatedAt"` //type:int32 comment:
|
||||
UpdatedAt time.Time `gorm:"column:updated_at" json:"UpdatedAt"` //type:int32 comment:
|
||||
DeletedAt soft_delete.DeletedAt //type:int32 comment:
|
||||
}
|
||||
|
||||
// TableName 表名:artwork_ext_data,画作补充数据。
|
||||
// 说明:
|
||||
func (ArtworkExtData) TableName() string {
|
||||
return "artwork_ext_data"
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package model
|
||||
|
||||
// 此表用于在创建用户是临时存储艺术家信息,等法大大认证通过后再进行创建
|
||||
type TempArtistInfo struct {
|
||||
MgmtAccId int64 `gorm:"column:mgmt_acc_id;comment:关联sys_user表的MgmtAccId"`
|
||||
UserInfo *User `gorm:"foreignKey:MgmtAccId;comment:"`
|
||||
Name string `gorm:"column:name;comment:"`
|
||||
CardId string `gorm:"column:card_id;comment:"`
|
||||
Gender int32 `gorm:"column:gender;comment:"`
|
||||
Age int32 `gorm:"column:age;comment:"`
|
||||
NativePlace string `gorm:"column:native_place;comment:"`
|
||||
PenName string `gorm:"column:pen_name;comment:"`
|
||||
Phone string `gorm:"column:phone;comment:"`
|
||||
Address string `gorm:"column:address;comment:"`
|
||||
StageName string `gorm:"column:stage_name;comment:"`
|
||||
CaaCertNum string `gorm:"column:caa_cert_num;comment:"`
|
||||
CaaJoinTime string `gorm:"column:caa_join_time;comment:"`
|
||||
JoinShow int32 `gorm:"column:join_show;comment:"`
|
||||
WxAccount string `gorm:"column:wx_account;comment:微信账号"`
|
||||
InviterCode string `gorm:"column:inviter_code;comment:邀请人的二维码"`
|
||||
}
|
||||
|
||||
func (t TempArtistInfo) TableName() string {
|
||||
return "temp_artist_info"
|
||||
}
|
@ -1,59 +1,40 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// User 用户模型
|
||||
type User struct {
|
||||
Model
|
||||
MgmtAccId int64 `gorm:"column:mgmt_acc_id;not null;comment:账号id"` //;uniqueIndex:mgmt_acc_mgmt_artist_tel_uid_tel_num
|
||||
MgmtArtistId int64 `gorm:"column:mgmt_artist_id;not null;comment:艺术家id"`
|
||||
MgmtArtistUid string `gorm:"column:mgmt_artist_uid;type:varchar(256);comment:艺术家uid"` //;uniqueIndex:mgmt_acc_mgmt_artist_uid_tel_num
|
||||
TelNum string `gorm:"column:tel_num;type:varchar(20);not null;电话号码"` //;uniqueIndex:mgmt_acc_mgmt_artist_uid_tel_num
|
||||
InviteCode string `gorm:"column:invited_code;type:varchar(16);default:'';comment:个人邀请码"`
|
||||
InvitedBy *Invite `gorm:"foreignKey:InvitedId"` //邀请者的相关信息
|
||||
Account string `gorm:"column:account;varchar(191);comment:账号"`
|
||||
CertificateNum string `gorm:"column:certificate_num;type:varchar(16);comment:中美协会证书编号"`
|
||||
CertificateImg string `gorm:"column:certificate_img;type:varchar(512);comment:中美协会证书url"`
|
||||
JoinAssoTime string `json:"joinAssoTime" gorm:"column:join_asso_time;comment:入会时间"`
|
||||
Photo string `gorm:"column:photo;type:varchar(255);comment:个人近照"`
|
||||
|
||||
// 实名认证
|
||||
IsRealName int64 `gorm:"column:is_real_name;default:0;是否实名认证:0未认证 1已认证"`
|
||||
RealNameId int64 `gorm:"column:real_name_id;comment:实名认证id"`
|
||||
RealNameInfo *RealName `gorm:"foreignKey:RealNameId;references:ID"`
|
||||
// 法大大认证
|
||||
FddState int64 `gorm:"column:fdd_state;not null;comment:法大大认证状态0未认证 2已认证"`
|
||||
CustomerId string `gorm:"column:costumer_id;type:varchar(2048);not null;comment:法大大客户id"`
|
||||
OpenId string `gorm:"openId"`
|
||||
|
||||
//用户状态
|
||||
IsRead int64 `gorm:"column:is_read;not null;comment:条款阅读状态"`
|
||||
IsLock bool `gorm:"column:is_lock;not null;comment:画家锁定状态"`
|
||||
LatestLockTime string `json:"latestLockTime" gorm:"column:latest_lock_time;comment:最新锁定时间"`
|
||||
//ConAddress string `json:"conAddress" gorm:"column:con_address;comment:"`
|
||||
WxAccount string `json:"wxAccount" gorm:"column:wx_account;comment:"`
|
||||
//前端参数,提交实名认证后生成
|
||||
Htmltype string `gorm:"html_type" json:"htmltype"`
|
||||
Envtype string `gorm:"env_type" json:"envtype"`
|
||||
|
||||
OldMgmtId int64 `gorm:"column:old_mgmt_id;comment:老管理系统用户id;"`
|
||||
Remark string `gorm:"column:remark;comment:备注;"`
|
||||
//IsFdd int64 `gorm:"column:is_fdd;not null;comment:"`
|
||||
//Account string `gorm:"type:varchar(256) not null"`
|
||||
//Name string `gorm:"type:varchar(20) not null"`
|
||||
//MnemonicWords string `gorm:"type:varchar(256) not null"`
|
||||
//PenName string `gorm:"type:varchar(20) not null"`
|
||||
//StageName string `gorm:"type:varchar(20) not null"`
|
||||
//JoinAssoTime string `gorm:"type:varchar(64) not null"`
|
||||
//Key string `gorm:"type:varchar(16) not null"`
|
||||
//RealNameID int32 `gorm:"not null"`
|
||||
//IDNum string `gorm:"type:varchar(18) not null"`
|
||||
//Sex int32 `gorm:"not null"`
|
||||
//OpenId string `gorm:"type:varchar(2048) not null"`
|
||||
//Age int32 `gorm:"not null"`
|
||||
//Introduct string `gorm:"type:varchar(2048) not null"`
|
||||
//Photo string `gorm:"type:varchar(2048) not null"`
|
||||
//Video string `gorm:"type:varchar(256) not null"`
|
||||
}
|
||||
|
||||
func (u User) TableName() string {
|
||||
return "sys_user"
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
Account string `gorm:"type:varchar(256) not null"`
|
||||
MnemonicWords string `gorm:"type:varchar(256) not null"`
|
||||
TelNum string `gorm:"type:varchar(20) not null"`
|
||||
Name string `gorm:"type:varchar(20) not null"`
|
||||
PenName string `gorm:"type:varchar(20) not null"`
|
||||
StageName string `gorm:"type:varchar(20) not null"`
|
||||
JoinAssoTime string `gorm:"type:varchar(64) not null"`
|
||||
CertificateNum string `gorm:"type:varchar(16) not null"`
|
||||
CertificateImg string `gorm:"type:varchar(512) not null"`
|
||||
Key string `gorm:"type:varchar(16) not null"`
|
||||
RealNameID int32 `gorm:"not null"`
|
||||
IDNum string `gorm:"type:varchar(18) not null"`
|
||||
Sex int32 `gorm:"not null"`
|
||||
OpenId string `gorm:"type:varchar(2048) not null"`
|
||||
CustomerId string `gorm:"type:varchar(2048) not null"`
|
||||
Age int32 `gorm:"not null"`
|
||||
Introduct string `gorm:"type:varchar(2048) not null"`
|
||||
CreateAt int64 `gorm:"not null"`
|
||||
ConAddress string `gorm:"type:varchar(2048) not null"`
|
||||
Photo string `gorm:"type:varchar(2048) not null"`
|
||||
Video string `gorm:"type:varchar(256) not null"`
|
||||
IsRealName bool `gorm:"not null"`
|
||||
FddState int32 `gorm:"not null"`
|
||||
WxAccount string `gorm:"type:varchar(256) not null"`
|
||||
IsLock bool `gorm:"not null"`
|
||||
InvitedCode string `gorm:"type:varchar(16) default ''"`
|
||||
IsRead int32 `gorm:"not null"`
|
||||
IsImport int32 `gorm:"not null"`
|
||||
Enable bool `gorm:"not null"`
|
||||
}
|
||||
|
@ -1,15 +1,14 @@
|
||||
package model
|
||||
|
||||
// User 用户模型
|
||||
type UserInvited struct {
|
||||
Model
|
||||
UserId int32 `gorm:"column:user_id;type:int;not null;comment:邀请人id"`
|
||||
InviteCode string `gorm:"column:invite_code;comment:邀请人的邀请码"`
|
||||
InvitedCode string `gorm:"column:invited_code;comment:受邀请人的邀请码"`
|
||||
InvitedUserId int32 `gorm:"column:invited_user_id;type:int;not null;comment:受邀请人画家宝用户id"`
|
||||
Count int32 `gorm:"column:count;type:int;default:1;邀请次数统计"`
|
||||
}
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func (UserInvited) TableName() string {
|
||||
return "user_invited"
|
||||
//User 用户模型
|
||||
type UserInvited struct {
|
||||
gorm.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
UserId int32 `gorm:"type:int not null"`
|
||||
InvitedUserId int32 `gorm:"type:int not null"`
|
||||
Count int32 `gorm:"type:int not null"`
|
||||
}
|
||||
|
@ -1,53 +0,0 @@
|
||||
// Package model -----------------------------
|
||||
// @file : view_passed_artwork_static.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/3/11 11:13
|
||||
// -------------------------------------------
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ViewPassedArtworkStatic struct {
|
||||
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:画家uid"`
|
||||
IsLock bool `json:"isLock" gorm:"column:is_lock;comment:是否锁定"`
|
||||
LatestLockTime string `json:"latestLockTime" gorm:"column:latest_lock_time;comment:最近一次锁定时间"`
|
||||
PasswdArtworkNumber int64 `json:"passwdArtworkNumber" gorm:"column:passwd_artwork_number;comment:审核通过的画作总数"`
|
||||
LatestUpdatedAt time.Time `json:"latestUpdatedAt" gorm:"column:latest_updated_at;comment:最近一次更新时间"`
|
||||
RealName string `json:"realName" gorm:"column:real_name;comment:真实姓名"`
|
||||
//---补充字段,转到pb文件
|
||||
//Idx int64 `json:"idx" gorm:"-"`
|
||||
//PenName string `json:"penName" gorm:"-"`
|
||||
//StageName string `json:"stageName" gorm:"-"`
|
||||
//ArtworkTotal string `json:"artworkTotal" gorm:"-"`
|
||||
//RulerTotal int64 `json:"rulerTotal" gorm:"-"`
|
||||
//PassedRulerTotal int64 `json:"passedRulerTotal" gorm:"-"`
|
||||
}
|
||||
|
||||
func (p ViewPassedArtworkStatic) TableName() string {
|
||||
return "view_passed_artwork_static"
|
||||
}
|
||||
|
||||
func CreateViewPassedArtworkStatic(db *gorm.DB) error {
|
||||
// 统计画家通过基本画作审批的画作数量
|
||||
var sql = `
|
||||
CREATE OR REPLACE VIEW view_passed_artwork_static AS
|
||||
-- 查询审核通过的画作数量以及相关数据
|
||||
SELECT
|
||||
su.mgmt_artist_uid artist_uid
|
||||
,MAX(su.is_lock) is_lock
|
||||
,max(su.latest_lock_time) latest_lock_time
|
||||
,count(alr.artwork_uid) passed_artwork_number
|
||||
,MAX(alr.updated_at) latest_updated_at
|
||||
,MAX(rn.name) real_name
|
||||
FROM sys_user su
|
||||
LEFT JOIN artwork_lock_record alr ON alr.artist_uid = su.mgmt_artist_uid AND alr.base_audit_status=4 AND alr.deleted_at = 0
|
||||
LEFT JOIN real_name rn ON rn.id = su.real_name_id
|
||||
GROUP BY su.mgmt_artist_uid HAVING su.mgmt_artist_uid !=''
|
||||
`
|
||||
db.Exec(sql)
|
||||
return nil
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
// Package model -----------------------------
|
||||
// @file : view_user.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/2/27 13:51
|
||||
// -------------------------------------------
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type UserView struct {
|
||||
UserId int64 `json:"userId" gorm:"column:user_id;comment:用户表id"`
|
||||
AccId int64 `json:"accId" gorm:"column:mgmt_acc_id;comment:账号id"`
|
||||
ArtistUid string `json:"artistUid" gorm:"column:mgmt_artist_uid;comment:账号id"`
|
||||
TelNum string `json:"telNum" gorm:"column:tel_num;comment:电话号码"`
|
||||
InviteCode string `json:"inviteCode" gorm:"column:invited_code;comment:邀请码"`
|
||||
Account string `json:"account" gorm:"column:account;comment:账号"`
|
||||
Photo string `json:"photo" gorm:"column:photo;comment:个人近照"`
|
||||
IsRealName int64 `json:"isRealName" gorm:"column:is_real_name;comment:是否实名认证"`
|
||||
FddState int64 `json:"fddState" gorm:"column:fdd_state;comment:法大大状态"`
|
||||
IsRead int64 `json:"isRead" gorm:"column:is_read;comment:是否已读 0未读 1已读"`
|
||||
IsLock bool `json:"isLock" gorm:"column:is_lock;comment:是否锁定"`
|
||||
LatestLockTime string `json:"latestLockTime" gorm:"column:latest_lock_time;comment:"`
|
||||
RealName string `json:"realName" gorm:"column:real_name;comment:真实姓名"`
|
||||
IdNum string `json:"idNum" gorm:"column:id_num;comment:证件号码"`
|
||||
Sex SexType `json:"sex" gorm:"column:sex;comment:性别"`
|
||||
Age int64 `json:"age" gorm:"column:age;comment:年龄"`
|
||||
RealAddress string `json:"address" gorm:"column:real_address;comment:真实地址"`
|
||||
IdcardBack string `json:"idcardBack" gorm:"column:idcard_back;comment:身份证背面"`
|
||||
IdcardFront string `json:"idcardFront" gorm:"column:idcard_front;comment:身份证反面"`
|
||||
JoinAssoTime string `json:"joinAssoTime" gorm:"column:join_asso_time;comment:入会时间"`
|
||||
InviterInviteCode string `json:"inviterInviteCode" gorm:"column:inviter_invite_code;comment:邀请人的邀请码"`
|
||||
InviterRealName string `json:"inviterRealName" gorm:"column:inviter_real_name;comment:邀请人的真实姓名"`
|
||||
CreatedAt time.Time `json:"createdAt" gorm:"column:created_at;comment:"`
|
||||
UpdatedAt time.Time `json:"updatedAt" gorm:"column:updated_at;comment:"`
|
||||
DeletedAt int64 `json:"deletedAt" gorm:"column:deleted_at;comment:"`
|
||||
CertificateNum string `json:"certificateNum" gorm:"column:certificate_num;comment:"`
|
||||
CertificateImg string `json:"certificateImg" gorm:"column:certificate_img;comment:"`
|
||||
BankName string `json:"bankName" gorm:"column:bank_name;comment:"`
|
||||
BankNum string `json:"bankNum" gorm:"column:bank_num;comment:"`
|
||||
WxAccount string `json:"wxAccount" gorm:"column:wx_account;comment:企业微信账号"`
|
||||
ArtistProfile string `json:"artistProfile" gorm:"artist_profile"` //画家基本信息
|
||||
}
|
||||
|
||||
func (u UserView) TableName() string {
|
||||
return "user_view"
|
||||
}
|
||||
func CreateUserView(db *gorm.DB) error {
|
||||
var sql = `
|
||||
CREATE OR REPLACE VIEW user_view AS
|
||||
SELECT
|
||||
su.id user_id,
|
||||
su.mgmt_acc_id,
|
||||
su.mgmt_artist_uid,
|
||||
su.tel_num,
|
||||
su.invited_code,
|
||||
su.account,
|
||||
su.photo,
|
||||
su.is_real_name,
|
||||
su.fdd_state,
|
||||
su.is_read,
|
||||
su.is_lock,
|
||||
rn.name real_name,
|
||||
rn.idcard_front,
|
||||
rn.idcard_back,
|
||||
rn.address real_address,
|
||||
rn.id_num,
|
||||
rn.sex,
|
||||
rn.age,
|
||||
su.created_at,
|
||||
su.updated_at,
|
||||
su.deleted_at,
|
||||
inviter.invited_code inviter_invite_code,
|
||||
inviter_rn.name inviter_real_name,
|
||||
su.latest_lock_time,
|
||||
su.join_asso_time,
|
||||
su.certificate_num,
|
||||
su.certificate_img,
|
||||
su.wx_account,
|
||||
aas.bank_name,
|
||||
aas.bank_num,
|
||||
aas.artist_profile
|
||||
|
||||
FROM sys_user su
|
||||
LEFT JOIN real_name rn ON rn.id = su.real_name_id
|
||||
-- 邀请者信息
|
||||
LEFT JOIN invite ON invite.invited_id = su.id AND invite.deleted_at =0
|
||||
LEFT JOIN sys_user inviter ON BINARY inviter.invited_code = BINARY invite.invite_code AND inviter.deleted_at =0
|
||||
LEFT JOIN real_name inviter_rn ON inviter_rn.id = inviter.real_name_id AND inviter.deleted_at =0
|
||||
LEFT JOIN artshow_artist_supplement aas ON aas.artist_uid = su.mgmt_artist_uid AND aas.lock_time = (
|
||||
select MAX(lock_time) from artshow_artist_supplement WHERE artist_uid = su.mgmt_artist_uid and deleted_at = 0
|
||||
) and aas.deleted_at = 0
|
||||
WHERE
|
||||
su.deleted_at = 0
|
||||
`
|
||||
db.Exec(sql)
|
||||
return nil
|
||||
}
|
@ -2,24 +2,18 @@
|
||||
mode = dev #正式prod #测试dev
|
||||
|
||||
[mysql]
|
||||
# Db = mysql
|
||||
# DbHost = 127.0.0.1
|
||||
# DbPort = 3306
|
||||
# DbUser = root
|
||||
# DbPassWord = 123456
|
||||
# DbName = artistmgmttest
|
||||
Db = mysql
|
||||
DbHost = 127.0.0.1
|
||||
DbPort = 13307
|
||||
DbUser = root
|
||||
DbPassWord = 123456
|
||||
DbName = artistmgmtprod
|
||||
DbHost = 121.229.45.214
|
||||
DbPort = 9007
|
||||
DbUser = artuser
|
||||
DbPassWord = "C250PflXIWv2SQm8"
|
||||
DbName = artistmgmt
|
||||
|
||||
[redis]
|
||||
RedisDB = 2
|
||||
RedisAddr = 127.0.0.1:6379
|
||||
#RedisPW = "nDCTrfTtBu3Pw"
|
||||
#RedisDBNAme =
|
||||
RedisAddr = 172.16.100.99:9008
|
||||
RedisPW = "nDCTrfTtBu3Pw"
|
||||
RedisDBNAme =
|
||||
|
||||
[chain]
|
||||
IP=127.0.0.1:37101
|
||||
|
@ -7,7 +7,7 @@ DbHost = 127.0.0.1
|
||||
DbPort = 3306
|
||||
DbUser = dyb
|
||||
DbPassWord = rootdyb
|
||||
DbArtist = artistmgmtDev
|
||||
DbArtist = artist
|
||||
|
||||
[redis]
|
||||
RedisDB = 2
|
||||
|
@ -12,66 +12,21 @@ dubbo:
|
||||
protocols:
|
||||
triple: #triple
|
||||
name: tri
|
||||
port: 20050
|
||||
port: 20004
|
||||
provider:
|
||||
services:
|
||||
ArtistInfoUserProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoUser
|
||||
retries: 100
|
||||
ArtistInfoArtworkProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoArtwork
|
||||
retries: 100
|
||||
ArtistInfoArtshowProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoArtshow
|
||||
retries: 100
|
||||
ArtistInfoContractProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoContract
|
||||
retries: 100
|
||||
ArtistInfoStatementProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoStatement
|
||||
retries: 100
|
||||
#ContractProvider:
|
||||
# interface: com.fontree.microservices.common.Contract
|
||||
# retries: 0
|
||||
#ArtWorkProvider:
|
||||
# interface: com.fontree.microservices.common.ArtWork
|
||||
# retries: 0
|
||||
#SupplyProvider:
|
||||
# interface: com.fontree.microservices.common.Supply
|
||||
# retries: 0
|
||||
consumer:
|
||||
request-timeout: 120s
|
||||
references:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
ArtistClientImpl:
|
||||
protocol: tri
|
||||
ArtistProvider:
|
||||
interface: com.fontree.microservices.common.Artist
|
||||
ArtistInfoClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.ArtistInfo
|
||||
ContractClientImpl:
|
||||
timeout: 15s
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.contract
|
||||
filter: cshutdown,sign
|
||||
params:
|
||||
.accessKeyId: "SYD8-Chain-04"
|
||||
.secretAccessKey: "Al-Chain-FDF112"
|
||||
ArtworkClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Artwork
|
||||
ArtworkQueryClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.ArtworkQuery
|
||||
SupplyClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Supply
|
||||
retries: 0
|
||||
# filter: myServerFilter
|
||||
# application: "1234"
|
||||
filter: tps
|
||||
tps.limiter: method-service
|
||||
tps.limit.strategy: fixedWindow
|
||||
tps.limit.rejected.handler: DefaultValueHandler
|
||||
tps.limit.interval: 1000
|
||||
tps.limit.rate: 3
|
||||
warmup: 100 #预热时间
|
||||
logger:
|
||||
zap-config:
|
||||
level: info # 日志级别
|
||||
|
@ -3,120 +3,17 @@ dubbo:
|
||||
enable: true # default is true
|
||||
path: /metrics # default is /metrics
|
||||
port: 9091 # default is 9090
|
||||
namespace: dubboArtist # default is dubbo 作为数据上报 metrics 的前
|
||||
namespace: dubboArtistInfo # default is dubbo 作为数据上报 metrics 的前缀
|
||||
registries:
|
||||
demoZK:
|
||||
protocol: zookeeper
|
||||
timeout: 120s
|
||||
timeout: 3s
|
||||
address: 127.0.0.1:2181
|
||||
# address: 121.229.45.214:9004
|
||||
# address: 114.218.158.24:2181
|
||||
# address: zookeeper:2181
|
||||
protocols:
|
||||
triple: #triple
|
||||
name: tri
|
||||
# ip: 121.229.45.214
|
||||
port: 20050
|
||||
port: 20020
|
||||
provider:
|
||||
services:
|
||||
ArtistInfoUserProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoUser
|
||||
retries: 100
|
||||
ArtistInfoArtworkProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoArtwork
|
||||
retries: 100
|
||||
ArtistInfoArtshowProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoArtshow
|
||||
retries: 100
|
||||
ArtistInfoContractProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoContract
|
||||
retries: 100
|
||||
ArtistInfoStatementProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoStatement
|
||||
retries: 100
|
||||
#ContractProvider:
|
||||
# interface: com.fontree.microservices.common.Contract
|
||||
# retries: 0
|
||||
#ArtWorkProvider:
|
||||
# interface: com.fontree.microservices.common.ArtWork
|
||||
# retries: 0
|
||||
#SupplyProvider:
|
||||
# interface: com.fontree.microservices.common.Supply
|
||||
# retries: 0
|
||||
consumer:
|
||||
request-timeout: 120s
|
||||
references:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
ArtistClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Artist
|
||||
ArtistInfoClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.ArtistInfo
|
||||
ContractClientImpl:
|
||||
timeout: 15s
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.contract
|
||||
filter: cshutdown,sign
|
||||
params:
|
||||
.accessKeyId: "SYD8-Chain-04"
|
||||
.secretAccessKey: "Al-Chain-FDF112"
|
||||
ArtworkClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Artwork
|
||||
ArtworkQueryClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.ArtworkQuery
|
||||
SupplyClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Supply
|
||||
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: "logs/artist_server.log"
|
||||
# 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB
|
||||
maxSize: 10
|
||||
# 日志保留的最大天数(只保留最近多少天的日志)
|
||||
maxAge: 15
|
||||
# 只保留最近多少个日志文件,用于控制程序总日志的大小
|
||||
maxBackups: 10
|
||||
# 是否使用本地时间,默认使用 UTC 时间
|
||||
localTime: true
|
||||
# 是否压缩日志文件,压缩方法 gzip
|
||||
compress: false
|
||||
|
||||
|
||||
|
||||
|
||||
ArtistInfoProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfo
|
@ -3,15 +3,15 @@ mode = prod #正式prod #测试dev
|
||||
|
||||
[mysql]
|
||||
Db = mysql
|
||||
DbHost = 172.16.100.30
|
||||
DbPort = 3306
|
||||
DbHost = 192.168.1.35
|
||||
DbPort = 9005
|
||||
DbUser = root
|
||||
DbPassWord = "IhQmhg8HZjDmU=Ove5PnA^D"
|
||||
DbName = artistmgmtProd
|
||||
DbPassWord = sLl0b7stlbwvZ883TV
|
||||
DbArtist = artist
|
||||
|
||||
[redis]
|
||||
RedisDB = 2
|
||||
RedisAddr = redis:6379
|
||||
RedisAddr = 192.168.1.35:6379
|
||||
RedisPW =
|
||||
RedisDBNAme =
|
||||
|
||||
|
@ -3,70 +3,30 @@ dubbo:
|
||||
enable: true # default is true
|
||||
path: /metrics # default is /metrics
|
||||
port: 9091 # default is 9090
|
||||
namespace: dubboArtist # default is dubbo 作为数据上报 metrics 的前
|
||||
namespace: dubboArtist # default is dubbo 作为数据上报 metrics 的前缀
|
||||
registries:
|
||||
demoZK:
|
||||
protocol: zookeeper
|
||||
timeout: 3s
|
||||
# address: 127.0.0.1:2181
|
||||
# address: 121.229.45.214:9004
|
||||
# address: 114.218.158.24:2181
|
||||
address: zookeeper:2181
|
||||
address: 192.168.1.35:2181
|
||||
protocols:
|
||||
triple: #triple
|
||||
name: tri
|
||||
# ip: 121.229.45.214
|
||||
port: 20050
|
||||
port: 20004
|
||||
provider:
|
||||
services:
|
||||
ArtistInfoUserProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoUser
|
||||
retries: 100
|
||||
ArtistInfoArtworkProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoArtwork
|
||||
retries: 100
|
||||
ArtistInfoArtshowProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoArtshow
|
||||
retries: 100
|
||||
ArtistInfoContractProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoContract
|
||||
retries: 100
|
||||
ArtistInfoStatementProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoStatement
|
||||
retries: 100
|
||||
consumer:
|
||||
request-timeout: 120s
|
||||
references:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
ArtistClientImpl:
|
||||
protocol: tri
|
||||
ArtistProvider:
|
||||
interface: com.fontree.microservices.common.Artist
|
||||
ArtistInfoClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.ArtistInfo
|
||||
ContractClientImpl:
|
||||
timeout: 15s
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.contract
|
||||
filter: cshutdown,sign
|
||||
params:
|
||||
.accessKeyId: "SYD8-Chain-04"
|
||||
.secretAccessKey: "Al-Chain-FDF112"
|
||||
ArtworkClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Artwork
|
||||
ArtworkQueryClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.ArtworkQuery
|
||||
SupplyClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Supply
|
||||
retries: 0
|
||||
filter: tps
|
||||
# token: "dubbo"
|
||||
# application: "1234"
|
||||
tps.limiter: method-service
|
||||
tps.limit.strategy: fixedWindow
|
||||
tps.limit.rejected.handler: DefaultValueHandler
|
||||
tps.limit.interval: 1000
|
||||
tps.limit.rate: 3
|
||||
warmup: 100 #预热时间
|
||||
logger:
|
||||
zap-config:
|
||||
level: info # 日志级别
|
||||
|
18
conf/prod/sdk.real.yaml
Normal file
18
conf/prod/sdk.real.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
# endorseService Info
|
||||
# testNet addrs
|
||||
endorseServiceHost: "39.156.69.83:37100"
|
||||
complianceCheck:
|
||||
# 是否需要进行合规性背书
|
||||
isNeedComplianceCheck: false
|
||||
# 是否需要支付合规性背书费用
|
||||
isNeedComplianceCheckFee: false
|
||||
# 合规性背书费用
|
||||
complianceCheckEndorseServiceFee: 400
|
||||
# 支付合规性背书费用的收款地址
|
||||
complianceCheckEndorseServiceFeeAddr: aB2hpHnTBDxko3UoP2BpBZRujwhdcAFoT
|
||||
# 如果通过合规性检查,签发认证签名的地址
|
||||
complianceCheckEndorseServiceAddr: jknGxa6eyum1JrATWvSJKW3thJ9GKHA9n
|
||||
#创建平行链所需要的最低费用
|
||||
minNewChainAmount: "100"
|
||||
crypto: "xchain"
|
||||
txVersion: 1
|
18
conf/prod/sdk.test.yaml
Normal file
18
conf/prod/sdk.test.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
# endorseService Info
|
||||
# testNet addrs
|
||||
endorseServiceHost: "14.215.179.74:37101"
|
||||
complianceCheck:
|
||||
# 是否需要进行合规性背书
|
||||
isNeedComplianceCheck: true
|
||||
# 是否需要支付合规性背书费用
|
||||
isNeedComplianceCheckFee: true
|
||||
# 合规性背书费用
|
||||
complianceCheckEndorseServiceFee: 100
|
||||
# 支付合规性背书费用的收款地址
|
||||
complianceCheckEndorseServiceFeeAddr: cHvBK1TTB52GYtVxHK7HnW8N9RTqkN99R
|
||||
# 如果通过合规性检查,签发认证签名的地址
|
||||
complianceCheckEndorseServiceAddr: XDxkpQkfLwG6h56e896f3vBHhuN5g6M9u
|
||||
#创建平行链所需要的最低费用
|
||||
minNewChainAmount: "100"
|
||||
crypto: "xchain"
|
||||
txVersion: 1
|
18
conf/prod/sdk.yaml
Normal file
18
conf/prod/sdk.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
# endorseService Info
|
||||
# testNet addrs
|
||||
# endorseServiceHost: "120.48.24.223:37101"
|
||||
endorseServiceHost: "127.0.0.1:37101"
|
||||
complianceCheck:
|
||||
# 是否需要进行合规性背书
|
||||
isNeedComplianceCheck: false
|
||||
# 是否需要支付合规性背书费用
|
||||
isNeedComplianceCheckFee: false
|
||||
# 合规性背书费用
|
||||
complianceCheckEndorseServiceFee: 400
|
||||
# 支付合规性背书费用的收款地址
|
||||
complianceCheckEndorseServiceFeeAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42
|
||||
# 如果通过合规性检查,签发认证签名的地址
|
||||
complianceCheckEndorseServiceAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42
|
||||
#创建平行链所需要的最低费用
|
||||
minNewChainAmount: "100"
|
||||
crypto: "xchain"
|
@ -7,10 +7,10 @@ DbHost = 172.16.100.99 #214
|
||||
DbPort = 9007
|
||||
DbUser = artuser
|
||||
DbPassWord = "C250PflXIWv2SQm8"
|
||||
DbName = artistmgmtDev
|
||||
DbArtist = artist
|
||||
|
||||
[redis]
|
||||
RedisDB = 3
|
||||
RedisDB = 2
|
||||
RedisAddr = 172.16.100.99:9008
|
||||
RedisPW = "nDCTrfTtBu3Pw"
|
||||
RedisDBNAme =
|
||||
|
@ -7,8 +7,8 @@ dubbo:
|
||||
registries:
|
||||
demoZK:
|
||||
protocol: zookeeper
|
||||
timeout: 120s
|
||||
# address: 127.0.0.1:2181
|
||||
timeout: 3s
|
||||
# address: 127.0.0.1:2181
|
||||
# address: 121.229.45.214:9004
|
||||
# address: 114.218.158.24:2181
|
||||
address: 172.16.100.93:2181
|
||||
@ -16,66 +16,21 @@ dubbo:
|
||||
triple: #triple
|
||||
name: tri
|
||||
# ip: 121.229.45.214
|
||||
port: 20050
|
||||
port: 20004
|
||||
provider:
|
||||
services:
|
||||
ArtistInfoUserProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoUser
|
||||
retries: 100
|
||||
ArtistInfoArtworkProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoArtwork
|
||||
retries: 100
|
||||
ArtistInfoArtshowProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoArtshow
|
||||
retries: 100
|
||||
ArtistInfoContractProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoContract
|
||||
retries: 100
|
||||
ArtistInfoStatementProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoStatement
|
||||
retries: 100
|
||||
#ContractProvider:
|
||||
# interface: com.fontree.microservices.common.Contract
|
||||
# retries: 0
|
||||
#ArtWorkProvider:
|
||||
# interface: com.fontree.microservices.common.ArtWork
|
||||
# retries: 0
|
||||
#SupplyProvider:
|
||||
# interface: com.fontree.microservices.common.Supply
|
||||
# retries: 0
|
||||
consumer:
|
||||
request-timeout: 120s
|
||||
references:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
ArtistClientImpl:
|
||||
protocol: tri
|
||||
ArtistProvider:
|
||||
interface: com.fontree.microservices.common.Artist
|
||||
ArtistInfoClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.ArtistInfo
|
||||
ContractClientImpl:
|
||||
timeout: 15s
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.contract
|
||||
filter: cshutdown,sign
|
||||
params:
|
||||
.accessKeyId: "SYD8-Chain-04"
|
||||
.secretAccessKey: "Al-Chain-FDF112"
|
||||
ArtworkClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Artwork
|
||||
ArtworkQueryClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.ArtworkQuery
|
||||
SupplyClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Supply
|
||||
retries: 0
|
||||
filter: tps
|
||||
# token: "dubbo"
|
||||
# application: "1234"
|
||||
tps.limiter: method-service
|
||||
tps.limit.strategy: fixedWindow
|
||||
tps.limit.rejected.handler: DefaultValueHandler
|
||||
tps.limit.interval: 1000
|
||||
tps.limit.rate: 3
|
||||
warmup: 100 #预热时间
|
||||
logger:
|
||||
zap-config:
|
||||
level: info # 日志级别
|
||||
@ -115,8 +70,4 @@ dubbo:
|
||||
# 是否使用本地时间,默认使用 UTC 时间
|
||||
localTime: true
|
||||
# 是否压缩日志文件,压缩方法 gzip
|
||||
compress: false
|
||||
|
||||
|
||||
|
||||
|
||||
compress: false
|
18
conf/test/sdk.real.yaml
Normal file
18
conf/test/sdk.real.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
# endorseService Info
|
||||
# testNet addrs
|
||||
endorseServiceHost: "39.156.69.83:37100"
|
||||
complianceCheck:
|
||||
# 是否需要进行合规性背书
|
||||
isNeedComplianceCheck: false
|
||||
# 是否需要支付合规性背书费用
|
||||
isNeedComplianceCheckFee: false
|
||||
# 合规性背书费用
|
||||
complianceCheckEndorseServiceFee: 400
|
||||
# 支付合规性背书费用的收款地址
|
||||
complianceCheckEndorseServiceFeeAddr: aB2hpHnTBDxko3UoP2BpBZRujwhdcAFoT
|
||||
# 如果通过合规性检查,签发认证签名的地址
|
||||
complianceCheckEndorseServiceAddr: jknGxa6eyum1JrATWvSJKW3thJ9GKHA9n
|
||||
#创建平行链所需要的最低费用
|
||||
minNewChainAmount: "100"
|
||||
crypto: "xchain"
|
||||
txVersion: 1
|
18
conf/test/sdk.test.yaml
Normal file
18
conf/test/sdk.test.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
# endorseService Info
|
||||
# testNet addrs
|
||||
endorseServiceHost: "14.215.179.74:37101"
|
||||
complianceCheck:
|
||||
# 是否需要进行合规性背书
|
||||
isNeedComplianceCheck: true
|
||||
# 是否需要支付合规性背书费用
|
||||
isNeedComplianceCheckFee: true
|
||||
# 合规性背书费用
|
||||
complianceCheckEndorseServiceFee: 100
|
||||
# 支付合规性背书费用的收款地址
|
||||
complianceCheckEndorseServiceFeeAddr: cHvBK1TTB52GYtVxHK7HnW8N9RTqkN99R
|
||||
# 如果通过合规性检查,签发认证签名的地址
|
||||
complianceCheckEndorseServiceAddr: XDxkpQkfLwG6h56e896f3vBHhuN5g6M9u
|
||||
#创建平行链所需要的最低费用
|
||||
minNewChainAmount: "100"
|
||||
crypto: "xchain"
|
||||
txVersion: 1
|
18
conf/test/sdk.yaml
Normal file
18
conf/test/sdk.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
# endorseService Info
|
||||
# testNet addrs
|
||||
# endorseServiceHost: "120.48.24.223:37101"
|
||||
endorseServiceHost: "127.0.0.1:37101"
|
||||
complianceCheck:
|
||||
# 是否需要进行合规性背书
|
||||
isNeedComplianceCheck: false
|
||||
# 是否需要支付合规性背书费用
|
||||
isNeedComplianceCheckFee: false
|
||||
# 合规性背书费用
|
||||
complianceCheckEndorseServiceFee: 400
|
||||
# 支付合规性背书费用的收款地址
|
||||
complianceCheckEndorseServiceFeeAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42
|
||||
# 如果通过合规性检查,签发认证签名的地址
|
||||
complianceCheckEndorseServiceAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42
|
||||
#创建平行链所需要的最低费用
|
||||
minNewChainAmount: "100"
|
||||
crypto: "xchain"
|
@ -1,29 +0,0 @@
|
||||
[system]
|
||||
mode = dev #正式prod #测试dev
|
||||
|
||||
[mysql]
|
||||
Db = mysql
|
||||
DbHost = 127.0.0.1
|
||||
DbPort = 3306
|
||||
DbUser = root
|
||||
DbPassWord = 123456
|
||||
DbName = artistmgmttest
|
||||
|
||||
[redis]
|
||||
RedisDB = 2
|
||||
RedisAddr = 127.0.0.1:6379
|
||||
#RedisPW = "nDCTrfTtBu3Pw"
|
||||
#RedisDBNAme =
|
||||
|
||||
[chain]
|
||||
IP=127.0.0.1:37101
|
||||
MnemonicWords=知 睡 迷 纤 纲 耀 镜 婆 渡 考 拔 百
|
||||
ContractAccount=XC8214684261867838@xuper
|
||||
ContractName=fp001
|
||||
|
||||
[zap_log]
|
||||
level: "info"
|
||||
filename: "logs/artist_server.log"
|
||||
max_size: 200
|
||||
max_age: 30
|
||||
max_backups: 7
|
@ -1,122 +0,0 @@
|
||||
dubbo:
|
||||
metrics:
|
||||
enable: true # default is true
|
||||
path: /metrics # default is /metrics
|
||||
port: 9091 # default is 9090
|
||||
namespace: dubboArtist # default is dubbo 作为数据上报 metrics 的前
|
||||
registries:
|
||||
demoZK:
|
||||
protocol: zookeeper
|
||||
timeout: 120s
|
||||
address: 127.0.0.1:2181
|
||||
# address: 121.229.45.214:9004
|
||||
# address: 114.218.158.24:2181
|
||||
# address: zookeeper:2181
|
||||
protocols:
|
||||
triple: #triple
|
||||
name: tri
|
||||
# ip: 121.229.45.214
|
||||
port: 20050
|
||||
provider:
|
||||
services:
|
||||
ArtistInfoUserProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoUser
|
||||
retries: 100
|
||||
ArtistInfoArtworkProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoArtwork
|
||||
retries: 100
|
||||
ArtistInfoArtshowProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoArtshow
|
||||
retries: 100
|
||||
ArtistInfoContractProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoContract
|
||||
retries: 100
|
||||
ArtistInfoStatementProvider:
|
||||
interface: com.fontree.microservices.common.ArtistInfoStatement
|
||||
retries: 100
|
||||
#ContractProvider:
|
||||
# interface: com.fontree.microservices.common.Contract
|
||||
# retries: 0
|
||||
#ArtWorkProvider:
|
||||
# interface: com.fontree.microservices.common.ArtWork
|
||||
# retries: 0
|
||||
#SupplyProvider:
|
||||
# interface: com.fontree.microservices.common.Supply
|
||||
# retries: 0
|
||||
consumer:
|
||||
request-timeout: 120s
|
||||
references:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
ArtistClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Artist
|
||||
ArtistInfoClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.ArtistInfo
|
||||
ContractClientImpl:
|
||||
timeout: 15s
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.contract
|
||||
filter: cshutdown,sign
|
||||
params:
|
||||
.accessKeyId: "SYD8-Chain-04"
|
||||
.secretAccessKey: "Al-Chain-FDF112"
|
||||
ArtworkClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Artwork
|
||||
ArtworkQueryClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.ArtworkQuery
|
||||
SupplyClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Supply
|
||||
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: "logs/artist_server.log"
|
||||
# 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB
|
||||
maxSize: 10
|
||||
# 日志保留的最大天数(只保留最近多少天的日志)
|
||||
maxAge: 15
|
||||
# 只保留最近多少个日志文件,用于控制程序总日志的大小
|
||||
maxBackups: 10
|
||||
# 是否使用本地时间,默认使用 UTC 时间
|
||||
localTime: true
|
||||
# 是否压缩日志文件,压缩方法 gzip
|
||||
compress: false
|
||||
|
||||
|
||||
|
||||
|
39
go.mod
39
go.mod
@ -1,9 +1,9 @@
|
||||
module github.com/fonchain/fonchain-artistinfo
|
||||
module github.com/fonchain-artistserver
|
||||
|
||||
go 1.18
|
||||
go 1.17
|
||||
|
||||
replace (
|
||||
//github.com/fonchain/electronic-contract => ../electronic-contract
|
||||
github.com/fonchain/electronic-contract => ../electronic-contract
|
||||
github.com/fonchain/utils/objstorage => ../utils/objstorage
|
||||
github.com/fonchain/utils/utils => ../utils/utils
|
||||
github.com/fonchain_enterprise/utils/aes => ../utils/aes
|
||||
@ -17,25 +17,20 @@ require (
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.1
|
||||
github.com/dubbogo/grpc-go v1.42.9
|
||||
github.com/dubbogo/triple v1.1.8
|
||||
github.com/envoyproxy/protoc-gen-validate v0.9.1
|
||||
github.com/fonchain/electronic-contract v0.0.0-00010101000000-000000000000
|
||||
github.com/fonchain/utils/objstorage v0.0.0-00010101000000-000000000000
|
||||
github.com/fonchain/utils/utils v0.0.0-00010101000000-000000000000
|
||||
github.com/fonchain_enterprise/utils/aes v0.0.0-00010101000000-000000000000
|
||||
github.com/gin-gonic/gin v1.8.1
|
||||
github.com/go-redis/redis v6.15.9+incompatible
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/mwitkow/go-proto-validators v0.3.2
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
|
||||
go.uber.org/zap v1.21.0
|
||||
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69
|
||||
google.golang.org/protobuf v1.28.1
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b
|
||||
google.golang.org/protobuf v1.28.0
|
||||
gopkg.in/ini.v1 v1.66.4
|
||||
gorm.io/driver/mysql v1.4.4
|
||||
gorm.io/gorm v1.24.1
|
||||
gorm.io/plugin/soft_delete v1.2.0
|
||||
)
|
||||
|
||||
require (
|
||||
@ -66,7 +61,7 @@ require (
|
||||
github.com/fsnotify/fsnotify v1.5.1 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/go-co-op/gocron v1.18.0 // indirect
|
||||
github.com/go-co-op/gocron v1.9.0 // indirect
|
||||
github.com/go-errors/errors v1.0.1 // indirect
|
||||
github.com/go-kit/log v0.1.0 // indirect
|
||||
github.com/go-logfmt/logfmt v0.5.0 // indirect
|
||||
@ -80,7 +75,8 @@ require (
|
||||
github.com/goccy/go-json v0.9.7 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/mock v1.4.4 // indirect
|
||||
github.com/golang/mock v1.6.0 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/google/go-cmp v0.5.7 // indirect
|
||||
github.com/google/gofuzz v1.1.0 // indirect
|
||||
@ -116,6 +112,7 @@ require (
|
||||
github.com/pelletier/go-toml v1.9.4 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
|
||||
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/polarismesh/polaris-go v1.0.1 // indirect
|
||||
github.com/prometheus/client_golang v1.12.1 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
@ -123,15 +120,15 @@ require (
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/prometheus/statsd_exporter v0.21.0 // indirect
|
||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
|
||||
github.com/shirou/gopsutil v3.20.11+incompatible // indirect
|
||||
github.com/shirou/gopsutil/v3 v3.21.6 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/spf13/afero v1.9.2 // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/spf13/cast v1.4.1 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.11.0 // indirect
|
||||
github.com/stretchr/objx v0.4.0 // indirect
|
||||
github.com/subosito/gotenv v1.2.0 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.6 // indirect
|
||||
github.com/tklauser/numcpus v0.2.2 // indirect
|
||||
@ -146,18 +143,18 @@ require (
|
||||
go.opencensus.io v0.23.0 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
golang.org/x/crypto v0.5.0 // indirect
|
||||
golang.org/x/net v0.5.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.4.0 // indirect
|
||||
golang.org/x/text v0.6.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
|
||||
golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect
|
||||
google.golang.org/grpc v1.45.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
||||
k8s.io/apimachinery v0.22.4 // indirect
|
||||
k8s.io/klog/v2 v2.9.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
|
||||
|
216
go.sum
216
go.sum
@ -17,15 +17,31 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb
|
||||
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
|
||||
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
|
||||
cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY=
|
||||
cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
|
||||
cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
|
||||
cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
|
||||
cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=
|
||||
cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM=
|
||||
cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=
|
||||
cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=
|
||||
cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=
|
||||
cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
|
||||
cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
|
||||
cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=
|
||||
cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A=
|
||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
||||
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
|
||||
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
|
||||
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
||||
cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow=
|
||||
cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM=
|
||||
cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
||||
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
|
||||
cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY=
|
||||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
|
||||
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
||||
@ -101,6 +117,7 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
||||
github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
|
||||
github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
|
||||
@ -144,6 +161,7 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
@ -175,6 +193,7 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
|
||||
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
|
||||
@ -225,6 +244,7 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB
|
||||
github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
|
||||
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw=
|
||||
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/emicklei/go-restful/v3 v3.7.3 h1:06a5brwUhivED9WAFB3Q1JZDhirpnHlCdEVhGz3PSfc=
|
||||
github.com/emicklei/go-restful/v3 v3.7.3/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
@ -239,14 +259,14 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m
|
||||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||
github.com/envoyproxy/go-control-plane v0.10.0/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w=
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
|
||||
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239/go.mod h1:Gdwt2ce0yfBxPvZrHkprdPPTTS3N5rwmLE8T22KBXlw=
|
||||
github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
||||
@ -271,9 +291,8 @@ github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR
|
||||
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
|
||||
github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24=
|
||||
github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-co-op/gocron v1.9.0 h1:+V+DDenw3ryB7B+tK1bAIC5p0ruw4oX9IqAsdRnGIf0=
|
||||
github.com/go-co-op/gocron v1.9.0/go.mod h1:DbJm9kdgr1sEvWpHCA7dFFs/PGHPMil9/97EXCRPr4k=
|
||||
github.com/go-co-op/gocron v1.18.0 h1:SxTyJ5xnSN4byCq7b10LmmszFdxQlSQJod8s3gbnXxA=
|
||||
github.com/go-co-op/gocron v1.18.0/go.mod h1:sD/a0Aadtw5CpflUJ/lpP9Vfdk979Wl1Sg33HPHg0FY=
|
||||
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
|
||||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
@ -330,7 +349,6 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
@ -352,8 +370,10 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU
|
||||
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
|
||||
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
|
||||
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
|
||||
github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
@ -375,6 +395,7 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc=
|
||||
@ -409,6 +430,7 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
@ -419,6 +441,11 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
|
||||
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
@ -427,6 +454,10 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
|
||||
github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
|
||||
github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM=
|
||||
github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
|
||||
github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
|
||||
@ -458,22 +489,28 @@ github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1
|
||||
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw=
|
||||
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
|
||||
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
|
||||
github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0=
|
||||
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||
github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
|
||||
github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
|
||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
|
||||
@ -482,6 +519,7 @@ github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es
|
||||
github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
|
||||
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
|
||||
github.com/hashicorp/go-secure-stdlib/base62 v0.1.1/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw=
|
||||
github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I=
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8=
|
||||
@ -504,8 +542,12 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||
github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc=
|
||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
||||
github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
|
||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
||||
github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
|
||||
github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
|
||||
github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q=
|
||||
github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M=
|
||||
github.com/hashicorp/vault/sdk v0.3.0 h1:kR3dpxNkhh/wr6ycaJYqp6AFT/i2xaftbfnwZduTKEY=
|
||||
@ -526,7 +568,6 @@ github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg=
|
||||
github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
@ -607,22 +648,25 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
|
||||
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-sqlite3 v1.14.3 h1:j7a/xn1U6TKA/PHHxqZuzh64CdtRc7rU9M+AvkOl5bA=
|
||||
github.com/mattn/go-sqlite3 v1.14.3/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
|
||||
github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
|
||||
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
|
||||
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
||||
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
|
||||
@ -658,8 +702,6 @@ github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOl
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-proto-validators v0.3.2 h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos=
|
||||
github.com/mwitkow/go-proto-validators v0.3.2/go.mod h1:ej0Qp0qMgHN/KtDyUt+Q1/tA7a5VarXUOUxD+oeD30w=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
github.com/nacos-group/nacos-sdk-go v1.0.8/go.mod h1:hlAPn3UdzlxIlSILAyOXKxjFSvDJ9oLzTJ9hLAK1KzA=
|
||||
github.com/nacos-group/nacos-sdk-go v1.1.0 h1:6ESrAegx2pqp3Vi8mqDi7s2Vq+I+u0oYLn646K4wx6o=
|
||||
@ -715,6 +757,7 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9
|
||||
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
|
||||
github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
|
||||
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
|
||||
github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU=
|
||||
github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
@ -737,6 +780,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
|
||||
github.com/polarismesh/polaris-go v1.0.1 h1:Zqr8ZtxsJQsxt0MGyC/fFsF861ogoJCz16yWFJ/t54Q=
|
||||
github.com/polarismesh/polaris-go v1.0.1/go.mod h1:3NOqn3QquPdEdY6YhPrsWGvBVCpKhPBGt0Hspq3yEqY=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
||||
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
|
||||
@ -796,6 +840,7 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
|
||||
github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA=
|
||||
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM=
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
@ -825,8 +870,8 @@ github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0b
|
||||
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||
github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
|
||||
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
|
||||
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
|
||||
github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
|
||||
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
@ -851,9 +896,8 @@ github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3
|
||||
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
@ -861,8 +905,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ=
|
||||
@ -885,6 +929,7 @@ github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMW
|
||||
github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg=
|
||||
github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
|
||||
github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0=
|
||||
github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo=
|
||||
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
|
||||
github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw=
|
||||
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
|
||||
@ -990,6 +1035,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
@ -997,8 +1043,8 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh
|
||||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
|
||||
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
|
||||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=
|
||||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
@ -1015,9 +1061,8 @@ golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMk
|
||||
golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=
|
||||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69 h1:Lj6HJGCSn5AjxRAH2+r35Mir4icalbqku+CLUtjnvXY=
|
||||
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
@ -1064,6 +1109,7 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
@ -1088,15 +1134,23 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY
|
||||
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
|
||||
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
|
||||
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220412020605-290c469a71a5 h1:bRb386wvrE+oBNdF1d/Xh9mQrfQ4ecYhW5qJ5GvTGT4=
|
||||
golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@ -1106,9 +1160,18 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
|
||||
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
|
||||
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
|
||||
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE=
|
||||
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -1119,9 +1182,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@ -1147,6 +1209,8 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -1159,6 +1223,7 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -1185,26 +1250,44 @@ golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211106132015-ebca88c72f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@ -1215,9 +1298,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
|
||||
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@ -1247,6 +1329,7 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
@ -1290,13 +1373,17 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
|
||||
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U=
|
||||
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
|
||||
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
|
||||
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
|
||||
@ -1321,6 +1408,23 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513
|
||||
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
|
||||
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
|
||||
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
|
||||
google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
|
||||
google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
|
||||
google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=
|
||||
google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=
|
||||
google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
|
||||
google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
|
||||
google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
|
||||
google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
|
||||
google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
|
||||
google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
|
||||
google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU=
|
||||
google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
|
||||
google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo=
|
||||
google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g=
|
||||
google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA=
|
||||
google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8=
|
||||
google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
@ -1373,9 +1477,42 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D
|
||||
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210106152847-07624b53cd92/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
|
||||
google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
|
||||
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
|
||||
google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
|
||||
google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
|
||||
google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=
|
||||
google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
|
||||
google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
|
||||
google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
|
||||
google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
|
||||
google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
|
||||
google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
|
||||
google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
|
||||
google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
|
||||
google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
|
||||
google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
|
||||
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg=
|
||||
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
|
||||
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
@ -1405,13 +1542,19 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv
|
||||
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
|
||||
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
|
||||
google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
|
||||
google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M=
|
||||
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
@ -1425,9 +1568,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
@ -1468,20 +1610,13 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/driver/mysql v1.4.4 h1:MX0K9Qvy0Na4o7qSC/YI7XxqUw5KDw01umqgID+svdQ=
|
||||
gorm.io/driver/mysql v1.4.4/go.mod h1:BCg8cKI+R0j/rZRQxeKis/forqRwRSYOR8OM3Wo6hOM=
|
||||
gorm.io/driver/sqlite v1.1.3 h1:BYfdVuZB5He/u9dt4qDpZqiqDJ6KhPqs5QUqsr/Eeuc=
|
||||
gorm.io/driver/sqlite v1.1.3/go.mod h1:AKDgRWk8lcSQSw+9kxCJnX/yySj8G3rdwYlU57cB45c=
|
||||
gorm.io/gorm v1.20.1/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
|
||||
gorm.io/gorm v1.23.0/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||
gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||
gorm.io/gorm v1.24.1 h1:CgvzRniUdG67hBAzsxDGOAuq4Te1osVMYsa1eQbd4fs=
|
||||
gorm.io/gorm v1.24.1/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
|
||||
gorm.io/plugin/soft_delete v1.2.0 h1:txWHRMqLPqfXUFytXCdxb/jthRe3CrG4R5XOdagut6Q=
|
||||
gorm.io/plugin/soft_delete v1.2.0/go.mod h1:Zv7vQctOJTGOsJ/bWgrN1n3od0GBAZgnLjEx+cApLGk=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
@ -1515,6 +1650,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ=
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno=
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user