合并分支 'test' 到 'master'
Test 查看合并请求 !8
正在显示
95 个修改的文件
包含
2490 行增加
和
369 行删除
1 | -FROM 192.168.0.243:5000/mmm/allied-creation-gateway:20210809 | ||
2 | -ENV APP_DIR $GOPATH/src/project-20210916 | 1 | +FROM 192.168.0.243:5000/mmm/allied-creation-gateway:libfontconfig |
2 | +ENV APP_DIR $GOPATH/src/project-20211210 | ||
3 | RUN mkdir -p $APP_DIR | 3 | RUN mkdir -p $APP_DIR |
4 | WORKDIR $APP_DIR/ | 4 | WORKDIR $APP_DIR/ |
5 | COPY ./pkg pkg | 5 | COPY ./pkg pkg |
6 | COPY ./config config | 6 | COPY ./config config |
7 | +#COPY ./cmd/pdftopng cmd/pdftopng | ||
7 | COPY ./go.mod go.mod | 8 | COPY ./go.mod go.mod |
8 | COPY ./go.sum go.sum | 9 | COPY ./go.sum go.sum |
9 | COPY ./main.go main.go | 10 | COPY ./main.go main.go |
11 | +RUN chmod +x cmd/pdftopng | ||
10 | RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"] | 12 | RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"] |
11 | ENV GO111MODULE on | 13 | ENV GO111MODULE on |
12 | ENV GOPROXY https://goproxy.cn | 14 | ENV GOPROXY https://goproxy.cn |
cmd/pdftopng
0 → 100644
不能预览此文件类型
@@ -103,6 +103,8 @@ spec: | @@ -103,6 +103,8 @@ spec: | ||
103 | value: "false" | 103 | value: "false" |
104 | - name: HTTP_PORT | 104 | - name: HTTP_PORT |
105 | value: "8082" | 105 | value: "8082" |
106 | + - name: SUPLUS_ADMIN_BASE_HOST | ||
107 | + value: "http://suplus-admin-base-dev.fjmaimaimai.com" | ||
106 | - name: ALLIED_CREATION_GATEWAY_HOST | 108 | - name: ALLIED_CREATION_GATEWAY_HOST |
107 | value: "https://allied-creation-gateway-dev.fjmaimaimai.com" | 109 | value: "https://allied-creation-gateway-dev.fjmaimaimai.com" |
108 | - name: ALLIED_CREATION_USER_HOST | 110 | - name: ALLIED_CREATION_USER_HOST |
@@ -113,6 +115,8 @@ spec: | @@ -113,6 +115,8 @@ spec: | ||
113 | value: "http://allied-creation-basic-dev.fjmaimaimai.com" | 115 | value: "http://allied-creation-basic-dev.fjmaimaimai.com" |
114 | - name: SMS_SERVE_HOST | 116 | - name: SMS_SERVE_HOST |
115 | value: "https://sms.fjmaimaimai.com:9897" | 117 | value: "https://sms.fjmaimaimai.com:9897" |
118 | + - name: SUPLUS_SALE_APP | ||
119 | + value: "http://suplus-sale-app-gateway-test.fjmaimaimai.com" | ||
116 | # - name: REDIS_HOST | 120 | # - name: REDIS_HOST |
117 | # valueFrom: | 121 | # valueFrom: |
118 | # configMapKeyRef: | 122 | # configMapKeyRef: |
@@ -107,6 +107,10 @@ spec: | @@ -107,6 +107,10 @@ spec: | ||
107 | value: "false" | 107 | value: "false" |
108 | - name: HTTP_PORT | 108 | - name: HTTP_PORT |
109 | value: "8082" | 109 | value: "8082" |
110 | + - name: SUPLUS_ADMIN_BASE_HOST | ||
111 | + value: "http://suplus-admin-base-prd.fjmaimaimai.com" | ||
112 | + - name: ALLIED_CREATION_GATEWAY_HOST | ||
113 | + value: "https://allied-creation-gateway-prd.fjmaimaimai.com" | ||
110 | - name: ALLIED_CREATION_USER_HOST | 114 | - name: ALLIED_CREATION_USER_HOST |
111 | value: "https://allied-creation-user-prd.fjmaimaimai.com" | 115 | value: "https://allied-creation-user-prd.fjmaimaimai.com" |
112 | - name: ALLIED_CREATION_COOPERATION_HOST | 116 | - name: ALLIED_CREATION_COOPERATION_HOST |
@@ -93,6 +93,8 @@ spec: | @@ -93,6 +93,8 @@ spec: | ||
93 | key: redis.port | 93 | key: redis.port |
94 | - name: REDIS_AUTH | 94 | - name: REDIS_AUTH |
95 | value: "" | 95 | value: "" |
96 | + - name: KAFKA_HOST | ||
97 | + value: "192.168.0.250:9092,192.168.0.251:9092,192.168.0.252:9092" | ||
96 | - name: LOG_LEVEL | 98 | - name: LOG_LEVEL |
97 | value: "debug" | 99 | value: "debug" |
98 | - name: LOG_FRAMEWORK | 100 | - name: LOG_FRAMEWORK |
@@ -108,7 +110,7 @@ spec: | @@ -108,7 +110,7 @@ spec: | ||
108 | - name: HTTP_PORT | 110 | - name: HTTP_PORT |
109 | value: "8082" | 111 | value: "8082" |
110 | - name: SUPLUS_ADMIN_BASE_HOST | 112 | - name: SUPLUS_ADMIN_BASE_HOST |
111 | - value: "http://suplus-admin-base-test.fjmaimaimai.com" | 113 | + value: "http://suplus-admin-base-dev.fjmaimaimai.com" |
112 | - name: ALLIED_CREATION_GATEWAY_HOST | 114 | - name: ALLIED_CREATION_GATEWAY_HOST |
113 | value: "https://allied-creation-gateway-test.fjmaimaimai.com" | 115 | value: "https://allied-creation-gateway-test.fjmaimaimai.com" |
114 | - name: ALLIED_CREATION_USER_HOST | 116 | - name: ALLIED_CREATION_USER_HOST |
@@ -119,6 +121,8 @@ spec: | @@ -119,6 +121,8 @@ spec: | ||
119 | value: "https://allied-creation-basic-test.fjmaimaimai.com" | 121 | value: "https://allied-creation-basic-test.fjmaimaimai.com" |
120 | - name: SMS_SERVE_HOST | 122 | - name: SMS_SERVE_HOST |
121 | value: "https://sms.fjmaimaimai.com:9897" | 123 | value: "https://sms.fjmaimaimai.com:9897" |
124 | + - name: SUPLUS_SALE_APP | ||
125 | + value: "http://suplus-sale-app-gateway-test.fjmaimaimai.com" | ||
122 | # - name: REDIS_HOST | 126 | # - name: REDIS_HOST |
123 | # valueFrom: | 127 | # valueFrom: |
124 | # configMapKeyRef: | 128 | # configMapKeyRef: |
@@ -6,9 +6,14 @@ require ( | @@ -6,9 +6,14 @@ require ( | ||
6 | github.com/GeeTeam/gt3-golang-sdk v0.0.0-20200116043922-446ca8a507d2 | 6 | github.com/GeeTeam/gt3-golang-sdk v0.0.0-20200116043922-446ca8a507d2 |
7 | github.com/beego/beego/v2 v2.0.1 | 7 | github.com/beego/beego/v2 v2.0.1 |
8 | github.com/dgrijalva/jwt-go v3.2.0+incompatible | 8 | github.com/dgrijalva/jwt-go v3.2.0+incompatible |
9 | - github.com/forgoer/openssl v0.0.0-20210828150411-6c5378b5b719 // indirect | 9 | + github.com/disintegration/imaging v1.6.2 |
10 | + github.com/forgoer/openssl v0.0.0-20210828150411-6c5378b5b719 | ||
10 | github.com/go-pg/pg/v10 v10.10.1 | 11 | github.com/go-pg/pg/v10 v10.10.1 |
11 | - github.com/go-redis/redis v6.14.2+incompatible | 12 | + github.com/go-redis/redis v6.15.7+incompatible |
12 | github.com/google/uuid v1.1.1 | 13 | github.com/google/uuid v1.1.1 |
13 | github.com/linmadan/egglib-go v0.0.0-20210827085852-177fa745932d | 14 | github.com/linmadan/egglib-go v0.0.0-20210827085852-177fa745932d |
15 | + github.com/pdfcpu/pdfcpu v0.3.13 | ||
16 | + github.com/stretchr/testify v1.7.0 | ||
17 | + github.com/tal-tech/go-queue v1.0.5 | ||
18 | + golang.org/x/text v0.3.6 | ||
14 | ) | 19 | ) |
1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= | 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= |
2 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= | 2 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= |
3 | +github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= | ||
4 | +github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= | ||
3 | github.com/GeeTeam/gt3-golang-sdk v0.0.0-20200116043922-446ca8a507d2 h1:KBk8MKqHvIztjEW4KAKnR9VPT4iTZYz0D4Ju0GFVsV0= | 5 | github.com/GeeTeam/gt3-golang-sdk v0.0.0-20200116043922-446ca8a507d2 h1:KBk8MKqHvIztjEW4KAKnR9VPT4iTZYz0D4Ju0GFVsV0= |
4 | github.com/GeeTeam/gt3-golang-sdk v0.0.0-20200116043922-446ca8a507d2/go.mod h1:vqCh/LExdPmL5SULXE/9DHbuE4t3iLkzRYoNGxEvg/o= | 6 | github.com/GeeTeam/gt3-golang-sdk v0.0.0-20200116043922-446ca8a507d2/go.mod h1:vqCh/LExdPmL5SULXE/9DHbuE4t3iLkzRYoNGxEvg/o= |
5 | github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= | 7 | github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= |
@@ -7,12 +9,15 @@ github.com/Shopify/sarama v1.25.0 h1:ch1ywjRLjfJtU+EaiJ+l0rWffQ6TRpyYmW4DX7Cb2SU | @@ -7,12 +9,15 @@ github.com/Shopify/sarama v1.25.0 h1:ch1ywjRLjfJtU+EaiJ+l0rWffQ6TRpyYmW4DX7Cb2SU | ||
7 | github.com/Shopify/sarama v1.25.0/go.mod h1:y/CFFTO9eaMTNriwu/Q+W4eioLqiDMGkA1W+gmdfj8w= | 9 | github.com/Shopify/sarama v1.25.0/go.mod h1:y/CFFTO9eaMTNriwu/Q+W4eioLqiDMGkA1W+gmdfj8w= |
8 | github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= | 10 | github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= |
9 | github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= | 11 | github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= |
12 | +github.com/StackExchange/wmi v0.0.0-20170410192909-ea383cf3ba6e/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= | ||
10 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= | 13 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= |
11 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= | 14 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= |
12 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= | 15 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= |
13 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= | 16 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= |
14 | github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= | 17 | github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= |
15 | github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= | 18 | github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= |
19 | +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= | ||
20 | +github.com/beanstalkd/go-beanstalk v0.1.0/go.mod h1:/G8YTyChOtpOArwLTQPY1CHB+i212+av35bkPXXj56Y= | ||
16 | github.com/beego/beego/v2 v2.0.1 h1:07a7Z0Ok5vbqyqh+q53sDPl9LdhKh0ZDy3gbyGrhFnE= | 21 | github.com/beego/beego/v2 v2.0.1 h1:07a7Z0Ok5vbqyqh+q53sDPl9LdhKh0ZDy3gbyGrhFnE= |
17 | github.com/beego/beego/v2 v2.0.1/go.mod h1:8zyHi1FnWO1mZLwTn62aKRIZF/aIKvkCBB2JYs+eqQI= | 22 | github.com/beego/beego/v2 v2.0.1/go.mod h1:8zyHi1FnWO1mZLwTn62aKRIZF/aIKvkCBB2JYs+eqQI= |
18 | github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ= | 23 | github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ= |
@@ -21,26 +26,41 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 | @@ -21,26 +26,41 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 | ||
21 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= | 26 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= |
22 | github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= | 27 | github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= |
23 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= | 28 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= |
29 | +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= | ||
30 | +github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4= | ||
24 | github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60= | 31 | github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60= |
25 | github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE= | 32 | github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE= |
26 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= | 33 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= |
27 | github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= | 34 | github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= |
28 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= | 35 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= |
36 | +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= | ||
37 | +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= | ||
38 | +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= | ||
29 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= | 39 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= |
30 | github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= | 40 | github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= |
41 | +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= | ||
42 | +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= | ||
31 | github.com/coreos/etcd v3.3.25+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= | 43 | github.com/coreos/etcd v3.3.25+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= |
44 | +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= | ||
32 | github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= | 45 | github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= |
33 | github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= | 46 | github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= |
47 | +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= | ||
34 | github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= | 48 | github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= |
35 | github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= | 49 | github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= |
36 | github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= | 50 | github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= |
37 | github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= | 51 | github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= |
52 | +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= | ||
53 | +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= | ||
38 | github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= | 54 | github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= |
39 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | 55 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
40 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | 56 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= |
41 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | 57 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
58 | +github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4= | ||
42 | github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= | 59 | github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= |
43 | github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= | 60 | github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= |
61 | +github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= | ||
62 | +github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= | ||
63 | +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= | ||
44 | github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU= | 64 | github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU= |
45 | github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= | 65 | github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= |
46 | github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= | 66 | github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= |
@@ -52,39 +72,58 @@ github.com/elastic/go-elasticsearch/v6 v6.8.5 h1:U2HtkBseC1FNBmDr0TR2tKltL6FxoY+ | @@ -52,39 +72,58 @@ github.com/elastic/go-elasticsearch/v6 v6.8.5 h1:U2HtkBseC1FNBmDr0TR2tKltL6FxoY+ | ||
52 | github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI= | 72 | github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI= |
53 | github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= | 73 | github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= |
54 | github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= | 74 | github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= |
75 | +github.com/emicklei/proto v1.9.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= | ||
76 | +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= | ||
55 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= | 77 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= |
78 | +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= | ||
56 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= | 79 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= |
80 | +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= | ||
81 | +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= | ||
57 | github.com/forgoer/openssl v0.0.0-20210828150411-6c5378b5b719 h1:sBIoJbXC+QBD9kL00aAxi7dfJJ70YHhiKzSN9yeTjbU= | 82 | github.com/forgoer/openssl v0.0.0-20210828150411-6c5378b5b719 h1:sBIoJbXC+QBD9kL00aAxi7dfJJ70YHhiKzSN9yeTjbU= |
58 | github.com/forgoer/openssl v0.0.0-20210828150411-6c5378b5b719/go.mod h1:NMVFOzYeLVR7UiGTxsa+A21nrERTZ3Rv2JHDPcJpDyI= | 83 | github.com/forgoer/openssl v0.0.0-20210828150411-6c5378b5b719/go.mod h1:NMVFOzYeLVR7UiGTxsa+A21nrERTZ3Rv2JHDPcJpDyI= |
59 | github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= | 84 | github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= |
60 | github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= | 85 | github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= |
61 | -github.com/frankban/quicktest v1.4.1 h1:Wv2VwvNn73pAdFIVUQRXYDFp31lXKbqblIXo/Q5GPSg= | ||
62 | github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= | 86 | github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= |
87 | +github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3BTYk= | ||
88 | +github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= | ||
63 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= | 89 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= |
64 | github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= | 90 | github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= |
65 | github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= | 91 | github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= |
92 | +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= | ||
66 | github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw= | 93 | github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw= |
94 | +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= | ||
67 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= | 95 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= |
68 | github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= | 96 | github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= |
69 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= | 97 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= |
70 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= | 98 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= |
99 | +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= | ||
71 | github.com/go-pg/pg/v10 v10.7.7/go.mod h1:d0w17Xw5x2DtbD/UgB9rnZg3FAck3eDHXff0Srrzuuk= | 100 | github.com/go-pg/pg/v10 v10.7.7/go.mod h1:d0w17Xw5x2DtbD/UgB9rnZg3FAck3eDHXff0Srrzuuk= |
72 | github.com/go-pg/pg/v10 v10.10.1 h1:82lLX4KGs2wOFOvVVIICoU0Si1fLu6Aitniu73HaDuM= | 101 | github.com/go-pg/pg/v10 v10.10.1 h1:82lLX4KGs2wOFOvVVIICoU0Si1fLu6Aitniu73HaDuM= |
73 | github.com/go-pg/pg/v10 v10.10.1/go.mod h1:EmoJGYErc+stNN/1Jf+o4csXuprjxcRztBnn6cHe38E= | 102 | github.com/go-pg/pg/v10 v10.10.1/go.mod h1:EmoJGYErc+stNN/1Jf+o4csXuprjxcRztBnn6cHe38E= |
74 | github.com/go-pg/zerochecker v0.2.0 h1:pp7f72c3DobMWOb2ErtZsnrPaSvHd2W4o9//8HtF4mU= | 103 | github.com/go-pg/zerochecker v0.2.0 h1:pp7f72c3DobMWOb2ErtZsnrPaSvHd2W4o9//8HtF4mU= |
75 | github.com/go-pg/zerochecker v0.2.0/go.mod h1:NJZ4wKL0NmTtz0GKCoJ8kym6Xn/EQzXRl2OnAe7MmDo= | 104 | github.com/go-pg/zerochecker v0.2.0/go.mod h1:NJZ4wKL0NmTtz0GKCoJ8kym6Xn/EQzXRl2OnAe7MmDo= |
76 | -github.com/go-redis/redis v6.14.2+incompatible h1:UE9pLhzmWf+xHNmZsoccjXosPicuiNaInPgym8nzfg0= | ||
77 | github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= | 105 | github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= |
106 | +github.com/go-redis/redis v6.15.7+incompatible h1:3skhDh95XQMpnqeqNftPkQD9jL9e5e36z/1SUm6dy1U= | ||
107 | +github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= | ||
78 | github.com/go-redis/redis/v7 v7.4.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= | 108 | github.com/go-redis/redis/v7 v7.4.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= |
109 | +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= | ||
79 | github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= | 110 | github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= |
80 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= | 111 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= |
112 | +github.com/go-xorm/builder v0.3.4/go.mod h1:KxkQkNN1DpPKTedxXyTQcmH+rXfvk4LZ9SOOBoZBAxw= | ||
113 | +github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:56xuuqnHyryaerycW3BfssRdxQstACi0Epw/yC5E2xM= | ||
114 | +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= | ||
81 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= | 115 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= |
116 | +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= | ||
82 | github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= | 117 | github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= |
83 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= | 118 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= |
119 | +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= | ||
120 | +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= | ||
84 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= | 121 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= |
122 | +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= | ||
85 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | 123 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
86 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | 124 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
87 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | 125 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
126 | +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= | ||
88 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= | 127 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= |
89 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= | 128 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= |
90 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= | 129 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= |
@@ -99,6 +138,7 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l | @@ -99,6 +138,7 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l | ||
99 | github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= | 138 | github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= |
100 | github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= | 139 | github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= |
101 | github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= | 140 | github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= |
141 | +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= | ||
102 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= | 142 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= |
103 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | 143 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= |
104 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | 144 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= |
@@ -108,39 +148,80 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ | @@ -108,39 +148,80 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ | ||
108 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= | 148 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= |
109 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | 149 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
110 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= | 150 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= |
151 | +github.com/google/gops v0.3.7/go.mod h1:bj0cwMmX1X4XIJFTjR99R5sCxNssNJ8HebFNvoQlmgY= | ||
111 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= | 152 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= |
153 | +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||
112 | github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= | 154 | github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= |
113 | github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | 155 | github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= |
156 | +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= | ||
157 | +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= | ||
158 | +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= | ||
114 | github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= | 159 | github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= |
160 | +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= | ||
161 | +github.com/grpc-ecosystem/grpc-gateway v1.14.3/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= | ||
162 | +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= | ||
163 | +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= | ||
115 | github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= | 164 | github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= |
116 | github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= | 165 | github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= |
117 | github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= | 166 | github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= |
118 | github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= | 167 | github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= |
168 | +github.com/hhrutter/lzw v0.0.0-20190827003112-58b82c5a41cc/go.mod h1:yJBvOcu1wLQ9q9XZmfiPfur+3dQJuIhYQsMGLYcItZk= | ||
169 | +github.com/hhrutter/lzw v0.0.0-20190829144645-6f07a24e8650 h1:1yY/RQWNSBjJe2GDCIYoLmpWVidrooriUr4QS/zaATQ= | ||
170 | +github.com/hhrutter/lzw v0.0.0-20190829144645-6f07a24e8650/go.mod h1:yJBvOcu1wLQ9q9XZmfiPfur+3dQJuIhYQsMGLYcItZk= | ||
171 | +github.com/hhrutter/tiff v0.0.0-20190829141212-736cae8d0bc7 h1:o1wMw7uTNyA58IlEdDpxIrtFHTgnvYzA8sCQz8luv94= | ||
172 | +github.com/hhrutter/tiff v0.0.0-20190829141212-736cae8d0bc7/go.mod h1:WkUxfS2JUu3qPo6tRld7ISb8HiC0gVSU91kooBMDVok= | ||
119 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= | 173 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= |
174 | +github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= | ||
175 | +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= | ||
120 | github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03 h1:FUwcHNlEqkqLjLBdCp5PRlCFijNjvcYANOZXzCfXwCM= | 176 | github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03 h1:FUwcHNlEqkqLjLBdCp5PRlCFijNjvcYANOZXzCfXwCM= |
121 | github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= | 177 | github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= |
122 | github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= | 178 | github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= |
123 | github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= | 179 | github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= |
180 | +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= | ||
181 | +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= | ||
124 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= | 182 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= |
183 | +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= | ||
184 | +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= | ||
125 | github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= | 185 | github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= |
126 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= | 186 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= |
187 | +github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= | ||
188 | +github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= | ||
189 | +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= | ||
190 | +github.com/keybase/go-ps v0.0.0-20161005175911-668c8856d999/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ= | ||
191 | +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= | ||
127 | github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= | 192 | github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= |
128 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= | 193 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= |
129 | -github.com/klauspost/compress v1.9.7 h1:hYW1gP94JUmAhBtJ+LNz5My+gBobDxPR1iVuKug26aA= | ||
130 | github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= | 194 | github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= |
195 | +github.com/klauspost/compress v1.9.8 h1:VMAMUUOh+gaxKTMk+zqbjsSjsIcUcL/LF4o63i82QyA= | ||
196 | +github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= | ||
131 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= | 197 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
198 | +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= | ||
132 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= | 199 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= |
133 | -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= | ||
134 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= | 200 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= |
201 | +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= | ||
202 | +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= | ||
135 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= | 203 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= |
136 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= | 204 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= |
137 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= | 205 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= |
138 | github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ= | 206 | github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ= |
139 | github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= | 207 | github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= |
208 | +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= | ||
140 | github.com/linmadan/egglib-go v0.0.0-20210827085852-177fa745932d h1:3C1xctwbWOdIFqUL1U2DGymTYLJrGOZxPaFu4SLsbkk= | 209 | github.com/linmadan/egglib-go v0.0.0-20210827085852-177fa745932d h1:3C1xctwbWOdIFqUL1U2DGymTYLJrGOZxPaFu4SLsbkk= |
141 | github.com/linmadan/egglib-go v0.0.0-20210827085852-177fa745932d/go.mod h1:sK2YggplSGTnGLm3kHobFa41MXuBwpqADilWwb8WHK0= | 210 | github.com/linmadan/egglib-go v0.0.0-20210827085852-177fa745932d/go.mod h1:sK2YggplSGTnGLm3kHobFa41MXuBwpqADilWwb8WHK0= |
211 | +github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= | ||
142 | github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= | 212 | github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= |
143 | github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= | 213 | github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= |
214 | +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= | ||
215 | +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= | ||
216 | +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= | ||
217 | +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= | ||
218 | +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= | ||
219 | +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= | ||
220 | +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= | ||
221 | +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= | ||
222 | +github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= | ||
223 | +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= | ||
224 | +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= | ||
144 | github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= | 225 | github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= |
145 | github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= | 226 | github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= |
146 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= | 227 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= |
@@ -153,27 +234,36 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb | @@ -153,27 +234,36 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb | ||
153 | github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= | 234 | github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= |
154 | github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= | 235 | github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= |
155 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= | 236 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= |
237 | +github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= | ||
156 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= | 238 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= |
157 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= | 239 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= |
158 | github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= | 240 | github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= |
159 | github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= | 241 | github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= |
242 | +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= | ||
243 | +github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= | ||
160 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= | 244 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= |
245 | +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= | ||
161 | github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= | 246 | github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= |
162 | github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= | 247 | github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= |
163 | github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= | 248 | github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= |
164 | github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= | 249 | github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= |
165 | github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= | 250 | github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= |
251 | +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= | ||
166 | github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= | 252 | github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= |
167 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= | 253 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= |
168 | github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= | 254 | github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= |
169 | github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= | 255 | github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= |
170 | github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= | 256 | github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= |
171 | github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= | 257 | github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= |
258 | +github.com/pdfcpu/pdfcpu v0.3.13 h1:VFon2Yo1PJt+sA57vPAeXWGLSZ7Ux3Jl4h02M0+s3dg= | ||
259 | +github.com/pdfcpu/pdfcpu v0.3.13/go.mod h1:UJc5xsXg0fpmjp1zOPdyYcAQArc/Zf3V0nv5URe+9fg= | ||
172 | github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= | 260 | github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= |
173 | github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= | 261 | github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= |
174 | github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= | 262 | github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= |
175 | -github.com/pierrec/lz4 v2.2.6+incompatible h1:6aCX4/YZ9v8q69hTyiR7dNLnTA3fgtKHVVW5BCd5Znw= | 263 | +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= |
176 | github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= | 264 | github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= |
265 | +github.com/pierrec/lz4 v2.5.1+incompatible h1:Yq0up0149Hh5Ekhm/91lgkZuD1ZDnXNM26bycpTzYBM= | ||
266 | +github.com/pierrec/lz4 v2.5.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= | ||
177 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | 267 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
178 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | 268 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
179 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= | 269 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= |
@@ -182,6 +272,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb | @@ -182,6 +272,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb | ||
182 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | 272 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= |
183 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= | 273 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= |
184 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= | 274 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= |
275 | +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= | ||
185 | github.com/prometheus/client_golang v1.7.0 h1:wCi7urQOGBsYcQROHqpUUX4ct84xp40t9R9JX0FuA/U= | 276 | github.com/prometheus/client_golang v1.7.0 h1:wCi7urQOGBsYcQROHqpUUX4ct84xp40t9R9JX0FuA/U= |
186 | github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= | 277 | github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= |
187 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= | 278 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= |
@@ -190,10 +281,12 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: | @@ -190,10 +281,12 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: | ||
190 | github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= | 281 | github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= |
191 | github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= | 282 | github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= |
192 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= | 283 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= |
284 | +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= | ||
193 | github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= | 285 | github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= |
194 | github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= | 286 | github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= |
195 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= | 287 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= |
196 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= | 288 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= |
289 | +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= | ||
197 | github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= | 290 | github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= |
198 | github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= | 291 | github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= |
199 | github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= | 292 | github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= |
@@ -202,9 +295,17 @@ github.com/richardlehane/mscfb v1.0.3 h1:rD8TBkYWkObWO0oLDFCbwMeZ4KoalxQy+QgniCj | @@ -202,9 +295,17 @@ github.com/richardlehane/mscfb v1.0.3 h1:rD8TBkYWkObWO0oLDFCbwMeZ4KoalxQy+QgniCj | ||
202 | github.com/richardlehane/mscfb v1.0.3/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= | 295 | github.com/richardlehane/mscfb v1.0.3/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= |
203 | github.com/richardlehane/msoleps v1.0.1 h1:RfrALnSNXzmXLbGct/P2b4xkFz4e8Gmj/0Vj9M9xC1o= | 296 | github.com/richardlehane/msoleps v1.0.1 h1:RfrALnSNXzmXLbGct/P2b4xkFz4e8Gmj/0Vj9M9xC1o= |
204 | github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= | 297 | github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= |
298 | +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= | ||
299 | +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= | ||
205 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= | 300 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= |
301 | +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= | ||
302 | +github.com/segmentio/kafka-go v0.4.2 h1:QXZ6q9Bu1JkAJQ/CQBb2Av8pFRG8LQ0kWCrLXgQyL8c= | ||
303 | +github.com/segmentio/kafka-go v0.4.2/go.mod h1:Inh7PqOsxmfgasV8InZYKVXWsdjcCq2d9tFV75GLbuM= | ||
206 | github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo= | 304 | github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo= |
207 | github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg= | 305 | github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg= |
306 | +github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= | ||
307 | +github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= | ||
308 | +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= | ||
208 | github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= | 309 | github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= |
209 | github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s= | 310 | github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s= |
210 | github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA= | 311 | github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA= |
@@ -212,6 +313,11 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx | @@ -212,6 +313,11 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx | ||
212 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= | 313 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= |
213 | github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= | 314 | github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= |
214 | github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= | 315 | github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= |
316 | +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= | ||
317 | +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= | ||
318 | +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= | ||
319 | +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= | ||
320 | +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= | ||
215 | github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE= | 321 | github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE= |
216 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | 322 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
217 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | 323 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
@@ -224,9 +330,17 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc | @@ -224,9 +330,17 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc | ||
224 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | 330 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= |
225 | github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= | 331 | github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= |
226 | github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= | 332 | github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= |
333 | +github.com/tal-tech/go-queue v1.0.5 h1:cd2o0lPjAFJKIXuEbQvsGypUhzz6FLib4FVVAyxsMtY= | ||
334 | +github.com/tal-tech/go-queue v1.0.5/go.mod h1:gQK4Eg8pqel8Z9r1hjlSXbJFavLeJQVyTSwBKeAnpm8= | ||
335 | +github.com/tal-tech/go-zero v1.0.21 h1:IB0c6zmkhUERcagSLPrlVT4oA74yE+l2w2K1ujW0sY8= | ||
336 | +github.com/tal-tech/go-zero v1.0.21/go.mod h1:llP5PQjnATfnzZo/lo5unjR41njzoL3lkGO/KXbnisw= | ||
337 | +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= | ||
338 | +github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= | ||
227 | github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= | 339 | github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= |
228 | github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= | 340 | github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= |
229 | github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= | 341 | github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= |
342 | +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= | ||
343 | +github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= | ||
230 | github.com/vmihailenco/bufpool v0.1.11 h1:gOq2WmBrq0i2yW5QJ16ykccQ4wH9UyEsgLm6czKAd94= | 344 | github.com/vmihailenco/bufpool v0.1.11 h1:gOq2WmBrq0i2yW5QJ16ykccQ4wH9UyEsgLm6czKAd94= |
231 | github.com/vmihailenco/bufpool v0.1.11/go.mod h1:AFf/MOy3l2CFTKbxwt0mp2MwnqjNEs5H/UxrkA5jxTQ= | 345 | github.com/vmihailenco/bufpool v0.1.11/go.mod h1:AFf/MOy3l2CFTKbxwt0mp2MwnqjNEs5H/UxrkA5jxTQ= |
232 | github.com/vmihailenco/msgpack/v5 v5.2.0/go.mod h1:fEM7KuHcnm0GvDCztRpw9hV0PuoO2ciTismP6vjggcM= | 346 | github.com/vmihailenco/msgpack/v5 v5.2.0/go.mod h1:fEM7KuHcnm0GvDCztRpw9hV0PuoO2ciTismP6vjggcM= |
@@ -237,28 +351,42 @@ github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgq | @@ -237,28 +351,42 @@ github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgq | ||
237 | github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= | 351 | github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= |
238 | github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= | 352 | github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= |
239 | github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= | 353 | github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= |
354 | +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= | ||
240 | github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= | 355 | github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= |
356 | +github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= | ||
241 | github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= | 357 | github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= |
358 | +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= | ||
359 | +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= | ||
242 | github.com/xuri/efp v0.0.0-20210322160811-ab561f5b45e3 h1:EpI0bqf/eX9SdZDwlMmahKM+CDBgNbsXMhsN28XrM8o= | 360 | github.com/xuri/efp v0.0.0-20210322160811-ab561f5b45e3 h1:EpI0bqf/eX9SdZDwlMmahKM+CDBgNbsXMhsN28XrM8o= |
243 | github.com/xuri/efp v0.0.0-20210322160811-ab561f5b45e3/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= | 361 | github.com/xuri/efp v0.0.0-20210322160811-ab561f5b45e3/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= |
244 | github.com/xuri/excelize/v2 v2.4.1 h1:veeeFLAJwsNEBPBlDepzPIYS1eLyBVcXNZUW79exZ1E= | 362 | github.com/xuri/excelize/v2 v2.4.1 h1:veeeFLAJwsNEBPBlDepzPIYS1eLyBVcXNZUW79exZ1E= |
245 | github.com/xuri/excelize/v2 v2.4.1/go.mod h1:rSu0C3papjzxQA3sdK8cU544TebhrPUoTOaGPIh0Q1A= | 363 | github.com/xuri/excelize/v2 v2.4.1/go.mod h1:rSu0C3papjzxQA3sdK8cU544TebhrPUoTOaGPIh0Q1A= |
364 | +github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2/go.mod h1:hzfGeIUDq/j97IG+FhNqkowIyEcD88LrW6fyU3K3WqY= | ||
365 | +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | ||
246 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | 366 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= |
247 | github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= | 367 | github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= |
368 | +github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= | ||
369 | +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= | ||
370 | +go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698/go.mod h1:YoUyTScD3Vcv2RBm3eGVOq7i1ULiz3OuXoQFWOirmAM= | ||
248 | go.etcd.io/etcd v3.3.25+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI= | 371 | go.etcd.io/etcd v3.3.25+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI= |
249 | go.opentelemetry.io/otel v0.17.0/go.mod h1:Oqtdxmf7UtEvL037ohlgnaYa1h7GtMh0NcSd9eqkC9s= | 372 | go.opentelemetry.io/otel v0.17.0/go.mod h1:Oqtdxmf7UtEvL037ohlgnaYa1h7GtMh0NcSd9eqkC9s= |
250 | go.opentelemetry.io/otel/metric v0.17.0/go.mod h1:hUz9lH1rNXyEwWAhIWCMFWKhYtpASgSnObJFnU26dJ0= | 373 | go.opentelemetry.io/otel/metric v0.17.0/go.mod h1:hUz9lH1rNXyEwWAhIWCMFWKhYtpASgSnObJFnU26dJ0= |
251 | go.opentelemetry.io/otel/oteltest v0.17.0/go.mod h1:JT/LGFxPwpN+nlsTiinSYjdIx3hZIGqHCpChcIZmdoE= | 374 | go.opentelemetry.io/otel/oteltest v0.17.0/go.mod h1:JT/LGFxPwpN+nlsTiinSYjdIx3hZIGqHCpChcIZmdoE= |
252 | go.opentelemetry.io/otel/trace v0.17.0/go.mod h1:bIujpqg6ZL6xUTubIUgziI1jSaUPthmabA/ygf/6Cfg= | 375 | go.opentelemetry.io/otel/trace v0.17.0/go.mod h1:bIujpqg6ZL6xUTubIUgziI1jSaUPthmabA/ygf/6Cfg= |
253 | go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= | 376 | go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= |
377 | +go.uber.org/automaxprocs v1.3.0 h1:II28aZoGdaglS5vVNnspf28lnZpXScxtIozx1lAjdb0= | ||
378 | +go.uber.org/automaxprocs v1.3.0/go.mod h1:9CWT6lKIep8U41DDaPiH6eFscnTyjfTANNQNx6LrIcA= | ||
254 | go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= | 379 | go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= |
255 | go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= | 380 | go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= |
381 | +go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= | ||
256 | go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= | 382 | go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= |
257 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= | 383 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= |
258 | golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= | 384 | golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= |
259 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= | 385 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= |
260 | golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= | 386 | golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= |
387 | +golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | ||
261 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | 388 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= |
389 | +golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | ||
262 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | 390 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= |
263 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= | 391 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= |
264 | golang.org/x/crypto v0.0.0-20210218145215-b8e89b74b9df/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= | 392 | golang.org/x/crypto v0.0.0-20210218145215-b8e89b74b9df/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= |
@@ -266,28 +394,38 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm | @@ -266,28 +394,38 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm | ||
266 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= | 394 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= |
267 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= | 395 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= |
268 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= | 396 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= |
397 | +golang.org/x/image v0.0.0-20190823064033-3a9bac650e44/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= | ||
398 | +golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= | ||
269 | golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk= | 399 | golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk= |
270 | golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= | 400 | golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= |
271 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= | 401 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= |
272 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= | 402 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= |
273 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= | 403 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= |
274 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= | 404 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= |
405 | +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= | ||
406 | +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= | ||
275 | golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= | 407 | golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= |
276 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= | 408 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= |
277 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= | 409 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= |
410 | +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= | ||
278 | golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= | 411 | golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= |
279 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= | 412 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= |
280 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | 413 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
281 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | 414 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
282 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | 415 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
283 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | 416 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
417 | +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
284 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | 418 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
285 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | 419 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= |
286 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | 420 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= |
287 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | 421 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
288 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | 422 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
423 | +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||
289 | golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | 424 | golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
425 | +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||
426 | +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||
290 | golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= | 427 | golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= |
428 | +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= | ||
291 | golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | 429 | golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= |
292 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | 430 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= |
293 | golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | 431 | golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= |
@@ -301,11 +439,15 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ | @@ -301,11 +439,15 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ | ||
301 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | 439 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
302 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | 440 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
303 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | 441 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
442 | +golang.org/x/sys v0.0.0-20171017063910-8dbc5d05d6ed/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
304 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | 443 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
305 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | 444 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
306 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | 445 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
446 | +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
307 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | 447 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
448 | +golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
308 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | 449 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
450 | +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
309 | golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 451 | golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
310 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 452 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
311 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 453 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
@@ -315,9 +457,14 @@ golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7w | @@ -315,9 +457,14 @@ golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7w | ||
315 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 457 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
316 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 458 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
317 | golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 459 | golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
460 | +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
461 | +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
462 | +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
463 | +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
318 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 464 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
319 | golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 465 | golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
320 | golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 466 | golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
467 | +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
321 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 468 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
322 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 469 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
323 | golang.org/x/sys v0.0.0-20210218155724-8ebf48af031b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | 470 | golang.org/x/sys v0.0.0-20210218155724-8ebf48af031b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
@@ -327,23 +474,30 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7 | @@ -327,23 +474,30 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7 | ||
327 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | 474 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
328 | golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= | 475 | golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= |
329 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= | 476 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= |
477 | +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | ||
330 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | 478 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |
331 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= | 479 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= |
332 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | 480 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= |
333 | golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= | 481 | golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= |
334 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | 482 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= |
483 | +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= | ||
484 | +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= | ||
485 | +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | ||
335 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | 486 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
336 | golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | 487 | golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
337 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | 488 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
338 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= | 489 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= |
339 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= | 490 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= |
491 | +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= | ||
340 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= | 492 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= |
341 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= | 493 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= |
342 | golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | 494 | golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
343 | golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | 495 | golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
344 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | 496 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
497 | +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | ||
345 | golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | 498 | golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
346 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= | 499 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
500 | +golang.org/x/tools v0.0.0-20200410132612-ae9902aceb98/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= | ||
347 | golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58 h1:1Bs6RVeBFtLZ8Yi1Hk07DiOqzvwLD/4hln4iahvFlag= | 501 | golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58 h1:1Bs6RVeBFtLZ8Yi1Hk07DiOqzvwLD/4hln4iahvFlag= |
348 | golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= | 502 | golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= |
349 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | 503 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
@@ -355,11 +509,16 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl | @@ -355,11 +509,16 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl | ||
355 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= | 509 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= |
356 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= | 510 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= |
357 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= | 511 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= |
512 | +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= | ||
358 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= | 513 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= |
514 | +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= | ||
359 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= | 515 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= |
360 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= | 516 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= |
517 | +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= | ||
518 | +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= | ||
361 | google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= | 519 | google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= |
362 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= | 520 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= |
521 | +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= | ||
363 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= | 522 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= |
364 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= | 523 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= |
365 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= | 524 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= |
@@ -368,6 +527,7 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi | @@ -368,6 +527,7 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi | ||
368 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= | 527 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= |
369 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= | 528 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= |
370 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= | 529 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= |
530 | +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= | ||
371 | google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= | 531 | google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= |
372 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= | 532 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= |
373 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= | 533 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= |
@@ -376,8 +536,12 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 | @@ -376,8 +536,12 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 | ||
376 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | 536 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
377 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= | 537 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= |
378 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | 538 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
539 | +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= | ||
540 | +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= | ||
379 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= | 541 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= |
380 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= | 542 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= |
543 | +gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0= | ||
544 | +gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= | ||
381 | gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= | 545 | gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= |
382 | gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= | 546 | gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= |
383 | gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= | 547 | gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= |
@@ -389,20 +553,30 @@ gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuv | @@ -389,20 +553,30 @@ gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuv | ||
389 | gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU= | 553 | gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU= |
390 | gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= | 554 | gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= |
391 | gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= | 555 | gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= |
556 | +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= | ||
392 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= | 557 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= |
393 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= | 558 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= |
559 | +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= | ||
394 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | 560 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
395 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | 561 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
562 | +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||
396 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | 563 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
397 | gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | 564 | gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
398 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | 565 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
399 | -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= | ||
400 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | 566 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
567 | +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= | ||
568 | +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= | ||
401 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= | 569 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= |
402 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | 570 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
403 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= | 571 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= |
404 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= | 572 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= |
405 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= | 573 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= |
574 | +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= | ||
406 | honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= | 575 | honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= |
407 | mellium.im/sasl v0.2.1 h1:nspKSRg7/SyO0cRGY71OkfHab8tf9kCts6a6oTDut0w= | 576 | mellium.im/sasl v0.2.1 h1:nspKSRg7/SyO0cRGY71OkfHab8tf9kCts6a6oTDut0w= |
408 | mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= | 577 | mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= |
578 | +rsc.io/goversion v1.0.0/go.mod h1:Eih9y/uIBS3ulggl7KNJ09xGSLcuNaLgmvvqa07sgfo= | ||
579 | +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||
580 | +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||
581 | +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= | ||
582 | +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= |
@@ -4,14 +4,18 @@ import ( | @@ -4,14 +4,18 @@ import ( | ||
4 | "github.com/beego/beego/v2/server/web" | 4 | "github.com/beego/beego/v2/server/web" |
5 | "github.com/linmadan/egglib-go/log/logrus" | 5 | "github.com/linmadan/egglib-go/log/logrus" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" |
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/broker" | ||
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/cache" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/cache" |
9 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/domainService" | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 10 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
11 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/util/blur" | ||
9 | 12 | ||
10 | _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego" | 13 | _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego" |
11 | ) | 14 | ) |
12 | 15 | ||
13 | func init() { | 16 | func init() { |
14 | cache.InitRedist() | 17 | cache.InitRedist() |
18 | + domainService.AdvancedSettingInit() | ||
15 | } | 19 | } |
16 | 20 | ||
17 | func main() { | 21 | func main() { |
@@ -19,5 +23,8 @@ func main() { | @@ -19,5 +23,8 @@ func main() { | ||
19 | w, _ := logrus.NewKafkaWriter(constant.KAFKA_HOST, constant.TOPIC_LOG_STASH, false) | 23 | w, _ := logrus.NewKafkaWriter(constant.KAFKA_HOST, constant.TOPIC_LOG_STASH, false) |
20 | log.Logger.AddHook(w) | 24 | log.Logger.AddHook(w) |
21 | } | 25 | } |
26 | + | ||
27 | + broker.RegisterDefaultPusherClient(constant.KAFKA_HOST, constant.TOPIC_UP_BLOCK_CHAIN) | ||
28 | + blur.InitDefaultConfig() | ||
22 | web.Run() | 29 | web.Run() |
23 | } | 30 | } |
pkg/application/auth/command/user_sign_up.go
0 → 100644
1 | +package command | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + "reflect" | ||
6 | + "strings" | ||
7 | + | ||
8 | + "github.com/beego/beego/v2/core/validation" | ||
9 | +) | ||
10 | + | ||
11 | +type UserSignUpCommand struct { | ||
12 | + // 企业名称 | ||
13 | + Name string `cname:"用户姓名" json:"userName" valid:"Required"` | ||
14 | + // 手机号码 | ||
15 | + Phone string `cname:"手机号码" json:"phone" valid:"Required"` | ||
16 | + // 密码 | ||
17 | + Password string `cname:"密码" json:"password" valid:"Required"` | ||
18 | + // 密码 | ||
19 | + SmsCode string `cname:"短信验证码" json:"smsCode" valid:"Required"` | ||
20 | +} | ||
21 | + | ||
22 | +func (companySignUpCommand *UserSignUpCommand) Valid(validation *validation.Validation) { | ||
23 | + //validation.SetError("CustomValid", "未实现的自定义认证") | ||
24 | +} | ||
25 | + | ||
26 | +func (companySignUpCommand *UserSignUpCommand) ValidateCommand() error { | ||
27 | + valid := validation.Validation{} | ||
28 | + b, err := valid.Valid(companySignUpCommand) | ||
29 | + if err != nil { | ||
30 | + return err | ||
31 | + } | ||
32 | + if !b { | ||
33 | + elem := reflect.TypeOf(companySignUpCommand).Elem() | ||
34 | + for _, validErr := range valid.Errors { | ||
35 | + field, isExist := elem.FieldByName(validErr.Field) | ||
36 | + if isExist { | ||
37 | + return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1)) | ||
38 | + } else { | ||
39 | + return fmt.Errorf(validErr.Message) | ||
40 | + } | ||
41 | + } | ||
42 | + } | ||
43 | + return nil | ||
44 | +} |
@@ -107,45 +107,36 @@ func (svr AuthService) AuthLoginSms(loginCommand *command.LoginSmsCommand) (inte | @@ -107,45 +107,36 @@ func (svr AuthService) AuthLoginSms(loginCommand *command.LoginSmsCommand) (inte | ||
107 | 107 | ||
108 | //AuthLoginQrcode 扫码登录 | 108 | //AuthLoginQrcode 扫码登录 |
109 | func (svr AuthService) AuthLoginQrcode(queryParam *query.QrcodeLoginStatusQuery) (interface{}, error) { | 109 | func (svr AuthService) AuthLoginQrcode(queryParam *query.QrcodeLoginStatusQuery) (interface{}, error) { |
110 | - qrmsg := domain.QrcodeMessage{} | ||
111 | failLoginData := map[string]interface{}{ | 110 | failLoginData := map[string]interface{}{ |
112 | "isLogin": false, | 111 | "isLogin": false, |
113 | "access": struct{}{}, | 112 | "access": struct{}{}, |
114 | } | 113 | } |
115 | - err := qrmsg.ParseToken(queryParam.Key) | 114 | + cache := cache.LoginQrcodeCache{} |
115 | + qrcodeMessage, err := cache.Get(queryParam.Key) | ||
116 | if err != nil { | 116 | if err != nil { |
117 | log.Logger.Error(err.Error()) | 117 | log.Logger.Error(err.Error()) |
118 | - return nil, application.ThrowError(application.TRANSACTION_ERROR, "二维码已失效") | 118 | + return nil, application.ThrowError(application.BUSINESS_ERROR, "二维码已失效") |
119 | } | 119 | } |
120 | - qrCache := cache.LoginQrcodeCache{} | ||
121 | - qrmsgCache, err := qrCache.Get(qrmsg.Id) | ||
122 | - if err != nil { | ||
123 | - log.Logger.Error(err.Error()) | ||
124 | - return nil, application.ThrowError(application.TRANSACTION_ERROR, "二维码已失效") | ||
125 | - } | ||
126 | - if !qrmsgCache.IsLogin { | 120 | + if !qrcodeMessage.IsLogin { |
127 | return failLoginData, nil | 121 | return failLoginData, nil |
128 | } | 122 | } |
123 | + | ||
129 | loginToken := domain.LoginToken{ | 124 | loginToken := domain.LoginToken{ |
130 | - UserId: qrmsgCache.UserId, | ||
131 | - UserBaseId: qrmsgCache.UserBaseId, | ||
132 | - Account: qrmsgCache.Account, | 125 | + UserId: qrcodeMessage.UserId, |
126 | + UserBaseId: qrcodeMessage.UserBaseId, | ||
127 | + Account: qrcodeMessage.Account, | ||
133 | Platform: domain.LoginPlatformWeb, | 128 | Platform: domain.LoginPlatformWeb, |
134 | - CompanyId: qrmsgCache.CompanyId, | ||
135 | - OrgId: qrmsgCache.OrgId, | ||
136 | - } | ||
137 | - // accessToken, err := loginToken.GenerateAccessToken() | ||
138 | - // if err != nil { | ||
139 | - // return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
140 | - // } | ||
141 | - qrCache.Remove(qrmsgCache.Id) | ||
142 | - // _ = accessToken | 129 | + CompanyId: qrcodeMessage.CompanyId, |
130 | + OrgId: qrcodeMessage.OrgId, | ||
131 | + } | ||
132 | + cache.Remove(queryParam.Key) | ||
143 | result, err := svr.getToken(loginToken) | 133 | result, err := svr.getToken(loginToken) |
144 | if err != nil { | 134 | if err != nil { |
145 | - return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 135 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
146 | } | 136 | } |
137 | + | ||
147 | data := map[string]interface{}{ | 138 | data := map[string]interface{}{ |
148 | - "isLogin": qrmsgCache.IsLogin, | 139 | + "isLogin": qrcodeMessage.IsLogin, |
149 | "access": result["token"], | 140 | "access": result["token"], |
150 | } | 141 | } |
151 | return data, nil | 142 | return data, nil |
@@ -153,22 +144,17 @@ func (svr AuthService) AuthLoginQrcode(queryParam *query.QrcodeLoginStatusQuery) | @@ -153,22 +144,17 @@ func (svr AuthService) AuthLoginQrcode(queryParam *query.QrcodeLoginStatusQuery) | ||
153 | 144 | ||
154 | //AuthLoginQrcodeBind 扫码登录-绑定 | 145 | //AuthLoginQrcodeBind 扫码登录-绑定 |
155 | func (svr AuthService) AuthLoginQrcodeBinding(bindingCmd *command.QrcodeBindingCommand) (interface{}, error) { | 146 | func (svr AuthService) AuthLoginQrcodeBinding(bindingCmd *command.QrcodeBindingCommand) (interface{}, error) { |
156 | - qrmsg := domain.QrcodeMessage{} | ||
157 | - err := qrmsg.ParseToken(bindingCmd.Key) | ||
158 | - if err != nil { | ||
159 | - return nil, application.ThrowError(application.TRANSACTION_ERROR, "您扫描的二维码无效,请确认后重新扫描") | ||
160 | - } | ||
161 | qrCache := cache.LoginQrcodeCache{} | 147 | qrCache := cache.LoginQrcodeCache{} |
162 | - qrmsgCache, err := qrCache.Get(qrmsg.Id) | 148 | + qrcodeMessage, err := qrCache.Get(bindingCmd.Key) |
163 | if err != nil { | 149 | if err != nil { |
164 | - return nil, application.ThrowError(application.TRANSACTION_ERROR, "您扫描的二维码无效,请确认后重新扫描") | 150 | + return nil, application.ThrowError(application.BUSINESS_ERROR, "您扫描的二维码无效,请确认后重新扫描") |
165 | } | 151 | } |
166 | - if err := qrmsgCache.BindUser(bindingCmd.Operator); err != nil { | ||
167 | - return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 152 | + if err := qrcodeMessage.BindUser(bindingCmd.Operator); err != nil { |
153 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
168 | } | 154 | } |
169 | - if err := qrCache.Save(*qrmsgCache); err != nil { | 155 | + if err := qrCache.Save(*qrcodeMessage); err != nil { |
170 | log.Logger.Error(err.Error()) | 156 | log.Logger.Error(err.Error()) |
171 | - return nil, application.ThrowError(application.TRANSACTION_ERROR, "登录失败,请重试") | 157 | + return nil, application.ThrowError(application.BUSINESS_ERROR, "登录失败,请重试") |
172 | } | 158 | } |
173 | return struct{}{}, nil | 159 | return struct{}{}, nil |
174 | } | 160 | } |
@@ -184,13 +170,13 @@ func (svr AuthService) SendSmsCaptcha(smsCodeCommand *command.SendSmsCodeCommand | @@ -184,13 +170,13 @@ func (svr AuthService) SendSmsCaptcha(smsCodeCommand *command.SendSmsCodeCommand | ||
184 | Account: smsCodeCommand.Phone, | 170 | Account: smsCodeCommand.Phone, |
185 | }) | 171 | }) |
186 | if err != nil || userBase.UserInfo.Phone != smsCodeCommand.Phone { | 172 | if err != nil || userBase.UserInfo.Phone != smsCodeCommand.Phone { |
187 | - return application.ThrowError(application.TRANSACTION_ERROR, "输入的手机号不是平台用户,请重新输入") | 173 | + return application.ThrowError(application.BUSINESS_ERROR, "输入的手机号不是平台用户,请重新输入") |
188 | } | 174 | } |
189 | } | 175 | } |
190 | smsServeGateway := sms_serve.NewHttplibHttplibSmsServe() | 176 | smsServeGateway := sms_serve.NewHttplibHttplibSmsServe() |
191 | err := smsServeGateway.SendSms(smsCodeCommand.Phone) | 177 | err := smsServeGateway.SendSms(smsCodeCommand.Phone) |
192 | if err != nil { | 178 | if err != nil { |
193 | - return application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 179 | + return application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
194 | } | 180 | } |
195 | return nil | 181 | return nil |
196 | } | 182 | } |
@@ -427,6 +413,27 @@ func (svr AuthService) CompanySignUp(companySignUpCommand *command.CompanySignUp | @@ -427,6 +413,27 @@ func (svr AuthService) CompanySignUp(companySignUpCommand *command.CompanySignUp | ||
427 | return companySignUpCommand, err | 413 | return companySignUpCommand, err |
428 | } | 414 | } |
429 | 415 | ||
416 | +func (svr AuthService) UserSignUp(signUpCommand *command.UserSignUpCommand) (interface{}, error) { | ||
417 | + if err := signUpCommand.ValidateCommand(); err != nil { | ||
418 | + return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
419 | + } | ||
420 | + smsServeGateway := sms_serve.NewHttplibHttplibSmsServe() | ||
421 | + err := smsServeGateway.CheckSmsCode(signUpCommand.Phone, signUpCommand.SmsCode) | ||
422 | + if err != nil { | ||
423 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
424 | + } | ||
425 | + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(domain.Operator{}) | ||
426 | + _, err = creationUserGateway.AuthUserSignUp(allied_creation_user.ReqAuthUserSignUp{ | ||
427 | + Name: signUpCommand.Name, | ||
428 | + Phone: signUpCommand.Phone, | ||
429 | + Password: signUpCommand.Password, | ||
430 | + }) | ||
431 | + if err != nil { | ||
432 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
433 | + } | ||
434 | + return signUpCommand, err | ||
435 | +} | ||
436 | + | ||
430 | // ResetPassword 重置密码(找回密码) | 437 | // ResetPassword 重置密码(找回密码) |
431 | func (svr AuthService) ResetPassword(resetPasswordCommand *command.ResetPasswordCommand) (interface{}, error) { | 438 | func (svr AuthService) ResetPassword(resetPasswordCommand *command.ResetPasswordCommand) (interface{}, error) { |
432 | if err := resetPasswordCommand.ValidateCommand(); err != nil { | 439 | if err := resetPasswordCommand.ValidateCommand(); err != nil { |
@@ -474,7 +481,7 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error | @@ -474,7 +481,7 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error | ||
474 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 481 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
475 | } | 482 | } |
476 | var user = map[string]interface{}{ | 483 | var user = map[string]interface{}{ |
477 | - "userId": resultUser.UserBaseID, | 484 | + "userId": resultUser.UserID, |
478 | //"userOpenId": fmt.Sprintf("%v",resultUser.UserBaseID), | 485 | //"userOpenId": fmt.Sprintf("%v",resultUser.UserBaseID), |
479 | "userInfo": map[string]interface{}{ | 486 | "userInfo": map[string]interface{}{ |
480 | "userName": resultUser.UserInfo.UserName, | 487 | "userName": resultUser.UserInfo.UserName, |
@@ -496,15 +503,9 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error | @@ -496,15 +503,9 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error | ||
496 | if err != nil { | 503 | if err != nil { |
497 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 504 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
498 | } | 505 | } |
499 | - resultOrg, err := creationUserGateway.OrgGet(allied_creation_user.ReqOrgGet{ | ||
500 | - OrgId: int(operator.OrgId), | ||
501 | - }) | ||
502 | - if err != nil { | ||
503 | - return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
504 | - } | 506 | + |
505 | var user = map[string]interface{}{ | 507 | var user = map[string]interface{}{ |
506 | - "userId": resultUser.UserBaseId, | ||
507 | - //"publicUserId":fmt.Sprintf("%v",resultUser.UserBaseId), | 508 | + "userId": resultUser.UserId, |
508 | "userType": resultUser.UserType, | 509 | "userType": resultUser.UserType, |
509 | "userCode": resultUser.UserCode, | 510 | "userCode": resultUser.UserCode, |
510 | "userInfo": map[string]interface{}{ | 511 | "userInfo": map[string]interface{}{ |
@@ -514,23 +515,32 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error | @@ -514,23 +515,32 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error | ||
514 | "userCode": resultUser.UserInfo.UserCode, | 515 | "userCode": resultUser.UserInfo.UserCode, |
515 | "email": resultUser.UserInfo.Email, | 516 | "email": resultUser.UserInfo.Email, |
516 | }, | 517 | }, |
517 | - "department": resultUser.Department, | ||
518 | - "company": map[string]interface{}{ | 518 | + "department": resultUser.Department, |
519 | + "im": resultUser.IM, | ||
520 | + "favoriteMenus": resultUser.FavoriteMenus, | ||
521 | + } | ||
522 | + if operator.OrgId > 0 { | ||
523 | + resultOrg, err := creationUserGateway.OrgGet(allied_creation_user.ReqOrgGet{ | ||
524 | + OrgId: int(operator.OrgId), | ||
525 | + }) | ||
526 | + if err != nil { | ||
527 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
528 | + } | ||
529 | + user["org"] = map[string]interface{}{ | ||
530 | + "orgId": resultOrg.OrgID, | ||
531 | + "orgName": resultOrg.OrgName, | ||
532 | + "orgCode": resultOrg.OrgCode, | ||
533 | + "companyId": resultOrg.CompanyID, | ||
534 | + } | ||
535 | + } | ||
536 | + if resultUser.Company != nil { | ||
537 | + user["company"] = map[string]interface{}{ | ||
519 | "companyId": resultUser.Company.CompanyId, | 538 | "companyId": resultUser.Company.CompanyId, |
520 | "companyName": resultUser.Company.CompanyName, | 539 | "companyName": resultUser.Company.CompanyName, |
521 | "logo": resultUser.Company.Logo, | 540 | "logo": resultUser.Company.Logo, |
522 | "systemName": resultUser.Company.SystemName, | 541 | "systemName": resultUser.Company.SystemName, |
523 | "address": resultUser.Company.Address, | 542 | "address": resultUser.Company.Address, |
524 | - }, | ||
525 | - "im": resultUser.IM, | ||
526 | - "org": map[string]interface{}{ | ||
527 | - "orgId": resultOrg.OrgID, | ||
528 | - "orgName": resultOrg.OrgName, | ||
529 | - "orgCode": resultOrg.OrgCode, | ||
530 | - "companyId": resultOrg.CompanyID, | ||
531 | - }, | ||
532 | - //"currentLoginOrg": resultUser.Org, | ||
533 | - "favoriteMenus": resultUser.FavoriteMenus, | 543 | + } |
534 | } | 544 | } |
535 | return user, nil | 545 | return user, nil |
536 | } | 546 | } |
@@ -658,6 +668,7 @@ loopUser1: | @@ -658,6 +668,7 @@ loopUser1: | ||
658 | if err != nil { | 668 | if err != nil { |
659 | return nil, application.ThrowError(application.TRANSACTION_ERROR, "账号不存在") | 669 | return nil, application.ThrowError(application.TRANSACTION_ERROR, "账号不存在") |
660 | } | 670 | } |
671 | + loginToken.UserId = int64(userBase.UserID) | ||
661 | loginToken.UserBaseId = int64(userBase.UserBaseID) | 672 | loginToken.UserBaseId = int64(userBase.UserBaseID) |
662 | if userBase.UserBaseID > 0 { | 673 | if userBase.UserBaseID > 0 { |
663 | cooperationUsers, _ := creationUserGateway.UserSearch(allied_creation_user.ReqUserSearch{ | 674 | cooperationUsers, _ := creationUserGateway.UserSearch(allied_creation_user.ReqUserSearch{ |
@@ -721,19 +732,18 @@ func (svr AuthService) GetCompanyOrgsByUser(queryParam *query.GetCompanyOrgsByUs | @@ -721,19 +732,18 @@ func (svr AuthService) GetCompanyOrgsByUser(queryParam *query.GetCompanyOrgsByUs | ||
721 | 732 | ||
722 | //GetQrcode 获取扫码登录需要的二维码 | 733 | //GetQrcode 获取扫码登录需要的二维码 |
723 | func (svr AuthService) GetQrcode() (interface{}, error) { | 734 | func (svr AuthService) GetQrcode() (interface{}, error) { |
724 | - qrmsg := domain.QrcodeMessage{} | ||
725 | - _, err := qrmsg.GenerateImageBase64() //imgBase64 | 735 | + qrcodeMessage := domain.QrcodeMessage{} |
736 | + _, err := qrcodeMessage.Init() | ||
726 | if err != nil { | 737 | if err != nil { |
727 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 738 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
728 | } | 739 | } |
729 | qrCache := cache.LoginQrcodeCache{} | 740 | qrCache := cache.LoginQrcodeCache{} |
730 | - err = qrCache.Save(qrmsg) | 741 | + err = qrCache.Save(qrcodeMessage) |
731 | if err != nil { | 742 | if err != nil { |
732 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 743 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
733 | } | 744 | } |
734 | data := map[string]interface{}{ | 745 | data := map[string]interface{}{ |
735 | - //"image": imgBase64, | ||
736 | - "key": qrmsg.Token, | 746 | + "key": qrcodeMessage.Token, |
737 | } | 747 | } |
738 | return data, nil | 748 | return data, nil |
739 | } | 749 | } |
1 | +package query | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + "github.com/beego/beego/v2/core/validation" | ||
6 | +) | ||
7 | + | ||
8 | +type GetAdvancedSettingQuery struct { | ||
9 | + //操作人 | ||
10 | + //操作人 | ||
11 | + //Operator domain.Operator `json:"-"` | ||
12 | + Model string `json:"model"` | ||
13 | +} | ||
14 | + | ||
15 | +func (q *GetAdvancedSettingQuery) Valid(validation *validation.Validation) { | ||
16 | + if len(q.Model) == 0 { | ||
17 | + validation.Error("模型名称不能为空") | ||
18 | + } | ||
19 | +} | ||
20 | + | ||
21 | +func (q *GetAdvancedSettingQuery) ValidateQuery() error { | ||
22 | + valid := validation.Validation{} | ||
23 | + b, err := valid.Valid(q) | ||
24 | + if err != nil { | ||
25 | + return err | ||
26 | + } | ||
27 | + if !b { | ||
28 | + for _, validErr := range valid.Errors { | ||
29 | + return fmt.Errorf("%s %s", validErr.Key, validErr.Message) | ||
30 | + } | ||
31 | + } | ||
32 | + return nil | ||
33 | +} |
1 | +package query | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + "reflect" | ||
6 | + "strings" | ||
7 | + | ||
8 | + "github.com/beego/beego/v2/core/validation" | ||
9 | +) | ||
10 | + | ||
11 | +type GetBlockChainTokenQuery struct { | ||
12 | + // 操作类型: | ||
13 | + //1-交易哈希溯源 | ||
14 | + //2-溯源ID溯源 | ||
15 | + //3-验真 | ||
16 | + Type int `cname:"操作类型" json:"type" valid:"Required"` | ||
17 | + // 参数 | ||
18 | + UpChainId int `cname:"上链Id" json:"upChainId,omitempty" valid:"Required"` | ||
19 | +} | ||
20 | + | ||
21 | +func (listBlockChain *GetBlockChainTokenQuery) Valid(validation *validation.Validation) { | ||
22 | + //validation.SetError("CustomValid", "未实现的自定义认证") | ||
23 | +} | ||
24 | + | ||
25 | +func (listBlockChain *GetBlockChainTokenQuery) ValidateQuery() error { | ||
26 | + valid := validation.Validation{} | ||
27 | + b, err := valid.Valid(listBlockChain) | ||
28 | + if err != nil { | ||
29 | + return err | ||
30 | + } | ||
31 | + if !b { | ||
32 | + elem := reflect.TypeOf(listBlockChain).Elem() | ||
33 | + for _, validErr := range valid.Errors { | ||
34 | + field, isExist := elem.FieldByName(validErr.Field) | ||
35 | + if isExist { | ||
36 | + return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1)) | ||
37 | + } else { | ||
38 | + return fmt.Errorf(validErr.Message) | ||
39 | + } | ||
40 | + } | ||
41 | + } | ||
42 | + return nil | ||
43 | +} |
@@ -11,7 +11,7 @@ type GetLatestVersionQuery struct { | @@ -11,7 +11,7 @@ type GetLatestVersionQuery struct { | ||
11 | //操作人 | 11 | //操作人 |
12 | //Operator domain.Operator `json:"-"` | 12 | //Operator domain.Operator `json:"-"` |
13 | DeviceType string `json:"-"` | 13 | DeviceType string `json:"-"` |
14 | - VersionNo int `json:"versionNo"` | 14 | + VersionNo int `json:"versionNo,string"` |
15 | Channel int `json:"channel"` | 15 | Channel int `json:"channel"` |
16 | Request *http.Request `json:"-"` | 16 | Request *http.Request `json:"-"` |
17 | } | 17 | } |
1 | package service | 1 | package service |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | + "fmt" | ||
5 | + "github.com/linmadan/egglib-go/core/application" | ||
4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/common/query" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/common/query" |
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
8 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_basic" | ||
9 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | ||
10 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/version_server" | ||
5 | ) | 11 | ) |
6 | 12 | ||
7 | const IOSPage = "http://fir.fjmaimaimai.com/pdvn" | 13 | const IOSPage = "http://fir.fjmaimaimai.com/pdvn" |
@@ -16,102 +22,91 @@ func NewCommonService(options map[string]interface{}) *CommonService { | @@ -16,102 +22,91 @@ func NewCommonService(options map[string]interface{}) *CommonService { | ||
16 | 22 | ||
17 | //GetDictionaryByCode 根据code获取字典数据 | 23 | //GetDictionaryByCode 根据code获取字典数据 |
18 | func (srv *CommonService) GetDictionaryByCode(getDictionaryQuery *query.GetDictionaryByCodeQuery) (interface{}, error) { | 24 | func (srv *CommonService) GetDictionaryByCode(getDictionaryQuery *query.GetDictionaryByCodeQuery) (interface{}, error) { |
19 | - //creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(domain.Operator{}) | ||
20 | - //result, err := creationBasicGateway.GetDictionarysByCode(allied_creation_basic.ReqGetDictionaryByCode{ | ||
21 | - // DictCode: getDictionaryQuery.DictCode, | ||
22 | - //}) | ||
23 | - //if err != nil { | ||
24 | - // return nil, err | ||
25 | - //} | ||
26 | - //return result, nil | ||
27 | - // TODO:测试使用,后期移除掉 | ||
28 | - type dictItem struct { | ||
29 | - ItemCode string `json:"itemCode"` | ||
30 | - ItemValue string `json:"itemValue"` | 25 | + creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(domain.Operator{}) |
26 | + result, err := creationBasicGateway.GetDictionarysByCode(allied_creation_basic.ReqGetDictionaryByCode{ | ||
27 | + DictCodes: getDictionaryQuery.DictCode, | ||
28 | + }) | ||
29 | + if err != nil { | ||
30 | + return nil, err | ||
31 | + } | ||
32 | + var response = make([]interface{}, 0) | ||
33 | + if result == nil || len(result.Dictionarys) == 0 { | ||
34 | + return response, nil | ||
31 | } | 35 | } |
32 | - dictionaries := make([]interface{}, 0) | ||
33 | for i := range getDictionaryQuery.DictCode { | 36 | for i := range getDictionaryQuery.DictCode { |
34 | - switch getDictionaryQuery.DictCode[i] { | ||
35 | - case "MenuType": | ||
36 | - dictionaries = append(dictionaries, map[string]interface{}{ | ||
37 | - "dictName": "菜单类型", | ||
38 | - "dictItems": []dictItem{ | ||
39 | - {"目录", "catalog"}, | ||
40 | - {"菜单", "menu"}, | ||
41 | - {"按钮", "button"}, | ||
42 | - }, | ||
43 | - "dictCode": "MenuType", | ||
44 | - }) | ||
45 | - case "XTZD-001": | ||
46 | - dictionaries = append(dictionaries, map[string]interface{}{ | ||
47 | - "dictName": "规模", | ||
48 | - "dictItems": []dictItem{ | ||
49 | - {"1", "0~100人"}, | ||
50 | - {"2", "101~200人"}, | ||
51 | - {"3", "201~500人"}, | ||
52 | - {"4", "501~1000人"}, | ||
53 | - {"5", "1000人以上"}, | ||
54 | - }, | ||
55 | - "dictCode": "XTZD-001", | ||
56 | - }) | ||
57 | - case "XTZD-002": | ||
58 | - dictionaries = append(dictionaries, map[string]interface{}{ | ||
59 | - "dictName": "产业类型", | ||
60 | - "dictItems": []dictItem{ | ||
61 | - {"1", "食品行业"}, | ||
62 | - {"2", "电子行业"}, | ||
63 | - {"3", "纺织业"}, | ||
64 | - }, | ||
65 | - "dictCode": "XTZD-002", | ||
66 | - }) | 37 | + code := getDictionaryQuery.DictCode[i] |
38 | + for j := range result.Dictionarys { | ||
39 | + item := result.Dictionarys[j] | ||
40 | + if item.DictCode == code { | ||
41 | + response = append(response, item) | ||
42 | + break | ||
43 | + } | ||
67 | } | 44 | } |
68 | } | 45 | } |
69 | - return map[string]interface{}{"dictionarys": dictionaries}, nil | 46 | + return map[string]interface{}{ |
47 | + "dictionarys": response, | ||
48 | + }, nil | ||
70 | } | 49 | } |
71 | 50 | ||
72 | //LatestVersionInfo 版本升级 | 51 | //LatestVersionInfo 版本升级 |
73 | func (srv *CommonService) LatestVersionInfo(q *query.GetLatestVersionQuery) (interface{}, error) { | 52 | func (srv *CommonService) LatestVersionInfo(q *query.GetLatestVersionQuery) (interface{}, error) { |
74 | - page := IOSPage | ||
75 | - if q.DeviceType == "1" { // 安卓 | ||
76 | - page = ANDPage | 53 | + vs := version_server.NewHttpLibVersionServer() |
54 | + data, err := vs.GetLatestVersion(q.Request, version_server.ReqLatestVersion{ | ||
55 | + VersionNo: q.VersionNo, | ||
56 | + Channel: q.Channel, | ||
57 | + }) | ||
58 | + if err != nil { | ||
59 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
77 | } | 60 | } |
78 | - return map[string]interface{}{ | ||
79 | - "version": map[string]interface{}{ | ||
80 | - "downloadPage": page, | ||
81 | - "downloadFile": "", | ||
82 | - "updateType": 0, | ||
83 | - }, | ||
84 | - }, nil | ||
85 | - //vs:= version_server.NewHttpLibVersionServer() | ||
86 | - //data,err:= vs.GetLatestVersion(q.Request,version_server.ReqLatestVersion{ | ||
87 | - // VersionNo: q.VersionNo, | ||
88 | - // Channel: q.Channel, | ||
89 | - //}) | ||
90 | - //if err != nil { | ||
91 | - // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
92 | - //} | ||
93 | - //return data, nil | 61 | + return data, nil |
94 | } | 62 | } |
95 | 63 | ||
96 | //AppSharing 获取分享链接地址 | 64 | //AppSharing 获取分享链接地址 |
97 | func (srv *CommonService) AppSharing(q *query.GetLatestVersionQuery) (interface{}, error) { | 65 | func (srv *CommonService) AppSharing(q *query.GetLatestVersionQuery) (interface{}, error) { |
98 | - page := IOSPage | ||
99 | - if q.DeviceType == "1" { // 安卓 | ||
100 | - page = ANDPage | ||
101 | - } | ||
102 | - return map[string]interface{}{ | ||
103 | - "version": map[string]interface{}{ | ||
104 | - "downloadPage": page, | ||
105 | - "downloadFile": "", | ||
106 | - }, | ||
107 | - }, nil | ||
108 | - //vs:= version_server.NewHttpLibVersionServer() | ||
109 | - //data,err:= vs.GetLatestVersion(q.Request,version_server.ReqLatestVersion{ | ||
110 | - // VersionNo: q.VersionNo, | ||
111 | - // Channel: q.Channel, | ||
112 | - //}) | ||
113 | - //if err != nil { | ||
114 | - // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 66 | + //page := IOSPage |
67 | + //if q.DeviceType == "1" { // 安卓 | ||
68 | + // page = ANDPage | ||
115 | //} | 69 | //} |
116 | - //return data, nil | 70 | + //return map[string]interface{}{ |
71 | + // "version": map[string]interface{}{ | ||
72 | + // "downloadPage": page, | ||
73 | + // "downloadFile": "", | ||
74 | + // }, | ||
75 | + //}, nil | ||
76 | + vs := version_server.NewHttpLibVersionServer() | ||
77 | + data, err := vs.GetLatestVersion(q.Request, version_server.ReqLatestVersion{ | ||
78 | + VersionNo: q.VersionNo, | ||
79 | + Channel: q.Channel, | ||
80 | + }) | ||
81 | + if err != nil { | ||
82 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
83 | + } | ||
84 | + return data, nil | ||
85 | +} | ||
86 | + | ||
87 | +// AdvancedSetting 高级查询 配置 | ||
88 | +func (srv *CommonService) AdvancedSetting(q *query.GetAdvancedSettingQuery) (interface{}, error) { | ||
89 | + if err := q.ValidateQuery(); err != nil { | ||
90 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
91 | + } | ||
92 | + m, ok := domain.GetModel(q.Model) | ||
93 | + if !ok { | ||
94 | + return nil, application.ThrowError(application.BUSINESS_ERROR, fmt.Sprintf("模型:%v 不存在", q.Model)) | ||
95 | + } | ||
96 | + return m, nil | ||
97 | +} | ||
98 | + | ||
99 | +func (srv *CommonService) BlockChainBrowser(q *query.GetBlockChainTokenQuery) (interface{}, error) { | ||
100 | + if q.UpChainId == 0 { | ||
101 | + return nil, application.ThrowError(application.BUSINESS_ERROR, "未查询到区块链数据") | ||
102 | + } | ||
103 | + alliedCreationUser := allied_creation_user.NewHttplibAlliedCreationUser(domain.Operator{}) | ||
104 | + result, err := alliedCreationUser.BlockChainsToken(allied_creation_user.ReqBlockChainToken{ | ||
105 | + Type: q.Type, | ||
106 | + UpChainID: q.UpChainId, | ||
107 | + }) | ||
108 | + if err != nil { | ||
109 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
110 | + } | ||
111 | + return result, nil | ||
117 | } | 112 | } |
1 | +package command | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + | ||
6 | + "github.com/beego/beego/v2/core/validation" | ||
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
8 | +) | ||
9 | + | ||
10 | +type SearchCooperationProjectContractQuery struct { | ||
11 | + //操作人 | ||
12 | + Operator domain.Operator `json:"-"` | ||
13 | + // 查询偏离量 | ||
14 | + PageNumber int `json:"pageNumber"` | ||
15 | + // 查询限制 | ||
16 | + PageSize int `json:"pageSize" valid:"Required"` | ||
17 | + //项目ID | ||
18 | + CooperationProjectId int64 `json:"cooperationProjectId"` | ||
19 | +} | ||
20 | + | ||
21 | +func (listCooperationProjectQuery *SearchCooperationProjectContractQuery) Valid(validation *validation.Validation) { | ||
22 | + | ||
23 | +} | ||
24 | + | ||
25 | +func (listCooperationProjectQuery *SearchCooperationProjectContractQuery) ValidateQuery() error { | ||
26 | + valid := validation.Validation{} | ||
27 | + b, err := valid.Valid(listCooperationProjectQuery) | ||
28 | + if err != nil { | ||
29 | + return err | ||
30 | + } | ||
31 | + if !b { | ||
32 | + for _, validErr := range valid.Errors { | ||
33 | + return fmt.Errorf("%s %s", validErr.Key, validErr.Message) | ||
34 | + } | ||
35 | + } | ||
36 | + return nil | ||
37 | +} |
pkg/application/mobile/cooperation/command/cp_search_cooperation_project_shared_info_attachment.go
0 → 100644
1 | +package command | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + | ||
6 | + "github.com/beego/beego/v2/core/validation" | ||
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
8 | +) | ||
9 | + | ||
10 | +type PersonCooperationProjectSharedInfoAttachmentQuery struct { | ||
11 | + //操作人 | ||
12 | + Operator domain.Operator `json:"-"` | ||
13 | + // 用户 | ||
14 | + UserId int64 `json:"userId" valid:"Required"` | ||
15 | + // 项目ID | ||
16 | + ProjectId int64 `json:"cooperationProjectId,string" valid:"Required"` | ||
17 | + // 合约ID | ||
18 | + ContractId int64 `json:"cooperationContractId,string" valid:"Required"` | ||
19 | + // 附件类型 1:合约附件 2:支付凭证 | ||
20 | + AttachmentType int `json:"attachmentType" valid:"Required"` | ||
21 | +} | ||
22 | + | ||
23 | +func (updateCooperationProjectCommand *PersonCooperationProjectSharedInfoAttachmentQuery) Valid(validation *validation.Validation) { | ||
24 | +} | ||
25 | + | ||
26 | +func (updateCooperationProjectCommand *PersonCooperationProjectSharedInfoAttachmentQuery) ValidateCommand() error { | ||
27 | + valid := validation.Validation{} | ||
28 | + b, err := valid.Valid(updateCooperationProjectCommand) | ||
29 | + if err != nil { | ||
30 | + return err | ||
31 | + } | ||
32 | + if !b { | ||
33 | + for _, validErr := range valid.Errors { | ||
34 | + return fmt.Errorf("%s %s", validErr.Key, validErr.Message) | ||
35 | + } | ||
36 | + } | ||
37 | + return nil | ||
38 | +} |
@@ -16,6 +16,8 @@ type CreateFeedbackCommand struct { | @@ -16,6 +16,8 @@ type CreateFeedbackCommand struct { | ||
16 | FeedbackContent string `cname:"合约承接方反馈内容" json:"feedbackContent" valid:"Required"` | 16 | FeedbackContent string `cname:"合约承接方反馈内容" json:"feedbackContent" valid:"Required"` |
17 | // 共创合约编号 | 17 | // 共创合约编号 |
18 | CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"` | 18 | CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"` |
19 | + // 共创合约Id | ||
20 | + CooperationContractId int64 `cname:"共创合约编号" json:"cooperationContractId"` | ||
19 | } | 21 | } |
20 | 22 | ||
21 | func (cmd *CreateFeedbackCommand) Valid(validation *validation.Validation) { | 23 | func (cmd *CreateFeedbackCommand) Valid(validation *validation.Validation) { |
1 | +package dto | ||
2 | + | ||
3 | +import "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | ||
4 | + | ||
5 | +type CooperationProjectSearchItem struct { | ||
6 | + allied_creation_cooperation.DataCooperationProjectSearchItem | ||
7 | + // 共创项目关联的合约数量 | ||
8 | + //ContractCount int `json:"contractCount"` | ||
9 | +} |
@@ -16,6 +16,7 @@ func (srv PersonDividendsService) GetDividendContracts(cmd *command.GetDividendC | @@ -16,6 +16,7 @@ func (srv PersonDividendsService) GetDividendContracts(cmd *command.GetDividendC | ||
16 | cmd.Operator) | 16 | cmd.Operator) |
17 | result, err := gateway.CooperationStatistics(allied_creation_cooperation.GetContractDividends, map[string]interface{}{ | 17 | result, err := gateway.CooperationStatistics(allied_creation_cooperation.GetContractDividends, map[string]interface{}{ |
18 | "contractId": cmd.ContractId, | 18 | "contractId": cmd.ContractId, |
19 | + "userBaseId": cmd.Operator.UserBaseId, | ||
19 | }) | 20 | }) |
20 | if err != nil { | 21 | if err != nil { |
21 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 22 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
@@ -163,7 +163,6 @@ func (srv CooperationApplicationsService) PersonSearchCooperationApplications(ap | @@ -163,7 +163,6 @@ func (srv CooperationApplicationsService) PersonSearchCooperationApplications(ap | ||
163 | resultApplications, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{ | 163 | resultApplications, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{ |
164 | PageNumber: applicationQuery.PageNumber + 1, | 164 | PageNumber: applicationQuery.PageNumber + 1, |
165 | PageSize: applicationQuery.PageSize, | 165 | PageSize: applicationQuery.PageSize, |
166 | - CompanyId: int(applicationQuery.Operator.CompanyId), | ||
167 | CooperationApplicationStatus: applicationQuery.Status, | 166 | CooperationApplicationStatus: applicationQuery.Status, |
168 | UserBaseId: applicationQuery.Operator.UserBaseId, | 167 | UserBaseId: applicationQuery.Operator.UserBaseId, |
169 | IsCanceled: 1, | 168 | IsCanceled: 1, |
1 | package service | 1 | package service |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
5 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | ||
6 | - "strconv" | ||
7 | - | ||
8 | "github.com/linmadan/egglib-go/core/application" | 4 | "github.com/linmadan/egglib-go/core/application" |
9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" |
10 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/dto" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/dto" |
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" | ||
8 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | 9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
10 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | ||
11 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
12 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/util/blur" | ||
13 | + "strconv" | ||
14 | + "strings" | ||
12 | ) | 15 | ) |
13 | 16 | ||
14 | // CooperationProjectService 共创项目服务 | 17 | // CooperationProjectService 共创项目服务 |
@@ -97,10 +100,35 @@ func (srv CooperationProjectService) SearchCooperationProject(projectQuery *comm | @@ -97,10 +100,35 @@ func (srv CooperationProjectService) SearchCooperationProject(projectQuery *comm | ||
97 | Status: int(projectQuery.Status), | 100 | Status: int(projectQuery.Status), |
98 | OrgId: projectQuery.Operator.OrgId, | 101 | OrgId: projectQuery.Operator.OrgId, |
99 | }) | 102 | }) |
103 | + var projects []dto.CooperationProjectSearchItem | ||
100 | if err != nil { | 104 | if err != nil { |
101 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 105 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
102 | } | 106 | } |
103 | - return int(result.Total), result.List, nil | 107 | + |
108 | + for i := range result.List { | ||
109 | + projects = append(projects, dto.CooperationProjectSearchItem{ | ||
110 | + result.List[i], | ||
111 | + }) | ||
112 | + } | ||
113 | + return int(result.Total), projects, nil | ||
114 | +} | ||
115 | + | ||
116 | +// SearchCooperationProject 企业获取共创项目列表 | ||
117 | +func (srv CooperationProjectService) SearchCooperationProjectContracts(projectQuery *command.SearchCooperationProjectContractQuery) (int, interface{}, error) { | ||
118 | + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
119 | + projectQuery.Operator) | ||
120 | + result, err := creationCooperationGateway.CooperationStatistics( | ||
121 | + allied_creation_cooperation.CompanyCooperationProjectContracts, | ||
122 | + map[string]interface{}{ | ||
123 | + "offset": projectQuery.PageSize * projectQuery.PageNumber, | ||
124 | + "limit": projectQuery.PageSize, | ||
125 | + "projectId": projectQuery.CooperationProjectId, | ||
126 | + }, | ||
127 | + ) | ||
128 | + if err != nil { | ||
129 | + return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
130 | + } | ||
131 | + return int(0), result, nil | ||
104 | } | 132 | } |
105 | 133 | ||
106 | // PersonSearchCooperationProject 共创用户获取共创项目列表 | 134 | // PersonSearchCooperationProject 共创用户获取共创项目列表 |
@@ -117,6 +145,7 @@ func (srv CooperationProjectService) PersonSearchCooperationProject(projectQuery | @@ -117,6 +145,7 @@ func (srv CooperationProjectService) PersonSearchCooperationProject(projectQuery | ||
117 | SearchCooperationProjectExtQueriesFlag: 1, | 145 | SearchCooperationProjectExtQueriesFlag: 1, |
118 | SearchCooperationProjectExtQueries: extQueries, | 146 | SearchCooperationProjectExtQueries: extQueries, |
119 | SortByStatus: 1, | 147 | SortByStatus: 1, |
148 | + IsSkipFetchProjectModel: true, | ||
120 | }) | 149 | }) |
121 | if err != nil { | 150 | if err != nil { |
122 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 151 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
@@ -140,6 +169,9 @@ func extQuires(operator domain.Operator) []*allied_creation_cooperation.SearchCo | @@ -140,6 +169,9 @@ func extQuires(operator domain.Operator) []*allied_creation_cooperation.SearchCo | ||
140 | } | 169 | } |
141 | for i := range users.Users { | 170 | for i := range users.Users { |
142 | u := users.Users[i] | 171 | u := users.Users[i] |
172 | + if u.UserType == domain.UserTypeVisitor { | ||
173 | + continue | ||
174 | + } | ||
143 | q := &allied_creation_cooperation.SearchCooperationProjectExtQuery{ | 175 | q := &allied_creation_cooperation.SearchCooperationProjectExtQuery{ |
144 | ExtCompanyId: int64(u.Company.CompanyId), | 176 | ExtCompanyId: int64(u.Company.CompanyId), |
145 | //ExtOrgId: int64(u.Org.OrgId), | 177 | //ExtOrgId: int64(u.Org.OrgId), |
@@ -176,3 +208,99 @@ func extQuires(operator domain.Operator) []*allied_creation_cooperation.SearchCo | @@ -176,3 +208,99 @@ func extQuires(operator domain.Operator) []*allied_creation_cooperation.SearchCo | ||
176 | // } | 208 | // } |
177 | // return int(result.Total), result.List, nil | 209 | // return int(result.Total), result.List, nil |
178 | //} | 210 | //} |
211 | + | ||
212 | +func (srv CooperationProjectService) PersonSearchCooperationProjectShareInfo(projectQuery *command.GetCooperationProjectQuery) (interface{}, error) { | ||
213 | + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
214 | + projectQuery.Operator) | ||
215 | + result, err := creationCooperationGateway.CooperationStatistics( | ||
216 | + allied_creation_cooperation.PersonCooperationProjectSharedInfo, | ||
217 | + map[string]interface{}{ | ||
218 | + "projectId": projectQuery.CooperationProjectId, | ||
219 | + "userBaseId": projectQuery.Operator.UserBaseId, | ||
220 | + "sensitive": true, | ||
221 | + }, | ||
222 | + ) | ||
223 | + if err != nil { | ||
224 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
225 | + } | ||
226 | + return result, nil | ||
227 | +} | ||
228 | + | ||
229 | +func (srv CooperationProjectService) PersonSearchCooperationProjectShareInfoAttachment(projectQuery *command.PersonCooperationProjectSharedInfoAttachmentQuery) (interface{}, error) { | ||
230 | + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
231 | + projectQuery.Operator) | ||
232 | + response := struct { | ||
233 | + Attachment *domain.Attachment `json:"attachment"` | ||
234 | + UserBaseId int64 `json:"userBaseId"` | ||
235 | + }{} | ||
236 | + err := creationCooperationGateway.CooperationStatisticsWithObject( | ||
237 | + allied_creation_cooperation.PersonCooperationProjectSharedInfoAttachment, | ||
238 | + map[string]interface{}{ | ||
239 | + "userId": projectQuery.UserId, | ||
240 | + "cooperationContractId": projectQuery.ContractId, | ||
241 | + "cooperationProjectId": projectQuery.ProjectId, | ||
242 | + "attachmentType": projectQuery.AttachmentType, | ||
243 | + }, &response, | ||
244 | + ) | ||
245 | + if err != nil { | ||
246 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
247 | + } | ||
248 | + // 不是本人查看需要做模糊处理 | ||
249 | + if response.Attachment != nil && len(response.Attachment.Url) > 0 { | ||
250 | + if response.UserBaseId != projectQuery.Operator.UserBaseId { | ||
251 | + // 大文件报错 | ||
252 | + if response.Attachment.FileSize != 0 && response.Attachment.FileSize > 10*1024*1024 { | ||
253 | + return nil, application.ThrowError(application.BUSINESS_ERROR, "文件过大,不可查看") | ||
254 | + } | ||
255 | + file, err := blur.FileBlur(response.Attachment.Url, true) | ||
256 | + if err != nil { // || len(file)==0 | ||
257 | + log.Logger.Error(err.Error()) | ||
258 | + return nil, application.ThrowError(application.BUSINESS_ERROR, "文件加载错误,请重试") | ||
259 | + } | ||
260 | + if !(strings.HasPrefix(file, "http") || strings.HasPrefix(file, "https")) { | ||
261 | + file = constant.ALLIED_CREATION_GATEWAY_HOST + "/" + file | ||
262 | + } | ||
263 | + response.Attachment.Url = file | ||
264 | + } | ||
265 | + } | ||
266 | + | ||
267 | + return map[string]interface{}{ | ||
268 | + "attachment": response.Attachment, | ||
269 | + }, nil | ||
270 | +} | ||
271 | + | ||
272 | +// PersonSearchCooperationProject 共创用户获取共创项目列表 | ||
273 | +func (srv CooperationProjectService) PersonSearchCooperationProjectStarred(projectQuery *command.PersonSearchCooperationProjectQuery) (int, interface{}, error) { | ||
274 | + extQueries := extQuires(projectQuery.Operator) | ||
275 | + if projectQuery.Operator.UserBaseId == 0 { | ||
276 | + return 0, []struct{}{}, nil | ||
277 | + } | ||
278 | + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(projectQuery.Operator) | ||
279 | + userInfo, err := creationUserGateway.AuthUserBaseInfo(allied_creation_user.ReqAuthUserBase{ | ||
280 | + UserBaseId: projectQuery.Operator.UserBaseId, | ||
281 | + }) | ||
282 | + if err != nil { | ||
283 | + return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
284 | + } | ||
285 | + if len(userInfo.FavoriteOrg()) == 0 { | ||
286 | + return 0, []struct{}{}, nil | ||
287 | + } | ||
288 | + | ||
289 | + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
290 | + projectQuery.Operator) | ||
291 | + result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{ | ||
292 | + PageNumber: projectQuery.PageNumber + 1, //手机序号从0开始的 | ||
293 | + PageSize: projectQuery.PageSize, | ||
294 | + //Status: 1, //搜索状态为“招标中”项目 | ||
295 | + Keyword: projectQuery.Keyword, | ||
296 | + OrgIds: userInfo.FavoriteOrg(), | ||
297 | + IsSkipFetchProjectModel: true, | ||
298 | + SortByStatus: 1, | ||
299 | + SearchCooperationProjectExtQueriesFlag: 1, | ||
300 | + SearchCooperationProjectExtQueries: extQueries, | ||
301 | + }) | ||
302 | + if err != nil { | ||
303 | + return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
304 | + } | ||
305 | + return int(result.Total), result.List, nil | ||
306 | +} |
@@ -78,7 +78,7 @@ func (srv PersonCreditAccountService) PaymentHistoryStatistics(cmd *command.Cred | @@ -78,7 +78,7 @@ func (srv PersonCreditAccountService) PaymentHistoryStatistics(cmd *command.Cred | ||
78 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 78 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
79 | cmd.Operator) | 79 | cmd.Operator) |
80 | queryOptions := map[string]interface{}{ | 80 | queryOptions := map[string]interface{}{ |
81 | - "orgId": cmd.Operator.OrgId, | 81 | + //"orgId": cmd.Operator.OrgId, |
82 | "userBaseId": cmd.Operator.UserBaseId, | 82 | "userBaseId": cmd.Operator.UserBaseId, |
83 | "offset": cmd.PageNumber * cmd.PageSize, | 83 | "offset": cmd.PageNumber * cmd.PageSize, |
84 | "limit": cmd.PageSize, | 84 | "limit": cmd.PageSize, |
@@ -39,10 +39,11 @@ func (srv PersonStatisticsService) IndexStatistics(cmd *command.IndexStatisticsC | @@ -39,10 +39,11 @@ func (srv PersonStatisticsService) IndexStatistics(cmd *command.IndexStatisticsC | ||
39 | gatewayUser := allied_creation_user.NewHttplibAlliedCreationUser( | 39 | gatewayUser := allied_creation_user.NewHttplibAlliedCreationUser( |
40 | cmd.Operator) | 40 | cmd.Operator) |
41 | users, err := gatewayUser.UserSearch(allied_creation_user.ReqUserSearch{ | 41 | users, err := gatewayUser.UserSearch(allied_creation_user.ReqUserSearch{ |
42 | - Limit: 1, | ||
43 | - Offset: 0, | ||
44 | - //UserType: domain.UserTypeCooperation, | ||
45 | - UserBaseId: cmd.Operator.UserBaseId, | 42 | + Limit: 1, |
43 | + Offset: 0, | ||
44 | + UserType: domain.UserTypeCooperation | domain.UserTypeEmployee, | ||
45 | + UserBaseId: cmd.Operator.UserBaseId, | ||
46 | + EnableStatus: domain.UserStatusEnable, | ||
46 | }) | 47 | }) |
47 | if err != nil { | 48 | if err != nil { |
48 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 49 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
@@ -103,9 +104,10 @@ func (srv PersonStatisticsService) CompanyStatistics(cmd *command.CooperationPer | @@ -103,9 +104,10 @@ func (srv PersonStatisticsService) CompanyStatistics(cmd *command.CooperationPer | ||
103 | gatewayUser := allied_creation_user.NewHttplibAlliedCreationUser( | 104 | gatewayUser := allied_creation_user.NewHttplibAlliedCreationUser( |
104 | cmd.Operator) | 105 | cmd.Operator) |
105 | users, err := gatewayUser.UserSearch(allied_creation_user.ReqUserSearch{ | 106 | users, err := gatewayUser.UserSearch(allied_creation_user.ReqUserSearch{ |
106 | - Limit: 100, | ||
107 | - Offset: 0, | ||
108 | - UserBaseId: cmd.Operator.UserBaseId, | 107 | + Limit: 100, |
108 | + Offset: 0, | ||
109 | + UserBaseId: cmd.Operator.UserBaseId, | ||
110 | + EnableStatus: domain.UserStatusEnable, | ||
109 | //UserType: domain.UserTypeCooperation, | 111 | //UserType: domain.UserTypeCooperation, |
110 | }) | 112 | }) |
111 | if err != nil { | 113 | if err != nil { |
@@ -114,9 +116,16 @@ func (srv PersonStatisticsService) CompanyStatistics(cmd *command.CooperationPer | @@ -114,9 +116,16 @@ func (srv PersonStatisticsService) CompanyStatistics(cmd *command.CooperationPer | ||
114 | var companyList []int | 116 | var companyList []int |
115 | for i := range users.Users { | 117 | for i := range users.Users { |
116 | user := users.Users[i] | 118 | user := users.Users[i] |
119 | + if user.Org == nil || user.Org.OrgId == 0 { | ||
120 | + continue | ||
121 | + } | ||
117 | companyList = append(companyList, user.Org.OrgId) | 122 | companyList = append(companyList, user.Org.OrgId) |
118 | } | 123 | } |
119 | - | 124 | + if len(companyList) == 0 { |
125 | + return map[string]interface{}{ | ||
126 | + "list": []struct{}{}, | ||
127 | + }, nil | ||
128 | + } | ||
120 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 129 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
121 | cmd.Operator) | 130 | cmd.Operator) |
122 | result, err := gateway.CooperationStatistics(allied_creation_cooperation.CooperationCompanyStatistics, map[string]interface{}{ | 131 | result, err := gateway.CooperationStatistics(allied_creation_cooperation.CooperationCompanyStatistics, map[string]interface{}{ |
@@ -145,19 +154,27 @@ func (srv PersonStatisticsService) CompanyStatistics(cmd *command.CooperationPer | @@ -145,19 +154,27 @@ func (srv PersonStatisticsService) CompanyStatistics(cmd *command.CooperationPer | ||
145 | if err := json.UnmarshalFromString(json.MarshalToString(result), &cooperationCompanyStatisticsResponses); err != nil { | 154 | if err := json.UnmarshalFromString(json.MarshalToString(result), &cooperationCompanyStatisticsResponses); err != nil { |
146 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 155 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
147 | } | 156 | } |
148 | - if len(cooperationCompanyStatisticsResponses) != len(users.Users) { | ||
149 | - return nil, application.ThrowError(application.BUSINESS_ERROR, "数据不匹配") | ||
150 | - } | 157 | + //if len(cooperationCompanyStatisticsResponses) != len(users.Users) { |
158 | + // return nil, application.ThrowError(application.BUSINESS_ERROR, "数据不匹配") | ||
159 | + //} | ||
151 | 160 | ||
152 | var values = make([]interface{}, 0) | 161 | var values = make([]interface{}, 0) |
153 | for i := range users.Users { | 162 | for i := range users.Users { |
154 | user := users.Users[i] | 163 | user := users.Users[i] |
155 | - cooperationCompanyStatisticsResponses[i].Company = domain.Company{ | ||
156 | - CompanyID: user.Org.OrgId, | ||
157 | - CompanyName: user.Org.OrgName, | ||
158 | - Logo: user.Company.Logo, | 164 | + if user.Company == nil { |
165 | + continue | ||
166 | + } | ||
167 | + for j := range cooperationCompanyStatisticsResponses { | ||
168 | + if user.Org != nil && cooperationCompanyStatisticsResponses[j].OrgId == int64(user.Org.OrgId) { | ||
169 | + cooperationCompanyStatisticsResponses[j].Company = domain.Company{ | ||
170 | + CompanyID: user.Org.OrgId, | ||
171 | + CompanyName: user.Org.OrgName, | ||
172 | + Logo: user.Company.Logo, | ||
173 | + } | ||
174 | + values = append(values, cooperationCompanyStatisticsResponses[j]) | ||
175 | + } | ||
159 | } | 176 | } |
160 | - values = append(values, cooperationCompanyStatisticsResponses[i]) | 177 | + |
161 | } | 178 | } |
162 | return map[string]interface{}{ | 179 | return map[string]interface{}{ |
163 | "list": values, | 180 | "list": values, |
@@ -175,6 +192,8 @@ func (srv PersonStatisticsService) CooperationProjectRecommend(projectQuery *com | @@ -175,6 +192,8 @@ func (srv PersonStatisticsService) CooperationProjectRecommend(projectQuery *com | ||
175 | PageNumber: projectQuery.PageNumber + 1, | 192 | PageNumber: projectQuery.PageNumber + 1, |
176 | PageSize: projectQuery.PageSize, | 193 | PageSize: projectQuery.PageSize, |
177 | CooperationProjectUndertakerType: 3, | 194 | CooperationProjectUndertakerType: 3, |
195 | + //Status: 1, | ||
196 | + IsSkipFetchProjectModel: true, | ||
178 | // Status: 1, | 197 | // Status: 1, |
179 | SortByStatus: 1, | 198 | SortByStatus: 1, |
180 | }) | 199 | }) |
@@ -36,6 +36,7 @@ func (srv UndertakerFeedbackService) CreateFeedback(cmd *command.CreateFeedbackC | @@ -36,6 +36,7 @@ func (srv UndertakerFeedbackService) CreateFeedback(cmd *command.CreateFeedbackC | ||
36 | FeedbackContent: cmd.FeedbackContent, | 36 | FeedbackContent: cmd.FeedbackContent, |
37 | CooperationContractNumber: cmd.CooperationContractNumber, | 37 | CooperationContractNumber: cmd.CooperationContractNumber, |
38 | UnderTakerUid: cmd.Operator.UserId, | 38 | UnderTakerUid: cmd.Operator.UserId, |
39 | + CooperationContractId: cmd.CooperationContractId, | ||
39 | }) | 40 | }) |
40 | if err != nil { | 41 | if err != nil { |
41 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 42 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
1 | +package command | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
6 | + "reflect" | ||
7 | + "strings" | ||
8 | + | ||
9 | + "github.com/beego/beego/v2/core/validation" | ||
10 | +) | ||
11 | + | ||
12 | +type UpdateFavoriteCommand struct { | ||
13 | + Operator domain.Operator `json:"-"` | ||
14 | + | ||
15 | + //UserBaseId int64 `json:"userBaseId" ` | ||
16 | + // 菜单编码列表 | ||
17 | + Item string `json:"item" valid:"Required"` | ||
18 | + // 项唯一标识 | ||
19 | + ItemId int64 `cname:"项唯一标识" json:"itemId" valid:"Required"` | ||
20 | + // 用户Id 用户唯一标识 | ||
21 | + Action int64 `cname:"操作类型 1:关注 2:取消关注 " json:"action" valid:"Required"` | ||
22 | +} | ||
23 | + | ||
24 | +func (UpdateFavoriteCommand *UpdateFavoriteCommand) Valid(validation *validation.Validation) { | ||
25 | + //validation.SetError("CustomValid", "未实现的自定义认证") | ||
26 | +} | ||
27 | + | ||
28 | +func (UpdateFavoriteCommand *UpdateFavoriteCommand) ValidateCommand() error { | ||
29 | + valid := validation.Validation{} | ||
30 | + b, err := valid.Valid(UpdateFavoriteCommand) | ||
31 | + if err != nil { | ||
32 | + return err | ||
33 | + } | ||
34 | + if !b { | ||
35 | + elem := reflect.TypeOf(UpdateFavoriteCommand).Elem() | ||
36 | + for _, validErr := range valid.Errors { | ||
37 | + field, isExist := elem.FieldByName(validErr.Field) | ||
38 | + if isExist { | ||
39 | + return fmt.Errorf(strings.Replace(validErr.Message, validErr.Field, field.Tag.Get("cname"), -1)) | ||
40 | + } else { | ||
41 | + return fmt.Errorf(validErr.Message) | ||
42 | + } | ||
43 | + } | ||
44 | + } | ||
45 | + return nil | ||
46 | +} |
@@ -284,3 +284,26 @@ func (srv UserService) CooperationOrg(operator domain.Operator) (interface{}, er | @@ -284,3 +284,26 @@ func (srv UserService) CooperationOrg(operator domain.Operator) (interface{}, er | ||
284 | "orgs": ret, | 284 | "orgs": ret, |
285 | }, nil | 285 | }, nil |
286 | } | 286 | } |
287 | + | ||
288 | +// 设置收藏菜单 | ||
289 | +func (srv UserService) UpdateFavorite(menuFavoriteCommand *command.UpdateFavoriteCommand) (interface{}, error) { | ||
290 | + if err := menuFavoriteCommand.ValidateCommand(); err != nil { | ||
291 | + return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
292 | + } | ||
293 | + if menuFavoriteCommand.Operator.UserBaseId == 0 { | ||
294 | + return nil, application.ThrowError(application.ARG_ERROR, "用户未登录") | ||
295 | + } | ||
296 | + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
297 | + menuFavoriteCommand.Operator, | ||
298 | + ) | ||
299 | + result, err := creationUserGateway.FavoriteUpadate(allied_creation_user.ReqFavoriteUpdate{ | ||
300 | + UserBaseId: menuFavoriteCommand.Operator.UserBaseId, | ||
301 | + Item: menuFavoriteCommand.Item, | ||
302 | + Action: menuFavoriteCommand.Action, | ||
303 | + ItemId: menuFavoriteCommand.ItemId, | ||
304 | + }) | ||
305 | + if err != nil { | ||
306 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
307 | + } | ||
308 | + return result, nil | ||
309 | +} |
@@ -20,6 +20,8 @@ func (srv ContractChangeLogService) ContractChangeLogSearch(queryParam *query.Li | @@ -20,6 +20,8 @@ func (srv ContractChangeLogService) ContractChangeLogSearch(queryParam *query.Li | ||
20 | PageSize: queryParam.PageSize, | 20 | PageSize: queryParam.PageSize, |
21 | CooperationContractNumber: queryParam.CooperationContractNumber, | 21 | CooperationContractNumber: queryParam.CooperationContractNumber, |
22 | OperationType: queryParam.OperationType, | 22 | OperationType: queryParam.OperationType, |
23 | + OrgIds: queryParam.Operator.OrgIds, | ||
24 | + CompanyId: int(queryParam.Operator.CompanyId), | ||
23 | }) | 25 | }) |
24 | listData := dto.ToContractChangeLogList(result) | 26 | listData := dto.ToContractChangeLogList(result) |
25 | return result.Grid.Total, listData, err | 27 | return result.Grid.Total, listData, err |
@@ -48,7 +48,7 @@ type UpdateCooperationContractCommand struct { | @@ -48,7 +48,7 @@ type UpdateCooperationContractCommand struct { | ||
48 | // 金额激励规则列表 | 48 | // 金额激励规则列表 |
49 | MoneyIncentivesRules []struct { | 49 | MoneyIncentivesRules []struct { |
50 | // 金额激励规则ID | 50 | // 金额激励规则ID |
51 | - MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string,"` | 51 | + MoneyIncentivesRuleId string `json:"moneyIncentivesRuleId"` |
52 | // 关联的共创合约编号 | 52 | // 关联的共创合约编号 |
53 | CooperationContractNumber string `json:"cooperationContractNumber"` | 53 | CooperationContractNumber string `json:"cooperationContractNumber"` |
54 | // 激励金额 | 54 | // 激励金额 |
1 | package service | 1 | package service |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | + "strconv" | ||
4 | "time" | 5 | "time" |
5 | 6 | ||
6 | "github.com/linmadan/egglib-go/core/application" | 7 | "github.com/linmadan/egglib-go/core/application" |
@@ -138,7 +139,9 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | @@ -138,7 +139,9 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | ||
138 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationContractCommand.Operator) | 139 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationContractCommand.Operator) |
139 | rules1 := []allied_creation_cooperation.DividendsIncentivesRule{} | 140 | rules1 := []allied_creation_cooperation.DividendsIncentivesRule{} |
140 | for _, v := range updateCooperationContractCommand.DividendsIncentivesRules { | 141 | for _, v := range updateCooperationContractCommand.DividendsIncentivesRules { |
142 | + id, _ := strconv.Atoi(v.DividendsIncentivesRuleId) | ||
141 | r := allied_creation_cooperation.DividendsIncentivesRule{ | 143 | r := allied_creation_cooperation.DividendsIncentivesRule{ |
144 | + DividendsIncentivesRuleId: id, | ||
142 | CooperationContractNumber: v.CooperationContractNumber, | 145 | CooperationContractNumber: v.CooperationContractNumber, |
143 | ReferrerPercentage: v.ReferrerPercentage, | 146 | ReferrerPercentage: v.ReferrerPercentage, |
144 | SalesmanPercentage: v.SalesmanPercentage, | 147 | SalesmanPercentage: v.SalesmanPercentage, |
@@ -152,8 +155,9 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | @@ -152,8 +155,9 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | ||
152 | } | 155 | } |
153 | rules2 := []allied_creation_cooperation.MoneyIncentivesRule{} | 156 | rules2 := []allied_creation_cooperation.MoneyIncentivesRule{} |
154 | for _, v := range updateCooperationContractCommand.MoneyIncentivesRules { | 157 | for _, v := range updateCooperationContractCommand.MoneyIncentivesRules { |
158 | + id, _ := strconv.Atoi(v.MoneyIncentivesRuleId) | ||
155 | r := allied_creation_cooperation.MoneyIncentivesRule{ | 159 | r := allied_creation_cooperation.MoneyIncentivesRule{ |
156 | - MoneyIncentivesRuleId: 0, | 160 | + MoneyIncentivesRuleId: id, |
157 | CooperationContractNumber: v.CooperationContractNumber, | 161 | CooperationContractNumber: v.CooperationContractNumber, |
158 | MoneyIncentivesAmount: v.MoneyIncentivesAmount, | 162 | MoneyIncentivesAmount: v.MoneyIncentivesAmount, |
159 | MoneyIncentivesStage: v.MoneyIncentivesStage, | 163 | MoneyIncentivesStage: v.MoneyIncentivesStage, |
1 | package dto | 1 | package dto |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | ||
4 | "strconv" | 5 | "strconv" |
5 | "time" | 6 | "time" |
6 | 7 | ||
@@ -153,10 +154,12 @@ func ToCooperationApplicationItem(param *allied_creation_cooperation.Cooperation | @@ -153,10 +154,12 @@ func ToCooperationApplicationItem(param *allied_creation_cooperation.Cooperation | ||
153 | 154 | ||
154 | type CooperationProjectSearchItem struct { | 155 | type CooperationProjectSearchItem struct { |
155 | allied_creation_cooperation.DataCooperationProjectSearchItem | 156 | allied_creation_cooperation.DataCooperationProjectSearchItem |
156 | - AuthFlag bool `json:"authFlag"` //当前用户是否可以编辑 | 157 | + AuthFlag bool `json:"authFlag"` //当前用户是否可以编辑 |
158 | + UpChainID int `json:"upChainId"` | ||
159 | + BlockHash string `json:"blockChainId"` | ||
157 | } | 160 | } |
158 | 161 | ||
159 | -func ToCooperationProjectSearchItem(items []allied_creation_cooperation.DataCooperationProjectSearchItem, operatorOrgId int) []CooperationProjectSearchItem { | 162 | +func ToCooperationProjectSearchItem(items []allied_creation_cooperation.DataCooperationProjectSearchItem, operatorOrgId int, mapChainItems map[string]allied_creation_user.DataListBlockChainItem) []CooperationProjectSearchItem { |
160 | listData := []CooperationProjectSearchItem{} | 163 | listData := []CooperationProjectSearchItem{} |
161 | operatorOrgIdStr := strconv.Itoa(operatorOrgId) | 164 | operatorOrgIdStr := strconv.Itoa(operatorOrgId) |
162 | for i := range items { | 165 | for i := range items { |
@@ -164,6 +167,10 @@ func ToCooperationProjectSearchItem(items []allied_creation_cooperation.DataCoop | @@ -164,6 +167,10 @@ func ToCooperationProjectSearchItem(items []allied_creation_cooperation.DataCoop | ||
164 | DataCooperationProjectSearchItem: items[i], | 167 | DataCooperationProjectSearchItem: items[i], |
165 | AuthFlag: operatorOrgIdStr == items[i].Org.OrgID, | 168 | AuthFlag: operatorOrgIdStr == items[i].Org.OrgID, |
166 | } | 169 | } |
170 | + if v, ok := mapChainItems[items[i].CooperationProjectID]; ok { | ||
171 | + listItem.UpChainID = v.UpChainID | ||
172 | + listItem.BlockHash = v.BlockHash | ||
173 | + } | ||
167 | listData = append(listData, listItem) | 174 | listData = append(listData, listItem) |
168 | } | 175 | } |
169 | 176 |
1 | package service | 1 | package service |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" | ||
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
6 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/broker" | ||
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | ||
4 | "strconv" | 8 | "strconv" |
5 | 9 | ||
6 | "github.com/linmadan/egglib-go/core/application" | 10 | "github.com/linmadan/egglib-go/core/application" |
@@ -40,6 +44,14 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro | @@ -40,6 +44,14 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro | ||
40 | CooperationProjectId: result.CooperationProjectId, | 44 | CooperationProjectId: result.CooperationProjectId, |
41 | CreateCooperationProjectCommand: *createCooperationProjectCommand, | 45 | CreateCooperationProjectCommand: *createCooperationProjectCommand, |
42 | } | 46 | } |
47 | + if err = broker.Push(constant.TOPIC_UP_BLOCK_CHAIN, broker.NewPushObject( | ||
48 | + domain.BlockChainSourceCooperationProject, | ||
49 | + strconv.Itoa(result.CooperationProject.CooperationProjectId), | ||
50 | + strconv.Itoa(result.CooperationProject.CooperationProjectId), | ||
51 | + result, | ||
52 | + )); err != nil { | ||
53 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, "消息服务异常"+err.Error()) | ||
54 | + } | ||
43 | return data, nil | 55 | return data, nil |
44 | } | 56 | } |
45 | 57 | ||
@@ -122,7 +134,24 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje | @@ -122,7 +134,24 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje | ||
122 | if len(result.List) == 0 { | 134 | if len(result.List) == 0 { |
123 | result.List = []allied_creation_cooperation.DataCooperationProjectSearchItem{} | 135 | result.List = []allied_creation_cooperation.DataCooperationProjectSearchItem{} |
124 | } | 136 | } |
125 | - listData := dto.ToCooperationProjectSearchItem(result.List, int(listCooperationProjectQuery.Operator.OrgId)) | 137 | + var primaryIdList = make([]string, 0) |
138 | + for i := range result.List { | ||
139 | + item := &result.List[i].CooperationProjectID | ||
140 | + primaryIdList = append(primaryIdList, *item) | ||
141 | + } | ||
142 | + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
143 | + listCooperationProjectQuery.Operator) | ||
144 | + resp, err := creationUserGateway.ListBlockChains(allied_creation_user.ReqListBlockChain{ | ||
145 | + DisableLimit: true, | ||
146 | + EnableDistinctPrimaryID: true, | ||
147 | + PrimaryIDList: primaryIdList, | ||
148 | + Source: domain.BlockChainSourceCooperationProject, | ||
149 | + }) | ||
150 | + if err != nil { | ||
151 | + return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
152 | + } | ||
153 | + | ||
154 | + listData := dto.ToCooperationProjectSearchItem(result.List, int(listCooperationProjectQuery.Operator.OrgId), resp.ToMap()) | ||
126 | return int64(result.Total), listData, nil | 155 | return int64(result.Total), listData, nil |
127 | } | 156 | } |
128 | 157 | ||
@@ -130,7 +159,7 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje | @@ -130,7 +159,7 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje | ||
130 | func (cooperationProjectService *CooperationProjectService) UpdateCooperationProject(updateCooperationProjectCommand *command.UpdateCooperationProjectCommand) (interface{}, error) { | 159 | func (cooperationProjectService *CooperationProjectService) UpdateCooperationProject(updateCooperationProjectCommand *command.UpdateCooperationProjectCommand) (interface{}, error) { |
131 | 160 | ||
132 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator) | 161 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator) |
133 | - _, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{ | 162 | + result, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{ |
134 | CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId, | 163 | CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId, |
135 | CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName, | 164 | CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName, |
136 | CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber, | 165 | CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber, |
@@ -145,6 +174,14 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro | @@ -145,6 +174,14 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro | ||
145 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 174 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
146 | } | 175 | } |
147 | 176 | ||
177 | + if err = broker.Push(constant.TOPIC_UP_BLOCK_CHAIN, broker.NewPushObject( | ||
178 | + domain.BlockChainSourceCooperationProject, | ||
179 | + strconv.Itoa(result.CooperationProject.CooperationProjectId), | ||
180 | + strconv.Itoa(result.CooperationProject.CooperationProjectId), | ||
181 | + result, | ||
182 | + )); err != nil { | ||
183 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, "消息服务异常"+err.Error()) | ||
184 | + } | ||
148 | return updateCooperationProjectCommand, nil | 185 | return updateCooperationProjectCommand, nil |
149 | } | 186 | } |
150 | 187 |
@@ -120,5 +120,7 @@ type DividendsEstimateItem struct { | @@ -120,5 +120,7 @@ type DividendsEstimateItem struct { | ||
120 | OrgId int `json:"orgId,string,"` // 组织机构ID | 120 | OrgId int `json:"orgId,string,"` // 组织机构ID |
121 | OrgName string `json:"orgName"` // 组织名称 | 121 | OrgName string `json:"orgName"` // 组织名称 |
122 | } `json:"org"` // 数据所属组织机构 | 122 | } `json:"org"` // 数据所属组织机构 |
123 | - AuthFlag bool `json:"authFlag"` | 123 | + AuthFlag bool `json:"authFlag"` |
124 | + UpChainID int `json:"upChainId"` | ||
125 | + BlockHash string `json:"blockChainId"` | ||
124 | } | 126 | } |
@@ -5,7 +5,12 @@ import ( | @@ -5,7 +5,12 @@ import ( | ||
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/command" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/command" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/dto" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/dto" |
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/query" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/query" |
8 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" | ||
9 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
10 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/broker" | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | 11 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
12 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | ||
13 | + "strconv" | ||
9 | ) | 14 | ) |
10 | 15 | ||
11 | // 分红预算管理 | 16 | // 分红预算管理 |
@@ -37,6 +42,16 @@ func (dividendsEstimateService *DividendsEstimateService) EstimateDividendsIncen | @@ -37,6 +42,16 @@ func (dividendsEstimateService *DividendsEstimateService) EstimateDividendsIncen | ||
37 | respData := map[string]string{ | 42 | respData := map[string]string{ |
38 | "result": result.Report, | 43 | "result": result.Report, |
39 | } | 44 | } |
45 | + for _, v := range result.DividendsEstimates { | ||
46 | + if err = broker.Push(constant.TOPIC_UP_BLOCK_CHAIN, broker.NewPushObject( | ||
47 | + domain.BlockChainSourceCooperationDividendsEstimate, | ||
48 | + strconv.Itoa(int(v.DividendsEstimateId)), | ||
49 | + "", | ||
50 | + v, | ||
51 | + )); err != nil { | ||
52 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, "消息服务异常"+err.Error()) | ||
53 | + } | ||
54 | + } | ||
40 | return respData, nil | 55 | return respData, nil |
41 | } | 56 | } |
42 | 57 | ||
@@ -65,6 +80,16 @@ func (dividendsEstimateService *DividendsEstimateService) EstimateMoneyIncentive | @@ -65,6 +80,16 @@ func (dividendsEstimateService *DividendsEstimateService) EstimateMoneyIncentive | ||
65 | returnData := map[string]interface{}{ | 80 | returnData := map[string]interface{}{ |
66 | "list": data, | 81 | "list": data, |
67 | } | 82 | } |
83 | + for _, v := range result { | ||
84 | + if err = broker.Push(constant.TOPIC_UP_BLOCK_CHAIN, broker.NewPushObject( | ||
85 | + domain.BlockChainSourceCooperationDividendsEstimate, | ||
86 | + strconv.Itoa(int(v.DividendsEstimateId)), | ||
87 | + "", | ||
88 | + v, | ||
89 | + )); err != nil { | ||
90 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, "消息服务异常"+err.Error()) | ||
91 | + } | ||
92 | + } | ||
68 | return returnData, nil | 93 | return returnData, nil |
69 | } | 94 | } |
70 | 95 | ||
@@ -85,6 +110,23 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsEstimat | @@ -85,6 +110,23 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsEstimat | ||
85 | if err != nil { | 110 | if err != nil { |
86 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 111 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
87 | } | 112 | } |
113 | + var primaryIdList = make([]string, 0) | ||
114 | + for _, v := range result.Grid.List { | ||
115 | + item := strconv.Itoa(v.DividendsEstimateId) | ||
116 | + primaryIdList = append(primaryIdList, item) | ||
117 | + } | ||
118 | + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
119 | + searchDividendsEstimateQuery.Operator) | ||
120 | + resp, err := creationUserGateway.ListBlockChains(allied_creation_user.ReqListBlockChain{ | ||
121 | + DisableLimit: true, | ||
122 | + EnableDistinctPrimaryID: true, | ||
123 | + PrimaryIDList: primaryIdList, | ||
124 | + Source: domain.BlockChainSourceCooperationDividendsEstimate, | ||
125 | + }) | ||
126 | + if err != nil { | ||
127 | + return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
128 | + } | ||
129 | + mapChainItems := resp.ToMap() | ||
88 | 130 | ||
89 | items := []dto.DividendsEstimateItem{} | 131 | items := []dto.DividendsEstimateItem{} |
90 | for _, v := range result.Grid.List { | 132 | for _, v := range result.Grid.List { |
@@ -110,6 +152,12 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsEstimat | @@ -110,6 +152,12 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsEstimat | ||
110 | item.DividendsUser.UserType = v.DividendsUser.UserType | 152 | item.DividendsUser.UserType = v.DividendsUser.UserType |
111 | item.Org.OrgId = v.Org.OrgId | 153 | item.Org.OrgId = v.Org.OrgId |
112 | item.Org.OrgName = v.Org.OrgName | 154 | item.Org.OrgName = v.Org.OrgName |
155 | + | ||
156 | + primaryId := strconv.Itoa(v.DividendsEstimateId) | ||
157 | + if v, ok := mapChainItems[primaryId]; ok { | ||
158 | + item.UpChainID = v.UpChainID | ||
159 | + item.BlockHash = v.BlockHash | ||
160 | + } | ||
113 | items = append(items, item) | 161 | items = append(items, item) |
114 | } | 162 | } |
115 | 163 |
@@ -11,6 +11,7 @@ type ImportDataCommand struct { | @@ -11,6 +11,7 @@ type ImportDataCommand struct { | ||
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | Reader io.Reader `json:"-"` | 13 | Reader io.Reader `json:"-"` |
14 | + FileExt string `json:"-"` | ||
14 | // 业务编码 | 15 | // 业务编码 |
15 | Code string `form:"code"` | 16 | Code string `form:"code"` |
16 | } | 17 | } |
@@ -10,5 +10,6 @@ type CompanyUserListQuery struct { | @@ -10,5 +10,6 @@ type CompanyUserListQuery struct { | ||
10 | //所属部门 | 10 | //所属部门 |
11 | DepartmentName string `json:"departmentName"` | 11 | DepartmentName string `json:"departmentName"` |
12 | //操作人 | 12 | //操作人 |
13 | - Operator domain.Operator `json:"-"` | 13 | + Operator domain.Operator `json:"-"` |
14 | + SelectedField []string `json:"selectedField"` | ||
14 | } | 15 | } |
@@ -10,5 +10,6 @@ type CooperationUserListQuery struct { | @@ -10,5 +10,6 @@ type CooperationUserListQuery struct { | ||
10 | //用户名称 | 10 | //用户名称 |
11 | UserName string `json:"userName"` | 11 | UserName string `json:"userName"` |
12 | //共创公司 | 12 | //共创公司 |
13 | - CooperationCompany string `json:"cooperationCompany"` | 13 | + CooperationCompany string `json:"cooperationCompany"` |
14 | + SelectedField []string `json:"selectedField"` | ||
14 | } | 15 | } |
@@ -2,6 +2,7 @@ package service | @@ -2,6 +2,7 @@ package service | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | + | ||
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/query" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/query" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" |
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" |
@@ -25,7 +26,10 @@ func (srv ExcelDataService) ExportCompanyUser(companyUserListQuery *query.Compan | @@ -25,7 +26,10 @@ func (srv ExcelDataService) ExportCompanyUser(companyUserListQuery *query.Compan | ||
25 | if err != nil { | 26 | if err != nil { |
26 | return ExportCompanyUserData{}, fmt.Errorf("获取企业用户数据失败:%w", err) | 27 | return ExportCompanyUserData{}, fmt.Errorf("获取企业用户数据失败:%w", err) |
27 | } | 28 | } |
28 | - return ExportCompanyUserData(result.Users), nil | 29 | + return ExportCompanyUserData{ |
30 | + SourceData: result.Users, | ||
31 | + SelectedField: companyUserListQuery.SelectedField, | ||
32 | + }, nil | ||
29 | } | 33 | } |
30 | 34 | ||
31 | // ExportCooperationUser 导出共创用户信息列表 | 35 | // ExportCooperationUser 导出共创用户信息列表 |
@@ -45,5 +49,5 @@ func (srv ExcelDataService) ExportCooperationUser(companyUserListQuery *query.Co | @@ -45,5 +49,5 @@ func (srv ExcelDataService) ExportCooperationUser(companyUserListQuery *query.Co | ||
45 | if err != nil { | 49 | if err != nil { |
46 | return ExportCooperationUserData{}, fmt.Errorf("获取企业用户数据失败:%w", err) | 50 | return ExportCooperationUserData{}, fmt.Errorf("获取企业用户数据失败:%w", err) |
47 | } | 51 | } |
48 | - return ExportCooperationUserData(result.Users), nil | 52 | + return ExportCooperationUserData{SourceData: result.Users, SelectedField: companyUserListQuery.SelectedField}, nil |
49 | } | 53 | } |
@@ -2,6 +2,7 @@ package service | @@ -2,6 +2,7 @@ package service | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/util/converter" | ||
5 | "strings" | 6 | "strings" |
6 | 7 | ||
7 | "github.com/linmadan/egglib-go/core/application" | 8 | "github.com/linmadan/egglib-go/core/application" |
@@ -43,15 +44,12 @@ func (srv ExcelDataService) ImportCooperationUser(importDataCommand *command.Imp | @@ -43,15 +44,12 @@ func (srv ExcelDataService) ImportCooperationUser(importDataCommand *command.Imp | ||
43 | {EnName: "phone", CnName: "*手机号"}, | 44 | {EnName: "phone", CnName: "*手机号"}, |
44 | {EnName: "email", CnName: "邮箱"}, | 45 | {EnName: "email", CnName: "邮箱"}, |
45 | } | 46 | } |
46 | - excelData, err := excelImport.OpenExcelFromIoReader(importDataCommand.Reader) | 47 | + excelData, err := converter.OpenImportFileFromIoReader(excelImport, importDataCommand.Reader, importDataCommand.FileExt) //excelImport.OpenExcelFromIoReader(importDataCommand.Reader) |
47 | if err != nil { | 48 | if err != nil { |
48 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 49 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
49 | } | 50 | } |
50 | users := make([]allied_creation_user.BatchAddUserItem, 0) | 51 | users := make([]allied_creation_user.BatchAddUserItem, 0) |
51 | for _, v := range excelData { | 52 | for _, v := range excelData { |
52 | - if srv.fieldValueAllEmpty(v) { | ||
53 | - continue | ||
54 | - } | ||
55 | item := allied_creation_user.BatchAddUserItem{ | 53 | item := allied_creation_user.BatchAddUserItem{ |
56 | CompanyId: importDataCommand.Operator.CompanyId, | 54 | CompanyId: importDataCommand.Operator.CompanyId, |
57 | UserType: domain.UserTypeCooperation, | 55 | UserType: domain.UserTypeCooperation, |
@@ -216,3 +214,14 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import | @@ -216,3 +214,14 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import | ||
216 | "url": url, | 214 | "url": url, |
217 | }, nil | 215 | }, nil |
218 | } | 216 | } |
217 | + | ||
218 | +func (srv ExcelDataService) GetExcelDataFields(code string) (interface{}, error) { | ||
219 | + dataFileds := []DataFieldOptions{} | ||
220 | + switch code { | ||
221 | + case domain.ExportCompanyUser: | ||
222 | + dataFileds = (ExportCompanyUserData{}).AllFields() | ||
223 | + case domain.ExportCooperationUser: | ||
224 | + dataFileds = (ExportCooperationUserData{}).AllFields() | ||
225 | + } | ||
226 | + return dataFileds, nil | ||
227 | +} |
@@ -5,13 +5,22 @@ import ( | @@ -5,13 +5,22 @@ import ( | ||
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" |
6 | ) | 6 | ) |
7 | 7 | ||
8 | +type DataFieldOptions struct { | ||
9 | + EnName string `json:"enName"` | ||
10 | + CnName string `json:"cnName"` | ||
11 | + IsDefault bool `json:"isDefault"` | ||
12 | +} | ||
13 | + | ||
8 | // ExportCompanyUserData 导出公司用户数据 | 14 | // ExportCompanyUserData 导出公司用户数据 |
9 | -type ExportCompanyUserData []allied_creation_user.UserDetail | 15 | +type ExportCompanyUserData struct { |
16 | + SourceData []allied_creation_user.UserDetail | ||
17 | + SelectedField []string | ||
18 | +} | ||
10 | 19 | ||
11 | var _ excel.ExcelMaker = (*ExportCompanyUserData)(nil) | 20 | var _ excel.ExcelMaker = (*ExportCompanyUserData)(nil) |
12 | 21 | ||
13 | -func (data ExportCompanyUserData) DataFieldList() []excel.DataField { | ||
14 | - return []excel.DataField{ | 22 | +func (data ExportCompanyUserData) AllFields() []DataFieldOptions { |
23 | + return []DataFieldOptions{ | ||
15 | {EnName: "UserCode", CnName: "用户编码"}, | 24 | {EnName: "UserCode", CnName: "用户编码"}, |
16 | {EnName: "UserName", CnName: "用户姓名"}, | 25 | {EnName: "UserName", CnName: "用户姓名"}, |
17 | {EnName: "Phone", CnName: "手机号"}, | 26 | {EnName: "Phone", CnName: "手机号"}, |
@@ -21,25 +30,42 @@ func (data ExportCompanyUserData) DataFieldList() []excel.DataField { | @@ -21,25 +30,42 @@ func (data ExportCompanyUserData) DataFieldList() []excel.DataField { | ||
21 | } | 30 | } |
22 | } | 31 | } |
23 | 32 | ||
33 | +func (data ExportCompanyUserData) DataFieldList() []excel.DataField { | ||
34 | + fields := []excel.DataField{} | ||
35 | + allFields := data.AllFields() | ||
36 | + for _, value2 := range allFields { | ||
37 | + if len(data.SelectedField) == 0 || value2.IsDefault { | ||
38 | + fields = append(fields, excel.DataField{EnName: value2.EnName, CnName: value2.CnName}) | ||
39 | + continue | ||
40 | + } | ||
41 | + for _, value3 := range data.SelectedField { | ||
42 | + if value2.EnName == value3 { | ||
43 | + fields = append(fields, excel.DataField{EnName: value2.EnName, CnName: value2.CnName}) | ||
44 | + } | ||
45 | + } | ||
46 | + } | ||
47 | + return fields | ||
48 | +} | ||
49 | + | ||
24 | func (data ExportCompanyUserData) CellValue(index int, enName string) (value interface{}) { | 50 | func (data ExportCompanyUserData) CellValue(index int, enName string) (value interface{}) { |
25 | if index > data.DataListLen() { | 51 | if index > data.DataListLen() { |
26 | return "" | 52 | return "" |
27 | } | 53 | } |
28 | switch enName { | 54 | switch enName { |
29 | case "UserCode": | 55 | case "UserCode": |
30 | - return data[index].UserCode | 56 | + return data.SourceData[index].UserCode |
31 | case "UserName": | 57 | case "UserName": |
32 | - return data[index].UserInfo.UserName | 58 | + return data.SourceData[index].UserInfo.UserName |
33 | case "Phone": | 59 | case "Phone": |
34 | - return data[index].UserInfo.Phone | 60 | + return data.SourceData[index].UserInfo.Phone |
35 | case "DepartmentName": | 61 | case "DepartmentName": |
36 | - if data[index].Department != nil { | ||
37 | - return data[index].Department.DepartmentName | 62 | + if data.SourceData[index].Department != nil { |
63 | + return data.SourceData[index].Department.DepartmentName | ||
38 | } else { | 64 | } else { |
39 | return "" | 65 | return "" |
40 | } | 66 | } |
41 | case "EnableStatus": | 67 | case "EnableStatus": |
42 | - status := data[index].EnableStatus | 68 | + status := data.SourceData[index].EnableStatus |
43 | statusName := "" | 69 | statusName := "" |
44 | // 状态(1:启用 2:禁用 3:注销) | 70 | // 状态(1:启用 2:禁用 3:注销) |
45 | switch status { | 71 | switch status { |
@@ -52,8 +78,8 @@ func (data ExportCompanyUserData) CellValue(index int, enName string) (value int | @@ -52,8 +78,8 @@ func (data ExportCompanyUserData) CellValue(index int, enName string) (value int | ||
52 | } | 78 | } |
53 | return statusName | 79 | return statusName |
54 | case "OrgName": | 80 | case "OrgName": |
55 | - if data[index].Org != nil { | ||
56 | - return data[index].Org.OrgName | 81 | + if data.SourceData[index].Org != nil { |
82 | + return data.SourceData[index].Org.OrgName | ||
57 | } else { | 83 | } else { |
58 | return "" | 84 | return "" |
59 | } | 85 | } |
@@ -62,7 +88,7 @@ func (data ExportCompanyUserData) CellValue(index int, enName string) (value int | @@ -62,7 +88,7 @@ func (data ExportCompanyUserData) CellValue(index int, enName string) (value int | ||
62 | } | 88 | } |
63 | 89 | ||
64 | func (data ExportCompanyUserData) DataListLen() int { | 90 | func (data ExportCompanyUserData) DataListLen() int { |
65 | - return len(data) | 91 | + return len(data.SourceData) |
66 | } | 92 | } |
67 | 93 | ||
68 | func (data ExportCompanyUserData) TableTitle() []string { | 94 | func (data ExportCompanyUserData) TableTitle() []string { |
@@ -70,21 +96,39 @@ func (data ExportCompanyUserData) TableTitle() []string { | @@ -70,21 +96,39 @@ func (data ExportCompanyUserData) TableTitle() []string { | ||
70 | } | 96 | } |
71 | 97 | ||
72 | //ExportCooperationUserData 导出共创用户数据 | 98 | //ExportCooperationUserData 导出共创用户数据 |
73 | -type ExportCooperationUserData []allied_creation_user.UserDetail | 99 | +type ExportCooperationUserData struct { |
100 | + SourceData []allied_creation_user.UserDetail | ||
101 | + SelectedField []string | ||
102 | +} | ||
74 | 103 | ||
75 | var _ excel.ExcelMaker = (*ExportCooperationUserData)(nil) | 104 | var _ excel.ExcelMaker = (*ExportCooperationUserData)(nil) |
76 | 105 | ||
77 | -func (data ExportCooperationUserData) DataFieldList() []excel.DataField { | ||
78 | - return []excel.DataField{ | 106 | +func (data ExportCooperationUserData) AllFields() []DataFieldOptions { |
107 | + return []DataFieldOptions{ | ||
79 | {EnName: "UserCode", CnName: "用户编码"}, | 108 | {EnName: "UserCode", CnName: "用户编码"}, |
80 | {EnName: "UserName", CnName: "用户姓名"}, | 109 | {EnName: "UserName", CnName: "用户姓名"}, |
81 | {EnName: "Phone", CnName: "手机号"}, | 110 | {EnName: "Phone", CnName: "手机号"}, |
82 | {EnName: "CooperationCompany", CnName: "共创公司"}, | 111 | {EnName: "CooperationCompany", CnName: "共创公司"}, |
83 | {EnName: "CooperationDeadline", CnName: "共创到期"}, | 112 | {EnName: "CooperationDeadline", CnName: "共创到期"}, |
84 | {EnName: "EnableStatus", CnName: "状态"}, | 113 | {EnName: "EnableStatus", CnName: "状态"}, |
114 | + } | ||
115 | +} | ||
85 | 116 | ||
86 | - //{EnName: "Email", CnName: "邮箱"}, | 117 | +func (data ExportCooperationUserData) DataFieldList() []excel.DataField { |
118 | + fields := []excel.DataField{} | ||
119 | + allFields := data.AllFields() | ||
120 | + for _, value2 := range allFields { | ||
121 | + if len(data.SelectedField) == 0 || value2.IsDefault { | ||
122 | + fields = append(fields, excel.DataField{EnName: value2.EnName, CnName: value2.CnName}) | ||
123 | + continue | ||
124 | + } | ||
125 | + for _, value3 := range data.SelectedField { | ||
126 | + if value2.EnName == value3 { | ||
127 | + fields = append(fields, excel.DataField{EnName: value2.EnName, CnName: value2.CnName}) | ||
128 | + } | ||
129 | + } | ||
87 | } | 130 | } |
131 | + return fields | ||
88 | } | 132 | } |
89 | 133 | ||
90 | func (data ExportCooperationUserData) CellValue(index int, enName string) (value interface{}) { | 134 | func (data ExportCooperationUserData) CellValue(index int, enName string) (value interface{}) { |
@@ -93,22 +137,22 @@ func (data ExportCooperationUserData) CellValue(index int, enName string) (value | @@ -93,22 +137,22 @@ func (data ExportCooperationUserData) CellValue(index int, enName string) (value | ||
93 | } | 137 | } |
94 | switch enName { | 138 | switch enName { |
95 | case "UserCode": | 139 | case "UserCode": |
96 | - return data[index].UserCode | 140 | + return data.SourceData[index].UserCode |
97 | case "UserName": | 141 | case "UserName": |
98 | - return data[index].UserInfo.UserName | 142 | + return data.SourceData[index].UserInfo.UserName |
99 | case "CooperationCompany": | 143 | case "CooperationCompany": |
100 | - return data[index].CooperationInfo.CooperationCompany | 144 | + return data.SourceData[index].CooperationInfo.CooperationCompany |
101 | case "CooperationDeadline": | 145 | case "CooperationDeadline": |
102 | - if data[index].CooperationInfo.CooperationDeadline.IsZero() || data[index].CooperationInfo.CooperationDeadline.Unix() == 0 { | 146 | + if data.SourceData[index].CooperationInfo.CooperationDeadline.IsZero() || data.SourceData[index].CooperationInfo.CooperationDeadline.Unix() == 0 { |
103 | return "" | 147 | return "" |
104 | } | 148 | } |
105 | - return data[index].CooperationInfo.CooperationDeadline.Format("2006-01-02") | 149 | + return data.SourceData[index].CooperationInfo.CooperationDeadline.Format("2006-01-02") |
106 | case "Phone": | 150 | case "Phone": |
107 | - return data[index].UserInfo.Phone | 151 | + return data.SourceData[index].UserInfo.Phone |
108 | case "Email": | 152 | case "Email": |
109 | - return data[index].UserInfo.Email | 153 | + return data.SourceData[index].UserInfo.Email |
110 | case "EnableStatus": | 154 | case "EnableStatus": |
111 | - status := data[index].EnableStatus | 155 | + status := data.SourceData[index].EnableStatus |
112 | statusName := "" | 156 | statusName := "" |
113 | // 状态(1:启用 2:禁用 3:注销) | 157 | // 状态(1:启用 2:禁用 3:注销) |
114 | switch status { | 158 | switch status { |
@@ -125,7 +169,7 @@ func (data ExportCooperationUserData) CellValue(index int, enName string) (value | @@ -125,7 +169,7 @@ func (data ExportCooperationUserData) CellValue(index int, enName string) (value | ||
125 | } | 169 | } |
126 | 170 | ||
127 | func (data ExportCooperationUserData) DataListLen() int { | 171 | func (data ExportCooperationUserData) DataListLen() int { |
128 | - return len(data) | 172 | + return len(data.SourceData) |
129 | } | 173 | } |
130 | 174 | ||
131 | func (data ExportCooperationUserData) TableTitle() []string { | 175 | func (data ExportCooperationUserData) TableTitle() []string { |
@@ -2,6 +2,7 @@ package query | @@ -2,6 +2,7 @@ package query | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/util/advance" | ||
5 | 6 | ||
6 | "github.com/beego/beego/v2/core/validation" | 7 | "github.com/beego/beego/v2/core/validation" |
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" |
@@ -19,6 +20,8 @@ type CompanyUserListQuery struct { | @@ -19,6 +20,8 @@ type CompanyUserListQuery struct { | ||
19 | DepartmentName string `json:"departmentName"` | 20 | DepartmentName string `json:"departmentName"` |
20 | //操作人 | 21 | //操作人 |
21 | Operator domain.Operator `json:"-"` | 22 | Operator domain.Operator `json:"-"` |
23 | + | ||
24 | + AdvancedQueries advance.AdvancedQueries `json:"advancedQueries"` | ||
22 | } | 25 | } |
23 | 26 | ||
24 | func (companyUserListQuery *CompanyUserListQuery) Valid(validation *validation.Validation) { | 27 | func (companyUserListQuery *CompanyUserListQuery) Valid(validation *validation.Validation) { |
@@ -181,7 +181,7 @@ func (usersService *UsersService) CompanyUserEnable(companyUserEnableCommand *co | @@ -181,7 +181,7 @@ func (usersService *UsersService) CompanyUserEnable(companyUserEnableCommand *co | ||
181 | func (usersService *UsersService) CompanyUserList(companyUserListQuery *query.CompanyUserListQuery) (int64, interface{}, error) { | 181 | func (usersService *UsersService) CompanyUserList(companyUserListQuery *query.CompanyUserListQuery) (int64, interface{}, error) { |
182 | creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(domain.Operator{}) | 182 | creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(domain.Operator{}) |
183 | result, err := creationUserGateway.UserSearch(allied_creation_user.ReqUserSearch{ | 183 | result, err := creationUserGateway.UserSearch(allied_creation_user.ReqUserSearch{ |
184 | - Offset: (companyUserListQuery.PageNumber - 1) * companyUserListQuery.PageSize, | 184 | + Offset: (companyUserListQuery.PageNumber - 1) * companyUserListQuery.PageSize, |
185 | Limit: companyUserListQuery.PageSize, | 185 | Limit: companyUserListQuery.PageSize, |
186 | CompanyId: companyUserListQuery.Operator.CompanyId, | 186 | CompanyId: companyUserListQuery.Operator.CompanyId, |
187 | OrganizationId: 0, | 187 | OrganizationId: 0, |
@@ -192,6 +192,7 @@ func (usersService *UsersService) CompanyUserList(companyUserListQuery *query.Co | @@ -192,6 +192,7 @@ func (usersService *UsersService) CompanyUserList(companyUserListQuery *query.Co | ||
192 | UserType: domain.UserTypeEmployee, | 192 | UserType: domain.UserTypeEmployee, |
193 | InOrgIds: companyUserListQuery.Operator.OrgIds, | 193 | InOrgIds: companyUserListQuery.Operator.OrgIds, |
194 | PullRealTime: true, | 194 | PullRealTime: true, |
195 | + AdvancedQuery: domain.AdvancedQuerySql(domain.UserModel{}.ModelName(), companyUserListQuery.AdvancedQueries), | ||
195 | }) | 196 | }) |
196 | 197 | ||
197 | if err != nil { | 198 | if err != nil { |
@@ -593,7 +594,7 @@ func (usersService *UsersService) SelectorCooperationProjectUsers(q *query.Coope | @@ -593,7 +594,7 @@ func (usersService *UsersService) SelectorCooperationProjectUsers(q *query.Coope | ||
593 | for i := range resultApplication.Grid.List { | 594 | for i := range resultApplication.Grid.List { |
594 | item := resultApplication.Grid.List[i] | 595 | item := resultApplication.Grid.List[i] |
595 | user := map[string]interface{}{ | 596 | user := map[string]interface{}{ |
596 | - "userId": item.CooperationApplicationApplicant.UserID, | 597 | + "userId": fmt.Sprintf("%v", item.CooperationApplicationApplicant.UserID), |
597 | "userCode": item.CooperationApplicationApplicant.UserInfo.UserCode, | 598 | "userCode": item.CooperationApplicationApplicant.UserInfo.UserCode, |
598 | "userInfo": map[string]interface{}{ | 599 | "userInfo": map[string]interface{}{ |
599 | "userName": item.CooperationApplicationApplicant.UserInfo.UserName, | 600 | "userName": item.CooperationApplicationApplicant.UserInfo.UserName, |
@@ -13,8 +13,10 @@ var LOG_FRAMEWORK = "beego" // beego logrus | @@ -13,8 +13,10 @@ var LOG_FRAMEWORK = "beego" // beego logrus | ||
13 | var LOG_FILE = "app.log" | 13 | var LOG_FILE = "app.log" |
14 | var LOG_PREFIX = "[allied-creation-gateway]" | 14 | var LOG_PREFIX = "[allied-creation-gateway]" |
15 | 15 | ||
16 | +var FileStatic = "./static" | ||
17 | + | ||
16 | var HTTP_PORT int = 8083 | 18 | var HTTP_PORT int = 8083 |
17 | -var ALLIED_CREATION_GATEWAY_HOST = "https://allied-creation-gateway-dev.fjmaimaimai.com" | 19 | +var ALLIED_CREATION_GATEWAY_HOST = "http://localhost:8080" |
18 | 20 | ||
19 | //天联共创基础模块 | 21 | //天联共创基础模块 |
20 | var ALLIED_CREATION_BASIC_HOST = "http://localhost:8080" //"http://allied-creation-basic-dev.fjmaimaimai.com" | 22 | var ALLIED_CREATION_BASIC_HOST = "http://localhost:8080" //"http://allied-creation-basic-dev.fjmaimaimai.com" |
@@ -26,11 +28,14 @@ var ALLIED_CREATION_USER_HOST = "http://localhost:8081" //"http://allied-creatio | @@ -26,11 +28,14 @@ var ALLIED_CREATION_USER_HOST = "http://localhost:8081" //"http://allied-creatio | ||
26 | var ALLIED_CREATION_COOPERATION_HOST = "http://localhost:8082" // "http://allied-creation-cooperation-dev.fjmaimaimai.com" | 28 | var ALLIED_CREATION_COOPERATION_HOST = "http://localhost:8082" // "http://allied-creation-cooperation-dev.fjmaimaimai.com" |
27 | 29 | ||
28 | // 版本更新模块 | 30 | // 版本更新模块 |
29 | -var SUPLUS_ADMIN_BASE_HOST = "http://suplus-admin-base-test.fjmaimaimai.com" | 31 | +var SUPLUS_ADMIN_BASE_HOST = "http://suplus-admin-base-dev.fjmaimaimai.com" |
30 | 32 | ||
31 | //通用模块短信服务 | 33 | //通用模块短信服务 |
32 | var SMS_SERVE_HOST = "https://sms.fjmaimaimai.com:9897" | 34 | var SMS_SERVE_HOST = "https://sms.fjmaimaimai.com:9897" |
33 | 35 | ||
36 | +//素加销售导航服务 | ||
37 | +var SUPLUS_SALE_APP = "http://suplus-sale-app-gateway-test.fjmaimaimai.com" | ||
38 | + | ||
34 | // TODO:特殊短信验证码,不验证,正式环境注入空 | 39 | // TODO:特殊短信验证码,不验证,正式环境注入空 |
35 | var SMSCODE_ALL_POWER = "999512" | 40 | var SMSCODE_ALL_POWER = "999512" |
36 | 41 | ||
@@ -65,4 +70,7 @@ func init() { | @@ -65,4 +70,7 @@ func init() { | ||
65 | if os.Getenv("SMSCODE_ALL_POWER") != "" { | 70 | if os.Getenv("SMSCODE_ALL_POWER") != "" { |
66 | SMSCODE_ALL_POWER = os.Getenv("SMSCODE_ALL_POWER") | 71 | SMSCODE_ALL_POWER = os.Getenv("SMSCODE_ALL_POWER") |
67 | } | 72 | } |
73 | + if os.Getenv("SUPLUS_SALE_APP") != "" { | ||
74 | + SUPLUS_SALE_APP = os.Getenv("SUPLUS_SALE_APP") | ||
75 | + } | ||
68 | } | 76 | } |
@@ -4,17 +4,19 @@ import "os" | @@ -4,17 +4,19 @@ import "os" | ||
4 | 4 | ||
5 | var ( | 5 | var ( |
6 | // kafka 地址 | 6 | // kafka 地址 |
7 | - KAFKA_HOST = "192.168.0.250:9092,192.168.0.251:9092,192.168.0.252:9092" | 7 | + KAFKA_HOST = "192.168.0.250:9092,192.168.0.251:9092,192.168.0.252:9092" // "106.75.231.90:9092" |
8 | // kafka topic log stash | 8 | // kafka topic log stash |
9 | TOPIC_LOG_STASH = "go_stash_dev" | 9 | TOPIC_LOG_STASH = "go_stash_dev" |
10 | // 是否启用日志收集 (本地不启用) | 10 | // 是否启用日志收集 (本地不启用) |
11 | ENABLE_KAFKA_LOG = false | 11 | ENABLE_KAFKA_LOG = false |
12 | + // kafka topic up_block_chain | ||
13 | + TOPIC_UP_BLOCK_CHAIN = "up_block_chain" | ||
12 | ) | 14 | ) |
13 | 15 | ||
14 | func init() { | 16 | func init() { |
15 | - //if os.Getenv("KAFKA_HOST") != "" { | ||
16 | - // POSTGRESQL_HOST = os.Getenv("KAFKA_HOST") | ||
17 | - //} | 17 | + if os.Getenv("KAFKA_HOST") != "" { |
18 | + KAFKA_HOST = os.Getenv("KAFKA_HOST") | ||
19 | + } | ||
18 | //if os.Getenv("TOPIC_LOG_STASH") != "" { | 20 | //if os.Getenv("TOPIC_LOG_STASH") != "" { |
19 | // POSTGRESQL_PORT = os.Getenv("TOPIC_LOG_STASH") | 21 | // POSTGRESQL_PORT = os.Getenv("TOPIC_LOG_STASH") |
20 | //} | 22 | //} |
pkg/domain/advance.go
0 → 100644
1 | +package domain | ||
2 | + | ||
3 | +import ( | ||
4 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/util/advance" | ||
6 | +) | ||
7 | + | ||
8 | +type ( | ||
9 | + Model struct { | ||
10 | + Columns []advance.Column `json:"columns"` | ||
11 | + MapColumn advance.MapColumn `json:"-"` | ||
12 | + Name string `json:"name"` | ||
13 | + } | ||
14 | + ModelInterface interface { | ||
15 | + ModelName() string | ||
16 | + Columns() []advance.Column | ||
17 | + } | ||
18 | +) | ||
19 | + | ||
20 | +var registerModels = make(map[string]Model) | ||
21 | + | ||
22 | +// AdvancedQuerySql 高级查询语句生成 | ||
23 | +func AdvancedQuerySql(model string, quires advance.AdvancedQueries) string { | ||
24 | + if len(quires) == 0 { | ||
25 | + return "" | ||
26 | + } | ||
27 | + fixQueries := mergeDuplicateQueries(model, quires) | ||
28 | + sql, err := advance.AdvancedQuerySql(fixQueries) | ||
29 | + if err != nil { | ||
30 | + log.Logger.Error(err.Error()) | ||
31 | + } | ||
32 | + return sql | ||
33 | +} | ||
34 | + | ||
35 | +func mergeDuplicateQueries(model string, quires advance.AdvancedQueries) []advance.AdvancedQuery { | ||
36 | + m, ok := GetModel(model) | ||
37 | + response := make([]advance.AdvancedQuery, 0) | ||
38 | + mapResponse := make(map[string]advance.AdvancedQuery) | ||
39 | + if !ok { | ||
40 | + return response | ||
41 | + } | ||
42 | + for i := range quires { | ||
43 | + c, ok := m.MapColumn[quires[i].Column.Column] | ||
44 | + if !ok { | ||
45 | + continue | ||
46 | + } | ||
47 | + quires[i].Column = c | ||
48 | + if q, ok := mapResponse[c.Column]; ok { | ||
49 | + q.Exprs = append(q.Exprs, quires[i].Exprs...) | ||
50 | + } else { | ||
51 | + mapResponse[c.Column] = quires[i] | ||
52 | + } | ||
53 | + } | ||
54 | + for _, v := range mapResponse { | ||
55 | + response = append(response, v) | ||
56 | + } | ||
57 | + return response | ||
58 | +} | ||
59 | + | ||
60 | +func NewModel(m ModelInterface) Model { | ||
61 | + return Model{ | ||
62 | + Name: m.ModelName(), | ||
63 | + Columns: m.Columns(), | ||
64 | + MapColumn: advance.NewMapColumn(m.Columns()), | ||
65 | + } | ||
66 | +} | ||
67 | + | ||
68 | +func RegisModel(m Model) { | ||
69 | + if _, ok := registerModels[m.Name]; ok { | ||
70 | + panic("register modes exists:" + m.Name) | ||
71 | + } | ||
72 | + registerModels[m.Name] = m | ||
73 | +} | ||
74 | + | ||
75 | +func GetModel(name string) (Model, bool) { | ||
76 | + m, ok := registerModels[name] | ||
77 | + return m, ok | ||
78 | +} | ||
79 | + | ||
80 | +/*User*/ | ||
81 | +type UserModel struct{} | ||
82 | + | ||
83 | +// 实现接口 ModelInterface | ||
84 | +func (u UserModel) ModelName() string { return "user" } | ||
85 | +func (u UserModel) Columns() []advance.Column { | ||
86 | + return []advance.Column{ | ||
87 | + { | ||
88 | + Column: "userCode", | ||
89 | + Name: "用户编号", | ||
90 | + DbAlias: "user_code", | ||
91 | + ValueType: advance.ValueChars, | ||
92 | + }, | ||
93 | + { | ||
94 | + Column: "userName", | ||
95 | + Name: "姓名", | ||
96 | + DbAlias: "ext->>'userName'", | ||
97 | + ValueType: advance.ValueChars, | ||
98 | + }, | ||
99 | + { | ||
100 | + Column: "phone", | ||
101 | + Name: "手机号", | ||
102 | + DbAlias: "ext->>'phone'", | ||
103 | + ValueType: advance.ValueChars, | ||
104 | + }, | ||
105 | + { | ||
106 | + Column: "depName", | ||
107 | + Name: "所属部门", | ||
108 | + DbAlias: "ext->>'depName'", | ||
109 | + ValueType: advance.ValueChars, | ||
110 | + }, | ||
111 | + { | ||
112 | + Column: "status", | ||
113 | + Name: "状态", | ||
114 | + DbAlias: "enable_status", | ||
115 | + ValueType: advance.ValueNumber, | ||
116 | + }, | ||
117 | + { | ||
118 | + Column: "orgName", | ||
119 | + Name: "组织机构", | ||
120 | + DbAlias: "ext->>'orgName'", | ||
121 | + ValueType: advance.ValueChars, | ||
122 | + }, | ||
123 | + } | ||
124 | +} |
@@ -5,6 +5,7 @@ package domain | @@ -5,6 +5,7 @@ package domain | ||
5 | const ( | 5 | const ( |
6 | UserTypeEmployee = 1 | 6 | UserTypeEmployee = 1 |
7 | UserTypeCooperation = 2 | 7 | UserTypeCooperation = 2 |
8 | + UserTypeVisitor = 4 | ||
8 | UserTypeCompanyAdmin = 1024 | 9 | UserTypeCompanyAdmin = 1024 |
9 | ) | 10 | ) |
10 | 11 | ||
@@ -73,3 +74,8 @@ const ( | @@ -73,3 +74,8 @@ const ( | ||
73 | const ( | 74 | const ( |
74 | CooperationUserDepartmentName = "共创用户" | 75 | CooperationUserDepartmentName = "共创用户" |
75 | ) | 76 | ) |
77 | + | ||
78 | +const ( | ||
79 | + BlockChainSourceCooperationProject = "allied-creation.cooperation.project" | ||
80 | + BlockChainSourceCooperationDividendsEstimate = "allied-creation.cooperation.dividends-estimate" | ||
81 | +) |
@@ -4,22 +4,22 @@ import ( | @@ -4,22 +4,22 @@ import ( | ||
4 | "encoding/base64" | 4 | "encoding/base64" |
5 | "fmt" | 5 | "fmt" |
6 | "github.com/forgoer/openssl" | 6 | "github.com/forgoer/openssl" |
7 | + "github.com/google/uuid" | ||
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" |
8 | - "time" | ||
9 | - | ||
10 | - jwt "github.com/dgrijalva/jwt-go" | 9 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
10 | + "strings" | ||
11 | ) | 11 | ) |
12 | 12 | ||
13 | const ( | 13 | const ( |
14 | - qrcodeTokenSecret string = "bbe35ad433dd8e67" | ||
15 | - qrcodeCodeExpire int64 = 60 * 30 //15分钟过期 | 14 | + QrcodeCodeExpire int64 = 60 * 5 //5分钟过期 |
16 | ) | 15 | ) |
17 | 16 | ||
18 | -var aecSecret = []byte("mmm.qrcode.ecb.1") | ||
19 | -var qrcodeLogin = "/v1/auth/login/qrcode?key=" | 17 | +var ( |
18 | + aecSecret = []byte("mmm.qrcode.ecb.1") | ||
19 | + qrcodeLogin = "/v1/auth/login/qrcode?key=" | ||
20 | +) | ||
20 | 21 | ||
21 | type QrcodeMessage struct { | 22 | type QrcodeMessage struct { |
22 | - jwt.StandardClaims | ||
23 | Id string `json:"id"` | 23 | Id string `json:"id"` |
24 | Token string `json:"token"` | 24 | Token string `json:"token"` |
25 | IsLogin bool `json:"isLogin"` | 25 | IsLogin bool `json:"isLogin"` |
@@ -34,46 +34,20 @@ type QrcodeMessage struct { | @@ -34,46 +34,20 @@ type QrcodeMessage struct { | ||
34 | OrgId int64 `json:"orgId"` | 34 | OrgId int64 `json:"orgId"` |
35 | } | 35 | } |
36 | 36 | ||
37 | -func (qrmsg *QrcodeMessage) GenerateImageBase64() ([]byte, error) { | ||
38 | - nowTime := time.Now().Unix() | ||
39 | - qrmsg.StandardClaims = jwt.StandardClaims{ | ||
40 | - NotBefore: nowTime, | ||
41 | - IssuedAt: nowTime, | ||
42 | - ExpiresAt: nowTime + qrcodeCodeExpire, | ||
43 | - Issuer: "allied_creation_gateway", | ||
44 | - } | ||
45 | - qrmsg.Id = fmt.Sprintf("%d", time.Now().UnixNano()) | ||
46 | - token := jwt.NewWithClaims(jwt.SigningMethodHS256, *qrmsg) | ||
47 | - str, err := token.SignedString([]byte(qrcodeTokenSecret)) | ||
48 | - if err != nil { | ||
49 | - return nil, err | ||
50 | - } | 37 | +func (qrmsg *QrcodeMessage) Init() ([]byte, error) { |
38 | + str := strings.Replace(uuid.New().String(), "-", "", -1) | ||
51 | key := constant.ALLIED_CREATION_GATEWAY_HOST + qrcodeLogin + str | 39 | key := constant.ALLIED_CREATION_GATEWAY_HOST + qrcodeLogin + str |
40 | + log.Logger.Debug("key:" + key) | ||
52 | encryptedData, err := openssl.AesECBEncrypt([]byte(key), aecSecret, openssl.PKCS7_PADDING) | 41 | encryptedData, err := openssl.AesECBEncrypt([]byte(key), aecSecret, openssl.PKCS7_PADDING) |
53 | if err != nil { | 42 | if err != nil { |
54 | return nil, err | 43 | return nil, err |
55 | } | 44 | } |
45 | + qrmsg.Id = str | ||
56 | qrmsg.Token = base64.StdEncoding.EncodeToString(encryptedData) | 46 | qrmsg.Token = base64.StdEncoding.EncodeToString(encryptedData) |
57 | qrmsg.IsLogin = false | 47 | qrmsg.IsLogin = false |
58 | return encryptedData, err | 48 | return encryptedData, err |
59 | } | 49 | } |
60 | 50 | ||
61 | -func (qrmsg *QrcodeMessage) ParseToken(str string) error { | ||
62 | - tokenClaims, err := jwt.ParseWithClaims( | ||
63 | - str, | ||
64 | - qrmsg, | ||
65 | - func(token *jwt.Token) (interface{}, error) { | ||
66 | - return []byte(loginTokenSecret), nil | ||
67 | - }) | ||
68 | - if err != nil { | ||
69 | - return err | ||
70 | - } | ||
71 | - if claim, ok := tokenClaims.Claims.(*QrcodeMessage); ok && tokenClaims.Valid { | ||
72 | - *qrmsg = *claim | ||
73 | - } | ||
74 | - return nil | ||
75 | -} | ||
76 | - | ||
77 | func (qrmsg *QrcodeMessage) BindUser(operator Operator) error { | 51 | func (qrmsg *QrcodeMessage) BindUser(operator Operator) error { |
78 | if qrmsg.IsLogin { | 52 | if qrmsg.IsLogin { |
79 | return fmt.Errorf("登录中") | 53 | return fmt.Errorf("登录中") |
pkg/infrastructure/broker/broker.go
0 → 100644
1 | +package broker | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | + "github.com/tal-tech/go-queue/kq" | ||
7 | + "strings" | ||
8 | +) | ||
9 | + | ||
10 | +var defaultClientMap = make(map[string]*kq.Pusher) | ||
11 | + | ||
12 | +type client struct { | ||
13 | + pusher *kq.Pusher | ||
14 | +} | ||
15 | + | ||
16 | +func RegisterDefaultPusherClient(host, topic string) { | ||
17 | + if _, ok := defaultClientMap[topic]; ok { | ||
18 | + panic("duplicate register pusher client") | ||
19 | + } | ||
20 | + pusher := kq.NewPusher(strings.Split(host, ","), topic) | ||
21 | + defaultClientMap[topic] = pusher | ||
22 | +} | ||
23 | + | ||
24 | +// 异步推送到队列 | ||
25 | +func Push(topic string, o interface{}) error { | ||
26 | + // TODO:功能未开启 | ||
27 | + return nil | ||
28 | + var pusher *kq.Pusher | ||
29 | + var ok bool | ||
30 | + if pusher, ok = defaultClientMap[topic]; !ok { | ||
31 | + return fmt.Errorf("pusher client [%v] not found ", topic) | ||
32 | + } | ||
33 | + return pusher.Push(json.MarshalToString(o)) | ||
34 | +} | ||
35 | + | ||
36 | +// 新建一个推送对象 | ||
37 | +func NewPushObject(source, primaryId, issueId string, obj interface{}) interface{} { | ||
38 | + return map[string]interface{}{ | ||
39 | + "source": source, | ||
40 | + "primaryId": primaryId, | ||
41 | + "issueId": issueId, | ||
42 | + "data": json.MarshalToString(obj), | ||
43 | + } | ||
44 | +} |
@@ -17,11 +17,7 @@ func (lq LoginQrcodeCache) keyString(str string) string { | @@ -17,11 +17,7 @@ func (lq LoginQrcodeCache) keyString(str string) string { | ||
17 | } | 17 | } |
18 | 18 | ||
19 | func (lq LoginQrcodeCache) Save(qrcode domain.QrcodeMessage) error { | 19 | func (lq LoginQrcodeCache) Save(qrcode domain.QrcodeMessage) error { |
20 | - nowTime := time.Now().Unix() | ||
21 | - exp := qrcode.ExpiresAt - nowTime | ||
22 | - if exp <= 0 { | ||
23 | - exp = 60 * 5 | ||
24 | - } | 20 | + var exp = domain.QrcodeCodeExpire |
25 | key := lq.keyString(qrcode.Id) | 21 | key := lq.keyString(qrcode.Id) |
26 | bt, _ := json.Marshal(qrcode) | 22 | bt, _ := json.Marshal(qrcode) |
27 | result := clientRedis.Set(key, string(bt), time.Duration(exp)*time.Second) | 23 | result := clientRedis.Set(key, string(bt), time.Duration(exp)*time.Second) |
@@ -8,6 +8,10 @@ import ( | @@ -8,6 +8,10 @@ import ( | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
9 | ) | 9 | ) |
10 | 10 | ||
11 | +func AdvancedSettingInit() { | ||
12 | + domain.RegisModel(domain.NewModel(domain.UserModel{})) | ||
13 | +} | ||
14 | + | ||
11 | //GetInitPassword 获取公司初始化密码 | 15 | //GetInitPassword 获取公司初始化密码 |
12 | func GetInitPassword(operator domain.Operator) (string, string, error) { | 16 | func GetInitPassword(operator domain.Operator) (string, string, error) { |
13 | var password string | 17 | var password string |
1 | package allied_creation_basic | 1 | package allied_creation_basic |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 6 | "strconv" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
1 | package allied_creation_basic | 1 | package allied_creation_basic |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | 6 | ||
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" |
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
1 | package allied_creation_basic | 1 | package allied_creation_basic |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 6 | "strconv" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" |
1 | package allied_creation_basic | 1 | package allied_creation_basic |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | 6 | ||
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" |
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 6 | "strconv" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 6 | "strconv" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | 6 | ||
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" |
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 6 | "strconv" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 6 | "strconv" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" |
@@ -30,6 +30,8 @@ const ( | @@ -30,6 +30,8 @@ const ( | ||
30 | CooperationUserModeStatistics = "CooperationUserModeStatistics" | 30 | CooperationUserModeStatistics = "CooperationUserModeStatistics" |
31 | // 公司 - 共创用户分红支付统计 | 31 | // 公司 - 共创用户分红支付统计 |
32 | CompanyPaymentHistoryStatistics = "CompanyPaymentHistoryStatistics" | 32 | CompanyPaymentHistoryStatistics = "CompanyPaymentHistoryStatistics" |
33 | + // 企业共创项目 - 合约列表 | ||
34 | + CompanyCooperationProjectContracts = "CompanyCooperationProjectContracts" | ||
33 | 35 | ||
34 | // 个人 - 共创企业统计 | 36 | // 个人 - 共创企业统计 |
35 | CooperationCompanyStatistics = "CooperationCompanyStatistics" | 37 | CooperationCompanyStatistics = "CooperationCompanyStatistics" |
@@ -37,6 +39,10 @@ const ( | @@ -37,6 +39,10 @@ const ( | ||
37 | PersonCooperationContractStatistics = "PersonCooperationContractStatistics" | 39 | PersonCooperationContractStatistics = "PersonCooperationContractStatistics" |
38 | // 个人 - 企业支付统计 | 40 | // 个人 - 企业支付统计 |
39 | PersonCompanyPaymentHistoryStatistics = "PersonCompanyPaymentHistoryStatistics" | 41 | PersonCompanyPaymentHistoryStatistics = "PersonCompanyPaymentHistoryStatistics" |
42 | + // 个人 - 共创项目共享信息数据 | ||
43 | + PersonCooperationProjectSharedInfo = "PersonCooperationProjectSharedInfo" | ||
44 | + // 个人 - 共创项目共享信息数据 - 附件 | ||
45 | + PersonCooperationProjectSharedInfoAttachment = "PersonCooperationProjectSharedInfoAttachment" | ||
40 | 46 | ||
41 | // 账期结算单统计 | 47 | // 账期结算单统计 |
42 | CreditAccountStatistics = "CreditAccountStatistics" | 48 | CreditAccountStatistics = "CreditAccountStatistics" |
@@ -150,3 +156,37 @@ func (gateway HttplibAlliedCreationCooperation) RelevantCooperationContractNumbe | @@ -150,3 +156,37 @@ func (gateway HttplibAlliedCreationCooperation) RelevantCooperationContractNumbe | ||
150 | err = gateway.GetResponseData(result, &data) | 156 | err = gateway.GetResponseData(result, &data) |
151 | return data, err | 157 | return data, err |
152 | } | 158 | } |
159 | + | ||
160 | +// CooperationStatistics 共创统计 | ||
161 | +func (gateway HttplibAlliedCreationCooperation) CooperationStatisticsWithObject(action string, queryOptions interface{}, object interface{}) error { | ||
162 | + url := gateway.baseUrL + "/cooperation-statistics" | ||
163 | + method := "post" | ||
164 | + req := gateway.CreateRequest(url, method) | ||
165 | + log.Logger.Debug("向业务模块请求数据:共创统计。", map[string]interface{}{ | ||
166 | + "api": method + ":" + url, | ||
167 | + "param": queryOptions, | ||
168 | + }) | ||
169 | + param := map[string]interface{}{ | ||
170 | + "action": action, | ||
171 | + "queryOptions": queryOptions, | ||
172 | + } | ||
173 | + req, err := req.JSONBody(param) | ||
174 | + if err != nil { | ||
175 | + return fmt.Errorf("请求共创统计失败:%w", err) | ||
176 | + } | ||
177 | + | ||
178 | + byteResult, err := req.Bytes() | ||
179 | + if err != nil { | ||
180 | + return fmt.Errorf("获取共创统计失败:%w", err) | ||
181 | + } | ||
182 | + log.Logger.Debug("获取业务模块请求数据:共创统计。", map[string]interface{}{ | ||
183 | + "result": string(byteResult), | ||
184 | + }) | ||
185 | + var result service_gateway.GatewayResponse | ||
186 | + err = json.Unmarshal(byteResult, &result) | ||
187 | + if err != nil { | ||
188 | + return fmt.Errorf("解析共创统计:%w", err) | ||
189 | + } | ||
190 | + err = gateway.GetResponseData(result, &object) | ||
191 | + return err | ||
192 | +} |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 6 | "strconv" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 6 | "strconv" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 6 | "strconv" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 6 | "strconv" |
7 | 7 | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | ||
5 | "fmt" | 4 | "fmt" |
5 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | 6 | ||
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" |
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_contract_undertaker_feedback.go
@@ -13,6 +13,8 @@ type ( | @@ -13,6 +13,8 @@ type ( | ||
13 | // 合约承接方反馈内容 | 13 | // 合约承接方反馈内容 |
14 | FeedbackContent string `cname:"合约承接方反馈内容" json:"feedbackContent" valid:"Required"` | 14 | FeedbackContent string `cname:"合约承接方反馈内容" json:"feedbackContent" valid:"Required"` |
15 | // 共创合约编号 | 15 | // 共创合约编号 |
16 | + CooperationContractId int64 `cname:"共创合约编号" json:"cooperationContractId"` | ||
17 | + // 共创合约编号 | ||
16 | CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"` | 18 | CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"` |
17 | // 承接人uid | 19 | // 承接人uid |
18 | UnderTakerUid int64 `cname:"承接人uid" json:"underTakerUid,string,omitempty"` | 20 | UnderTakerUid int64 `cname:"承接人uid" json:"underTakerUid,string,omitempty"` |
@@ -214,6 +214,8 @@ type ( | @@ -214,6 +214,8 @@ type ( | ||
214 | SearchCooperationProjectExtQueries []*SearchCooperationProjectExtQuery `cname:"额外的查询条件" json:"searchCooperationProjectExtQueries"` | 214 | SearchCooperationProjectExtQueries []*SearchCooperationProjectExtQuery `cname:"额外的查询条件" json:"searchCooperationProjectExtQueries"` |
215 | // 按共创项目状态排序 | 215 | // 按共创项目状态排序 |
216 | SortByStatus int32 `cname:"按共创项目状态排序" json:"sortByStatus,omitempty"` | 216 | SortByStatus int32 `cname:"按共创项目状态排序" json:"sortByStatus,omitempty"` |
217 | + // 是否跳过获取共创模式 | ||
218 | + IsSkipFetchProjectModel bool `cname:"是否跳过获取共创模式" json:"isSkipFetchProjectModel,omitempty"` | ||
217 | } | 219 | } |
218 | DataCooperationProjectSearchItem struct { | 220 | DataCooperationProjectSearchItem struct { |
219 | CooperationProjectID string `json:"cooperationProjectId"` | 221 | CooperationProjectID string `json:"cooperationProjectId"` |
@@ -282,6 +284,8 @@ type ( | @@ -282,6 +284,8 @@ type ( | ||
282 | //OperateTime time.Time `json:"operateTime"` | 284 | //OperateTime time.Time `json:"operateTime"` |
283 | Status int `json:"status"` | 285 | Status int `json:"status"` |
284 | ApplicantCount int `json:"applicantCount"` // 共创申请人计数 | 286 | ApplicantCount int `json:"applicantCount"` // 共创申请人计数 |
287 | + // 合约计数 | ||
288 | + ContractCount int32 `json:"contractCount"` | ||
285 | } | 289 | } |
286 | DataCooperationProjectSearch struct { | 290 | DataCooperationProjectSearch struct { |
287 | List []DataCooperationProjectSearchItem `json:"list"` | 291 | List []DataCooperationProjectSearchItem `json:"list"` |
@@ -162,51 +162,7 @@ type ( | @@ -162,51 +162,7 @@ type ( | ||
162 | Action int `json:"action"` | 162 | Action int `json:"action"` |
163 | } | 163 | } |
164 | 164 | ||
165 | - DataDividendsEstimateMoneyIncentives []struct { | ||
166 | - // 承接人分红预算记录ID | ||
167 | - DividendsEstimateId int64 `json:"dividendsEstimateId,string"` | ||
168 | - // 分红结算状态,1待结算,2已结算 | ||
169 | - DividendsAccountStatus int32 `json:"dividendsAccountStatus"` | ||
170 | - // 分红金额 | ||
171 | - DividendsAmount float64 `json:"dividendsAmount"` | ||
172 | - // 承接人分红预算单号 | ||
173 | - DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"` | ||
174 | - // 分红预算时间 | ||
175 | - DividendsEstimateTime time.Time `json:"dividendsEstimateTime"` | ||
176 | - // 参与分红类型,1承接人,2推荐人,3关联业务员 | ||
177 | - DividendsParticipateType int32 `json:"dividendsParticipateType"` | ||
178 | - // 分红类型,1订单分红,2退货冲销,3金额激励 | ||
179 | - DividendsType int32 `json:"dividendsType"` | ||
180 | - // 分红类型名称 | ||
181 | - DividendsTypeName string `json:"dividendsTypeName"` | ||
182 | - // 分红订单号或退货单号 | ||
183 | - OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum"` | ||
184 | - // 共创项目合约编号,自生成,生成规则:XM+6位年月日+#+3位流水,例XM210601#001 | ||
185 | - CooperationContractNumber string `json:"cooperationContractNumber"` | ||
186 | - // 分红用户(共创参与) | ||
187 | - DividendsUser struct { | ||
188 | - // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | ||
189 | - UserId int64 `json:"userId,string"` | ||
190 | - // 用户基本id | ||
191 | - UserBaseId int64 `json:"userBaseId,string"` | ||
192 | - // 用户类型 | ||
193 | - UserType int32 `json:"userType"` | ||
194 | - UserInfo struct { | ||
195 | - UserAvatar string `json:"userAvatar"` // 用户头像 | ||
196 | - UserEmail string `json:"userEmail"` // 用户邮箱 | ||
197 | - UserName string `json:"userName"` // 共创人员姓名 | ||
198 | - UserPhone string `json:"userPhone"` // 用户手机号 | ||
199 | - UserAccount string `json:"userAccount"` // 用户账号,区别于手机号,冗余字段 | ||
200 | - UserCode string `json:"userCode"` // 用户编码 | ||
201 | - } `json:"userInfo,omitempty"` | ||
202 | - } `json:"dividendsUser"` | ||
203 | - // 分红阶段 | ||
204 | - DividendsStage int32 `json:"dividendsStage"` | ||
205 | - // 操作时间 | ||
206 | - OperateTime time.Time `json:"operateTime"` | ||
207 | - // 取消状态 | ||
208 | - IsCanceled bool `json:"isCanceled"` | ||
209 | - } | 165 | + DataDividendsEstimateMoneyIncentives []DividendsEstimateItem |
210 | ) | 166 | ) |
211 | 167 | ||
212 | //返回分红预算详情 | 168 | //返回分红预算详情 |
@@ -263,5 +219,104 @@ type ( | @@ -263,5 +219,104 @@ type ( | ||
263 | 219 | ||
264 | DataDividendsEstimateDividendsIncentives struct { | 220 | DataDividendsEstimateDividendsIncentives struct { |
265 | Report string `json:"report"` | 221 | Report string `json:"report"` |
222 | + // DividendsEstimate 分红预算实体 | ||
223 | + DividendsEstimates []DividendsEstimateItem `json:"dividendsEstimates"` | ||
224 | + } | ||
225 | + DividendsEstimateItem struct { | ||
226 | + // 承接人分红预算记录ID | ||
227 | + DividendsEstimateId int64 `json:"dividendsEstimateId,string"` | ||
228 | + // 分红结算状态,1待结算,2已结算 | ||
229 | + DividendsAccountStatus int32 `json:"dividendsAccountStatus"` | ||
230 | + // 分红金额 | ||
231 | + DividendsAmount float64 `json:"dividendsAmount"` | ||
232 | + // 承接人分红预算单号 | ||
233 | + DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"` | ||
234 | + // 分红预算时间 | ||
235 | + DividendsEstimateTime time.Time `json:"dividendsEstimateTime"` | ||
236 | + // 参与分红类型,1承接人,2推荐人,3关联业务员 | ||
237 | + DividendsParticipateType int32 `json:"dividendsParticipateType"` | ||
238 | + // 分红类型,1订单分红,2退货冲销,3金额激励 | ||
239 | + DividendsType int32 `json:"dividendsType"` | ||
240 | + // 分红类型名称 | ||
241 | + DividendsTypeName string `json:"dividendsTypeName"` | ||
242 | + // 分红订单号或退货单号 | ||
243 | + OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum"` | ||
244 | + // 共创项目合约编号,自生成,生成规则:XM+6位年月日+#+3位流水,例XM210601#001 | ||
245 | + CooperationContractNumber string `json:"cooperationContractNumber"` | ||
246 | + // 分红用户(共创参与) | ||
247 | + DividendsUser struct { | ||
248 | + // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | ||
249 | + UserId int64 `json:"userId,string"` | ||
250 | + // 用户基本id | ||
251 | + UserBaseId int64 `json:"userBaseId,string"` | ||
252 | + // 用户类型 | ||
253 | + UserType int32 `json:"userType"` | ||
254 | + UserInfo struct { | ||
255 | + UserAvatar string `json:"userAvatar"` // 用户头像 | ||
256 | + UserEmail string `json:"userEmail"` // 用户邮箱 | ||
257 | + UserName string `json:"userName"` // 共创人员姓名 | ||
258 | + UserPhone string `json:"userPhone"` // 用户手机号 | ||
259 | + UserAccount string `json:"userAccount"` // 用户账号,区别于手机号,冗余字段 | ||
260 | + UserCode string `json:"userCode"` // 用户编码 | ||
261 | + } `json:"userInfo,omitempty"` | ||
262 | + } `json:"dividendsUser"` | ||
263 | + // 分红阶段 | ||
264 | + DividendsStage int32 `json:"dividendsStage"` | ||
265 | + // 操作时间 | ||
266 | + OperateTime time.Time `json:"operateTime"` | ||
267 | + // 取消状态 | ||
268 | + IsCanceled bool `json:"isCanceled"` | ||
266 | } | 269 | } |
270 | + //struct { | ||
271 | + // // 承接人分红预算记录ID | ||
272 | + // DividendsEstimateId int64 `json:"dividendsEstimateId,string"` | ||
273 | + // // 分红结算状态,1待结算,2已结算 | ||
274 | + // DividendsAccountStatus int32 `json:"dividendsAccountStatus"` | ||
275 | + // // 分红支付状态,1未支付,2已支付 | ||
276 | + // PaymentStatus int32 `json:"paymentStatus"` | ||
277 | + // // 分红金额 | ||
278 | + // DividendsAmount float64 `json:"dividendsAmount"` | ||
279 | + // // 承接人分红预算单号 | ||
280 | + // DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"` | ||
281 | + // // 分红预算时间 | ||
282 | + // DividendsEstimateTime time.Time `json:"dividendsEstimateTime"` | ||
283 | + // // 参与分红类型,1承接人,2推荐人,3关联业务员 | ||
284 | + // DividendsParticipateType int32 `json:"dividendsParticipateType"` | ||
285 | + // // 分红类型,1订单分红,2退货冲销,3金额激励 | ||
286 | + // DividendsType int32 `json:"dividendsType"` | ||
287 | + // // 分红类型名称 | ||
288 | + // DividendsTypeName string `json:"dividendsTypeName"` | ||
289 | + // // 分红订单号或退货单号 | ||
290 | + // OrderOrReturnedOrderNum string `json:"orderOrReturnedOrderNum"` | ||
291 | + // // 共创项目合约编号,自生成,生成规则:XM+6位年月日+#+3位流水,例XM210601#001 | ||
292 | + // CooperationContractNumber string `json:"cooperationContractNumber"` | ||
293 | + // // 共创合约承接人id | ||
294 | + // CooperationContractUndertakerId int64 `json:"cooperationContractUndertakerId"` | ||
295 | + // // 分红用户(共创参与) | ||
296 | + // //DividendsUser *User `json:"dividendsUser"` | ||
297 | + // // 分红比例 | ||
298 | + // DividendsPercentage float64 `json:"dividendsPercentage"` | ||
299 | + // // 分红阶段 | ||
300 | + // DividendsStage int32 `json:"dividendsStage"` | ||
301 | + // // 数据所属组织机构 | ||
302 | + // //Org *Org `json:"org"` | ||
303 | + // // 公司 | ||
304 | + // //Company *Company `json:"company"` | ||
305 | + // // 操作人 | ||
306 | + // //Operator *User `json:"operator"` | ||
307 | + // // 操作时间 | ||
308 | + // //OperateTime time.Time `json:"operateTime"` | ||
309 | + // // 取消状态 | ||
310 | + // IsCanceled bool `json:"isCanceled"` | ||
311 | + // // 创建时间 | ||
312 | + // CreatedAt time.Time `json:"createdAt"` | ||
313 | + // // 删除时间 | ||
314 | + // //DeletedAt time.Time `json:"deletedAt"` | ||
315 | + // // 更新时间 | ||
316 | + // //UpdatedAt time.Time `json:"updatedAt"` | ||
317 | + // // 订单产品ID | ||
318 | + // OrderGoodId int64 `json:"orderGoodId"` | ||
319 | + // // 订单产品金额 | ||
320 | + // OrderGoodAmount float64 `json:"orderGoodAmount"` | ||
321 | + //} | ||
267 | ) | 322 | ) |
@@ -39,6 +39,37 @@ func (gateway HttplibAlliedCreationUser) AuthCompanySignUp(param ReqAuthCompanyS | @@ -39,6 +39,37 @@ func (gateway HttplibAlliedCreationUser) AuthCompanySignUp(param ReqAuthCompanyS | ||
39 | return &data, err | 39 | return &data, err |
40 | } | 40 | } |
41 | 41 | ||
42 | +// AuthUserSignUp 用户注册 | ||
43 | +func (gateway HttplibAlliedCreationUser) AuthUserSignUp(param ReqAuthUserSignUp) (*DataAuthUserSignUp, error) { | ||
44 | + url := gateway.baseUrL + "/auth/user-sign-up" | ||
45 | + method := "POST" | ||
46 | + req := gateway.CreateRequest(url, method) | ||
47 | + log.Logger.Debug("向用户模块请求数据:用户注册。", map[string]interface{}{ | ||
48 | + "api": method + ":" + url, | ||
49 | + "param": param, | ||
50 | + }) | ||
51 | + req, err := req.JSONBody(param) | ||
52 | + if err != nil { | ||
53 | + return nil, fmt.Errorf("请求用户注册失败:%w", err) | ||
54 | + } | ||
55 | + | ||
56 | + byteResult, err := req.Bytes() | ||
57 | + if err != nil { | ||
58 | + return nil, fmt.Errorf("获取用户注册失败:%w", err) | ||
59 | + } | ||
60 | + log.Logger.Debug("获取用户模块请求数据:用户注册。", map[string]interface{}{ | ||
61 | + "result": string(byteResult), | ||
62 | + }) | ||
63 | + var result service_gateway.GatewayResponse | ||
64 | + err = json.Unmarshal(byteResult, &result) | ||
65 | + if err != nil { | ||
66 | + return nil, fmt.Errorf("解析用户注册:%w", err) | ||
67 | + } | ||
68 | + var data DataAuthUserSignUp | ||
69 | + err = gateway.GetResponseData(result, &data) | ||
70 | + return &data, err | ||
71 | +} | ||
72 | + | ||
42 | //AuthChangePassword 修改密码 | 73 | //AuthChangePassword 修改密码 |
43 | func (gateway HttplibAlliedCreationUser) AuthChangePassword(param ReqAuthChangePassword) (*DataAuthChangePassword, error) { | 74 | func (gateway HttplibAlliedCreationUser) AuthChangePassword(param ReqAuthChangePassword) (*DataAuthChangePassword, error) { |
44 | url := gateway.baseUrL + "/auth/change-password" | 75 | url := gateway.baseUrL + "/auth/change-password" |
1 | +package allied_creation_user | ||
2 | + | ||
3 | +import ( | ||
4 | + "encoding/json" | ||
5 | + "fmt" | ||
6 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" | ||
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
8 | +) | ||
9 | + | ||
10 | +func (gateway HttplibAlliedCreationUser) ListBlockChains(param ReqListBlockChain) (DataListBlockChain, error) { | ||
11 | + // TODO:功能未开启 | ||
12 | + return []DataListBlockChainItem{}, nil | ||
13 | + url := gateway.baseUrL + "/block-chains/" | ||
14 | + method := "post" | ||
15 | + req := gateway.CreateRequest(url, method) | ||
16 | + moduleDesc := "获取区块链数据列表" | ||
17 | + //TODO traceID | ||
18 | + log.Logger.Debug("向用户模块请求数据:"+moduleDesc, map[string]interface{}{ | ||
19 | + "api": method + ":" + url, | ||
20 | + "param": param, | ||
21 | + }) | ||
22 | + req, err := req.JSONBody(param) | ||
23 | + if err != nil { | ||
24 | + return nil, fmt.Errorf("%v失败:%w", moduleDesc, err) | ||
25 | + } | ||
26 | + | ||
27 | + byteResult, err := req.Bytes() | ||
28 | + if err != nil { | ||
29 | + return nil, fmt.Errorf("%v失败:%w", moduleDesc, err) | ||
30 | + } | ||
31 | + | ||
32 | + var result service_gateway.GatewayResponse | ||
33 | + err = json.Unmarshal(byteResult, &result) | ||
34 | + if err != nil { | ||
35 | + return nil, fmt.Errorf("解析错误:%w", err) | ||
36 | + } | ||
37 | + var data DataListBlockChain | ||
38 | + err = gateway.GetResponseData(result, &data) | ||
39 | + return data, err | ||
40 | +} | ||
41 | + | ||
42 | +func (gateway HttplibAlliedCreationUser) BlockChainsToken(param ReqBlockChainToken) (*DataBlockChainToken, error) { | ||
43 | + url := gateway.baseUrL + "/block-chains/token" | ||
44 | + method := "post" | ||
45 | + req := gateway.CreateRequest(url, method) | ||
46 | + moduleDesc := "获取区块链数据授权" | ||
47 | + //TODO traceID | ||
48 | + log.Logger.Debug("向用户模块请求数据:"+moduleDesc, map[string]interface{}{ | ||
49 | + "api": method + ":" + url, | ||
50 | + "param": param, | ||
51 | + }) | ||
52 | + req, err := req.JSONBody(param) | ||
53 | + if err != nil { | ||
54 | + return nil, fmt.Errorf("%v失败:%w", moduleDesc, err) | ||
55 | + } | ||
56 | + | ||
57 | + byteResult, err := req.Bytes() | ||
58 | + if err != nil { | ||
59 | + return nil, fmt.Errorf("%v失败:%w", moduleDesc, err) | ||
60 | + } | ||
61 | + | ||
62 | + var result service_gateway.GatewayResponse | ||
63 | + err = json.Unmarshal(byteResult, &result) | ||
64 | + if err != nil { | ||
65 | + return nil, fmt.Errorf("解析错误:%w", err) | ||
66 | + } | ||
67 | + var data DataBlockChainToken | ||
68 | + err = gateway.GetResponseData(result, &data) | ||
69 | + return &data, err | ||
70 | +} |
@@ -101,3 +101,33 @@ func (gateway HttplibAlliedCreationUser) FavoriteMenusGet(param ReqFavoriteMenus | @@ -101,3 +101,33 @@ func (gateway HttplibAlliedCreationUser) FavoriteMenusGet(param ReqFavoriteMenus | ||
101 | err = gateway.GetResponseData(result, &data) | 101 | err = gateway.GetResponseData(result, &data) |
102 | return &data, err | 102 | return &data, err |
103 | } | 103 | } |
104 | + | ||
105 | +func (gateway HttplibAlliedCreationUser) FavoriteUpadate(param ReqFavoriteUpdate) (*DataFavoriteUpdate, error) { | ||
106 | + url := gateway.baseUrL + "/user-base/favorite" | ||
107 | + method := "post" | ||
108 | + req := gateway.CreateRequest(url, method) | ||
109 | + log.Logger.Debug("向用户模块请求数据:更新我喜欢。", map[string]interface{}{ | ||
110 | + "api": method + ":" + url, | ||
111 | + "param": param, | ||
112 | + }) | ||
113 | + req, err := req.JSONBody(param) | ||
114 | + if err != nil { | ||
115 | + return nil, fmt.Errorf("请求更新我喜欢失败:%w", err) | ||
116 | + } | ||
117 | + | ||
118 | + byteResult, err := req.Bytes() | ||
119 | + if err != nil { | ||
120 | + return nil, fmt.Errorf("获取更新我喜欢失败:%w", err) | ||
121 | + } | ||
122 | + log.Logger.Debug("获取用户模块请求数据:更新我喜欢。", map[string]interface{}{ | ||
123 | + "result": string(byteResult), | ||
124 | + }) | ||
125 | + var result service_gateway.GatewayResponse | ||
126 | + err = json.Unmarshal(byteResult, &result) | ||
127 | + if err != nil { | ||
128 | + return nil, fmt.Errorf("解析更新我喜欢:%w", err) | ||
129 | + } | ||
130 | + var data DataFavoriteUpdate | ||
131 | + err = gateway.GetResponseData(result, &data) | ||
132 | + return &data, err | ||
133 | +} |
@@ -15,6 +15,21 @@ type ( | @@ -15,6 +15,21 @@ type ( | ||
15 | } | 15 | } |
16 | ) | 16 | ) |
17 | 17 | ||
18 | +//企业注册 | ||
19 | +type ( | ||
20 | + ReqAuthUserSignUp struct { | ||
21 | + // 企业名称 | ||
22 | + Name string `cname:"用户姓名" json:"name" valid:"Required"` | ||
23 | + // 手机号码 | ||
24 | + Phone string `cname:"手机号码" json:"phone" valid:"Required"` | ||
25 | + // 密码 | ||
26 | + Password string `cname:"密码" json:"password" valid:"Required"` | ||
27 | + } | ||
28 | + | ||
29 | + DataAuthUserSignUp struct { | ||
30 | + } | ||
31 | +) | ||
32 | + | ||
18 | //修改密码 | 33 | //修改密码 |
19 | type ( | 34 | type ( |
20 | ReqAuthChangePassword struct { | 35 | ReqAuthChangePassword struct { |
@@ -96,9 +111,11 @@ type ( | @@ -96,9 +111,11 @@ type ( | ||
96 | type ( | 111 | type ( |
97 | ReqAuthUserBase struct { | 112 | ReqAuthUserBase struct { |
98 | // 手机号码 | 113 | // 手机号码 |
99 | - Account string `cname:"账号" json:"account" valid:"Required"` | 114 | + Account string `cname:"账号" json:"account" valid:"Required"` |
115 | + UserBaseId int64 `json:"userBaseId"` | ||
100 | } | 116 | } |
101 | DataAuthUserBase struct { | 117 | DataAuthUserBase struct { |
118 | + UserID int `json:"userId"` | ||
102 | UserBaseID int `json:"userBaseId"` | 119 | UserBaseID int `json:"userBaseId"` |
103 | UserInfo struct { | 120 | UserInfo struct { |
104 | UserName string `json:"userName"` | 121 | UserName string `json:"userName"` |
@@ -113,5 +130,26 @@ type ( | @@ -113,5 +130,26 @@ type ( | ||
113 | ImToken string `json:"imToken"` | 130 | ImToken string `json:"imToken"` |
114 | CsAccountID string `json:"csAccountId"` | 131 | CsAccountID string `json:"csAccountId"` |
115 | } `json:"im"` | 132 | } `json:"im"` |
133 | + Favorite struct { | ||
134 | + OrgItems []int64 `json:"orgItems"` | ||
135 | + } `json:"favorite"` | ||
116 | } | 136 | } |
117 | ) | 137 | ) |
138 | + | ||
139 | +func (user *DataAuthUserBase) CheckOrgStarred(orgId int64) bool { | ||
140 | + var starred bool = false | ||
141 | + for i := range user.Favorite.OrgItems { | ||
142 | + if user.Favorite.OrgItems[i] == orgId { | ||
143 | + starred = true | ||
144 | + return starred | ||
145 | + } | ||
146 | + } | ||
147 | + return false | ||
148 | +} | ||
149 | + | ||
150 | +func (user *DataAuthUserBase) FavoriteOrg() []int64 { | ||
151 | + if user == nil { | ||
152 | + return []int64{} | ||
153 | + } | ||
154 | + return user.Favorite.OrgItems | ||
155 | +} |
1 | +package allied_creation_user | ||
2 | + | ||
3 | +type ( | ||
4 | + ReqListBlockChain struct { | ||
5 | + DisableLimit bool `json:"disableLimit"` | ||
6 | + EnableDistinctPrimaryID bool `json:"enableDistinctPrimaryId"` | ||
7 | + PrimaryIDList []string `json:"primaryIdList"` | ||
8 | + Source string `json:"source"` | ||
9 | + } | ||
10 | + DataListBlockChain []DataListBlockChainItem | ||
11 | + DataListBlockChainItem struct { | ||
12 | + UpChainID int `json:"upChainId"` | ||
13 | + PrimaryID string `json:"primaryId"` | ||
14 | + BlockHash string `json:"blockHash"` | ||
15 | + } | ||
16 | + | ||
17 | + ReqBlockChainToken struct { | ||
18 | + Type int `json:"type"` | ||
19 | + UpChainID int `json:"upChainId"` | ||
20 | + } | ||
21 | + DataBlockChainToken struct { | ||
22 | + BrowseURL string `json:"browseUrl"` | ||
23 | + Token string `json:"token"` | ||
24 | + } | ||
25 | +) | ||
26 | + | ||
27 | +func (d DataListBlockChain) ToMap() map[string]DataListBlockChainItem { | ||
28 | + mapItems := make(map[string]DataListBlockChainItem) | ||
29 | + if d == nil || len(d) == 0 { | ||
30 | + return mapItems | ||
31 | + } | ||
32 | + for i := range d { | ||
33 | + mapItems[(d[i]).PrimaryID] = d[i] | ||
34 | + } | ||
35 | + return mapItems | ||
36 | +} |
@@ -34,3 +34,18 @@ type ( | @@ -34,3 +34,18 @@ type ( | ||
34 | FavoriteMenus []string `json:"favoriteMenus"` | 34 | FavoriteMenus []string `json:"favoriteMenus"` |
35 | } | 35 | } |
36 | ) | 36 | ) |
37 | + | ||
38 | +type ( | ||
39 | + ReqFavoriteUpdate struct { | ||
40 | + UserBaseId int64 `json:"userBaseId" valid:"Required"` | ||
41 | + // 菜单编码列表 | ||
42 | + Item string `json:"item" valid:"Required"` | ||
43 | + // 项唯一标识 | ||
44 | + ItemId int64 `cname:"项唯一标识" json:"itemId" valid:"Required"` | ||
45 | + // 用户Id 用户唯一标识 | ||
46 | + Action int64 `cname:"操作类型 1:关注 2:取消关注 " json:"action" valid:"Required"` | ||
47 | + } | ||
48 | + | ||
49 | + DataFavoriteUpdate struct { | ||
50 | + } | ||
51 | +) |
@@ -106,6 +106,9 @@ type ( | @@ -106,6 +106,9 @@ type ( | ||
106 | EnableStatus int `cname:"状态(1:启用 2:禁用 3:注销)" json:"enableStatus,omitempty"` | 106 | EnableStatus int `cname:"状态(1:启用 2:禁用 3:注销)" json:"enableStatus,omitempty"` |
107 | // 状态(1:启用 2:禁用 3:注销) | 107 | // 状态(1:启用 2:禁用 3:注销) |
108 | InEnableStatus []int `cname:"状态(1:启用 2:禁用 3:注销)" json:"inEnableStatus,omitempty"` | 108 | InEnableStatus []int `cname:"状态(1:启用 2:禁用 3:注销)" json:"inEnableStatus,omitempty"` |
109 | + | ||
110 | + // 自定义高级查询 | ||
111 | + AdvancedQuery string `json:"advancedQuery"` | ||
109 | } | 112 | } |
110 | 113 | ||
111 | //DataUserSearch 搜索用户列表 | 114 | //DataUserSearch 搜索用户列表 |
1 | package service_gateway | 1 | package service_gateway |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "encoding/json" | 4 | + rawjson "encoding/json" |
5 | "fmt" | 5 | "fmt" |
6 | + "github.com/linmadan/egglib-go/utils/json" | ||
6 | "strconv" | 7 | "strconv" |
7 | "time" | 8 | "time" |
8 | 9 | ||
@@ -18,7 +19,7 @@ type MessageCode struct { | @@ -18,7 +19,7 @@ type MessageCode struct { | ||
18 | //GatewayResponse 统一消息返回格式 | 19 | //GatewayResponse 统一消息返回格式 |
19 | type GatewayResponse struct { | 20 | type GatewayResponse struct { |
20 | MessageCode | 21 | MessageCode |
21 | - Data json.RawMessage `json:"data"` | 22 | + Data rawjson.RawMessage `json:"data"` |
22 | } | 23 | } |
23 | 24 | ||
24 | type BaseServiceGateway struct { | 25 | type BaseServiceGateway struct { |
@@ -48,7 +48,8 @@ func (gateway HttpLibVersionServer) GetLatestVersion(rc *http.Request, param Req | @@ -48,7 +48,8 @@ func (gateway HttpLibVersionServer) GetLatestVersion(rc *http.Request, param Req | ||
48 | req.Header(k, vs[i]) | 48 | req.Header(k, vs[i]) |
49 | } | 49 | } |
50 | } | 50 | } |
51 | - | 51 | + req.Header("X-MMM-AppProject", "AlliedCreation") |
52 | + req.Header("X-MMM-AppName", "com.mmm.alliedcreation") | ||
52 | byteResult, err := req.Bytes() | 53 | byteResult, err := req.Bytes() |
53 | if err != nil { | 54 | if err != nil { |
54 | return nil, fmt.Errorf("获取版本失败:%w", err) | 55 | return nil, fmt.Errorf("获取版本失败:%w", err) |
@@ -137,6 +137,18 @@ func (controller *AuthController) CompanySignUp() { | @@ -137,6 +137,18 @@ func (controller *AuthController) CompanySignUp() { | ||
137 | controller.Response(data, err) | 137 | controller.Response(data, err) |
138 | } | 138 | } |
139 | 139 | ||
140 | +func (controller *AuthController) UserSignUp() { | ||
141 | + authService := service.AuthService{} | ||
142 | + cmd := &command.UserSignUpCommand{} | ||
143 | + err := controller.Unmarshal(cmd) | ||
144 | + if err != nil { | ||
145 | + controller.Response(nil, err) | ||
146 | + return | ||
147 | + } | ||
148 | + data, err := authService.UserSignUp(cmd) | ||
149 | + controller.Response(data, err) | ||
150 | +} | ||
151 | + | ||
140 | func (controller *AuthController) ResetPassword() { | 152 | func (controller *AuthController) ResetPassword() { |
141 | authService := service.AuthService{} | 153 | authService := service.AuthService{} |
142 | userOrgCommand := &command.ResetPasswordCommand{} | 154 | userOrgCommand := &command.ResetPasswordCommand{} |
@@ -118,12 +118,25 @@ func (controller *BaseController) GetExcelFile() (io.Reader, error) { | @@ -118,12 +118,25 @@ func (controller *BaseController) GetExcelFile() (io.Reader, error) { | ||
118 | return nil, fmt.Errorf("上传文件不存在") | 118 | return nil, fmt.Errorf("上传文件不存在") |
119 | } | 119 | } |
120 | ext := filepath.Ext(fileHeader.Filename) | 120 | ext := filepath.Ext(fileHeader.Filename) |
121 | - if !(ext == ".xlsx" || ext == ".xls") { | ||
122 | - return nil, fmt.Errorf("仅支持上传文件格式 xls/xlsx") | 121 | + if !(ext == ".xlsx" || ext == ".xls" || ext == ".csv") { |
122 | + return nil, fmt.Errorf("仅支持上传文件格式 xls/xlsx/csv") | ||
123 | } | 123 | } |
124 | return excelFile, nil | 124 | return excelFile, nil |
125 | } | 125 | } |
126 | 126 | ||
127 | +func (controller *BaseController) GetFileWithExt() (io.Reader, string, error) { | ||
128 | + excelFile, fileHeader, err := controller.GetFile("file") | ||
129 | + if err != nil { | ||
130 | + log.Logger.Error(err.Error()) | ||
131 | + return nil, "", fmt.Errorf("上传文件不存在") | ||
132 | + } | ||
133 | + ext := filepath.Ext(fileHeader.Filename) | ||
134 | + if !(ext == ".xlsx" || ext == ".xls" || ext == ".csv") { | ||
135 | + return nil, "", fmt.Errorf("仅支持上传文件格式 xls/xlsx/csv") | ||
136 | + } | ||
137 | + return excelFile, ext, nil | ||
138 | +} | ||
139 | + | ||
127 | func Must(err error) { | 140 | func Must(err error) { |
128 | if err != nil { | 141 | if err != nil { |
129 | log.Logger.Error(err.Error()) | 142 | log.Logger.Error(err.Error()) |
@@ -30,6 +30,14 @@ func (controller *CommonController) LatestVersionInfo() { | @@ -30,6 +30,14 @@ func (controller *CommonController) LatestVersionInfo() { | ||
30 | controller.Response(data, err) | 30 | controller.Response(data, err) |
31 | } | 31 | } |
32 | 32 | ||
33 | +func (controller *CommonController) AdvancedSetting() { | ||
34 | + commonService := service.NewCommonService(nil) | ||
35 | + queryParam := &query.GetAdvancedSettingQuery{} | ||
36 | + _ = controller.Unmarshal(queryParam) | ||
37 | + data, err := commonService.AdvancedSetting(queryParam) | ||
38 | + controller.Response(data, err) | ||
39 | +} | ||
40 | + | ||
33 | func (controller *CommonController) AppSharing() { | 41 | func (controller *CommonController) AppSharing() { |
34 | commonService := service.NewCommonService(nil) | 42 | commonService := service.NewCommonService(nil) |
35 | queryParam := &query.GetLatestVersionQuery{} | 43 | queryParam := &query.GetLatestVersionQuery{} |
@@ -40,6 +48,14 @@ func (controller *CommonController) AppSharing() { | @@ -40,6 +48,14 @@ func (controller *CommonController) AppSharing() { | ||
40 | controller.Response(data, err) | 48 | controller.Response(data, err) |
41 | } | 49 | } |
42 | 50 | ||
51 | +func (controller *CommonController) BlockChainBrowser() { | ||
52 | + commonService := service.NewCommonService(nil) | ||
53 | + queryParam := &query.GetBlockChainTokenQuery{} | ||
54 | + _ = controller.Unmarshal(queryParam) | ||
55 | + data, err := commonService.BlockChainBrowser(queryParam) | ||
56 | + controller.Response(data, err) | ||
57 | +} | ||
58 | + | ||
43 | func (controller *CommonController) LogData() { | 59 | func (controller *CommonController) LogData() { |
44 | bytes, _ := ioutil.ReadFile("./app.log") | 60 | bytes, _ := ioutil.ReadFile("./app.log") |
45 | controller.Ctx.WriteString(string(bytes)) | 61 | controller.Ctx.WriteString(string(bytes)) |
@@ -214,6 +214,19 @@ func (controller *CooperationController) SearchCooperationProject() { | @@ -214,6 +214,19 @@ func (controller *CooperationController) SearchCooperationProject() { | ||
214 | controller.ReturnPageListData(int64(total), data, err, cmd.PageNumber) | 214 | controller.ReturnPageListData(int64(total), data, err, cmd.PageNumber) |
215 | } | 215 | } |
216 | 216 | ||
217 | +func (controller *CooperationController) SearchCooperationProjectContracts() { | ||
218 | + svr := service.CooperationProjectService{} | ||
219 | + cmd := &command.SearchCooperationProjectContractQuery{} | ||
220 | + err := controller.Unmarshal(cmd) | ||
221 | + if err != nil { | ||
222 | + controller.Response(nil, err) | ||
223 | + return | ||
224 | + } | ||
225 | + cmd.Operator = controller.GetOperator() | ||
226 | + total, data, err := svr.SearchCooperationProjectContracts(cmd) | ||
227 | + controller.ReturnPageListData(int64(total), data, err, cmd.PageNumber) | ||
228 | +} | ||
229 | + | ||
217 | func (controller *CooperationController) PersonSearchCooperationProject() { | 230 | func (controller *CooperationController) PersonSearchCooperationProject() { |
218 | svr := service.CooperationProjectService{} | 231 | svr := service.CooperationProjectService{} |
219 | cmd := &command.PersonSearchCooperationProjectQuery{} | 232 | cmd := &command.PersonSearchCooperationProjectQuery{} |
@@ -227,6 +240,45 @@ func (controller *CooperationController) PersonSearchCooperationProject() { | @@ -227,6 +240,45 @@ func (controller *CooperationController) PersonSearchCooperationProject() { | ||
227 | controller.ReturnPageListData(int64(total), data, err, cmd.PageNumber) | 240 | controller.ReturnPageListData(int64(total), data, err, cmd.PageNumber) |
228 | } | 241 | } |
229 | 242 | ||
243 | +func (controller *CooperationController) PersonSearchCooperationProjectStarred() { | ||
244 | + svr := service.CooperationProjectService{} | ||
245 | + cmd := &command.PersonSearchCooperationProjectQuery{} | ||
246 | + err := controller.Unmarshal(cmd) | ||
247 | + if err != nil { | ||
248 | + controller.Response(nil, err) | ||
249 | + return | ||
250 | + } | ||
251 | + cmd.Operator = controller.GetOperator() | ||
252 | + total, data, err := svr.PersonSearchCooperationProjectStarred(cmd) | ||
253 | + controller.ReturnPageListData(int64(total), data, err, cmd.PageNumber) | ||
254 | +} | ||
255 | + | ||
256 | +func (controller *CooperationController) PersonCooperationProjectSharedInfo() { | ||
257 | + svr := service.CooperationProjectService{} | ||
258 | + cmd := &command.GetCooperationProjectQuery{} | ||
259 | + err := controller.Unmarshal(cmd) | ||
260 | + if err != nil { | ||
261 | + controller.Response(nil, err) | ||
262 | + return | ||
263 | + } | ||
264 | + cmd.Operator = controller.GetOperator() | ||
265 | + data, err := svr.PersonSearchCooperationProjectShareInfo(cmd) | ||
266 | + controller.Response(data, err) | ||
267 | +} | ||
268 | + | ||
269 | +func (controller *CooperationController) PersonCooperationProjectSharedInfoAttachment() { | ||
270 | + svr := service.CooperationProjectService{} | ||
271 | + cmd := &command.PersonCooperationProjectSharedInfoAttachmentQuery{} | ||
272 | + err := controller.Unmarshal(cmd) | ||
273 | + if err != nil { | ||
274 | + controller.Response(nil, err) | ||
275 | + return | ||
276 | + } | ||
277 | + cmd.Operator = controller.GetOperator() | ||
278 | + data, err := svr.PersonSearchCooperationProjectShareInfoAttachment(cmd) | ||
279 | + controller.Response(data, err) | ||
280 | +} | ||
281 | + | ||
230 | //func (controller *CooperationController) PersonRecommendCooperationProject() { | 282 | //func (controller *CooperationController) PersonRecommendCooperationProject() { |
231 | // svr := service.CooperationProjectService{} | 283 | // svr := service.CooperationProjectService{} |
232 | // cmd := &command.PersonSearchCooperationProjectQuery{} | 284 | // cmd := &command.PersonSearchCooperationProjectQuery{} |
1 | +package mobile_client | ||
2 | + | ||
3 | +import ( | ||
4 | + "net/http" | ||
5 | + "net/http/httputil" | ||
6 | + "net/url" | ||
7 | + "strings" | ||
8 | + | ||
9 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" | ||
10 | +) | ||
11 | + | ||
12 | +//代理请求转发 | ||
13 | + | ||
14 | +type ReverseProxyController struct { | ||
15 | + baseController | ||
16 | +} | ||
17 | + | ||
18 | +func (controller *ReverseProxyController) SuplusSaleApp() { | ||
19 | + // proxyHostUrl := constant.SUPLUS_SALE_APP + "/v1/platform/district" | ||
20 | + // req := httplib.Post(proxyHostUrl) | ||
21 | + // req.Header("Content-Type", "application/json") | ||
22 | + // req = req.Body(controller.Ctx.Input.RequestBody) | ||
23 | + // respData, err := req.Bytes() | ||
24 | + // if err != nil { | ||
25 | + // controller.Response(nil, err) | ||
26 | + // return | ||
27 | + // } | ||
28 | + // controller.Ctx.Output.Header("Content-Type", "application/json; charset=utf-8") | ||
29 | + // controller.Ctx.Output.Body(respData) | ||
30 | + target, err := url.Parse(constant.SUPLUS_SALE_APP) | ||
31 | + if err != nil { | ||
32 | + panic(err) | ||
33 | + } | ||
34 | + controller.Ctx.Request.URL.Path = strings.Replace(controller.Ctx.Request.URL.Path, "/suplus-sale-app", "", 1) | ||
35 | + newProxy := httputil.NewSingleHostReverseProxy(target) | ||
36 | + directorFunc := newProxy.Director | ||
37 | + newDirectorFunc := func(r *http.Request) { | ||
38 | + directorFunc(r) | ||
39 | + r.Host = target.Host | ||
40 | + } | ||
41 | + newProxy.Director = newDirectorFunc | ||
42 | + newProxy.ServeHTTP(controller.Ctx.ResponseWriter, controller.Ctx.Request) | ||
43 | +} |
@@ -145,3 +145,16 @@ func (controller *UserController) CooperationOrg() { | @@ -145,3 +145,16 @@ func (controller *UserController) CooperationOrg() { | ||
145 | data, err := svr.CooperationOrg(operator) | 145 | data, err := svr.CooperationOrg(operator) |
146 | controller.Response(data, err) | 146 | controller.Response(data, err) |
147 | } | 147 | } |
148 | + | ||
149 | +func (controller *UserController) UpdateOrgFavorite() { | ||
150 | + svr := service.UserService{} | ||
151 | + cmd := &command.UpdateFavoriteCommand{} | ||
152 | + err := controller.Unmarshal(cmd) | ||
153 | + if err != nil { | ||
154 | + controller.Response(nil, err) | ||
155 | + return | ||
156 | + } | ||
157 | + cmd.Operator = controller.GetOperator() | ||
158 | + data, err := svr.UpdateFavorite(cmd) | ||
159 | + controller.Response(data, err) | ||
160 | +} |
@@ -46,11 +46,11 @@ func (controller *ExcelDataController) fieldValueAllEmpty(param map[string]strin | @@ -46,11 +46,11 @@ func (controller *ExcelDataController) fieldValueAllEmpty(param map[string]strin | ||
46 | } | 46 | } |
47 | 47 | ||
48 | // ImportDividendsOrder 导入分红订单 | 48 | // ImportDividendsOrder 导入分红订单 |
49 | -func (controller ExcelDataController) ImportDividendsOrder() { | 49 | +func (controller *ExcelDataController) ImportDividendsOrder() { |
50 | importDividendsOrder(controller) | 50 | importDividendsOrder(controller) |
51 | } | 51 | } |
52 | 52 | ||
53 | -func importDividendsOrder(controller ExcelDataController) { | 53 | +func importDividendsOrder(controller *ExcelDataController) { |
54 | 54 | ||
55 | fileReader, err := controller.GetExcelFile() | 55 | fileReader, err := controller.GetExcelFile() |
56 | if err != nil { | 56 | if err != nil { |
@@ -109,11 +109,11 @@ func importDividendsOrder(controller ExcelDataController) { | @@ -109,11 +109,11 @@ func importDividendsOrder(controller ExcelDataController) { | ||
109 | } | 109 | } |
110 | 110 | ||
111 | // ImportDividendsReturnedOrder 导入分红退货单 | 111 | // ImportDividendsReturnedOrder 导入分红退货单 |
112 | -func (controller ExcelDataController) ImportDividendsReturnedOrder() { | 112 | +func (controller *ExcelDataController) ImportDividendsReturnedOrder() { |
113 | importDividendsReturnedOrder(controller) | 113 | importDividendsReturnedOrder(controller) |
114 | } | 114 | } |
115 | 115 | ||
116 | -func importDividendsReturnedOrder(controller ExcelDataController) { | 116 | +func importDividendsReturnedOrder(controller *ExcelDataController) { |
117 | 117 | ||
118 | fileReader, err := controller.GetExcelFile() | 118 | fileReader, err := controller.GetExcelFile() |
119 | if err != nil { | 119 | if err != nil { |
@@ -172,7 +172,7 @@ func importDividendsReturnedOrder(controller ExcelDataController) { | @@ -172,7 +172,7 @@ func importDividendsReturnedOrder(controller ExcelDataController) { | ||
172 | } | 172 | } |
173 | 173 | ||
174 | // FileImport 文件导入 | 174 | // FileImport 文件导入 |
175 | -func (controller ExcelDataController) FileImport() { | 175 | +func (controller *ExcelDataController) FileImport() { |
176 | code := controller.GetString("code") | 176 | code := controller.GetString("code") |
177 | switch code { | 177 | switch code { |
178 | case domain.ImportDividendsOrders: | 178 | case domain.ImportDividendsOrders: |
@@ -184,14 +184,15 @@ func (controller ExcelDataController) FileImport() { | @@ -184,14 +184,15 @@ func (controller ExcelDataController) FileImport() { | ||
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | -func defaultImport(controller ExcelDataController) { | 187 | +func defaultImport(controller *ExcelDataController) { |
188 | var ( | 188 | var ( |
189 | data interface{} | 189 | data interface{} |
190 | err error | 190 | err error |
191 | r io.Reader | 191 | r io.Reader |
192 | + ext string | ||
192 | ) | 193 | ) |
193 | excelService := service.NewExcelDataService(nil) | 194 | excelService := service.NewExcelDataService(nil) |
194 | - r, err = controller.GetExcelFile() | 195 | + r, ext, err = controller.GetFileWithExt() |
195 | if err != nil { | 196 | if err != nil { |
196 | controller.Response(nil, err) | 197 | controller.Response(nil, err) |
197 | return | 198 | return |
@@ -200,6 +201,7 @@ func defaultImport(controller ExcelDataController) { | @@ -200,6 +201,7 @@ func defaultImport(controller ExcelDataController) { | ||
200 | controller.ParseForm(cmd) | 201 | controller.ParseForm(cmd) |
201 | cmd.Operator = controller.GetOperator() | 202 | cmd.Operator = controller.GetOperator() |
202 | cmd.Reader = r | 203 | cmd.Reader = r |
204 | + cmd.FileExt = ext | ||
203 | switch cmd.Code { | 205 | switch cmd.Code { |
204 | case domain.ImportCompanyUser: | 206 | case domain.ImportCompanyUser: |
205 | data, err = excelService.ImportCompanyUser(cmd) | 207 | data, err = excelService.ImportCompanyUser(cmd) |
@@ -213,7 +215,7 @@ func defaultImport(controller ExcelDataController) { | @@ -213,7 +215,7 @@ func defaultImport(controller ExcelDataController) { | ||
213 | controller.Response(data, err) | 215 | controller.Response(data, err) |
214 | } | 216 | } |
215 | 217 | ||
216 | -func (controller ExcelDataController) FileImportTemplate() { | 218 | +func (controller *ExcelDataController) FileImportTemplate() { |
217 | excelService := service.NewExcelDataService(nil) | 219 | excelService := service.NewExcelDataService(nil) |
218 | cmd := &command.ImportDataCommand{} | 220 | cmd := &command.ImportDataCommand{} |
219 | code := controller.GetString(":code") | 221 | code := controller.GetString(":code") |
@@ -224,11 +226,11 @@ func (controller ExcelDataController) FileImportTemplate() { | @@ -224,11 +226,11 @@ func (controller ExcelDataController) FileImportTemplate() { | ||
224 | } | 226 | } |
225 | 227 | ||
226 | // FileExport 文件导出 | 228 | // FileExport 文件导出 |
227 | -func (controller ExcelDataController) FileExport() { | 229 | +func (controller *ExcelDataController) FileExport() { |
228 | fileExport(controller, "") | 230 | fileExport(controller, "") |
229 | } | 231 | } |
230 | 232 | ||
231 | -func fileExport(controller ExcelDataController, code string) { | 233 | +func fileExport(controller *ExcelDataController, code string) { |
232 | // 1.读取command | 234 | // 1.读取command |
233 | exportDataCommand := &command.ExportDataCommand{} | 235 | exportDataCommand := &command.ExportDataCommand{} |
234 | err := controller.Unmarshal(exportDataCommand) | 236 | err := controller.Unmarshal(exportDataCommand) |
@@ -280,11 +282,16 @@ func fileExport(controller ExcelDataController, code string) { | @@ -280,11 +282,16 @@ func fileExport(controller ExcelDataController, code string) { | ||
280 | } | 282 | } |
281 | 283 | ||
282 | // ExportCompanyUser 导出公司用户 | 284 | // ExportCompanyUser 导出公司用户 |
283 | -func (controller ExcelDataController) ExportCompanyUser() { | 285 | +func (controller *ExcelDataController) ExportCompanyUser() { |
284 | fileExport(controller, domain.ExportCompanyUser) | 286 | fileExport(controller, domain.ExportCompanyUser) |
285 | } | 287 | } |
286 | 288 | ||
287 | // ExportCooperationUser 导出共创用户 | 289 | // ExportCooperationUser 导出共创用户 |
288 | -func (controller ExcelDataController) ExportCooperationUser() { | 290 | +func (controller *ExcelDataController) ExportCooperationUser() { |
289 | fileExport(controller, domain.ExportCooperationUser) | 291 | fileExport(controller, domain.ExportCooperationUser) |
290 | } | 292 | } |
293 | + | ||
294 | +//GetExcelDataFields 获取导出excel数据的可选字段 | ||
295 | +func (controller *ExcelDataController) GetExcelDataFields() { | ||
296 | + | ||
297 | +} |
@@ -98,22 +98,24 @@ func CheckAccessToken2() web.FilterFunc { | @@ -98,22 +98,24 @@ func CheckAccessToken2() web.FilterFunc { | ||
98 | return func(ctx *context.Context) { | 98 | return func(ctx *context.Context) { |
99 | tokenStr := ctx.Input.Header("x-mmm-accesstoken") | 99 | tokenStr := ctx.Input.Header("x-mmm-accesstoken") |
100 | filterMap := map[string]string{ | 100 | filterMap := map[string]string{ |
101 | - "/v1/auth/login/pwd": "", | ||
102 | - "/v1/auth/login/sms": "", | ||
103 | - "/v1/auth/login/qrcode": "", | ||
104 | - "/v1/auth/org-switch": "", | ||
105 | - "/v1/user/company-orgs": "", | ||
106 | - "/v1/auth/captcha-init": "", | ||
107 | - "/v1/auth/qrcode-init": "", | ||
108 | - "/v1/auth/sms-code": "", | ||
109 | - "/v1/auth/check-sms-code": "", | ||
110 | - "/v1/auth/company-sign-up": "", | ||
111 | - "/v1/auth/reset-password": "", | ||
112 | - "/v1/auth/refresh-token": "", | ||
113 | - "/v1/app/cooperation-projects/person/search": "", | ||
114 | - "/v1/common/dictionary/search": "", | ||
115 | - "/v1/common/app-sharing": "", | ||
116 | - "/v1/user/cooperation-org": "", | 101 | + "/v1/auth/login/pwd": "", |
102 | + "/v1/auth/login/sms": "", | ||
103 | + "/v1/auth/login/qrcode": "", | ||
104 | + "/v1/auth/org-switch": "", | ||
105 | + "/v1/user/company-orgs": "", | ||
106 | + "/v1/auth/captcha-init": "", | ||
107 | + "/v1/auth/qrcode-init": "", | ||
108 | + "/v1/auth/sms-code": "", | ||
109 | + "/v1/auth/check-sms-code": "", | ||
110 | + "/v1/auth/company-sign-up": "", | ||
111 | + "/v1/auth/reset-password": "", | ||
112 | + "/v1/auth/refresh-token": "", | ||
113 | + "/v1/app/cooperation-projects/person/search": "", | ||
114 | + "/v1/common/dictionary/search": "", | ||
115 | + "/v1/common/app-sharing": "", | ||
116 | + "/v1/user/cooperation-org": "", | ||
117 | + "/v1/app/cooperation-projects/person/shared-info": "", //共创项目详情 - 未登录可以查看 | ||
118 | + "/v1/app/cooperation-projects/person/shared-info/attachment": "", | ||
117 | } | 119 | } |
118 | var err error | 120 | var err error |
119 | if filterUrl, err := url.Parse(ctx.Request.RequestURI); err == nil { | 121 | if filterUrl, err := url.Parse(ctx.Request.RequestURI); err == nil { |
@@ -18,6 +18,7 @@ func init() { | @@ -18,6 +18,7 @@ func init() { | ||
18 | //web.Router("/v1/auth/access-token", &controllers.AuthController{}, "Post:GetAuthAccessToken") | 18 | //web.Router("/v1/auth/access-token", &controllers.AuthController{}, "Post:GetAuthAccessToken") |
19 | web.Router("/v1/auth/refresh-token", &controllers.AuthController{}, "Post:RefreshAuthAccessToken") | 19 | web.Router("/v1/auth/refresh-token", &controllers.AuthController{}, "Post:RefreshAuthAccessToken") |
20 | web.Router("/v1/auth/company-sign-up", &controllers.AuthController{}, "Post:CompanySignUp") //公司用户注册 | 20 | web.Router("/v1/auth/company-sign-up", &controllers.AuthController{}, "Post:CompanySignUp") //公司用户注册 |
21 | - web.Router("/v1/auth/reset-password", &controllers.AuthController{}, "Post:ResetPassword") //公司重置密码 | 21 | + web.Router("/v1/auth/user-sign-up", &controllers.AuthController{}, "Post:UserSignUp") |
22 | + web.Router("/v1/auth/reset-password", &controllers.AuthController{}, "Post:ResetPassword") //公司重置密码 | ||
22 | web.Router("/v1/auth/org-switch", &controllers.AuthController{}, "Post:OrgSwitch") | 23 | web.Router("/v1/auth/org-switch", &controllers.AuthController{}, "Post:OrgSwitch") |
23 | } | 24 | } |
@@ -7,7 +7,9 @@ import ( | @@ -7,7 +7,9 @@ import ( | ||
7 | 7 | ||
8 | func init() { | 8 | func init() { |
9 | web.Router("/v1/common/dictionary/search", &controllers.CommonController{}, "Post:GetDictionaryByCode") | 9 | web.Router("/v1/common/dictionary/search", &controllers.CommonController{}, "Post:GetDictionaryByCode") |
10 | + web.Router("/v1/common/advanced-query/setting", &controllers.CommonController{}, "Post:AdvancedSetting") | ||
10 | web.Router("/v1/common/version/getLatestVersionInfo", &controllers.CommonController{}, "Post:LatestVersionInfo") | 11 | web.Router("/v1/common/version/getLatestVersionInfo", &controllers.CommonController{}, "Post:LatestVersionInfo") |
11 | web.Router("/v1/common/app-sharing", &controllers.CommonController{}, "Post:AppSharing") | 12 | web.Router("/v1/common/app-sharing", &controllers.CommonController{}, "Post:AppSharing") |
13 | + web.Router("/v1/common/block-chain-browser", &controllers.CommonController{}, "Post:BlockChainBrowser") | ||
12 | web.Router("/log", &controllers.CommonController{}, "Get:LogData") | 14 | web.Router("/log", &controllers.CommonController{}, "Get:LogData") |
13 | } | 15 | } |
@@ -2,9 +2,11 @@ package routers | @@ -2,9 +2,11 @@ package routers | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "github.com/beego/beego/v2/server/web" | 4 | "github.com/beego/beego/v2/server/web" |
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" | ||
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers" |
6 | ) | 7 | ) |
7 | 8 | ||
8 | func init() { | 9 | func init() { |
9 | web.Router("/log", &controllers.LoggerController{}, "Get:Index") | 10 | web.Router("/log", &controllers.LoggerController{}, "Get:Index") |
11 | + web.SetStaticPath("/static", constant.FileStatic) | ||
10 | } | 12 | } |
@@ -32,10 +32,14 @@ func init() { | @@ -32,10 +32,14 @@ func init() { | ||
32 | web.Router("/v1/app/cooperation-projects/:projectId", &mobile_client.CooperationController{}, "Put:UpdateCooperationProject") | 32 | web.Router("/v1/app/cooperation-projects/:projectId", &mobile_client.CooperationController{}, "Put:UpdateCooperationProject") |
33 | web.Router("/v1/app/cooperation-projects/end", &mobile_client.CooperationController{}, "Post:EndCooperationProject") | 33 | web.Router("/v1/app/cooperation-projects/end", &mobile_client.CooperationController{}, "Post:EndCooperationProject") |
34 | web.Router("/v1/app/cooperation-projects/search", &mobile_client.CooperationController{}, "Post:SearchCooperationProject") | 34 | web.Router("/v1/app/cooperation-projects/search", &mobile_client.CooperationController{}, "Post:SearchCooperationProject") |
35 | + web.Router("/v1/app/cooperation-projects/contracts", &mobile_client.CooperationController{}, "Post:SearchCooperationProjectContracts") | ||
35 | web.Router("/v1/app/cooperation-modes", &web_client.CooperationModeController{}, "Get:ListCooperationMode") | 36 | web.Router("/v1/app/cooperation-modes", &web_client.CooperationModeController{}, "Get:ListCooperationMode") |
36 | web.Router("/v1/common/cooperation/mode", &web_client.CooperationModeController{}, "Get:ListCooperationMode") | 37 | web.Router("/v1/common/cooperation/mode", &web_client.CooperationModeController{}, "Get:ListCooperationMode") |
37 | 38 | ||
38 | web.Router("/v1/app/cooperation-projects/person/search", &mobile_client.CooperationController{}, "Post:PersonSearchCooperationProject") | 39 | web.Router("/v1/app/cooperation-projects/person/search", &mobile_client.CooperationController{}, "Post:PersonSearchCooperationProject") |
40 | + web.Router("/v1/app/cooperation-projects/person/search-starred", &mobile_client.CooperationController{}, "Post:PersonSearchCooperationProjectStarred") | ||
41 | + web.Router("/v1/app/cooperation-projects/person/shared-info", &mobile_client.CooperationController{}, "Post:PersonCooperationProjectSharedInfo") | ||
42 | + web.Router("/v1/app/cooperation-projects/person/shared-info/attachment", &mobile_client.CooperationController{}, "Post:PersonCooperationProjectSharedInfoAttachment") | ||
39 | 43 | ||
40 | /***** CompanyDividends 账期结算 *****/ | 44 | /***** CompanyDividends 账期结算 *****/ |
41 | web.Router("/v1/app/company/credit-accounts/search", &mobile_client.CooperationController{}, "Post:CreditAccountSearch") | 45 | web.Router("/v1/app/company/credit-accounts/search", &mobile_client.CooperationController{}, "Post:CreditAccountSearch") |
1 | +package routers | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/beego/beego/v2/server/web" | ||
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers/mobile_client" | ||
6 | +) | ||
7 | + | ||
8 | +func init() { | ||
9 | + | ||
10 | + /***** 转发销售导航的请求*****/ | ||
11 | + web.Router("/suplus-sale-app/v1/platform/district", &mobile_client.ReverseProxyController{}, "post:SuplusSaleApp") | ||
12 | + web.Router("/suplus-sale-app/v1/platform/page", &mobile_client.ReverseProxyController{}, "post:SuplusSaleApp") | ||
13 | + | ||
14 | +} |
@@ -15,6 +15,7 @@ func init() { | @@ -15,6 +15,7 @@ func init() { | ||
15 | web.Router("/v1/user/user-menu", &controllers.AuthController{}, "Post:GetUserMenus") | 15 | web.Router("/v1/user/user-menu", &controllers.AuthController{}, "Post:GetUserMenus") |
16 | web.Router("/v1/user/favorite-menus", &controllers.AuthController{}, "Get:GetFavoriteMenus") | 16 | web.Router("/v1/user/favorite-menus", &controllers.AuthController{}, "Get:GetFavoriteMenus") |
17 | web.Router("/v1/user/favorite-menus", &mobile_client.UserController{}, "Post:UpdateMenuFavorite") | 17 | web.Router("/v1/user/favorite-menus", &mobile_client.UserController{}, "Post:UpdateMenuFavorite") |
18 | + web.Router("/v1/user/favorite", &mobile_client.UserController{}, "Post:UpdateOrgFavorite") | ||
18 | 19 | ||
19 | web.Router("/v1/user/change-password", &mobile_client.UserController{}, "Post:ChangePassword") | 20 | web.Router("/v1/user/change-password", &mobile_client.UserController{}, "Post:ChangePassword") |
20 | web.Router("/v1/user/change-phone", &mobile_client.UserController{}, "Post:ChangePhone") | 21 | web.Router("/v1/user/change-phone", &mobile_client.UserController{}, "Post:ChangePhone") |
pkg/util/advance/column_exprs_test.go
0 → 100644
1 | +package advance | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/stretchr/testify/assert" | ||
5 | + "sort" | ||
6 | + "testing" | ||
7 | +) | ||
8 | + | ||
9 | +var exprNumberTable = [][]Expr{ | ||
10 | + []Expr{ | ||
11 | + {OpChar: Eq, Value: []interface{}{100, 200, 600}}, | ||
12 | + //{OpChar: Eq, Value: []interface{}{500}}, | ||
13 | + {OpChar: Range, Value: []interface{}{50, 200}, LeftOp: GreaterThan, RightOp: LessThan}, | ||
14 | + {OpChar: LessThanEqual, Value: []interface{}{Infinity, 50}}, | ||
15 | + {OpChar: LessThan, Value: []interface{}{Infinity, 250}}, | ||
16 | + {OpChar: Range, Value: []interface{}{60, 100}}, | ||
17 | + {OpChar: Range, Value: []interface{}{60, 70}}, | ||
18 | + {OpChar: NotEqual, Value: []interface{}{60, 61, 62}}, | ||
19 | + }, | ||
20 | + []Expr{ | ||
21 | + {OpChar: Range, Value: []interface{}{100, 200}, LeftOp: GreaterThan, RightOp: LessThanEqual}, | ||
22 | + {OpChar: Range, Value: []interface{}{Infinity, 50}, LeftOp: GreaterThan, RightOp: LessThanEqual}, | ||
23 | + {OpChar: Range, Value: []interface{}{50, 90}, LeftOp: GreaterThan, RightOp: LessThanEqual}, | ||
24 | + {OpChar: Range, Value: []interface{}{150, 300}, LeftOp: GreaterThan, RightOp: LessThanEqual}, | ||
25 | + }, | ||
26 | +} | ||
27 | + | ||
28 | +var exprDateTable = [][]Expr{ | ||
29 | + []Expr{ | ||
30 | + {OpChar: Range, Value: []interface{}{1611731000, 1611735000}}, | ||
31 | + {OpChar: LessThanEqual, Value: []interface{}{Infinity, 1611721000}}, | ||
32 | + {OpChar: Range, Value: []interface{}{1611734000, 1611737000}}, | ||
33 | + }, | ||
34 | + []Expr{ | ||
35 | + {OpChar: Range, Value: []interface{}{1611731000, 1611735000}}, | ||
36 | + {OpChar: LessThanEqual, Value: []interface{}{Infinity, 1611721000}}, | ||
37 | + {OpChar: Range, Value: []interface{}{1611734000, 1611737000}}, | ||
38 | + {OpChar: Recent, Value: []interface{}{5}}, | ||
39 | + }, | ||
40 | +} | ||
41 | + | ||
42 | +var exprCharsTable = [][]Expr{ | ||
43 | + []Expr{ | ||
44 | + {OpChar: In, Value: []interface{}{"abc", "abd"}}, | ||
45 | + {OpChar: Eq, Value: []interface{}{"abc"}}, | ||
46 | + }, | ||
47 | + []Expr{ | ||
48 | + {OpChar: In, Value: []interface{}{"华南", "华北"}}, | ||
49 | + {OpChar: Eq, Value: []interface{}{"华北"}}, | ||
50 | + {OpChar: Like, Value: []interface{}{"华"}}, | ||
51 | + {OpChar: Like, Value: []interface{}{"中"}}, | ||
52 | + }, | ||
53 | +} | ||
54 | + | ||
55 | +var columnChar = Column{ | ||
56 | + Column: "userName", | ||
57 | + Name: "姓名", | ||
58 | + DbAlias: "ext->>'userName'", | ||
59 | + ValueType: ValueChars, | ||
60 | +} | ||
61 | + | ||
62 | +var columnNumber = Column{ | ||
63 | + Column: "age", | ||
64 | + Name: "年龄", | ||
65 | + DbAlias: "age", | ||
66 | + ValueType: ValueNumber, | ||
67 | +} | ||
68 | + | ||
69 | +// 数字表达式合并 | ||
70 | +func TestJoinNumberColumnExpr(t *testing.T) { | ||
71 | + for i := range exprNumberTable { | ||
72 | + out := JoinColumnExprNumber(exprNumberTable[i]) | ||
73 | + t.Log(out) | ||
74 | + } | ||
75 | +} | ||
76 | + | ||
77 | +// 时间表达式合并 | ||
78 | +func TestJoinDateColumnExpr(t *testing.T) { | ||
79 | + for i := range exprDateTable { | ||
80 | + out := JoinColumnExprDate(exprDateTable[i]) | ||
81 | + t.Log(out) | ||
82 | + } | ||
83 | +} | ||
84 | + | ||
85 | +// 字符串表达式合并 | ||
86 | +func TestJoinCharsColumnExpr(t *testing.T) { | ||
87 | + for i := range exprCharsTable { | ||
88 | + out := JoinColumnExprChars(exprCharsTable[i]) | ||
89 | + t.Log(out) | ||
90 | + } | ||
91 | +} | ||
92 | + | ||
93 | +// 排序测试 | ||
94 | +func TestSortExprList(t *testing.T) { | ||
95 | + rec := RangeNumberExprCompute{valueType: ValueNumber} | ||
96 | + expr := exprNumberTable[0] | ||
97 | + for i := range expr { | ||
98 | + if expr[i].OpChar == Range || expr[i].OpChar == LessThanEqual || expr[i].OpChar == GreaterThanEqual { | ||
99 | + rec.expr = append(rec.expr, expr[i]) | ||
100 | + } | ||
101 | + } | ||
102 | + var exprSort = exprSortable(rec.expr) | ||
103 | + //log.Info("before:", exprSort) | ||
104 | + sort.Sort(exprSort) | ||
105 | + //log.Info("after:", exprSort) | ||
106 | + rec.expr = exprSort | ||
107 | +} | ||
108 | + | ||
109 | +func TestAdvancedQuerySqlNormal(t *testing.T) { | ||
110 | + inputs := []AdvancedQuery{ | ||
111 | + { | ||
112 | + Column: columnChar, | ||
113 | + Exprs: exprCharsTable[1], | ||
114 | + }, | ||
115 | + { | ||
116 | + Column: columnNumber, | ||
117 | + Exprs: exprNumberTable[0], | ||
118 | + }, | ||
119 | + } | ||
120 | + sql, _ := AdvancedQuerySql(inputs) | ||
121 | + t.Log(sql) | ||
122 | +} | ||
123 | + | ||
124 | +func TestAdvancedQuerySqlMerge(t *testing.T) { | ||
125 | + inputs := []AdvancedQuery{ | ||
126 | + { | ||
127 | + Column: columnChar, | ||
128 | + Exprs: exprCharsTable[1], | ||
129 | + }, | ||
130 | + { | ||
131 | + Column: columnNumber, | ||
132 | + Exprs: exprCharsTable[1], | ||
133 | + }, | ||
134 | + } | ||
135 | + sql, _ := AdvancedQuerySql(inputs) | ||
136 | + t.Log(sql) | ||
137 | +} | ||
138 | + | ||
139 | +func TestAdvancedQuerySqlNumber(t *testing.T) { | ||
140 | + inputs := []AdvancedQuery{ | ||
141 | + { | ||
142 | + Column: columnChar, | ||
143 | + Exprs: exprCharsTable[1], | ||
144 | + }, | ||
145 | + { | ||
146 | + Column: columnNumber, | ||
147 | + Exprs: exprNumberTable[1], | ||
148 | + }, | ||
149 | + } | ||
150 | + sql, _ := AdvancedQuerySql(inputs) | ||
151 | + t.Log(sql) | ||
152 | +} | ||
153 | + | ||
154 | +func TestAdvancedQuerySql_PG(t *testing.T) { | ||
155 | + tables := []struct { | ||
156 | + name string | ||
157 | + col Column | ||
158 | + ins []Expr | ||
159 | + except interface{} | ||
160 | + exceptSql string | ||
161 | + ok bool | ||
162 | + }{ | ||
163 | + // in (equal) | ||
164 | + { | ||
165 | + col: columnChar, | ||
166 | + name: "in zero item", | ||
167 | + ins: []Expr{ | ||
168 | + {OpChar: In, Value: []interface{}{}}, | ||
169 | + }, | ||
170 | + except: nil, | ||
171 | + exceptSql: "", | ||
172 | + ok: false, | ||
173 | + }, | ||
174 | + { | ||
175 | + col: columnChar, | ||
176 | + name: "in one item", | ||
177 | + ins: []Expr{ | ||
178 | + {OpChar: In, Value: []interface{}{"foo"}}, | ||
179 | + }, | ||
180 | + except: nil, | ||
181 | + exceptSql: "(ext->>'userName' in ('foo'))", | ||
182 | + ok: true, | ||
183 | + }, | ||
184 | + { | ||
185 | + col: columnChar, | ||
186 | + name: "in many item", | ||
187 | + ins: []Expr{ | ||
188 | + {OpChar: In, Value: []interface{}{"bar", "ccc", "foo", "ele"}}, | ||
189 | + }, | ||
190 | + except: nil, | ||
191 | + exceptSql: "(ext->>'userName' in ('bar','ccc','ele','foo'))", | ||
192 | + ok: true, | ||
193 | + }, | ||
194 | + { | ||
195 | + col: columnNumber, | ||
196 | + name: "in many item (number)", | ||
197 | + ins: []Expr{ | ||
198 | + {OpChar: In, Value: []interface{}{1, 2, 3, 4}}, | ||
199 | + }, | ||
200 | + except: nil, | ||
201 | + exceptSql: "(age in (1,2,3,4))", | ||
202 | + ok: true, | ||
203 | + }, | ||
204 | + { | ||
205 | + col: columnNumber, | ||
206 | + name: "in many item (number)", | ||
207 | + ins: []Expr{ | ||
208 | + {OpChar: In, Value: []interface{}{1, 2, 3, 4}}, | ||
209 | + }, | ||
210 | + except: nil, | ||
211 | + exceptSql: "(age in (1,2,3,4))", | ||
212 | + ok: true, | ||
213 | + }, | ||
214 | + | ||
215 | + // not in (not equal) | ||
216 | + { | ||
217 | + col: columnNumber, | ||
218 | + name: "not equal many item (number)", | ||
219 | + ins: []Expr{ | ||
220 | + {OpChar: NotEqual, Value: []interface{}{1, 2, 3, 4}}, | ||
221 | + {OpChar: NotEqual, Value: []interface{}{5, 6}}, | ||
222 | + }, | ||
223 | + except: nil, | ||
224 | + exceptSql: "(age not in (1,2,3,4,5,6))", | ||
225 | + ok: true, | ||
226 | + }, | ||
227 | + | ||
228 | + // range | ||
229 | + { | ||
230 | + col: columnChar, | ||
231 | + name: "range one item", | ||
232 | + ins: []Expr{ | ||
233 | + {OpChar: LessThanEqual, Value: []interface{}{Infinity, 60}}, | ||
234 | + }, | ||
235 | + except: nil, | ||
236 | + exceptSql: "", | ||
237 | + ok: true, | ||
238 | + }, | ||
239 | + { | ||
240 | + col: columnNumber, | ||
241 | + name: "range one item", | ||
242 | + ins: []Expr{ | ||
243 | + {OpChar: LessThanEqual, Value: []interface{}{Infinity, 60}}, | ||
244 | + }, | ||
245 | + except: nil, | ||
246 | + exceptSql: "(( age <= 60 ))", | ||
247 | + ok: true, | ||
248 | + }, | ||
249 | + { | ||
250 | + col: columnNumber, | ||
251 | + name: "range many item (LessThanEqual)", | ||
252 | + ins: []Expr{ | ||
253 | + {OpChar: LessThanEqual, Value: []interface{}{Infinity, 60}}, | ||
254 | + {OpChar: LessThanEqual, Value: []interface{}{Infinity, 80}}, | ||
255 | + }, | ||
256 | + except: nil, | ||
257 | + exceptSql: "(( age <= 60 ))", | ||
258 | + ok: true, | ||
259 | + }, | ||
260 | + { | ||
261 | + col: columnNumber, | ||
262 | + name: "range many item (GreaterThanEqual)", | ||
263 | + ins: []Expr{ | ||
264 | + {OpChar: LessThanEqual, Value: []interface{}{Infinity, 60}}, | ||
265 | + {OpChar: GreaterThanEqual, Value: []interface{}{80, Infinity}}, | ||
266 | + {OpChar: GreaterThanEqual, Value: []interface{}{200, Infinity}}, | ||
267 | + {OpChar: LessThanEqual, Value: []interface{}{Infinity, 70}}, | ||
268 | + }, | ||
269 | + except: nil, | ||
270 | + exceptSql: "", // 或集 (( age <= 70 ) or ( age >= 80 )) 并集 "" | ||
271 | + ok: true, | ||
272 | + }, | ||
273 | + { | ||
274 | + col: columnNumber, | ||
275 | + name: "range many item (Between $<=n<=$)", | ||
276 | + ins: []Expr{ | ||
277 | + {OpChar: GreaterThanEqual, Value: []interface{}{80, Infinity}}, | ||
278 | + {OpChar: LessThanEqual, Value: []interface{}{Infinity, 200}}, | ||
279 | + {OpChar: LessThan, Value: []interface{}{Infinity, 150}}, | ||
280 | + }, | ||
281 | + except: nil, | ||
282 | + exceptSql: "(( age >= 80 and age < 150 ))", | ||
283 | + ok: true, | ||
284 | + }, | ||
285 | + { | ||
286 | + col: columnNumber, | ||
287 | + name: "range many item (100<=n<=200)", | ||
288 | + ins: []Expr{ | ||
289 | + {OpChar: Range, Value: []interface{}{100, 200}, LeftOp: GreaterThanEqual, RightOp: LessThanEqual}, | ||
290 | + }, | ||
291 | + except: nil, | ||
292 | + exceptSql: "(( age >= 100 and age <= 200 ))", | ||
293 | + ok: true, | ||
294 | + }, | ||
295 | + { | ||
296 | + col: columnNumber, | ||
297 | + name: "range many item (80<n<220)", | ||
298 | + ins: []Expr{ | ||
299 | + {OpChar: Range, Value: []interface{}{"150", "180"}, LeftOp: GreaterThanEqual, RightOp: LessThanEqual}, | ||
300 | + {OpChar: Range, Value: []interface{}{"120", "220"}, LeftOp: GreaterThanEqual, RightOp: LessThan}, | ||
301 | + {OpChar: Range, Value: []interface{}{"100", "200"}, LeftOp: GreaterThanEqual, RightOp: LessThanEqual}, | ||
302 | + {OpChar: Range, Value: []interface{}{"80", "100"}, LeftOp: GreaterThan, RightOp: LessThanEqual}, | ||
303 | + {OpChar: Range, Value: []interface{}{"300", "500"}, LeftOp: GreaterThan, RightOp: LessThanEqual}, | ||
304 | + }, | ||
305 | + except: nil, | ||
306 | + exceptSql: "(( age > 80 and age < 220 ) or ( age > 300 and age <= 500 ))", | ||
307 | + ok: true, | ||
308 | + }, | ||
309 | + | ||
310 | + // like | ||
311 | + { | ||
312 | + col: columnChar, | ||
313 | + name: "like zero item", | ||
314 | + ins: []Expr{ | ||
315 | + {OpChar: Like, Value: []interface{}{}}, | ||
316 | + }, | ||
317 | + except: nil, | ||
318 | + exceptSql: "", | ||
319 | + ok: false, | ||
320 | + }, | ||
321 | + { | ||
322 | + col: columnChar, | ||
323 | + name: "like one item", | ||
324 | + ins: []Expr{ | ||
325 | + {OpChar: Like, Value: []interface{}{"foo"}}, | ||
326 | + }, | ||
327 | + except: nil, | ||
328 | + exceptSql: "((ext->>'userName' like '%foo%'))", | ||
329 | + ok: true, | ||
330 | + }, | ||
331 | + { | ||
332 | + col: columnChar, | ||
333 | + name: "like many item", | ||
334 | + ins: []Expr{ | ||
335 | + {OpChar: Like, Value: []interface{}{"bar", "ccc"}}, | ||
336 | + }, | ||
337 | + except: nil, | ||
338 | + exceptSql: "((ext->>'userName' like '%bar%' or ext->>'userName' like '%ccc%'))", | ||
339 | + ok: true, | ||
340 | + }, | ||
341 | + { | ||
342 | + col: columnNumber, | ||
343 | + name: "like many item (number)", | ||
344 | + ins: []Expr{ | ||
345 | + {OpChar: Like, Value: []interface{}{10, 20}}, | ||
346 | + }, | ||
347 | + except: nil, | ||
348 | + exceptSql: "((age::text like '%10%' or age::text like '%20%'))", | ||
349 | + ok: true, | ||
350 | + }, | ||
351 | + | ||
352 | + // error input | ||
353 | + { | ||
354 | + col: columnChar, | ||
355 | + name: "invalid input", | ||
356 | + ins: []Expr{ | ||
357 | + {OpChar: Like, Value: []interface{}{"dsger?*"}}, | ||
358 | + }, | ||
359 | + except: nil, | ||
360 | + exceptSql: "", | ||
361 | + ok: false, | ||
362 | + }, | ||
363 | + } | ||
364 | + | ||
365 | + for i := range tables { | ||
366 | + q := []AdvancedQuery{ | ||
367 | + { | ||
368 | + Column: tables[i].col, | ||
369 | + Exprs: tables[i].ins, | ||
370 | + }, | ||
371 | + } | ||
372 | + t.Run(tables[i].name, func(t *testing.T) { | ||
373 | + sql, err := AdvancedQuerySql(q) | ||
374 | + assert.Equal(t, tables[i].exceptSql, sql) | ||
375 | + if tables[i].ok { | ||
376 | + assert.Nil(t, err) | ||
377 | + } | ||
378 | + }) | ||
379 | + } | ||
380 | +} |
pkg/util/advance/expr.go
0 → 100644
1 | +package advance | ||
2 | + | ||
3 | +import ( | ||
4 | + "bytes" | ||
5 | + "fmt" | ||
6 | + "regexp" | ||
7 | + "strconv" | ||
8 | + "strings" | ||
9 | +) | ||
10 | + | ||
11 | +type ( | ||
12 | + Model struct { | ||
13 | + mc MapColumn | ||
14 | + name string | ||
15 | + } | ||
16 | + AdvancedQuery struct { | ||
17 | + Column Column `json:"column"` | ||
18 | + Exprs []Expr `json:"exprs"` | ||
19 | + } | ||
20 | + ColumnExprResult struct { | ||
21 | + Column Column | ||
22 | + Result []ExprResult | ||
23 | + } | ||
24 | + // 高级查询参数 | ||
25 | + AdvancedQueries []AdvancedQuery | ||
26 | +) | ||
27 | + | ||
28 | +var registerModels = make(map[string]Model) | ||
29 | + | ||
30 | +func RegisModel(m Model) { | ||
31 | + if _, ok := registerModels[m.name]; ok { | ||
32 | + panic("register modes exists:" + m.name) | ||
33 | + } | ||
34 | + registerModels[m.name] = m | ||
35 | +} | ||
36 | + | ||
37 | +func NewModel(name string, columns []Column) Model { | ||
38 | + return Model{ | ||
39 | + name: name, | ||
40 | + mc: NewMapColumn(columns), | ||
41 | + } | ||
42 | +} | ||
43 | + | ||
44 | +func ComputeColumnExpr(queries []AdvancedQuery) []ColumnExprResult { | ||
45 | + var result = make([]ColumnExprResult, 0) | ||
46 | + queries = mergeQuery(queries) | ||
47 | + for i := range queries { | ||
48 | + q := queries[i] | ||
49 | + var tmpResult []ExprResult | ||
50 | + switch q.Column.ValueType { | ||
51 | + case ValueNumber: | ||
52 | + tmpResult = append(JoinColumnExprNumber(q.Exprs)) | ||
53 | + case ValueChars: | ||
54 | + tmpResult = append(JoinColumnExprChars(q.Exprs)) | ||
55 | + case ValueDate: | ||
56 | + tmpResult = append(JoinColumnExprDate(q.Exprs)) | ||
57 | + } | ||
58 | + if len(tmpResult) == 0 { | ||
59 | + continue | ||
60 | + } | ||
61 | + result = append(result, ColumnExprResult{ | ||
62 | + Column: q.Column, | ||
63 | + Result: tmpResult, | ||
64 | + }) | ||
65 | + } | ||
66 | + return result | ||
67 | +} | ||
68 | + | ||
69 | +func JoinColumnExprNumber(expr []Expr) []ExprResult { | ||
70 | + var ec = []exprCompute{NewInExprCompute(expr, ValueNumber), NewRangeExprCompute(expr, ValueNumber), NewLessGreaterExprCompute(expr, ValueNumber), NewNotEqualExprCompute(expr, ValueNumber), NewLikeExprCompute(expr, ValueNumber)} | ||
71 | + return joinExprResult(ec) | ||
72 | +} | ||
73 | + | ||
74 | +func JoinColumnExprDate(expr []Expr) []ExprResult { | ||
75 | + var ec = []exprCompute{NewRangeExprCompute(expr, ValueDate), NewRecentDateExprCompute(expr, ValueDate), NewNotEqualExprCompute(expr, ValueChars)} | ||
76 | + return joinExprResult(ec) | ||
77 | +} | ||
78 | + | ||
79 | +func JoinColumnExprChars(expr []Expr) []ExprResult { | ||
80 | + var ec = []exprCompute{NewInExprCompute(expr, ValueChars), NewLikeExprCompute(expr, ValueChars), NewNotEqualExprCompute(expr, ValueChars)} | ||
81 | + return joinExprResult(ec) | ||
82 | +} | ||
83 | + | ||
84 | +type MapColumn map[string]Column | ||
85 | + | ||
86 | +func NewMapColumn(cols []Column) MapColumn { | ||
87 | + mapColumn := make(map[string]Column) | ||
88 | + for i := range cols { | ||
89 | + mapColumn[cols[i].Column] = cols[i] | ||
90 | + } | ||
91 | + return mapColumn | ||
92 | +} | ||
93 | + | ||
94 | +func (m MapColumn) FindItem(col string) Column { | ||
95 | + if item, ok := m[col]; ok { | ||
96 | + return item | ||
97 | + } | ||
98 | + return Column{} | ||
99 | +} | ||
100 | + | ||
101 | +type PgSqlGenerator struct{} | ||
102 | + | ||
103 | +func (p PgSqlGenerator) SqlGen(q ColumnExprResult) (string, error) { | ||
104 | + sql := bytes.NewBuffer(nil) | ||
105 | + sql.WriteString("(") | ||
106 | + var wheres []string | ||
107 | + for i := range q.Result { | ||
108 | + item := q.Result[i] | ||
109 | + if err := p.PreCheckAndFormat(&item); err != nil { | ||
110 | + return "", err | ||
111 | + } | ||
112 | + var where string | ||
113 | + switch item.OpChar { | ||
114 | + case In: | ||
115 | + where = p.In(q.Column, item.Value) | ||
116 | + case NotIn: | ||
117 | + where = p.NotIn(q.Column, item.Value) | ||
118 | + case Like: | ||
119 | + where = p.Like(q.Column, item.Value) | ||
120 | + case Range: | ||
121 | + where = p.Range(q.Column, item) | ||
122 | + default: | ||
123 | + where = fmt.Sprintf(" %s %s %v ", q.Column.DbAlias, item.OpChar, item.Value[0]) | ||
124 | + } | ||
125 | + if len(where) == 0 { | ||
126 | + continue | ||
127 | + } | ||
128 | + wheres = append(wheres, where) | ||
129 | + } | ||
130 | + sql.WriteString(strings.Join(wheres, sepOr)) | ||
131 | + sql.WriteString(")") | ||
132 | + return sql.String(), nil | ||
133 | +} | ||
134 | +func (p PgSqlGenerator) PreCheckAndFormat(rs *ExprResult) error { | ||
135 | + if rs.ValueType == ValueNumber || rs.ValueType == ValueDate { | ||
136 | + for i := range rs.Value { | ||
137 | + v := rs.Value[i] | ||
138 | + if isInfinity(v) { | ||
139 | + continue | ||
140 | + } | ||
141 | + if _, err := strconv.ParseFloat(fmt.Sprintf("%v", v), 64); err != nil { | ||
142 | + return fmt.Errorf("不是有效的数值类型:%v", v) | ||
143 | + } | ||
144 | + } | ||
145 | + } | ||
146 | + if rs.ValueType == ValueChars { | ||
147 | + for i := range rs.Value { | ||
148 | + v, ok := rs.Value[i].(string) | ||
149 | + err := fmt.Errorf("不是有效的字符串类型:%v", v) | ||
150 | + if !ok { | ||
151 | + return err | ||
152 | + } | ||
153 | + if ok, e := regexp.MatchString("[!%&()*+,-/=?^`'{|}~]", v); ok || e != nil { | ||
154 | + return fmt.Errorf("非法字符:%v", v) | ||
155 | + } | ||
156 | + } | ||
157 | + } | ||
158 | + return nil | ||
159 | +} | ||
160 | +func (p PgSqlGenerator) In(c Column, values []interface{}) string { | ||
161 | + if len(values) < 1 { | ||
162 | + return "" | ||
163 | + } | ||
164 | + var ret []string | ||
165 | + for i := range values { | ||
166 | + if c.ValueType == ValueNumber { | ||
167 | + ret = append(ret, fmt.Sprintf("%v", values[i])) | ||
168 | + } else { | ||
169 | + ret = append(ret, fmt.Sprintf("'%v'", values[i])) | ||
170 | + } | ||
171 | + } | ||
172 | + return fmt.Sprintf("%s in (%s)", c.DbAlias, strings.Join(ret, ",")) | ||
173 | +} | ||
174 | + | ||
175 | +func (p PgSqlGenerator) NotIn(c Column, values []interface{}) string { | ||
176 | + if len(values) < 1 { | ||
177 | + return "" | ||
178 | + } | ||
179 | + var ret []string | ||
180 | + for i := range values { | ||
181 | + if c.ValueType == ValueNumber { | ||
182 | + ret = append(ret, fmt.Sprintf("%v", values[i])) | ||
183 | + } else { | ||
184 | + ret = append(ret, fmt.Sprintf("'%v'", values[i])) | ||
185 | + } | ||
186 | + } | ||
187 | + return fmt.Sprintf("%s not in (%s)", c.DbAlias, strings.Join(ret, ",")) | ||
188 | +} | ||
189 | + | ||
190 | +func (p PgSqlGenerator) Like(c Column, values []interface{}) string { | ||
191 | + if len(values) < 1 { | ||
192 | + return "" | ||
193 | + } | ||
194 | + sql := bytes.NewBuffer(nil) | ||
195 | + sql.WriteString("(") | ||
196 | + var wheres []string | ||
197 | + for i := range values { | ||
198 | + if c.ValueType == ValueNumber { | ||
199 | + wheres = append(wheres, fmt.Sprintf("%s::text like '%%%v%%'", c.DbAlias, values[i])) | ||
200 | + } else { | ||
201 | + wheres = append(wheres, fmt.Sprintf("%s like '%%%v%%'", c.DbAlias, values[i])) | ||
202 | + } | ||
203 | + } | ||
204 | + sql.WriteString(strings.Join(wheres, sepOr)) | ||
205 | + sql.WriteString(")") | ||
206 | + return sql.String() | ||
207 | +} | ||
208 | + | ||
209 | +func (p PgSqlGenerator) Range(c Column, res ExprResult) string { | ||
210 | + if len(res.Value) != 2 { | ||
211 | + return "" | ||
212 | + } | ||
213 | + sql := bytes.NewBuffer(nil) | ||
214 | + sql.WriteString("(") | ||
215 | + var wheres []string | ||
216 | + if !isInfinity(res.Value[0]) { | ||
217 | + wheres = append(wheres, fmt.Sprintf(" %s %s %v ", c.DbAlias, res.LeftOp, res.Value[0])) | ||
218 | + } | ||
219 | + if !isInfinity(res.Value[1]) { | ||
220 | + wheres = append(wheres, fmt.Sprintf(" %s %s %v ", c.DbAlias, res.RightOp, res.Value[1])) | ||
221 | + } | ||
222 | + sql.WriteString(strings.Join(wheres, sepAnd)) | ||
223 | + sql.WriteString(")") | ||
224 | + return sql.String() | ||
225 | +} | ||
226 | + | ||
227 | +// AdvancedQuerySql 高级查询Sql生成器 | ||
228 | +func AdvancedQuerySql(queries []AdvancedQuery) (string, error) { | ||
229 | + if len(queries) == 0 { | ||
230 | + return "", nil | ||
231 | + } | ||
232 | + gen := PgSqlGenerator{} | ||
233 | + results := ComputeColumnExpr(queries) | ||
234 | + if len(results) == 0 { | ||
235 | + return "", nil | ||
236 | + } | ||
237 | + sql := bytes.NewBuffer(nil) | ||
238 | + var wheres []string | ||
239 | + for i := range results { | ||
240 | + condition, err := gen.SqlGen(results[i]) | ||
241 | + if err != nil { | ||
242 | + return "", err | ||
243 | + } | ||
244 | + wheres = append(wheres, condition) | ||
245 | + } | ||
246 | + sql.WriteString(strings.Join(wheres, sepAnd)) | ||
247 | + // 空条件 () | ||
248 | + if sql.String() == "()" { | ||
249 | + return "", nil | ||
250 | + } | ||
251 | + if sql.String() == "(())" { | ||
252 | + return "", nil | ||
253 | + } | ||
254 | + return sql.String(), nil | ||
255 | +} | ||
256 | + | ||
257 | +func mergeQuery(queries []AdvancedQuery) []AdvancedQuery { | ||
258 | + var rsp = make([]AdvancedQuery, 0) | ||
259 | + var mapColumn = make(map[string]AdvancedQuery) | ||
260 | + | ||
261 | + for i := range queries { | ||
262 | + var item AdvancedQuery | ||
263 | + var ok bool | ||
264 | + if item, ok = mapColumn[queries[i].Column.Column]; !ok { | ||
265 | + mapColumn[queries[i].Column.Column] = queries[i] | ||
266 | + } else { | ||
267 | + item.Exprs = append(item.Exprs, queries[i].Exprs...) | ||
268 | + } | ||
269 | + } | ||
270 | + for _, v := range mapColumn { | ||
271 | + rsp = append(rsp, v) | ||
272 | + } | ||
273 | + return rsp | ||
274 | +} |
-
请 注册 或 登录 后发表评论